From patchwork Fri Aug 11 19:37:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9896483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9594D600CB for ; Fri, 11 Aug 2017 19:37:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ACA028C9B for ; Fri, 11 Aug 2017 19:37:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F58A28CDB; Fri, 11 Aug 2017 19:37:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24C3528CD8 for ; Fri, 11 Aug 2017 19:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbdHKThD (ORCPT ); Fri, 11 Aug 2017 15:37:03 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:37076 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753325AbdHKThB (ORCPT ); Fri, 11 Aug 2017 15:37:01 -0400 Received: by mail-io0-f172.google.com with SMTP id c74so23432444iod.4 for ; Fri, 11 Aug 2017 12:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I1RHhwCQhHEBTzuHfCEh+q5xpxRgBC3QMTeteeUTAuw=; b=df8Tydsm+j9SIaxHB2kbhuggq6jlK/DDcMJnM6pCkd5byTpQW9C3Azpm0eMKSIGJJ+ oxVus3DQrCqYqxAFwdQoSSyphVLZeyEjcZftjddj9xf8BBDLyZg8oz4c+FqWiWsEDM0w n/vNUHdEA3L7T2+4z2bsNrxFjmv5PEh6Q+d7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I1RHhwCQhHEBTzuHfCEh+q5xpxRgBC3QMTeteeUTAuw=; b=B/SMQVT37XD3sqcd7VlzfzCwQcvfR4Mi89/VUl/zjy6qy2SSJ+bSV1fI7gbQVi3MIa /gEWmaOFnuc0Q85MqAD6AbjVfP7yRghq+CExxaeW6y3tV2GUvxNp7pCtIyIuwb0ikUOr wzLv4LZ3f8SN+rLUC/WYgmJ4EIG2IZFNcLxo43GFSmxJlOX6tikx14+OMUD82cCDpimb vMpy4KaGlzDcT/V079MmFds2c8y8Hhyu15mKsHODfY7hwwzfIur6ylAehEpzIY4Mxwyc y49jmFgekVlRKmBbQR9JmNoBbEo7hXZKczYyVsGRW1lYsiLjdx+D0+Nd0fBIRZrk7RXk P7FA== X-Gm-Message-State: AIVw112y+xoeGbKqsI4y5EH5Nm/XjligWavEe5ebnb/lF72B/FbcbjJT lNQ7xOrdmXKXlMJ1caLR4QtD7PJP/IiJ X-Received: by 10.107.135.226 with SMTP id r95mr15793633ioi.3.1502480220660; Fri, 11 Aug 2017 12:37:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.162.1 with HTTP; Fri, 11 Aug 2017 12:37:00 -0700 (PDT) In-Reply-To: <20170811151346.GR8569@atomide.com> References: <20170805205222.19868-1-ard.biesheuvel@linaro.org> <20170805205222.19868-6-ard.biesheuvel@linaro.org> <20170811151346.GR8569@atomide.com> From: Ard Biesheuvel Date: Fri, 11 Aug 2017 20:37:00 +0100 Message-ID: Subject: Re: [PATCH 05/15] ARM: head: use PC-relative insn sequence for __smp_alt To: Tony Lindgren Cc: "linux-arm-kernel@lists.infradead.org" , linux-renesas-soc@vger.kernel.org, Russell King , "linux-omap@vger.kernel.org" , KVM devel mailing list , "kvmarm@lists.cs.columbia.edu" , Krzysztof Kozlowski , Jason Cooper , arm@kernel.org, Andrew Lunn , Gregory CLEMENT , Sebastian Hesselbarth , baohua@kernel.org, Simon Horman , Magnus Damm , vireshk@kernel.org, Shiraz Hashim , Patrice CHOTARD , "nico@linaro.org" , Dave Martin , Marc Zyngier Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 11 August 2017 at 16:13, Tony Lindgren wrote: > * Ard Biesheuvel [170805 13:54]: >> Replace the open coded PC relative offset calculations with a pair >> of adr_l invocations. >> >> Signed-off-by: Ard Biesheuvel >> --- >> arch/arm/kernel/head.S | 12 ++---------- >> 1 file changed, 2 insertions(+), 10 deletions(-) >> >> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S >> index 6e9df3663a57..aed341e0f530 100644 >> --- a/arch/arm/kernel/head.S >> +++ b/arch/arm/kernel/head.S >> @@ -523,19 +523,11 @@ ARM_BE8(rev r0, r0) @ byteswap if big endian >> retne lr >> >> __fixup_smp_on_up: >> - adr r0, 1f >> - ldmia r0, {r3 - r5} >> - sub r3, r0, r3 >> - add r4, r4, r3 >> - add r5, r5, r3 >> + adr_l r4, __smpalt_begin >> + adr_l r5, __smpalt_end >> b __do_fixup_smp_on_up >> ENDPROC(__fixup_smp) >> >> - .align >> -1: .word . >> - .word __smpalt_begin >> - .word __smpalt_end >> - >> .pushsection .data >> .globl smp_on_up >> smp_on_up: > > Ard, it's this one that cause boot to fail on omap3. > The rest of your set works for me with just this one > left out. > I'm completely puzzled. The change is so simple that it is difficult to reduce it in parts, but if you still have the time to spare, mind trying the diff below? .globl smp_on_up The main point of these changes is to eliminate absolute references, not to use the new macros, so if this does work, I will go with this instead. diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 6e9df3663a57..c0361e608210 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -524,17 +524,15 @@ ARM_BE8(rev r0, r0) @ byteswap if big endian __fixup_smp_on_up: adr r0, 1f - ldmia r0, {r3 - r5} - sub r3, r0, r3 - add r4, r4, r3 - add r5, r5, r3 + ldmia r0, {r4 - r5} + add r4, r4, r0 + add r5, r5, r0 b __do_fixup_smp_on_up ENDPROC(__fixup_smp) .align -1: .word . - .word __smpalt_begin - .word __smpalt_end +1: .word __smpalt_begin - 1b + .word __smpalt_end - 1b .pushsection .data