From patchwork Mon Feb 22 09:40:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 45955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4B9BCB7C98 for ; Mon, 22 Feb 2010 20:51:52 +1100 (EST) Received: from localhost ([127.0.0.1]:56513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjUss-0003Ff-1k for incoming@patchwork.ozlabs.org; Mon, 22 Feb 2010 04:47:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjUpH-0002pK-D5 for qemu-devel@nongnu.org; Mon, 22 Feb 2010 04:43:39 -0500 Received: from [199.232.76.173] (port=44358 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjUpG-0002pC-QG for qemu-devel@nongnu.org; Mon, 22 Feb 2010 04:43:38 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NjUpF-00034W-Hi for qemu-devel@nongnu.org; Mon, 22 Feb 2010 04:43:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54035) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NjUpF-00034K-49 for qemu-devel@nongnu.org; Mon, 22 Feb 2010 04:43:37 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1M9hXdk004299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Feb 2010 04:43:34 -0500 Received: from redhat.com (vpn1-7-16.ams2.redhat.com [10.36.7.16]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o1M9hV94032448; Mon, 22 Feb 2010 04:43:32 -0500 Date: Mon, 22 Feb 2010 11:40:19 +0200 From: "Michael S. Tsirkin" To: blauwirbel@gmail.com, qemu-devel@nongnu.org Message-ID: <20100222094019.GA7578@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] apb_pci: minor cleanup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org pci_data_write ignores high 8 bit in address, so there seems to be no need to set them in apb_pci. Signed-off-by: Michael S. Tsirkin --- Blue Swirl, please consider the following (untested) patch. Thanks! hw/apb_pci.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/apb_pci.c b/hw/apb_pci.c index ebfcd41..f14b432 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -187,8 +187,7 @@ static void apb_pci_config_write(APBState *s, target_phys_addr_t addr, uint32_t val, int size) { APB_DPRINTF("%s: addr " TARGET_FMT_lx " val %x\n", __func__, addr, val); - pci_data_write(s->host_state.bus, (addr & 0x00ffffff) | (1u << 31), val, - size); + pci_data_write(s->host_state.bus, addr, val, size); } static uint32_t apb_pci_config_read(APBState *s, target_phys_addr_t addr, @@ -196,8 +195,7 @@ static uint32_t apb_pci_config_read(APBState *s, target_phys_addr_t addr, { uint32_t ret; - ret = pci_data_read(s->host_state.bus, (addr & 0x00ffffff) | (1u << 31), - size); + ret = pci_data_read(s->host_state.bus, addr, size); APB_DPRINTF("%s: addr " TARGET_FMT_lx " -> %x\n", __func__, addr, ret); return ret; }