13 #include <linux/kernel.h>
19 #include <linux/bitops.h>
23 #include <asm/types.h>
24 #include <asm/processor.h>
26 #include <asm/pgtable.h>
27 #include <asm/pgalloc.h>
28 #include <asm/mmu_context.h>
29 #include <asm/setup.h>
46 static unsigned long hole_pages;
54 #ifdef CONFIG_BLK_DEV_INITRD
59 #define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn)
60 #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn)
62 #ifndef CONFIG_DISCONTIGMEM
65 unsigned long zones_size[MAX_NR_ZONES] = {0, };
66 unsigned long max_dma;
68 unsigned long start_pfn;
76 zones_size[ZONE_DMA] = low - start_pfn;
79 zones_size[ZONE_DMA] = low - start_pfn;
116 int reservedpages, nid,
i;
121 pgdat_resize_lock(
NODE_DATA(nid), &flags);
125 pgdat_resize_unlock(
NODE_DATA(nid), &flags);
128 return reservedpages;
137 int codesize, reservedpages, datasize, initsize;
149 #ifndef CONFIG_DISCONTIGMEM
167 codesize = (
unsigned long) &_etext - (
unsigned long)&_text;
168 datasize = (
unsigned long) &_edata - (
unsigned long)&_etext;
169 initsize = (
unsigned long) &__init_end - (
unsigned long)&__init_begin;
176 reservedpages << (PAGE_SHIFT-10),
189 addr = (
unsigned long)(&__init_begin);
190 for (; addr < (
unsigned long)(&__init_end); addr +=
PAGE_SIZE) {
197 (
int)(&__init_end - &__init_begin) >> 10);
200 #ifdef CONFIG_BLK_DEV_INITRD
214 printk (
KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);