Re: [PATCH 1/4 v1] gpio: Add support for hierarchical IRQ domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/08/2019 15:43, Linus Walleij wrote:
> Hi Masahiro,
> 
> On Thu, Jul 18, 2019 at 1:12 PM Masahiro Yamada
> <yamada.masahiro@xxxxxxxxxxxxx> wrote:
>> On Mon, Jun 24, 2019 at 10:25 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> 
>>> +static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
>>> +                                              unsigned int irq,
>>> +                                              unsigned int nr_irqs,
>>> +                                              void *data)
>>> +{
>>> +       struct gpio_chip *gc = d->host_data;
>>> +       irq_hw_number_t hwirq;
>>> +       unsigned int type = IRQ_TYPE_NONE;
>>> +       struct irq_fwspec *fwspec = data;
>>> +       int ret;
>>> +       int i;
>>
>> We always expect nr_irqs is 1.
>>
>> As gpio-uniphier.c, you can error out with WARN_ON
>> if nr_irqs != 1
> 
> Hm, yes I am pretty sure it is always 1.
> 
> But I'd like to defer changing this until/if Marc changes
> the signature of the function to not pass nr_irqs anymore.
> I try to design for the current prototype because I don't
> know how e.g. ACPI works with respect to this.

nr_irqs is only here for one single case: PCI Multi-MSI, where we have
to allocate a bunch of contiguous hwirqs. In all other cases, nr_irqs is
always 1.

So yes, you can safely assume nr_irqs == 1, and WARN_ON otherwise.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux