android_kernel_xiaomi_sdm845/arch/x86/kernel/cpu/mtrr
Yinghai Lu 20651af9ac x86: fix mttr trimming
Pavel Emelyanov reported that his networking card did not work
and bisected it down to:

"
The commit

  093af8d7f0
  x86_32: trim memory by updating e820

broke my e1000 card: on loading driver says that

  e1000: probe of 0000:04:03.0 failed with error -5

and the interface doesn't appear.
"

on a 32-bit kernel, base will overflow when try to do PAGE_SHIFT,
and highest_addr will always less 4G.

So use pfn instead of address to avoid the overflow when more than
4g RAM is installed on a 32-bit kernel.

Many thanks to Pavel Emelyanov for reporting and testing it.

Bisected-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Tested-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-02-06 22:39:45 +01:00
..
amd.c x86: mtrr use type bool [RESEND AGAIN] 2008-01-30 13:30:31 +01:00
centaur.c i386: move kernel/cpu/mtrr 2007-10-11 11:16:28 +02:00
cyrix.c x86: remove long dead cyrix mtrr code 2008-02-04 16:48:01 +01:00
generic.c x86, 32-bit: trim memory not covered by wb mtrrs 2008-01-30 13:33:18 +01:00
if.c x86, 32-bit: trim memory not covered by wb mtrrs 2008-01-30 13:33:18 +01:00
main.c x86: fix mttr trimming 2008-02-06 22:39:45 +01:00
Makefile i386: move kernel/cpu/mtrr 2007-10-11 11:16:28 +02:00
mtrr.h x86: add cpu mtrr init function definitions to mtrr.h 2008-02-04 16:48:05 +01:00
state.c x86: use CR0 defines. 2008-01-30 13:30:39 +01:00