powerpc/mm: Add translation mode information in /proc/cpuinfo
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 21 Mar 2017 17:29:55 +0000 (22:59 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 31 Mar 2017 12:09:50 +0000 (23:09 +1100)
With this we have on powernv and pseries /proc/cpuinfo reporting

timebase        : 512000000
platform        : PowerNV
model           : 8247-22L
machine         : PowerNV 8247-22L
firmware        : OPAL
MMU : Hash

Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/pseries/setup.c

index d50c7d9..2d937f6 100644 (file)
@@ -95,6 +95,10 @@ static void pnv_show_cpuinfo(struct seq_file *m)
        else
                seq_printf(m, "firmware\t: BML\n");
        of_node_put(root);
+       if (radix_enabled())
+               seq_printf(m, "MMU\t\t: Radix\n");
+       else
+               seq_printf(m, "MMU\t\t: Hash\n");
 }
 
 static void pnv_prepare_going_down(void)
index b4d362e..b5d8642 100644 (file)
@@ -87,6 +87,10 @@ static void pSeries_show_cpuinfo(struct seq_file *m)
                model = of_get_property(root, "model", NULL);
        seq_printf(m, "machine\t\t: CHRP %s\n", model);
        of_node_put(root);
+       if (radix_enabled())
+               seq_printf(m, "MMU\t\t: Radix\n");
+       else
+               seq_printf(m, "MMU\t\t: Hash\n");
 }
 
 /* Initialize firmware assisted non-maskable interrupts if