Thread (13 messages) flat view 13 messages, 4 authors, 2012-02-27
STALE5275d

[PATCH 3/4] at91 : remove wait_for_interrupt definition

From: Daniel Lezcano <hidden>
Date: 2012-01-25 14:39:49

On 01/25/2012 01:18 AM, Russell King - ARM Linux wrote:
On Wed, Jan 25, 2012 at 12:56:07AM +0100, Daniel Lezcano wrote:
quoted
All the "wait_for_interrupt" definition are aliases to cpu_do_idle.
Only the rm9200 has an asm routine to switch to wfi. But the cpu_do_idle
for this platform has exactly the same asm routine.

arch/arm/mm/proc-arm920.S
...
ENTRY(cpu_arm920_do_idle)
         mcr     p15, 0, r0, c7, c0, 4           @ Wait for interrupt
...

Then it is safe to invoke cpu_do_idle for this platform.
No it is not.

Please read Nicolas' post:

http://lists.arm.linux.org.uk/lurker/message/20120112.144129.827ae490.en.html

and think about what "DWB is needed before putting SDRAM into self-refresh
because any subsequent access to SDRAM will force it to resume from
self-refresh state" means.

Consider that if you _branch_ somewhere else, you _could_ cause a cache
line fetch, which will have to come from SDRAM.
Oh, right. I am not familiar with this part, thanks for the clarification.
 From Nicolas' post, it's pretty clear to me that the AT91RM9200 requires
carefully crafted assembly which can't be separated in this way to work,
which I mostly supplied in this mail:

http://lists.arm.linux.org.uk/lurker/message/20120109.144443.3626e5a6.en.html
Ok, this is what does the patch 4/4, it changes the self-refresh and wfi 
into an asm routine where cpu_do_idle call is removed. Can I consider by 
folding 3/4 and 4/4 ? So the buggy cpu_do_idle change won't appear...

Thanks
   -- Daniel

-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help