aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-08-21 20:00:02 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-08-21 20:00:02 -0400
commit5400743db5a06a4e6e298725a2044c40edcb27b9 (patch)
treefc563d843e5029c2ad278c12daa1fa7ab1806e0f /arch
parentd0af9eed5aa91b6b7b5049cae69e5ea956fd85c3 (diff)
x86, mtrr: make mtrr_aps_delayed_init static bool
mtr_aps_delayed_init was declared u32 and made global, but it only ever takes boolean values and is only ever used in arch/x86/kernel/cpu/mtrr/main.c. Declare it "static bool" and remove external references. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/mtrr.h1
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h
index d5366ec5cb8f..4365ffdb461f 100644
--- a/arch/x86/include/asm/mtrr.h
+++ b/arch/x86/include/asm/mtrr.h
@@ -126,7 +126,6 @@ extern void mtrr_aps_init(void);
126extern void mtrr_bp_restore(void); 126extern void mtrr_bp_restore(void);
127extern int mtrr_trim_uncached_memory(unsigned long end_pfn); 127extern int mtrr_trim_uncached_memory(unsigned long end_pfn);
128extern int amd_special_default_mtrr(void); 128extern int amd_special_default_mtrr(void);
129extern u32 mtrr_aps_delayed_init;
130# else 129# else
131static inline u8 mtrr_type_lookup(u64 addr, u64 end) 130static inline u8 mtrr_type_lookup(u64 addr, u64 end)
132{ 131{
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 7339be0aa580..84e83de54575 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -58,7 +58,7 @@ unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];
58static DEFINE_MUTEX(mtrr_mutex); 58static DEFINE_MUTEX(mtrr_mutex);
59 59
60u64 size_or_mask, size_and_mask; 60u64 size_or_mask, size_and_mask;
61u32 mtrr_aps_delayed_init; 61static bool mtrr_aps_delayed_init;
62 62
63static struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM]; 63static struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM];
64 64
@@ -758,7 +758,7 @@ void set_mtrr_aps_delayed_init(void)
758 if (!use_intel()) 758 if (!use_intel())
759 return; 759 return;
760 760
761 mtrr_aps_delayed_init = 1; 761 mtrr_aps_delayed_init = true;
762} 762}
763 763
764/* 764/*
@@ -770,7 +770,7 @@ void mtrr_aps_init(void)
770 return; 770 return;
771 771
772 set_mtrr(~0U, 0, 0, 0); 772 set_mtrr(~0U, 0, 0, 0);
773 mtrr_aps_delayed_init = 0; 773 mtrr_aps_delayed_init = false;
774} 774}
775 775
776void mtrr_bp_restore(void) 776void mtrr_bp_restore(void)