Skip to content
Commit 20651af9 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

x86: fix mttr trimming

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

"
The commit

  093af8d7


  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: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
Tested-by: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 971a52d6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment