mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Ricardo Jorge da Fonseca Marques Ferreira <storm@sys49152.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org,
	Yannick Roehlly <yannick.roehlly@free.fr>,
	Yinghai Lu <yinghai@kernel.org>,
	Jesse Barnes <jesse.barnes@intel.com>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Ingo Molnar <mingo@elte.hu>,
	x86@kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: Regression in ACPI in 2.6.31-rc5
Date: Mon, 05 Oct 2009 23:17:04 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.0910052312140.309@localhost.localdomain> (raw)
In-Reply-To: <200908160400.03391.storm@sys49152.net>

From: Len Brown <len.brown@intel.com>
Subject: [PATCH] Revert "x86/pci: remove rounding quirk from e820_setup_gap()"

This reverts commit 5d423ccd7ba4285f1084e91b26805e1d0ae978ed.

because it caused multiple regressions in 2.6.31-rc1

http://bugzilla.kernel.org/show_bug.cgi?id=13940

Signed-off-by: Len Brown <len.brown@intel.com>
---

Yinghai,
is there a reason we should not revert the offending patch, per below?

thanks,
-Len

 arch/x86/kernel/e820.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 85419bb..b322e30 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -617,7 +617,7 @@ __init int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
  */
 __init void e820_setup_gap(void)
 {
-	unsigned long gapstart, gapsize;
+	unsigned long gapstart, gapsize, round;
 	int found;
 
 	gapstart = 0x10000000;
@@ -634,9 +634,14 @@ __init void e820_setup_gap(void)
 #endif
 
 	/*
-	 * e820_reserve_resources_late protect stolen RAM already
+	 * See how much we want to round up: start off with
+	 * rounding to the next 1MB area.
 	 */
-	pci_mem_start = gapstart;
+	round = 0x100000;
+	while ((gapsize >> 4) > round)
+		round += round;
+	/* Fun with two's complement */
+	pci_mem_start = (gapstart + round) & -round;
 
 	printk(KERN_INFO
 	       "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n",
-- 
1.6.5.rc2.17.gdbc1b


  reply	other threads:[~2009-10-06  3:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 22:33 Ricardo Jorge da Fonseca Marques Ferreira
2009-08-13  3:53 ` Len Brown
2009-08-16  3:00   ` Ricardo Jorge da Fonseca Marques Ferreira
2009-10-06  3:17     ` Len Brown [this message]
2009-10-06  4:38       ` Yinghai Lu
     [not found]       ` <4ACAC8F1.1050706@kernel.org>
2009-10-11 21:17         ` [PATCH] pci: increase alignment to make more space for hidden code Yinghai Lu
2009-10-12 16:59           ` Bjorn Helgaas
2009-10-12 17:19             ` Ingo Molnar
2009-10-12 18:43               ` Yinghai Lu
2009-10-12 18:59             ` Yinghai Lu
2009-10-12 19:22               ` Ingo Molnar
2009-10-12 19:44                 ` Yinghai Lu
2009-10-13  6:08                   ` Bjorn Helgaas
2009-10-13  6:49                     ` Ingo Molnar
2009-10-13 15:15                       ` Bjorn Helgaas
2009-10-13 19:05                     ` Ricardo Jorge da Fonseca Marques Ferreira
2009-08-14 19:36 Regression in ACPI in 2.6.31-rc5 Ricardo Jorge da Fonseca Marques Ferreira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0910052312140.309@localhost.localdomain \
    --to=lenb@kernel.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jesse.barnes@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=storm@sys49152.net \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yannick.roehlly@free.fr \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®