* [PATCH] irqchip: mvebu-odmi: select GENERIC_MSI_IRQ_DOMAIN
@ 2017-02-14 21:24 Arnd Bergmann
2017-02-14 22:29 ` Jason Cooper
2017-02-21 16:59 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-02-14 21:24 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Marc Zyngier
Cc: Arnd Bergmann, Thomas Petazzoni, linux-kernel
This driver uses the MSI domain but has no strict dependency on PCI_MSI, so we
may run into a build failure when CONFIG_GENERIC_MSI_IRQ_DOMAIN is disabled:
drivers/irqchip/irq-mvebu-odmi.c:152:15: error: variable 'odmi_msi_ops' has initializer but incomplete type
static struct msi_domain_ops odmi_msi_ops = {
^~~~~~~~~~~~~~
drivers/irqchip/irq-mvebu-odmi.c:155:15: error: variable 'odmi_msi_domain_info' has initializer but incomplete type
static struct msi_domain_info odmi_msi_domain_info = {
^~~~~~~~~~~~~~~
drivers/irqchip/irq-mvebu-odmi.c:156:3: error: 'struct msi_domain_info' has no member named 'flags'
.flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
^~~~~
drivers/irqchip/irq-mvebu-odmi.c:156:12: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
.flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-mvebu-odmi.c:156:39: error: 'MSI_FLAG_USE_DEF_CHIP_OPS' undeclared here (not in a function); did you mean 'MSI_FLAG_USE_DEF_DOM_OPS'?
Selecting the option from this driver seems to solve this nicely, though I could
not find any other instance of this in irqchip drivers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/irqchip/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index ae96731cd2fb..fbb299c32e17 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -262,6 +262,7 @@ config IRQ_MXS
config MVEBU_ODMI
bool
+ select GENERIC_MSI_IRQ_DOMAIN
config MVEBU_PIC
bool
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip: mvebu-odmi: select GENERIC_MSI_IRQ_DOMAIN
2017-02-14 21:24 [PATCH] irqchip: mvebu-odmi: select GENERIC_MSI_IRQ_DOMAIN Arnd Bergmann
@ 2017-02-14 22:29 ` Jason Cooper
2017-02-21 16:59 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Jason Cooper @ 2017-02-14 22:29 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Gleixner, Marc Zyngier, Thomas Petazzoni, linux-kernel
Hi Arnd,
On Tue, Feb 14, 2017 at 10:24:36PM +0100, Arnd Bergmann wrote:
> This driver uses the MSI domain but has no strict dependency on PCI_MSI, so we
> may run into a build failure when CONFIG_GENERIC_MSI_IRQ_DOMAIN is disabled:
>
> drivers/irqchip/irq-mvebu-odmi.c:152:15: error: variable 'odmi_msi_ops' has initializer but incomplete type
> static struct msi_domain_ops odmi_msi_ops = {
> ^~~~~~~~~~~~~~
> drivers/irqchip/irq-mvebu-odmi.c:155:15: error: variable 'odmi_msi_domain_info' has initializer but incomplete type
> static struct msi_domain_info odmi_msi_domain_info = {
> ^~~~~~~~~~~~~~~
> drivers/irqchip/irq-mvebu-odmi.c:156:3: error: 'struct msi_domain_info' has no member named 'flags'
> .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
> ^~~~~
> drivers/irqchip/irq-mvebu-odmi.c:156:12: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
> .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
> ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/irqchip/irq-mvebu-odmi.c:156:39: error: 'MSI_FLAG_USE_DEF_CHIP_OPS' undeclared here (not in a function); did you mean 'MSI_FLAG_USE_DEF_DOM_OPS'?
>
> Selecting the option from this driver seems to solve this nicely, though I could
> not find any other instance of this in irqchip drivers.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/irqchip/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
right-o, I think it's fine here as it's obviously a direct dependency.
I'll queue this up.
thx,
Jason.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip: mvebu-odmi: select GENERIC_MSI_IRQ_DOMAIN
2017-02-14 21:24 [PATCH] irqchip: mvebu-odmi: select GENERIC_MSI_IRQ_DOMAIN Arnd Bergmann
2017-02-14 22:29 ` Jason Cooper
@ 2017-02-21 16:59 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-02-21 16:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Gleixner, Jason Cooper, Marc Zyngier, linux-kernel,
Grégory Clement, Jason Cooper, Sebastian Hesselbarth,
Andrew Lunn
gHello,
On Tue, 14 Feb 2017 22:24:36 +0100, Arnd Bergmann wrote:
> This driver uses the MSI domain but has no strict dependency on PCI_MSI, so we
> may run into a build failure when CONFIG_GENERIC_MSI_IRQ_DOMAIN is disabled:
>
> drivers/irqchip/irq-mvebu-odmi.c:152:15: error: variable 'odmi_msi_ops' has initializer but incomplete type
> static struct msi_domain_ops odmi_msi_ops = {
> ^~~~~~~~~~~~~~
> drivers/irqchip/irq-mvebu-odmi.c:155:15: error: variable 'odmi_msi_domain_info' has initializer but incomplete type
> static struct msi_domain_info odmi_msi_domain_info = {
> ^~~~~~~~~~~~~~~
> drivers/irqchip/irq-mvebu-odmi.c:156:3: error: 'struct msi_domain_info' has no member named 'flags'
> .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
> ^~~~~
> drivers/irqchip/irq-mvebu-odmi.c:156:12: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
> .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS),
> ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/irqchip/irq-mvebu-odmi.c:156:39: error: 'MSI_FLAG_USE_DEF_CHIP_OPS' undeclared here (not in a function); did you mean 'MSI_FLAG_USE_DEF_DOM_OPS'?
>
> Selecting the option from this driver seems to solve this nicely, though I could
> not find any other instance of this in irqchip drivers.
Here is my explanation of why MVEBU_ODMI is the only one affected:
because it's the only one that provides only platform MSI and not PCI
MSI.
Let's look at the other irqchip drivers using msi_domain_ops:
irq-gic-v2m.c:static struct msi_domain_ops gicv2m_pmsi_ops = {
irq-gic-v3-its-pci-msi.c:static struct msi_domain_ops its_pci_msi_ops = {
irq-gic-v3-its-platform-msi.c:static struct msi_domain_ops its_pmsi_ops = {
irq-gic-v3-its.c:static struct msi_domain_ops its_msi_domain_ops = {
irq-mvebu-odmi.c:static struct msi_domain_ops odmi_msi_ops = {
So, besides mvebu-odmi, we've got GICv2m and GIv3 ITS. Their Kconfig
declaration is:
config ARM_GIC_V2M
bool
depends on PCI
select ARM_GIC
select PCI_MSI
config ARM_GIC_V3_ITS
bool
depends on PCI
depends on PCI_MSI
select ACPI_IORT if ACPI
so both of them "select PCI_MSI". Then we have:
config PCI_MSI_IRQ_DOMAIN
def_bool ARC || ARM || ARM64 || X86
depends on PCI_MSI
select GENERIC_MSI_IRQ_DOMAIN
So, when we are on ARC, ARM, ARM64 or x86, and PCI_MSI is enabled,
GENERIC_MSI_IRQ_DOMAIN is automatically enabled. So basically the fact
that GICv2m and GICv3 "select PCI_MSI" ensure that
"GENERIC_MSI_IRQ_DOMAIN" will be enabled.
Therefore:
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-21 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 21:24 [PATCH] irqchip: mvebu-odmi: select GENERIC_MSI_IRQ_DOMAIN Arnd Bergmann
2017-02-14 22:29 ` Jason Cooper
2017-02-21 16:59 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).