mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
x86/mce: Add a wrapper around mce_log() for injection
Will be used by an injector module in a following patch. Additionally, add a missing module export reported by 0-DAY kernel test. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
9a7783d021
commit
a79da38494
2 changed files with 10 additions and 0 deletions
|
|
@ -79,3 +79,5 @@ static inline int apei_clear_mce(u64 record_id)
|
|||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void mce_inject_log(struct mce *m);
|
||||
|
|
|
|||
|
|
@ -199,6 +199,14 @@ void mce_log(struct mce *mce)
|
|||
set_bit(0, &mce_need_notify);
|
||||
}
|
||||
|
||||
void mce_inject_log(struct mce *m)
|
||||
{
|
||||
mutex_lock(&mce_chrdev_read_mutex);
|
||||
mce_log(m);
|
||||
mutex_unlock(&mce_chrdev_read_mutex);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mce_inject_log);
|
||||
|
||||
static struct notifier_block mce_srao_nb;
|
||||
|
||||
void mce_register_decode_chain(struct notifier_block *nb)
|
||||
|
|
|
|||
Loading…
Reference in a new issue