android_kernel_samsung_msm8976/include
Jesse Barnes 99fc8d424b x86, 32-bit: trim memory not covered by wb mtrrs
On some machines, buggy BIOSes don't properly setup WB MTRRs to cover all
available RAM, meaning the last few megs (or even gigs) of memory will be
marked uncached.  Since Linux tends to allocate from high memory addresses
first, this causes the machine to be unusably slow as soon as the kernel
starts really using memory (i.e.  right around init time).

This patch works around the problem by scanning the MTRRs at boot and
figuring out whether the current end_pfn value (setup by early e820 code)
goes beyond the highest WB MTRR range, and if so, trimming it to match.  A
fairly obnoxious KERN_WARNING is printed too, letting the user know that
not all of their memory is available due to a likely BIOS bug.

Something similar could be done on i386 if needed, but the boot ordering
would be slightly different, since the MTRR code on i386 depends on the
boot_cpu_data structure being setup.

This patch fixes a bug in the last patch that caused the code to run on
non-Intel machines (AMD machines apparently don't need it and it's untested
on other non-Intel machines, so best keep it off).

Further enhancements and fixes from:

  Yinghai Lu <Yinghai.Lu@Sun.COM>
  Andi Kleen <ak@suse.de>

Signed-off-by: Jesse Barnes <jesse.barnes@intel.com>
Tested-by: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:33:18 +01:00
..
acpi x86: dummy placeholder for acpi/reboot.h 2008-01-30 13:31:17 +01:00
asm-alpha
asm-arm
asm-avr32
asm-blackfin
asm-cris
asm-frv
asm-generic percpu: make the asm-generic/percpu.h more "generic" 2008-01-30 13:32:52 +01:00
asm-h8300
asm-ia64 percpu: move arch XX_PER_CPU_XX definitions into linux/percpu.h 2008-01-30 13:32:52 +01:00
asm-m32r core: remove last users of empty FASTCALL macro 2008-01-30 13:31:17 +01:00
asm-m68k
asm-m68knommu
asm-mips [MIPS] Malta, Atlas: move an extern function declaration to the header file 2008-01-29 10:15:05 +00:00
asm-parisc
asm-powerpc percpu: move arch XX_PER_CPU_XX definitions into linux/percpu.h 2008-01-30 13:32:52 +01:00
asm-ppc
asm-s390 percpu: move arch XX_PER_CPU_XX definitions into linux/percpu.h 2008-01-30 13:32:52 +01:00
asm-sh
asm-sparc
asm-sparc64 percpu: move arch XX_PER_CPU_XX definitions into linux/percpu.h 2008-01-30 13:32:52 +01:00
asm-um git-x86: unbreak UML 2008-01-30 13:32:38 +01:00
asm-v850
asm-x86 x86, 32-bit: trim memory not covered by wb mtrrs 2008-01-30 13:33:18 +01:00
asm-xtensa
crypto
keys
linux x86: print which shared library/executable faulted in segfault etc. messages v3 2008-01-30 13:33:18 +01:00
math-emu
media
mtd
net
pcmcia
rdma
rxrpc
scsi
sound
video
xen x86: page.h: make pte_t a union to always include 2008-01-30 13:32:57 +01:00
Kbuild