From: Magnus Damm <magnus.damm@gmail.com> To: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3] ARM: xip: Use correct symbol for end of ROM marker Date: Wed, 18 Nov 2015 05:12:01 +0000 [thread overview] Message-ID: <CANqRtoTkHecGEsbi3EtM8dkHQ=V0RGm7iZcU_igMqLE7Od=xBA@mail.gmail.com> (raw) In-Reply-To: <alpine.LFD.2.20.1511172255410.22569@knanqh.ubzr> Hi Nicolas, On Wed, Nov 18, 2015 at 12:58 PM, Nicolas Pitre <nico@fluxnic.net> wrote: > On Tue, 17 Nov 2015, Chris Brandt wrote: > >> I think this one is more of a coding issue. >> These were the attempts to fix the temporary stack issue: >> >> My first patch: >> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/357106.html >> >> Magnus's try: >> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/383394.html > > Here's my proposal: > > diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S > index de2b246fed..2d0ac32320 100644 > --- a/arch/arm/mm/proc-v7.S > +++ b/arch/arm/mm/proc-v7.S > @@ -274,10 +274,12 @@ __v7_ca15mp_setup: > __v7_b15mp_setup: > __v7_ca17mp_setup: > mov r10, #0 > -1: adr r12, __v7_setup_stack @ the local stack > - stmia r12, {r0-r5, lr} @ v7_invalidate_l1 touches r0-r6 > +1: adr r0, __v7_setup_stack_ptr > + ldr r12, [r0] > + add r12, r12, r0 @ the local stack > + stmia r12, {r1-r6, lr} @ v7_invalidate_l1 touches r0-r6 > bl v7_invalidate_l1 > - ldmia r12, {r0-r5, lr} > + ldmia r12, {r1-r6, lr} > #ifdef CONFIG_SMP > ALT_SMP(mrc p15, 0, r0, c1, c0, 1) > ALT_UP(mov r0, #(1 << 6)) @ fake it for UP [snip] > @@ -480,11 +484,16 @@ __errata_finish: > orr r0, r0, r6 @ set them > THUMB( orr r0, r0, #1 << 30 ) @ Thumb exceptions > ret lr @ return to head.S:__ret > + > + .align 2 > +__v7_setup_stack_ptr: > + .word __v7_setup_stack - . > ENDPROC(__v7_setup) Thanks for your take on this. I did a couple of local implementations before submitting, and one of the issues I ran into was the need to get rid of PAGE_OFFSET due to the code running without MMU enabled. I suppose that is taken care of the "__v7_setup_stack - ." calculation above? Cheers, / magnus
WARNING: multiple messages have this Message-ID (diff)
From: magnus.damm@gmail.com (Magnus Damm) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3] ARM: xip: Use correct symbol for end of ROM marker Date: Wed, 18 Nov 2015 14:12:01 +0900 [thread overview] Message-ID: <CANqRtoTkHecGEsbi3EtM8dkHQ=V0RGm7iZcU_igMqLE7Od=xBA@mail.gmail.com> (raw) In-Reply-To: <alpine.LFD.2.20.1511172255410.22569@knanqh.ubzr> Hi Nicolas, On Wed, Nov 18, 2015 at 12:58 PM, Nicolas Pitre <nico@fluxnic.net> wrote: > On Tue, 17 Nov 2015, Chris Brandt wrote: > >> I think this one is more of a coding issue. >> These were the attempts to fix the temporary stack issue: >> >> My first patch: >> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/357106.html >> >> Magnus's try: >> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/383394.html > > Here's my proposal: > > diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S > index de2b246fed..2d0ac32320 100644 > --- a/arch/arm/mm/proc-v7.S > +++ b/arch/arm/mm/proc-v7.S > @@ -274,10 +274,12 @@ __v7_ca15mp_setup: > __v7_b15mp_setup: > __v7_ca17mp_setup: > mov r10, #0 > -1: adr r12, __v7_setup_stack @ the local stack > - stmia r12, {r0-r5, lr} @ v7_invalidate_l1 touches r0-r6 > +1: adr r0, __v7_setup_stack_ptr > + ldr r12, [r0] > + add r12, r12, r0 @ the local stack > + stmia r12, {r1-r6, lr} @ v7_invalidate_l1 touches r0-r6 > bl v7_invalidate_l1 > - ldmia r12, {r0-r5, lr} > + ldmia r12, {r1-r6, lr} > #ifdef CONFIG_SMP > ALT_SMP(mrc p15, 0, r0, c1, c0, 1) > ALT_UP(mov r0, #(1 << 6)) @ fake it for UP [snip] > @@ -480,11 +484,16 @@ __errata_finish: > orr r0, r0, r6 @ set them > THUMB( orr r0, r0, #1 << 30 ) @ Thumb exceptions > ret lr @ return to head.S:__ret > + > + .align 2 > +__v7_setup_stack_ptr: > + .word __v7_setup_stack - . > ENDPROC(__v7_setup) Thanks for your take on this. I did a couple of local implementations before submitting, and one of the issues I ran into was the need to get rid of PAGE_OFFSET due to the code running without MMU enabled. I suppose that is taken care of the "__v7_setup_stack - ." calculation above? Cheers, / magnus
next prev parent reply other threads:[~2015-11-18 5:12 UTC|newest] Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-11-11 14:17 [PATCH] ARM: xip: Use correct symbol for end of ROM marker Chris Brandt 2015-11-11 14:17 ` Chris Brandt 2015-11-11 14:17 ` Chris Brandt 2015-11-12 12:17 ` Peter Hurley 2015-11-12 12:17 ` Peter Hurley 2015-11-12 12:17 ` Peter Hurley 2015-11-12 13:15 ` Chris Brandt 2015-11-12 13:15 ` Chris Brandt 2015-11-12 13:15 ` Chris Brandt 2015-11-12 16:32 ` Russell King - ARM Linux 2015-11-12 16:32 ` Russell King - ARM Linux 2015-11-12 16:32 ` Russell King - ARM Linux 2015-11-12 21:01 ` [PATCH v2] " Chris Brandt 2015-11-12 21:01 ` Chris Brandt 2015-11-13 7:46 ` Geert Uytterhoeven 2015-11-13 7:46 ` Geert Uytterhoeven 2015-11-13 20:03 ` Chris Brandt 2015-11-13 20:03 ` Chris Brandt 2015-11-16 18:05 ` [PATCH v3] " Chris Brandt 2015-11-16 18:05 ` Chris Brandt 2015-11-16 18:17 ` Russell King - ARM Linux 2015-11-16 18:17 ` Russell King - ARM Linux 2015-11-16 19:46 ` Chris Brandt 2015-11-16 19:46 ` Chris Brandt 2015-11-16 19:53 ` Russell King - ARM Linux 2015-11-16 19:53 ` Russell King - ARM Linux 2015-11-16 20:18 ` Chris Brandt 2015-11-16 20:18 ` Chris Brandt 2015-11-16 20:30 ` Russell King - ARM Linux 2015-11-16 20:30 ` Russell King - ARM Linux 2015-11-16 20:57 ` Nicolas Pitre 2015-11-16 20:57 ` Nicolas Pitre 2015-11-16 21:09 ` Chris Brandt 2015-11-16 21:09 ` Chris Brandt 2015-11-16 20:27 ` Nicolas Pitre 2015-11-16 20:27 ` Nicolas Pitre 2015-11-16 21:02 ` Chris Brandt 2015-11-16 21:02 ` Chris Brandt 2015-11-16 21:47 ` Nicolas Pitre 2015-11-16 21:47 ` Nicolas Pitre 2015-11-16 22:19 ` Chris Brandt 2015-11-16 22:19 ` Chris Brandt 2015-11-17 0:48 ` Nicolas Pitre 2015-11-17 0:48 ` Nicolas Pitre 2015-11-17 2:11 ` Chris Brandt 2015-11-17 2:11 ` Chris Brandt 2015-11-17 2:37 ` Nicolas Pitre 2015-11-17 2:37 ` Nicolas Pitre 2015-11-17 16:56 ` Chris Brandt 2015-11-17 16:56 ` Chris Brandt 2015-11-17 17:24 ` Nicolas Pitre 2015-11-17 17:24 ` Nicolas Pitre 2015-11-18 3:58 ` Nicolas Pitre 2015-11-18 3:58 ` Nicolas Pitre 2015-11-18 5:12 ` Magnus Damm [this message] 2015-11-18 5:12 ` Magnus Damm 2015-11-18 13:45 ` Nicolas Pitre 2015-11-18 13:45 ` Nicolas Pitre 2015-11-18 17:01 ` Nicolas Pitre 2015-11-18 17:01 ` Nicolas Pitre 2015-11-18 19:12 ` Chris Brandt 2015-11-18 19:12 ` Chris Brandt 2015-11-18 20:23 ` Nicolas Pitre 2015-11-18 20:23 ` Nicolas Pitre 2015-11-18 20:51 ` Chris Brandt 2015-11-18 20:51 ` Chris Brandt 2015-11-18 21:36 ` Nicolas Pitre 2015-11-18 21:36 ` Nicolas Pitre 2016-01-29 21:12 ` Chris Brandt 2016-01-29 21:12 ` Chris Brandt 2016-01-29 21:17 ` Nicolas Pitre 2016-01-29 21:17 ` Nicolas Pitre 2015-11-17 16:45 ` Chris Brandt 2015-11-17 16:45 ` Chris Brandt 2015-11-17 16:57 ` Nicolas Pitre 2015-11-17 16:57 ` Nicolas Pitre 2015-11-18 2:09 ` Chris Brandt 2015-11-18 2:09 ` Chris Brandt 2015-11-18 3:17 ` Nicolas Pitre 2015-11-18 3:17 ` Nicolas Pitre 2015-11-18 8:30 ` Arnd Bergmann 2015-11-18 8:30 ` Arnd Bergmann 2015-11-18 15:28 ` Chris Brandt 2015-11-18 15:28 ` Chris Brandt 2015-11-18 15:16 ` Chris Brandt 2015-11-18 15:16 ` Chris Brandt 2015-11-18 17:07 ` Nicolas Pitre 2015-11-18 17:07 ` Nicolas Pitre 2015-11-18 19:36 ` Chris Brandt 2015-11-18 19:36 ` Chris Brandt 2015-11-18 19:44 ` Nicolas Pitre 2015-11-18 19:44 ` Nicolas Pitre 2015-11-18 20:00 ` Chris Brandt 2015-11-18 20:00 ` Chris Brandt 2015-11-17 17:33 ` Russell King - ARM Linux 2015-11-17 17:33 ` Russell King - ARM Linux 2016-02-01 17:52 ` [PATCH v4] " Chris Brandt 2016-02-01 19:12 ` Nicolas Pitre 2016-02-01 19:41 ` Chris Brandt 2016-02-01 20:23 ` Nicolas Pitre 2016-02-02 17:05 ` Chris Brandt 2016-02-02 17:19 ` [PATCH v5] " Chris Brandt 2016-02-02 17:35 ` Nicolas Pitre
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CANqRtoTkHecGEsbi3EtM8dkHQ=V0RGm7iZcU_igMqLE7Od=xBA@mail.gmail.com' \ --to=magnus.damm@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.