aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 16:03:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 16:03:47 -0500
commiteed9688f8513189295887e5a27ec7f576754b60e (patch)
treec205a6fa6b8ee8a5a99179a0d42e40e4a713c450
parent72af84151fa7e98720a0482b59de2d90ec7f10a7 (diff)
parent72a8f089c382c078f8c7c1c759cb726de80d4284 (diff)
Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 RAS updates from Borislav Petkov: "This time around we have a subsystem reorganization to offer, with the new directory being arch/x86/kernel/cpu/mce/ and all compilation units' names streamlined under it" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Restore MCE injector's module name x86/mce: Unify pr_* prefix x86/mce: Streamline MCE subsystem's naming
-rw-r--r--arch/x86/kernel/cpu/Makefile2
-rw-r--r--arch/x86/kernel/cpu/mce/Makefile (renamed from arch/x86/kernel/cpu/mcheck/Makefile)10
-rw-r--r--arch/x86/kernel/cpu/mce/amd.c (renamed from arch/x86/kernel/cpu/mcheck/mce_amd.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/apei.c (renamed from arch/x86/kernel/cpu/mcheck/mce-apei.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/core.c (renamed from arch/x86/kernel/cpu/mcheck/mce.c)4
-rw-r--r--arch/x86/kernel/cpu/mce/dev-mcelog.c (renamed from arch/x86/kernel/cpu/mcheck/dev-mcelog.c)4
-rw-r--r--arch/x86/kernel/cpu/mce/genpool.c (renamed from arch/x86/kernel/cpu/mcheck/mce-genpool.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/inject.c (renamed from arch/x86/kernel/cpu/mcheck/mce-inject.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/intel.c (renamed from arch/x86/kernel/cpu/mcheck/mce_intel.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/internal.h (renamed from arch/x86/kernel/cpu/mcheck/mce-internal.h)3
-rw-r--r--arch/x86/kernel/cpu/mce/p5.c (renamed from arch/x86/kernel/cpu/mcheck/p5.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/severity.c (renamed from arch/x86/kernel/cpu/mcheck/mce-severity.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/therm_throt.c (renamed from arch/x86/kernel/cpu/mcheck/therm_throt.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/threshold.c (renamed from arch/x86/kernel/cpu/mcheck/threshold.c)2
-rw-r--r--arch/x86/kernel/cpu/mce/winchip.c (renamed from arch/x86/kernel/cpu/mcheck/winchip.c)2
15 files changed, 26 insertions, 17 deletions
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index dc4acaa1549d..ac78f90aea56 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -36,7 +36,7 @@ obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
36obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o 36obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
37obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o 37obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
38 38
39obj-$(CONFIG_X86_MCE) += mcheck/ 39obj-$(CONFIG_X86_MCE) += mce/
40obj-$(CONFIG_MTRR) += mtrr/ 40obj-$(CONFIG_MTRR) += mtrr/
41obj-$(CONFIG_MICROCODE) += microcode/ 41obj-$(CONFIG_MICROCODE) += microcode/
42obj-$(CONFIG_RESCTRL) += resctrl/ 42obj-$(CONFIG_RESCTRL) += resctrl/
diff --git a/arch/x86/kernel/cpu/mcheck/Makefile b/arch/x86/kernel/cpu/mce/Makefile
index bcc7c54c7041..9f020c994154 100644
--- a/arch/x86/kernel/cpu/mcheck/Makefile
+++ b/arch/x86/kernel/cpu/mce/Makefile
@@ -1,14 +1,16 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2obj-y = mce.o mce-severity.o mce-genpool.o 2obj-y = core.o severity.o genpool.o
3 3
4obj-$(CONFIG_X86_ANCIENT_MCE) += winchip.o p5.o 4obj-$(CONFIG_X86_ANCIENT_MCE) += winchip.o p5.o
5obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o 5obj-$(CONFIG_X86_MCE_INTEL) += intel.o
6obj-$(CONFIG_X86_MCE_AMD) += mce_amd.o 6obj-$(CONFIG_X86_MCE_AMD) += amd.o
7obj-$(CONFIG_X86_MCE_THRESHOLD) += threshold.o 7obj-$(CONFIG_X86_MCE_THRESHOLD) += threshold.o
8
9mce-inject-y := inject.o
8obj-$(CONFIG_X86_MCE_INJECT) += mce-inject.o 10obj-$(CONFIG_X86_MCE_INJECT) += mce-inject.o
9 11
10obj-$(CONFIG_X86_THERMAL_VECTOR) += therm_throt.o 12obj-$(CONFIG_X86_THERMAL_VECTOR) += therm_throt.o
11 13
12obj-$(CONFIG_ACPI_APEI) += mce-apei.o 14obj-$(CONFIG_ACPI_APEI) += apei.o
13 15
14obj-$(CONFIG_X86_MCELOG_LEGACY) += dev-mcelog.o 16obj-$(CONFIG_X86_MCELOG_LEGACY) += dev-mcelog.o
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mce/amd.c
index e12454e21b8a..4a2fb59a372e 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -28,7 +28,7 @@
28#include <asm/msr.h> 28#include <asm/msr.h>
29#include <asm/trace/irq_vectors.h> 29#include <asm/trace/irq_vectors.h>
30 30
31#include "mce-internal.h" 31#include "internal.h"
32 32
33#define NR_BLOCKS 5 33#define NR_BLOCKS 5
34#define THRESHOLD_MAX 0xFFF 34#define THRESHOLD_MAX 0xFFF
diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mce/apei.c
index 2eee85379689..1d9b3ce662a0 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-apei.c
+++ b/arch/x86/kernel/cpu/mce/apei.c
@@ -36,7 +36,7 @@
36#include <acpi/ghes.h> 36#include <acpi/ghes.h>
37#include <asm/mce.h> 37#include <asm/mce.h>
38 38
39#include "mce-internal.h" 39#include "internal.h"
40 40
41void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err) 41void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err)
42{ 42{
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mce/core.c
index 36d2696c9563..ad8f62a0c706 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.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>
@@ -52,7 +50,7 @@
52#include <asm/msr.h> 50#include <asm/msr.h>
53#include <asm/reboot.h> 51#include <asm/reboot.h>
54 52
55#include "mce-internal.h" 53#include "internal.h"
56 54
57static DEFINE_MUTEX(mce_log_mutex); 55static DEFINE_MUTEX(mce_log_mutex);
58 56
diff --git a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c b/arch/x86/kernel/cpu/mce/dev-mcelog.c
index 27f394ac983f..9690ec5c8051 100644
--- a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
+++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c
@@ -8,14 +8,12 @@
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>
16#include <linux/poll.h> 14#include <linux/poll.h>
17 15
18#include "mce-internal.h" 16#include "internal.h"
19 17
20static BLOCKING_NOTIFIER_HEAD(mce_injector_chain); 18static BLOCKING_NOTIFIER_HEAD(mce_injector_chain);
21 19
diff --git a/arch/x86/kernel/cpu/mcheck/mce-genpool.c b/arch/x86/kernel/cpu/mce/genpool.c
index 217cd4449bc9..3395549c51d3 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-genpool.c
+++ b/arch/x86/kernel/cpu/mce/genpool.c
@@ -10,7 +10,7 @@
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/genalloc.h> 11#include <linux/genalloc.h>
12#include <linux/llist.h> 12#include <linux/llist.h>
13#include "mce-internal.h" 13#include "internal.h"
14 14
15/* 15/*
16 * printk() is not safe in MCE context. This is a lock-less memory allocator 16 * printk() is not safe in MCE context. This is a lock-less memory allocator
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mce/inject.c
index 1fc424c40a31..8492ef7d9015 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mce/inject.c
@@ -38,7 +38,7 @@
38#include <asm/nmi.h> 38#include <asm/nmi.h>
39#include <asm/smp.h> 39#include <asm/smp.h>
40 40
41#include "mce-internal.h" 41#include "internal.h"
42 42
43/* 43/*
44 * Collect all the MCi_XXX settings 44 * Collect all the MCi_XXX settings
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mce/intel.c
index d05be307d081..e43eb6732630 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ b/arch/x86/kernel/cpu/mce/intel.c
@@ -18,7 +18,7 @@
18#include <asm/msr.h> 18#include <asm/msr.h>
19#include <asm/mce.h> 19#include <asm/mce.h>
20 20
21#include "mce-internal.h" 21#include "internal.h"
22 22
23/* 23/*
24 * Support for Intel Correct Machine Check Interrupts. This allows 24 * Support for Intel Correct Machine Check Interrupts. This allows
diff --git a/arch/x86/kernel/cpu/mcheck/mce-internal.h b/arch/x86/kernel/cpu/mce/internal.h
index ceb67cd5918f..af5eab1e65e2 100644
--- a/arch/x86/kernel/cpu/mcheck/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/mcheck/p5.c b/arch/x86/kernel/cpu/mce/p5.c
index 5cddf831720f..4ae6df556526 100644
--- a/arch/x86/kernel/cpu/mcheck/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/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mce/severity.c
index 44396d521987..dc3e26e905a3 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mce/severity.c
@@ -16,7 +16,7 @@
16#include <asm/mce.h> 16#include <asm/mce.h>
17#include <linux/uaccess.h> 17#include <linux/uaccess.h>
18 18
19#include "mce-internal.h" 19#include "internal.h"
20 20
21/* 21/*
22 * Grade an mce by severity. In general the most severe ones are processed 22 * Grade an mce by severity. In general the most severe ones are processed
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c
index 2da67b70ba98..df01ff8513a5 100644
--- a/arch/x86/kernel/cpu/mcheck/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/mcheck/threshold.c b/arch/x86/kernel/cpu/mce/threshold.c
index 2b584b319eff..10586a85c23f 100644
--- a/arch/x86/kernel/cpu/mcheck/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/mcheck/winchip.c b/arch/x86/kernel/cpu/mce/winchip.c
index 3b45b270a865..a30ea13cccc2 100644
--- a/arch/x86/kernel/cpu/mcheck/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{