-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add two patches for P9: powerpc/mce: Move 64-bit machine check code into mce.c powerpc/64s: Add workaround for P9 vector CI load issue The first patch is a prerequsite for the second. The second patch is in the powerpc-next branch for 4.15. Signed-off-by: Joel Stanley <joel@jms.id.au>
- Loading branch information
Showing
4 changed files
with
558 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
openpower/linux/0001-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
openpower/linux/0002-powerpc-mce-Move-64-bit-machine-check-code-into-mce..patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Michael Ellerman <mpe@ellerman.id.au> | ||
Date: Wed, 4 Oct 2017 13:42:51 +1100 | ||
Subject: [PATCH 2/4] powerpc/mce: Move 64-bit machine check code into mce.c | ||
|
||
We already have mce.c which is built for 64bit and contains other parts | ||
of the machine check code, so move these bits in there too. | ||
|
||
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | ||
(cherry picked from commit ccd3cd361341b71ae2afa596f6b470fcb32a916e) | ||
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> | ||
Signed-off-by: Joel Stanley <joel@jms.id.au> | ||
--- | ||
arch/powerpc/kernel/mce.c | 33 +++++++++++++++++++++++++++++++++ | ||
arch/powerpc/kernel/traps.c | 33 --------------------------------- | ||
2 files changed, 33 insertions(+), 33 deletions(-) | ||
|
||
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c | ||
index e0e131e662ed..9b2ea7e71c06 100644 | ||
--- a/arch/powerpc/kernel/mce.c | ||
+++ b/arch/powerpc/kernel/mce.c | ||
@@ -22,11 +22,14 @@ | ||
#undef DEBUG | ||
#define pr_fmt(fmt) "mce: " fmt | ||
|
||
+#include <linux/hardirq.h> | ||
#include <linux/types.h> | ||
#include <linux/ptrace.h> | ||
#include <linux/percpu.h> | ||
#include <linux/export.h> | ||
#include <linux/irq_work.h> | ||
+ | ||
+#include <asm/machdep.h> | ||
#include <asm/mce.h> | ||
|
||
static DEFINE_PER_CPU(int, mce_nest_count); | ||
@@ -446,3 +449,33 @@ uint64_t get_mce_fault_addr(struct machine_check_event *evt) | ||
return 0; | ||
} | ||
EXPORT_SYMBOL(get_mce_fault_addr); | ||
+ | ||
+/* | ||
+ * This function is called in real mode. Strictly no printk's please. | ||
+ * | ||
+ * regs->nip and regs->msr contains srr0 and ssr1. | ||
+ */ | ||
+long machine_check_early(struct pt_regs *regs) | ||
+{ | ||
+ long handled = 0; | ||
+ | ||
+ __this_cpu_inc(irq_stat.mce_exceptions); | ||
+ | ||
+ if (cur_cpu_spec && cur_cpu_spec->machine_check_early) | ||
+ handled = cur_cpu_spec->machine_check_early(regs); | ||
+ return handled; | ||
+} | ||
+ | ||
+long hmi_exception_realmode(struct pt_regs *regs) | ||
+{ | ||
+ __this_cpu_inc(irq_stat.hmi_exceptions); | ||
+ | ||
+ wait_for_subcore_guest_exit(); | ||
+ | ||
+ if (ppc_md.hmi_exception_early) | ||
+ ppc_md.hmi_exception_early(regs); | ||
+ | ||
+ wait_for_tb_resync(); | ||
+ | ||
+ return 0; | ||
+} | ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c | ||
index bfcfd9ef09f2..559664e75fb5 100644 | ||
--- a/arch/powerpc/kernel/traps.c | ||
+++ b/arch/powerpc/kernel/traps.c | ||
@@ -312,39 +312,6 @@ void system_reset_exception(struct pt_regs *regs) | ||
/* What should we do here? We could issue a shutdown or hard reset. */ | ||
} | ||
|
||
-#ifdef CONFIG_PPC64 | ||
-/* | ||
- * This function is called in real mode. Strictly no printk's please. | ||
- * | ||
- * regs->nip and regs->msr contains srr0 and ssr1. | ||
- */ | ||
-long machine_check_early(struct pt_regs *regs) | ||
-{ | ||
- long handled = 0; | ||
- | ||
- __this_cpu_inc(irq_stat.mce_exceptions); | ||
- | ||
- if (cur_cpu_spec && cur_cpu_spec->machine_check_early) | ||
- handled = cur_cpu_spec->machine_check_early(regs); | ||
- return handled; | ||
-} | ||
- | ||
-long hmi_exception_realmode(struct pt_regs *regs) | ||
-{ | ||
- __this_cpu_inc(irq_stat.hmi_exceptions); | ||
- | ||
- wait_for_subcore_guest_exit(); | ||
- | ||
- if (ppc_md.hmi_exception_early) | ||
- ppc_md.hmi_exception_early(regs); | ||
- | ||
- wait_for_tb_resync(); | ||
- | ||
- return 0; | ||
-} | ||
- | ||
-#endif | ||
- | ||
/* | ||
* I/O accesses can cause machine checks on powermacs. | ||
* Check if the NIP corresponds to the address of a sync |
Oops, something went wrong.