From patchwork Tue Jun 23 06:33:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 1314930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (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 49rc0x5HDqz9sSF for ; Tue, 23 Jun 2020 16:33:21 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=popple.id.au header.i=@popple.id.au header.a=rsa-sha256 header.s=202006 header.b=yQ3cLlqb; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49rc0x037WzDq6k for ; Tue, 23 Jun 2020 16:33:21 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49rc0p38RYzDqNC for ; Tue, 23 Jun 2020 16:33:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=popple.id.au header.i=@popple.id.au header.a=rsa-sha256 header.s=202006 header.b=yQ3cLlqb; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49rc0n4vttz9s6w; Tue, 23 Jun 2020 16:33:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=popple.id.au; s=202006; t=1592893993; bh=nhQ8U3gwiZkpDjR7IziNHyusXrnD+2K4K2QyoHy5oI8=; h=From:To:Cc:Subject:Date:From; b=yQ3cLlqbo6pF3TT3f/o3BbGG/Zqw69qvaTjWiA2h0zyJBAml2TNQL8zv8ONMs1tCJ Q4gmpvqIUGkNi5/KDaGSc3/1RLoLwpFZEGMRmSH3IGgaPitMtgEAREJ21dAVjov1y5 yc/qUCQ5JKxx2mO5h7HFj1+qB/k8P9smpNWVC11jGyFFkGZJUt0yEgpNG8X+zW5sou G3APi74QsHrs/+EFaqVWJJY+Lsh7s3VvtXZQeH/F/et+DkjT0LEI9In6mBuJ+VdxjC 9kwkdKRpyIHMAxdw4Hpb/ny7oVDfkTZbAFwIM5e4gJsFd/EDIZj86zFi1Z6N0z4Kye +6FLWzKOlE+7g== From: Alistair Popple To: pdbg@lists.ozlabs.org Date: Tue, 23 Jun 2020 16:33:06 +1000 Message-Id: <20200623063306.16876-1-alistair@popple.id.au> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH] pdbg: Fix the scommable definition to work for any target attached to a pib 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: , Cc: amitay@ozlabs.org Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Alistair Popple --- src/scom.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/scom.c b/src/scom.c index 277f05c..1647b13 100644 --- a/src/scom.c +++ b/src/scom.c @@ -29,15 +29,8 @@ /* Check if a target has scom region */ static bool scommable(struct pdbg_target *target) { - const char *classname; - - classname = pdbg_target_class_name(target); - if (!strcmp(classname, "pib") || - !strcmp(classname, "core") || - !strcmp(classname, "thread")) - return true; - - return false; + return !strcmp(pdbg_target_class_name(target), "pib") || + !!pdbg_target_parent("pib", target); } int getscom(uint64_t addr)