Message ID | 1399760621-10954-1-git-send-email-larry.bassel@linaro.org |
---|---|
State | New |
Headers | show |
On Sat, May 10, 2014 at 11:23:41PM +0100, Larry Bassel wrote: > Support for arch_irq_work_raise() was missing from > arm64 (a prerequisite for FULL_NOHZ). [...] > @@ -455,6 +457,14 @@ void arch_send_call_function_single_ipi(int cpu) > smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); > } > > +#ifdef CONFIG_IRQ_WORK > +void arch_irq_work_raise(void) > +{ > + if (is_smp()) > + smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK); > +} > +#endif Does this even compile? We're probably better off just checking whether or not smp_cross_call is NULL. Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
On 12 May 14 10:29, Will Deacon wrote: > On Sat, May 10, 2014 at 11:23:41PM +0100, Larry Bassel wrote: > > Support for arch_irq_work_raise() was missing from > > arm64 (a prerequisite for FULL_NOHZ). > > [...] > > > @@ -455,6 +457,14 @@ void arch_send_call_function_single_ipi(int cpu) > > smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); > > } > > > > +#ifdef CONFIG_IRQ_WORK > > +void arch_irq_work_raise(void) > > +{ > > + if (is_smp()) > > + smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK); > > +} > > +#endif > > Does this even compile? We're probably better off just checking whether or > not smp_cross_call is NULL. No it doesn't (I incorrectly assumed that is_smp() was generic, not arm32 specific and so I didn't compile this before submitting). I've verified that your suggestion compiles and runs properly and will resubmit. Thanks for catching this. > > Will Larry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h index ae4801d..0be6782 100644 --- a/arch/arm64/include/asm/hardirq.h +++ b/arch/arm64/include/asm/hardirq.h @@ -20,7 +20,7 @@ #include <linux/threads.h> #include <asm/irq.h> -#define NR_IPI 5 +#define NR_IPI 6 typedef struct { unsigned int __softirq_pending; diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index f0a141d..78c3f97 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -35,6 +35,7 @@ #include <linux/clockchips.h> #include <linux/completion.h> #include <linux/of.h> +#include <linux/irq_work.h> #include <asm/atomic.h> #include <asm/cacheflush.h> @@ -62,6 +63,7 @@ enum ipi_msg_type { IPI_CALL_FUNC_SINGLE, IPI_CPU_STOP, IPI_TIMER, + IPI_IRQ_WORK, }; /* @@ -455,6 +457,14 @@ void arch_send_call_function_single_ipi(int cpu) smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); } +#ifdef CONFIG_IRQ_WORK +void arch_irq_work_raise(void) +{ + if (is_smp()) + smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK); +} +#endif + static const char *ipi_types[NR_IPI] = { #define S(x,s) [x - IPI_RESCHEDULE] = s S(IPI_RESCHEDULE, "Rescheduling interrupts"), @@ -462,6 +472,7 @@ static const char *ipi_types[NR_IPI] = { S(IPI_CALL_FUNC_SINGLE, "Single function call interrupts"), S(IPI_CPU_STOP, "CPU stop interrupts"), S(IPI_TIMER, "Timer broadcast interrupts"), + S(IPI_IRQ_WORK, "IRQ work interrupts"), }; void show_ipi_list(struct seq_file *p, int prec) @@ -554,6 +565,14 @@ void handle_IPI(int ipinr, struct pt_regs *regs) break; #endif +#ifdef CONFIG_IRQ_WORK + case IPI_IRQ_WORK: + irq_enter(); + irq_work_run(); + irq_exit(); + break; +#endif + default: pr_crit("CPU%u: Unknown IPI message 0x%x\n", cpu, ipinr); break;