lkml.org 
[lkml]   [2005]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sparsemem ppc64 tidy flat memory comments and fix benign mempresent call

> diff -upN reference/arch/ppc64/mm/init.c current/arch/ppc64/mm/init.c
> --- reference/arch/ppc64/mm/init.c
> +++ current/arch/ppc64/mm/init.c
> @@ -631,18 +631,19 @@ void __init do_init_bootmem(void)
>
> max_pfn = max_low_pfn;
>
> - /* add all physical memory to the bootmem map. Also, find the first
> - * presence of all LMBs*/
> + /* Add all physical memory to the bootmem map, mark each area
> + * present. The first block has already been marked present above.
> + */
> for (i=0; i < lmb.memory.cnt; i++) {
> unsigned long physbase, size;
>
> physbase = lmb.memory.region[i].physbase;
> size = lmb.memory.region[i].size;
> - if (i) { /* already created mappings for first LMB */
> + if (i) {
> start_pfn = physbase >> PAGE_SHIFT;
> end_pfn = start_pfn + (size >> PAGE_SHIFT);
> + memory_present(0, start_pfn, end_pfn);
> }
> - memory_present(0, start_pfn, end_pfn);
> free_bootmem(physbase, size);
> }

Instead of moving all that around why don't we just drop the duplicate
and the if altogether? I tested and sent a patch back in March that
cleaned up the non-numa case pretty well.

http://sourceforge.net/mailarchive/message.php?msg_id=11320001

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-10 01:08    [W:0.053 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site