2019-10-18 22:13:28

by Palmer Dabbelt

[permalink] [raw]
Subject: PCI/MSI: Remove the PCI_MSI_IRQ_DOMAIN architecture whitelist

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



2019-10-18 22:13:31

by Palmer Dabbelt

[permalink] [raw]
Subject: [PATCH 2/3] s390: 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 s390 defconfig, but I have no access to s390 and
therefor can't even boot test it.

Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/s390/include/asm/Kbuild | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index 2531f673f099..afd35e55b358 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -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
--
2.21.0

2019-10-18 22:13:44

by Palmer Dabbelt

[permalink] [raw]
Subject: [PATCH 3/3] pci: Default to PCI_MSI_IRQ_DOMAIN

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.

Signed-off-by: Palmer Dabbelt <[email protected]>
---
drivers/pci/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index a304f5ea11b9..77c1428cd945 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -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

--
2.21.0

2019-10-18 22:14:39

by Palmer Dabbelt

[permalink] [raw]
Subject: [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.

Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/ia64/include/asm/Kbuild | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild
index 390393667d3b..22d6dbefa7d7 100644
--- a/arch/ia64/include/asm/Kbuild
+++ b/arch/ia64/include/asm/Kbuild
@@ -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
--
2.21.0

2019-10-18 22:15:51

by Waiman Long

[permalink] [raw]
Subject: Re: [PATCH 3/3] pci: Default to PCI_MSI_IRQ_DOMAIN

On 10/17/19 2:19 PM, Palmer Dabbelt wrote:
> 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.
>
> Signed-off-by: Palmer Dabbelt <[email protected]>
> ---
> drivers/pci/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> index a304f5ea11b9..77c1428cd945 100644
> --- a/drivers/pci/Kconfig
> +++ b/drivers/pci/Kconfig
> @@ -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

2019-10-18 23:30:57

by Michal Simek

[permalink] [raw]
Subject: Re: PCI/MSI: Remove the PCI_MSI_IRQ_DOMAIN architecture whitelist

Hi,

On 17. 10. 19 20:19, Palmer Dabbelt wrote:
> 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


2019-10-22 16:54:43

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: PCI/MSI: Remove the PCI_MSI_IRQ_DOMAIN architecture whitelist

On Thu, 17 Oct 2019 23:20:09 PDT (-0700), [email protected] wrote:
> Hi,
>
> On 17. 10. 19 20:19, Palmer Dabbelt wrote:
>> 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!

2019-10-25 07:02:38

by Michal Simek

[permalink] [raw]
Subject: Re: PCI/MSI: Remove the PCI_MSI_IRQ_DOMAIN architecture whitelist

On 22. 10. 19 17:10, Palmer Dabbelt wrote:
> On Thu, 17 Oct 2019 23:20:09 PDT (-0700), [email protected] wrote:
>> Hi,
>>
>> On 17. 10. 19 20:19, Palmer Dabbelt wrote:
>>> 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.

Ok. I have sent it with ccing you.

Thanks,
Michal