All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>,
	ohad@wizery.com, bjorn.andersson@linaro.org, s-anna@ti.com,
	linux-remoteproc@vger.kernel.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	praneeth@ti.com, rogerq@ti.com
Subject: Re: [PATCH v3 3/6] remoteproc: pru: Add support for PRU specific interrupt configuration
Date: Tue, 8 Dec 2020 11:04:30 +0000	[thread overview]
Message-ID: <20201208110430.GS4801@dell> (raw)
In-Reply-To: <20201207173731.GA1509079@xps15>

On Mon, 07 Dec 2020, Mathieu Poirier wrote:

> On Fri, Dec 04, 2020 at 09:18:04PM +0100, Grzegorz Jaszczyk wrote:
> > The firmware blob can contain optional ELF sections: .resource_table
> > section and .pru_irq_map one. The second one contains the PRUSS
> > interrupt mapping description, which needs to be setup before powering
> > on the PRU core. To avoid RAM wastage this ELF section is not mapped to
> > any ELF segment (by the firmware linker) and therefore is not loaded to
> > PRU memory.
> > 
> > The PRU interrupt configuration is handled within the PRUSS INTC irqchip
> > driver and leverages the system events to interrupt channels and host
> > interrupts mapping configuration. Relevant irq routing information is
> > passed through a special .pru_irq_map ELF section (for interrupts routed
> > to and used by PRU cores) or via the PRU application's device tree node
> > (for interrupts routed to and used by the main CPU). The mappings are
> > currently programmed during the booting/shutdown of the PRU.
> > 
> > The interrupt configuration passed through .pru_irq_map ELF section is
> > optional. It varies on specific firmware functionality and therefore
> > have to be unwinded during PRU stop and performed again during
> > PRU start.
> > 
> > Co-developed-by: Suman Anna <s-anna@ti.com>
> > Signed-off-by: Suman Anna <s-anna@ti.com>
> > Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
> > ---

[...]

> >  drivers/remoteproc/pru_rproc.c | 180 +++++++++++++++++++++++++++++++++
> >  drivers/remoteproc/pru_rproc.h |  46 +++++++++
> >  2 files changed, 226 insertions(+)
> >  create mode 100644 drivers/remoteproc/pru_rproc.h
> > 
> > diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
> > index d33392bbd8af..4ef59d15d888 100644
> > --- a/drivers/remoteproc/pru_rproc.c
> > +++ b/drivers/remoteproc/pru_rproc.c
> > @@ -11,13 +11,16 @@
> >   */

[...]

