summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/memblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/memblock.c')
-rw-r--r--arch/x86/mm/memblock.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/mm/memblock.c b/arch/x86/mm/memblock.c
index 8101084d452a..9829eaf1dbda 100644
--- a/arch/x86/mm/memblock.c
+++ b/arch/x86/mm/memblock.c
@@ -114,3 +114,25 @@ void __init memblock_x86_to_bootmem(u64 start, u64 end)
memblock_reserve_reserved_regions();
}
#endif
+
+void __init memblock_x86_reserve_range(u64 start, u64 end, char *name)
+{
+ if (start == end)
+ return;
+
+ if (WARN_ONCE(start > end, "memblock_x86_reserve_range: wrong range [%#llx, %#llx]\n", start, end))
+ return;
+
+ memblock_reserve(start, end - start);
+}
+
+void __init memblock_x86_free_range(u64 start, u64 end)
+{
+ if (start == end)
+ return;
+
+ if (WARN_ONCE(start > end, "memblock_x86_free_range: wrong range [%#llx, %#llx]\n", start, end))
+ return;
+
+ memblock_free(start, end - start);
+}