Skip to content

Commit

Permalink
trace, eMCA: Add a knob to adjust where to save event log
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chen, Gong authored and Tony Luck committed Jun 25, 2014
1 parent 2dfb7d5 commit d6cae93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/acpi/acpi_extlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/cper.h>
#include <linux/ratelimit.h>
#include <linux/edac.h>
#include <linux/ras.h>
#include <asm/cpu.h>
#include <asm/mce.h>

Expand Down Expand Up @@ -154,7 +155,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
estatus->block_status = 0;

tmp = (struct acpi_generic_status *)elog_buf;
print_extlog_rcd(NULL, tmp, cpu);

if (!ras_userspace_consumers()) {
print_extlog_rcd(NULL, tmp, cpu);
goto out;
}

/* log event via trace */
err_seq++;
Expand All @@ -171,6 +176,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
(u8)gdata->error_severity);
}

out:
return NOTIFY_STOP;
}

Expand Down

0 comments on commit d6cae93

Please sign in to comment.