Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2012-12-07 13:02:09 +0100
committerThomas Renninger <trenn@suse.de>2012-12-07 13:02:31 +0100
commit9cc1799d4f28380dab4557fe3b5ecfa651a72d93 (patch)
tree15600e17d6ba36139933a6f1c69f49b8267729d1
parent2306cd4146848a7c8fec085e15869551c2b62ee5 (diff)
ACPI, APEI, EINJ, new parameter to control trigger action
-rw-r--r--patches.arch/009-acpi_apei_inject_fixups.patch70
-rw-r--r--series.conf1
2 files changed, 71 insertions, 0 deletions
diff --git a/patches.arch/009-acpi_apei_inject_fixups.patch b/patches.arch/009-acpi_apei_inject_fixups.patch
new file mode 100644
index 0000000000..56d9eb189a
--- /dev/null
+++ b/patches.arch/009-acpi_apei_inject_fixups.patch
@@ -0,0 +1,70 @@
+From: Chen Gong <gong.chen@linux.intel.com>
+Subject: ACPI, APEI, EINJ, new parameter to control trigger action
+References: bnc#788160
+Patch-Mainline: v3.4-rc6
+Git-commit: ee49089dc7d9fc78db51e18f4fba68e88edc49a4
+
+
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+
+Some APEI firmware implementation will access injected address
+specified in param1 to trigger the error when injecting memory
+error, which means if one SRAR error is injected, the crash
+always happens because it is executed in kernel context. This
+new parameter can disable trigger action and control is taken
+over by the user. In this way, an SRAR error can happen in user
+context instead of crashing the system. This function is highly
+depended on BIOS implementation so please ensure you know the
+BIOS trigger procedure before you enable this switch.
+
+v2:
+ notrigger should be created together with param1/param2
+
+Tested-by: Tony Luck <tony.luck@lintel.com>
+Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+
+---
+ drivers/acpi/apei/einj.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+Index: linux-3.0-SLE11-SP3/drivers/acpi/apei/einj.c
+===================================================================
+--- linux-3.0-SLE11-SP3.orig/drivers/acpi/apei/einj.c
++++ linux-3.0-SLE11-SP3/drivers/acpi/apei/einj.c
+@@ -74,6 +74,8 @@ struct vendor_error_type_extension {
+ u8 reserved[3];
+ };
+
++static u32 notrigger;
++
+ static u32 vendor_flags;
+ static struct debugfs_blob_wrapper vendor_blob;
+ static char vendor_dev[64];
+@@ -495,9 +497,11 @@ static int __einj_error_inject(u32 type,
+ if (rc)
+ return rc;
+ trigger_paddr = apei_exec_ctx_get_output(&ctx);
+- rc = __einj_error_trigger(trigger_paddr, type, param1, param2);
+- if (rc)
+- return rc;
++ if (notrigger == 0) {
++ rc = __einj_error_trigger(trigger_paddr, type, param1, param2);
++ if (rc)
++ return rc;
++ }
+ rc = apei_exec_run_optional(&ctx, ACPI_EINJ_END_OPERATION);
+
+ return rc;
+@@ -699,6 +703,11 @@ static int __init einj_init(void)
+ einj_debug_dir, &error_param2);
+ if (!fentry)
+ goto err_unmap;
++
++ fentry = debugfs_create_x32("notrigger", S_IRUSR | S_IWUSR,
++ einj_debug_dir, &notrigger);
++ if (!fentry)
++ goto err_unmap;
+ }
+
+ if (vendor_dev[0]) {
diff --git a/series.conf b/series.conf
index 8850484a8d..9adfaf307d 100644
--- a/series.conf
+++ b/series.conf
@@ -6817,6 +6817,7 @@
patches.arch/006-acpi_apei_inject_fixups.patch
patches.arch/007-acpi_apei_inject_fixups.patch
patches.arch/008-acpi_apei_inject_fixups.patch
+ patches.arch/009-acpi_apei_inject_fixups.patch
# FATE#313743: AR=1 MCA recovery support - IFU (Instruction Fetch Unit)
# FATE#313744: AR=1 MCA recovery support - DCU (Data/Cache Unit)