From ddf84433f411b612e935a6719ee395bb9dd2221f Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Mon, 25 Nov 2013 12:59:03 +0530 Subject: ARC: [SMP] cpumask not needed in IPI send path The current IPI sending callstack needlessly involves cpumask. arch_send_call_function_single_ipi(cpu) / smp_send_reschedule(cpu) ipi_send_msg(cpumask_of(cpu)) --> [cpu to cpumask] plat_smp_ops.ipi_send(callmap) for_each_cpu(callmap) --> [cpuask to cpu] do_plat_specific_ipi_PER_CPU Given that current backends are not capable of 1:N IPIs, lets simplify the interface for now, by keeping "a" cpu all along. Signed-off-by: Vineet Gupta --- arch/arc/include/asm/smp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arc/include/asm/smp.h') diff --git a/arch/arc/include/asm/smp.h b/arch/arc/include/asm/smp.h index eefc29f08cdb..9b40e3bdc1ba 100644 --- a/arch/arc/include/asm/smp.h +++ b/arch/arc/include/asm/smp.h @@ -46,13 +46,13 @@ extern int smp_ipi_irq_setup(int cpu, int irq); * * @info: SoC SMP specific info for /proc/cpuinfo etc * @cpu_kick: For Master to kickstart a cpu (optionally at a PC) - * @ipi_send: To send IPI to a @cpumask + * @ipi_send: To send IPI to a @cpu * @ips_clear: To clear IPI received by @cpu at @irq */ struct plat_smp_ops { const char *info; void (*cpu_kick)(int cpu, unsigned long pc); - void (*ipi_send)(void *callmap); + void (*ipi_send)(int cpu); void (*ipi_clear)(int cpu, int irq); }; -- cgit v1.2.3 From ccdaa6e0c86d8f48bf87439e4d6942b7a3e58899 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Mon, 25 Nov 2013 14:37:14 +0530 Subject: ARC: [SMP] IPI ACK interface doesn't need "self" cpu-id The interface is confusing, it feels like we are getting "sender" info, whereas it is the "receiver", which can very well be retrived by smp_processor_id(), if need be. Signed-off-by: Vineet Gupta --- arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/smp.c | 2 +- arch/arc/plat-arcfpga/smp.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/arc/include/asm/smp.h') diff --git a/arch/arc/include/asm/smp.h b/arch/arc/include/asm/smp.h index 9b40e3bdc1ba..5d06eee43ea9 100644 --- a/arch/arc/include/asm/smp.h +++ b/arch/arc/include/asm/smp.h @@ -47,13 +47,13 @@ extern int smp_ipi_irq_setup(int cpu, int irq); * @info: SoC SMP specific info for /proc/cpuinfo etc * @cpu_kick: For Master to kickstart a cpu (optionally at a PC) * @ipi_send: To send IPI to a @cpu - * @ips_clear: To clear IPI received by @cpu at @irq + * @ips_clear: To clear IPI received at @irq */ struct plat_smp_ops { const char *info; void (*cpu_kick)(int cpu, unsigned long pc); void (*ipi_send)(int cpu); - void (*ipi_clear)(int cpu, int irq); + void (*ipi_clear)(int irq); }; /* TBD: stop exporting it for direct population by platform */ diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index f2fdef964045..9f771b5d66c6 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c @@ -310,7 +310,7 @@ irqreturn_t do_IPI(int irq, void *dev_id) unsigned long ops; if (plat_smp_ops.ipi_clear) - plat_smp_ops.ipi_clear(cpu, irq); + plat_smp_ops.ipi_clear(irq); /* * XXX: is this loop really needed diff --git a/arch/arc/plat-arcfpga/smp.c b/arch/arc/plat-arcfpga/smp.c index 5e4fe959665c..8a12741f5f7a 100644 --- a/arch/arc/plat-arcfpga/smp.c +++ b/arch/arc/plat-arcfpga/smp.c @@ -93,9 +93,9 @@ static void iss_model_ipi_send(int cpu) idu_irq_assert(cpu); } -static void iss_model_ipi_clear(int cpu, int irq) +static void iss_model_ipi_clear(int irq) { - idu_irq_clear(IDU_INTERRUPT_0 + cpu); + idu_irq_clear(IDU_INTERRUPT_0 + smp_processor_id()); } void iss_model_init_early_smp(void) -- cgit v1.2.3