diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-15 04:42:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-03 03:26:30 -0500 |
commit | ad3b6993b9c5482e8a2ec5aed181538c921fdcbd (patch) | |
tree | ec14d13777bc9b7d495929d74a83c36687ec4eab /arch/arm | |
parent | d92e04713c6323e09a0d0fdfa0d7cbcedb175e49 (diff) |
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: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/smp.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/smp.h | 4 |
15 files changed, 24 insertions, 30 deletions
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 3d05190797cb..da7e7ca53cc1 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -38,7 +38,7 @@ extern void show_ipi_list(struct seq_file *p); | |||
38 | /* | 38 | /* |
39 | * Called from assembly code, this handles an IPI. | 39 | * Called from assembly code, this handles an IPI. |
40 | */ | 40 | */ |
41 | asmlinkage void do_IPI(struct pt_regs *regs); | 41 | asmlinkage void do_IPI(int ipinr, struct pt_regs *regs); |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Setup the set of possible CPUs (via set_cpu_possible) | 44 | * Setup the set of possible CPUs (via set_cpu_possible) |
@@ -53,7 +53,7 @@ extern void smp_store_cpu_info(unsigned int cpuid); | |||
53 | /* | 53 | /* |
54 | * Raise an IPI cross call on CPUs in callmap. | 54 | * Raise an IPI cross call on CPUs in callmap. |
55 | */ | 55 | */ |
56 | extern void smp_cross_call(const struct cpumask *mask); | 56 | extern void smp_cross_call(const struct cpumask *mask, int ipi); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Boot a secondary CPU, and assign it the specified idle task. | 59 | * Boot a secondary CPU, and assign it the specified idle task. |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index c09e3573c5de..955cf5f539ed 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -48,7 +48,7 @@ | |||
48 | */ | 48 | */ |
49 | ALT_SMP(test_for_ipi r0, r6, r5, lr) | 49 | ALT_SMP(test_for_ipi r0, r6, r5, lr) |
50 | ALT_UP_B(9997f) | 50 | ALT_UP_B(9997f) |
51 | movne r0, sp | 51 | movne r1, sp |
52 | adrne lr, BSYM(1b) | 52 | adrne lr, BSYM(1b) |
53 | bne do_IPI | 53 | bne do_IPI |
54 | 54 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8c1959590252..7a236db03fb5 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -404,7 +404,7 @@ static void send_ipi_message(const struct cpumask *mask, enum ipi_msg_type msg) | |||
404 | /* | 404 | /* |
405 | * Call the platform specific cross-CPU call function. | 405 | * Call the platform specific cross-CPU call function. |
406 | */ | 406 | */ |
407 | smp_cross_call(mask); | 407 | smp_cross_call(mask, 1); |
408 | 408 | ||
409 | local_irq_restore(flags); | 409 | local_irq_restore(flags); |
410 | } | 410 | } |
@@ -537,14 +537,8 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
537 | 537 | ||
538 | /* | 538 | /* |
539 | * Main handler for inter-processor interrupts | 539 | * Main handler for inter-processor interrupts |
540 | * | ||
541 | * For ARM, the ipimask now only identifies a single | ||
542 | * category of IPI (Bit 1 IPIs have been replaced by a | ||
543 | * different mechanism): | ||
544 | * | ||
545 | * Bit 0 - Inter-processor function call | ||
546 | */ | 540 | */ |
547 | asmlinkage void __exception do_IPI(struct pt_regs *regs) | 541 | asmlinkage void __exception do_IPI(int ipinr, struct pt_regs *regs) |
548 | { | 542 | { |
549 | unsigned int cpu = smp_processor_id(); | 543 | unsigned int cpu = smp_processor_id(); |
550 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 544 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |
diff --git a/arch/arm/mach-msm/include/mach/smp.h b/arch/arm/mach-msm/include/mach/smp.h index 3ff7bf5e679e..a95f7b9efe31 100644 --- a/arch/arm/mach-msm/include/mach/smp.h +++ b/arch/arm/mach-msm/include/mach/smp.h | |||
@@ -31,9 +31,9 @@ | |||
31 | 31 | ||
32 | #include <asm/hardware/gic.h> | 32 | #include <asm/hardware/gic.h> |
33 | 33 | ||
34 | static inline void smp_cross_call(const struct cpumask *mask) | 34 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
35 | { | 35 | { |
36 | gic_raise_softirq(mask, 1); | 36 | gic_raise_softirq(mask, ipi); |
37 | } | 37 | } |
38 | 38 | ||
39 | #endif | 39 | #endif |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 9e9f70e18e3c..56a8bce247c8 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -76,7 +76,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
76 | omap_modify_auxcoreboot0(0x200, 0xfffffdff); | 76 | omap_modify_auxcoreboot0(0x200, 0xfffffdff); |
77 | flush_cache_all(); | 77 | flush_cache_all(); |
78 | smp_wmb(); | 78 | smp_wmb(); |
79 | smp_cross_call(cpumask_of(cpu)); | 79 | smp_cross_call(cpumask_of(cpu), 1); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Now the secondary core is starting up let it run its | 82 | * Now the secondary core is starting up let it run its |
diff --git a/arch/arm/mach-realview/include/mach/smp.h b/arch/arm/mach-realview/include/mach/smp.h index d3cd265cb058..d1aa70415a4e 100644 --- a/arch/arm/mach-realview/include/mach/smp.h +++ b/arch/arm/mach-realview/include/mach/smp.h | |||
@@ -7,9 +7,9 @@ | |||
7 | /* | 7 | /* |
8 | * We use IRQ1 as the IPI | 8 | * We use IRQ1 as the IPI |
9 | */ | 9 | */ |
10 | static inline void smp_cross_call(const struct cpumask *mask) | 10 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
11 | { | 11 | { |
12 | gic_raise_softirq(mask, 1); | 12 | gic_raise_softirq(mask, ipi); |
13 | } | 13 | } |
14 | 14 | ||
15 | #endif | 15 | #endif |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 009265818d55..af3d9093390b 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -116,7 +116,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
116 | * Use smp_cross_call() for this, since there's little | 116 | * Use smp_cross_call() for this, since there's little |
117 | * point duplicating the code here | 117 | * point duplicating the code here |
118 | */ | 118 | */ |
119 | smp_cross_call(cpumask_of(cpu)); | 119 | smp_cross_call(cpumask_of(cpu), 1); |
120 | 120 | ||
121 | timeout = jiffies + (1 * HZ); | 121 | timeout = jiffies + (1 * HZ); |
122 | while (time_before(jiffies, timeout)) { | 122 | while (time_before(jiffies, timeout)) { |
diff --git a/arch/arm/mach-s5pv310/include/mach/smp.h b/arch/arm/mach-s5pv310/include/mach/smp.h index b7ec252384f4..2897747bcb07 100644 --- a/arch/arm/mach-s5pv310/include/mach/smp.h +++ b/arch/arm/mach-s5pv310/include/mach/smp.h | |||
@@ -14,9 +14,9 @@ extern void __iomem *gic_cpu_base_addr; | |||
14 | /* | 14 | /* |
15 | * We use IRQ1 as the IPI | 15 | * We use IRQ1 as the IPI |
16 | */ | 16 | */ |
17 | static inline void smp_cross_call(const struct cpumask *mask) | 17 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
18 | { | 18 | { |
19 | gic_raise_softirq(mask, 1); | 19 | gic_raise_softirq(mask, ipi); |
20 | } | 20 | } |
21 | 21 | ||
22 | #endif | 22 | #endif |
diff --git a/arch/arm/mach-s5pv310/platsmp.c b/arch/arm/mach-s5pv310/platsmp.c index d357c198edee..d474426f37b7 100644 --- a/arch/arm/mach-s5pv310/platsmp.c +++ b/arch/arm/mach-s5pv310/platsmp.c | |||
@@ -97,7 +97,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
97 | * the boot monitor to read the system wide flags register, | 97 | * the boot monitor to read the system wide flags register, |
98 | * and branch to the address found there. | 98 | * and branch to the address found there. |
99 | */ | 99 | */ |
100 | smp_cross_call(cpumask_of(cpu)); | 100 | smp_cross_call(cpumask_of(cpu), 1); |
101 | 101 | ||
102 | timeout = jiffies + (1 * HZ); | 102 | timeout = jiffies + (1 * HZ); |
103 | while (time_before(jiffies, timeout)) { | 103 | while (time_before(jiffies, timeout)) { |
diff --git a/arch/arm/mach-tegra/include/mach/smp.h b/arch/arm/mach-tegra/include/mach/smp.h index d3cd265cb058..d1aa70415a4e 100644 --- a/arch/arm/mach-tegra/include/mach/smp.h +++ b/arch/arm/mach-tegra/include/mach/smp.h | |||
@@ -7,9 +7,9 @@ | |||
7 | /* | 7 | /* |
8 | * We use IRQ1 as the IPI | 8 | * We use IRQ1 as the IPI |
9 | */ | 9 | */ |
10 | static inline void smp_cross_call(const struct cpumask *mask) | 10 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
11 | { | 11 | { |
12 | gic_raise_softirq(mask, 1); | 12 | gic_raise_softirq(mask, ipi); |
13 | } | 13 | } |
14 | 14 | ||
15 | #endif | 15 | #endif |
diff --git a/arch/arm/mach-ux500/include/mach/smp.h b/arch/arm/mach-ux500/include/mach/smp.h index 197e8417375e..bd57c50a5b86 100644 --- a/arch/arm/mach-ux500/include/mach/smp.h +++ b/arch/arm/mach-ux500/include/mach/smp.h | |||
@@ -18,8 +18,8 @@ extern void u8500_secondary_startup(void); | |||
18 | /* | 18 | /* |
19 | * We use IRQ1 as the IPI | 19 | * We use IRQ1 as the IPI |
20 | */ | 20 | */ |
21 | static inline void smp_cross_call(const struct cpumask *mask) | 21 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
22 | { | 22 | { |
23 | gic_raise_softirq(mask, 1); | 23 | gic_raise_softirq(mask, ipi); |
24 | } | 24 | } |
25 | #endif | 25 | #endif |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 9e4c678de785..b8987bd21249 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -78,7 +78,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
78 | __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); | 78 | __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); |
79 | outer_clean_range(__pa(&pen_release), __pa(&pen_release) + 1); | 79 | outer_clean_range(__pa(&pen_release), __pa(&pen_release) + 1); |
80 | 80 | ||
81 | smp_cross_call(cpumask_of(cpu)); | 81 | smp_cross_call(cpumask_of(cpu), 1); |
82 | 82 | ||
83 | timeout = jiffies + (1 * HZ); | 83 | timeout = jiffies + (1 * HZ); |
84 | while (time_before(jiffies, timeout)) { | 84 | while (time_before(jiffies, timeout)) { |
diff --git a/arch/arm/mach-vexpress/include/mach/smp.h b/arch/arm/mach-vexpress/include/mach/smp.h index 5a6da4fd247e..721be0f0311d 100644 --- a/arch/arm/mach-vexpress/include/mach/smp.h +++ b/arch/arm/mach-vexpress/include/mach/smp.h | |||
@@ -7,8 +7,8 @@ | |||
7 | /* | 7 | /* |
8 | * We use IRQ1 as the IPI | 8 | * We use IRQ1 as the IPI |
9 | */ | 9 | */ |
10 | static inline void smp_cross_call(const struct cpumask *mask) | 10 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
11 | { | 11 | { |
12 | gic_raise_softirq(mask, 1); | 12 | gic_raise_softirq(mask, ipi); |
13 | } | 13 | } |
14 | #endif | 14 | #endif |
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index 670970699ba9..276f916014c1 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -92,7 +92,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
92 | * the boot monitor to read the system wide flags register, | 92 | * the boot monitor to read the system wide flags register, |
93 | * and branch to the address found there. | 93 | * and branch to the address found there. |
94 | */ | 94 | */ |
95 | smp_cross_call(cpumask_of(cpu)); | 95 | smp_cross_call(cpumask_of(cpu), 1); |
96 | 96 | ||
97 | timeout = jiffies + (1 * HZ); | 97 | timeout = jiffies + (1 * HZ); |
98 | while (time_before(jiffies, timeout)) { | 98 | while (time_before(jiffies, timeout)) { |
diff --git a/arch/arm/plat-omap/include/plat/smp.h b/arch/arm/plat-omap/include/plat/smp.h index ecd6a488c497..e5541e5388be 100644 --- a/arch/arm/plat-omap/include/plat/smp.h +++ b/arch/arm/plat-omap/include/plat/smp.h | |||
@@ -29,9 +29,9 @@ extern u32 omap_read_auxcoreboot0(void); | |||
29 | /* | 29 | /* |
30 | * We use Soft IRQ1 as the IPI | 30 | * We use Soft IRQ1 as the IPI |
31 | */ | 31 | */ |
32 | static inline void smp_cross_call(const struct cpumask *mask) | 32 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) |
33 | { | 33 | { |
34 | gic_raise_softirq(mask, 1); | 34 | gic_raise_softirq(mask, ipi); |
35 | } | 35 | } |
36 | 36 | ||
37 | #endif | 37 | #endif |