]> git.baikalelectronics.ru Git - kernel.git/commit
x86: fix mttr trimming
authorYinghai Lu <yinghai.lu@sun.com>
Wed, 6 Feb 2008 21:39:45 +0000 (22:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 6 Feb 2008 21:39:45 +0000 (22:39 +0100)
commit8a278022a04b17d89d731942ff52f22f38576337
treea5081b8ffddf2d2d931c16ae2528fd3679ba9760
parent5150b7855580490c62271a7131e8ca1e8bb06869
x86: fix mttr trimming

Pavel Emelyanov reported that his networking card did not work
and bisected it down to:

"
The commit

  0ff5e78a4826b0b60ff4440d577c5b1708c2b5ec
  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>
arch/x86/kernel/cpu/mtrr/main.c