]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
powerpc/mm/radix: Use different RTS encoding for different POWER9 revs
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 24 Aug 2016 09:33:37 +0000 (15:03 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Sep 2016 07:37:09 +0000 (17:37 +1000)
POWER9 DD1 uses RTS - 28 for the RTS value but other revisions use
RTS - 31.  This makes this distinction for the different revisions

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/radix.h

index df294224e28020cfd438155c6733132b8c906a07..a2fe8fbfbd3d8066e6ca6a3c81f4a78d88d53329 100644 (file)
@@ -233,14 +233,19 @@ static inline unsigned long radix__get_tree_size(void)
 {
        unsigned long rts_field;
        /*
-        * we support 52 bits, hence 52-31 = 21, 0b10101
+        * We support 52 bits, hence:
+        *  DD1    52-28 = 24, 0b11000
+        *  Others 52-31 = 21, 0b10101
         * RTS encoding details
         * bits 0 - 3 of rts -> bits 6 - 8 unsigned long
         * bits 4 - 5 of rts -> bits 62 - 63 of unsigned long
         */
-       rts_field = (0x5UL << 5); /* 6 - 8 bits */
-       rts_field |= (0x2UL << 61);
-
+       if (cpu_has_feature(CPU_FTR_POWER9_DD1))
+               rts_field = (0x3UL << 61);
+       else {
+               rts_field = (0x5UL << 5); /* 6 - 8 bits */
+               rts_field |= (0x2UL << 61);
+       }
        return rts_field;
 }
 #endif /* __ASSEMBLY__ */