diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/cpu/mtrr/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 1cf466df330a..7202b98aac4f 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c | |||
@@ -734,10 +734,13 @@ void mtrr_ap_init(void) | |||
734 | */ | 734 | */ |
735 | void mtrr_save_state(void) | 735 | void mtrr_save_state(void) |
736 | { | 736 | { |
737 | if (smp_processor_id() == 0) | 737 | int cpu = get_cpu(); |
738 | |||
739 | if (cpu == 0) | ||
738 | mtrr_save_fixed_ranges(NULL); | 740 | mtrr_save_fixed_ranges(NULL); |
739 | else | 741 | else |
740 | smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); | 742 | smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); |
743 | put_cpu(); | ||
741 | } | 744 | } |
742 | 745 | ||
743 | static int __init mtrr_init_finialize(void) | 746 | static int __init mtrr_init_finialize(void) |