Add support for power9 in ibm_architecture_vec
PATCH 1/1 Add support for power9 in ibm_architecture_vec
The PVR list has been updated and IBM_ARCH_VEC_NRCORES_OFFSET.
--- arch/powerpc/include/asm/prom.h | 5 ++++- arch/powerpc/kernel/prom_init.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/prom.h +4 -1
@@ -111,7 +111,7 @@ struct of_drconf_cell {#define OV_IGNORE 0x80/* ignore this vector */ #define OV_CESSATION_POLICY 0x40/* halt if unsupported option present*/ -/* Option vector 1: processor architectures supported */ +/* Option vector 1: byte 2, processor architectures supported */ #define OV1_PPC_2_00 0x80/* set if we support PowerPC 2.00 */ #define OV1_PPC_2_01 0x40/* set if we support PowerPC 2.01 */ #define OV1_PPC_2_02 0x20/* set if we support PowerPC 2.02 */
@@ -121,6 +121,9 @@ struct of_drconf_cell {#define OV1_PPC_2_06 0x02/* set if we support PowerPC 2.06 */ #define OV1_PPC_2_07 0x01/* set if we support PowerPC 2.07 */ +/* Option vector 1: byte 3, processor architectures supported */ +#define OV1_PPC_3_00 0x80/* set if we support PowerPC 3.00 */ +/* Option vector 2: Open Firmware options supported */ #define OV2_REAL_MODE 0x20/* set if we want OF in real mode */
arch/powerpc/kernel/prom_init.c +4 -1
@@ -658,6 +658,8 @@ unsigned char ibm_architecture_vec[] = {W (0xffff0000 ),W (0x004b0000 ),/* POWER8E */ W (0xffff0000 ),W (0x004c0000 ),/* POWER8NVL */ W (0xffff0000 ),W (0x004d0000 ),/* POWER8 */ +W (0xffff0000 ),W (0x004e0000 ),/* POWER9 */ +W (0xffffffff ),W (0x0f000005 ),/* all 3.0-compliant */ W (0xffffffff ),W (0x0f000004 ),/* all 2.07-compliant */ W (0xffffffff ),W (0x0f000003 ),/* all 2.06-compliant */ W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */
@@ -669,6 +671,7 @@ unsigned char ibm_architecture_vec[] = {0 ,/* don't ignore, don't halt */ OV1_PPC_2_00 |OV1_PPC_2_01 |OV1_PPC_2_02 |OV1_PPC_2_03 |OV1_PPC_2_04 |OV1_PPC_2_05 |OV1_PPC_2_06 |OV1_PPC_2_07 , +OV1_PPC_3_00 ,/* option vector 2: Open Firmware options supported */ VECTOR_LENGTH(33), /* length */
@@ -719,7 +722,7 @@ unsigned char ibm_architecture_vec[] = {* must match by the macro below. Update the definition if * the structure layout changes. */ -#define IBM_ARCH_VEC_NRCORES_OFFSET 125 +#define IBM_ARCH_VEC_NRCORES_OFFSET 150W (NR_CPUS ),/* number of cores supported */ 0 , 0,
Signature · 1 line
2.5.5
Quoted 53 lines · Balbir Singh
The PVR list has been updated and
IBM_ARCH_VEC_NRCORES_OFFSET.Signed-off-by Balbir Singh <[email protected]>--- arch/powerpc/include/asm/prom.h | 5 ++++- arch/powerpc/kernel/prom_init.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)arch/powerpc/include/asm/prom.h +4
-1@@ -111,7 +111,7 @@ struct of_drconf_cell {#define OV_IGNORE 0x80/* ignore this vector */ #define OV_CESSATION_POLICY 0x40/* halt if unsupported option present*/ -/* Option vector 1: processor architectures supported */ +/* Option vector 1: byte 2, processor architectures supported */ #define OV1_PPC_2_00 0x80/* set if we support PowerPC 2.00 */ #define OV1_PPC_2_01 0x40/* set if we support PowerPC 2.01 */ #define OV1_PPC_2_02 0x20/* set if we support PowerPC 2.02 */ @@ -121,6 +121,9 @@ struct of_drconf_cell {#define OV1_PPC_2_06 0x02/* set if we support PowerPC 2.06 */ #define OV1_PPC_2_07 0x01/* set if we support PowerPC 2.07 */ +/* Option vector 1: byte 3, processor architectures supported */ +#define OV1_PPC_3_00 0x80/* set if we support PowerPC 3.00 */ +/* Option vector 2: Open Firmware options supported */ #define OV2_REAL_MODE 0x20/* set if we want OF in real mode */ arch/powerpc/kernel/prom_init.c +3
-0@@ -658,6 +658,8 @@ unsigned char ibm_architecture_vec[] = {W (0xffff0000 ),W (0x004b0000 ),/* POWER8E */ W (0xffff0000 ),W (0x004c0000 ),/* POWER8NVL */ W (0xffff0000 ),W (0x004d0000 ),/* POWER8 */ +W (0xffff0000 ),W (0x004e0000 ),/* POWER9 */ +W (0xffffffff ),W (0x0f000005 ),/* all 3.0-compliant */ W (0xffffffff ),W (0x0f000004 ),/* all 2.07-compliant */ W (0xffffffff ),W (0x0f000003 ),/* all 2.06-compliant */ W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */@@ -669,6 +671,7 @@ unsigned char ibm_architecture_vec[] = {0 ,/* don't ignore, don't halt */ OV1_PPC_2_00 |OV1_PPC_2_01 |OV1_PPC_2_02 |OV1_PPC_2_03 |OV1_PPC_2_04 |OV1_PPC_2_05 |OV1_PPC_2_06 |OV1_PPC_2_07 , +OV1_PPC_3_00 ,/* option vector 2: Open Firmware options supported */ VECTOR_LENGTH(33), /* length */
arch/powerpc/kernel/prom_init.c unsigned char ibm_architecture_vec[] = { · line 725
Quoted 5 lines
arch/powerpc/kernel/prom_init.c +1
-1@@ -719,7 +722,7 @@ unsigned char ibm_architecture_vec[] = {* must match by the macro below. Update the definition if * the structure layout changes. */ -#define IBM_ARCH_VEC_NRCORES_OFFSET 125 +#define IBM_ARCH_VEC_NRCORES_OFFSET 150
Shouldn't this be 125 + 16 ?
Quoted 5 lines
arch/powerpc/kernel/prom_init.c +0
-0W (NR_CPUS ),/* number of cores supported */ 0 , 0,Signature · 1 line
2.5.5
Quoted 1 line · Aneesh Kumar K.V
Shouldn't this be 125 + 16 ?
Actually the previous patch broke it and Ben fixed it, it should have been 133 after adding POWER8NVL. My patch adds 16+1 (1 for the OV1_PPC_3_00)
133+17 = 150
Michael, can you please check. I did a quick check with gdb
Balbir Singh
Quoted 4 lines · Balbir Singh
Quoted 1 line · Aneesh Kumar K.V
Shouldn't this be 125 + 16 ?
Quoted 8 lines
Actually the previous patch broke it and Ben fixed it, it should have been 133 after adding POWER8NVL. My patch adds 16+1 (1 for the
OV1_PPC_3_00)133+17 = 150
Michael, can you please check. I did a quick check with gdb
I missed that OV1_PPC_3_00 is byte 3 of option vection 1. I guess you also need to update VECTOR_LENGHT above the option vector 1 to 3. ie, it should be VECTOR_LENGTH(3) ?
-aneesh
Quoted 12 lines · Aneesh Kumar K.V
Quoted 10 lines · Balbir Singh
Quoted 1 line · Aneesh Kumar K.V
Shouldn't this be 125 + 16 ?
Actually the previous patch broke it and Ben fixed it, it should have been 133 after adding POWER8NVL. My patch adds 16+1 (1 for the
OV1_PPC_3_00)133+17 = 150
Quoted 7 lines
Quoted 2 lines
Michael, can you please check. I did a quick check with gdb
I missed that
OV1_PPC_3_00is byte 3 of option vection 1. I guess you also need to updateVECTOR_LENGHTabove the option vector 1 to 3. ie, it should beVECTOR_LENGTH(3)?
Yes, my bad.. I'll respin. I thought I had it, but I clearly did not
Balbir
PATCH v2 1/1 Add support for power9 in ibm_architecture_vec
Quoted 2 lines · Balbir Singh
Yes, my bad.. I'll respin. I thought I had it, but I clearly did not
V2: Update the vector length for OV1 after adding 3.0 support
The PVR list has been updated and IBM_ARCH_VEC_NRCORES_OFFSET. This provides the cpu version supported to the hypervisor
--- arch/powerpc/include/asm/prom.h | 5 ++++- arch/powerpc/kernel/prom_init.c | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-)
arch/powerpc/include/asm/prom.h +4 -1
@@ -111,7 +111,7 @@ struct of_drconf_cell {#define OV_IGNORE 0x80/* ignore this vector */ #define OV_CESSATION_POLICY 0x40/* halt if unsupported option present*/ -/* Option vector 1: processor architectures supported */ +/* Option vector 1: byte 2, processor architectures supported */ #define OV1_PPC_2_00 0x80/* set if we support PowerPC 2.00 */ #define OV1_PPC_2_01 0x40/* set if we support PowerPC 2.01 */ #define OV1_PPC_2_02 0x20/* set if we support PowerPC 2.02 */
@@ -121,6 +121,9 @@ struct of_drconf_cell {#define OV1_PPC_2_06 0x02/* set if we support PowerPC 2.06 */ #define OV1_PPC_2_07 0x01/* set if we support PowerPC 2.07 */ +/* Option vector 1: byte 3, processor architectures supported */ +#define OV1_PPC_3_00 0x80/* set if we support PowerPC 3.00 */ +/* Option vector 2: Open Firmware options supported */ #define OV2_REAL_MODE 0x20/* set if we want OF in real mode */
arch/powerpc/kernel/prom_init.c +5 -2
@@ -658,6 +658,8 @@ unsigned char ibm_architecture_vec[] = {W (0xffff0000 ),W (0x004b0000 ),/* POWER8E */ W (0xffff0000 ),W (0x004c0000 ),/* POWER8NVL */ W (0xffff0000 ),W (0x004d0000 ),/* POWER8 */ +W (0xffff0000 ),W (0x004e0000 ),/* POWER9 */ +W (0xffffffff ),W (0x0f000005 ),/* all 3.0-compliant */ W (0xffffffff ),W (0x0f000004 ),/* all 2.07-compliant */ W (0xffffffff ),W (0x0f000003 ),/* all 2.06-compliant */ W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */
@@ -665,10 +667,11 @@ unsigned char ibm_architecture_vec[] = {NUM_VECTORS (6 ),/* 6 option vectors */ /* option vector 1: processor architectures supported */ -VECTOR_LENGTH (2 ),/* length */ +VECTOR_LENGTH (3 ),/* length */ 0 ,/* don't ignore, don't halt */ OV1_PPC_2_00 |OV1_PPC_2_01 |OV1_PPC_2_02 |OV1_PPC_2_03 |OV1_PPC_2_04 |OV1_PPC_2_05 |OV1_PPC_2_06 |OV1_PPC_2_07 , +OV1_PPC_3_00 ,/* option vector 2: Open Firmware options supported */ VECTOR_LENGTH(33), /* length */
@@ -719,7 +722,7 @@ unsigned char ibm_architecture_vec[] = {* must match by the macro below. Update the definition if * the structure layout changes. */ -#define IBM_ARCH_VEC_NRCORES_OFFSET 133 +#define IBM_ARCH_VEC_NRCORES_OFFSET 150W (NR_CPUS ),/* number of cores supported */ 0 , 0,
Signature · 1 line
2.5.5
Michael Ellerman
reviewerQuoted 1 line
Subject: [PATCH][V2] Add support for power9 in
ibm_architecture_vec
Can you use "[PATCH v2]", my scripts don't grok your format.
Quoted 5 lines · Balbir Singh
Quoted 2 lines · Balbir Singh
Yes, my bad.. I'll respin. I thought I had it, but I clearly did not
Please don't send patches in replies like this, I have to manually clean the above up before committing.
Quoted 1 line
V2: Update the vector length for OV1 after adding 3.0 support
This should go below the "---" line so that it's stripped from the history.
Quoted 2 lines
The PVR list has been updated and
IBM_ARCH_VEC_NRCORES_OFFSET. This provides the cpu version supported to the hypervisor
Can you give me more explanation of the practical effects of the patch. eg. This allows guests kernels to signal to the hypervisor that they support ISA 3.0 features.
cheers
Quoted 6 lines · Michael Ellerman
Quoted 1 line
Subject: [PATCH][V2] Add support for power9 in
ibm_architecture_vecCan you use "[PATCH v2]", my scripts don't grok your format.
Quoted 1 line · Balbir Singh
Quoted 7 lines
Quoted 4 lines · Balbir Singh
Quoted 3 lines
Yes, my bad.. I'll respin. I thought I had it, but I clearly did not
Please don't send patches in replies like this, I have to manually clean the above up before committing.
Yep.. I started this recently just to keep the thread rolling, but point noted. Thanks!
Quoted 5 lines
Quoted 2 lines
V2: Update the vector length for OV1 after adding 3.0 support
This should go below the "---" line so that it's stripped from the history.
Done!
Quoted 7 lines
Quoted 2 lines
The PVR list has been updated and
IBM_ARCH_VEC_NRCORES_OFFSET. This provides the cpu version supported to the hypervisorCan you give me more explanation of the practical effects of the patch. eg. This allows guests kernels to signal to the hypervisor that they support ISA 3.0 features.
Will do