* [PATCH] Fix booting pre-ARM6 machines
@ 2009-09-25 20:54 Uwe Kleine-König
2009-09-25 21:09 ` Nicolas Pitre
2009-09-26 11:35 ` Ben Dooks
0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2009-09-25 20:54 UTC (permalink / raw)
To: linux-arm-kernel
Commit 200b812d0084f800bc52465e273b118ff5f8141f includes the following
hunk:
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index a4eaf4f..e17e3c3 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -76,13 +76,25 @@
#ifndef CONFIG_THUMB2_KERNEL
.macro svc_exit, rpsr
msr spsr_cxsf, \rpsr
+#if defined(CONFIG_CPU_32v6K)
+ clrex @ clear the exclusive monitor
ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
+#elif defined (CONFIG_CPU_V6)
+ ldr r0, [sp]
+ strex r1, r2, [sp] @ clear the exclusive monitor
+ ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
+#endif
.endm
.macro restore_user_regs, fast = 0, offset = 0
Having neither CONFIG_THUMB2_KERNEL nor CONFIG_CPU_32v6K nor
CONFIG_CPU_V6 this steals the ldmia instruction. The result is that
svc_exit doesn't work at all. So reintroduce it.
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jamie Lokier <jamie@shareable.org>
---
arch/arm/kernel/entry-header.S | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index e17e3c3..ac34c0d 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -83,6 +83,8 @@
ldr r0, [sp]
strex r1, r2, [sp] @ clear the exclusive monitor
ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
+#else
+ ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
#endif
.endm
--
1.6.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Fix booting pre-ARM6 machines
2009-09-25 20:54 [PATCH] Fix booting pre-ARM6 machines Uwe Kleine-König
@ 2009-09-25 21:09 ` Nicolas Pitre
2009-09-26 8:34 ` Uwe Kleine-König
2009-09-26 11:35 ` Ben Dooks
1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2009-09-25 21:09 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 25 Sep 2009, Uwe Kleine-K?nig wrote:
> Commit 200b812d0084f800bc52465e273b118ff5f8141f includes the following
> hunk:
>
> diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
> index a4eaf4f..e17e3c3 100644
> --- a/arch/arm/kernel/entry-header.S
> +++ b/arch/arm/kernel/entry-header.S
> @@ -76,13 +76,25 @@
> #ifndef CONFIG_THUMB2_KERNEL
> .macro svc_exit, rpsr
> msr spsr_cxsf, \rpsr
> +#if defined(CONFIG_CPU_32v6K)
> + clrex @ clear the exclusive monitor
> ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
> +#elif defined (CONFIG_CPU_V6)
> + ldr r0, [sp]
> + strex r1, r2, [sp] @ clear the exclusive monitor
> + ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
> +#endif
> .endm
>
> .macro restore_user_regs, fast = 0, offset = 0
>
I've sent the same patch directly to Linus already in the hope that
he'll merge it before -rc1.
Also you should avoid quoting patch hunks without indenting them or
prefixing them with some quotation mark, otherwise the tools used to
apply patches from emails will pick on that "diff" above as if it was
the actual patch and discard everything that follows it.
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fix booting pre-ARM6 machines
2009-09-25 21:09 ` Nicolas Pitre
@ 2009-09-26 8:34 ` Uwe Kleine-König
0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2009-09-26 8:34 UTC (permalink / raw)
To: linux-arm-kernel
Hi Nicolas,
> I've sent the same patch directly to Linus already in the hope that
> he'll merge it before -rc1.
OK.
> Also you should avoid quoting patch hunks without indenting them or
> prefixing them with some quotation mark, otherwise the tools used to
> apply patches from emails will pick on that "diff" above as if it was
> the actual patch and discard everything that follows it.
ah, right. Thanks for the hint.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fix booting pre-ARM6 machines
2009-09-25 20:54 [PATCH] Fix booting pre-ARM6 machines Uwe Kleine-König
2009-09-25 21:09 ` Nicolas Pitre
@ 2009-09-26 11:35 ` Ben Dooks
1 sibling, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2009-09-26 11:35 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Sep 25, 2009 at 10:54:24PM +0200, Uwe Kleine-K?nig wrote:
> Commit 200b812d0084f800bc52465e273b118ff5f8141f includes the following
> hunk:
>
> diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
> index a4eaf4f..e17e3c3 100644
> --- a/arch/arm/kernel/entry-header.S
> +++ b/arch/arm/kernel/entry-header.S
> @@ -76,13 +76,25 @@
> #ifndef CONFIG_THUMB2_KERNEL
> .macro svc_exit, rpsr
> msr spsr_cxsf, \rpsr
> +#if defined(CONFIG_CPU_32v6K)
> + clrex @ clear the exclusive monitor
> ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
> +#elif defined (CONFIG_CPU_V6)
> + ldr r0, [sp]
> + strex r1, r2, [sp] @ clear the exclusive monitor
> + ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
> +#endif
hmm, this really shouldn'y be selected at compile time as what if we have
a kernel which supports V6 or later and pre-V6 in one image?
> .endm
>
> .macro restore_user_regs, fast = 0, offset = 0
>
> Having neither CONFIG_THUMB2_KERNEL nor CONFIG_CPU_32v6K nor
> CONFIG_CPU_V6 this steals the ldmia instruction. The result is that
> svc_exit doesn't work at all. So reintroduce it.
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Jamie Lokier <jamie@shareable.org>
> ---
> arch/arm/kernel/entry-header.S | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
> index e17e3c3..ac34c0d 100644
> --- a/arch/arm/kernel/entry-header.S
> +++ b/arch/arm/kernel/entry-header.S
> @@ -83,6 +83,8 @@
> ldr r0, [sp]
> strex r1, r2, [sp] @ clear the exclusive monitor
> ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
> +#else
> + ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
> #endif
> .endm
>
> --
> 1.6.4.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-26 11:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 20:54 [PATCH] Fix booting pre-ARM6 machines Uwe Kleine-König
2009-09-25 21:09 ` Nicolas Pitre
2009-09-26 8:34 ` Uwe Kleine-König
2009-09-26 11:35 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).