Re: [PATCH 3/3] slab: avoid __initdata warning (may be a bogus one)
On Sun, 1 Apr 2007 00:15:06 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Sat, 31 Mar 2007, Andrew Morton wrote: > > > Yes, I think this is a flase positive - we'll never touch initkmem_list3[] > > after free_initmem() because of the transitions of g_cpucache_up. > > Correct. > > > (In which case set_up_list3s() shoud be __init, too?) > > Correct. Its only called during slab bootstrap. > > > Christoph, I think you looked at this previously? > > If you change set_up_list3s to __init then we have the same issue with > setup_cpu_cache right? yup. I wonder if there's a general way in which we can suppress such false positives. Say, create a new section called, umm, __nowarn and __nowarndata and then we can tag functions or data with those tags tag and teach the checker tools to ignore them? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] slab: avoid __initdata warning (may be a bogus one)
On Sat, 31 Mar 2007, Andrew Morton wrote: > Yes, I think this is a flase positive - we'll never touch initkmem_list3[] > after free_initmem() because of the transitions of g_cpucache_up. Correct. > (In which case set_up_list3s() shoud be __init, too?) Correct. Its only called during slab bootstrap. > Christoph, I think you looked at this previously? If you change set_up_list3s to __init then we have the same issue with setup_cpu_cache right? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] slab: avoid __initdata warning (may be a bogus one)
On Sat, 31 Mar 2007 01:08:14 +0200 "Paolo 'Blaisorblade' Giarrusso" <[EMAIL PROTECTED]> wrote: > set_up_list3s is not __init and references initkmem_list3. > > Also, kmem_cache_create calls setup_cpu_cache which calls set_up_list3s. The > state machine _may_ prevent the code from accessing this data after freeing > initdata (it makes sure it's used only up to boot), so this warning may be a > false positive. > > Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> > --- > > mm/slab.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mm/slab.c b/mm/slab.c > index 0934f8d..0772faf 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -305,7 +305,7 @@ struct kmem_list3 { > * Need this for bootstrapping a per node allocator. > */ > #define NUM_INIT_LISTS (2 * MAX_NUMNODES + 1) > -struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS]; > +struct kmem_list3 initkmem_list3[NUM_INIT_LISTS]; > #define CACHE_CACHE 0 > #define SIZE_AC 1 > #define SIZE_L3 (1 + MAX_NUMNODES) Yes, I think this is a flase positive - we'll never touch initkmem_list3[] after free_initmem() because of the transitions of g_cpucache_up. (In which case set_up_list3s() shoud be __init, too?) Christoph, I think you looked at this previously? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] slab: avoid __initdata warning (may be a bogus one)
set_up_list3s is not __init and references initkmem_list3. Also, kmem_cache_create calls setup_cpu_cache which calls set_up_list3s. The state machine _may_ prevent the code from accessing this data after freeing initdata (it makes sure it's used only up to boot), so this warning may be a false positive. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- mm/slab.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 0934f8d..0772faf 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -305,7 +305,7 @@ struct kmem_list3 { * Need this for bootstrapping a per node allocator. */ #define NUM_INIT_LISTS (2 * MAX_NUMNODES + 1) -struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS]; +struct kmem_list3 initkmem_list3[NUM_INIT_LISTS]; #defineCACHE_CACHE 0 #defineSIZE_AC 1 #defineSIZE_L3 (1 + MAX_NUMNODES) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/