Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mm/radix: Use different RTS encoding for different POWER9 revs

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>

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
694c4951 7dccfbc3

+9 -4
+9 -4
arch/powerpc/include/asm/book3s/64/radix.h
··· 233 233 { 234 234 unsigned long rts_field; 235 235 /* 236 - * we support 52 bits, hence 52-31 = 21, 0b10101 236 + * We support 52 bits, hence: 237 + * DD1 52-28 = 24, 0b11000 238 + * Others 52-31 = 21, 0b10101 237 239 * RTS encoding details 238 240 * bits 0 - 3 of rts -> bits 6 - 8 unsigned long 239 241 * bits 4 - 5 of rts -> bits 62 - 63 of unsigned long 240 242 */ 241 - rts_field = (0x5UL << 5); /* 6 - 8 bits */ 242 - rts_field |= (0x2UL << 61); 243 - 243 + if (cpu_has_feature(CPU_FTR_POWER9_DD1)) 244 + rts_field = (0x3UL << 61); 245 + else { 246 + rts_field = (0x5UL << 5); /* 6 - 8 bits */ 247 + rts_field |= (0x2UL << 61); 248 + } 244 249 return rts_field; 245 250 } 246 251 #endif /* __ASSEMBLY__ */