Re: [PATCH]memblock: Fix potential section mismatch problem
From: Wang YanQing
Date: Wed Jun 12 2013 - 21:59:05 EST
On Wed, Jun 12, 2013 at 10:29:17AM -0700, Yinghai Lu wrote:
> On Wed, Jun 12, 2013 at 9:08 AM, Wang YanQing <udknight@xxxxxxxxx> wrote:
> >
> > This patch convert __init to __init_memblock
> > for functions which make reference to memblock variable
> > with attribute __meminitdata.
>
> for which arch?
I just think different arch could have different
meaning about __init and __init_memblock, but
if a function call another function with __init_memblock
annotation or has reference to variable with __initdata_memblock,
then we have better to give it __init_memblock annotation.
> for x86: __init_memblock is __init, so that is not problem.
Thanks for point out this, then I know why I haven't get
compile warning.
> for other arches like powerpc and sparc etc, __init_memblock is " "
>
> so you need cc powerpc, and sparc ...
My first motivation to propose this patch was I found below
two functions have different annotation which I think they
should have the same annotation:
"
int __init memblock_is_reserved(phys_addr_t addr)
{
return memblock_search(&memblock.reserved, addr) != -1;
}
int __init_memblock memblock_is_memory(phys_addr_t addr)
{
return memblock_search(&memblock.memory, addr) != -1;
}
"
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/