From patchwork Mon Jul 26 05:02:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 59889 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 844BAB6F07 for ; Mon, 26 Jul 2010 15:00:56 +1000 (EST) Received: from localhost ([127.0.0.1]:53067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdFo5-0004x1-Bs for incoming@patchwork.ozlabs.org; Mon, 26 Jul 2010 01:00:53 -0400 Received: from [140.186.70.92] (port=58149 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdFmn-0004wm-Q6 for qemu-devel@nongnu.org; Mon, 26 Jul 2010 00:59:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdFmi-0004Lf-MW for qemu-devel@nongnu.org; Mon, 26 Jul 2010 00:59:33 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:50976) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdFmi-0004Kx-C1 for qemu-devel@nongnu.org; Mon, 26 Jul 2010 00:59:28 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 81B21107934; Mon, 26 Jul 2010 13:59:23 +0900 (JST) Received: (nullmailer pid 1700 invoked by uid 1000); Mon, 26 Jul 2010 05:02:46 -0000 From: Isaku Yamahata To: seabios@seabios.org Date: Mon, 26 Jul 2010 14:02:45 +0900 Message-Id: <2f42a5802ede9e1c96f811132a788b6f25813e62.1280120278.git.yamahata@valinux.co.jp> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: yamahata@valinux.co.jp, cam@cs.ualberta.ca, qemu-devel@nongnu.org, mst@redhat.com Subject: [Qemu-devel] [PATCH 1/2] seabios: pciinit: fix 64bit bar initilization. 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 When 64bit bar allocation failed, leave it untouched as 32bit bar case. There is no point to set higher bit to all 1, it is just leftover from debug code. Signed-off-by: Isaku Yamahata --- src/pciinit.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pciinit.c b/src/pciinit.c index b110531..f75e552 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -116,12 +116,8 @@ static int pci_bios_allocate_region(u16 bdf, int region_num) int is_64bit = !(val & PCI_BASE_ADDRESS_SPACE_IO) && (val & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64; - if (is_64bit) { - if (size > 0) { - pci_config_writel(bdf, ofs + 4, 0); - } else { - pci_config_writel(bdf, ofs + 4, ~0); - } + if (is_64bit && size > 0) { + pci_config_writel(bdf, ofs + 4, 0); } return is_64bit; }