From nobody Thu Nov 13 06:11:38 2025 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=1578229706; cv=none; d=zohomail.com; s=zohoarc; b=i/adIFxDrEPhmIP2lxkp8RAn7ZlEj1wUNMK3Uc2w66zfks8HG7cccBrVZ9lMblWgPA5Yy76qKn33Zz57KUkKBeRyyrJ3iB4/gB6WuUXnTNg9kY+4H7CCpNsMfK4S3uT3gXc6Zm8tn08OierMY31QOK47B3eXQIhJypKIDpP6b4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578229706; 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=WMQapAZoKHuzNu9Pp7IYAg1kGSgMFQ0zkXvOLbEXi5E=; b=PEltN350EVX8da6GLE6yKnLK3k5vhNaKgCZMBHDkT4WcSlitFK+SDpauhMnZlwxpcl5N40BlR3XjtT4gKakHQs6aILzBzOaodNfKEoCh9RIanTqDAicJlzUuxbl2ljfXvuGNoiUKPgT5JrbJpfq62CR/jZLbuvzjK9f+klEltC4= 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 1578229706541967.6626571843175; Sun, 5 Jan 2020 05:08:26 -0800 (PST) Received: from localhost ([::1]:41944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1io5do-00052B-Sy for importer@patchew.org; Sun, 05 Jan 2020 08:08:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58387) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1io5V0-0002x9-Ci for qemu-devel@nongnu.org; Sun, 05 Jan 2020 07:59:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1io5Uz-0004vb-6J for qemu-devel@nongnu.org; Sun, 05 Jan 2020 07:59:18 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:36516 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1io5Uz-0004vN-2d for qemu-devel@nongnu.org; Sun, 05 Jan 2020 07:59:17 -0500 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-lmckzrOGOF-dLzInhdXWRQ-1; Sun, 05 Jan 2020 07:59:13 -0500 Received: by mail-qt1-f200.google.com with SMTP id x8so8877291qtq.14 for ; Sun, 05 Jan 2020 04:59:13 -0800 (PST) Received: from redhat.com (bzq-79-183-34-164.red.bezeqint.net. [79.183.34.164]) by smtp.gmail.com with ESMTPSA id j185sm19255290qkc.96.2020.01.05.04.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2020 04:59:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578229156; 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=WMQapAZoKHuzNu9Pp7IYAg1kGSgMFQ0zkXvOLbEXi5E=; b=a6LKUFXil7qctonNy/5ckdrx8Sewp5aB2Q77jtKSmqHYtzhRhFiuNq6EsSL/70fR9tbJz/ VfyBm8DLQzB3zU182K++FYoL57knzngWh7GQyKlRz9Mwe+nA//q54IqjrEhQ54+eNuryUq Gxyjn+LW1YHhSOtyM2R9WrCiLM4tvDc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=kOPqzhUAAr1F9DHkT+R7bzvkT8C45cWHnUcu3/B6bq0=; b=fNNwFmOLEUqdcN2Eln/ratQihuiiHXMw9TNUjs0yB1SZEcOY5aQkFWWDppedCc1RNb Zhfb0Eh9h5R5IpZa0t+PAR4E3twqEwJ/NsfGI0IMaJVHc7id3Lpn8mBwuj1Er9ikDXaZ JIvOQr0XgTHGuMwU+4iXd9A4148zrjq+Lgbb2MfuxM0oosulNlf/EuYtEDkUPhTSmUyn 72epi+D7M3A4coqwM1IYd+Kuwl2kpM+S48y7hlNRRKC9In9hRJcaDi9n/iHqW/AlcdEa WBvUqx/pRRojjqhyHLbnJSzQzwbNb7FRkMerLFKUCGi8gdqKU7KcOnZmIC0qs8Crk1pF 2kSw== X-Gm-Message-State: APjAAAWNhxknfimk6nGCVGTYEzNlbbbMRSs7KjchtpERn2hDn5TsPUds EnOsACbGmY2OwrZPMh/k7U3NOTbBgw+1KFIXzkLPeLK05qzrDzBdHu0eCM6J9Kski5IG44GBCk7 c8R++AKo8C0YENh4= X-Received: by 2002:ac8:410f:: with SMTP id q15mr71046061qtl.192.1578229152727; Sun, 05 Jan 2020 04:59:12 -0800 (PST) X-Google-Smtp-Source: APXvYqytPrZ3BXHjaiZtYcG36Pw+7AzrXNsb0T0z5iNf8O9aAHxyA0vEXx5CnlbC2xhDeGifiK+fvg== X-Received: by 2002:ac8:410f:: with SMTP id q15mr71046051qtl.192.1578229152544; Sun, 05 Jan 2020 04:59:12 -0800 (PST) Date: Sun, 5 Jan 2020 07:59:08 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v3 21/32] hw/pci/pci_host: Remove redundant PCI_DPRINTF() Message-ID: <20200105125622.27231-22-mst@redhat.com> References: <20200105125622.27231-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200105125622.27231-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-MC-Unique: lmckzrOGOF-dLzInhdXWRQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: Peter Maydell , Philippe =?utf-8?Q?Mathieu-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" From: Philippe Mathieu-Daud=C3=A9 In commit 3bf4dfdd111 we introduced the pci_cfg_[read/write] trace events in pci_host_config_[read/write]_common(). We have the following call trace: pci_host_data_[read/write]() - PCI_DPRINTF() - pci_data_[read/write]() - PCI_DPRINTF() - pci_host_config_[read/write]_common() trace_pci_cfg_[read/write]() Since the PCI_DPRINTF() calls are redundant with the trace events, remove them. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20191216002134.18279-2-philmd@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pci_host.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c index c5f9244934..0958d157de 100644 --- a/hw/pci/pci_host.c +++ b/hw/pci/pci_host.c @@ -115,8 +115,6 @@ void pci_data_write(PCIBus *s, uint32_t addr, uint32_t = val, int len) return; } =20 - PCI_DPRINTF("%s: %s: addr=3D%02" PRIx32 " val=3D%08" PRIx32 " len=3D%d= \n", - __func__, pci_dev->name, config_addr, val, len); pci_host_config_write_common(pci_dev, config_addr, PCI_CONFIG_SPACE_SI= ZE, val, len); } @@ -125,18 +123,13 @@ uint32_t pci_data_read(PCIBus *s, uint32_t addr, int = len) { PCIDevice *pci_dev =3D pci_dev_find_by_addr(s, addr); uint32_t config_addr =3D addr & (PCI_CONFIG_SPACE_SIZE - 1); - uint32_t val; =20 if (!pci_dev) { return ~0x0; } =20 - val =3D pci_host_config_read_common(pci_dev, config_addr, - PCI_CONFIG_SPACE_SIZE, len); - PCI_DPRINTF("%s: %s: addr=3D%02"PRIx32" val=3D%08"PRIx32" len=3D%d\n", - __func__, pci_dev->name, config_addr, val, len); - - return val; + return pci_host_config_read_common(pci_dev, config_addr, + PCI_CONFIG_SPACE_SIZE, len); } =20 static void pci_host_config_write(void *opaque, hwaddr addr, @@ -167,8 +160,7 @@ static void pci_host_data_write(void *opaque, hwaddr ad= dr, uint64_t val, unsigned len) { PCIHostState *s =3D opaque; - PCI_DPRINTF("write addr " TARGET_FMT_plx " len %d val %x\n", - addr, len, (unsigned)val); + if (s->config_reg & (1u << 31)) pci_data_write(s->bus, s->config_reg | (addr & 3), val, len); } @@ -177,14 +169,11 @@ static uint64_t pci_host_data_read(void *opaque, hwaddr addr, unsigned len) { PCIHostState *s =3D opaque; - uint32_t val; + if (!(s->config_reg & (1U << 31))) { return 0xffffffff; } - val =3D pci_data_read(s->bus, s->config_reg | (addr & 3), len); - PCI_DPRINTF("read addr " TARGET_FMT_plx " len %d val %x\n", - addr, len, val); - return val; + return pci_data_read(s->bus, s->config_reg | (addr & 3), len); } =20 const MemoryRegionOps pci_host_conf_le_ops =3D { --=20 MST