From patchwork Thu Dec 19 13:28:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 1213403 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="istLO5yq"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47dtSR6sSTz9sR0 for ; Fri, 20 Dec 2019 00:45:59 +1100 (AEDT) Received: from localhost ([::1]:41766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihw7p-0008Qj-6O for incoming@patchwork.ozlabs.org; Thu, 19 Dec 2019 08:45:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59632) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihvrL-0003EC-Kr for qemu-devel@nongnu.org; Thu, 19 Dec 2019 08:28:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihvrK-0001SS-9Y for qemu-devel@nongnu.org; Thu, 19 Dec 2019 08:28:55 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:31326 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 1ihvrK-0001PT-28 for qemu-devel@nongnu.org; Thu, 19 Dec 2019 08:28:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576762133; 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=istLO5yqNGf1ctDmYyHKrSafItfzDPnYeHydSv8mcEk08TbwBqz2+9L4u3vyO1IgfD9wDx IhGeVNkFxErMT+teVpDPByaSQ1TO3e/kNCACXrVvhNw86Iczy4SPTf+Rf+9jMtDwt5z1qn 0l0H5GiN8PypqlAVUWrph+JyMcnmUlw= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-E8cMwEGVMSO7WscCABmPgw-1; Thu, 19 Dec 2019 08:28:52 -0500 Received: by mail-qk1-f200.google.com with SMTP id n128so3603294qke.19 for ; Thu, 19 Dec 2019 05:28:52 -0800 (PST) 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=KiAWiNDEa55EGgSpkWK00P57t4Pkks8a9Ojwi5JN+lCnReuz1dj2XNjQPJqhy+Q8B2 wr78tiFQty+4dXQimBysm3BmnXsQ5sO5W7hyXpvkG0OO8oZ0QvRScBqNtk1m91gGYVIM X13HSq3GAvPeWH5RQmJYQZUMBMIHK9ji4wKmPPJWX8zimB6mcNW14gzzRqyV6bBdJpXK olVK/kMMDDNewWmj7fCt8H2pTNreosTIcWwh0a94+6XxnVAdP8w8a9a8kQnXNPigwLaf il0w2DfkkvLx+YUKKSlAaAOmuLNI4k1fg+tdrUEP1jLx0djy3B4ay+h2dkRoWAmMgiaq u/CQ== X-Gm-Message-State: APjAAAUCgfDF+tiuTSXuQtS+XvTTQfzfht/m6dA+bZ/MBy/067lpM+zg lL4lG7NP6dakzdsF+hDJC21AhIHzSgdECtqUPbrIDvnwf9gbquWHEvCU6Ls43oWsuj2Z9BRJSQY LYi0qwL/EIg+jr98= X-Received: by 2002:a37:e507:: with SMTP id e7mr8296781qkg.358.1576762131229; Thu, 19 Dec 2019 05:28:51 -0800 (PST) X-Google-Smtp-Source: APXvYqz2SRzCojR7gOsMmlyRcdIwVvvWTsmsJ5uSf0jHmdPHbJZcpqT2yBvTBfYnLlWSUaR9DlwPOg== X-Received: by 2002:a37:e507:: with SMTP id e7mr8296753qkg.358.1576762130981; Thu, 19 Dec 2019 05:28:50 -0800 (PST) Received: from redhat.com (bzq-79-181-48-215.red.bezeqint.net. [79.181.48.215]) by smtp.gmail.com with ESMTPSA id q30sm1772378qtd.5.2019.12.19.05.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 05:28:50 -0800 (PST) Date: Thu, 19 Dec 2019 08:28:46 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 21/24] hw/pci/pci_host: Remove redundant PCI_DPRINTF() Message-ID: <20191219132621.16595-22-mst@redhat.com> References: <20191219132621.16595-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20191219132621.16595-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-MC-Unique: E8cMwEGVMSO7WscCABmPgw-1 X-Mimecast-Spam-Score: 0 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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-D?= =?utf-8?b?YXVkw6k=?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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é 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; } - PCI_DPRINTF("%s: %s: addr=%02" PRIx32 " val=%08" PRIx32 " len=%d\n", - __func__, pci_dev->name, config_addr, val, len); pci_host_config_write_common(pci_dev, config_addr, PCI_CONFIG_SPACE_SIZE, val, len); } @@ -125,18 +123,13 @@ uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len) { PCIDevice *pci_dev = pci_dev_find_by_addr(s, addr); uint32_t config_addr = addr & (PCI_CONFIG_SPACE_SIZE - 1); - uint32_t val; if (!pci_dev) { return ~0x0; } - val = pci_host_config_read_common(pci_dev, config_addr, - PCI_CONFIG_SPACE_SIZE, len); - PCI_DPRINTF("%s: %s: addr=%02"PRIx32" val=%08"PRIx32" len=%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); } static void pci_host_config_write(void *opaque, hwaddr addr, @@ -167,8 +160,7 @@ static void pci_host_data_write(void *opaque, hwaddr addr, uint64_t val, unsigned len) { PCIHostState *s = 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 = opaque; - uint32_t val; + if (!(s->config_reg & (1U << 31))) { return 0xffffffff; } - val = 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); } const MemoryRegionOps pci_host_conf_le_ops = {