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: 9896485 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 56F3B600CB for ; Fri, 11 Aug 2017 19:37:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BBDC28C9B for ; Fri, 11 Aug 2017 19:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4065828CD9; Fri, 11 Aug 2017 19:37:06 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 E4DD128C9B for ; Fri, 11 Aug 2017 19:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753363AbdHKThC (ORCPT ); Fri, 11 Aug 2017 15:37:02 -0400 Received: from mail-io0-f173.google.com ([209.85.223.173]:36680 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381AbdHKThB (ORCPT ); Fri, 11 Aug 2017 15:37:01 -0400 Received: by mail-io0-f173.google.com with SMTP id g35so23479241ioi.3 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=bvqABQZ469OK97S8JEC2HsuZ9ve2yyCkf4Pi1leBWwS6ac8gl3xD14UFTFT7vj4iPP vgXPH1oMQI8ehxg4SGjC+YMFen3qaSzVGy1yvZ7RpsCDFUrxucSbNysBgqwyE6gxdOG0 VoA2+1D/eNetu7sJq2cG+gLvrB13y1VyHekXQg2N1lqIzmxP3syWl9euDYAevHHK1RMB Y82PNi7NlQxkNVy7eImuRrHRWx1I115/0/rKok6EGpc6GS+xtt66kiqe038xeeeK+tyX a5V7L8e5j+hcXnK1zEnKqwkCB2hdzB8vu3BQLr3YxK2EZUkVJcbvdKyxuN3OziBlBAWR LxhA== X-Gm-Message-State: AIVw112YqUZMKXKp2mmEDIw3VJbI3YZ/T6NRl45gaqbbmJ4bFv5F7dxM 6Ul3u+qNM40DOpEUsXkRpG4wLGxgt9Vn 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: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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. --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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