[patch 34/39] PCI/MSI: Reject multi-MSI early
Jason Gunthorpe
jgg at nvidia.com
Thu Nov 17 04:59:14 AEDT 2022
On Fri, Nov 11, 2022 at 02:55:09PM +0100, Thomas Gleixner wrote:
> When hierarchical MSI interrupt domains are enabled then there is no point
> to do tons of work and detect the missing support for multi-MSI late in the
> allocation path.
>
> Just query the domain feature flags right away. The query function is going
> to be used for other purposes later and has a mode argument which influences
> the result:
>
> ALLOW_LEGACY returns true when:
> - there is no irq domain attached (legacy support)
> - there is a irq domain attached which has the feature flag set
>
> DENY_LEGACY returns only true when:
> - there is a irq domain attached which has the feature flag set
>
> This allows to use the function universally without ifdeffery in the
> calling code.
>
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> ---
> drivers/pci/msi/irqdomain.c | 22 ++++++++++++++++++++++
> drivers/pci/msi/msi.c | 4 ++++
> drivers/pci/msi/msi.h | 9 +++++++++
> 3 files changed, 35 insertions(+)
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the Linuxppc-dev
mailing list