lkml.org 
[lkml]   [2008]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: bisected boot regression post 2.6.25-rc3.. please revert

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

> > I'm half tempted to just do it as inline period ... any objections ?
>
> Yes, I object. I want to understand why it would matter. If this is a
> compiler bug, it's a really rather bad one. And if it's just some
> stupid bug in our pmd_bad() macro, I still want to know what the
> problem was.

ok, i think i figured it out: on PAE 32-bit we dont properly sign-extend
to a 64-bit pmd value in the new pmd_bad() macro - so if any physical
RAM is above 4GB (Arjan's laptop had 4GB of RAM in it?) then we'll start
seeing those high bits. This definitely needs PAE and more than 4GB of
RAM to trigger.

The best fix is the one below (it should solve Arjan's regression with
that now-reverted patch redone), as it is the right thing to do [that
way sign auto-extend trickles over into PAGE_MASK as well].

It boots fine on a >4GB box of mine but changing the type of PAGE_SIZE
affects _everything_ so i'll keep testing it and i'd suggest to delay
this fix to shortly after -rc5 is released instead of risking -rc5 with
such a late commit. I'll send this and the re-done hugetlbfs fix
together early next week.

Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>

Index: linux/include/asm-x86/page.h
===================================================================
--- linux.orig/include/asm-x86/page.h
+++ linux/include/asm-x86/page.h
@@ -5,7 +5,7 @@

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
-#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
+#define PAGE_SIZE (_AC(1,L) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))

#ifdef __KERNEL__

\
 
 \ /
  Last update: 2008-03-09 12:59    [W:0.195 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site