[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1568787573-1297-3-git-send-email-TonyWWang-oc@zhaoxin.com>
Date: Wed, 18 Sep 2019 14:19:31 +0800
From: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
To: <tony.luck@...el.com>, <bp@...en8.de>, <tglx@...utronix.de>,
<mingo@...hat.com>, <hpa@...or.com>, <x86@...nel.org>,
<linux-edac@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<yazen.ghannam@....com>, <vishal.l.verma@...el.com>,
<qiuxu.zhuo@...el.com>
CC: <DavidWang@...oxin.com>, <CooperYan@...oxin.com>,
<QiyuanWang@...oxin.com>, <HerryYang@...oxin.com>
Subject: [PATCH v4 2/4] x86/mce: Make 3 functions non-static
These functions are declared static and cannot be used in others
.c source file. this commit removes the static attribute and adds
the declaration to the header for these functions.
Signed-off-by: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
---
arch/x86/kernel/cpu/mce/intel.c | 6 +++---
arch/x86/kernel/cpu/mce/internal.h | 6 ++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
index 88cd959..70799a5 100644
--- a/arch/x86/kernel/cpu/mce/intel.c
+++ b/arch/x86/kernel/cpu/mce/intel.c
@@ -423,7 +423,7 @@ void cmci_disable_bank(int bank)
raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
}
-static void intel_init_cmci(void)
+void intel_init_cmci(void)
{
int banks;
@@ -442,7 +442,7 @@ static void intel_init_cmci(void)
cmci_recheck();
}
-static void intel_init_lmce(void)
+void intel_init_lmce(void)
{
u64 val;
@@ -455,7 +455,7 @@ static void intel_init_lmce(void)
wrmsrl(MSR_IA32_MCG_EXT_CTL, val | MCG_EXT_CTL_LMCE_EN);
}
-static void intel_clear_lmce(void)
+void intel_clear_lmce(void)
{
u64 val;
diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h
index 43031db..842b273 100644
--- a/arch/x86/kernel/cpu/mce/internal.h
+++ b/arch/x86/kernel/cpu/mce/internal.h
@@ -45,11 +45,17 @@ unsigned long cmci_intel_adjust_timer(unsigned long interval);
bool mce_intel_cmci_poll(void);
void mce_intel_hcpu_update(unsigned long cpu);
void cmci_disable_bank(int bank);
+void intel_init_cmci(void);
+void intel_init_lmce(void);
+void intel_clear_lmce(void);
#else
# define cmci_intel_adjust_timer mce_adjust_timer_default
static inline bool mce_intel_cmci_poll(void) { return false; }
static inline void mce_intel_hcpu_update(unsigned long cpu) { }
static inline void cmci_disable_bank(int bank) { }
+static inline void intel_init_cmci(void) { }
+static inline void intel_init_lmce(void) { }
+static inline void intel_clear_lmce(void) { }
#endif
void mce_timer_kick(unsigned long interval);
--
2.7.4
Powered by blists - more mailing lists