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

Justin Hibbits jhibbits at FreeBSD.org
Sun Oct 6 19:11:02 UTC 2019


Author: jhibbits
Date: Sun Oct  6 19:11:01 2019
New Revision: 353147
URL: https://svnweb.freebsd.org/changeset/base/353147

Log:
  powerpc/pmap64: Properly parenthesize PV_LOCK_COUNT macros
  
  As pointed out by mjg, without the parentheses the calculations done against
  these macros are incorrect, resulting in only 1/3 of locks being used.
  
  Reported by:	mjg

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

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c	Sun Oct  6 18:38:58 2019	(r353146)
+++ head/sys/powerpc/aim/mmu_oea64.c	Sun Oct  6 19:11:01 2019	(r353147)
@@ -119,8 +119,8 @@ uintptr_t moea64_get_unique_vsid(void); 
  *
  */
 
-#define PV_LOCK_PER_DOM	PA_LOCK_COUNT*3
-#define PV_LOCK_COUNT	PV_LOCK_PER_DOM*MAXMEMDOM
+#define PV_LOCK_PER_DOM	(PA_LOCK_COUNT * 3)
+#define PV_LOCK_COUNT	(PV_LOCK_PER_DOM * MAXMEMDOM)
 static struct mtx_padalign pv_lock[PV_LOCK_COUNT];
  
 /*


More information about the svn-src-all mailing list