* Re: [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver [not found] ` <CAFr9PX=vxCCQgCWe9FPb6Z=0=a48HwGOfM_uOG3SqGN9VSYQUA@mail.gmail.com> @ 2020-11-05 15:43 ` Marc Zyngier 2020-11-10 14:02 ` Linus Walleij 0 siblings, 1 reply; 5+ messages in thread From: Marc Zyngier @ 2020-11-05 15:43 UTC (permalink / raw) To: Daniel Palmer Cc: open list:GPIO SUBSYSTEM, Linus Walleij, Linux Kernel Mailing List, linux-arm-kernel, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On 2020-11-05 15:23, Daniel Palmer wrote: > Hi Marc, > > On Thu, 5 Nov 2020 at 21:08, Marc Zyngier <maz@kernel.org> wrote: >> >> On 2020-11-05 09:40, Linus Walleij wrote: >> > On Mon, Oct 19, 2020 at 4:10 PM Daniel Palmer <daniel@0x0f.com> wrote: >> >> [...] >> >> >> +/* The parent interrupt controller needs the GIC interrupt type set >> >> to GIC_SPI >> >> + * so we need to provide the fwspec. Essentially >> >> gpiochip_populate_parent_fwspec_twocell >> >> + * that puts GIC_SPI into the first cell. >> >> + */ >> >> nit: comment style. > > I've fixed these and some other bits for the v3. > I've held off on pushing that until the rest of it seemed right. > >> >> +static void *msc313_gpio_populate_parent_fwspec(struct gpio_chip *gc, >> >> + unsigned int >> >> parent_hwirq, >> >> + unsigned int parent_type) >> >> +{ >> >> + struct irq_fwspec *fwspec; >> >> + >> >> + fwspec = kmalloc(sizeof(*fwspec), GFP_KERNEL); >> >> + if (!fwspec) >> >> + return NULL; >> >> + >> >> + fwspec->fwnode = gc->irq.parent_domain->fwnode; >> >> + fwspec->param_count = 3; >> >> + fwspec->param[0] = GIC_SPI; >> >> + fwspec->param[1] = parent_hwirq; >> >> + fwspec->param[2] = parent_type; >> >> + >> >> + return fwspec; >> >> +} >> > >> > Clever. Looping in Marc Z so he can say if this looks allright to him. >> >> Yup, this looks correct. However, looking at the bit of the patch that >> isn't quoted here, I see that msc313_gpio_irqchip doesn't have a >> .irq_set_affinity callback. Is this system UP only? > > What is in mainline right now is UP only but there are chips with a > second cortex A7 that I have working in my tree. > So I will add that in for v3 if I can work out what I should actually > do there. :) Probably nothing more than setting the callback to irq_chip_set_affinity_parent, I'd expect. M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver 2020-11-05 15:43 ` [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver Marc Zyngier @ 2020-11-10 14:02 ` Linus Walleij 2020-11-10 14:19 ` Marc Zyngier 0 siblings, 1 reply; 5+ messages in thread From: Linus Walleij @ 2020-11-10 14:02 UTC (permalink / raw) To: Marc Zyngier Cc: open list:GPIO SUBSYSTEM, Daniel Palmer, Linux Kernel Mailing List, Linux ARM, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On Thu, Nov 5, 2020 at 4:43 PM Marc Zyngier <maz@kernel.org> wrote: > On 2020-11-05 15:23, Daniel Palmer wrote: > > On Thu, 5 Nov 2020 at 21:08, Marc Zyngier <maz@kernel.org> wrote: > > > I see that msc313_gpio_irqchip doesn't have a > >> .irq_set_affinity callback. Is this system UP only? > > > > What is in mainline right now is UP only but there are chips with a > > second cortex A7 that I have working in my tree. > > So I will add that in for v3 if I can work out what I should actually > > do there. :) > > Probably nothing more than setting the callback to > irq_chip_set_affinity_parent, Hm, is this something all GPIO irqchips used on SMP systems should be doing? Or just hierarchical ones? Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver 2020-11-10 14:02 ` Linus Walleij @ 2020-11-10 14:19 ` Marc Zyngier 2020-11-11 14:09 ` Linus Walleij 0 siblings, 1 reply; 5+ messages in thread From: Marc Zyngier @ 2020-11-10 14:19 UTC (permalink / raw) To: Linus Walleij Cc: open list:GPIO SUBSYSTEM, Daniel Palmer, Linux Kernel Mailing List, Linux ARM, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On 2020-11-10 14:02, Linus Walleij wrote: > On Thu, Nov 5, 2020 at 4:43 PM Marc Zyngier <maz@kernel.org> wrote: >> On 2020-11-05 15:23, Daniel Palmer wrote: >> > On Thu, 5 Nov 2020 at 21:08, Marc Zyngier <maz@kernel.org> wrote: > >> > > I see that msc313_gpio_irqchip doesn't have a >> >> .irq_set_affinity callback. Is this system UP only? >> > >> > What is in mainline right now is UP only but there are chips with a >> > second cortex A7 that I have working in my tree. >> > So I will add that in for v3 if I can work out what I should actually >> > do there. :) >> >> Probably nothing more than setting the callback to >> irq_chip_set_affinity_parent, > > Hm, is this something all GPIO irqchips used on SMP systems > should be doing? Or just hierarchical ones? Probably only the hierarchical ones. I'd expect the non-hierarchical GPIOs to be muxed behind a single interrupt, which makes it impossible to move a single GPIO around, and moving the mux interrupt would break userspace's expectations that interrupts move independently of each others. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver 2020-11-10 14:19 ` Marc Zyngier @ 2020-11-11 14:09 ` Linus Walleij 2020-11-11 14:19 ` Marc Zyngier 0 siblings, 1 reply; 5+ messages in thread From: Linus Walleij @ 2020-11-11 14:09 UTC (permalink / raw) To: Marc Zyngier Cc: open list:GPIO SUBSYSTEM, Daniel Palmer, Linux Kernel Mailing List, Linux ARM, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On Tue, Nov 10, 2020 at 3:19 PM Marc Zyngier <maz@kernel.org> wrote: > On 2020-11-10 14:02, Linus Walleij wrote: > >> Probably nothing more than setting the callback to > >> irq_chip_set_affinity_parent, > > > > Hm, is this something all GPIO irqchips used on SMP systems > > should be doing? Or just hierarchical ones? > > Probably only the hierarchical ones. I'd expect the non-hierarchical > GPIOs to be muxed behind a single interrupt, which makes it impossible > to move a single GPIO around, and moving the mux interrupt would break > userspace's expectations that interrupts move independently of each > others. I found two suspects and sent patches. I think I might have some more candidates down in pinctrl. I do have some hierarchical IRQ that is on UP systems, I suppose these are not affected. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver 2020-11-11 14:09 ` Linus Walleij @ 2020-11-11 14:19 ` Marc Zyngier 0 siblings, 0 replies; 5+ messages in thread From: Marc Zyngier @ 2020-11-11 14:19 UTC (permalink / raw) To: Linus Walleij Cc: open list:GPIO SUBSYSTEM, Daniel Palmer, Linux Kernel Mailing List, Linux ARM, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On 2020-11-11 14:09, Linus Walleij wrote: > On Tue, Nov 10, 2020 at 3:19 PM Marc Zyngier <maz@kernel.org> wrote: >> On 2020-11-10 14:02, Linus Walleij wrote: > >> >> Probably nothing more than setting the callback to >> >> irq_chip_set_affinity_parent, >> > >> > Hm, is this something all GPIO irqchips used on SMP systems >> > should be doing? Or just hierarchical ones? >> >> Probably only the hierarchical ones. I'd expect the non-hierarchical >> GPIOs to be muxed behind a single interrupt, which makes it impossible >> to move a single GPIO around, and moving the mux interrupt would break >> userspace's expectations that interrupts move independently of each >> others. > > I found two suspects and sent patches. I think I might have some > more candidates down in pinctrl. I do have some hierarchical IRQ > that is on UP systems, I suppose these are not affected. Yup, they look good. Feel free to add my Ack to them. And yes, UP systems are naturally oblivious of interrupt affinity. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-11 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20201019141008.871177-1-daniel@0x0f.com>
[not found] ` <20201019141008.871177-4-daniel@0x0f.com>
[not found] ` <CACRpkdZNr6sDqJhg3KcX0bCbcd8fh2gXFYbS1r2H2Sq+vGqjUw@mail.gmail.com>
[not found] ` <3fd04aeb5047d8059ddecc1eda19c2e4@kernel.org>
[not found] ` <CAFr9PX=vxCCQgCWe9FPb6Z=0=a48HwGOfM_uOG3SqGN9VSYQUA@mail.gmail.com>
2020-11-05 15:43 ` [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver Marc Zyngier
2020-11-10 14:02 ` Linus Walleij
2020-11-10 14:19 ` Marc Zyngier
2020-11-11 14:09 ` Linus Walleij
2020-11-11 14:19 ` Marc Zyngier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).