Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad3b6993 authored by Russell King's avatar Russell King
Browse files

ARM: SMP: pass an ipi number to smp_cross_call()



This allows us to use smp_cross_call() to trigger a number of different
software generated interrupts, rather than combining them all on one
SGI.  Recover the SGI number via do_IPI.

Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d92e0471
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ extern void show_ipi_list(struct seq_file *p);
/*
 * Called from assembly code, this handles an IPI.
 */
asmlinkage void do_IPI(struct pt_regs *regs);
asmlinkage void do_IPI(int ipinr, struct pt_regs *regs);

/*
 * Setup the set of possible CPUs (via set_cpu_possible)
@@ -53,7 +53,7 @@ extern void smp_store_cpu_info(unsigned int cpuid);
/*
 * Raise an IPI cross call on CPUs in callmap.
 */
extern void smp_cross_call(const struct cpumask *mask);
extern void smp_cross_call(const struct cpumask *mask, int ipi);

/*
 * Boot a secondary CPU, and assign it the specified idle task.
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@
	 */
	ALT_SMP(test_for_ipi r0, r6, r5, lr)
	ALT_UP_B(9997f)
	movne	r0, sp
	movne	r1, sp
	adrne	lr, BSYM(1b)
	bne	do_IPI

+2 −8
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ static void send_ipi_message(const struct cpumask *mask, enum ipi_msg_type msg)
	/*
	 * Call the platform specific cross-CPU call function.
	 */
	smp_cross_call(mask);
	smp_cross_call(mask, 1);

	local_irq_restore(flags);
}
@@ -537,14 +537,8 @@ static void ipi_cpu_stop(unsigned int cpu)

/*
 * Main handler for inter-processor interrupts
 *
 * For ARM, the ipimask now only identifies a single
 * category of IPI (Bit 1 IPIs have been replaced by a
 * different mechanism):
 *
 *  Bit 0 - Inter-processor function call
 */
asmlinkage void __exception do_IPI(struct pt_regs *regs)
asmlinkage void __exception do_IPI(int ipinr, struct pt_regs *regs)
{
	unsigned int cpu = smp_processor_id();
	struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+2 −2
Original line number Diff line number Diff line
@@ -31,9 +31,9 @@

#include <asm/hardware/gic.h>

static inline void smp_cross_call(const struct cpumask *mask)
static inline void smp_cross_call(const struct cpumask *mask, int ipi)
{
	gic_raise_softirq(mask, 1);
	gic_raise_softirq(mask, ipi);
}

#endif
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
	omap_modify_auxcoreboot0(0x200, 0xfffffdff);
	flush_cache_all();
	smp_wmb();
	smp_cross_call(cpumask_of(cpu));
	smp_cross_call(cpumask_of(cpu), 1);

	/*
	 * Now the secondary core is starting up let it run its
Loading