[PATCH 17/25] imx/eukrea_cpuimx27: use new nand device registration
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Tue Nov 17 04:56:13 EST 2009
Hello,
On Mon, Nov 16, 2009 at 10:32:37PM +0000, Russell King - ARM Linux wrote:
> On Mon, Nov 16, 2009 at 09:35:00PM +0100, Uwe Kleine-König wrote:
> > static void __init eukrea_cpuimx27_init(void)
> > {
> > + struct mxc_nand_platform_data mxc_nand_pdata = {
> > + .width = 1,
> > + .hw_ecc = 1,
> > + };
> > +
>
> Have you checked what code the compiler spits out for this?
>
> What the compiler will do is create a copy of the structure data in the
> read-only data section. It will allocate space on the stack, and memcpy
> from that read-only version to the stack version. It will then use the
> stacked version for mxc_nand_data.
>
> This saves nothing - the data remains in-core.
>
> What you want to do is to keep the original definition, and mark it with
> __initdata so that it gets discarded.
OK, will fix that later today.
Best regards and thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the linux-arm-kernel
mailing list