]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[S390] smp: external call vs. emergency signal
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 24 Oct 2011 09:47:47 +0000 (11:47 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 24 Oct 2011 09:47:34 +0000 (11:47 +0200)
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>
arch/s390/kernel/head31.S
arch/s390/kernel/head64.S
arch/s390/kernel/smp.c

index f21954b44dc1ec1c5a80249b855bd4214cd528d8..d3f1ab7d90ada12d5a7a4a59bc98bcfa245c3c71 100644 (file)
@@ -92,7 +92,7 @@ ENTRY(_stext)
 .LPG3:
 # check control registers
        stctl   %c0,%c15,0(%r15)
-       oi      2(%r15),0x40            # enable sigp emergency signal
+       oi      2(%r15),0x60            # enable sigp emergency & external call
        oi      0(%r15),0x10            # switch on low address protection
        lctl    %c0,%c15,0(%r15)
 
index ae5d492b069e3c92396395dc8bf6395f4785b420..99348c0eaa4105a8e8e000be3182911da58b61a7 100644 (file)
@@ -90,7 +90,7 @@ ENTRY(_stext)
 .LPG3:
 # check control registers
        stctg   %c0,%c15,0(%r15)
-       oi      6(%r15),0x40            # enable sigp emergency signal
+       oi      6(%r15),0x60            # enable sigp emergency & external call
        oi      4(%r15),0x10            # switch on low address proctection
        lctlg   %c0,%c15,0(%r15)
 
index 6c8a977af595343f19430d19ea5ae88fef436b60..3bde5688ceb50820c2b232de87008169ec549332 100644 (file)
@@ -209,12 +209,19 @@ static void do_ext_call_interrupt(unsigned int ext_int_code,
  */
 static void smp_ext_bitcall(int cpu, int sig)
 {
+       int order;
+
        /*
         * Set signaling bit in lowcore of target cpu and kick it
         */
        set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
-       while (sigp(cpu, sigp_emergency_signal) == sigp_busy)
+       while (1) {
+               order = smp_vcpu_scheduled(cpu) ?
+                       sigp_external_call : sigp_emergency_signal;
+               if (sigp(cpu, order) != sigp_busy)
+                       break;
                udelay(10);
+       }
 }
 
 void arch_send_call_function_ipi_mask(const struct cpumask *mask)
@@ -754,6 +761,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
        /* request the 0x1201 emergency signal external interrupt */
        if (register_external_interrupt(0x1201, do_ext_call_interrupt) != 0)
                panic("Couldn't request external interrupt 0x1201");
+       /* request the 0x1202 external call external interrupt */
+       if (register_external_interrupt(0x1202, do_ext_call_interrupt) != 0)
+               panic("Couldn't request external interrupt 0x1202");
 
        /* Reallocate current lowcore, but keep its contents. */
        lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER);