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 /include | |
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 'include')
-rw-r--r-- | include/asm-i386/mtrr.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/mtrr.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-i386/mtrr.h b/include/asm-i386/mtrr.h index 07f063ae26ea..02a41b99bd7e 100644 --- a/include/asm-i386/mtrr.h +++ b/include/asm-i386/mtrr.h | |||
@@ -69,6 +69,7 @@ struct mtrr_gentry | |||
69 | 69 | ||
70 | /* The following functions are for use by other drivers */ | 70 | /* The following functions are for use by other drivers */ |
71 | # ifdef CONFIG_MTRR | 71 | # ifdef CONFIG_MTRR |
72 | extern void mtrr_save_fixed_ranges(void *); | ||
72 | extern int mtrr_add (unsigned long base, unsigned long size, | 73 | extern int mtrr_add (unsigned long base, unsigned long size, |
73 | unsigned int type, char increment); | 74 | unsigned int type, char increment); |
74 | extern int mtrr_add_page (unsigned long base, unsigned long size, | 75 | extern int mtrr_add_page (unsigned long base, unsigned long size, |
@@ -79,6 +80,7 @@ extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi); | |||
79 | extern void mtrr_ap_init(void); | 80 | extern void mtrr_ap_init(void); |
80 | extern void mtrr_bp_init(void); | 81 | extern void mtrr_bp_init(void); |
81 | # else | 82 | # else |
83 | #define mtrr_save_fixed_ranges(arg) do {} while (0) | ||
82 | static __inline__ int mtrr_add (unsigned long base, unsigned long size, | 84 | static __inline__ int mtrr_add (unsigned long base, unsigned long size, |
83 | unsigned int type, char increment) | 85 | unsigned int type, char increment) |
84 | { | 86 | { |
diff --git a/include/asm-x86_64/mtrr.h b/include/asm-x86_64/mtrr.h index 66809eca98cf..1b326cbb9305 100644 --- a/include/asm-x86_64/mtrr.h +++ b/include/asm-x86_64/mtrr.h | |||
@@ -138,9 +138,11 @@ struct mtrr_gentry32 | |||
138 | #ifdef CONFIG_MTRR | 138 | #ifdef CONFIG_MTRR |
139 | extern void mtrr_ap_init(void); | 139 | extern void mtrr_ap_init(void); |
140 | extern void mtrr_bp_init(void); | 140 | extern void mtrr_bp_init(void); |
141 | extern void mtrr_save_fixed_ranges(void *); | ||
141 | #else | 142 | #else |
142 | #define mtrr_ap_init() do {} while (0) | 143 | #define mtrr_ap_init() do {} while (0) |
143 | #define mtrr_bp_init() do {} while (0) | 144 | #define mtrr_bp_init() do {} while (0) |
145 | #define mtrr_save_fixed_ranges(arg) do {} while (0) | ||
144 | #endif | 146 | #endif |
145 | 147 | ||
146 | #endif /* __KERNEL__ */ | 148 | #endif /* __KERNEL__ */ |