diff options
author | Bernhard Kaindl <bk@suse.de> | 2007-05-02 13:27:17 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:17 -0400 |
commit | 2b3b4835c94226681c496de9446d456dcf42ed08 (patch) | |
tree | a7f005ccb038107153059691dbabf048b560521d /arch/i386 | |
parent | 856f44ff4af6e57fdc39a8b2bec498c88438bd27 (diff) |
[PATCH] x86: Adds mtrr_save_fixed_ranges() for use in two later patches.
In this current implementation which is used in other patches,
mtrr_save_fixed_ranges() accepts a dummy void pointer because
in the current implementation of one of these patches, this
function may be called from smp_call_function_single() which
requires that this function takes a void pointer argument.
This function calls get_fixed_ranges(), passing mtrr_state.fixed_ranges
which is the element of the static struct which stores our current
backup of the fixed-range MTRR values which all CPUs shall be
using.
Because mtrr_save_fixed_ranges calls get_fixed_ranges after
kernel initialisation time, __init needs to be removed from
the declaration of get_fixed_ranges().
If CONFIG_MTRR is not set, we define mtrr_save_fixed_ranges
as an empty statement because there is nothing to do.
AK: Moved prototypes for x86-64 around to fix warnings
Signed-off-by: Bernhard Kaindl <bk@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/cpu/mtrr/generic.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 68b383788882..150cf5055a3c 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c | |||
@@ -37,7 +37,7 @@ get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr) | |||
37 | rdmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi); | 37 | rdmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void __init | 40 | static void |
41 | get_fixed_ranges(mtrr_type * frs) | 41 | get_fixed_ranges(mtrr_type * frs) |
42 | { | 42 | { |
43 | unsigned int *p = (unsigned int *) frs; | 43 | unsigned int *p = (unsigned int *) frs; |
@@ -51,6 +51,11 @@ get_fixed_ranges(mtrr_type * frs) | |||
51 | rdmsr(MTRRfix4K_C0000_MSR + i, p[6 + i * 2], p[7 + i * 2]); | 51 | rdmsr(MTRRfix4K_C0000_MSR + i, p[6 + i * 2], p[7 + i * 2]); |
52 | } | 52 | } |
53 | 53 | ||
54 | void mtrr_save_fixed_ranges(void *info) | ||
55 | { | ||
56 | get_fixed_ranges(mtrr_state.fixed_ranges); | ||
57 | } | ||
58 | |||
54 | static void __init print_fixed(unsigned base, unsigned step, const mtrr_type*types) | 59 | static void __init print_fixed(unsigned base, unsigned step, const mtrr_type*types) |
55 | { | 60 | { |
56 | unsigned i; | 61 | unsigned i; |