Skip to contentSkip to conversation

PCI/MSI: Remove the PCI_MSI_IRQ_DOMAIN architecture whitelist

PATCH In review Palmer Dabbelt 3 participants 8 messages Oct 17, 2019 – Oct 24, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This came up in the context of the microblaze port, where a patch was recently posted to extend the whitelist.

#1 lore raw

PATCH 1/3 ia64: Use the generic msi.h

Without this I can't enable PCI_MSI_IRQ_DOMAIN, which as far as I can tell only depends on generic functionality provided by msi.h. PCI_MSI_IRQ_DOMAIN has historically had a whitelist of supported architectures, but that list is getting long enough that it's cleaner to just enable it everywhere.

This builds with an ia64 defconfig, but I have no access to ia64 and therefor can't even boot test it.

---
 arch/ia64/include/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/ia64/include/asm/Kbuild +1 -0
index 390393667d3b..22d6dbefa7d7 100644
@@ -6,6 +6,7 @@ generic-y += irq_work.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
 generic-y += mm-arch-hooks.h
+generic-y += msi.h
 generic-y += preempt.h
 generic-y += trace_clock.h
 generic-y += vtime.h
Signature · 1 line
2.21.0
#2 lore raw

PATCH 2/3 s390: Use the generic msi.h

In reply to Palmer Dabbelt

Without this I can't enable PCI_MSI_IRQ_DOMAIN, which as far as I can tell only depends on generic functionality provided by msi.h. PCI_MSI_IRQ_DOMAIN has historically had a whitelist of supported architectures, but that list is getting long enough that it's cleaner to just enable it everywhere.

This builds with an s390 defconfig, but I have no access to s390 and therefor can't even boot test it.

---
 arch/s390/include/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/s390/include/asm/Kbuild +1 -0
index 2531f673f099..afd35e55b358 100644
@@ -21,6 +21,7 @@ generic-y += local64.h
 generic-y += mcs_spinlock.h
 generic-y += mm-arch-hooks.h
 generic-y += mmiowb.h
+generic-y += msi.h
 generic-y += trace_clock.h
 generic-y += unaligned.h
 generic-y += word-at-a-time.h
Signature · 1 line
2.21.0
#3 lore raw

PATCH 3/3 pci: Default to PCI_MSI_IRQ_DOMAIN

In reply to Palmer Dabbelt

As far as I can tell, the only reason there was an architecture whitelist for PCI_MSI_IRQ_DOMAIN is because it requires msi.h. I've built this for all the architectures that play nice with make.cross, but I haven't boot tested it anywhere.

---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +1 -1
index a304f5ea11b9..77c1428cd945 100644
@@ -52,7 +52,7 @@ config PCI_MSI
 	   If you don't know what to do here, say Y.
 
 config PCI_MSI_IRQ_DOMAIN
-	def_bool ARC || ARM || ARM64 || X86 || RISCV
+	def_bool y
 	depends on PCI_MSI
 	select GENERIC_MSI_IRQ_DOMAIN
 
Signature · 1 line
2.21.0
#4 lore raw

Re: [PATCH 3/3] pci: Default to PCI_MSI_IRQ_DOMAIN

Quoted 15 lines · Palmer Dabbelt

As far as I can tell, the only reason there was an architecture whitelist for PCI_MSI_IRQ_DOMAIN is because it requires msi.h. I've built this for all the architectures that play nice with make.cross, but I haven't boot tested it anywhere.

---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +0 -0
index a304f5ea11b9..77c1428cd945 100644

drivers/pci/Kconfig config PCI_MSI · line 58

Quoted 8 lines
drivers/pci/Kconfig +1 -1
@@ -52,7 +52,7 @@ config PCI_MSI
 	   If you don't know what to do here, say Y.
 
 config PCI_MSI_IRQ_DOMAIN
-	def_bool ARC || ARM || ARM64 || X86 || RISCV
+	def_bool y
 	depends on PCI_MSI
 	select GENERIC_MSI_IRQ_DOMAIN
 

The linking of asm-generic/msi.h is currently enabled for

./arch/powerpc/include/asm/Kbuild:generic-y += msi.h ./arch/arm/include/asm/Kbuild:generic-y += msi.h ./arch/mips/include/asm/Kbuild:generic-y += msi.h ./arch/riscv/include/asm/Kbuild:generic-y += msi.h ./arch/arc/include/asm/Kbuild:generic-y += msi.h ./arch/arm64/include/asm/Kbuild:generic-y += msi.h ./arch/sparc/include/asm/Kbuild:generic-y += msi.h

Your patchset adds 2 more and x86 has its own asm/msi.h. That leads to a total of 10 archs, but there are 37 sub-directories under arch. It is possible that the other architectures don't have PCI_MSI set. Still it may be a bit risky to set it to "def_bool y".

Cheers,
Longman

#5 lore raw
In reply to Palmer Dabbelt

Hi,

Quoted 2 lines · Palmer Dabbelt

This came up in the context of the microblaze port, where a patch was recently posted to extend the whitelist.

I hoped you were aware about this discussion we have with Christoph.
https://lkml.org/lkml/2019/10/8/682

It means 1/3 and 2/3 should be replaced by mandatory-y and I expect msi.h can be removed from architecture Kbuild too.

Thanks,
Michal

#6 lore raw
Quoted 11 lines · On Thu, 17 Oct 2019 23:20:09 PDT (-0700), [email protected] wrote:

Hi,

Quoted 2 lines · Palmer Dabbelt

This came up in the context of the microblaze port, where a patch was recently posted to extend the whitelist.

I hoped you were aware about this discussion we have with Christoph.
https://lkml.org/lkml/2019/10/8/682

It means 1/3 and 2/3 should be replaced by mandatory-y and I expect msi.h can be removed from architecture Kbuild too.

I'd missed it, but that seems like a better way to do it. I'm going to assume you guys are going to handle this, so feel free to drop my patch set.

Thanks!

#7 lore raw
Quoted 10 lines · Palmer Dabbelt
Quoted 9 lines · On Thu, 17 Oct 2019 23:20:09 PDT (-0700), [email protected] wrote:

Hi,

Quoted 2 lines · Palmer Dabbelt

This came up in the context of the microblaze port, where a patch was recently posted to extend the whitelist.

I hoped you were aware about this discussion we have with Christoph.
https://lkml.org/lkml/2019/10/8/682

Quoted 6 lines
Quoted 2 lines

It means 1/3 and 2/3 should be replaced by mandatory-y and I expect msi.h can be removed from architecture Kbuild too.

I'd missed it, but that seems like a better way to do it.  I'm going to assume you guys are going to handle this, so feel free to drop my patch set.

Ok. I have sent it with ccing you.

Thanks,
Michal