Merge tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / include / linux / msi.h
index 15dd71817996f0e0e8cdd25671b830d02620dfff..cdb14a1ef26810c26a54b94efb3b281996bc7b5e 100644 (file)
@@ -48,6 +48,10 @@ typedef struct arch_msi_msg_data {
 } __attribute__ ((packed)) arch_msi_msg_data_t;
 #endif
 
+#ifndef arch_is_isolated_msi
+#define arch_is_isolated_msi() false
+#endif
+
 /**
  * msi_msg - Representation of a MSI message
  * @address_lo:                Low 32 bits of msi message address
@@ -651,6 +655,19 @@ int platform_msi_device_domain_alloc(struct irq_domain *domain, unsigned int vir
 void platform_msi_device_domain_free(struct irq_domain *domain, unsigned int virq,
                                     unsigned int nvec);
 void *platform_msi_get_host_data(struct irq_domain *domain);
+
+bool msi_device_has_isolated_msi(struct device *dev);
+#else /* CONFIG_GENERIC_MSI_IRQ */
+static inline bool msi_device_has_isolated_msi(struct device *dev)
+{
+       /*
+        * Arguably if the platform does not enable MSI support then it has
+        * "isolated MSI", as an interrupt controller that cannot receive MSIs
+        * is inherently isolated by our definition. The default definition for
+        * arch_is_isolated_msi() is conservative and returns false anyhow.
+        */
+       return arch_is_isolated_msi();
+}
 #endif /* CONFIG_GENERIC_MSI_IRQ */
 
 /* PCI specific interfaces */