Skip to content

Commit

Permalink
Cleanup MCE error log on non-x86 args
Browse files Browse the repository at this point in the history
We can only register for MCE on x86 arch.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Jul 16, 2024
1 parent 044a3cf commit 6a482b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ras-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ int handle_ras_events(int record_events)

#ifdef HAVE_MCE
rc = register_mce_handler(ras, cpus);
if (rc)
if (rc && rc != -ENOENT)
log(ALL, LOG_INFO, "Can't register mce handler\n");
if (ras->mce_priv) {
rc = add_event_handler(ras, pevent, page_size,
Expand Down
5 changes: 5 additions & 0 deletions ras-mce-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ static int detect_cpu(struct mce_priv *mce)
seen |= CPU_FLAGS;
}
}
if (!seen) {
log(ALL, LOG_INFO, "Can't find a x86 CPU at /proc/cpuinfo. Disabling MCE handler.\n");
ret = -ENOENT;
goto ret;
}

if (seen != CPU_ALL) {
log(ALL, LOG_INFO, "Can't parse /proc/cpuinfo: missing%s%s%s%s%s\n",
Expand Down

0 comments on commit 6a482b3

Please sign in to comment.