]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/airq: pass more TPI info to airq handlers
authorMatthew Rosato <mjrosato@linux.ibm.com>
Mon, 6 Jun 2022 20:33:09 +0000 (16:33 -0400)
committerChristian Borntraeger <borntraeger@linux.ibm.com>
Mon, 11 Jul 2022 07:54:10 +0000 (09:54 +0200)
A subsequent patch will introduce an airq handler that requires additional
TPI information beyond directed vs floating, so pass the entire tpi_info
structure via the handler.  Only pci actually uses this information today,
for the other airq handlers this is effectively a no-op.

Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20220606203325.110625-6-mjrosato@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
arch/s390/include/asm/airq.h
arch/s390/kvm/interrupt.c
arch/s390/pci/pci_irq.c
drivers/s390/cio/airq.c
drivers/s390/cio/qdio_thinint.c
drivers/s390/crypto/ap_bus.c
drivers/s390/virtio/virtio_ccw.c

index 01936fdfaddbbc0f00388b234fcf9c169ccdfe79..7918a7d090281b7e8c3c42926fa6ebcfe41f00f5 100644 (file)
 
 #include <linux/bit_spinlock.h>
 #include <linux/dma-mapping.h>
+#include <asm/tpi.h>
 
 struct airq_struct {
        struct hlist_node list;         /* Handler queueing. */
-       void (*handler)(struct airq_struct *airq, bool floating);
+       void (*handler)(struct airq_struct *airq, struct tpi_info *tpi_info);
        u8 *lsi_ptr;                    /* Local-Summary-Indicator pointer */
        u8 lsi_mask;                    /* Local-Summary-Indicator mask */
        u8 isc;                         /* Interrupt-subclass */
index af96dc0549a4b57ccce07688cad056c1e3f67fe1..17ff475157d8dedd138b4ae01bfa366d84bbe9e0 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/switch_to.h>
 #include <asm/nmi.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 #include "kvm-s390.h"
 #include "gaccess.h"
 #include "trace-s390.h"
@@ -3311,7 +3312,8 @@ out:
 }
 EXPORT_SYMBOL_GPL(kvm_s390_gisc_unregister);
 
-static void gib_alert_irq_handler(struct airq_struct *airq, bool floating)
+static void gib_alert_irq_handler(struct airq_struct *airq,
+                                 struct tpi_info *tpi_info)
 {
        inc_irq_stat(IRQIO_GAL);
        process_gib_alert_list();
index 500cd2dbdf5367b6a1c54a8c2ba731e168eb6080..b805c75252ed2327d90a4ce795f1a9a97ca12a3a 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <asm/isc.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 
 static enum {FLOATING, DIRECTED} irq_delivery;
 
@@ -216,8 +217,11 @@ static void zpci_handle_fallback_irq(void)
        }
 }
 
-static void zpci_directed_irq_handler(struct airq_struct *airq, bool floating)
+static void zpci_directed_irq_handler(struct airq_struct *airq,
+                                     struct tpi_info *tpi_info)
 {
+       bool floating = !tpi_info->directed_irq;
+
        if (floating) {
                inc_irq_stat(IRQIO_PCF);
                zpci_handle_fallback_irq();
@@ -227,7 +231,8 @@ static void zpci_directed_irq_handler(struct airq_struct *airq, bool floating)
        }
 }
 
-static void zpci_floating_irq_handler(struct airq_struct *airq, bool floating)
+static void zpci_floating_irq_handler(struct airq_struct *airq,
+                                     struct tpi_info *tpi_info)
 {
        unsigned long si, ai;
        struct airq_iv *aibv;
index c0ed364bf44675970b8dd98a497617d78ca761c5..230eb5b5b64ee5f39085222295def53439ec5b9f 100644 (file)
@@ -99,7 +99,7 @@ static irqreturn_t do_airq_interrupt(int irq, void *dummy)
        rcu_read_lock();
        hlist_for_each_entry_rcu(airq, head, list)
                if ((*airq->lsi_ptr & airq->lsi_mask) != 0)
-                       airq->handler(airq, !tpi_info->directed_irq);
+                       airq->handler(airq, tpi_info);
        rcu_read_unlock();
 
        return IRQ_HANDLED;
index 8e09bf3a2fcdf6a058084ac786238f8966c826f0..9b9335dd06db6cbe149b8897d6e9d5a645d512f6 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/qdio.h>
 #include <asm/airq.h>
 #include <asm/isc.h>
+#include <asm/tpi.h>
 
 #include "cio.h"
 #include "ioasm.h"
@@ -93,9 +94,10 @@ static inline u32 clear_shared_ind(void)
 /**
  * tiqdio_thinint_handler - thin interrupt handler for qdio
  * @airq: pointer to adapter interrupt descriptor
- * @floating: flag to recognize floating vs. directed interrupts (unused)
+ * @tpi_info: interrupt information (e.g. floating vs directed -- unused)
  */
-static void tiqdio_thinint_handler(struct airq_struct *airq, bool floating)
+static void tiqdio_thinint_handler(struct airq_struct *airq,
+                                  struct tpi_info *tpi_info)
 {
        u64 irq_time = S390_lowcore.int_clock;
        u32 si_used = clear_shared_ind();
index 5c13d2079d96f32e8d85f208d09d74c48f94516a..1b85f21c151bdba8ce7d95dd9656ce47fd6d3fc7 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/kthread.h>
 #include <linux/mutex.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 #include <linux/atomic.h>
 #include <asm/isc.h>
 #include <linux/hrtimer.h>
@@ -131,7 +132,8 @@ static int ap_max_adapter_id = 63;
 static struct bus_type ap_bus_type;
 
 /* Adapter interrupt definitions */
-static void ap_interrupt_handler(struct airq_struct *airq, bool floating);
+static void ap_interrupt_handler(struct airq_struct *airq,
+                                struct tpi_info *tpi_info);
 
 static bool ap_irq_flag;
 
@@ -452,9 +454,10 @@ static enum hrtimer_restart ap_poll_timeout(struct hrtimer *unused)
 /**
  * ap_interrupt_handler() - Schedule ap_tasklet on interrupt
  * @airq: pointer to adapter interrupt descriptor
- * @floating: ignored
+ * @tpi_info: ignored
  */
-static void ap_interrupt_handler(struct airq_struct *airq, bool floating)
+static void ap_interrupt_handler(struct airq_struct *airq,
+                                struct tpi_info *tpi_info)
 {
        inc_irq_stat(IRQIO_APB);
        tasklet_schedule(&ap_tasklet);
index 97e51c34e6cfbb3f9858da695a28e57378f4b776..58cca50996ee3bfb13235c9af666d9bbc9dd9a94 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/virtio-ccw.h>
 #include <asm/isc.h>
 #include <asm/airq.h>
+#include <asm/tpi.h>
 
 /*
  * virtio related functions
@@ -204,7 +205,8 @@ static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info)
        write_unlock_irqrestore(&info->lock, flags);
 }
 
-static void virtio_airq_handler(struct airq_struct *airq, bool floating)
+static void virtio_airq_handler(struct airq_struct *airq,
+                               struct tpi_info *tpi_info)
 {
        struct airq_info *info = container_of(airq, struct airq_info, airq);
        unsigned long ai;