aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/cpu/mtrr/generic.c7
-rw-r--r--include/asm-i386/mtrr.h2
-rw-r--r--include/asm-x86_64/mtrr.h2
3 files changed, 10 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
40static void __init 40static void
41get_fixed_ranges(mtrr_type * frs) 41get_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
54void mtrr_save_fixed_ranges(void *info)
55{
56 get_fixed_ranges(mtrr_state.fixed_ranges);
57}
58
54static void __init print_fixed(unsigned base, unsigned step, const mtrr_type*types) 59static void __init print_fixed(unsigned base, unsigned step, const mtrr_type*types)
55{ 60{
56 unsigned i; 61 unsigned i;
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
72extern void mtrr_save_fixed_ranges(void *);
72extern int mtrr_add (unsigned long base, unsigned long size, 73extern int mtrr_add (unsigned long base, unsigned long size,
73 unsigned int type, char increment); 74 unsigned int type, char increment);
74extern int mtrr_add_page (unsigned long base, unsigned long size, 75extern 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);
79extern void mtrr_ap_init(void); 80extern void mtrr_ap_init(void);
80extern void mtrr_bp_init(void); 81extern void mtrr_bp_init(void);
81# else 82# else
83#define mtrr_save_fixed_ranges(arg) do {} while (0)
82static __inline__ int mtrr_add (unsigned long base, unsigned long size, 84static __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
139extern void mtrr_ap_init(void); 139extern void mtrr_ap_init(void);
140extern void mtrr_bp_init(void); 140extern void mtrr_bp_init(void);
141extern 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__ */