From patchwork Fri Jan 26 09:20:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 866577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zSqv54smgz9sNr for ; Sat, 27 Jan 2018 07:17:04 +1100 (AEDT) Received: from localhost ([::1]:50682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efAQo-0000bS-67 for incoming@patchwork.ozlabs.org; Fri, 26 Jan 2018 15:17:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efAQJ-0000aM-Jb for qemu-devel@nongnu.org; Fri, 26 Jan 2018 15:16:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efAQF-00006z-6X for qemu-devel@nongnu.org; Fri, 26 Jan 2018 15:16:31 -0500 Received: from chuckie.co.uk ([82.165.15.123]:59492 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1efAQE-000057-Ug for qemu-devel@nongnu.org; Fri, 26 Jan 2018 15:16:27 -0500 Received: from host86-175-243-217.range86-175.btcentralplus.com ([86.175.243.217] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ef0Bn-0005Wk-2G; Fri, 26 Jan 2018 09:20:52 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, david@gibson.dropbear.id.au Date: Fri, 26 Jan 2018 09:20:27 +0000 Message-Id: <20180126092029.20737-2-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180126092029.20737-1-mark.cave-ayland@ilande.co.uk> References: <20180126092029.20737-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.175.243.217 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Mark Cave-Ayland --- hw/pci-host/grackle.c | 13 ++----------- hw/pci-host/trace-events | 3 +++ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index 3caf1ccb37..033588b7d2 100644 --- a/hw/pci-host/grackle.c +++ b/hw/pci-host/grackle.c @@ -27,16 +27,7 @@ #include "hw/pci/pci_host.h" #include "hw/ppc/mac.h" #include "hw/pci/pci.h" - -/* debug Grackle */ -//#define DEBUG_GRACKLE - -#ifdef DEBUG_GRACKLE -#define GRACKLE_DPRINTF(fmt, ...) \ - do { printf("GRACKLE: " fmt , ## __VA_ARGS__); } while (0) -#else -#define GRACKLE_DPRINTF(fmt, ...) -#endif +#include "trace.h" #define GRACKLE_PCI_HOST_BRIDGE(obj) \ OBJECT_CHECK(GrackleState, (obj), TYPE_GRACKLE_PCI_HOST_BRIDGE) @@ -58,7 +49,7 @@ static void pci_grackle_set_irq(void *opaque, int irq_num, int level) { qemu_irq *pic = opaque; - GRACKLE_DPRINTF("set_irq num %d level %d\n", irq_num, level); + trace_grackle_set_irq(irq_num, level); qemu_set_irq(pic[irq_num + 0x15], level); } diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events index 32dfc84692..5b8fcc228b 100644 --- a/hw/pci-host/trace-events +++ b/hw/pci-host/trace-events @@ -1,5 +1,8 @@ # See docs/devel/tracing.txt for syntax documentation. +# hw/pci-host/grackle.c +grackle_set_irq(int irq_num, int level) "set_irq num %d level %d" + # hw/pci-host/sabre.c sabre_set_request(int irq_num) "request irq %d" sabre_clear_request(int irq_num) "clear request irq %d" From patchwork Fri Jan 26 09:20:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 866491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zSlMm4RHnz9s7s for ; Sat, 27 Jan 2018 03:53:08 +1100 (AEDT) Received: from localhost ([::1]:38059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef7FS-00010H-Kp for incoming@patchwork.ozlabs.org; Fri, 26 Jan 2018 11:53:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef794-0004rv-BJ for qemu-devel@nongnu.org; Fri, 26 Jan 2018 11:46:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef790-0001Tq-ER for qemu-devel@nongnu.org; Fri, 26 Jan 2018 11:46:30 -0500 Received: from chuckie.co.uk ([82.165.15.123]:59220 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ef790-0001SX-8H for qemu-devel@nongnu.org; Fri, 26 Jan 2018 11:46:26 -0500 Received: from host86-175-243-217.range86-175.btcentralplus.com ([86.175.243.217] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ef0Bo-0005Wk-CA; Fri, 26 Jan 2018 09:20:53 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, david@gibson.dropbear.id.au Date: Fri, 26 Jan 2018 09:20:28 +0000 Message-Id: <20180126092029.20737-3-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180126092029.20737-1-mark.cave-ayland@ilande.co.uk> References: <20180126092029.20737-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.175.243.217 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 2/3] uninorth: convert to trace-events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Mark Cave-Ayland --- hw/pci-host/trace-events | 6 ++++++ hw/pci-host/uninorth.c | 24 +++++------------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events index 5b8fcc228b..341a87a702 100644 --- a/hw/pci-host/trace-events +++ b/hw/pci-host/trace-events @@ -12,3 +12,9 @@ sabre_pci_config_write(uint64_t addr, uint64_t val) "addr 0x%"PRIx64" val 0x%"PR sabre_pci_config_read(uint64_t addr, uint64_t val) "addr 0x%"PRIx64" val 0x%"PRIx64 sabre_pci_set_irq(int irq_num, int level) "set irq_in %d level %d" sabre_pci_set_obio_irq(int irq_num, int level) "set irq %d level %d" + +# hw/pci-host/uninorth.c +unin_set_irq(int irq_num, int level) "setting INT %d = %d" +unin_get_config_reg(uint32_t reg, uint32_t addr, uint32_t retval) "converted config space accessor 0x%"PRIx32 "/0x%"PRIx32 " -> 0x%"PRIx32 +unin_data_write(uint64_t addr, unsigned len, uint64_t val) "write addr 0x%"PRIx64 " len %d val 0x%"PRIx64 +unin_data_read(uint64_t addr, unsigned len, uint64_t val) "read addr 0x%"PRIx64 " len %d val 0x%"PRIx64 diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index 5d8ccaa711..66991da975 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -26,16 +26,7 @@ #include "hw/ppc/mac.h" #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" - -/* debug UniNorth */ -//#define DEBUG_UNIN - -#ifdef DEBUG_UNIN -#define UNIN_DPRINTF(fmt, ...) \ - do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0) -#else -#define UNIN_DPRINTF(fmt, ...) -#endif +#include "trace.h" static const int unin_irq_line[] = { 0x1b, 0x1c, 0x1d, 0x1e }; @@ -69,8 +60,7 @@ static void pci_unin_set_irq(void *opaque, int irq_num, int level) { qemu_irq *pic = opaque; - UNIN_DPRINTF("%s: setting INT %d = %d\n", __func__, - unin_irq_line[irq_num], level); + trace_unin_set_irq(unin_irq_line[irq_num], level); qemu_set_irq(pic[unin_irq_line[irq_num]], level); } @@ -103,9 +93,7 @@ static uint32_t unin_get_config_reg(uint32_t reg, uint32_t addr) retval |= func << 8; } - - UNIN_DPRINTF("Converted config space accessor %08x/%08x -> %08x\n", - reg, addr, retval); + trace_unin_get_config_reg(reg, addr, retval); return retval; } @@ -115,8 +103,7 @@ static void unin_data_write(void *opaque, hwaddr addr, { UNINState *s = opaque; PCIHostState *phb = PCI_HOST_BRIDGE(s); - UNIN_DPRINTF("write addr " TARGET_FMT_plx " len %d val %"PRIx64"\n", - addr, len, val); + trace_unin_data_write(addr, len, val); pci_data_write(phb->bus, unin_get_config_reg(phb->config_reg, addr), val, len); @@ -132,8 +119,7 @@ static uint64_t unin_data_read(void *opaque, hwaddr addr, val = pci_data_read(phb->bus, unin_get_config_reg(phb->config_reg, addr), len); - UNIN_DPRINTF("read addr " TARGET_FMT_plx " len %d val %x\n", - addr, len, val); + trace_unin_data_read(addr, len, val); return val; } From patchwork Fri Jan 26 09:20:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 866218 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zSYLJ5tkyz9s0g for ; Fri, 26 Jan 2018 20:21:11 +1100 (AEDT) Received: from localhost ([::1]:42896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef0C4-0000QT-W2 for incoming@patchwork.ozlabs.org; Fri, 26 Jan 2018 04:21:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef0Bi-0000Ow-8f for qemu-devel@nongnu.org; Fri, 26 Jan 2018 04:20:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef0Bf-0004Yd-4q for qemu-devel@nongnu.org; Fri, 26 Jan 2018 04:20:46 -0500 Received: from chuckie.co.uk ([82.165.15.123]:58601 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ef0Be-0004YN-V9 for qemu-devel@nongnu.org; Fri, 26 Jan 2018 04:20:43 -0500 Received: from host86-175-243-217.range86-175.btcentralplus.com ([86.175.243.217] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ef0Bp-0005Wk-LX; Fri, 26 Jan 2018 09:20:54 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, david@gibson.dropbear.id.au Date: Fri, 26 Jan 2018 09:20:29 +0000 Message-Id: <20180126092029.20737-4-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180126092029.20737-1-mark.cave-ayland@ilande.co.uk> References: <20180126092029.20737-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.175.243.217 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This was accidentally omitted from 77cb0f5aaf "Split adb.c into adb.c, adb-mouse.c and adb-kbd.c". Signed-off-by: Mark Cave-Ayland --- hw/input/trace-events | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/input/trace-events b/hw/input/trace-events index a8d46cb766..5affabc81d 100644 --- a/hw/input/trace-events +++ b/hw/input/trace-events @@ -4,6 +4,7 @@ adb_kbd_no_key(void) "Ignoring NO_KEY" adb_kbd_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x" adb_kbd_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x" + # hw/input/adb-mouse.c adb_mouse_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x" adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"