From 8b2133d4e18e7dd0a5984fb2cdec3da4f84bac3c Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Fri, 6 Nov 2020 18:50:00 +0000 Subject: Fix powerpc and LINT builds Fix build errors introduced by r367417 and r367390: - Guard label reached only by powerpc64 - Guard vm_reserv_level_iffullpop call, that is not defined on powerpc variants that don't support superpages - Add missing hwpmc file, for when hwpmc is built into kernel --- sys/powerpc/aim/mmu_oea64.c | 2 ++ sys/powerpc/aim/moea64_native.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/powerpc/aim') diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 0ea9ec55f4891..19ebe3411781a 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -1760,6 +1760,7 @@ out: moea64_syncicache(pmap, va, pa, PAGE_SIZE); } +#if VM_NRESERVLEVEL > 0 /* * Try to promote pages. * @@ -1773,6 +1774,7 @@ out: (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) moea64_sp_promote(pmap, va, m); +#endif return (KERN_SUCCESS); } diff --git a/sys/powerpc/aim/moea64_native.c b/sys/powerpc/aim/moea64_native.c index c352ea6fb6ccc..4e729709bf3ab 100644 --- a/sys/powerpc/aim/moea64_native.c +++ b/sys/powerpc/aim/moea64_native.c @@ -211,6 +211,8 @@ TLBIE(uint64_t vpn, uint64_t oldptehi) */ __asm __volatile("li 0, 0 \n tlbie %0, 0" :: "r"(vpn) : "r0", "memory"); __asm __volatile("eieio; tlbsync; ptesync" ::: "memory"); +done: + #else vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; @@ -235,7 +237,6 @@ TLBIE(uint64_t vpn, uint64_t oldptehi) intr_restore(intr); #endif -done: /* No barriers or special ops -- taken care of by ptesync above */ if (need_lock) tlbie_lock = 0; -- cgit v1.3