lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 11/16] can: m_can: Cache tx putidx
On Thu, Mar 16, 2023 at 10:55:00AM +0100, Simon Horman wrote:
> On Wed, Mar 15, 2023 at 12:05:41PM +0100, Markus Schneider-Pargmann wrote:
> > m_can_tx_handler is the only place where data is written to the tx fifo.
> > We can calculate the putidx in the driver code here to avoid the
> > dependency on the txfqs register.
> >
> > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>

Nit in my previous email (which I hit send on a little too soon)
not withstanding,

Signed-off-by: Simon Horman <simon.horman@corigine.com>

FWIIW, I am taking a pause in my review now.

...

> > diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h
> > index d0c21eddb6ec..548ae908ac4e 100644
> > --- a/drivers/net/can/m_can/m_can.h
> > +++ b/drivers/net/can/m_can/m_can.h
> > @@ -102,6 +102,9 @@ struct m_can_classdev {
> > u32 tx_max_coalesced_frames_irq;
> > u32 tx_coalesce_usecs_irq;
> >
> > + // Store this internally to avoid fetch delays on peripheral chips
> > + int tx_fifo_putidx;
>
> nit: it might be slightly nicer to do a pass over the code
> and make putidx unsigned - assuming it is an unsigned value.
>
> > +
> > struct mram_cfg mcfg[MRAM_CFG_NUM];
> > };
> >
> > --
> > 2.39.2
> >

\
 
 \ /
  Last update: 2023-03-27 01:03    [W:0.076 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site