From patchwork Tue Apr 14 20:50:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 18228 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 n3EKqkwH005792 for ; Tue, 14 Apr 2009 20:52:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752512AbZDNUw1 (ORCPT ); Tue, 14 Apr 2009 16:52:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753511AbZDNUw1 (ORCPT ); Tue, 14 Apr 2009 16:52:27 -0400 Received: from hera.kernel.org ([140.211.167.34]:41375 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbZDNUw0 (ORCPT ); Tue, 14 Apr 2009 16:52:26 -0400 Received: from [10.6.76.26] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n3EKogV6023975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Apr 2009 20:50:43 GMT Message-ID: <49E4F71F.10107@kernel.org> Date: Tue, 14 Apr 2009 13:50:39 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: Jesse Barnes , Ingo Molnar , Andrew Morton , Thomas Gleixner , "H. Peter Anvin" CC: Linus Torvalds , "linux-kernel@vger.kernel.org" , linux-pci@vger.kernel.org, yannick.roehlly@free.fr Subject: [PATCH] x86/pci: make pci_mem_start to be aligned only References: <200904101913.n3AJDhMm018684@demeter.kernel.org> <49DFABCC.3070001@kernel.org> <49E00E9F.8030605@kernel.org> <49E4F6D6.6030709@kernel.org> In-Reply-To: <49E4F6D6.6030709@kernel.org> X-Virus-Scanned: ClamAV 0.93.3/9236/Tue Apr 14 18:51:03 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 Impact: make more big space below 4g for assigning to unassigned pci devices don't need to reserved one round after the gapstart. Reported-and-tested-by: Yannick Signed-off-by: Yinghai Lu --- 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 diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index ef2c356..a0ba9b1 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -642,7 +642,7 @@ __init void e820_setup_gap(void) while ((gapsize >> 4) > round) round += round; /* Fun with two's complement */ - pci_mem_start = (gapstart + round) & -round; + pci_mem_start = roundup(gapstart, round); printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n",