From patchwork Thu Jul 23 05:26:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1334413 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 4BC16f1GLcz9sRW for ; Thu, 23 Jul 2020 15:27:06 +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=DHpCvhUL; 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 4BC16d58jczDr7k for ; Thu, 23 Jul 2020 15:27:05 +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) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BC16Q5YTJzDr7M for ; Thu, 23 Jul 2020 15:26:54 +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=DHpCvhUL; 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 4BC16Q29vzz9sRR; Thu, 23 Jul 2020 15:26:54 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1595482014; bh=3VreQUFFTPR5E8u0+bUU1SU5yQ0dQmLQe2LZSeGgJbk=; h=From:To:Cc:Subject:Date:From; b=DHpCvhULSHYcHXMcJalN5zyC2C9TYzmpqpv5RzufkQWkoDVYpe71eCzu/YkIHzuM2 JtSX5CDMTcZI6qyf59DB8ryAQnCEB71Li0FZ6iEpiKCf+jiOD5CMFwIussQs9bLrBm +CxJB7RdFIujOIyiWcV+yJF16LqSrFUziNV+KPhgPTxnTcbp/gpmQkcbx4a21lfhLW dxvTL25JGKwPEukVTo4+v854hILqA+BoORyj5tX6GALAZi5y8U93ANIh29YCA/EdQD 0xMzO+DzmEAtUPP7ef/QmiBJy8JXMcIQeqcqaT4kNH/uLabh4ygSMhN98r/p4GgPHP CALXCGj6kYA8Q== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 23 Jul 2020 15:26:37 +1000 Message-Id: <20200723052641.561009-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Pdbg] [PATCH 0/4] Improve getspr/putspr command 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" Currently getspr/putspr command does not support all SPRs by id. There are few SPRs (e.g. NIA, CR, etc.) which have special -ve number assigned to them for getspr/putspr interface. Instead allow getspr/putspr commands to use names of the SPRs and support get/set for all SPRs. This also adds libpdbg apis to translate between SPR names and ids. Amitay Isaacs (4): libpdbg: Use spr specific procedures if defined libpdbg: Add apis to convert between spr name and id main: Drop special commands for getting/setting few sprs main: Change (get|put)spr command to use spr names Makefile.am | 1 + libpdbg/libpdbg.h | 18 +++++ libpdbg/sprs.c | 200 ++++++++++++++++++++++++++++++++++++++++++++++ libpdbg/thread.c | 37 +++++++++ src/main.c | 12 --- src/parsers.c | 11 ++- src/reg.c | 140 +++++++------------------------- 7 files changed, 288 insertions(+), 131 deletions(-) create mode 100644 libpdbg/sprs.c