提交 ed5694a8 编写于 作者: L Li Zhong 提交者: Benjamin Herrenschmidt

powerpc: implement vmemmap_remove_mapping() for BOOK3S

This is to be called in vmemmap_free(), leave the implementation on BOOK3E
empty as before.
Signed-off-by: NLi Zhong <zhong@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Acked-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 bd8cb03d
...@@ -243,7 +243,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, ...@@ -243,7 +243,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
} }
#ifdef CONFIG_MEMORY_HOTPLUG #ifdef CONFIG_MEMORY_HOTPLUG
static int htab_remove_mapping(unsigned long vstart, unsigned long vend, int htab_remove_mapping(unsigned long vstart, unsigned long vend,
int psize, int ssize) int psize, int ssize)
{ {
unsigned long vaddr; unsigned long vaddr;
......
...@@ -212,6 +212,13 @@ static void __meminit vmemmap_create_mapping(unsigned long start, ...@@ -212,6 +212,13 @@ static void __meminit vmemmap_create_mapping(unsigned long start,
for (i = 0; i < page_size; i += PAGE_SIZE) for (i = 0; i < page_size; i += PAGE_SIZE)
BUG_ON(map_kernel_page(start + i, phys, flags)); BUG_ON(map_kernel_page(start + i, phys, flags));
} }
#ifdef CONFIG_MEMORY_HOTPLUG
static void vmemmap_remove_mapping(unsigned long start,
unsigned long page_size)
{
}
#endif
#else /* CONFIG_PPC_BOOK3E */ #else /* CONFIG_PPC_BOOK3E */
static void __meminit vmemmap_create_mapping(unsigned long start, static void __meminit vmemmap_create_mapping(unsigned long start,
unsigned long page_size, unsigned long page_size,
...@@ -223,6 +230,21 @@ static void __meminit vmemmap_create_mapping(unsigned long start, ...@@ -223,6 +230,21 @@ static void __meminit vmemmap_create_mapping(unsigned long start,
mmu_kernel_ssize); mmu_kernel_ssize);
BUG_ON(mapped < 0); BUG_ON(mapped < 0);
} }
#ifdef CONFIG_MEMORY_HOTPLUG
extern int htab_remove_mapping(unsigned long vstart, unsigned long vend,
int psize, int ssize);
static void vmemmap_remove_mapping(unsigned long start,
unsigned long page_size)
{
int mapped = htab_remove_mapping(start, start + page_size,
mmu_vmemmap_psize,
mmu_kernel_ssize);
BUG_ON(mapped < 0);
}
#endif
#endif /* CONFIG_PPC_BOOK3E */ #endif /* CONFIG_PPC_BOOK3E */
struct vmemmap_backing *vmemmap_list; struct vmemmap_backing *vmemmap_list;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册