ARM: mm: cpu_fa526_do_idle: remove WFI
Subsystems (2)
PATCH 1/1 ARM: mm: cpu_fa526_do_idle: remove WFI
As it was already suggested by Russell King and Arnd Bergmann ( https://lkml.org/lkml/2013/5/16/133 ), moxart and gemini seem to be the only platforms using CPU_FA526, and instead of pointing arm_pm_idle to an empty function from platform code, it makes sense to remove WFI code from the processor specific idle function.
Note: moxart boots and prints to UART without this patch, but input is broken.
--- arch/arm/mm/proc-fa526.S | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
arch/arm/mm/proc-fa526.S +1 -3
@@ -81,9 +81,7 @@ ENDPROC(cpu_fa526_reset) */ .align 4 ENTRY(cpu_fa526_do_idle) - mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt - mov pc, lr - + nop ENTRY(cpu_fa526_dcache_clean_area) 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
Signature · 1 line
1.7.2.5
Quoted 3 lines · On Monday 17 June 2013 15:39:20 Jonas Jensen wrote:
As it was already suggested by Russell King and Arnd Bergmann ( https://lkml.org/lkml/2013/5/16/133 ), moxart and gemini seem to be the only platforms using
CPU_FA526, and instead of pointingarm_pm_idleto an empty function from platform code, it makes sense to remove WFI code from the processor specific idle function.Note: moxart boots and prints to UART without this patch, but input is broken.
Please make sure you have proper line wraps. Lines in checkin comments should be no longer than 70 characters normally.
Quoted 1 line
Signed-off-by Jonas Jensen <[email protected]>
Since this patch is independent from the actual platform support, it should go through Russell's patch tracker at
http://www.arm.linux.org.uk/developer/patches/
Quoted 8 lines
arch/arm/mm/proc-fa526.S | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)arch/arm/mm/proc-fa526.S +0
-0
arch/arm/mm/proc-fa526.S ENDPROC(cpu_fa526_reset) · line 87
Quoted 10 lines
arch/arm/mm/proc-fa526.S +1
-3@@ -81,9 +81,7 @@ ENDPROC(cpu_fa526_reset) */ .align 4 ENTRY(cpu_fa526_do_idle) - mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt - mov pc, lr - + nop ENTRY(cpu_fa526_dcache_clean_area) 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
Adding Imre and Florian to Cc for Gemini. They might have a comment about this. I think we should delete arch/arm/mach-gemini/idle.c after this as well.
Arnd
Quoted 8 lines · Arnd Bergmann
Quoted 3 lines · On Monday 17 June 2013 15:39:20 Jonas Jensen wrote:
As it was already suggested by Russell King and Arnd Bergmann ( https://lkml.org/lkml/2013/5/16/133 ), moxart and gemini seem to be the only platforms using
CPU_FA526, and instead of pointingarm_pm_idleto an empty function from platform code, it makes sense to remove WFI code from the processor specific idle function.Note: moxart boots and prints to UART without this patch, but input is broken.
Please make sure you have proper line wraps. Lines in checkin comments should be no longer than 70 characters normally.
Quoted 7 lines
Quoted 1 line
Signed-off-by Jonas Jensen <[email protected]>Acked-by Arnd Bergmann <[email protected]>Since this patch is independent from the actual platform support, it should go through Russell's patch tracker at
http://www.arm.linux.org.uk/developer/patches/
Except... the patch is wrong.
Quoted 15 lines
Quoted 8 lines
arch/arm/mm/proc-fa526.S | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)arch/arm/mm/proc-fa526.S +0
-0arch/arm/mm/proc-fa526.S ENDPROC(cpu_fa526_reset) · line 84
Quoted 7 lines
arch/arm/mm/proc-fa526.S +1
-3@@ -81,9 +81,7 @@ ENDPROC(cpu_fa526_reset) */ .align 4 ENTRY(cpu_fa526_do_idle) - mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt - mov pc, lr - + nop
It replaces the WFI and return with a pure nop, so we will fall through to cpu_fa526_dcache_clean_area(). Do we really want to clean a random D cache entry depending on what r0 happened to hold at this point? I think not...
Quoted 4 lines · Russell King - ARM Linux
It replaces the WFI and return with a pure nop, so we will fall through to
cpu_fa526_dcache_clean_area(). Do we really want to clean a random D cache entry depending on what r0 happened to hold at this point? I think not...
I'm sorry for making the assumption that I know even the most basic ARM assembler...
This is not the sort of thing I deal with (and probably shouldn't) on a daily basis.
Can I make a guess, remove only mcr and replace it with nop?
Best regards,
Jonas
Quoted 6 lines · On Monday 17 June 2013 16:58:14 Jonas Jensen wrote:
Quoted 4 lines · Russell King - ARM Linux
It replaces the WFI and return with a pure nop, so we will fall through to
cpu_fa526_dcache_clean_area(). Do we really want to clean a random D cache entry depending on what r0 happened to hold at this point? I think not...
Quoted 7 lines
I'm sorry for making the assumption that I know even the most basic ARM assembler...
This is not the sort of thing I deal with (and probably shouldn't) on a daily basis.
Can I make a guess, remove only mcr and replace it with nop?
No need for the nop, just remove the mcr instruction.
Arnd
Quoted 9 lines · On Monday 17 June 2013 15:30:21 Russell King - ARM Linux wrote:
Quoted 9 lines
Quoted 9 lines
arch/arm/mm/proc-fa526.S +0
-1@@ -81,9 +81,7 @@ ENDPROC(cpu_fa526_reset) */ .align 4 ENTRY(cpu_fa526_do_idle) - mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt
Quoted 8 lines
Quoted 3 lines
arch/arm/mm/proc-fa526.S ENDPROC(cpu_fa526_reset) · line 84
Quoted 3 lines
arch/arm/mm/proc-fa526.S +1
-2- mov pc, lr - + nopIt replaces the WFI and return with a pure nop, so we will fall through to
cpu_fa526_dcache_clean_area(). Do we really want to clean a random D cache entry depending on what r0 happened to hold at this point? I think not...
Right, I should have actually read the change...
Arnd