From c3acaec56472efc7cd151e78de252ba52ddce221 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sat, 18 May 2019 14:55:59 +0000 Subject: [PATCH] powerpc: Fix moea64 pmap from 347952 vm_paddr_t is only 32 bits on AIM32 (currently), causing a build failure with the shifting. MFC after: 2 weeks MFC with: r347952 --- sys/powerpc/aim/mmu_oea64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index baa32754d2b..ae285b72e80 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -127,8 +127,12 @@ static struct mtx_padalign pv_lock[PV_LOCK_COUNT]; * NUMA domains on POWER9 appear to be indexed as sparse memory spaces, with the * index at (N << 45). */ +#ifdef __powerpc64__ #define PV_LOCK_IDX(pa) (pa_index(pa) % PV_LOCK_PER_DOM + \ (((pa) >> 45) % MAXMEMDOM) * PV_LOCK_PER_DOM) +#else +#define PV_LOCK_IDX(pa) (pa_index(pa) % PV_LOCK_COUNT) +#endif #define PV_LOCKPTR(pa) ((struct mtx *)(&pv_lock[PV_LOCK_IDX(pa)])) #define PV_LOCK(pa) mtx_lock(PV_LOCKPTR(pa)) #define PV_UNLOCK(pa) mtx_unlock(PV_LOCKPTR(pa))