patch-2.3.30 linux/include/linux/bootmem.h
Next file: linux/include/linux/cache.h
Previous file: linux/include/linux/acpi.h
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Mon Dec 6 17:23:20 1999
- Orig file:
v2.3.29/linux/include/linux/bootmem.h
- Orig date:
Tue Nov 23 22:42:21 1999
diff -u --recursive --new-file v2.3.29/linux/include/linux/bootmem.h linux/include/linux/bootmem.h
@@ -1,9 +1,12 @@
+/*
+ * Discontiguous memory support, Kanoj Sarcar, SGI, Nov 1999
+ */
#ifndef _LINUX_BOOTMEM_H
#define _LINUX_BOOTMEM_H
#include <asm/pgtable.h>
#include <asm/dma.h>
-#include <asm/cache.h>
+#include <linux/cache.h>
#include <linux/init.h>
/*
@@ -12,17 +15,44 @@
extern unsigned long max_low_pfn;
+/*
+ * node_bootmem_map is a map pointer - the bits represent all physical
+ * memory pages (including holes) on the node.
+ */
+typedef struct bootmem_data {
+ unsigned long node_boot_start;
+ unsigned long node_low_pfn;
+ void *node_bootmem_map;
+ unsigned long last_offset;
+ unsigned long last_pos;
+} bootmem_data_t;
+
+extern unsigned long __init bootmem_bootmap_pages (unsigned long);
extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
extern void __init free_bootmem (unsigned long addr, unsigned long size);
extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal);
#define alloc_bootmem(x) \
__alloc_bootmem((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+#define alloc_bootmem_low(x) \
+ __alloc_bootmem((x), SMP_CACHE_BYTES, 0)
#define alloc_bootmem_pages(x) \
__alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
#define alloc_bootmem_low_pages(x) \
__alloc_bootmem((x), PAGE_SIZE, 0)
extern unsigned long __init free_all_bootmem (void);
+
+extern unsigned long __init init_bootmem_node (int nid, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn);
+extern void __init reserve_bootmem_node (int nid, unsigned long physaddr, unsigned long size);
+extern void __init free_bootmem_node (int nid, unsigned long addr, unsigned long size);
+extern unsigned long __init free_all_bootmem_node (int nid);
+extern void * __init __alloc_bootmem_node (int nid, unsigned long size, unsigned long align, unsigned long goal);
+#define alloc_bootmem_node(nid, x) \
+ __alloc_bootmem_node((nid), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+#define alloc_bootmem_pages_node(nid, x) \
+ __alloc_bootmem_node((nid), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+#define alloc_bootmem_low_pages_node(nid, x) \
+ __alloc_bootmem_node((nid), (x), PAGE_SIZE, 0)
#endif /* _LINUX_BOOTMEM_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)