From nobody Tue Feb 10 01:49:07 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 150894778186473.71457608437402; Wed, 25 Oct 2017 09:09:41 -0700 (PDT) Received: from localhost ([::1]:49009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7OFK-00089p-J0 for importer@patchew.org; Wed, 25 Oct 2017 12:09:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7OAe-0004H5-O6 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 12:04:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7OAd-0004p3-HH for qemu-devel@nongnu.org; Wed, 25 Oct 2017 12:04:44 -0400 Received: from chuckie.co.uk ([82.165.15.123]:58443 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 1e7OAd-0004mv-2z for qemu-devel@nongnu.org; Wed, 25 Oct 2017 12:04:43 -0400 Received: from [62.168.35.107] (helo=kentang.lan) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1e7O6B-0004vb-MR; Wed, 25 Oct 2017 17:00:08 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, atar4qemu@gmail.com Date: Wed, 25 Oct 2017 16:59:27 +0100 Message-Id: <1508947167-5304-14-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1508947167-5304-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1508947167-5304-1-git-send-email-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 62.168.35.107 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] [PATCHv4 13/13] sparc32_dma: add len to esp/le DMA memory tracing 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: Mark Cave-Ayland Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 This is surprisingly useful when trying to debug DMA issues. Signed-off-by: Mark Cave-Ayland Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/dma/sparc32_dma.c | 8 ++++---- hw/dma/trace-events | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c index f64787e..7d00f1a 100644 --- a/hw/dma/sparc32_dma.c +++ b/hw/dma/sparc32_dma.c @@ -74,7 +74,7 @@ void ledma_memory_read(void *opaque, hwaddr addr, int i; =20 addr |=3D s->dmaregs[3]; - trace_ledma_memory_read(addr); + trace_ledma_memory_read(addr, len); if (do_bswap) { sparc_iommu_memory_read(s->iommu, addr, buf, len); } else { @@ -95,7 +95,7 @@ void ledma_memory_write(void *opaque, hwaddr addr, uint16_t tmp_buf[32]; =20 addr |=3D s->dmaregs[3]; - trace_ledma_memory_write(addr); + trace_ledma_memory_write(addr, len); if (do_bswap) { sparc_iommu_memory_write(s->iommu, addr, buf, len); } else { @@ -140,7 +140,7 @@ void espdma_memory_read(void *opaque, uint8_t *buf, int= len) { DMADeviceState *s =3D opaque; =20 - trace_espdma_memory_read(s->dmaregs[1]); + trace_espdma_memory_read(s->dmaregs[1], len); sparc_iommu_memory_read(s->iommu, s->dmaregs[1], buf, len); s->dmaregs[1] +=3D len; } @@ -149,7 +149,7 @@ void espdma_memory_write(void *opaque, uint8_t *buf, in= t len) { DMADeviceState *s =3D opaque; =20 - trace_espdma_memory_write(s->dmaregs[1]); + trace_espdma_memory_write(s->dmaregs[1], len); sparc_iommu_memory_write(s->iommu, s->dmaregs[1], buf, len); s->dmaregs[1] +=3D len; } diff --git a/hw/dma/trace-events b/hw/dma/trace-events index 428469a..6b367f0 100644 --- a/hw/dma/trace-events +++ b/hw/dma/trace-events @@ -7,12 +7,12 @@ rc4030_read(uint64_t addr, uint32_t ret) "read reg[0x%"PR= Ix64"] =3D 0x%x" rc4030_write(uint64_t addr, uint32_t val) "write reg[0x%"PRIx64"] =3D 0x%x" =20 # hw/dma/sparc32_dma.c -ledma_memory_read(uint64_t addr) "DMA read addr 0x%"PRIx64 -ledma_memory_write(uint64_t addr) "DMA write addr 0x%"PRIx64 +ledma_memory_read(uint64_t addr, int len) "DMA read addr 0x%"PRIx64 " len = %d" +ledma_memory_write(uint64_t addr, int len) "DMA write addr 0x%"PRIx64 " le= n %d" sparc32_dma_set_irq_raise(void) "Raise IRQ" sparc32_dma_set_irq_lower(void) "Lower IRQ" -espdma_memory_read(uint32_t addr) "DMA read addr 0x%08x" -espdma_memory_write(uint32_t addr) "DMA write addr 0x%08x" +espdma_memory_read(uint32_t addr, int len) "DMA read addr 0x%08x len %d" +espdma_memory_write(uint32_t addr, int len) "DMA write addr 0x%08x len %d" sparc32_dma_mem_readl(uint64_t addr, uint32_t ret) "read dmareg 0x%"PRIx64= ": 0x%08x" sparc32_dma_mem_writel(uint64_t addr, uint32_t old, uint32_t val) "write d= mareg 0x%"PRIx64": 0x%08x -> 0x%08x" sparc32_dma_enable_raise(void) "Raise DMA enable" --=20 1.7.10.4