Commit bbcab878 authored by Tang Chen's avatar Tang Chen Committed by Linus Torvalds

memory-hotplug: remove page table of x86_64 architecture

Search a page table about the removed memory, and clear page table for
x86_64 architecture.

[ make kernel_physical_mapping_remove() static]
Signed-off-by: default avatarWen Congyang <>
Signed-off-by: default avatarJianguo Wu <>
Signed-off-by: default avatarJiang Liu <>
Signed-off-by: default avatarTang Chen <>
Cc: KOSAKI Motohiro <>
Cc: Kamezawa Hiroyuki <>
Cc: Lai Jiangshan <>
Cc: Wu Jianguo <>
Cc: Yasuaki Ishimatsu <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: "H. Peter Anvin" <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ae9aae9e
......@@ -1011,6 +1011,15 @@ remove_pagetable(unsigned long start, unsigned long end, bool direct)
static void __meminit
kernel_physical_mapping_remove(unsigned long start, unsigned long end)
start = (unsigned long)__va(start);
end = (unsigned long)__va(end);
remove_pagetable(start, end, true);
int __ref arch_remove_memory(u64 start, u64 size)
......@@ -1020,6 +1029,7 @@ int __ref arch_remove_memory(u64 start, u64 size)
int ret;
zone = page_zone(pfn_to_page(start_pfn));
kernel_physical_mapping_remove(start, start + size);
ret = __remove_pages(zone, start_pfn, nr_pages);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment