aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen, Gong <gong.chen@linux.intel.com>2014-06-11 04:34:50 -0400
committerTony Luck <tony.luck@intel.com>2014-06-25 16:27:12 -0400
commitd6cae935ec5b7873a8ccd8f0331bef2df729e86a (patch)
tree96a767c7843297843d212b8629043baf0aecdbbe
parent2dfb7d51a61d7ca91b131c8db612f27d9390f2d5 (diff)
trace, eMCA: Add a knob to adjust where to save event log
To avoid saving two copies for one H/W event, add a new file under debugfs to control how to save event log. Once this file is opened, the perf/trace will be used, in the meanwhile, kernel will stop printing event log to the console. On the other hand, if this file is closed, kernel will print event log to the console again. Signed-off-by: Chen, Gong <gong.chen@linux.intel.com> Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--drivers/acpi/acpi_extlog.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index e61da957f30f..a99d4a6156dc 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -12,6 +12,7 @@
12#include <linux/cper.h> 12#include <linux/cper.h>
13#include <linux/ratelimit.h> 13#include <linux/ratelimit.h>
14#include <linux/edac.h> 14#include <linux/edac.h>
15#include <linux/ras.h>
15#include <asm/cpu.h> 16#include <asm/cpu.h>
16#include <asm/mce.h> 17#include <asm/mce.h>
17 18
@@ -154,7 +155,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
154 estatus->block_status = 0; 155 estatus->block_status = 0;
155 156
156 tmp = (struct acpi_generic_status *)elog_buf; 157 tmp = (struct acpi_generic_status *)elog_buf;
157 print_extlog_rcd(NULL, tmp, cpu); 158
159 if (!ras_userspace_consumers()) {
160 print_extlog_rcd(NULL, tmp, cpu);
161 goto out;
162 }
158 163
159 /* log event via trace */ 164 /* log event via trace */
160 err_seq++; 165 err_seq++;
@@ -171,6 +176,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
171 (u8)gdata->error_severity); 176 (u8)gdata->error_severity);
172 } 177 }
173 178
179out:
174 return NOTIFY_STOP; 180 return NOTIFY_STOP;
175} 181}
176 182