Skip to contentSkip to conversation

powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores

PATCH Applied Michael Neuling 4 participants 5 messages Aug 3, 2020 – Aug 18, 2020 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores

On POWER10 bit 12 in the PVR indicates if the core is SMT4 or SMT8. Bit 12 is set for SMT4.

Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like this:
cpu : POWER10, altivec supported
revision : 17.0 (pvr 0080 1100)

---
 arch/powerpc/kernel/setup-common.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/setup-common.c +1 -0
index b198b0ff25..808ec9fab6 100644
@@ -311,6 +311,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 				min = pvr & 0xFF;
 				break;
 			case 0x004e: /* POWER9 bits 12-15 give chip type */
+			case 0x0080: /* POWER10 bit 12 gives SMT8/4 */
 				maj = (pvr >> 8) & 0x0F;
 				min = pvr & 0xFF;
 				break;
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Michael Neuling

On POWER10 bit 12 in the PVR indicates if the core is SMT4 or SMT8. Bit 12 is set for SMT4.

Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like this:
cpu : POWER10, altivec supported
revision : 17.0 (pvr 0080 1100)

arch/powerpc/kernel/setup-common.c static int show_cpuinfo(struct seq_file *m, void *v) · line 314

Quoted 13 lines
---
 arch/powerpc/kernel/setup-common.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/setup-common.c +1 -0
index b198b0ff25..808ec9fab6 100644
@@ -311,6 +311,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 				min = pvr & 0xFF;
 				break;
 			case 0x004e: /* POWER9 bits 12-15 give chip type */
+			case 0x0080: /* POWER10 bit 12 gives SMT8/4 */

Correct. P9 and P10 have chip type (smt4 vs smt8 core) encoded in bits PVR chip type bits 12-15.

Thanks for the fix.

--Vaidy

#2 lore raw
In reply to Michael Neuling
Quoted 8 lines · Michael Neuling

On POWER10 bit 12 in the PVR indicates if the core is SMT4 or SMT8. Bit 12 is set for SMT4.

Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like this:
cpu : POWER10, altivec supported
revision : 17.0 (pvr 0080 1100)

Quoted 4 lines
---
 arch/powerpc/kernel/setup-common.c | 1 +
 1 file changed, 1 insertion(+)

This should have a Fixes: pointing at something so it gets backported.

cheers

#3 lore raw
Quoted 9 lines · Michael Ellerman
Quoted 8 lines · Michael Neuling

On POWER10 bit 12 in the PVR indicates if the core is SMT4 or SMT8. Bit 12 is set for SMT4.

Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like this:
cpu : POWER10, altivec supported
revision : 17.0 (pvr 0080 1100)

Quoted 6 lines
Quoted 4 lines
---
 arch/powerpc/kernel/setup-common.c | 1 +
 1 file changed, 1 insertion(+)

This should have a Fixes: pointing at something so it gets backported.

Yes it should.

Mikey

#4 lore raw
In reply to Michael Neuling
Quoted 7 lines · Michael Neuling

On POWER10 bit 12 in the PVR indicates if the core is SMT4 or SMT8. Bit 12 is set for SMT4.

Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like this:
cpu : POWER10, altivec supported
revision : 17.0 (pvr 0080 1100)

Applied to powerpc/fixes.

[1/1] powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores

      https://git.kernel.org/powerpc/c/030a2c689fb46e1690f7ded8b194bab7678efb28

cheers