svn commit: r347956 - head/sys/powerpc/aim

Justin Hibbits jhibbits at FreeBSD.org
Sat May 18 14:56:01 UTC 2019


Author: jhibbits
Date: Sat May 18 14:55:59 2019
New Revision: 347956
URL: https://svnweb.freebsd.org/changeset/base/347956

Log:
  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

Modified:
  head/sys/powerpc/aim/mmu_oea64.c

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c	Sat May 18 14:19:23 2019	(r347955)
+++ head/sys/powerpc/aim/mmu_oea64.c	Sat May 18 14:55:59 2019	(r347956)
@@ -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))


More information about the svn-src-head mailing list