From nobody Tue Feb 10 10:19:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517196962559582.7462330034526; Sun, 28 Jan 2018 19:36:02 -0800 (PST) Received: from localhost ([::1]:60834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eg0Ef-0001fJ-T8 for importer@patchew.org; Sun, 28 Jan 2018 22:35:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eg07Y-0004Sf-UO for qemu-devel@nongnu.org; Sun, 28 Jan 2018 22:28:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eg07X-0001cy-Pb for qemu-devel@nongnu.org; Sun, 28 Jan 2018 22:28:36 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:60127) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eg07X-0001by-Dt; Sun, 28 Jan 2018 22:28:35 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zVFMz2CyJz9t2c; Mon, 29 Jan 2018 14:28:29 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1517196511; bh=f2yTsa75CxKfW4BKS6qkTzRj8VsG3ldIlSGA4npSPQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CtTpqiyeqxQjnoGsnTONPPAKSJg+8cD6kc7t5Dsn2yfJi4SxdQRjB4hpKUAQzhdFy RVtUGUIZ7WMGn+N8OHcwHtzTZ6Ef2+5Ym8Iy8GLhYXnABnOv5tu1fTFXRDEc+/djnB rPdjSLDIbS98ClV8Ib8HMdEZXli6yaS5hgTpTbYw= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 29 Jan 2018 14:28:18 +1100 Message-Id: <20180129032826.16876-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180129032826.16876-1-david@gibson.dropbear.id.au> References: <20180129032826.16876-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 04/12] 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: , Cc: lvivier@redhat.com, surajjs@au1.ibm.com, Mark Cave-Ayland , groug@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- 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 0= x%"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 =3D %d" +unin_get_config_reg(uint32_t reg, uint32_t addr, uint32_t retval) "convert= ed 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%"P= RIx64 " 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" =20 static const int unin_irq_line[] =3D { 0x1b, 0x1c, 0x1d, 0x1e }; =20 @@ -69,8 +60,7 @@ static void pci_unin_set_irq(void *opaque, int irq_num, i= nt level) { qemu_irq *pic =3D opaque; =20 - UNIN_DPRINTF("%s: setting INT %d =3D %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); } =20 @@ -103,9 +93,7 @@ static uint32_t unin_get_config_reg(uint32_t reg, uint32= _t addr) retval |=3D func << 8; } =20 - - UNIN_DPRINTF("Converted config space accessor %08x/%08x -> %08x\n", - reg, addr, retval); + trace_unin_get_config_reg(reg, addr, retval); =20 return retval; } @@ -115,8 +103,7 @@ static void unin_data_write(void *opaque, hwaddr addr, { UNINState *s =3D opaque; PCIHostState *phb =3D 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 add= r, val =3D 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; } =20 --=20 2.14.3