ARM: domains: Possible regression in v7-M
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Ariel D'Alessandro
Hi,
I'm testing next-20150909 on a Hitex LPC4350 Evaluation Board, which has an ARMv7 Cortex-M4 processor.
There's a problem when booting using the attached config. Config is
lpc18xx_defconfigwith dram setting for the Hitex Board.Doing a bisect I've observed that regression appears to be caused by:
commit
1eef5d2f1b461c120bcd82077edee5ec706ac53bAuthor: Russell King <[email protected]> Date: Wed Aug 19 21:23:48 2015 +0100
Quoted 6 lines
ARM: domains: switch to keeping domain value in register
Stacktrace paste below.
[ 0.171071] Unhandled exception: IPSR = 00000006 LR = fffffff1
This looks to be ARMv7M, which is nommu... I guess what's causing this is this change in arch/arm/kernel/process.c:
+ /*
+ * Copy the initial value of the domain access control register + * from the current thread: thread->addr_limit will have been + * copied from the current thread via setup_thread_stack() in + * kernel/fork.c + */
+ thread->cpu_domain = get_domain();
+
which probably needs to be #ifdef'd out for !MMU. Can you try adding:
#ifndef CONFIG_MMU
...
#endif
around that please? Thanks.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
Russell,
El 09/09/15 a las 14:52, Russell King - ARM Linux escribi?:
Quoted 26 lines · Ariel D'Alessandro
Quoted 6 lines
Doing a bisect I've observed that regression appears to be caused by:
commit
1eef5d2f1b461c120bcd82077edee5ec706ac53bAuthor: Russell King <[email protected]> Date: Wed Aug 19 21:23:48 2015 +0100Quoted 6 lines
ARM: domains: switch to keeping domain value in register
Stacktrace paste below.
[ 0.171071] Unhandled exception: IPSR = 00000006 LR = fffffff1This looks to be ARMv7M, which is nommu... I guess what's causing this is this change in
arch/arm/kernel/process.c:(quoted diff) +8
-0+ /* + * Copy the initial value of the domain access control register + * from the current thread: thread->addr_limit will have been + * copied from the current thread via setup_thread_stack() in + * kernel/fork.c + */ + thread->cpu_domain = get_domain(); +
Quoted 3 lines
which probably needs to be #ifdef'd out for !MMU. Can you try adding:
#ifndef
CONFIG_MMU
I think you meant #ifdef CONFIG_MMU.
Quoted 5 lines
...
#endifaround that please? Thanks.
Yeah, that works!
Added:
#ifdef CONFIG_MMU
...
#endif
around that code block and it booted.
Thanks,
Signature · 2 lines
Ariel D'Alessandro, VanguardiaSur www.vanguardiasur.com.ar
Quoted 43 lines · Ariel D'Alessandro
Russell,
El 09/09/15 a las 14:52, Russell King - ARM Linux escribi?:
Quoted 26 lines · Ariel D'Alessandro
Quoted 6 lines
Doing a bisect I've observed that regression appears to be caused by:
commit
1eef5d2f1b461c120bcd82077edee5ec706ac53bAuthor: Russell King <[email protected]> Date: Wed Aug 19 21:23:48 2015 +0100Quoted 6 lines
ARM: domains: switch to keeping domain value in register
Stacktrace paste below.
[ 0.171071] Unhandled exception: IPSR = 00000006 LR = fffffff1This looks to be ARMv7M, which is nommu... I guess what's causing this is this change in
arch/arm/kernel/process.c:(quoted diff) +8
-0+ /* + * Copy the initial value of the domain access control register + * from the current thread: thread->addr_limit will have been + * copied from the current thread via setup_thread_stack() in + * kernel/fork.c + */ + thread->cpu_domain = get_domain(); +Quoted 3 lines
which probably needs to be #ifdef'd out for !MMU. Can you try adding:
#ifndef
CONFIG_MMUI think you meant #ifdef
CONFIG_MMU.Quoted 5 lines
...
#endifaround that please? Thanks.
Yeah, that works!
Quoted 7 lines
Added:
#ifdef
CONFIG_MMU
...
#endifaround that code block and it booted.
Thanks. I've settled on using CONFIG_CPU_USE_DOMAINS here, as it only makes sense to save this value if that option is set, and it won't be set for noMMU platforms.
Thanks for reporting this and confirming the problem site. If you're okay with it, I'll add:
to the commit to acknowledge your help in finding this.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
El 09/09/15 a las 17:24, Russell King - ARM Linux escribi?:
Quoted 50 lines · Ariel D'Alessandro
Quoted 49 lines
Russell,
El 09/09/15 a las 14:52, Russell King - ARM Linux escribi?:
Quoted 26 lines · Ariel D'Alessandro
Quoted 6 lines
Doing a bisect I've observed that regression appears to be caused by:
commit
1eef5d2f1b461c120bcd82077edee5ec706ac53bAuthor: Russell King <[email protected]> Date: Wed Aug 19 21:23:48 2015 +0100Quoted 6 lines
ARM: domains: switch to keeping domain value in register
Stacktrace paste below.
[ 0.171071] Unhandled exception: IPSR = 00000006 LR = fffffff1This looks to be ARMv7M, which is nommu... I guess what's causing this is this change in
arch/arm/kernel/process.c:(quoted diff) +8
-0+ /* + * Copy the initial value of the domain access control register + * from the current thread: thread->addr_limit will have been + * copied from the current thread via setup_thread_stack() in + * kernel/fork.c + */ + thread->cpu_domain = get_domain(); +Quoted 3 lines
which probably needs to be #ifdef'd out for !MMU. Can you try adding:
#ifndef
CONFIG_MMUI think you meant #ifdef
CONFIG_MMU.Quoted 5 lines
...
#endifaround that please? Thanks.
Yeah, that works!
Added:
#ifdef
CONFIG_MMU
...
#endif
Quoted 5 lines
Quoted 1 line
around that code block and it booted.
Thanks. I've settled on using
CONFIG_CPU_USE_DOMAINShere, as it only makes sense to save this value if that option is set, and it won't be set for noMMU platforms.
OK, that makes sense.
Quoted 7 lines
Thanks for reporting this and confirming the problem site. If you're okay with it, I'll add:
Reported-by Ariel D'Alessandro <[email protected]>to the commit to acknowledge your help in finding this.
Sure. Thanks to you for the quick solution.
Signature · 2 lines
Ariel D'Alessandro, VanguardiaSur www.vanguardiasur.com.ar