]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/s390/kernel/s390_ext.c
[S390] irq: fix service signal external interrupt handling
[karo-tx-linux.git] / arch / s390 / kernel / s390_ext.c
index 185029919c4d98fe38440547cf47c1730b8c5a11..87b5c532abf1faf132e85bf4158869c1677493f1 100644 (file)
@@ -106,3 +106,26 @@ void __irq_entry do_extint(struct pt_regs *regs, unsigned int ext_int_code,
        irq_exit();
        set_irq_regs(old_regs);
 }
+
+static DEFINE_SPINLOCK(sc_irq_lock);
+static int sc_irq_refcount;
+
+void service_subclass_irq_register(void)
+{
+       spin_lock(&sc_irq_lock);
+       if (!sc_irq_refcount)
+               ctl_set_bit(0, 9);
+       sc_irq_refcount++;
+       spin_unlock(&sc_irq_lock);
+}
+EXPORT_SYMBOL(service_subclass_irq_register);
+
+void service_subclass_irq_unregister(void)
+{
+       spin_lock(&sc_irq_lock);
+       sc_irq_refcount--;
+       if (!sc_irq_refcount)
+               ctl_clear_bit(0, 9);
+       spin_unlock(&sc_irq_lock);
+}
+EXPORT_SYMBOL(service_subclass_irq_unregister);