Skip to content

Commit 81736ab

Browse files
schnhrrsuryasaimadhu
authored andcommitted
x86/mce: Remove mce_inject_log() in favor of mce_log()
The mutex in mce_inject_log() became unnecessary with commit 5de97c9 ("x86/mce: Factor out and deprecate the /dev/mcelog driver"), though the original reason for its presence only vanished with commit 7298f08 ("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: Jan H. Schönherr <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Tony Luck <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: linux-edac <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 2d806d0 commit 81736ab

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

arch/x86/kernel/cpu/mce/core.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353

5454
#include "internal.h"
5555

56-
static DEFINE_MUTEX(mce_log_mutex);
57-
5856
/* sysfs synchronization */
5957
static DEFINE_MUTEX(mce_sysfs_mutex);
6058

@@ -156,14 +154,7 @@ void mce_log(struct mce *m)
156154
if (!mce_gen_pool_add(m))
157155
irq_work_queue(&mce_irq_work);
158156
}
159-
160-
void mce_inject_log(struct mce *m)
161-
{
162-
mutex_lock(&mce_log_mutex);
163-
mce_log(m);
164-
mutex_unlock(&mce_log_mutex);
165-
}
166-
EXPORT_SYMBOL_GPL(mce_inject_log);
157+
EXPORT_SYMBOL_GPL(mce_log);
167158

168159
static struct notifier_block mce_srao_nb;
169160

arch/x86/kernel/cpu/mce/inject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ static void do_inject(void)
494494
i_mce.status |= MCI_STATUS_SYNDV;
495495

496496
if (inj_type == SW_INJ) {
497-
mce_inject_log(&i_mce);
497+
mce_log(&i_mce);
498498
return;
499499
}
500500

arch/x86/kernel/cpu/mce/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ static inline int apei_clear_mce(u64 record_id)
8484
}
8585
#endif
8686

87-
void mce_inject_log(struct mce *m);
88-
8987
/*
9088
* We consider records to be equivalent if bank+status+addr+misc all match.
9189
* This is only used when the system is going down because of a fatal error

0 commit comments

Comments
 (0)