aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2018-12-05 15:05:13 -0500
committerBorislav Petkov <bp@suse.de>2018-12-06 06:04:52 -0500
commit3bfaf95cb1fe81872df884956c704469e68a5bee (patch)
tree6d4d88383bb311f34e92dc71ad733277f0ccc320
parent21afaf181362b4aeb5be72705d2914673b336149 (diff)
x86/mce: Unify pr_* prefix
Move the pr_fmt prefix to internal.h and include it everywhere. This way, all pr_* printed strings will be prepended with "mce: ". No functional changes. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Link: https://lkml.kernel.org/r/20181205200913.GR29510@zn.tnic
-rw-r--r--arch/x86/kernel/cpu/mce/core.c2
-rw-r--r--arch/x86/kernel/cpu/mce/dev-mcelog.c2
-rw-r--r--arch/x86/kernel/cpu/mce/internal.h3
-rw-r--r--arch/x86/kernel/cpu/mce/p5.c2
-rw-r--r--arch/x86/kernel/cpu/mce/therm_throt.c2
-rw-r--r--arch/x86/kernel/cpu/mce/threshold.c2
-rw-r--r--arch/x86/kernel/cpu/mce/winchip.c2
7 files changed, 11 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index b0ae12cf7827..ad8f62a0c706 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -8,8 +8,6 @@
8 * Author: Andi Kleen 8 * Author: Andi Kleen
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
13#include <linux/thread_info.h> 11#include <linux/thread_info.h>
14#include <linux/capability.h> 12#include <linux/capability.h>
15#include <linux/miscdevice.h> 13#include <linux/miscdevice.h>
diff --git a/arch/x86/kernel/cpu/mce/dev-mcelog.c b/arch/x86/kernel/cpu/mce/dev-mcelog.c
index 41d9169d27fa..9690ec5c8051 100644
--- a/arch/x86/kernel/cpu/mce/dev-mcelog.c
+++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c
@@ -8,8 +8,6 @@
8 * Author: Andi Kleen 8 * Author: Andi Kleen
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
13#include <linux/miscdevice.h> 11#include <linux/miscdevice.h>
14#include <linux/slab.h> 12#include <linux/slab.h>
15#include <linux/kmod.h> 13#include <linux/kmod.h>
diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h
index ceb67cd5918f..af5eab1e65e2 100644
--- a/arch/x86/kernel/cpu/mce/internal.h
+++ b/arch/x86/kernel/cpu/mce/internal.h
@@ -2,6 +2,9 @@
2#ifndef __X86_MCE_INTERNAL_H__ 2#ifndef __X86_MCE_INTERNAL_H__
3#define __X86_MCE_INTERNAL_H__ 3#define __X86_MCE_INTERNAL_H__
4 4
5#undef pr_fmt
6#define pr_fmt(fmt) "mce: " fmt
7
5#include <linux/device.h> 8#include <linux/device.h>
6#include <asm/mce.h> 9#include <asm/mce.h>
7 10
diff --git a/arch/x86/kernel/cpu/mce/p5.c b/arch/x86/kernel/cpu/mce/p5.c
index 5cddf831720f..4ae6df556526 100644
--- a/arch/x86/kernel/cpu/mce/p5.c
+++ b/arch/x86/kernel/cpu/mce/p5.c
@@ -14,6 +14,8 @@
14#include <asm/mce.h> 14#include <asm/mce.h>
15#include <asm/msr.h> 15#include <asm/msr.h>
16 16
17#include "internal.h"
18
17/* By default disabled */ 19/* By default disabled */
18int mce_p5_enabled __read_mostly; 20int mce_p5_enabled __read_mostly;
19 21
diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c
index 2da67b70ba98..df01ff8513a5 100644
--- a/arch/x86/kernel/cpu/mce/therm_throt.c
+++ b/arch/x86/kernel/cpu/mce/therm_throt.c
@@ -30,6 +30,8 @@
30#include <asm/msr.h> 30#include <asm/msr.h>
31#include <asm/trace/irq_vectors.h> 31#include <asm/trace/irq_vectors.h>
32 32
33#include "internal.h"
34
33/* How long to wait between reporting thermal events */ 35/* How long to wait between reporting thermal events */
34#define CHECK_INTERVAL (300 * HZ) 36#define CHECK_INTERVAL (300 * HZ)
35 37
diff --git a/arch/x86/kernel/cpu/mce/threshold.c b/arch/x86/kernel/cpu/mce/threshold.c
index 2b584b319eff..10586a85c23f 100644
--- a/arch/x86/kernel/cpu/mce/threshold.c
+++ b/arch/x86/kernel/cpu/mce/threshold.c
@@ -10,6 +10,8 @@
10#include <asm/mce.h> 10#include <asm/mce.h>
11#include <asm/trace/irq_vectors.h> 11#include <asm/trace/irq_vectors.h>
12 12
13#include "internal.h"
14
13static void default_threshold_interrupt(void) 15static void default_threshold_interrupt(void)
14{ 16{
15 pr_err("Unexpected threshold interrupt at vector %x\n", 17 pr_err("Unexpected threshold interrupt at vector %x\n",
diff --git a/arch/x86/kernel/cpu/mce/winchip.c b/arch/x86/kernel/cpu/mce/winchip.c
index 3b45b270a865..a30ea13cccc2 100644
--- a/arch/x86/kernel/cpu/mce/winchip.c
+++ b/arch/x86/kernel/cpu/mce/winchip.c
@@ -13,6 +13,8 @@
13#include <asm/mce.h> 13#include <asm/mce.h>
14#include <asm/msr.h> 14#include <asm/msr.h>
15 15
16#include "internal.h"
17
16/* Machine check handler for WinChip C6: */ 18/* Machine check handler for WinChip C6: */
17static void winchip_machine_check(struct pt_regs *regs, long error_code) 19static void winchip_machine_check(struct pt_regs *regs, long error_code)
18{ 20{