From nobody Mon Feb 9 20:34:51 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; 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530295084299826.2333447092079; Fri, 29 Jun 2018 10:58:04 -0700 (PDT) Received: from localhost ([::1]:43841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYxel-0003ZO-Gi for importer@patchew.org; Fri, 29 Jun 2018 13:58:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYxaj-0000LP-P4 for qemu-devel@nongnu.org; Fri, 29 Jun 2018 13:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYxai-0000B2-Ta for qemu-devel@nongnu.org; Fri, 29 Jun 2018 13:53:53 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40278 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYxai-0000Ar-OP for qemu-devel@nongnu.org; Fri, 29 Jun 2018 13:53:52 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F7C340796BA; Fri, 29 Jun 2018 17:53:52 +0000 (UTC) Received: from localhost (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 706FE1101E87; Fri, 29 Jun 2018 17:53:49 +0000 (UTC) From: Stefan Hajnoczi To: Date: Fri, 29 Jun 2018 18:53:28 +0100 Message-Id: <20180629175330.19391-10-stefanha@redhat.com> In-Reply-To: <20180629175330.19391-1-stefanha@redhat.com> References: <20180629175330.19391-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 29 Jun 2018 17:53:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 29 Jun 2018 17:53:52 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'stefanha@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 09/11] hw/net/etraxfs_eth: Convert printf() calls 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: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Crosthwaite , Juan Quintela , Michael Roth , Markus Armbruster , Stefan Hajnoczi , Paolo Bonzini , "Dr. David Alan Gilbert" , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Suggested-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Stefan Hajnoczi --- hw/net/etraxfs_eth.c | 8 ++++---- hw/net/trace-events | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/net/etraxfs_eth.c b/hw/net/etraxfs_eth.c index 013c8d0a41..a6932432b1 100644 --- a/hw/net/etraxfs_eth.c +++ b/hw/net/etraxfs_eth.c @@ -27,6 +27,7 @@ #include "net/net.h" #include "hw/cris/etraxfs.h" #include "qemu/error-report.h" +#include "trace.h" =20 #define D(x) =20 @@ -106,7 +107,7 @@ static unsigned int tdk_read(struct qemu_phy *phy, unsi= gned int req) r =3D phy->regs[regnum]; break; } - D(printf("\n%s %x =3D reg[%d]\n", __func__, r, regnum)); + trace_mdio_phy_read(regnum, r); return r; } =20 @@ -116,7 +117,7 @@ tdk_write(struct qemu_phy *phy, unsigned int req, unsig= ned int data) int regnum; =20 regnum =3D req & 0x1f; - D(printf("%s reg[%d] =3D %x\n", __func__, regnum, data)); + trace_mdio_phy_write(regnum, data); switch (regnum) { default: phy->regs[regnum] =3D data; @@ -206,8 +207,7 @@ static void mdio_cycle(struct qemu_mdio *bus) { bus->cnt++; =20 - D(printf("mdc=3D%d mdio=3D%d state=3D%d cnt=3D%d drv=3D%d\n", - bus->mdc, bus->mdio, bus->state, bus->cnt, bus->drive)); + trace_mdio_bitbang(bus->mdc, bus->mdio, bus->state, bus->cnt, bus->dri= ve); #if 0 if (bus->mdc) { printf("%d", bus->mdio); diff --git a/hw/net/trace-events b/hw/net/trace-events index f57010df37..663bea1b74 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -1,5 +1,10 @@ # See docs/devel/tracing.txt for syntax documentation. =20 +# hw/net/etraxfs_eth.c +mdio_phy_read(int regnum, uint16_t value) "read phy_reg:%d value:0x%04x" +mdio_phy_write(int regnum, uint16_t value) "write phy_reg:%d value:0x%04x" +mdio_bitbang(bool mdc, bool mdio, int state, uint16_t cnt, unsigned int dr= ive) "bitbang mdc=3D%u mdio=3D%u state=3D%d cnt=3D%u drv=3D%d" + # hw/net/lance.c lance_mem_readw(uint64_t addr, uint32_t ret) "addr=3D0x%"PRIx64"val=3D0x%0= 4x" lance_mem_writew(uint64_t addr, uint32_t val) "addr=3D0x%"PRIx64"val=3D0x%= 04x" --=20 2.17.1