lkml.org 
[lkml]   [2022]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [patch 17/20] platform-msi: Switch to the domain id aware MSI interfaces
Date
> From: Thomas Gleixner <tglx@linutronix.de>
> Sent: Friday, November 18, 2022 8:27 PM
>
> On Fri, Nov 18 2022 at 08:53, Kevin Tian wrote:
> >> From: Thomas Gleixner <tglx@linutronix.de>
> >>
> >> - err = msi_domain_alloc_irqs(dev->msi.domain, dev, nvec);
> >> + err = msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0,
> >> nvec - 1);
> >> if (err)
> >> platform_msi_free_priv_data(dev);
> >>
> >
> > Out of curiosity. Why don't we provide an unlocked version of
> > msi_domain_alloc_irqs_all()?
>
> -ENOUSER

msi_domain_alloc_irqs() and msi_domain_alloc_irqs_descs_locked()
are a pair.

What I didn't get was why the unlocked invocation in this patch
is replaced by a range-based helper while the locked invocation
in previous patch16 was replaced by an all-based helper:

if (domain && irq_domain_is_hierarchy(domain))
- return msi_domain_alloc_irqs_descs_locked(domain, &dev->dev, nvec);
+ return msi_domain_alloc_irqs_all_locked(&dev->dev, MSI_DEFAULT_DOMAIN, nvec);

The reason could probably be marked out in the commit msg.

\
 
 \ /
  Last update: 2022-11-21 04:42    [W:0.059 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site