From patchwork Thu Jul 2 03:39:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1320965 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49y3lZ1DqMz9sRN for ; Thu, 2 Jul 2020 13:40:42 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=MqnNUJhj; 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 49y3lY5PpKzDqnT for ; Thu, 2 Jul 2020 13:40:41 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49y3kK3jq6zDqlD for ; Thu, 2 Jul 2020 13:39:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=MqnNUJhj; 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 X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49y3kK1YWTz9sQt; Thu, 2 Jul 2020 13:39:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1593661177; bh=6cC9469W+ZKv8VB8IlSiZ5Ky499+WPAJJOHL59bKH6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MqnNUJhj0W18PIKwgSiOuhr3fsYSCHyY7QsGRAbYXEuJIz6paV4Q56Xak2nd2npUW wIJsDpZUvf71kpOJCYDU7hh/U0XbhpjqaoRnTp3wFh/kI6RztspAoWXg1M3l+8Q1+p Ph8vrnWL1OLT2cBuBr7RXttZMYGx255T3UUKxbakNFWFTsrkebij+l7bBXuWIODalr AElNW1x10XcMLgfd7rpdVXCdWgpP5TXFWa07Ygm7lECg85LIt8vdXnnexwJQUjC1CG ETsrr3kQrYOXRnBfSOjrNXDWBPArIaxWZDPf6j/Dam0ay/936gCwnMzCZq52hrn3xH apEWkgwSRno3A== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 2 Jul 2020 13:39:12 +1000 Message-Id: <20200702033918.708013-14-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702033918.708013-1-amitay@ozlabs.org> References: <20200702033918.708013-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 13/19] libpdbg: Use index as thread-id for p9 system 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 Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- libpdbg/p9chip.c | 4 +--- libpdbg/sbefifo.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index a46d053..0a8cae8 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -116,10 +116,8 @@ static struct thread_state p9_get_thread_status(struct thread *thread) static int p9_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); - uint32_t tid; - assert(!pdbg_target_u32_property(target, "tid", &tid)); - thread->id = tid; + thread->id = pdbg_target_index(target); thread->status = p9_get_thread_status(thread); return 0; diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index e9cb63e..898fd1a 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -288,10 +288,8 @@ static int sbefifo_pib_thread_sreset(struct pib *pib) static int sbefifo_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); - uint32_t tid; - assert(!pdbg_target_u32_property(target, "tid", &tid)); - thread->id = tid; + thread->id = pdbg_target_index(target); return 0; }