* [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
@ 2011-08-19 18:03 ` Nick Bowler
0 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-19 18:03 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel; +Cc: Russell King
Current Versatile Express CPU hotplug code includes a hardcoded WFI
instruction, in ARM encoding. When the kernel is compiled in Thumb-2
mode, this is invalid and causes the machine to hang hard when a CPU
is offlined.
Using the assembler mnemonic instead of hardcoding it causes the correct
instruction to be emitted in either case.
Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
arch/arm/mach-vexpress/hotplug.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
OK. I assume that the reason for the hardcoded instruction is that
older versions of binutils did not support the mnemonic. Looking at the
binutils CVS history, support seems to have been added in 2005, and was
included in the 2.16 release. If we care about those old assembler
versions, I can resubmit this patch using ARM/THUMB macros instead,
which should work just as well.
I imagine that other platforms which use this same construct, such as
realview, will have similar problems in thumb mode. I can't test
changes on those platforms, unfortunately.
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index ea4cbfb..d6be197 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -62,10 +62,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
+ asm("wfi\n"
:
:
: "memory", "cc");
--
1.7.3.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
@ 2011-08-19 18:03 ` Nick Bowler
0 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-19 18:03 UTC (permalink / raw)
To: linux-arm-kernel
Current Versatile Express CPU hotplug code includes a hardcoded WFI
instruction, in ARM encoding. When the kernel is compiled in Thumb-2
mode, this is invalid and causes the machine to hang hard when a CPU
is offlined.
Using the assembler mnemonic instead of hardcoding it causes the correct
instruction to be emitted in either case.
Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
arch/arm/mach-vexpress/hotplug.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
OK. I assume that the reason for the hardcoded instruction is that
older versions of binutils did not support the mnemonic. Looking at the
binutils CVS history, support seems to have been added in 2005, and was
included in the 2.16 release. If we care about those old assembler
versions, I can resubmit this patch using ARM/THUMB macros instead,
which should work just as well.
I imagine that other platforms which use this same construct, such as
realview, will have similar problems in thumb mode. I can't test
changes on those platforms, unfortunately.
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index ea4cbfb..d6be197 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -62,10 +62,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
+ asm("wfi\n"
:
:
: "memory", "cc");
--
1.7.3.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
2011-08-19 18:03 ` Nick Bowler
@ 2011-08-19 18:15 ` Jamie Iles
-1 siblings, 0 replies; 16+ messages in thread
From: Jamie Iles @ 2011-08-19 18:15 UTC (permalink / raw)
To: Nick Bowler; +Cc: linux-arm-kernel, linux-kernel, Russell King
Hi Nick,
On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
> Current Versatile Express CPU hotplug code includes a hardcoded WFI
> instruction, in ARM encoding. When the kernel is compiled in Thumb-2
> mode, this is invalid and causes the machine to hang hard when a CPU
> is offlined.
>
> Using the assembler mnemonic instead of hardcoding it causes the correct
> instruction to be emitted in either case.
>
> Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> ---
> arch/arm/mach-vexpress/hotplug.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> OK. I assume that the reason for the hardcoded instruction is that
> older versions of binutils did not support the mnemonic. Looking at the
> binutils CVS history, support seems to have been added in 2005, and was
> included in the 2.16 release. If we care about those old assembler
> versions, I can resubmit this patch using ARM/THUMB macros instead,
> which should work just as well.
>
> I imagine that other platforms which use this same construct, such as
> realview, will have similar problems in thumb mode. I can't test
> changes on those platforms, unfortunately.
>
> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> index ea4cbfb..d6be197 100644
> --- a/arch/arm/mach-vexpress/hotplug.c
> +++ b/arch/arm/mach-vexpress/hotplug.c
> @@ -62,10 +62,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> * code will have already disabled interrupts
> */
> for (;;) {
> - /*
> - * here's the WFI
> - */
> - asm(".word 0xe320f003\n"
> + asm("wfi\n"
> :
> :
> : "memory", "cc");
There's a wfi() macro defined in arch/arm/include/asm/system.h that
could be used here.
Jamie
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
@ 2011-08-19 18:15 ` Jamie Iles
0 siblings, 0 replies; 16+ messages in thread
From: Jamie Iles @ 2011-08-19 18:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi Nick,
On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
> Current Versatile Express CPU hotplug code includes a hardcoded WFI
> instruction, in ARM encoding. When the kernel is compiled in Thumb-2
> mode, this is invalid and causes the machine to hang hard when a CPU
> is offlined.
>
> Using the assembler mnemonic instead of hardcoding it causes the correct
> instruction to be emitted in either case.
>
> Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> ---
> arch/arm/mach-vexpress/hotplug.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> OK. I assume that the reason for the hardcoded instruction is that
> older versions of binutils did not support the mnemonic. Looking at the
> binutils CVS history, support seems to have been added in 2005, and was
> included in the 2.16 release. If we care about those old assembler
> versions, I can resubmit this patch using ARM/THUMB macros instead,
> which should work just as well.
>
> I imagine that other platforms which use this same construct, such as
> realview, will have similar problems in thumb mode. I can't test
> changes on those platforms, unfortunately.
>
> diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
> index ea4cbfb..d6be197 100644
> --- a/arch/arm/mach-vexpress/hotplug.c
> +++ b/arch/arm/mach-vexpress/hotplug.c
> @@ -62,10 +62,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> * code will have already disabled interrupts
> */
> for (;;) {
> - /*
> - * here's the WFI
> - */
> - asm(".word 0xe320f003\n"
> + asm("wfi\n"
> :
> :
> : "memory", "cc");
There's a wfi() macro defined in arch/arm/include/asm/system.h that
could be used here.
Jamie
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
2011-08-19 18:15 ` Jamie Iles
@ 2011-08-19 19:26 ` Nick Bowler
-1 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-19 19:26 UTC (permalink / raw)
To: Jamie Iles; +Cc: linux-arm-kernel, linux-kernel, Russell King
On 2011-08-19 19:15 +0100, Jamie Iles wrote:
> On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
[...]
> > - /*
> > - * here's the WFI
> > - */
> > - asm(".word 0xe320f003\n"
> > + asm("wfi\n"
> > :
> > :
> > : "memory", "cc");
>
> There's a wfi() macro defined in arch/arm/include/asm/system.h that
> could be used here.
Indeed, thanks for pointing that out.
I'm a little wary, however: the wfi macro does not include the "cc"
clobber that this code has currently, and I don't know what the
implications of removing it are. There appears to be no current
users of the wfi macro.
Taking a closer look, there appear to be five platforms that have a
hardcoded WFI just like the above (including the "cc" clobber):
exynos4, realview, shmobile, tegra and vexpress. omap defines its
own do_wfi macro, *without* the "cc" clobber.
Nevertheless, using the macro seems to work just fine, so I can
certainly re-spin the patch with that instead.
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
@ 2011-08-19 19:26 ` Nick Bowler
0 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-19 19:26 UTC (permalink / raw)
To: linux-arm-kernel
On 2011-08-19 19:15 +0100, Jamie Iles wrote:
> On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
[...]
> > - /*
> > - * here's the WFI
> > - */
> > - asm(".word 0xe320f003\n"
> > + asm("wfi\n"
> > :
> > :
> > : "memory", "cc");
>
> There's a wfi() macro defined in arch/arm/include/asm/system.h that
> could be used here.
Indeed, thanks for pointing that out.
I'm a little wary, however: the wfi macro does not include the "cc"
clobber that this code has currently, and I don't know what the
implications of removing it are. There appears to be no current
users of the wfi macro.
Taking a closer look, there appear to be five platforms that have a
hardcoded WFI just like the above (including the "cc" clobber):
exynos4, realview, shmobile, tegra and vexpress. omap defines its
own do_wfi macro, *without* the "cc" clobber.
Nevertheless, using the macro seems to work just fine, so I can
certainly re-spin the patch with that instead.
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
2011-08-19 19:26 ` Nick Bowler
@ 2011-08-19 21:14 ` Jamie Iles
-1 siblings, 0 replies; 16+ messages in thread
From: Jamie Iles @ 2011-08-19 21:14 UTC (permalink / raw)
To: Nick Bowler; +Cc: Jamie Iles, linux-arm-kernel, linux-kernel, Russell King
On Fri, Aug 19, 2011 at 03:26:38PM -0400, Nick Bowler wrote:
> On 2011-08-19 19:15 +0100, Jamie Iles wrote:
> > On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
> [...]
> > > - /*
> > > - * here's the WFI
> > > - */
> > > - asm(".word 0xe320f003\n"
> > > + asm("wfi\n"
> > > :
> > > :
> > > : "memory", "cc");
> >
> > There's a wfi() macro defined in arch/arm/include/asm/system.h that
> > could be used here.
>
> Indeed, thanks for pointing that out.
>
> I'm a little wary, however: the wfi macro does not include the "cc"
> clobber that this code has currently, and I don't know what the
> implications of removing it are. There appears to be no current
> users of the wfi macro.
As far as I can tell from the ARM ARM, the instruction shouldn't alter
the condition flags so the cc clobber shouldn't be necessary. I'm not
sure that my reading of the ARM ARM should be considered authoritative
though!
Jamie
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
@ 2011-08-19 21:14 ` Jamie Iles
0 siblings, 0 replies; 16+ messages in thread
From: Jamie Iles @ 2011-08-19 21:14 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 19, 2011 at 03:26:38PM -0400, Nick Bowler wrote:
> On 2011-08-19 19:15 +0100, Jamie Iles wrote:
> > On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
> [...]
> > > - /*
> > > - * here's the WFI
> > > - */
> > > - asm(".word 0xe320f003\n"
> > > + asm("wfi\n"
> > > :
> > > :
> > > : "memory", "cc");
> >
> > There's a wfi() macro defined in arch/arm/include/asm/system.h that
> > could be used here.
>
> Indeed, thanks for pointing that out.
>
> I'm a little wary, however: the wfi macro does not include the "cc"
> clobber that this code has currently, and I don't know what the
> implications of removing it are. There appears to be no current
> users of the wfi macro.
As far as I can tell from the ARM ARM, the instruction shouldn't alter
the condition flags so the cc clobber shouldn't be necessary. I'm not
sure that my reading of the ARM ARM should be considered authoritative
though!
Jamie
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
2011-08-19 21:14 ` Jamie Iles
@ 2011-08-22 9:43 ` Catalin Marinas
-1 siblings, 0 replies; 16+ messages in thread
From: Catalin Marinas @ 2011-08-22 9:43 UTC (permalink / raw)
To: Jamie Iles; +Cc: Nick Bowler, Russell King, linux-kernel, linux-arm-kernel
On 19 August 2011 22:14, Jamie Iles <jamie@jamieiles.com> wrote:
> On Fri, Aug 19, 2011 at 03:26:38PM -0400, Nick Bowler wrote:
>> On 2011-08-19 19:15 +0100, Jamie Iles wrote:
>> > On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
>> [...]
>> > > - /*
>> > > - * here's the WFI
>> > > - */
>> > > - asm(".word 0xe320f003\n"
>> > > + asm("wfi\n"
>> > > :
>> > > :
>> > > : "memory", "cc");
>> >
>> > There's a wfi() macro defined in arch/arm/include/asm/system.h that
>> > could be used here.
>>
>> Indeed, thanks for pointing that out.
>>
>> I'm a little wary, however: the wfi macro does not include the "cc"
>> clobber that this code has currently, and I don't know what the
>> implications of removing it are. There appears to be no current
>> users of the wfi macro.
>
> As far as I can tell from the ARM ARM, the instruction shouldn't alter
> the condition flags so the cc clobber shouldn't be necessary.
I also don't see why we need the 'cc' flag in here. Just use the wfi() macro.
--
Catalin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower.
@ 2011-08-22 9:43 ` Catalin Marinas
0 siblings, 0 replies; 16+ messages in thread
From: Catalin Marinas @ 2011-08-22 9:43 UTC (permalink / raw)
To: linux-arm-kernel
On 19 August 2011 22:14, Jamie Iles <jamie@jamieiles.com> wrote:
> On Fri, Aug 19, 2011 at 03:26:38PM -0400, Nick Bowler wrote:
>> On 2011-08-19 19:15 +0100, Jamie Iles wrote:
>> > On Fri, Aug 19, 2011 at 02:03:24PM -0400, Nick Bowler wrote:
>> [...]
>> > > - ? ? ? ? /*
>> > > - ? ? ? ? ?* here's the WFI
>> > > - ? ? ? ? ?*/
>> > > - ? ? ? ? asm(".word ? ? ?0xe320f003\n"
>> > > + ? ? ? ? asm("wfi\n"
>> > > ? ? ? ? ? ? ? :
>> > > ? ? ? ? ? ? ? :
>> > > ? ? ? ? ? ? ? : "memory", "cc");
>> >
>> > There's a wfi() macro defined in arch/arm/include/asm/system.h that
>> > could be used here.
>>
>> Indeed, thanks for pointing that out.
>>
>> I'm a little wary, however: the wfi macro does not include the "cc"
>> clobber that this code has currently, and I don't know what the
>> implications of removing it are. ?There appears to be no current
>> users of the wfi macro.
>
> As far as I can tell from the ARM ARM, the instruction shouldn't alter
> the condition flags so the cc clobber shouldn't be necessary.
I also don't see why we need the 'cc' flag in here. Just use the wfi() macro.
--
Catalin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: vexpress: Use wfi macro in platform_do_lowpower.
2011-08-22 9:43 ` Catalin Marinas
@ 2011-08-22 13:54 ` Nick Bowler
-1 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-22 13:54 UTC (permalink / raw)
To: Catalin Marinas; +Cc: Jamie Iles, Russell King, linux-kernel, linux-arm-kernel
Current Versatile Express CPU hotplug code includes a hardcoded WFI
instruction, in ARM encoding. When the kernel is compiled in Thumb-2
mode, this is invalid and causes the machine to hang hard when a CPU
is offlined.
Using the wfi macro (which uses the appropriate assembler mnemonic)
causes the correct instruction to be emitted in either case. As a
consequence of this change, an apparently vestigial "cc" clobber is
dropped from the asm (the macro uses "memory" only).
Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
arch/arm/mach-vexpress/hotplug.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
OK. If this version is acceptable, I'll follow up with patches for the
other platforms.
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index ea4cbfb..3668cf9 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -13,6 +13,7 @@
#include <linux/smp.h>
#include <asm/cacheflush.h>
+#include <asm/system.h>
extern volatile int pen_release;
@@ -62,13 +63,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
- :
- :
- : "memory", "cc");
+ wfi();
if (pen_release == cpu) {
/*
--
1.7.3.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: vexpress: Use wfi macro in platform_do_lowpower.
@ 2011-08-22 13:54 ` Nick Bowler
0 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-22 13:54 UTC (permalink / raw)
To: linux-arm-kernel
Current Versatile Express CPU hotplug code includes a hardcoded WFI
instruction, in ARM encoding. When the kernel is compiled in Thumb-2
mode, this is invalid and causes the machine to hang hard when a CPU
is offlined.
Using the wfi macro (which uses the appropriate assembler mnemonic)
causes the correct instruction to be emitted in either case. As a
consequence of this change, an apparently vestigial "cc" clobber is
dropped from the asm (the macro uses "memory" only).
Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
arch/arm/mach-vexpress/hotplug.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
OK. If this version is acceptable, I'll follow up with patches for the
other platforms.
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index ea4cbfb..3668cf9 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -13,6 +13,7 @@
#include <linux/smp.h>
#include <asm/cacheflush.h>
+#include <asm/system.h>
extern volatile int pen_release;
@@ -62,13 +63,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
* code will have already disabled interrupts
*/
for (;;) {
- /*
- * here's the WFI
- */
- asm(".word 0xe320f003\n"
- :
- :
- : "memory", "cc");
+ wfi();
if (pen_release == cpu) {
/*
--
1.7.3.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2] ARM: vexpress: Use wfi macro in platform_do_lowpower.
2011-08-22 13:54 ` Nick Bowler
@ 2011-08-22 13:59 ` Jamie Iles
-1 siblings, 0 replies; 16+ messages in thread
From: Jamie Iles @ 2011-08-22 13:59 UTC (permalink / raw)
To: Nick Bowler
Cc: Catalin Marinas, Jamie Iles, Russell King, linux-kernel,
linux-arm-kernel
On Mon, Aug 22, 2011 at 09:54:19AM -0400, Nick Bowler wrote:
> Current Versatile Express CPU hotplug code includes a hardcoded WFI
> instruction, in ARM encoding. When the kernel is compiled in Thumb-2
> mode, this is invalid and causes the machine to hang hard when a CPU
> is offlined.
>
> Using the wfi macro (which uses the appropriate assembler mnemonic)
> causes the correct instruction to be emitted in either case. As a
> consequence of this change, an apparently vestigial "cc" clobber is
> dropped from the asm (the macro uses "memory" only).
>
> Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> ---
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
if it helps!
Jamie
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: vexpress: Use wfi macro in platform_do_lowpower.
@ 2011-08-22 13:59 ` Jamie Iles
0 siblings, 0 replies; 16+ messages in thread
From: Jamie Iles @ 2011-08-22 13:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Aug 22, 2011 at 09:54:19AM -0400, Nick Bowler wrote:
> Current Versatile Express CPU hotplug code includes a hardcoded WFI
> instruction, in ARM encoding. When the kernel is compiled in Thumb-2
> mode, this is invalid and causes the machine to hang hard when a CPU
> is offlined.
>
> Using the wfi macro (which uses the appropriate assembler mnemonic)
> causes the correct instruction to be emitted in either case. As a
> consequence of this change, an apparently vestigial "cc" clobber is
> dropped from the asm (the macro uses "memory" only).
>
> Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> ---
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
if it helps!
Jamie
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] ARM: vexpress: Use wfi macro in platform_do_lowpower.
2011-08-22 13:59 ` Jamie Iles
@ 2011-08-24 17:51 ` Nick Bowler
-1 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-24 17:51 UTC (permalink / raw)
To: Jamie Iles; +Cc: Catalin Marinas, Russell King, linux-kernel, linux-arm-kernel
On 2011-08-22 14:59 +0100, Jamie Iles wrote:
> On Mon, Aug 22, 2011 at 09:54:19AM -0400, Nick Bowler wrote:
> > Current Versatile Express CPU hotplug code includes a hardcoded WFI
> > instruction, in ARM encoding. When the kernel is compiled in Thumb-2
> > mode, this is invalid and causes the machine to hang hard when a CPU
> > is offlined.
> >
> > Using the wfi macro (which uses the appropriate assembler mnemonic)
> > causes the correct instruction to be emitted in either case. As a
> > consequence of this change, an apparently vestigial "cc" clobber is
> > dropped from the asm (the macro uses "memory" only).
> >
> > Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> > ---
>
> Reviewed-by: Jamie Iles <jamie@jamieiles.com>
>
> if it helps!
Thanks!
Since there seem to be no objections, I'll send this off to Russell's
tracker.
Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] ARM: vexpress: Use wfi macro in platform_do_lowpower.
@ 2011-08-24 17:51 ` Nick Bowler
0 siblings, 0 replies; 16+ messages in thread
From: Nick Bowler @ 2011-08-24 17:51 UTC (permalink / raw)
To: linux-arm-kernel
On 2011-08-22 14:59 +0100, Jamie Iles wrote:
> On Mon, Aug 22, 2011 at 09:54:19AM -0400, Nick Bowler wrote:
> > Current Versatile Express CPU hotplug code includes a hardcoded WFI
> > instruction, in ARM encoding. When the kernel is compiled in Thumb-2
> > mode, this is invalid and causes the machine to hang hard when a CPU
> > is offlined.
> >
> > Using the wfi macro (which uses the appropriate assembler mnemonic)
> > causes the correct instruction to be emitted in either case. As a
> > consequence of this change, an apparently vestigial "cc" clobber is
> > dropped from the asm (the macro uses "memory" only).
> >
> > Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> > ---
>
> Reviewed-by: Jamie Iles <jamie@jamieiles.com>
>
> if it helps!
Thanks!
Since there seem to be no objections, I'll send this off to Russell's
tracker.
Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-08-24 17:52 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19 18:03 [PATCH RFC] ARM: vexpress: Use assembler mnemonic for WFI in platform_do_lowpower Nick Bowler
2011-08-19 18:03 ` Nick Bowler
2011-08-19 18:15 ` Jamie Iles
2011-08-19 18:15 ` Jamie Iles
2011-08-19 19:26 ` Nick Bowler
2011-08-19 19:26 ` Nick Bowler
2011-08-19 21:14 ` Jamie Iles
2011-08-19 21:14 ` Jamie Iles
2011-08-22 9:43 ` Catalin Marinas
2011-08-22 9:43 ` Catalin Marinas
2011-08-22 13:54 ` [PATCH v2] ARM: vexpress: Use wfi macro " Nick Bowler
2011-08-22 13:54 ` Nick Bowler
2011-08-22 13:59 ` Jamie Iles
2011-08-22 13:59 ` Jamie Iles
2011-08-24 17:51 ` Nick Bowler
2011-08-24 17:51 ` Nick Bowler
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.