lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch V2 12/40] irqchip/gic-msi-lib: Prepare for PCI MSI/MSIX
Date
Add the bus tokens for DOMAIN_BUS_PCI_DEVICE_MSI and
DOMAIN_BUS_PCI_DEVICE_MSIX to the common child init
function and enable the parent mask/unmask static key
in the PCI/MSI core.

Provide the match mask which can be used by parent domain
implementation so the bitmask based child bus token match
works.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-gic-msi-lib.c | 7 +++++++
drivers/irqchip/irq-gic-msi-lib.h | 6 ++++++
2 files changed, 13 insertions(+)

--- a/drivers/irqchip/irq-gic-msi-lib.c
+++ b/drivers/irqchip/irq-gic-msi-lib.c
@@ -48,6 +48,13 @@ bool gic_msi_lib_init_dev_msi_info(struc

/* Is the target domain bus token supported ? */
switch(info->bus_token) {
+ case DOMAIN_BUS_PCI_DEVICE_MSI:
+ case DOMAIN_BUS_PCI_DEVICE_MSIX:
+ if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_PCI_MSI)))
+ return false;
+
+ pci_device_msi_mask_unmask_parent_enable();
+ break;
default:
/*
* This should never be reached. See
--- a/drivers/irqchip/irq-gic-msi-lib.h
+++ b/drivers/irqchip/irq-gic-msi-lib.h
@@ -9,6 +9,12 @@
#include <linux/irqdomain.h>
#include <linux/msi.h>

+#ifdef CONFIG_PCI_MSI
+#define MATCH_PCI_MSI BIT(DOMAIN_BUS_PCI_MSI)
+#else
+#define MATCH_PCI_MSI (0)
+#endif
+
int gic_msi_lib_irq_domain_select(struct irq_domain *d, struct irq_fwspec *fwspec,
enum irq_domain_bus_token bus_token);

\
 
 \ /
  Last update: 2022-11-21 15:56    [W:0.314 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site