Skip to content

Commit

Permalink
x86/softirq/64: Inline do_softirq_own_stack()
Browse files Browse the repository at this point in the history
There is no reason to have this as a seperate function for a single caller.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210210002513.382806685@linutronix.de
  • Loading branch information
Thomas Gleixner committed Feb 10, 2021
1 parent db1cc7a commit 72f40a2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 1 addition & 2 deletions arch/x86/include/asm/irq_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,14 @@
* interrupts are pending to be processed. The interrupt stack cannot be in
* use here.
*/
#define run_softirq_on_irqstack() \
#define do_softirq_own_stack() \
{ \
__this_cpu_write(hardirq_stack_inuse, true); \
call_on_irqstack(__do_softirq, ASM_CALL_SOFTIRQ); \
__this_cpu_write(hardirq_stack_inuse, false); \
}

#else /* CONFIG_X86_64 */

/* System vector handlers always run on the stack they interrupted. */
#define run_sysvec_on_irqstack_cond(func, regs) \
{ \
Expand Down
11 changes: 11 additions & 0 deletions arch/x86/include/asm/softirq_stack.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_SOFTIRQ_STACK_H
#define _ASM_X86_SOFTIRQ_STACK_H

#ifdef CONFIG_X86_64
# include <asm/irq_stack.h>
#else
# include <asm-generic/softirq_stack.h>
#endif

#endif
5 changes: 0 additions & 5 deletions arch/x86/kernel/irq_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,3 @@ int irq_init_percpu_irqstack(unsigned int cpu)
return 0;
return map_irq_stack(cpu);
}

void do_softirq_own_stack(void)
{
run_softirq_on_irqstack();
}

0 comments on commit 72f40a2

Please sign in to comment.