From patchwork Wed Jun 3 07:13:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 27613 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n537F81J014794 for ; Wed, 3 Jun 2009 07:15:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751747AbZFCHPF (ORCPT ); Wed, 3 Jun 2009 03:15:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752058AbZFCHPE (ORCPT ); Wed, 3 Jun 2009 03:15:04 -0400 Received: from hera.kernel.org ([140.211.167.34]:36099 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747AbZFCHPD (ORCPT ); Wed, 3 Jun 2009 03:15:03 -0400 Received: from [192.168.101.6] (adsl-75-36-244-69.dsl.pltn13.sbcglobal.net [75.36.244.69]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n537DImi001546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jun 2009 07:13:28 GMT Message-ID: <4A262289.3020307@kernel.org> Date: Wed, 03 Jun 2009 00:13:13 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Ingo Molnar , Jesse Barnes , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , "Rafael J. Wysocki" CC: linux-kernel@vger.kernel.org, stable , linux-pci@vger.kernel.org, Pascal Terjan Subject: [PATCH] x86/pci: fix mmconfig detection with 32bit near 4g References: <1243625720.4426.0.camel@plop> <4A203BFD.7040000@kernel.org> <1243949325.19053.100.camel@plop> <4A256050.2020305@kernel.org> <1243969741.27062.11.camel@plop> <4A258F1C.7030707@kernel.org> <1243983068.1629.0.camel@plop> In-Reply-To: <1243983068.1629.0.camel@plop> X-Virus-Scanned: ClamAV 0.93.3/9416/Tue Jun 2 23:48:42 2009 on hera.kernel.org X-Virus-Status: Clean Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Pascal reported and bisected to commit: | x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case broke one system system. ACPI: Using IOAPIC for interrupt routing PCI: MCFG configuration 0: base f0000000 segment 0 buses 0 - 255 PCI: MCFG area at f0000000 reserved in ACPI motherboard resources PCI: Using MMCONFIG for extended config space it didn't have PCI: updated MCFG configuration 0: base f0000000 segment 0 buses 0 - 63 anymore, and try to use 0xf000000 - 0xffffffff for mmconfig for 32bit, mcfg_res->end could be 32bit only (if 64 res is not used) use end - 1 to pass the value in mcfg->end to avoid overflow don't need to worry about e820 path. they are 64 bit always - for 2.6.30 Reported-by: Pascal Terjan Bisected-by: Pascal Terjan Tested-by: Pascal Terjan Signed-off-by: Yinghai Lu Cc: stable@kernel.org --- arch/x86/pci/mmconfig-shared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/arch/x86/pci/mmconfig-shared.c =================================================================== --- linux-2.6.orig/arch/x86/pci/mmconfig-shared.c +++ linux-2.6/arch/x86/pci/mmconfig-shared.c @@ -375,7 +375,7 @@ static acpi_status __init check_mcfg_res if (!fixmem32) return AE_OK; if ((mcfg_res->start >= fixmem32->address) && - (mcfg_res->end <= (fixmem32->address + + (mcfg_res->end < (fixmem32->address + fixmem32->address_length))) { mcfg_res->flags = 1; return AE_CTRL_TERMINATE; @@ -392,7 +392,7 @@ static acpi_status __init check_mcfg_res return AE_OK; if ((mcfg_res->start >= address.minimum) && - (mcfg_res->end <= (address.minimum + address.address_length))) { + (mcfg_res->end < (address.minimum + address.address_length))) { mcfg_res->flags = 1; return AE_CTRL_TERMINATE; } @@ -418,7 +418,7 @@ static int __init is_acpi_reserved(u64 s struct resource mcfg_res; mcfg_res.start = start; - mcfg_res.end = end; + mcfg_res.end = end - 1; mcfg_res.flags = 0; acpi_get_devices("PNP0C01", find_mboard_resource, &mcfg_res, NULL);