Simply refactoring part of mce_log() to facilitate logging from offline CPUs.
Signed-off-by: Ashok Raj <ashok....@intel.com> Reviewed-by: Tony Luck <tony.l...@intel.com> --- arch/x86/kernel/cpu/mcheck/mce.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 48bd244..2df073d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -152,16 +152,10 @@ static struct mce_log mcelog = { .recordlen = sizeof(struct mce), }; -void mce_log(struct mce *mce) +static void mce_log_add(struct mce *mce) { unsigned next, entry; - /* Emit the trace record: */ - trace_mce_record(mce); - - if (!mce_gen_pool_add(mce)) - irq_work_queue(&mce_irq_work); - mce->finished = 0; wmb(); for (;;) { @@ -199,6 +193,19 @@ void mce_log(struct mce *mce) set_bit(0, &mce_need_notify); } +void mce_log(struct mce *mce) +{ + unsigned next, entry; + + /* Emit the trace record: */ + trace_mce_record(mce); + + if (!mce_gen_pool_add(mce)) + irq_work_queue(&mce_irq_work); + + mce_log_add(mce); +} + void mce_inject_log(struct mce *m) { mutex_lock(&mce_chrdev_read_mutex); -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/