> > +static int pru_handle_intrmap(struct rproc *rproc)
> > +{
> > +	struct device *dev = rproc->dev.parent;
> > +	struct pru_rproc *pru = rproc->priv;
> > +	struct pru_irq_rsc *rsc = pru->pru_interrupt_map;
> > +	struct irq_fwspec fwspec;
> > +	struct device_node *irq_parent;
> > +	int i, ret = 0;
> > +
> > +	/* not having pru_interrupt_map is not an error */
> > +	if (!rsc)
> > +		return 0;
> > +
> > +	/* currently supporting only type 0 */
> > +	if (rsc->type != 0) {
> > +		dev_err(dev, "unsupported rsc type: %d\n", rsc->type);
> > +		return -EINVAL;
> > +	}
> > +
> > +	if (rsc->num_evts > MAX_PRU_SYS_EVENTS)
> > +		return -EINVAL;
> > +
> > +	if (sizeof(*rsc) + rsc->num_evts * sizeof(struct pruss_int_map) !=
> > +	    pru->pru_interrupt_map_sz)
> > +		return -EINVAL;
> > +
> > +	pru->evt_count = rsc->num_evts;
> > +	pru->mapped_irq = kcalloc(pru->evt_count, sizeof(int), GFP_KERNEL);
> 
> sizeof(unsigned int)

Would you mind trimming your replies please?

Brain grepping through 200+ lines of quote for a one line review
comment is a little frustrating.

TIA.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: ohad@wizery.com, devicetree@vger.kernel.org,
	Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>,
	linux-omap@vger.kernel.org, praneeth@ti.com,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	bjorn.andersson@linaro.org, robh+dt@kernel.org,
	linux-arm-kernel@lists.infradead.org, rogerq@ti.com
Subject: Re: [PATCH v3 3/6] remoteproc: pru: Add support for PRU specific interrupt configuration
Date: Tue, 8 Dec 2020 11:04:30 +0000	[thread overview]
Message-ID: <20201208110430.GS4801@dell> (raw)
In-Reply-To: <20201207173731.GA1509079@xps15>

On Mon, 07 Dec 2020, Mathieu Poirier wrote:

> On Fri, Dec 04, 2020 at 09:18:04PM +0100, Grzegorz Jaszczyk wrote:
> > The firmware blob can contain optional ELF sections: .resource_table
> > section and .pru_irq_map one. The second one contains the PRUSS
> > interrupt mapping description, which needs to be setup before powering
> > on the PRU core. To avoid RAM wastage this ELF section is not mapped to
> > any ELF segment (by the firmware linker) and therefore is not loaded to
> > PRU memory.
> > 
> > The PRU interrupt configuration is handled within the PRUSS INTC irqchip
> > driver and leverages the system events to interrupt channels and host
> > interrupts mapping configuration. Relevant irq routing information is
> > passed through a special .pru_irq_map ELF section (for interrupts routed
> > to and used by PRU cores) or via the PRU application's device tree node
> > (for interrupts routed to and used by the main CPU). The mappings are
> > currently programmed during the booting/shutdown of the PRU.
> > 
> > The interrupt configuration passed through .pru_irq_map ELF section is
> > optional. It varies on specific firmware functionality and therefore
> > have to be unwinded during PRU stop and performed again during
> > PRU start.
> > 
> > Co-developed-by: Suman Anna <s-anna@ti.com>
> > Signed-off-by: Suman Anna <s-anna@ti.com>
> > Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
> > ---

[...]

> >  drivers/remoteproc/pru_rproc.c | 180 +++++++++++++++++++++++++++++++++
> >  drivers/remoteproc/pru_rproc.h |  46 +++++++++
> >  2 files changed, 226 insertions(+)
> >  create mode 100644 drivers/remoteproc/pru_rproc.h
> > 
> > diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
> > index d33392bbd8af..4ef59d15d888 100644
> > --- a/drivers/remoteproc/pru_rproc.c
> > +++ b/drivers/remoteproc/pru_rproc.c
> > @@ -11,13 +11,16 @@
> >   */

[...]

> > +static int pru_handle_intrmap(struct rproc *rproc)
> > +{
> > +	struct device *dev = rproc->dev.parent;
> > +	struct pru_rproc *pru = rproc->priv;
> > +	struct pru_irq_rsc *rsc = pru->pru_interrupt_map;
> > +	struct irq_fwspec fwspec;
> > +	struct device_node *irq_parent;
> > +	int i, ret = 0;
> > +
> > +	/* not having pru_interrupt_map is not an error */
> > +	if (!rsc)
> > +		return 0;
> > +
> > +	/* currently supporting only type 0 */
> > +	if (rsc->type != 0) {
> > +		dev_err(dev, "unsupported rsc type: %d\n", rsc->type);
> > +		return -EINVAL;
> > +	}
> > +
> > +	if (rsc->num_evts > MAX_PRU_SYS_EVENTS)
> > +		return -EINVAL;
> > +
> > +	if (sizeof(*rsc) + rsc->num_evts * sizeof(struct pruss_int_map) !=
> > +	    pru->pru_interrupt_map_sz)
> > +		return -EINVAL;
> > +
> > +	pru->evt_count = rsc->num_evts;
> > +	pru->mapped_irq = kcalloc(pru->evt_count, sizeof(int), GFP_KERNEL);
> 
> sizeof(unsigned int)

Would you mind trimming your replies please?

Brain grepping through 200+ lines of quote for a one line review
comment is a little frustrating.

TIA.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-12-08 11:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 20:18 [PATCH v3 0/6] Add a PRU remoteproc driver Grzegorz Jaszczyk
2020-12-04 20:18 ` Grzegorz Jaszczyk
2020-12-04 20:18 ` [PATCH v3 1/6] dt-bindings: remoteproc: Add binding doc for PRU cores in the PRU-ICSS Grzegorz Jaszczyk
2020-12-04 20:18   ` Grzegorz Jaszczyk
2020-12-04 20:18 ` [PATCH v3 2/6] remoteproc: pru: Add a PRU remoteproc driver Grzegorz Jaszczyk
2020-12-04 20:18   ` Grzegorz Jaszczyk
2020-12-04 20:18 ` [PATCH v3 3/6] remoteproc: pru: Add support for PRU specific interrupt configuration Grzegorz Jaszczyk
2020-12-04 20:18   ` Grzegorz Jaszczyk
2020-12-07 17:37   ` Mathieu Poirier
2020-12-07 17:37     ` Mathieu Poirier
2020-12-08 11:04     ` Lee Jones [this message]
2020-12-08 11:04       ` Lee Jones
2020-12-08 14:03     ` Grzegorz Jaszczyk
2020-12-08 14:03       ` Grzegorz Jaszczyk
2020-12-04 20:18 ` [PATCH v3 4/6] remoteproc: pru: Add pru-specific debugfs support Grzegorz Jaszczyk
2020-12-04 20:18   ` Grzegorz Jaszczyk
2020-12-04 20:18 ` [PATCH v3 5/6] remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs Grzegorz Jaszczyk
2020-12-04 20:18   ` Grzegorz Jaszczyk
2020-12-04 20:18 ` [PATCH v3 6/6] remoteproc: pru: Add support for various PRU cores on K3 J721E SoCs Grzegorz Jaszczyk
2020-12-04 20:18   ` Grzegorz Jaszczyk

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=20201208110430.GS4801@dell \
    --to=lee.jones@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grzegorz.jaszczyk@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=ohad@wizery.com \
    --cc=praneeth@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@ti.com \
    --cc=s-anna@ti.com \
    /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: link
Be 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.