aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-10-30 10:16:58 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-10-30 10:16:44 -0400
commitd98e19ccef10c5aadccc4ffe2925e4099ff9606a (patch)
treec459bd945c3e43d6a0f952cf687769f689f29628
parent5915a873fcb1cea5260940be519f2cdf898f7be3 (diff)
[S390] smp: external call vs. emergency signal
Use a sigp sense running to decide which signal processor order to use for an ipi. If the target cpu is running use external call, if the target cpu is not running use emergency signal. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/head31.S2
-rw-r--r--arch/s390/kernel/head64.S2
-rw-r--r--arch/s390/kernel/smp.c12
3 files changed, 13 insertions, 3 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index f21954b44dc1..d3f1ab7d90ad 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -92,7 +92,7 @@ ENTRY(_stext)
92.LPG3: 92.LPG3:
93# check control registers 93# check control registers
94 stctl %c0,%c15,0(%r15) 94 stctl %c0,%c15,0(%r15)
95 oi 2(%r15),0x40 # enable sigp emergency signal 95 oi 2(%r15),0x60 # enable sigp emergency & external call
96 oi 0(%r15),0x10 # switch on low address protection 96 oi 0(%r15),0x10 # switch on low address protection
97 lctl %c0,%c15,0(%r15) 97 lctl %c0,%c15,0(%r15)
98 98
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index ae5d492b069e..99348c0eaa41 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -90,7 +90,7 @@ ENTRY(_stext)
90.LPG3: 90.LPG3:
91# check control registers 91# check control registers
92 stctg %c0,%c15,0(%r15) 92 stctg %c0,%c15,0(%r15)
93 oi 6(%r15),0x40 # enable sigp emergency signal 93 oi 6(%r15),0x60 # enable sigp emergency & external call
94 oi 4(%r15),0x10 # switch on low address proctection 94 oi 4(%r15),0x10 # switch on low address proctection
95 lctlg %c0,%c15,0(%r15) 95 lctlg %c0,%c15,0(%r15)
96 96
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 6c8a977af595..3bde5688ceb5 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -209,12 +209,19 @@ static void do_ext_call_interrupt(unsigned int ext_int_code,
209 */ 209 */
210static void smp_ext_bitcall(int cpu, int sig) 210static void smp_ext_bitcall(int cpu, int sig)
211{ 211{
212 int order;
213
212 /* 214 /*
213 * Set signaling bit in lowcore of target cpu and kick it 215 * Set signaling bit in lowcore of target cpu and kick it
214 */ 216 */
215 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast); 217 set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
216 while (sigp(cpu, sigp_emergency_signal) == sigp_busy) 218 while (1) {
219 order = smp_vcpu_scheduled(cpu) ?
220 sigp_external_call : sigp_emergency_signal;
221 if (sigp(cpu, order) != sigp_busy)
222 break;
217 udelay(10); 223 udelay(10);
224 }
218} 225}
219 226
220void arch_send_call_function_ipi_mask(const struct cpumask *mask) 227void arch_send_call_function_ipi_mask(const struct cpumask *mask)
@@ -754,6 +761,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
754 /* request the 0x1201 emergency signal external interrupt */ 761 /* request the 0x1201 emergency signal external interrupt */
755 if (register_external_interrupt(0x1201, do_ext_call_interrupt) != 0) 762 if (register_external_interrupt(0x1201, do_ext_call_interrupt) != 0)
756 panic("Couldn't request external interrupt 0x1201"); 763 panic("Couldn't request external interrupt 0x1201");
764 /* request the 0x1202 external call external interrupt */
765 if (register_external_interrupt(0x1202, do_ext_call_interrupt) != 0)
766 panic("Couldn't request external interrupt 0x1202");
757 767
758 /* Reallocate current lowcore, but keep its contents. */ 768 /* Reallocate current lowcore, but keep its contents. */
759 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER); 769 lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER);