From nobody Sun May 5 11:10:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=1579280428; cv=none; d=zohomail.com; s=zohoarc; b=I2RFSwWcXNZZrNyrX58Dl++obiGvcdmPaSF/rS/L5SBoPKvrrr2jHZI1XC2c3l+Wh9w3jkZQJ2QT0q0M+hyXzEQo3qe1Ffzag7dEj/7sKZgqzZ2oQiqAhhGQSDXXXhrmUSYAF+8EYckCusBE7yhaGBzjpgkHLBsqLIgHclhmOLE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579280428; 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; bh=QtlpF8hCqPWPuecJjcVs1Of/sWKhtu9gUlJyHqUkIoM=; b=fYqVkTOzFw4oR5xibIXuLz0SHPvlqeI9p6ZCDmW8wyAUA0mCfSz7lQnEkT4GOaZSfIgTw1/8/cfDSHR6sbd2fGkjUBOZIlzazWtA07V1CIPoIauEKeaUDLEOhJ6x0lAxFsgavMyHvSldYR3chM9vxVd/UOg0izWq1+ZcgOO6Bd4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1579280428771438.829113647453; Fri, 17 Jan 2020 09:00:28 -0800 (PST) Received: from localhost ([::1]:60320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isUyx-0001hq-4P for importer@patchew.org; Fri, 17 Jan 2020 12:00:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49455) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isUx0-0008Es-3D for qemu-devel@nongnu.org; Fri, 17 Jan 2020 11:58:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isUww-0007FL-7e for qemu-devel@nongnu.org; Fri, 17 Jan 2020 11:58:26 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:28654 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isUww-0007EU-4F for qemu-devel@nongnu.org; Fri, 17 Jan 2020 11:58:22 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-307-al6e_ps3OnOL1XXjg1l0IQ-1; Fri, 17 Jan 2020 11:58:20 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E39F9800D50; Fri, 17 Jan 2020 16:58:18 +0000 (UTC) Received: from x1w.redhat.com (ovpn-206-6.brq.redhat.com [10.40.206.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D0415D9CD; Fri, 17 Jan 2020 16:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579280301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QtlpF8hCqPWPuecJjcVs1Of/sWKhtu9gUlJyHqUkIoM=; b=RNdO6s+xH2HT01SJ326RYh9EENaXXpBooQAQqGKmyLx+S9mOMv9rrpwNUHzs/5m0K6GySK +zcK2ZZyiLNZDYfatWKHbfhusFNP4RQttdvvcme0OudW6sSwrhoJacfwmErSSLv44WaTb2 APE1+b94xkq0Vu1SuBuUSfpTbnXltCA= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Subject: [PATCH v3 1/2] MAINTAINERS: Add missing m48t59 files to the PReP section Date: Fri, 17 Jan 2020 17:58:08 +0100 Message-Id: <20200117165809.31067-2-philmd@redhat.com> In-Reply-To: <20200117165809.31067-1-philmd@redhat.com> References: <20200117165809.31067-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: al6e_ps3OnOL1XXjg1l0IQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: 207.211.31.120 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" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Herv=C3=A9 Poussineau --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4b425d030d..c162145bd0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1084,6 +1084,8 @@ F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.c F: hw/dma/i82374.c +F: hw/rtc/m48t59.c +F: hw/rtc/m48t59-internal.h F: hw/rtc/m48t59-isa.c F: include/hw/isa/pc87312.h F: include/hw/rtc/m48t59.h --=20 2.21.1 From nobody Sun May 5 11:10:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=1579280428; cv=none; d=zohomail.com; s=zohoarc; b=PEiG+RGA5WH73w7zrT2AxQE2YnxS8b3feJ1/e8S1gq3EIKIWwaZWoay5IalKld+qxsv8WvblqEuW0qW1AGsp83yM+3Ygo0WeQIngoNX2fUfaA444NvAMI2N0s1jHyPDAEkX5HifKlGkur6nvT5gcizQsvQSAer1S/r2DHQMV6YE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579280428; 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; bh=DR0w/zADhVqXf1WL7QQBc9ZUnFILA0c+2wzRWZv9rMo=; b=NWN/gmO+UaagcUuQYMvKzOpBcXd6D2tRrwR36A9VAWRBRqS6BrKEyOZoDEbRZocVPvjEexi3vNo5ZURmv9Z8x+KTOKN3e/fPB91gfeZR1/f0CZ42kZGRh/CgPr3uBZdNruI6nIkt+l9ulswuuQ45e8bikYPPcsknpfv3dE+QZ1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1579280428136492.21613574428216; Fri, 17 Jan 2020 09:00:28 -0800 (PST) Received: from localhost ([::1]:60322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isUyw-0001j5-DF for importer@patchew.org; Fri, 17 Jan 2020 12:00:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49495) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isUx2-0008FF-Nl for qemu-devel@nongnu.org; Fri, 17 Jan 2020 11:58:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isUwz-0007IC-3y for qemu-devel@nongnu.org; Fri, 17 Jan 2020 11:58:28 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41212 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isUwz-0007Hh-0d for qemu-devel@nongnu.org; Fri, 17 Jan 2020 11:58:25 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-NoYFqi05NsSTlAt-ga-LAg-1; Fri, 17 Jan 2020 11:58:23 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2DF68800D41; Fri, 17 Jan 2020 16:58:22 +0000 (UTC) Received: from x1w.redhat.com (ovpn-206-6.brq.redhat.com [10.40.206.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A3E25D9CD; Fri, 17 Jan 2020 16:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579280304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DR0w/zADhVqXf1WL7QQBc9ZUnFILA0c+2wzRWZv9rMo=; b=EzfTLJ3/32G/VP4IKgxvWpARraxtwG9LAUbQPkRuOolsR4C9524fmcHAOuxnTcws4SnOHU 3Ygd6vFuXkj3FPx2dIBqbU/w1Ra+zOT+PTonZhz/eeB5ewL5CBIIiVt1HbVCQRGUpndxhC 0N/DuZXJ7e90iuqmfh0FLkPA0vTVZXY= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Subject: [PATCH v3 2/2] hw/timer/m48t59: Convert debug printf()s to trace events Date: Fri, 17 Jan 2020 17:58:09 +0100 Message-Id: <20200117165809.31067-3-philmd@redhat.com> In-Reply-To: <20200117165809.31067-1-philmd@redhat.com> References: <20200117165809.31067-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: NoYFqi05NsSTlAt-ga-LAg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: 207.211.31.120 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" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Herv=C3=A9 Poussineau --- hw/rtc/m48t59-internal.h | 5 ----- hw/rtc/m48t59.c | 11 +++++------ hw/rtc/trace-events | 6 ++++++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/rtc/m48t59-internal.h b/hw/rtc/m48t59-internal.h index 4d4f2a6fed..cd648241e9 100644 --- a/hw/rtc/m48t59-internal.h +++ b/hw/rtc/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/rtc/m48t59.c b/hw/rtc/m48t59.c index fc592b9fb1..ecc92ca476 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -35,6 +35,7 @@ #include "exec/address-spaces.h" #include "qemu/bcd.h" #include "qemu/module.h" +#include "trace.h" =20 #include "m48t59-internal.h" #include "migration/vmstate.h" @@ -192,8 +193,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) || @@ -450,8 +450,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; } @@ -462,7 +461,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; @@ -494,7 +493,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/rtc/trace-events b/hw/rtc/trace-events index d6749f4616..52c1566198 100644 --- a/hw/rtc/trace-events +++ b/hw/rtc/trace-events @@ -17,3 +17,9 @@ pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks" # aspeed-rtc.c aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value= 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " valu= e 0x%08" PRIx64 + +# 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.21.1