Skip to content

Commit 388692e

Browse files
maddy-kerneldevmpe
authored andcommitted
powerpc/kernel: Cleanup machine check function declarations
__machine_check_early_realmode_p*() are currently declared as extern in cputable.c and because of this when compiled with "C=1" (which enables semantic checker) produces these warnings. CHECK arch/powerpc/kernel/mce_power.c arch/powerpc/kernel/mce_power.c:709:6: warning: symbol '__machine_check_early_realmode_p7' was not declared. Should it be static? arch/powerpc/kernel/mce_power.c:717:6: warning: symbol '__machine_check_early_realmode_p8' was not declared. Should it be static? arch/powerpc/kernel/mce_power.c:722:6: warning: symbol '__machine_check_early_realmode_p9' was not declared. Should it be static? arch/powerpc/kernel/mce_power.c:740:6: warning: symbol '__machine_check_early_realmode_p10' was not declared. Should it be static? Patch here moves the declaration to asm/mce.h and includes the same in cputable.c Fixes: ae744f3 ("powerpc/book3s: Flush SLB/TLBs if we get SLB/TLB machine check errors on power8") Fixes: 7b9f71f ("powerpc/64s: POWER9 machine check handler") Signed-off-by: Madhavan Srinivasan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 327da00 commit 388692e

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

arch/powerpc/include/asm/cputable.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
#ifndef __ASSEMBLY__
1111

12+
/*
13+
* Added to include __machine_check_early_realmode_* functions
14+
*/
15+
#include <asm/mce.h>
16+
1217
/* This structure can grow, it's real size is used by head.S code
1318
* via the mkdefs mechanism.
1419
*/

arch/powerpc/include/asm/mce.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ struct mce_error_info {
210210
#define MCE_EVENT_RELEASE true
211211
#define MCE_EVENT_DONTRELEASE false
212212

213+
struct pt_regs;
214+
struct notifier_block;
215+
213216
extern void save_mce_event(struct pt_regs *regs, long handled,
214217
struct mce_error_info *mce_err, uint64_t nip,
215218
uint64_t addr, uint64_t phys_addr);
@@ -225,5 +228,9 @@ int mce_register_notifier(struct notifier_block *nb);
225228
int mce_unregister_notifier(struct notifier_block *nb);
226229
#ifdef CONFIG_PPC_BOOK3S_64
227230
void flush_and_reload_slb(void);
231+
long __machine_check_early_realmode_p7(struct pt_regs *regs);
232+
long __machine_check_early_realmode_p8(struct pt_regs *regs);
233+
long __machine_check_early_realmode_p9(struct pt_regs *regs);
234+
long __machine_check_early_realmode_p10(struct pt_regs *regs);
228235
#endif /* CONFIG_PPC_BOOK3S_64 */
229236
#endif /* __ASM_PPC64_MCE_H__ */

arch/powerpc/kernel/cputable.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
7272
extern void __restore_cpu_power9(void);
7373
extern void __setup_cpu_power10(unsigned long offset, struct cpu_spec* spec);
7474
extern void __restore_cpu_power10(void);
75-
extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
76-
extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
77-
extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
78-
extern long __machine_check_early_realmode_p10(struct pt_regs *regs);
7975
#endif /* CONFIG_PPC64 */
8076
#if defined(CONFIG_E500)
8177
extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);

arch/powerpc/kernel/dt_cpu_ftrs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ struct dt_cpu_feature {
6464
* Set up the base CPU
6565
*/
6666

67-
extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
68-
extern long __machine_check_early_realmode_p9(struct pt_regs *regs);
69-
extern long __machine_check_early_realmode_p10(struct pt_regs *regs);
70-
7167
static int hv_mode;
7268

7369
static struct {

0 commit comments

Comments
 (0)