public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-wireless <linux-wireless@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>,
	Andrew Morton <akpm@linux-foundation.org>,
	"John W. Linville" <linville@tuxdriver.com>,
	berndl81@gmx.at, Greg KH <greg@kroah.com>
Subject: Re: Reverting 5d423 fixes loading of ath9k on Acer Extensa 7630EZ
Date: Thu, 5 Nov 2009 08:14:31 +0100	[thread overview]
Message-ID: <20091105071431.GA14055@elte.hu> (raw)
In-Reply-To: <alpine.LFD.2.01.0911041551220.31845@localhost.localdomain>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Wed, 4 Nov 2009, Luis R. Rodriguez wrote:
> > 
> > Can you please consider reviewing this issue and help determine if 
> > this indeed needs to be reverted for 2.6.32 and the next 2.6.31.y.
> > 
> > I am curious if other devices would work by reverting this as well.
> > [ ... ] For details please feel free to check:
> > 
> > http://bugzilla.kernel.org/show_bug.cgi?id=14402
> 
> That same commit was the cause for
> 
> 	http://bugzilla.kernel.org/show_bug.cgi?id=13940
> 
> and we just increased the rounding to make it go away (see commit 
> 15b812f1). But that was a hack.
> 
> And if that didn't help the ath9k case, then we should just revert 
> entirely.

Agreed - below is the combo 15b812f1 + 5d423ccd revert. (Would be nice 
to get the boot log of the latest post-15b812f1 kernel that Yinghai 
asked for before we revert, in the hope of better understanding the 
problem.)

Thanks,

	Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index d17d482..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",
@@ -1378,8 +1383,8 @@ static unsigned long ram_alignment(resource_size_t pos)
 	if (mb < 16)
 		return 1024*1024;
 
-	/* To 64MB for anything above that */
-	return 64*1024*1024;
+	/* To 32MB for anything above that */
+	return 32*1024*1024;
 }
 
 #define MAX_RESOURCE_SIZE ((resource_size_t)-1)

  parent reply	other threads:[~2009-11-05  7:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 23:40 Reverting 5d423 fixes loading of ath9k on Acer Extensa 7630EZ Luis R. Rodriguez
2009-11-04 23:57 ` Linus Torvalds
2009-11-05  0:16   ` Luis R. Rodriguez
2009-11-05  1:30     ` Yinghai Lu
2009-11-05  1:40       ` Luis R. Rodriguez
2009-11-05  7:14   ` Ingo Molnar [this message]
2009-11-08 19:35     ` Luis R. Rodriguez
2009-11-09  7:15       ` Ingo Molnar
2009-11-09 15:49         ` Luis R. Rodriguez
2009-11-10 20:30           ` Luis R. Rodriguez
2009-11-10 20:50             ` Luis R. Rodriguez

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=20091105071431.GA14055@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=berndl81@gmx.at \
    --cc=greg@kroah.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jesse.barnes@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=torvalds@linux-foundation.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