linux/arch/x86/kernel/cpu/mtrr
Yinghai Lu 917a015362 x86: mtrr: Fix high_width computation when phys-addr is >= 44bit
found one system where cpu address line is 44bits, mtrr printout
is not right:

 [    0.000000] MTRR variable ranges enabled:
 [    0.000000]   0 base 0   00000000 mask FF0 00000000 write-back
 [    0.000000]   1 base 10  00000000 mask FFF 80000000 write-back
 [    0.000000]   2 base 0   80000000 mask FFF 80000000 uncachable
 [    0.000000]   3 base 0   7F800000 mask FFF FF800000 uncachable

Li Zefan and Frederic pointed out the high_width could be -4 some how.

It turns out when phys_addr is 44bit, size_or_mask will be
ffffffff,00000000 so ffs(size_or_mask) will be 0.

Try to check low 32 bit, to get correct high_width.

Signed-off-by: Yinghai Lu <yinghai@kerne.org>
Also-analyzed-by: Frederic Weisbecker <fweisbec@gmail.com>
Also-analyzed-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A026540.8060504@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-05-11 11:40:43 +02: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
cleanup.c x86: cpu/mttr/cleanup.c fix compilation warning 2009-03-18 13:14:31 +01:00
cyrix.c x86: remove long dead cyrix mtrr code 2008-02-04 16:48:01 +01:00
generic.c x86: mtrr: Fix high_width computation when phys-addr is >= 44bit 2009-05-11 11:40:43 +02:00
if.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
main.c x86: MTRR workaround for system with stange var MTRRs 2009-03-17 10:47:47 +01:00
Makefile x86: separate mtrr cleanup/mtrr_e820 trim to separate file 2009-03-13 02:52:19 +01:00
mtrr.h x86: MTRR workaround for system with stange var MTRRs 2009-03-17 10:47:47 +01:00
state.c x86: coding style fixes to arch/x86/kernel/cpu/mtrr/state.c 2008-04-17 17:40:49 +02:00