Skip to content

Commit

Permalink
powerpc/64: Export pgtable_cache and pgtable_cache_add for KVM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras authored and Michael Ellerman committed Jan 31, 2017
1 parent dbcbfee commit ba9b399
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/mm/init-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static void pmd_ctor(void *addr)
}

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

/*
* Create a kmem_cache() for pagetables. This is not used for PTE
Expand Down Expand Up @@ -82,7 +83,7 @@ void pgtable_cache_add(unsigned shift, void (*ctor)(void *))
pgtable_cache[shift - 1] = new;
pr_debug("Allocated pgtable cache for order %d\n", shift);
}

EXPORT_SYMBOL_GPL(pgtable_cache_add); /* used by kvm_hv module */

void pgtable_cache_init(void)
{
Expand Down

0 comments on commit ba9b399

Please sign in to comment.