]> git.baikalelectronics.ru Git - kernel.git/commitdiff
soc: ti: ti_sci_inta_msi: Use msi_desc::msi_index
authorThomas Gleixner <tglx@linutronix.de>
Fri, 10 Dec 2021 22:19:17 +0000 (23:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:16:40 +0000 (22:16 +0100)
Use the common msi_index member and get rid of the pointless wrapper struct.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20211210221814.540704224@linutronix.de
drivers/irqchip/irq-ti-sci-inta.c
drivers/soc/ti/ti_sci_inta_msi.c
include/linux/msi.h

index 8eba08db33b2930bfd93f87840e93bee34029aba..5fdbb4358dd0960768d744d13973d559faf60fed 100644 (file)
@@ -595,7 +595,7 @@ static void ti_sci_inta_msi_set_desc(msi_alloc_info_t *arg,
        struct platform_device *pdev = to_platform_device(desc->dev);
 
        arg->desc = desc;
-       arg->hwirq = TO_HWIRQ(pdev->id, desc->inta.dev_index);
+       arg->hwirq = TO_HWIRQ(pdev->id, desc->msi_index);
 }
 
 static struct msi_domain_ops ti_sci_inta_msi_ops = {
index a89bcbcd469452f99b8b0adbda4c7b1014ad4ad6..9d23daac74c3617f512a3794382e1a689774cb85 100644 (file)
@@ -84,7 +84,7 @@ static int ti_sci_inta_msi_alloc_descs(struct device *dev,
                                return -ENOMEM;
                        }
 
-                       msi_desc->inta.dev_index = res->desc[set].start + i;
+                       msi_desc->msi_index = res->desc[set].start + i;
                        INIT_LIST_HEAD(&msi_desc->list);
                        list_add_tail(&msi_desc->list, dev_to_msi_list(dev));
                        count++;
@@ -96,7 +96,7 @@ static int ti_sci_inta_msi_alloc_descs(struct device *dev,
                                return -ENOMEM;
                        }
 
-                       msi_desc->inta.dev_index = res->desc[set].start_sec + i;
+                       msi_desc->msi_index = res->desc[set].start_sec + i;
                        INIT_LIST_HEAD(&msi_desc->list);
                        list_add_tail(&msi_desc->list, dev_to_msi_list(dev));
                        count++;
@@ -154,7 +154,7 @@ unsigned int ti_sci_inta_msi_get_virq(struct device *dev, u32 dev_index)
        struct msi_desc *desc;
 
        for_each_msi_entry(desc, dev)
-               if (desc->inta.dev_index == dev_index)
+               if (desc->msi_index == dev_index)
                        return desc->irq;
 
        return -ENODEV;
index 25edf83ede41ce36351a119d5d41d136cd5017a7..45ec5d07a5f3439d93e1016bc38624fa7e0f6f78 100644 (file)
@@ -106,14 +106,6 @@ struct pci_msi_desc {
        };
 };
 
-/**
- * ti_sci_inta_msi_desc - TISCI based INTA specific msi descriptor data
- * @dev_index: TISCI device index
- */
-struct ti_sci_inta_msi_desc {
-       u16     dev_index;
-};
-
 /**
  * struct msi_desc - Descriptor structure for MSI based interrupts
  * @list:      List head for management
@@ -128,8 +120,7 @@ struct ti_sci_inta_msi_desc {
  * @write_msi_msg_data:        Data parameter for the callback.
  *
  * @msi_index: Index of the msi descriptor
- * @pci:       [PCI]       PCI speficic msi descriptor data
- * @inta:      [INTA]      TISCI based INTA specific msi descriptor data
+ * @pci:       PCI specific msi descriptor data
  */
 struct msi_desc {
        /* Shared device/bus type independent data */
@@ -147,10 +138,7 @@ struct msi_desc {
        void *write_msi_msg_data;
 
        u16                             msi_index;
-       union {
-               struct pci_msi_desc             pci;
-               struct ti_sci_inta_msi_desc     inta;
-       };
+       struct pci_msi_desc             pci;
 };
 
 /**