From: Marc Zyngier <marc.zyngier@arm.com> To: Grygorii Strashko <grygorii.strashko@ti.com>, Lokesh Vutla <lokeshvutla@ti.com> Cc: Nishanth Menon <nm@ti.com>, Santosh Shilimkar <ssantosh@kernel.org>, Rob Herring <robh+dt@kernel.org>, tglx@linutronix.de, jason@lakedaemon.net, Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>, linux-kernel@vger.kernel.org, Tero Kristo <t-kristo@ti.com>, Sekhar Nori <nsekhar@ti.com>, Device Tree Mailing List <devicetree@vger.kernel.org>, Peter Ujfalusi <peter.ujfalusi@ti.com> Subject: Re: [PATCH v2 09/10] irqchip: ti-sci-inta: Add support for Interrupt Aggregator driver Date: Thu, 1 Nov 2018 14:52:12 +0000 [thread overview] Message-ID: <8bd930f3-a5c9-0490-d676-fb1e0f2f3ad8@arm.com> (raw) In-Reply-To: <ae3c35e0-6d92-10e3-c268-eb4338fbb233@ti.com> On 31/10/18 20:33, Grygorii Strashko wrote: > > > On 10/31/18 1:21 PM, Marc Zyngier wrote: >> Hi Grygorii, >> >> On 31/10/18 16:39, Grygorii Strashko wrote: >> >> [...] >> >>> I'd try to provide some additional information here. >>> (Sry, I'll still use term "events") >>> >>> As Lokesh explained in other mail on K3 SoC everything is generic and most >>> of resources allocated dynamicaly: >>> - generic DMA channels >>> - generic HW rings (used by DMA channel) >>> - generic events (assigned to the rings) and muxed to different cores/hosts >>> >>> So, when some driver would like to perform DMA transaction It's >>> required to build (configure) DMA channel by allocating different type of >>> resources and link them together to get finally working Data Movement path >>> (situation complicated by ti-sci firmware which policies resources between cores/hosts): >>> - get UDMA channel from available range >>> - get HW rings and attach them to the UDMA channel >>> - get event, assign it to the ring and mux it to the core/host through IA->IR-> chain >>> (and this step is done by ti_sci_inta_register_event() - no DT as everything is dynamic). >>> >>> Next, how this is working now - ti_sci_inta_register_event(): >>> - first call does similar things as regular DT irq mapping (end up calling irq_create_fwspec_mapping() >>> and builds IRQ chain as below: >>> linux_virq = ti_sci_inta_register_event(dev, <ringacc tisci_dev_id>, >>> <ringacc id>, 0, IRQF_TRIGGER_HIGH, false); >>> >>> +---------------------+ >>> | IA | >>> +--------+ | +------+ | +--------+ +------+ >>> | ring 1 +----->evtA+----->VintX +----------> IR +---------> GIC +--> >>> +--------+ | +------+ | +--------+ +------+ Linux IRQ Y >>> evtA | | >>> | | >>> +---------------------+ >>> >>> - second call updates only IA input part while keeping other parts of IRQ chain the same >>> if valid <linux_virq> passed as input parameter: >>> linux_virq = ti_sci_inta_register_event(dev, <ringacc tisci_dev_id>, >>> <ringacc id>, linux_virq, IRQF_TRIGGER_HIGH, false); >>> +---------------------+ >>> | IA | >>> +--------+ | +------+ | +--------+ +------+ >>> | ring 1 +----->evtA+--^-->VintX +----------> IR +---------> GIC +--> >>> +--------+ | | +------+ | +--------+ +------+ Linux IRQ Y >>> | | | >>> +--------+ | | | >>> | ring 2 +----->evtB+--+ | >>> +--------+ | | >>> +---------------------+ >> >> This is basically equivalent requesting a bunch of MSIs for a single >> device, and obtaining a set of corresponding interrupts. The fact that >> you end-up muxing them in the IA block is an implementation detail. >> >>> >>> As per above, irq-ti-sci-inta and tisci fw creates shared IRQ on HW layer by attaching >>> events to already established IA->IR->GIC IRQ chain. Any Rings events will trigger >>> Linux IRQ Y line and keep it active until Rings are not empty. >>> >>> Now why this was done this way? >>> Note. I'm not saying this is right, but it is the way we've done it as of now. And I hope MSI >>> will help to move forward, but I'm not very familiar with it. >>> >>> The consumer of this approach is K3 Networking driver, first of all, and >>> this approach allows to eliminate runtime overhead in Networking hot path and >>> provides possibility to implement driver's specific queues/rings handling policies >>> - like round-robin vs priority. >>> >>> CPSW networking driver doesn't need to know exact ring generated IRQ - it >> >> Well, to fit the Linux model, you'll have to know. Events needs to be >> signalled as individual IRQs. > > " > NAK. Either this fits in the standard model, or we adapt the standard > model to catter for your particular use case. But we don't define a new, > TI specific API. > " And I stand by what I've written. >>> need to know if there is packet for processing, so current IRQ handling sequence we have (simplified): >>> - any ring evt -> IA -> IR -> GIC -> Linux IRQ Y >>> handle_fasteoi_irq() -> cpsw_irq_handler -> disable_irq() -> napi_schedule() >> >> Here, disable_irq() will only affect a single "event". > > No. It will disable "Linux IRQ Y". On IA level there is no mask/unmask/ack functions for ring's events. > sum of rings events keeps "Linux IRQ Y" line physically active until all rings are serviced - empty. > once ring empty - corresponding event auto cleared. You're missing the point I'm trying to make: either you can and we fit it into the Linux model of an interrupt controller, or this thing is not an interrupt controller at all. Either event can be individually masked, and this can be modelled as an interrupt controller, and they cannot. So if the IA cannot be represented as an interrupt controller and is so specific to a particular device, move it out of the interrupt subsystem and keep it private to your networking device. Thanks, M. -- Jazz is not dead. It just smells funny...
WARNING: multiple messages have this Message-ID (diff)
From: marc.zyngier@arm.com (Marc Zyngier) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 09/10] irqchip: ti-sci-inta: Add support for Interrupt Aggregator driver Date: Thu, 1 Nov 2018 14:52:12 +0000 [thread overview] Message-ID: <8bd930f3-a5c9-0490-d676-fb1e0f2f3ad8@arm.com> (raw) In-Reply-To: <ae3c35e0-6d92-10e3-c268-eb4338fbb233@ti.com> On 31/10/18 20:33, Grygorii Strashko wrote: > > > On 10/31/18 1:21 PM, Marc Zyngier wrote: >> Hi Grygorii, >> >> On 31/10/18 16:39, Grygorii Strashko wrote: >> >> [...] >> >>> I'd try to provide some additional information here. >>> (Sry, I'll still use term "events") >>> >>> As Lokesh explained in other mail on K3 SoC everything is generic and most >>> of resources allocated dynamicaly: >>> - generic DMA channels >>> - generic HW rings (used by DMA channel) >>> - generic events (assigned to the rings) and muxed to different cores/hosts >>> >>> So, when some driver would like to perform DMA transaction It's >>> required to build (configure) DMA channel by allocating different type of >>> resources and link them together to get finally working Data Movement path >>> (situation complicated by ti-sci firmware which policies resources between cores/hosts): >>> - get UDMA channel from available range >>> - get HW rings and attach them to the UDMA channel >>> - get event, assign it to the ring and mux it to the core/host through IA->IR-> chain >>> (and this step is done by ti_sci_inta_register_event() - no DT as everything is dynamic). >>> >>> Next, how this is working now - ti_sci_inta_register_event(): >>> - first call does similar things as regular DT irq mapping (end up calling irq_create_fwspec_mapping() >>> and builds IRQ chain as below: >>> linux_virq = ti_sci_inta_register_event(dev, <ringacc tisci_dev_id>, >>> <ringacc id>, 0, IRQF_TRIGGER_HIGH, false); >>> >>> +---------------------+ >>> | IA | >>> +--------+ | +------+ | +--------+ +------+ >>> | ring 1 +----->evtA+----->VintX +----------> IR +---------> GIC +--> >>> +--------+ | +------+ | +--------+ +------+ Linux IRQ Y >>> evtA | | >>> | | >>> +---------------------+ >>> >>> - second call updates only IA input part while keeping other parts of IRQ chain the same >>> if valid <linux_virq> passed as input parameter: >>> linux_virq = ti_sci_inta_register_event(dev, <ringacc tisci_dev_id>, >>> <ringacc id>, linux_virq, IRQF_TRIGGER_HIGH, false); >>> +---------------------+ >>> | IA | >>> +--------+ | +------+ | +--------+ +------+ >>> | ring 1 +----->evtA+--^-->VintX +----------> IR +---------> GIC +--> >>> +--------+ | | +------+ | +--------+ +------+ Linux IRQ Y >>> | | | >>> +--------+ | | | >>> | ring 2 +----->evtB+--+ | >>> +--------+ | | >>> +---------------------+ >> >> This is basically equivalent requesting a bunch of MSIs for a single >> device, and obtaining a set of corresponding interrupts. The fact that >> you end-up muxing them in the IA block is an implementation detail. >> >>> >>> As per above, irq-ti-sci-inta and tisci fw creates shared IRQ on HW layer by attaching >>> events to already established IA->IR->GIC IRQ chain. Any Rings events will trigger >>> Linux IRQ Y line and keep it active until Rings are not empty. >>> >>> Now why this was done this way? >>> Note. I'm not saying this is right, but it is the way we've done it as of now. And I hope MSI >>> will help to move forward, but I'm not very familiar with it. >>> >>> The consumer of this approach is K3 Networking driver, first of all, and >>> this approach allows to eliminate runtime overhead in Networking hot path and >>> provides possibility to implement driver's specific queues/rings handling policies >>> - like round-robin vs priority. >>> >>> CPSW networking driver doesn't need to know exact ring generated IRQ - it >> >> Well, to fit the Linux model, you'll have to know. Events needs to be >> signalled as individual IRQs. > > " > NAK. Either this fits in the standard model, or we adapt the standard > model to catter for your particular use case. But we don't define a new, > TI specific API. > " And I stand by what I've written. >>> need to know if there is packet for processing, so current IRQ handling sequence we have (simplified): >>> - any ring evt -> IA -> IR -> GIC -> Linux IRQ Y >>> handle_fasteoi_irq() -> cpsw_irq_handler -> disable_irq() -> napi_schedule() >> >> Here, disable_irq() will only affect a single "event". > > No. It will disable "Linux IRQ Y". On IA level there is no mask/unmask/ack functions for ring's events. > sum of rings events keeps "Linux IRQ Y" line physically active until all rings are serviced - empty. > once ring empty - corresponding event auto cleared. You're missing the point I'm trying to make: either you can and we fit it into the Linux model of an interrupt controller, or this thing is not an interrupt controller at all. Either event can be individually masked, and this can be modelled as an interrupt controller, and they cannot. So if the IA cannot be represented as an interrupt controller and is so specific to a particular device, move it out of the interrupt subsystem and keep it private to your networking device. Thanks, M. -- Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2018-11-01 14:52 UTC|newest] Thread overview: 127+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-18 15:40 [PATCH v2 00/10] Add support for TISCI irqchip drivers Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 01/10] firmware: ti_sci: Add support to get TISCI handle using of_phandle Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 02/10] firmware: ti_sci: Add support for RM core ops Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 03/10] firmware: ti_sci: Add support for IRQ management Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 04/10] firmware: ti_sci: Add RM mapping table for am654 Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 20:42 ` Rob Herring 2018-10-18 20:42 ` Rob Herring 2018-10-18 20:42 ` Rob Herring 2018-10-18 15:40 ` [PATCH v2 05/10] firmware: ti_sci: Add helper apis to manage resources Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 06/10] dt-bindings: irqchip: Introduce TISCI Interrupt router bindings Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-25 18:45 ` Rob Herring 2018-10-25 18:45 ` Rob Herring 2018-10-26 6:38 ` Lokesh Vutla 2018-10-26 6:38 ` Lokesh Vutla 2018-10-26 6:38 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 07/10] irqchip: ti-sci-intr: Add support for Interrupt Router driver Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 08/10] dt-bindings: irqchip: Introduce TISCI Interrupt Aggregator bindings Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` [PATCH v2 09/10] irqchip: ti-sci-inta: Add support for Interrupt Aggregator driver Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-19 15:22 ` Marc Zyngier 2018-10-19 15:22 ` Marc Zyngier 2018-10-22 14:35 ` Lokesh Vutla 2018-10-22 14:35 ` Lokesh Vutla 2018-10-22 14:35 ` Lokesh Vutla 2018-10-23 13:50 ` Marc Zyngier 2018-10-23 13:50 ` Marc Zyngier 2018-10-23 13:50 ` Marc Zyngier 2018-10-26 6:39 ` Lokesh Vutla 2018-10-26 6:39 ` Lokesh Vutla 2018-10-26 6:39 ` Lokesh Vutla 2018-10-26 20:19 ` Lokesh Vutla 2018-10-26 20:19 ` Lokesh Vutla 2018-10-26 20:19 ` Lokesh Vutla 2018-10-28 13:31 ` Marc Zyngier 2018-10-28 13:31 ` Marc Zyngier 2018-10-28 13:31 ` Marc Zyngier 2018-10-29 13:04 ` Lokesh Vutla 2018-10-29 13:04 ` Lokesh Vutla 2018-10-29 13:04 ` Lokesh Vutla 2018-11-01 7:55 ` Peter Ujfalusi 2018-11-01 7:55 ` Peter Ujfalusi 2018-11-01 7:55 ` Peter Ujfalusi 2018-11-01 9:00 ` Marc Zyngier 2018-11-01 9:00 ` Marc Zyngier 2018-11-01 9:00 ` Marc Zyngier 2018-11-01 9:14 ` Peter Ujfalusi 2018-11-01 9:14 ` Peter Ujfalusi 2018-11-01 9:14 ` Peter Ujfalusi 2018-11-01 11:15 ` Marc Zyngier 2018-11-01 11:15 ` Marc Zyngier 2018-11-05 8:08 ` Lokesh Vutla 2018-11-05 8:08 ` Lokesh Vutla 2018-11-05 8:08 ` Lokesh Vutla 2018-11-05 15:36 ` Marc Zyngier 2018-11-05 15:36 ` Marc Zyngier 2018-11-05 16:20 ` Lokesh Vutla 2018-11-05 16:20 ` Lokesh Vutla 2018-11-05 16:20 ` Lokesh Vutla 2018-11-05 16:44 ` Marc Zyngier 2018-11-05 16:44 ` Marc Zyngier 2018-11-05 17:56 ` Lokesh Vutla 2018-11-05 17:56 ` Lokesh Vutla 2018-11-05 17:56 ` Lokesh Vutla 2018-10-31 16:39 ` Grygorii Strashko 2018-10-31 16:39 ` Grygorii Strashko 2018-10-31 16:39 ` Grygorii Strashko 2018-10-31 18:21 ` Marc Zyngier 2018-10-31 18:21 ` Marc Zyngier 2018-10-31 18:38 ` Santosh Shilimkar 2018-10-31 18:38 ` Santosh Shilimkar 2018-10-31 18:42 ` Marc Zyngier 2018-10-31 18:42 ` Marc Zyngier 2018-10-31 18:48 ` Santosh Shilimkar 2018-10-31 18:48 ` Santosh Shilimkar 2018-10-31 18:48 ` Santosh Shilimkar 2018-10-31 20:33 ` Grygorii Strashko 2018-10-31 20:33 ` Grygorii Strashko 2018-10-31 20:33 ` Grygorii Strashko 2018-11-01 14:52 ` Marc Zyngier [this message] 2018-11-01 14:52 ` Marc Zyngier 2018-11-01 15:36 ` Grygorii Strashko 2018-11-01 15:36 ` Grygorii Strashko 2018-11-01 15:36 ` Grygorii Strashko 2018-11-01 9:09 ` Peter Ujfalusi 2018-11-01 9:09 ` Peter Ujfalusi 2018-11-01 9:09 ` Peter Ujfalusi 2018-10-22 10:42 ` Peter Ujfalusi 2018-10-22 10:42 ` Peter Ujfalusi 2018-10-22 10:42 ` Peter Ujfalusi 2018-10-22 10:43 ` Peter Ujfalusi 2018-10-22 10:43 ` Peter Ujfalusi 2018-10-22 10:43 ` Peter Ujfalusi 2018-10-18 15:40 ` [PATCH v2 10/10] soc: ti: am6: Enable interrupt controller drivers Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-18 15:40 ` Lokesh Vutla 2018-10-22 20:39 ` [PATCH v2 00/10] Add support for TISCI irqchip drivers Santosh Shilimkar 2018-10-22 20:39 ` Santosh Shilimkar 2018-10-23 8:17 ` Lokesh Vutla 2018-10-23 8:17 ` Lokesh Vutla 2018-10-23 8:17 ` Lokesh Vutla 2018-10-23 8:27 ` Marc Zyngier 2018-10-23 8:27 ` Marc Zyngier 2018-10-23 8:27 ` Marc Zyngier 2018-10-23 17:34 ` Santosh Shilimkar 2018-10-23 17:34 ` Santosh Shilimkar 2018-10-26 6:39 ` Lokesh Vutla 2018-10-26 6:39 ` Lokesh Vutla 2018-10-26 6:39 ` Lokesh Vutla
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8bd930f3-a5c9-0490-d676-fb1e0f2f3ad8@arm.com \ --to=marc.zyngier@arm.com \ --cc=devicetree@vger.kernel.org \ --cc=grygorii.strashko@ti.com \ --cc=jason@lakedaemon.net \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lokeshvutla@ti.com \ --cc=nm@ti.com \ --cc=nsekhar@ti.com \ --cc=peter.ujfalusi@ti.com \ --cc=robh+dt@kernel.org \ --cc=ssantosh@kernel.org \ --cc=t-kristo@ti.com \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.