From patchwork Wed Dec 12 17:30:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EB801759 for ; Wed, 12 Dec 2018 17:39:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C48F429EBF for ; Wed, 12 Dec 2018 17:38:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B48B129F06; Wed, 12 Dec 2018 17:38:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6175B29EBF for ; Wed, 12 Dec 2018 17:38:54 +0000 (UTC) Received: from localhost ([::1]:46419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8TF-00040Y-N0 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:38:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LB-0006yX-IW for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L8-00018n-Vm for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51060) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L8-0000uS-NZ; Wed, 12 Dec 2018 12:30:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1001D307D86D; Wed, 12 Dec 2018 17:30:14 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F73B60C44; Wed, 12 Dec 2018 17:30:12 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:02 +0100 Message-Id: <20181212173007.11407-2-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 12 Dec 2018 17:30:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/6] hw/dma/puv3_dma: Convert from DPRINTF() macro to trace event 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: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- hw/dma/puv3_dma.c | 11 +++++------ hw/dma/trace-events | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/dma/puv3_dma.c b/hw/dma/puv3_dma.c index b97a6c1767..38ebb3f307 100644 --- a/hw/dma/puv3_dma.c +++ b/hw/dma/puv3_dma.c @@ -11,9 +11,8 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sysbus.h" - -#undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" +#include "trace.h" #define PUV3_DMA_CH_NR (6) #define PUV3_DMA_CH_MASK (0xff) @@ -42,9 +41,9 @@ static uint64_t puv3_dma_read(void *opaque, hwaddr offset, ret = s->reg_CFG[PUV3_DMA_CH(offset)]; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_dma_read_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, ret); + trace_puv3_dma_read(offset, ret); return ret; } @@ -61,9 +60,9 @@ static void puv3_dma_write(void *opaque, hwaddr offset, s->reg_CFG[PUV3_DMA_CH(offset)] = value; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_dma_write_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, value); + trace_puv3_dma_write(offset, value); } static const MemoryRegionOps puv3_dma_ops = { diff --git a/hw/dma/trace-events b/hw/dma/trace-events index 22f53d0ff2..56d4f5a32a 100644 --- a/hw/dma/trace-events +++ b/hw/dma/trace-events @@ -20,3 +20,9 @@ sparc32_dma_enable_lower(void) "Lower DMA enable" # hw/dma/i8257.c i8257_unregistered_dma(int nchan, int dma_pos, int dma_len) "unregistered DMA channel used nchan=%d dma_pos=%d dma_len=%d" + +# hw/dma/puv3_dma.c +puv3_dma_read_bad(unsigned offset) "Bad offset 0x%x" +puv3_dma_read(unsigned offset, uint32_t value) "offset 0x%x, value 0x%x" +puv3_dma_write_bad(unsigned offset) "Bad offset 0x%x" +puv3_dma_write(unsigned offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64 From patchwork Wed Dec 12 17:30:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6DBE813AF for ; Wed, 12 Dec 2018 17:32:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 548A72B14C for ; Wed, 12 Dec 2018 17:32:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490212B1FB; Wed, 12 Dec 2018 17:32:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DEF0E2B14C for ; Wed, 12 Dec 2018 17:32:24 +0000 (UTC) Received: from localhost ([::1]:46376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8Mv-0008EW-K5 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:32:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LB-0006yU-Hp for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L6-000122-Go for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41752) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L4-0000vY-Bj; Wed, 12 Dec 2018 12:30:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 40FC08B10F; Wed, 12 Dec 2018 17:30:16 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70CD260C46; Wed, 12 Dec 2018 17:30:14 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:03 +0100 Message-Id: <20181212173007.11407-3-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 12 Dec 2018 17:30:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/6] hw/dma/puv3_gpio: Convert from DPRINTF() macro to trace event 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: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- Makefile.objs | 1 + hw/gpio/puv3_gpio.c | 15 +++++++-------- hw/gpio/trace-events | 6 ++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 hw/gpio/trace-events diff --git a/Makefile.objs b/Makefile.objs index 1e1ff387d7..fbc3bad1e1 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -243,6 +243,7 @@ trace-events-subdirs += hw/vfio trace-events-subdirs += hw/virtio trace-events-subdirs += hw/watchdog trace-events-subdirs += hw/xen +trace-events-subdirs += hw/gpio trace-events-subdirs += io trace-events-subdirs += linux-user trace-events-subdirs += migration diff --git a/hw/gpio/puv3_gpio.c b/hw/gpio/puv3_gpio.c index 445afccf9f..1b52b2c291 100644 --- a/hw/gpio/puv3_gpio.c +++ b/hw/gpio/puv3_gpio.c @@ -11,9 +11,8 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sysbus.h" - -#undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" +#include "trace.h" #define TYPE_PUV3_GPIO "puv3_gpio" #define PUV3_GPIO(obj) OBJECT_CHECK(PUV3GPIOState, (obj), TYPE_PUV3_GPIO) @@ -46,9 +45,9 @@ static uint64_t puv3_gpio_read(void *opaque, hwaddr offset, ret = s->reg_GPIR; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_gpio_read_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, ret); + trace_puv3_gpio_read(offset, ret); return ret; } @@ -58,7 +57,7 @@ static void puv3_gpio_write(void *opaque, hwaddr offset, { PUV3GPIOState *s = opaque; - DPRINTF("offset 0x%x, value 0x%x\n", offset, value); + trace_puv3_gpio_write(offset, value); switch (offset) { case 0x04: s->reg_GPDR = value; @@ -67,14 +66,14 @@ static void puv3_gpio_write(void *opaque, hwaddr offset, if (s->reg_GPDR & value) { s->reg_GPLR |= value; } else { - DPRINTF("Write gpio input port error!"); + trace_puv3_gpio_write_error(); } break; case 0x0c: if (s->reg_GPDR & value) { s->reg_GPLR &= ~value; } else { - DPRINTF("Write gpio input port error!"); + trace_puv3_gpio_write_error(); } break; case 0x10: /* GRER */ @@ -85,7 +84,7 @@ static void puv3_gpio_write(void *opaque, hwaddr offset, s->reg_GPIR = value; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_gpio_write_bad(offset); } } diff --git a/hw/gpio/trace-events b/hw/gpio/trace-events new file mode 100644 index 0000000000..5708899a79 --- /dev/null +++ b/hw/gpio/trace-events @@ -0,0 +1,6 @@ +# hw/gpio/puv3_gpio.c +puv3_gpio_read_bad(unsigned offset) "Bad offset 0x%x" +puv3_gpio_read(unsigned offset, uint32_t value) "offset 0x%x, value 0x%x" +puv3_gpio_write(unsigned offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64 +puv3_gpio_write_error(void) "Write gpio input port error!" +puv3_gpio_write_bad(unsigned offset) "Bad offset 0x%x" From patchwork Wed Dec 12 17:30:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96D2E13AF for ; Wed, 12 Dec 2018 17:32:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DD5029E12 for ; Wed, 12 Dec 2018 17:32:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71FA42B516; Wed, 12 Dec 2018 17:32:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1083329E12 for ; Wed, 12 Dec 2018 17:32:18 +0000 (UTC) Received: from localhost ([::1]:46371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8Ms-00070z-5p for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:32:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LB-0006yW-IW for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L9-000199-Fu for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41786) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L9-0000wJ-21; Wed, 12 Dec 2018 12:30:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 78F0013341; Wed, 12 Dec 2018 17:30:18 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3B0D60C44; Wed, 12 Dec 2018 17:30:16 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:04 +0100 Message-Id: <20181212173007.11407-4-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 12 Dec 2018 17:30:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/6] hw/dma/puv3_intc: Convert from DPRINTF() macro to trace event 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: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- hw/intc/puv3_intc.c | 13 ++++++------- hw/intc/trace-events | 7 +++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hw/intc/puv3_intc.c b/hw/intc/puv3_intc.c index ef8488aacc..6c1f36bba6 100644 --- a/hw/intc/puv3_intc.c +++ b/hw/intc/puv3_intc.c @@ -10,9 +10,8 @@ */ #include "qemu/osdep.h" #include "hw/sysbus.h" - -#undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" +#include "trace.h" #define TYPE_PUV3_INTC "puv3_intc" #define PUV3_INTC(obj) OBJECT_CHECK(PUV3INTCState, (obj), TYPE_PUV3_INTC) @@ -42,7 +41,7 @@ static void puv3_intc_handler(void *opaque, int irq, int level) { PUV3INTCState *s = opaque; - DPRINTF("irq 0x%x, level 0x%x\n", irq, level); + trace_puv3_intc_handler(irq, level); if (level) { s->reg_ICPR |= (1 << irq); } else { @@ -65,9 +64,9 @@ static uint64_t puv3_intc_read(void *opaque, hwaddr offset, ret = s->reg_ICPR; /* the same value with ICPR */ break; default: - DPRINTF("Bad offset %x\n", (int)offset); + trace_puv3_intc_read_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, ret); + trace_puv3_intc_read(offset, ret); return ret; } @@ -76,7 +75,7 @@ static void puv3_intc_write(void *opaque, hwaddr offset, { PUV3INTCState *s = opaque; - DPRINTF("offset 0x%x, value 0x%x\n", offset, value); + trace_puv3_intc_write(offset, value); switch (offset) { case 0x00: /* INTC_ICLR */ case 0x14: /* INTC_ICCR */ @@ -85,7 +84,7 @@ static void puv3_intc_write(void *opaque, hwaddr offset, s->reg_ICMR = value; break; default: - DPRINTF("Bad offset 0x%x\n", (int)offset); + trace_puv3_intc_write_bad(offset); return; } puv3_intc_update(s); diff --git a/hw/intc/trace-events b/hw/intc/trace-events index 7769869a13..e42d0cfb2d 100644 --- a/hw/intc/trace-events +++ b/hw/intc/trace-events @@ -200,3 +200,10 @@ nvic_sysreg_write(uint64_t addr, uint32_t value, unsigned size) "NVIC sysreg wri heathrow_write(uint64_t addr, unsigned int n, uint64_t value) "0x%"PRIx64" %u: 0x%"PRIx64 heathrow_read(uint64_t addr, unsigned int n, uint64_t value) "0x%"PRIx64" %u: 0x%"PRIx64 heathrow_set_irq(int num, int level) "set_irq: num=0x%02x level=%d" + +# hw/intc/puv3_intc.c +puv3_intc_handler(int irq, int level) "irq 0x%x, level 0x%x" +puv3_intc_read_bad(uint32_t offset) "Bad offset 0x%x" +puv3_intc_read(uint32_t offset, uint32_t value) "offset 0x%x, value 0x%x" +puv3_intc_write(uint32_t offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64 +puv3_intc_write_bad(uint32_t offset) "Bad offset 0x%x" From patchwork Wed Dec 12 17:30:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B42391759 for ; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A34129E12 for ; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ECAB2B5A1; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A92F2B902 for ; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) Received: from localhost ([::1]:46374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8Mz-00073O-6n for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:32:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LE-00070m-DX for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L8-00018I-MS for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51104) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L8-0000xF-Bp; Wed, 12 Dec 2018 12:30:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B2E5D307D924; Wed, 12 Dec 2018 17:30:20 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id D97BE60C44; Wed, 12 Dec 2018 17:30:18 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:05 +0100 Message-Id: <20181212173007.11407-5-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 12 Dec 2018 17:30:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/6] hw/misc/puv3_pm: Convert from DPRINTF() macro to trace event 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: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- hw/misc/puv3_pm.c | 11 +++++------ hw/misc/trace-events | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/misc/puv3_pm.c b/hw/misc/puv3_pm.c index 577cebaac7..4db7b1c22a 100644 --- a/hw/misc/puv3_pm.c +++ b/hw/misc/puv3_pm.c @@ -11,9 +11,8 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sysbus.h" - -#undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" +#include "trace.h" #define TYPE_PUV3_PM "puv3_pm" #define PUV3_PM(obj) OBJECT_CHECK(PUV3PMState, (obj), TYPE_PUV3_PM) @@ -72,9 +71,9 @@ static uint64_t puv3_pm_read(void *opaque, hwaddr offset, ret = 0x7; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_pm_read_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, ret); + trace_puv3_pm_read(offset, ret); return ret; } @@ -104,9 +103,9 @@ static void puv3_pm_write(void *opaque, hwaddr offset, case 0x38: break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_pm_write_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, value); + trace_puv3_pm_write(offset, value); } static const MemoryRegionOps puv3_pm_ops = { diff --git a/hw/misc/trace-events b/hw/misc/trace-events index 52466c77c4..d17a52c91d 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -132,3 +132,9 @@ iotkit_sysinfo_write(uint64_t offset, uint64_t data, unsigned size) "IoTKit SysI iotkit_sysctl_read(uint64_t offset, uint64_t data, unsigned size) "IoTKit SysCtl read: offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u" iotkit_sysctl_write(uint64_t offset, uint64_t data, unsigned size) "IoTKit SysCtl write: offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u" iotkit_sysctl_reset(void) "IoTKit SysCtl: reset" + +# hw/misc/puv3_pm.c +puv3_pm_read_bad(uint32_t offset) "Bad offset 0x%x" +puv3_pm_read(uint32_t offset, uint32_t value) "offset 0x%x, value 0x%x" +puv3_pm_write_bad(uint32_t offset) "Bad offset 0x%x" +puv3_pm_write(uint32_t offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64 From patchwork Wed Dec 12 17:30:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 351AB18A7 for ; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B64A2B851 for ; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 100A62B904; Wed, 12 Dec 2018 17:32:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A95282B851 for ; Wed, 12 Dec 2018 17:32:25 +0000 (UTC) Received: from localhost ([::1]:46377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8My-0008FJ-RL for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:32:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LB-0006yV-IV for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L8-00017p-Ex for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60766) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L6-0000zA-Ny; Wed, 12 Dec 2018 12:30:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB1103002C65; Wed, 12 Dec 2018 17:30:22 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E43260C44; Wed, 12 Dec 2018 17:30:20 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:06 +0100 Message-Id: <20181212173007.11407-6-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 12 Dec 2018 17:30:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/6] hw/timer/puv3_ost: Convert from DPRINTF() macro to trace event 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: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- hw/timer/puv3_ost.c | 14 ++++++-------- hw/timer/trace-events | 7 +++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c index 0b3d717e60..387b7a9bd1 100644 --- a/hw/timer/puv3_ost.c +++ b/hw/timer/puv3_ost.c @@ -12,9 +12,8 @@ #include "hw/sysbus.h" #include "hw/ptimer.h" #include "qemu/main-loop.h" - -#undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" +#include "trace.h" #define TYPE_PUV3_OST "puv3_ost" #define PUV3_OST(obj) OBJECT_CHECK(PUV3OSTState, (obj), TYPE_PUV3_OST) @@ -51,9 +50,9 @@ static uint64_t puv3_ost_read(void *opaque, hwaddr offset, ret = s->reg_OIER; break; default: - DPRINTF("Bad offset %x\n", (int)offset); + trace_puv3_ost_read_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, ret); + trace_puv3_ost_read(offset, ret); return ret; } @@ -62,7 +61,7 @@ static void puv3_ost_write(void *opaque, hwaddr offset, { PUV3OSTState *s = opaque; - DPRINTF("offset 0x%x, value 0x%x\n", offset, value); + trace_puv3_ost_write(offset, value); switch (offset) { case 0x00: /* Match Register 0 */ s->reg_OSMR0 = value; @@ -85,7 +84,7 @@ static void puv3_ost_write(void *opaque, hwaddr offset, s->reg_OIER = value; break; default: - DPRINTF("Bad offset %x\n", (int)offset); + trace_puv3_ost_write_bad(offset); } } @@ -103,8 +102,7 @@ static void puv3_ost_tick(void *opaque) { PUV3OSTState *s = opaque; - DPRINTF("ost hit when ptimer counter from 0x%x to 0x%x!\n", - s->reg_OSCR, s->reg_OSMR0); + trace_puv3_ost_tick(s->reg_OSCR, s->reg_OSMR0); s->reg_OSCR = s->reg_OSMR0; if (s->reg_OIER) { diff --git a/hw/timer/trace-events b/hw/timer/trace-events index 75bd3b1042..c504fd52c0 100644 --- a/hw/timer/trace-events +++ b/hw/timer/trace-events @@ -72,3 +72,10 @@ sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value # hw/timer/xlnx-zynqmp-rtc.c xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d" + +# hw/timer/puv3_ost.c +puv3_ost_read_bad(uint32_t offset) "Bad offset 0x%x" +puv3_ost_read(uint32_t offset, uint32_t value) "offset 0x%x, value 0x%x" +puv3_ost_write(uint32_t offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64 +puv3_ost_write_bad(uint32_t offset) "Bad offset 0x%x" +puv3_ost_tick(uint32_t oscr, uint32_t osmr0) "ost hit when ptimer counter from 0x%x to 0x%x!" From patchwork Wed Dec 12 17:30:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF32B13AF for ; Wed, 12 Dec 2018 17:35:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5CB72AD74 for ; Wed, 12 Dec 2018 17:35:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B99652ADDD; Wed, 12 Dec 2018 17:35:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 742762AD74 for ; Wed, 12 Dec 2018 17:35:42 +0000 (UTC) Received: from localhost ([::1]:46385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8Q9-0001Ve-PG for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:35:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LD-00070E-HL for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L8-00017S-DW for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57476) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L6-000103-Lk; Wed, 12 Dec 2018 12:30:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DEE4356CD; Wed, 12 Dec 2018 17:30:25 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5000960C44; Wed, 12 Dec 2018 17:30:23 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:07 +0100 Message-Id: <20181212173007.11407-7-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 12 Dec 2018 17:30:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 6/6] unicore32/puv3: remove definition of DPRINTF 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: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP As previous patches have removed the use of DPRINTF from puv3 files, we can remove the definition from puv3.h Signed-off-by: Laurent Vivier --- include/hw/unicore32/puv3.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/hw/unicore32/puv3.h b/include/hw/unicore32/puv3.h index f587a1f622..a876f21dfb 100644 --- a/include/hw/unicore32/puv3.h +++ b/include/hw/unicore32/puv3.h @@ -30,11 +30,4 @@ #define PUV3_IRQS_PS2_AUX (23) #define PUV3_IRQS_OST0 (26) -/* All puv3_*.c use DPRINTF for debug. */ -#ifdef DEBUG_PUV3 -#define DPRINTF(fmt, ...) printf("%s: " fmt , __func__, ## __VA_ARGS__) -#else -#define DPRINTF(fmt, ...) do {} while (0) -#endif - #endif /* QEMU_HW_PUV3_H */