Hi Russell,
I've done some testing with the experimental multiplatform tree
and that uncovered a few preexisting bugs. Here are the ones
that should go through your tree. Please have a look to
see if the fixes make sense. I can put the patches in the patch
tracker or send you a pull request then.
Arnd
---
Cc: Jon Medhurst <redacted>
Cc: Leif Lindholm <redacted>
Cc: Linus Walleij <redacted>
Cc: Magnus Damm <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Rafael J. Wysocki <redacted>
Cc: Russell King <redacted>
Cc: Shinya Kuribayashi <redacted>
Cc: Stephen Boyd <redacted>
Cc: Thomas Gleixner <redacted>
Cc: Will Deacon <redacted>
Arnd Bergmann (4):
ARM: export read_current_timer
ARM: allow PID_IN_CONTEXTIDR only for ARMv7
ARM: export set_irq_flags/irq_set_chip_and_handler
ARM: kprobes: make more tests conditional
arch/arm/Kconfig.debug | 1 +
arch/arm/kernel/arch_timer.c | 2 ++
arch/arm/kernel/irq.c | 2 ++
arch/arm/kernel/kprobes-test-arm.c | 4 +++-
kernel/irq/chip.c | 2 ++
5 files changed, 10 insertions(+), 1 deletion(-)
--
1.7.10
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrex/strex
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jon Medhurst <redacted>
Cc: Russell King <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Leif Lindholm <redacted>
---
arch/arm/kernel/kprobes-test-arm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
When ARMv6 is enabled, we build the kernel with -march=armv6 or
-march=armv6k, which means the bfi instruction is not available.
Instead, it only works with -march=armv6t2 or -march=armv7-a.
Without this patch, building rand-enIHAOL results in:
/tmp/ccwCsCXC.s: Assembler messages:
/tmp/ccwCsCXC.s:49: Error: selected processor does not support ARM mode `bfi r3,r2,#0,#8'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Will Deacon <redacted>
Cc: Russell King <redacted>
---
arch/arm/Kconfig.debug | 1 +
1 file changed, 1 insertion(+)
@@ -398,6 +398,7 @@ config ARM_KPROBES_TESTconfigPID_IN_CONTEXTIDRbool"Write the current PID to the CONTEXTIDR register"depends onCPU_COPY_V6+depends onCPU_V7&&!CPU_V6helpEnablingthisoptioncausesthekerneltowritethecurrentPIDtothePROCIDfieldoftheCONTEXTIDRregister,attheexpenseofsome
The recently added Emma Mobile GPIO driver calls set_irq_flags
and irq_set_chip_and_handler for the interrupts it exports and
it can be built as a module, which currently fails with
ERROR: "set_irq_flags" [drivers/gpio/gpio-em.ko] undefined!
ERROR: "irq_set_chip_and_handler_name" [drivers/gpio/gpio-em.ko] undefined!
We either need to replace the call to set_irq_flags with something
else or export that function. This patch does the latter.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Magnus Damm <redacted>
Cc: Linus Walleij <redacted>
Cc: Rafael J. Wysocki <redacted>
Cc: Thomas Gleixner <redacted>
Cc: Russell King <redacted>
---
arch/arm/kernel/irq.c | 2 ++
kernel/irq/chip.c | 2 ++
2 files changed, 4 insertions(+)
@@ -109,6 +110,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)/* Order is clear bits in "clr" then set bits in "set" */irq_modify_status(irq,clr,set&~clr);}+EXPORT_SYMBOL_GPL(set_irq_flags);void__initinit_IRQ(void){
read_current_timer is used in the get_cycles() function when
ARM_ARCH_TIMER is set, and that function can be inlined into
driver modules, so we should export the function to avoid
errors like
ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shinya Kuribayashi <redacted>
Cc: Stephen Boyd <redacted>
Cc: Will Deacon <redacted>
Cc: Russell King <redacted>
---
arch/arm/kernel/arch_timer.c | 2 ++
1 file changed, 2 insertions(+)
@@ -232,6 +233,7 @@ int read_current_timer(unsigned long *timer_val)*timer_val=arch_counter_get_cntpct();return0;}+EXPORT_SYMBOL_GPL(read_current_timer);staticstructclocksourceclocksource_counter={.name="arch_sys_counter",
From: Will Deacon <hidden> Date: 2012-08-22 14:40:17
Hi Arnd,
On Wed, Aug 22, 2012 at 03:29:38PM +0100, Arnd Bergmann wrote:
quoted hunk
When ARMv6 is enabled, we build the kernel with -march=armv6 or
-march=armv6k, which means the bfi instruction is not available.
Instead, it only works with -march=armv6t2 or -march=armv7-a.
Without this patch, building rand-enIHAOL results in:
/tmp/ccwCsCXC.s: Assembler messages:
/tmp/ccwCsCXC.s:49: Error: selected processor does not support ARM mode `bfi r3,r2,#0,#8'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Will Deacon <redacted>
Cc: Russell King <redacted>
---
arch/arm/Kconfig.debug | 1 +
1 file changed, 1 insertion(+)
@@ -398,6 +398,7 @@ config ARM_KPROBES_TESTconfigPID_IN_CONTEXTIDRbool"Write the current PID to the CONTEXTIDR register"depends onCPU_COPY_V6+depends onCPU_V7&&!CPU_V6helpEnablingthisoptioncausesthekerneltowritethecurrentPIDtothePROCIDfieldoftheCONTEXTIDRregister,attheexpenseofsome
Nah, I'll fix the contextidr_notifier instead. I forgot that this stuff gets
used on non-SMP v6 platforms.
Cheers,
Will
From: Nicolas Pitre <hidden> Date: 2012-08-22 14:42:45
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrex/strex
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Nicolas
@@ -398,6 +398,7 @@ config ARM_KPROBES_TEST config PID_IN_CONTEXTIDR bool "Write the current PID to the CONTEXTIDR register" depends on CPU_COPY_V6+ depends on CPU_V7 && !CPU_V6 help Enabling this option causes the kernel to write the current PID to the PROCID field of the CONTEXTIDR register, at the expense of some
Nah, I'll fix the contextidr_notifier instead. I forgot that this stuff gets
used on non-SMP v6 platforms.
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrex/strex
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Ok. How is the version below then? I haven't tested this one yet.
Arnd
8<---
From d878ab212cf0ac1957be83ad80dc734ace2b476c Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Aug 2012 07:49:31 +0000
Subject: [PATCH] ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jon Medhurst <redacted>
Cc: Russell King <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Leif Lindholm <redacted>
---
arch/arm/kernel/kprobes-test-arm.c | 4 ++++
1 file changed, 4 insertions(+)
From: Nicolas Pitre <hidden> Date: 2012-08-22 15:38:51
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
On Wednesday 22 August 2012, Nicolas Pitre wrote:
quoted
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
quoted
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrex/strex
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Ok. How is the version below then? I haven't tested this one yet.
In fact, I think the b variants are ARMv6k+ as well. Only the plain
(non b non d) variants are available on ARMv6.
quoted hunk
Arnd
8<---
From d878ab212cf0ac1957be83ad80dc734ace2b476c Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Aug 2012 07:49:31 +0000
Subject: [PATCH] ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jon Medhurst <redacted>
Cc: Russell King <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Leif Lindholm <redacted>
---
arch/arm/kernel/kprobes-test-arm.c | 4 ++++
1 file changed, 4 insertions(+)
From: Stephen Boyd <hidden> Date: 2012-08-22 17:15:19
On 08/22/12 07:29, Arnd Bergmann wrote:
read_current_timer is used in the get_cycles() function when
ARM_ARCH_TIMER is set, and that function can be inlined into
driver modules, so we should export the function to avoid
errors like
ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shinya Kuribayashi <redacted>
Acked-by: Stephen Boyd <redacted>
I ran into this last week but forgot to send the patch. Thanks.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
From: Will Deacon <hidden> Date: 2012-08-22 17:50:17
On Wed, Aug 22, 2012 at 06:15:14PM +0100, Stephen Boyd wrote:
On 08/22/12 07:29, Arnd Bergmann wrote:
quoted
read_current_timer is used in the get_cycles() function when
ARM_ARCH_TIMER is set, and that function can be inlined into
driver modules, so we should export the function to avoid
errors like
ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shinya Kuribayashi <redacted>
Acked-by: Stephen Boyd <redacted>
I ran into this last week but forgot to send the patch. Thanks.
Looks good to me, thanks Arnd:
Acked-by: Will Deacon <redacted>
On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
look at the registration stuff that was proposed? I'm happy to push it if
people will actually use it.
Cheers,
Will
From: Stephen Boyd <hidden> Date: 2012-08-22 17:57:34
On 08/22/12 10:49, Will Deacon wrote:
On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
look at the registration stuff that was proposed? I'm happy to push it if
people will actually use it.
Yes I have tested it on our internal trees and it looks good. I plan to
send a patch to move MSM's timers over to it later this week so that we
have at least two users upstream.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
From: Will Deacon <hidden> Date: 2012-08-22 17:58:29
On Wed, Aug 22, 2012 at 06:57:20PM +0100, Stephen Boyd wrote:
On 08/22/12 10:49, Will Deacon wrote:
quoted
On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
look at the registration stuff that was proposed? I'm happy to push it if
people will actually use it.
Yes I have tested it on our internal trees and it looks good. I plan to
send a patch to move MSM's timers over to it later this week so that we
have at least two users upstream.
Awesome, I'll dust that series off at -rc3 then.
Will
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Ok. How is the version below then? I haven't tested this one yet.
In fact, I think the b variants are ARMv6k+ as well. Only the plain
(non b non d) variants are available on ARMv6.
Ok, third attempt then. This leaves ldrex for ARMv6 but marks
{st,ld}rex{b,h,d} as V6K specific (which includes ARMv7).
Arnd
8<-----
From 6eab418c61c18393006f30d189e2f28d6e403040 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Aug 2012 07:49:31 +0000
Subject: [PATCH] ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jon Medhurst <redacted>
Cc: Russell King <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Leif Lindholm <redacted>
---
arch/arm/kernel/kprobes-test-arm.c | 4 ++++
1 file changed, 4 insertions(+)
From: Nicolas Pitre <hidden> Date: 2012-08-22 19:44:02
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
On Wednesday 22 August 2012, Nicolas Pitre wrote:
quoted
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
quoted
quoted
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Ok. How is the version below then? I haven't tested this one yet.
In fact, I think the b variants are ARMv6k+ as well. Only the plain
(non b non d) variants are available on ARMv6.
Ok, third attempt then. This leaves ldrex for ARMv6 but marks
{st,ld}rex{b,h,d} as V6K specific (which includes ARMv7).
Arnd
8<-----
From 6eab418c61c18393006f30d189e2f28d6e403040 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Aug 2012 07:49:31 +0000
Subject: [PATCH] ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jon Medhurst <redacted>
Cc: Russell King <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Leif Lindholm <redacted>
On Wed, 2012-08-22 at 18:41 +0000, Arnd Bergmann wrote:
On Wednesday 22 August 2012, Nicolas Pitre wrote:
quoted
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
quoted
quoted
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Ok. How is the version below then? I haven't tested this one yet.
In fact, I think the b variants are ARMv6k+ as well. Only the plain
(non b non d) variants are available on ARMv6.
Ok, third attempt then. This leaves ldrex for ARMv6 but marks
{st,ld}rex{b,h,d} as V6K specific (which includes ARMv7).
ARMv7 does set CPU_32v6K, because arch/arm/mm/Kconfig has
config CPU_V7
bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
select CPU_32v6K
select CPU_32v7
but this seems more for peripheral reasons not because all the various
CPU configs systematically select the earlier architecture variants,
e.g. CPU_V7 doesn't select CPU_32v6.
So I would have been inclined to test for
#if defined(CONFIG_CPU_32v6K) || (__LINUX_ARM_ARCH__ >= 7)
but as the current patch is functionally correct I'm not going to
suggest a v4 patch :-)
If you do feel so inclined for a v4 however ;-) you could also make the
mls part of the patch tidier by moving the added #endif to instead
terminate the preceding "#if __LINUX_ARM_ARCH__ >= 6", i.e.
this looks funny in patch form, but the resulting source file is more
consistent with other conditional tests.
quoted hunk
Arnd
8<-----
From 6eab418c61c18393006f30d189e2f28d6e403040 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Aug 2012 07:49:31 +0000
Subject: [PATCH] ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jon Medhurst <redacted>
Cc: Russell King <redacted>
Cc: Nicolas Pitre <redacted>
Cc: Leif Lindholm <redacted>
---
arch/arm/kernel/kprobes-test-arm.c | 4 ++++
1 file changed, 4 insertions(+)
On Wed, Aug 22, 2012 at 06:15:14PM +0100, Stephen Boyd wrote:
quoted
On 08/22/12 07:29, Arnd Bergmann wrote:
quoted
read_current_timer is used in the get_cycles() function when
ARM_ARCH_TIMER is set, and that function can be inlined into
driver modules, so we should export the function to avoid
errors like
ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shinya Kuribayashi <redacted>
Acked-by: Stephen Boyd <redacted>
I ran into this last week but forgot to send the patch. Thanks.
Looks good to me, thanks Arnd:
Acked-by: Will Deacon <redacted>
I haven't hit with this so far with our configs though, but why not?
Acked-by: Shinya Kuribayashi <redacted>
On Wed, Aug 22, 2012 at 06:57:20PM +0100, Stephen Boyd wrote:
quoted
On 08/22/12 10:49, Will Deacon wrote:
quoted
On the topic of the timer stuff: Shinya/Stephen, did you have a chance to
look at the registration stuff that was proposed? I'm happy to push it if
people will actually use it.
Yes I have tested it on our internal trees and it looks good. I plan to
send a patch to move MSM's timers over to it later this week so that we
have at least two users upstream.
And I think other A9 MPcore platforms, namely OMAP and EXYNOS, would
also be candidates, who tried to skip calibrate_delay() in the past
(OMAP) or currently provide non-smp_twd timers as localtimers (EXYNOS).
I may miss the latest status of those BSPs, but believe that we would
have more users (>2) in the future.
Awesome, I'll dust that series off at -rc3 then.
It works for me for weeks without troubles, looking forward to it.
--
Shinya Kuribayashi
Renesas Electronics
If you do feel so inclined for a v4 however ;-) you could also make the
mls part of the patch tidier by moving the added #endif to instead
terminate the preceding "#if __LINUX_ARM_ARCH__ >= 6", i.e.
this looks funny in patch form, but the resulting source file is more
consistent with other conditional tests.
Ok, here we go.
Arnd
commit abfef4db8731591fbb721262bd4712662aaa6d14
Author: Arnd Bergmann [off-list ref]
Date: Thu Aug 16 07:49:31 2012 +0000
ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann [off-list ref]
Cc: Jon Medhurst [off-list ref]
Cc: Russell King [off-list ref]
Cc: Nicolas Pitre [off-list ref]
Cc: Leif Lindholm [off-list ref]
From: Will Deacon <hidden> Date: 2012-08-23 12:26:09
On Thu, Aug 23, 2012 at 12:51:01AM +0100, Tixy wrote:
On Wed, 2012-08-22 at 18:41 +0000, Arnd Bergmann wrote:
quoted
On Wednesday 22 August 2012, Nicolas Pitre wrote:
quoted
On Wed, 22 Aug 2012, Arnd Bergmann wrote:
quoted
quoted
The ldrex/strex instructions are available on ARMv6. It's only the d
variants (strexd/ldrexd) which are only available from ARMv6k.
Ok. How is the version below then? I haven't tested this one yet.
In fact, I think the b variants are ARMv6k+ as well. Only the plain
(non b non d) variants are available on ARMv6.
Ok, third attempt then. This leaves ldrex for ARMv6 but marks
{st,ld}rex{b,h,d} as V6K specific (which includes ARMv7).
ARMv7 does set CPU_32v6K, because arch/arm/mm/Kconfig has
config CPU_V7
bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
select CPU_32v6K
select CPU_32v7
but this seems more for peripheral reasons not because all the various
CPU configs systematically select the earlier architecture variants,
e.g. CPU_V7 doesn't select CPU_32v6.
So I would have been inclined to test for
#if defined(CONFIG_CPU_32v6K) || (__LINUX_ARM_ARCH__ >= 7)
FWIW, the selection of the optimised atomic64 implementation for ARM (which
uses the double-word exclusive instructions) boils down to CONFIG_CPU_32v6K,
so I think the additional __LINUX_ARM_ARCH__ check is probably overkill.
Will
On Thu, 2012-08-23 at 12:09 +0000, Arnd Bergmann wrote:
commit abfef4db8731591fbb721262bd4712662aaa6d14
Author: Arnd Bergmann [off-list ref]
Date: Thu Aug 16 07:49:31 2012 +0000
ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann [off-list ref]
Cc: Jon Medhurst [off-list ref]
Cc: Russell King [off-list ref]
Cc: Nicolas Pitre [off-list ref]
Cc: Leif Lindholm [off-list ref]
Thanks for your indulgence :-) With the white-space damage fixed...
Acked-by: Jon Medhurst <redacted>
I test built this for v6, v6k and v7 before and after applying the patch
to verify if behaves as expected, so you can add my Tested-by if you
want.
I also tried a v4 platform (forgot we supported those) and there will be
a patch coming to fix that...
From: Nicolas Pitre <hidden> Date: 2012-08-23 18:04:27
On Thu, 23 Aug 2012, Arnd Bergmann wrote:
On Wednesday 22 August 2012, Tixy wrote:
quoted
If you do feel so inclined for a v4 however ;-) you could also make the
mls part of the patch tidier by moving the added #endif to instead
terminate the preceding "#if __LINUX_ARM_ARCH__ >= 6", i.e.
this looks funny in patch form, but the resulting source file is more
consistent with other conditional tests.
Ok, here we go.
Arnd
commit abfef4db8731591fbb721262bd4712662aaa6d14
Author: Arnd Bergmann [off-list ref]
Date: Thu Aug 16 07:49:31 2012 +0000
ARM: kprobes: make more tests conditional
The mls instruction is not available in ARMv6K or below, so we
should make the test conditional on at least ARMv7. ldrexd/strexd
are available in ARMv6K or ARMv7, which we can test by checking
the CONFIG_CPU_32v6K symbol.
/tmp/ccuMTZ8D.s: Assembler messages:
/tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3'
/tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10'
/tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13'
Signed-off-by: Arnd Bergmann [off-list ref]
Cc: Jon Medhurst [off-list ref]
Cc: Russell King [off-list ref]
Cc: Nicolas Pitre [off-list ref]
Cc: Leif Lindholm [off-list ref]