From patchwork Mon May 11 07:57:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mahesh J Salgaonkar X-Patchwork-Id: 1287537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49LD5t3Cl7z9sSF for ; Mon, 11 May 2020 18:06:10 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49LD5t1NfszDqYP for ; Mon, 11 May 2020 18:06:10 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=mahesh@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49LCwQ1mqDzDqWS for ; Mon, 11 May 2020 17:57:54 +1000 (AEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04B7328e071876 for ; Mon, 11 May 2020 03:57:51 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ws5dkhb5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 May 2020 03:57:50 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 04B7oW5J000474 for ; Mon, 11 May 2020 07:57:49 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 30wm55kwkp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 May 2020 07:57:48 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 04B7vkBE59637832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 11 May 2020 07:57:46 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 98C5442049 for ; Mon, 11 May 2020 07:57:46 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33A7642041 for ; Mon, 11 May 2020 07:57:46 +0000 (GMT) Received: from [192.168.0.24] (unknown [9.199.58.67]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Mon, 11 May 2020 07:57:45 +0000 (GMT) From: Mahesh Salgaonkar To: pdbg Date: Mon, 11 May 2020 13:27:45 +0530 Message-ID: <158918386448.9312.3322456335675173855.stgit@jupiter> User-Agent: StGit/unknown-version MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-11_02:2020-05-08, 2020-05-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=941 lowpriorityscore=0 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005110057 X-Mailman-Approved-At: Mon, 11 May 2020 18:06:07 +1000 Subject: [Pdbg] [PATCH] pdbg: Fix the core numbering. X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" The core number in the path string for all the targets is always shown as "core0". This creates a confusion whether the scom read/write has selected correct core target or not. This patch fixes the core numbering. Also remove leading 0s in the numbering to keep m4 happy. Without this patch: root@witherspoon-Y111UF7CB09T:/tmp# ./pdbg -p0 -c2 getscom 0x20010A40 p0: 0x0000000020010a40 failed (/proc0/pib) p0: 0x0000000022010a40 = 0x0000000000000000 (/proc0/pib/chiplet@10000000/eq@0/ex@1/chiplet@22000000/core@0) After the patch: root@witherspoon-Y111UF7CB09T:/tmp# ./pdbg -p0 -c2 getscom 0x20010A40 p0: 0x0000000020010a40 failed (/proc0/pib) p0: 0x0000000022010a40 = 0x0000000000000000 (/proc0/pib/chiplet@10000000/eq@0/ex@1/chiplet@22000000/core@2) Signed-off-by: Mahesh Salgaonkar --- p9.dts.m4 | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/p9.dts.m4 b/p9.dts.m4 index 6cdfba4..bf1b9d7 100644 --- a/p9.dts.m4 +++ b/p9.dts.m4 @@ -18,7 +18,7 @@ dnl CORE([index]) dnl define(`CORE', ` - core@0 { + core@$1 { #address-cells = <0x01>; #size-cells = <0x00>; reg = <0x00 0x00 0xfffff>; @@ -376,21 +376,21 @@ define(`CHIP', EQ_(0) EX_(0,0) CHIPLET_(20) - CORE(00) + CORE(0) }; CHIPLET_(21) - CORE(01) + CORE(1) }; }; EX_(0,1) CHIPLET_(22) - CORE(02) + CORE(2) }; CHIPLET_(23) - CORE(03) + CORE(3) }; }; }; @@ -400,21 +400,21 @@ define(`CHIP', EQ_(1) EX_(1,0) CHIPLET_(24) - CORE(04) + CORE(4) }; CHIPLET_(25) - CORE(05) + CORE(5) }; }; EX_(1,1) CHIPLET_(26) - CORE(06) + CORE(6) }; CHIPLET_(27) - CORE(07) + CORE(7) }; }; }; @@ -424,21 +424,21 @@ define(`CHIP', EQ_(2) EX_(2,0) CHIPLET_(28) - CORE(08) + CORE(8) }; CHIPLET_(29) - CORE(09) + CORE(9) }; }; EX_(2,1) CHIPLET_(2a) - CORE(0a) + CORE(a) }; CHIPLET_(2b) - CORE(0b) + CORE(b) }; }; }; @@ -448,21 +448,21 @@ define(`CHIP', EQ_(3) EX_(3,0) CHIPLET_(2c) - CORE(0c) + CORE(c) }; CHIPLET_(2d) - CORE(0d) + CORE(d) }; }; EX_(3,1) CHIPLET_(2e) - CORE(0e) + CORE(e) }; CHIPLET_(2f) - CORE(0f) + CORE(f) }; }; };