From: Andrew Morton Date: Sun, 1 Jul 2007 19:06:48 +0000 (-0700) Subject: i386: mtrr crash fix X-Git-Tag: v2.6.22-rc7~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=84288ad89e9736c7478e138f247397b9ab7a9d28;p=linux-2.6-omap-h63xx.git i386: mtrr crash fix Commit 3ebad5905609476a4ff1151a66b21d9794009961 ("[PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending") added mtrr operations without verifying that the CPU has MTRRs. Crashes transmeta CPUs. Cc: "H. Peter Anvin" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 5a551fb7ea7..f6e46943e6e 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c @@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs) void mtrr_save_fixed_ranges(void *info) { - get_fixed_ranges(mtrr_state.fixed_ranges); + if (cpu_has_mtrr) + get_fixed_ranges(mtrr_state.fixed_ranges); } static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)