Re: Memory Started not at 0x00000000

From: Roman Zippel (zippel@fh-brandenburg.de)
Date: Tue Feb 08 2000 - 07:25:57 EST


Hi,

> Secondly, you can always use init_bootmem_node() (with nid = 0) to
> achieve what you want. Note that this will not set up max_low_pfn,
> you can either do that in your arch code (more preferably use a
> static variable somewhere in your mm/init.c or setup.c). Instead
> of adding yet another variable start_pfn for free_area_init(),
> you could use NODE_DATA(0)->bdata->node_boot_start.

I would suggest to change init_bootmem(), too, AFAIK the default of zero
is only for i386 helpful, all other have to fiddle with the mem node
interface and IMO we shouldn't begin to mix them if it's not really
necessary. I don't know if it's too late for this, but maybe we should
rename the *_core() functions into *_node() functions and make the other
ones small special inline functions that call the generic versions. That
would remove the bulk of (IMO unnecessary) small functions at the end of
bootmem.c

BTW did someone try the patch below? This make a mm mapping possible,
where several physical memory chunks are mapped together in one single
virtual mapping (like we do it currently on m68k). If it doesn't break
anything, it could be integrated?

bye, Roman

--- mm/page_alloc.c.org Wed Jan 26 22:19:15 2000
+++ mm/page_alloc.c Tue Feb 8 13:22:14 2000
@@ -515,7 +515,7 @@
  * - clear the memory bitmaps
  */
 void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
- unsigned int *zones_size, unsigned long zone_start_paddr)
+ unsigned int *zones_size, unsigned long zone_start_vaddr)
 {
         struct page *p, *lmem_map;
         unsigned long i, j;
@@ -599,8 +599,8 @@
                         struct page *page = mem_map + offset + i;
                         page->zone = zone;
                         if (j != ZONE_HIGHMEM) {
- page->virtual = (unsigned long)(__va(zone_start_paddr));
- zone_start_paddr += PAGE_SIZE;
+ page->virtual = zone_start_vaddr;
+ zone_start_vaddr += PAGE_SIZE;
                         }
                 }
 
@@ -624,7 +624,7 @@
 
 void __init free_area_init(unsigned int *zones_size)
 {
- free_area_init_core(0, NODE_DATA(0), &mem_map, zones_size, 0);
+ free_area_init_core(0, NODE_DATA(0), &mem_map, zones_size, PAGE_OFFSET);
 }
 
 static int __init setup_mem_frac(char *str)

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:12 EST