From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel.lezcano@linaro.org (Daniel Lezcano) Date: Wed, 25 Jan 2012 15:39:49 +0100 Subject: [PATCH 3/4] at91 : remove wait_for_interrupt definition In-Reply-To: <20120125001858.GD12326@n2100.arm.linux.org.uk> References: <1327449368-29917-1-git-send-email-daniel.lezcano@linaro.org> <1327449368-29917-3-git-send-email-daniel.lezcano@linaro.org> <20120125001858.GD12326@n2100.arm.linux.org.uk> Message-ID: <4F201435.7030402@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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: >> 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 -- Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog