[PATCH v2 1/2] ARM: cache-l2x0: remove __init annotation from initialization functions
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Sep 23 16:55:00 EDT 2011
On Mon, Sep 19, 2011 at 01:33:39PM +0800, Barry Song wrote:
> Do you think the following is what you want?
Almost. A couple of things:
1. Making the variables static means that folk like OMAP can't read the
values at resume time from their assembly (forcing them to save and
restore them, rather than using the already saved copy.)
2. It probably makes sense to make a structure out of the saved state
information so that assembly code doesn't have to individually find
the address of each variable. Instead, they can find the address of
the structure (in physical memory if that's what they need) and use
offsets.
With (2) its probably worth adding a comment about the structure being
used in platform code and it should only ever be appended to.
(Alternatively, we could use the asm-offsets.h generation stuff to
create preprocessor symbols for the offsets in the struct if we put the
struct in a header file.)
More information about the linux-arm-kernel
mailing list