From patchwork Fri Oct 9 03:59:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1378978 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C6vW52JGJz9sTc for ; Fri, 9 Oct 2020 15:00:49 +1100 (AEDT) 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=X/CVM2Tq; 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 4C6vW46rhgzDqLg for ; Fri, 9 Oct 2020 15:00:48 +1100 (AEDT) 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 4C6vVM6zFNzDqWG for ; Fri, 9 Oct 2020 15:00:11 +1100 (AEDT) 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=X/CVM2Tq; 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 4C6vVL2jgwz9sTc; Fri, 9 Oct 2020 15:00:10 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1602216010; bh=f+BZW9yxN0kejl4lQkjAvkcXpYbXMsndHYa7abIb3VQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X/CVM2TqdS+g0Pfdscb8Dbbnh3rUDFYfk7BM5RbpotJ378unXEw99YW6hB/c1StXy rXVQVlMkyt9SzgyEwr5SDFnTjKn8Hs+1Go9tu0BTBoPbPZ/a4bIAdB2gkG0ZYApmh4 AHNM6Ey2z+4NtiZ/0MP5/c9j+rbBQsVFhlRtgqoERRylDz0IHEhyKosHE6muFJjG10 fZdfNxm2anApz0udaK+9a2g0wrdAc5+DhSg08jO3ZYr0LpLKg9yhafwYs6S8AEnYkr tfJo6z5ThOCBc4VuWKyCM/2hfzXZUUpjtMAfoaeICP5v96wl7U/a7DaLcYz3izelLL k6P34kH86WDsQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 9 Oct 2020 14:59:58 +1100 Message-Id: <20201009040001.310868-6-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201009040001.310868-1-amitay@ozlabs.org> References: <20201009040001.310868-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 5/8] libpdbg: Expose p9_thread_state method 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" This will be used by sbefifo thread to update thread status. Signed-off-by: Amitay Isaacs Reviewed-by: Joel Stanley --- libpdbg/chip.h | 2 ++ libpdbg/p9chip.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libpdbg/chip.h b/libpdbg/chip.h index 6856c64..11e8e8b 100644 --- a/libpdbg/chip.h +++ b/libpdbg/chip.h @@ -43,4 +43,6 @@ int ram_putmsr(struct thread *thread, uint64_t value); int ram_getcr(struct thread *thread, uint32_t *value); int ram_putcr(struct thread *thread, uint32_t value); +struct thread_state p9_thread_state(struct thread *thread); + #endif diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 05cce7f..d8187ce 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -90,7 +90,7 @@ static uint64_t thread_write(struct thread *thread, uint64_t addr, uint64_t data return pib_write(chip, addr, data); } -static struct thread_state p9_thread_state(struct thread *thread) +struct thread_state p9_thread_state(struct thread *thread) { uint64_t value; struct thread_state thread_state;