Commit 81736abd authored by Jan H. Schönherr's avatar Jan H. Schönherr Committed by Borislav Petkov

x86/mce: Remove mce_inject_log() in favor of mce_log()

The mutex in mce_inject_log() became unnecessary with commit

  5de97c9f ("x86/mce: Factor out and deprecate the /dev/mcelog driver"),

though the original reason for its presence only vanished with commit

  7298f08e ("x86/mcelog: Get rid of RCU remnants").

Drop the mutex. And as that makes mce_inject_log() identical to mce_log(),
get rid of the former in favor of the latter.
Signed-off-by: default avatarJan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191210000733.17979-7-jschoenh@amazon.de
parent 2d806d07
...@@ -53,8 +53,6 @@ ...@@ -53,8 +53,6 @@
#include "internal.h" #include "internal.h"
static DEFINE_MUTEX(mce_log_mutex);
/* sysfs synchronization */ /* sysfs synchronization */
static DEFINE_MUTEX(mce_sysfs_mutex); static DEFINE_MUTEX(mce_sysfs_mutex);
...@@ -156,14 +154,7 @@ void mce_log(struct mce *m) ...@@ -156,14 +154,7 @@ void mce_log(struct mce *m)
if (!mce_gen_pool_add(m)) if (!mce_gen_pool_add(m))
irq_work_queue(&mce_irq_work); irq_work_queue(&mce_irq_work);
} }
EXPORT_SYMBOL_GPL(mce_log);
void mce_inject_log(struct mce *m)
{
mutex_lock(&mce_log_mutex);
mce_log(m);
mutex_unlock(&mce_log_mutex);
}
EXPORT_SYMBOL_GPL(mce_inject_log);
static struct notifier_block mce_srao_nb; static struct notifier_block mce_srao_nb;
......
...@@ -494,7 +494,7 @@ static void do_inject(void) ...@@ -494,7 +494,7 @@ static void do_inject(void)
i_mce.status |= MCI_STATUS_SYNDV; i_mce.status |= MCI_STATUS_SYNDV;
if (inj_type == SW_INJ) { if (inj_type == SW_INJ) {
mce_inject_log(&i_mce); mce_log(&i_mce);
return; return;
} }
......
...@@ -84,8 +84,6 @@ static inline int apei_clear_mce(u64 record_id) ...@@ -84,8 +84,6 @@ static inline int apei_clear_mce(u64 record_id)
} }
#endif #endif
void mce_inject_log(struct mce *m);
/* /*
* We consider records to be equivalent if bank+status+addr+misc all match. * We consider records to be equivalent if bank+status+addr+misc all match.
* This is only used when the system is going down because of a fatal error * This is only used when the system is going down because of a fatal error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment