Commit cff4c039 authored by Borislav Petkov's avatar Borislav Petkov Committed by Ingo Molnar
Browse files

x86/ras: Get rid of mce_process_work()



Make mce_gen_pool_process() the workqueue function directly and save us
an indirection.

Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170123183514.13356-9-bp@alien8.de


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 0bceab67
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ struct llist_node *mce_gen_pool_prepare_records(void)
	return new_head.first;
}

void mce_gen_pool_process(void)
void mce_gen_pool_process(struct work_struct *__unused)
{
	struct llist_node *head;
	struct mce_evt_llist *node, *tmp;
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ struct mce_evt_llist {
	struct mce mce;
};

void mce_gen_pool_process(void);
void mce_gen_pool_process(struct work_struct *__unused);
bool mce_gen_pool_empty(void);
int mce_gen_pool_add(struct mce *mce);
int mce_gen_pool_init(void);
+1 −11
Original line number Diff line number Diff line
@@ -1315,16 +1315,6 @@ int memory_failure(unsigned long pfn, int vector, int flags)
}
#endif

/*
 * Action optional processing happens here (picking up
 * from the list of faulting pages that do_machine_check()
 * placed into the genpool).
 */
static void mce_process_work(struct work_struct *dummy)
{
	mce_gen_pool_process();
}

/*
 * Periodic polling timer for "silent" machine check errors.  If the
 * poller finds an MCE, poll 2x faster.  When the poller finds no more
@@ -2165,7 +2155,7 @@ int __init mcheck_init(void)
	mce_register_decode_chain(&mce_default_nb);
	mcheck_vendor_init_severity();

	INIT_WORK(&mce_work, mce_process_work);
	INIT_WORK(&mce_work, mce_gen_pool_process);
	init_irq_work(&mce_irq_work, mce_irq_work_cb);

	return 0;