patch-2.3.23 linux/include/linux/bootmem.h

Next file: linux/include/linux/cdrom.h
Previous file: linux/include/linux/binfmts.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.22/linux/include/linux/bootmem.h linux/include/linux/bootmem.h
@@ -0,0 +1,29 @@
+#ifndef _LINUX_BOOTMEM_H
+#define _LINUX_BOOTMEM_H
+
+#include <linux/config.h>
+#include <asm/pgtable.h>
+#include <asm/dma.h>
+
+/*
+ *  simple boot-time physical memory area allocator.
+ */
+
+extern unsigned long max_low_pfn;
+
+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_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);
+
+#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)