summaryrefslogtreecommitdiffstats
path: root/include/linux/bootmem.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
commit33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch)
tree2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /include/linux/bootmem.h
parent216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff)
Merge with Linux 2.3.32.
Diffstat (limited to 'include/linux/bootmem.h')
-rw-r--r--include/linux/bootmem.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index c789e769c..7b51fcb54 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -1,8 +1,13 @@
+/*
+ * 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 <linux/cache.h>
+#include <linux/init.h>
/*
* simple boot-time physical memory area allocator.
@@ -10,18 +15,45 @@
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 */