Messages in this thread | | | Date | Thu, 21 Aug 2008 02:08:48 +0200 | From | Marcin Slusarz <> | Subject | Re: [PATCH] Section mismatch contig_page_data and bootmem_node_data |
| |
On Wed, Aug 20, 2008 at 11:45:00PM +0200, Johannes Weiner wrote: > Hi, > > > On Wed, 20 Aug 2008 21:05:41 +0200 > > Marcin Slusarz <marcin.slusarz@gmail.com> wrote: > > > >> I thought about this warning today and found 2 other solutions: > >> 1) Mark contig_page_data as __ref (but it might hide real bugs). > >> 2) Remove bdata from struct pglist_data and access it directly through > >> bootmem_node_data. It requires passing node number to all functions > >> which use bdata, but unfortunately arch/ia64/mm/discontig.c handles > >> node numbering its own way. I'm still investigating it. > > Yeah, I gave it a shot once too but dropped it again after I looked at > ia64 code. > > Perhaps we can just remove the static assignment and do it at boot up?
That won't work - modpost will warn at different place about section mismatch. But even if it would work, we lose potentially useful analysis of all uses of pglist_data->bdata.
But I think I found better solution - replace "struct bootmem_data *bdata" in struct pglist_data with "int bootmem_node;" and change all uses of bdata to &bootmem_node_data[struct pglist_data *->bootmem_node].
What do you think about it? Would it be acceptable?
PS: restored cc'ing LKML
Marcin
| |