From patchwork Mon Oct 4 16:16:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 228811 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o94HOq25004239 for ; Mon, 4 Oct 2010 17:25:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756336Ab0JDQQe (ORCPT ); Mon, 4 Oct 2010 12:16:34 -0400 Received: from g6t0186.atlanta.hp.com ([15.193.32.63]:6805 "EHLO g6t0186.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756329Ab0JDQQe (ORCPT ); Mon, 4 Oct 2010 12:16:34 -0400 Received: from g5t0029.atlanta.hp.com (g5t0029.atlanta.hp.com [16.228.8.141]) by g6t0186.atlanta.hp.com (Postfix) with ESMTP id 581602C8D1; Mon, 4 Oct 2010 16:16:33 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g5t0029.atlanta.hp.com (Postfix) with ESMTP id A7E6B2003D; Mon, 4 Oct 2010 16:16:32 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 70910CF0008; Mon, 4 Oct 2010 10:16:32 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zrV8M1knnCbD; Mon, 4 Oct 2010 10:16:32 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 5BCEDCF0007; Mon, 4 Oct 2010 10:16:32 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id 28EF726221; Mon, 4 Oct 2010 10:16:32 -0600 (MDT) Subject: [PATCH] x86/PCI: MMCONFIG: fix region end calculation To: Jesse Barnes From: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, x86@kernel.org, Yinghai Lu Date: Mon, 04 Oct 2010 10:16:32 -0600 Message-ID: <20101004161632.24994.62111.stgit@bob.kio> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 04 Oct 2010 17:25:33 +0000 (UTC) diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index a918553..5cfe94c 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -85,7 +85,7 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, num_buses = end - start + 1; res = &new->res; res->start = addr + PCI_MMCFG_BUS_OFFSET(start); - res->end = addr + PCI_MMCFG_BUS_OFFSET(num_buses) - 1; + res->end = addr + PCI_MMCFG_BUS_OFFSET(end + 1) - 1; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end);