smp, irq_work: Continue smp_call_function*() and irq_work*() integration
authorPeter Zijlstra <peterz@infradead.org>
Mon, 22 Jun 2020 10:01:25 +0000 (12:01 +0200)
committerBorislav Petkov <bp@suse.de>
Sun, 28 Jun 2020 15:01:20 +0000 (17:01 +0200)
commit8c4890d1c3358fb8023d46e1e554c41d54f02878
tree836a9611ccb151ac7d1e6f71c23b32a964164e9b
parent739f70b476cf05c5a424b42a8b5728914345610c
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
include/linux/irq_work.h
include/linux/sched.h
include/linux/smp.h
include/linux/smp_types.h [new file with mode: 0644]
kernel/sched/core.c
kernel/smp.c