lkml.org 
[lkml]   [2022]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 34/39] PCI/MSI: Reject multi-MSI early
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@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@nvidia.com>

Jason

\
 
 \ /
  Last update: 2022-11-16 19:00    [W:0.531 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site