Skip to content

Commit

Permalink
irq_work: Define irq_work_single() on !CONFIG_IRQ_WORK too
Browse files Browse the repository at this point in the history
Some SMP platforms don't have CONFIG_IRQ_WORK defined, resulting in a link
error at build time.

Define a stub and clean up the prototype definitions.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Jun 2, 2020
1 parent 1f8db41 commit 25de110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/linux/irq_work.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ void irq_work_sync(struct irq_work *work);

void irq_work_run(void);
bool irq_work_needs_cpu(void);
void irq_work_single(void *arg);
#else
static inline bool irq_work_needs_cpu(void) { return false; }
static inline void irq_work_run(void) { }
static inline void irq_work_single(void *arg) { }
#endif

#endif /* _LINUX_IRQ_WORK_H */
2 changes: 0 additions & 2 deletions kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ void generic_smp_call_function_single_interrupt(void)
flush_smp_call_function_queue(true);
}

extern void irq_work_single(void *);

/**
* flush_smp_call_function_queue - Flush pending smp-call-function callbacks
*
Expand Down

0 comments on commit 25de110

Please sign in to comment.