Re: [PATCH 1/4]Diskdump Update

From: Martin J. Bligh
Date: Sun Jun 13 2004 - 21:09:52 EST


>>> Ok, I fix it.
>>>
>>> - page = mem_map + nr;
>>> + page = pfn_to_page(nr);
>>
>> That's correct now ...
>>
>>> I also need fix this.
>>>
>>> - for (nr = 0; nr < max_mapnr; nr++) {
>>> + for (nr = 0; nr < max_pfn; nr++) {
>>
>> ... but that's not (at least AFAICS from this snippet). You need to iterate
>> over pgdats, and then over the lmem_map inside each pgdat.
>
> How about this?
>
> for_each_pgdat(pgdat) {
> for (i = 0; i < pgdat->node_spanned_pages; ++i) {
> page = pgdat->node_mem_map + i;
> ...
> }
> }

Yes, looks OK. I started writing out what it'd take to use the actual
pfn_to_page macros, but it just makes a mess ... what you have is fine.

M.

-
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/