linux/arch/x86/kernel/cpu/mtrr
zhenzhong.duan 2da06af810 x86, mtrr: Fix a type overflow in range_to_mtrr func
When boot on sun G5+ with 4T mem, see an overflow in mtrr cleanup as below.

*BAD*gran_size: 2G      chunk_size: 2G  num_reg: 10     lose cover RAM:
-18014398505283592M

This is because 1<<31 sign extended. Use an unsigned long constant to
fix it.  Useful for mem larger than or equal to 4T.

-v2: Use 64bit constant instead of explicit type conversion as suggested
by Yinghai. Description updated too.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Link: http://lkml.kernel.org/r/4FC5A77F.6060505@oracle.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-05-30 14:37:00 -07:00
..
amd.c x86, mtrr: Constify struct mtrr_ops 2010-02-01 11:20:43 -08:00
centaur.c x86, mtrr: Constify struct mtrr_ops 2010-02-01 11:20:43 -08:00
cleanup.c x86, mtrr: Fix a type overflow in range_to_mtrr func 2012-05-30 14:37:00 -07:00
cyrix.c x86, mtrr: Constify struct mtrr_ops 2010-02-01 11:20:43 -08:00
generic.c Disintegrate asm/system.h for X86 2012-03-28 18:11:12 +01:00
if.c x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls 2012-03-01 12:48:52 -08:00
main.c mtrr: fix UP breakage caused during switch to stop_machine 2011-08-25 11:02:29 -07:00
Makefile x86, mtrr: Remove unused mtrr/state.c 2010-02-04 10:01:38 +01:00
mtrr.h x86, mtrr: Constify struct mtrr_ops 2010-02-01 11:20:43 -08:00