Skip to contentSkip to conversation

powerpc/64s: Make boot look nicer

PATCH New Nicholas Piggin 1 participant 1 message Jul 2, 2019 PowerPC

lore
Share & tools
lore

Nicholas Piggin

author reviewer
#0 lore raw

PATCH v2 1/1 powerpc/64s: Make boot look nicer

Radix boot looks like this:

-----------------------------------------------------

 phys_mem_size     = 0x200000000
 dcache_bsize      = 0x80
 icache_bsize      = 0x80
 cpu_features      = 0x0000c06f8f5fb1a7
   possible        = 0x0000fbffcf5fb1a7
   always          = 0x00000003800081a1
 cpu_user_features = 0xdc0065c2 0xaee00000
 mmu_features      = 0xbc006041
 firmware_features = 0x0000000010000000
 hash-mmu: ppc64_pft_size    = 0x0
 hash-mmu: kernel vmalloc start   = 0xc008000000000000
 hash-mmu: kernel IO start        = 0xc00a000000000000
 hash-mmu: kernel vmemmap start   = 0xc00c000000000000

-----------------------------------------------------

It's misleading to see hash-mmu there. After fix:

-----------------------------------------------------

 phys_mem_size     = 0x200000000
 dcache_bsize      = 0x80
 icache_bsize      = 0x80
 cpu_features      = 0x0000c06f8f5fb1a7
   possible        = 0x0000fbffcf5fb1a7
   always          = 0x00000003800081a1
 cpu_user_features = 0xdc0065c2 0xaee00000
 mmu_features      = 0xbc006041
 firmware_features = 0x0000000010000000
 vmalloc start     = 0xc008000000000000
 IO start          = 0xc00a000000000000
 vmemmap start     = 0xc00c000000000000

-----------------------------------------------------

Hash has the same text misalignment problem which is also corrected.

---
v2: avoid adding an ifdef to generic code.

 arch/powerpc/mm/book3s64/hash_utils.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
arch/powerpc/mm/book3s64/hash_utils.c +15 -6
index 28ced26f2a00..54f2d6acf6da 100644
@@ -1946,11 +1946,20 @@ machine_device_initcall(pseries, hash64_debugfs);
 
 void __init print_system_hash_info(void)
 {
-	pr_info("ppc64_pft_size    = 0x%llx\n", ppc64_pft_size);
+#undef pr_fmt
+#define pr_fmt(fmt) fmt
 
-	if (htab_hash_mask)
-		pr_info("htab_hash_mask    = 0x%lx\n", htab_hash_mask);
-	pr_info("kernel vmalloc start   = 0x%lx\n", KERN_VIRT_START);
-	pr_info("kernel IO start        = 0x%lx\n", KERN_IO_START);
-	pr_info("kernel vmemmap start   = 0x%lx\n", (unsigned long)vmemmap);
+	if (!early_radix_enabled()) {
+		pr_info("ppc64_pft_size    = 0x%llx\n", ppc64_pft_size);
+
+		if (htab_hash_mask)
+			pr_info("htab_hash_mask    = 0x%lx\n", htab_hash_mask);
+	}
+
+	pr_info("vmalloc start     = 0x%lx\n", KERN_VIRT_START);
+	pr_info("IO start          = 0x%lx\n", KERN_IO_START);
+	pr_info("vmemmap start     = 0x%lx\n", (unsigned long)vmemmap);
+
+#undef pr_fmt
+#define pr_fmt(fmt) "hash-mmu: " fmt
 }
Signature · 1 line
2.20.1