From nobody Sat May 4 21:03:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561551892; cv=none; d=zoho.com; s=zohoarc; b=SXfZb1MTuX/kVB74I8liAh9YFOKY1zZkMKXKhw5rk0aNuuxNhnXHRGmBoQHNvpgL+nZd9gwpCvVdmQValudogO2Pawuu23nmqMQ9OHnk3Si/1QAGXGcZKTT4Ze99UVnf6lsdaUTLgc8bd8kzuhh0YPqatRzsWbd18YVclVT51w0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561551892; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=M7Xtre/TOriXgoADn2mSBYzHvPaWM27LSvBvKtImiKY=; b=dhhmsU4V77qpGkk58ROXT8RMYfyFDeF7IqSBEvfsLUhBdnEiqCp5WeBjdixBcC9SbAO+C3aW6KBF9VcAikhqvEm/NxfXC6YTCDx1XIOTe1m1DXYVnWiuEm5vFirVpGC2CzlDZoJ6R+L7Euk02xAwwcXCxKQT2EDiJWw5PSuJEpU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561551892809471.76461866253067; Wed, 26 Jun 2019 05:24:52 -0700 (PDT) Received: from localhost ([::1]:39670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg6yn-0008KN-Oz for importer@patchew.org; Wed, 26 Jun 2019 08:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51920) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg6v9-00057Y-4b for qemu-devel@nongnu.org; Wed, 26 Jun 2019 08:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hg6v8-0005jv-8M for qemu-devel@nongnu.org; Wed, 26 Jun 2019 08:21:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49073) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hg6v8-0005iL-2e; Wed, 26 Jun 2019 08:21:02 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DAA393082E64; Wed, 26 Jun 2019 12:20:53 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-66.brq.redhat.com [10.40.204.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46FCD1001281; Wed, 26 Jun 2019 12:20:51 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Date: Wed, 26 Jun 2019 14:20:41 +0200 Message-Id: <20190626122042.7656-2-philmd@redhat.com> In-Reply-To: <20190626122042.7656-1-philmd@redhat.com> References: <20190626122042.7656-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 26 Jun 2019 12:20:56 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add missing m48t59 files to the PReP section X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cad58b9487..fbe89c0812 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1047,6 +1047,8 @@ F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.c F: hw/dma/i82374.c +F: hw/timer/m48t59.c +F: hw/timer/m48t59-internal.h F: hw/timer/m48t59-isa.c F: include/hw/isa/pc87312.h F: include/hw/timer/m48t59.h --=20 2.20.1 From nobody Sat May 4 21:03:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561551863; cv=none; d=zoho.com; s=zohoarc; b=Et9acKqMZ0SVbSCYhChToQK3/dhSlprDSa0x2B0RKs96VJJ0nEUczJBcAbw9Q+eVjqEnmoaTAcAhrq60CeubwyXuAWCftxrdyry5VdlyqR7FjnrbnE1E8vL1LQ68LigHBUVLwqYe5LLaT3drDrA6zBYByicC1ltWTup6xtBFavU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561551863; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qny1pBONXsF2DiV8ehuB1ZxI85x2guxaPZ4UlPTcv30=; b=FTSegQOX7Trg6hOeAYVMJae0lC+M/LiA2C3DkEwpxSx4NAX8+KXdlH3R1Z2mwAw4gVmWkrOS1TwaY5EMoN8YJ5WgkkkKpLI0VF9ggsFMwpT/7d6+16MCTJuAGtvia0TKFEHT/BxJiLRPpNRt3oYat372/srcANoYn0bcm2cqH9w= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561551863251367.8562499792679; Wed, 26 Jun 2019 05:24:23 -0700 (PDT) Received: from localhost ([::1]:39666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg6yK-0007fz-3G for importer@patchew.org; Wed, 26 Jun 2019 08:24:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51976) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hg6vD-0005Fw-VH for qemu-devel@nongnu.org; Wed, 26 Jun 2019 08:21:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hg6vC-0005ta-P8 for qemu-devel@nongnu.org; Wed, 26 Jun 2019 08:21:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50507) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hg6vC-0005rq-Gm; Wed, 26 Jun 2019 08:21:06 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A9A4A3082140; Wed, 26 Jun 2019 12:20:57 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-66.brq.redhat.com [10.40.204.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5CC6B10018F9; Wed, 26 Jun 2019 12:20:54 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Date: Wed, 26 Jun 2019 14:20:42 +0200 Message-Id: <20190626122042.7656-3-philmd@redhat.com> In-Reply-To: <20190626122042.7656-1-philmd@redhat.com> References: <20190626122042.7656-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 26 Jun 2019 12:21:02 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] hw/timer/m48t59: Convert debug printf()s to trace events X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/timer/m48t59-internal.h | 5 ----- hw/timer/m48t59.c | 11 +++++------ hw/timer/trace-events | 6 ++++++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/timer/m48t59-internal.h b/hw/timer/m48t59-internal.h index 4d4f2a6fed..cd648241e9 100644 --- a/hw/timer/m48t59-internal.h +++ b/hw/timer/m48t59-internal.h @@ -26,11 +26,6 @@ #ifndef HW_M48T59_INTERNAL_H #define HW_M48T59_INTERNAL_H =20 -#define M48T59_DEBUG 0 - -#define NVRAM_PRINTF(fmt, ...) do { \ - if (M48T59_DEBUG) { printf(fmt , ## __VA_ARGS__); } } while (0) - /* * The M48T02, M48T08 and M48T59 chips are very similar. The newer '59 has * alarm and a watchdog timer and related control registers. In the diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index 030c8872a2..d50b4ddea2 100644 --- a/hw/timer/m48t59.c +++ b/hw/timer/m48t59.c @@ -33,6 +33,7 @@ #include "exec/address-spaces.h" #include "qemu/bcd.h" #include "qemu/module.h" +#include "trace.h" =20 #include "m48t59-internal.h" =20 @@ -189,8 +190,7 @@ void m48t59_write(M48t59State *NVRAM, uint32_t addr, ui= nt32_t val) struct tm tm; int tmp; =20 - if (addr > 0x1FF8 && addr < 0x2000) - NVRAM_PRINTF("%s: 0x%08x =3D> 0x%08x\n", __func__, addr, val); + trace_m48txx_nvram_mem_write(addr, val); =20 /* check for NVRAM access */ if ((NVRAM->model =3D=3D 2 && addr < 0x7f8) || @@ -447,8 +447,7 @@ uint32_t m48t59_read(M48t59State *NVRAM, uint32_t addr) } break; } - if (addr > 0x1FF9 && addr < 0x2000) - NVRAM_PRINTF("%s: 0x%08x <=3D 0x%08x\n", __func__, addr, retval); + trace_m48txx_nvram_mem_read(addr, retval); =20 return retval; } @@ -459,7 +458,7 @@ static void NVRAM_writeb(void *opaque, hwaddr addr, uin= t64_t val, { M48t59State *NVRAM =3D opaque; =20 - NVRAM_PRINTF("%s: 0x%"HWADDR_PRIx" =3D> 0x%"PRIx64"\n", __func__, addr= , val); + trace_m48txx_nvram_io_write(addr, val); switch (addr) { case 0: NVRAM->addr &=3D ~0x00FF; @@ -491,7 +490,7 @@ static uint64_t NVRAM_readb(void *opaque, hwaddr addr, = unsigned size) retval =3D -1; break; } - NVRAM_PRINTF("%s: 0x%"HWADDR_PRIx" <=3D 0x%08x\n", __func__, addr, ret= val); + trace_m48txx_nvram_io_read(addr, retval); =20 return retval; } diff --git a/hw/timer/trace-events b/hw/timer/trace-events index dcaf3d6da6..66ccdd0974 100644 --- a/hw/timer/trace-events +++ b/hw/timer/trace-events @@ -83,3 +83,9 @@ pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x va= lue 0x%08x" pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" pl031_alarm_raised(void) "alarm raised" pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks" + +# m48t59.c +m48txx_nvram_io_read(uint64_t addr, uint64_t value) "io read addr:0x%04" P= RIx64 " value:0x%02" PRIx64 +m48txx_nvram_io_write(uint64_t addr, uint64_t value) "io write addr:0x%04"= PRIx64 " value:0x%02" PRIx64 +m48txx_nvram_mem_read(uint32_t addr, uint32_t value) "mem read addr:0x%04x= value:0x%02x" +m48txx_nvram_mem_write(uint32_t addr, uint32_t value) "mem write addr:0x%0= 4x value:0x%02x" --=20 2.20.1