summaryrefslogtreecommitdiff
path: root/include/linux/early_res.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-02-17 05:40:35 +0300
committerH. Peter Anvin <hpa@zytor.com>2010-02-17 08:43:39 +0300
commit580e0ad21d6d6f932461d24b47041e3dd499c23f (patch)
tree3476c71849c0f9aa54c160b9a994bf4d211bd697 /include/linux/early_res.h
parentdd645cee7b50b61cb2d05b59eb6027679c437af6 (diff)
downloadlinux-580e0ad21d6d6f932461d24b47041e3dd499c23f.tar.xz
core: Move early_res from arch/x86 to kernel/
This makes the range reservation feature available to other architectures. -v2: add get_max_mapped, max_pfn_mapped only defined in x86... to fix PPC compiling -v3: according to hpa, add CONFIG_HAVE_EARLY_RES -v4: fix typo about EARLY_RES in config Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <4B7B5723.4070009@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/linux/early_res.h')
-rw-r--r--include/linux/early_res.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/early_res.h b/include/linux/early_res.h
new file mode 100644
index 000000000000..50f7663bb8b1
--- /dev/null
+++ b/include/linux/early_res.h
@@ -0,0 +1,22 @@
+#ifndef _LINUX_EARLY_RES_H
+#define _LINUX_EARLY_RES_H
+#ifdef __KERNEL__
+
+extern void reserve_early(u64 start, u64 end, char *name);
+extern void reserve_early_overlap_ok(u64 start, u64 end, char *name);
+extern void free_early(u64 start, u64 end);
+extern void early_res_to_bootmem(u64 start, u64 end);
+
+void reserve_early_without_check(u64 start, u64 end, char *name);
+u64 find_early_area(u64 ei_start, u64 ei_last, u64 start, u64 end,
+ u64 size, u64 align);
+u64 find_early_area_size(u64 ei_start, u64 ei_last, u64 start,
+ u64 *sizep, u64 align);
+u64 find_fw_memmap_area(u64 start, u64 end, u64 size, u64 align);
+u64 get_max_mapped(void);
+#include <linux/range.h>
+int get_free_all_memory_range(struct range **rangep, int nodeid);
+
+#endif /* __KERNEL__ */
+
+#endif /* _LINUX_EARLY_RES_H */