smp, irq_work: Continue smp_call_function*() and irq_work*() integration
Instead of relying on BUG_ON() to ensure the various data structures line up, use a bunch of horrible unions to make it all automatic. Much of the union magic is to ensure irq_work and smp_call_function do not (yet) see the members of their respective data structures change name. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lkml.kernel.org/r/20200622100825.844455025@infradead.org
This commit is contained in:

committed by
Borislav Petkov

parent
739f70b476
commit
8c4890d1c3
@@ -654,11 +654,8 @@ struct task_struct {
|
||||
unsigned int ptrace;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
struct {
|
||||
struct llist_node wake_entry;
|
||||
unsigned int wake_entry_type;
|
||||
};
|
||||
int on_cpu;
|
||||
struct __call_single_node wake_entry;
|
||||
#ifdef CONFIG_THREAD_INFO_IN_TASK
|
||||
/* Current CPU: */
|
||||
unsigned int cpu;
|
||||
|
Reference in New Issue
Block a user