From patchwork Fri Oct 9 03:59:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1378974 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 4C6vVc2zL8z9sTc for ; Fri, 9 Oct 2020 15:00:24 +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=wMLrdDuf; 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 4C6vVb6988zDqW7 for ; Fri, 9 Oct 2020 15:00:23 +1100 (AEDT) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4C6vVJ4fTGzDqYV for ; Fri, 9 Oct 2020 15:00:08 +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=wMLrdDuf; 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 4C6vVJ1kBtz9sTR; Fri, 9 Oct 2020 15:00:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1602216008; bh=8ylLPbrojeucV+rewl3vS/OFWU7C/7idqm5/EmVT6JM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wMLrdDuf5+dDk2eHaN9RzBCQuf/a4fsOWRgqDOCqxN/M4koqYp7m2HBsSDU2GFksy Wm3D1Y2Q2GNBz5J/GqMAHJFAFqYhFkL2FC2ubpmMmQt1onir/drW5xEiYgFD8W36Gs bvGYdHz6wbTs3sPSkqKGzHTmG8PGPE6F+ZUs6301mynxmbP269awvzqZ3rvYM15RDS QGEFuCLP8kgpnensMwPFNpsuYxR/xBSy5Y9K6yUzKxO6xMX9wjpS+CuJDGAIVmkEkT QuaoxZsqw6ThV37+phHhzfqrJBa6/vwh056Sa7VYfpN1kv9jgu1LF3mFy8is4hpp7e hyFi7lTXY60Hw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 9 Oct 2020 14:59:54 +1100 Message-Id: <20201009040001.310868-2-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 1/8] libpdbg: Rename get_thread_status to p8_thread_state 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 Reviewed-by: Joel Stanley --- libpdbg/p8chip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 4179557..d7664b8 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -172,7 +172,7 @@ static void deassert_special_wakeup(struct core *chip) pib_write(&chip->target, PMSPCWKUPFSP_REG, 0); } -static struct thread_state get_thread_status(struct thread *thread) +static struct thread_state p8_thread_state(struct thread *thread) { uint64_t val, mode_reg; struct thread_state thread_status; @@ -302,7 +302,7 @@ static int p8_thread_stop(struct thread *thread) } while (!(val & RAS_STATUS_INST_COMPLETE) && !(val & RAS_STATUS_TS_QUIESCE)); - thread->status = get_thread_status(thread); + thread->status = p8_thread_state(thread); return 0; } @@ -312,7 +312,7 @@ static int p8_thread_start(struct thread *thread) /* Activate thread */ CHECK_ERR(pib_write(&thread->target, DIRECT_CONTROLS_REG, DIRECT_CONTROL_SP_START)); - thread->status = get_thread_status(thread); + thread->status = p8_thread_state(thread); return 0; } @@ -462,7 +462,7 @@ static int p8_ram_destroy(struct thread *thread) pdbg_target_require_parent("core", &thread->target)); uint64_t val, ram_mode; - if (!(get_thread_status(thread).active)) { + if (!(p8_thread_state(thread).active)) { /* Mark the RAM thread active so GPRs stick */ CHECK_ERR(pib_read(&chip->target, THREAD_ACTIVE_REG, &val)); val |= PPC_BIT(8) >> thread->id; @@ -559,7 +559,7 @@ static int p8_thread_sreset(struct thread *thread) if (!(thread->status.active)) { CHECK_ERR(pib_write(&thread->target, DIRECT_CONTROLS_REG, DIRECT_CONTROL_SP_SRESET)); - thread->status = get_thread_status(thread); + thread->status = p8_thread_state(thread); return 0; } @@ -590,7 +590,7 @@ static int p8_thread_probe(struct pdbg_target *target) struct thread *thread = target_to_thread(target); thread->id = (pdbg_target_address(target, NULL) >> 4) & 0xf; - thread->status = get_thread_status(thread); + thread->status = p8_thread_state(thread); return 0; }