Skip to content

Commit afd3135

Browse files
mpepaulusmack
authored andcommitted
KVM: PPC: Book3S HV: Use RADIX_PTE_INDEX_SIZE in Radix MMU code
In kvmppc_unmap_free_pte() in book3s_64_mmu_radix.c, we use the non-constant value PTE_INDEX_SIZE to clear a PTE page. We can instead use the constant RADIX_PTE_INDEX_SIZE, because we know this code will only be running when the Radix MMU is active. Note that we already use RADIX_PTE_INDEX_SIZE for the allocation of kvm_pte_cache. Signed-off-by: Michael Ellerman <[email protected]> Reviewed-by: Leonardo Bras <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent cd758a9 commit afd3135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kvm/book3s_64_mmu_radix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static void kvmppc_unmap_free_pte(struct kvm *kvm, pte_t *pte, bool full,
425425
unsigned int lpid)
426426
{
427427
if (full) {
428-
memset(pte, 0, sizeof(long) << PTE_INDEX_SIZE);
428+
memset(pte, 0, sizeof(long) << RADIX_PTE_INDEX_SIZE);
429429
} else {
430430
pte_t *p = pte;
431431
unsigned long it;

0 commit comments

Comments
 (0)