diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/generic.c')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/generic.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 55d31ff118fb..103d61a59b19 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "mtrr.h" | 14 | #include "mtrr.h" |
15 | 15 | ||
16 | struct mtrr_state { | 16 | struct mtrr_state { |
17 | struct mtrr_var_range *var_ranges; | 17 | struct mtrr_var_range var_ranges[MAX_VAR_RANGES]; |
18 | mtrr_type fixed_ranges[NUM_FIXED_RANGES]; | 18 | mtrr_type fixed_ranges[NUM_FIXED_RANGES]; |
19 | unsigned char enabled; | 19 | unsigned char enabled; |
20 | unsigned char have_fixed; | 20 | unsigned char have_fixed; |
@@ -86,12 +86,6 @@ void __init get_mtrr_state(void) | |||
86 | struct mtrr_var_range *vrs; | 86 | struct mtrr_var_range *vrs; |
87 | unsigned lo, dummy; | 87 | unsigned lo, dummy; |
88 | 88 | ||
89 | if (!mtrr_state.var_ranges) { | ||
90 | mtrr_state.var_ranges = kmalloc(num_var_ranges * sizeof (struct mtrr_var_range), | ||
91 | GFP_KERNEL); | ||
92 | if (!mtrr_state.var_ranges) | ||
93 | return; | ||
94 | } | ||
95 | vrs = mtrr_state.var_ranges; | 89 | vrs = mtrr_state.var_ranges; |
96 | 90 | ||
97 | rdmsr(MTRRcap_MSR, lo, dummy); | 91 | rdmsr(MTRRcap_MSR, lo, dummy); |