mirror of https://gitee.com/openkylin/linux.git
s390/smp: implement arch_irq_work_raise()
The immediate need to have this is to have bpf_send_signal() send the signal ASAP instead of during the next hrtimer interrupt. However, it should also improve irq_work_queue() latencies in general, as well as get s390 out of the lame architectures list [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/irq_work.c?h=v5.11#n45 Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
da6d2c289d
commit
55f03123f6
|
@ -0,0 +1,12 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _ASM_S390_IRQ_WORK_H
|
||||||
|
#define _ASM_S390_IRQ_WORK_H
|
||||||
|
|
||||||
|
static inline bool arch_irq_work_has_interrupt(void)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void arch_irq_work_raise(void);
|
||||||
|
|
||||||
|
#endif /* _ASM_S390_IRQ_WORK_H */
|
|
@ -30,6 +30,7 @@
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/irqflags.h>
|
#include <linux/irqflags.h>
|
||||||
|
#include <linux/irq_work.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/sched/hotplug.h>
|
#include <linux/sched/hotplug.h>
|
||||||
|
@ -62,6 +63,7 @@ enum {
|
||||||
ec_call_function_single,
|
ec_call_function_single,
|
||||||
ec_stop_cpu,
|
ec_stop_cpu,
|
||||||
ec_mcck_pending,
|
ec_mcck_pending,
|
||||||
|
ec_irq_work,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -508,6 +510,8 @@ static void smp_handle_ext_call(void)
|
||||||
generic_smp_call_function_single_interrupt();
|
generic_smp_call_function_single_interrupt();
|
||||||
if (test_bit(ec_mcck_pending, &bits))
|
if (test_bit(ec_mcck_pending, &bits))
|
||||||
__s390_handle_mcck();
|
__s390_handle_mcck();
|
||||||
|
if (test_bit(ec_irq_work, &bits))
|
||||||
|
irq_work_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_ext_call_interrupt(struct ext_code ext_code,
|
static void do_ext_call_interrupt(struct ext_code ext_code,
|
||||||
|
@ -540,6 +544,13 @@ void smp_send_reschedule(int cpu)
|
||||||
pcpu_ec_call(pcpu_devices + cpu, ec_schedule);
|
pcpu_ec_call(pcpu_devices + cpu, ec_schedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_IRQ_WORK
|
||||||
|
void arch_irq_work_raise(void)
|
||||||
|
{
|
||||||
|
pcpu_ec_call(pcpu_devices + smp_processor_id(), ec_irq_work);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* parameter area for the set/clear control bit callbacks
|
* parameter area for the set/clear control bit callbacks
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue