[PATCH 05/14] ARM: LPC32XX: System suspend support
Russell King - ARM Linux
linux at arm.linux.org.uk
Sun Feb 14 14:45:01 EST 2010
On Sun, Feb 14, 2010 at 05:51:22PM +0100, Pavel Machek wrote:
> > + /* Backup a small area of IRAM used for the suspend code */
> > + memcpy(iram_swap_area, (void *) TEMP_IRAM_AREA,
> > + lpc32xx_sys_suspend_sz);
> > + flush_cache_all();
> > +
> > + /*
> > + * Copy code to suspend system into IRAM. The suspend code
> > + * needs to run from IRAM as DRAM may no longer be available
> > + * when the PLL is stopped.
> > + */
> > + memcpy((void *) TEMP_IRAM_AREA, &lpc32xx_sys_suspend,
> > + lpc32xx_sys_suspend_sz);
>
> icache flush needed here? or does the above flush suffice? ... I
> believe you do need the flush.
It is not sufficient, and I'm not sure what that 'flush_cache_all'
above is doing there.
flush_icache_range() is always required after copying instructions
into a new kernel area prior to executing them to ensure that the
newly placed instructions are visible to instruction fetches.
More information about the linux-arm-kernel
mailing list