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

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sun May 13 23:56:44 UTC 2018


Author: nwhitehorn
Date: Sun May 13 23:56:43 2018
New Revision: 333594
URL: https://svnweb.freebsd.org/changeset/base/333594

Log:
  Revert changes to hash table alignment in r333273, which booting on all G5
  systems, pending further analysis.

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

Modified: head/sys/powerpc/aim/moea64_native.c
==============================================================================
--- head/sys/powerpc/aim/moea64_native.c	Sun May 13 23:55:11 2018	(r333593)
+++ head/sys/powerpc/aim/moea64_native.c	Sun May 13 23:56:43 2018	(r333594)
@@ -448,14 +448,18 @@ moea64_bootstrap_native(mmu_t mmup, vm_offset_t kernel
 		moea64_part_table =
 		    (struct pate *)moea64_bootstrap_alloc(PART_SIZE, PART_SIZE);
 		if (hw_direct_map)
-			moea64_part_table =
-			    (struct pate *)PHYS_TO_DMAP((vm_offset_t)moea64_part_table);
+			moea64_part_table = (struct pate *)PHYS_TO_DMAP(
+			    (vm_offset_t)moea64_part_table);
 	}
 	/*
 	 * PTEG table must be aligned on a 256k boundary, but can be placed
-	 * anywhere with that alignment.
+	 * anywhere with that alignment. Some of our hash calculations,
+	 * however, assume that the PTEG table is aligned to its own size
+	 * (low-order bits are zero in an OR). As such, make alignment
+	 * bigger than strictly necessary for the time being.
 	 */
-	moea64_pteg_table = (struct lpte *)moea64_bootstrap_alloc(size, 256*1024);
+	moea64_pteg_table = (struct lpte *)moea64_bootstrap_alloc(size, 
+	    MAX(256*1024, size));
 	if (hw_direct_map)
 		moea64_pteg_table =
 		    (struct lpte *)PHYS_TO_DMAP((vm_offset_t)moea64_pteg_table);


More information about the svn-src-all mailing list