diff mbox series

Match core numbers to actual hardware on P8

Message ID 20180531020658.18869-1-mikey@neuling.org
State Accepted
Headers show
Series Match core numbers to actual hardware on P8 | expand

Commit Message

Michael Neuling May 31, 2018, 2:06 a.m. UTC
This fixes the output of probe and threadstatus commands so that the
core numbers match the hardware numbers.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 p8-pib.dts.m4 | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Comments

Alistair Popple June 1, 2018, 3:54 a.m. UTC | #1
Thanks Mikey.

If we're running on the host we should be able to map these back to actual Linux
CPU numbers as well. I've added a github feature to track this -
https://github.com/open-power/pdbg/issues/36

- Alistair

On Thursday, 31 May 2018 12:06:58 PM AEST Michael Neuling wrote:
> This fixes the output of probe and threadstatus commands so that the
> core numbers match the hardware numbers.
> 
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
>  p8-pib.dts.m4 | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/p8-pib.dts.m4 b/p8-pib.dts.m4
> index bdc02c5bcc..e5c34041ad 100644
> --- a/p8-pib.dts.m4
> +++ b/p8-pib.dts.m4
> @@ -6,7 +6,7 @@ define(`CORE', `core@CORE_BASE($1) {
>  	#size-cells = <0x1>;
>  	compatible = "ibm,power8-core";
>  	reg = <0x0 HEX(CORE_BASE($1)) 0xfffff>;
> -	index = <0x$2>;
> +	index = <HEX(eval($2, 16))>;
>  	chtm@11000 {
>  		compatible = "ibm,power8-chtm";
>  		reg = <0x0 0x11000 0xB>;
> @@ -29,18 +29,18 @@ define(`THREAD',`thread@THREAD_BASE($1) {
>  	index = <HEX(eval($1, 16))>;
>  	}')dnl
>  dnl
> -define(`PROC_CORES', `CORE(1, 0);
> -CORE(2, 1);
> -CORE(3, 2);
> -CORE(4, 3);
> -CORE(5, 4);
> -CORE(6, 5);
> -CORE(9, 6);
> -CORE(10, 7);
> -CORE(11, 8);
> -CORE(12, 9);
> -CORE(13, 10);
> -CORE(14, 11)')dnl
> +define(`PROC_CORES', `CORE(1, 1);
> +CORE(2, 2);
> +CORE(3, 3);
> +CORE(4, 4);
> +CORE(5, 5);
> +CORE(6, 6);
> +CORE(9, 9);
> +CORE(10, 10);
> +CORE(11, 11);
> +CORE(12, 12);
> +CORE(13, 13);
> +CORE(14, 14)')dnl
>  
>  adu@2020000 {
>  	compatible = "ibm,power8-adu";
>
diff mbox series

Patch

diff --git a/p8-pib.dts.m4 b/p8-pib.dts.m4
index bdc02c5bcc..e5c34041ad 100644
--- a/p8-pib.dts.m4
+++ b/p8-pib.dts.m4
@@ -6,7 +6,7 @@  define(`CORE', `core@CORE_BASE($1) {
 	#size-cells = <0x1>;
 	compatible = "ibm,power8-core";
 	reg = <0x0 HEX(CORE_BASE($1)) 0xfffff>;
-	index = <0x$2>;
+	index = <HEX(eval($2, 16))>;
 	chtm@11000 {
 		compatible = "ibm,power8-chtm";
 		reg = <0x0 0x11000 0xB>;
@@ -29,18 +29,18 @@  define(`THREAD',`thread@THREAD_BASE($1) {
 	index = <HEX(eval($1, 16))>;
 	}')dnl
 dnl
-define(`PROC_CORES', `CORE(1, 0);
-CORE(2, 1);
-CORE(3, 2);
-CORE(4, 3);
-CORE(5, 4);
-CORE(6, 5);
-CORE(9, 6);
-CORE(10, 7);
-CORE(11, 8);
-CORE(12, 9);
-CORE(13, 10);
-CORE(14, 11)')dnl
+define(`PROC_CORES', `CORE(1, 1);
+CORE(2, 2);
+CORE(3, 3);
+CORE(4, 4);
+CORE(5, 5);
+CORE(6, 6);
+CORE(9, 9);
+CORE(10, 10);
+CORE(11, 11);
+CORE(12, 12);
+CORE(13, 13);
+CORE(14, 14)')dnl
 
 adu@2020000 {
 	compatible = "ibm,power8-adu";