~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/bootmem.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Discontiguous memory support, Kanoj Sarcar, SGI, Nov 1999
  3  */
  4 #ifndef _LINUX_BOOTMEM_H
  5 #define _LINUX_BOOTMEM_H
  6 
  7 #include <asm/pgtable.h>
  8 #include <asm/dma.h>
  9 #include <linux/cache.h>
 10 #include <linux/init.h>
 11 #include <linux/mmzone.h>
 12 
 13 /*
 14  *  simple boot-time physical memory area allocator.
 15  */
 16 
 17 extern unsigned long max_low_pfn;
 18 extern unsigned long min_low_pfn;
 19 
 20 /*
 21  * node_bootmem_map is a map pointer - the bits represent all physical 
 22  * memory pages (including holes) on the node.
 23  */
 24 typedef struct bootmem_data {
 25         unsigned long node_boot_start;
 26         unsigned long node_low_pfn;
 27         void *node_bootmem_map;
 28         unsigned long last_offset;
 29         unsigned long last_pos;
 30 } bootmem_data_t;
 31 
 32 extern unsigned long __init bootmem_bootmap_pages (unsigned long);
 33 extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
 34 extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
 35 extern void __init free_bootmem (unsigned long addr, unsigned long size);
 36 extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal);
 37 #define alloc_bootmem(x) \
 38         __alloc_bootmem((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
 39 #define alloc_bootmem_low(x) \
 40         __alloc_bootmem((x), SMP_CACHE_BYTES, 0)
 41 #define alloc_bootmem_pages(x) \
 42         __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
 43 #define alloc_bootmem_low_pages(x) \
 44         __alloc_bootmem((x), PAGE_SIZE, 0)
 45 extern unsigned long __init free_all_bootmem (void);
 46 
 47 extern unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn);
 48 extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size);
 49 extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size);
 50 extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat);
 51 extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal);
 52 #define alloc_bootmem_node(pgdat, x) \
 53         __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
 54 #define alloc_bootmem_pages_node(pgdat, x) \
 55         __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
 56 #define alloc_bootmem_low_pages_node(pgdat, x) \
 57         __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
 58 
 59 #endif /* _LINUX_BOOTMEM_H */
 60 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.