Skip to content

Commit ba9b399

Browse files
paulusmackmpe
authored andcommitted
powerpc/64: Export pgtable_cache and pgtable_cache_add for KVM
This exports the pgtable_cache array and the pgtable_cache_add function so that HV KVM can use them for allocating radix page tables for guests. Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent dbcbfee commit ba9b399

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/powerpc/mm/init-common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static void pmd_ctor(void *addr)
4141
}
4242

4343
struct kmem_cache *pgtable_cache[MAX_PGTABLE_INDEX_SIZE];
44+
EXPORT_SYMBOL_GPL(pgtable_cache); /* used by kvm_hv module */
4445

4546
/*
4647
* Create a kmem_cache() for pagetables. This is not used for PTE
@@ -82,7 +83,7 @@ void pgtable_cache_add(unsigned shift, void (*ctor)(void *))
8283
pgtable_cache[shift - 1] = new;
8384
pr_debug("Allocated pgtable cache for order %d\n", shift);
8485
}
85-
86+
EXPORT_SYMBOL_GPL(pgtable_cache_add); /* used by kvm_hv module */
8687

8788
void pgtable_cache_init(void)
8889
{

0 commit comments

Comments
 (0)