Common ARM context save/restore code

Vishwanath Sripathy vishwanath.sripathy at
Mon Oct 11 06:10:30 UTC 2010

>On Fri, Oct 8, 2010 at 12:55 AM, Nicolas Pitre <nicolas.pitre at>
>On Thu, 7 Oct 2010, Vishwanath Sripathy wrote:
>> Hi All,
>> Purpose of this email is to debate on the pros and cons of having a
>> ARM context save/restore code.
>> Currently each SOC has its own way of saving/restoring ARM registers and
>> there has been a proposal to have a common code for the same instead of
>> duplicating the same in different places.
>Hmmmmm, what?
>Could you elaborate?  I'm afraid I'm not following you.
>The kernel as I know it has a common code path to save/restore registers
>on context switch simply because all SOCs that I'm aware of all have the
>same general registers to save/restore on context switch.
>There are exceptions for some specialized registers, such as the XScale
>WMMX registers, the Cirrus MaverickCrunch registers, the VFP registers
>or the emulated FPA registers, etc.  But those are nicely abstracted
>away from the common code through runtime registered thread notifier
I think what you are referring to is General Purpose ARM Registers which I
agree are saved whenever there is a context switch. What I am talking here
is other ARM registers like various Auxiliary Control regs (refer to
arch/arm/mach_omap2/sleep34xx.s for complete details) which are completely
lost when MPU enters OFF state in CPU Idle/suspend path.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the linaro-dev mailing list