[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vd3Jj_giyWKhA2OyPrY5xKhyQ6We3qkz9-yDs15F+SFRg@mail.gmail.com>
Date: Wed, 27 Sep 2023 15:59:00 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Brad Larson <blarson@....com>
Cc: adrian.hunter@...el.com, alcooperx@...il.com, arnd@...db.de,
brendan.higgins@...ux.dev, briannorris@...omium.org,
broonie@...nel.org, catalin.marinas@....com, conor+dt@...nel.org,
davidgow@...gle.com, devicetree@...r.kernel.org,
fancer.lancer@...il.com, gerg@...ux-m68k.org, gsomlo@...il.com,
hal.feng@...rfivetech.com, hasegawa-hitomi@...itsu.com,
j.neuschaefer@....net, joel@....id.au, kernel@...il.dk,
krzk@...nel.org, krzysztof.kozlowski+dt@...aro.org,
lee.jones@...aro.org, lee@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-spi@...r.kernel.org,
p.zabel@...gutronix.de, rdunlap@...radead.org, robh+dt@...nel.org,
samuel@...lland.org, skhan@...uxfoundation.org,
suravee.suthikulpanit@....com, thomas.lendacky@....com,
tonyhuang.sunplus@...il.com, ulf.hansson@...aro.org,
vaishnav.a@...com, walker.chen@...rfivetech.com, will@...nel.org,
zhuyinbo@...ngson.cn
Subject: Re: [PATCH v16 6/6] soc: amd: Add support for AMD Pensando SoC Controller
On Tue, Sep 26, 2023 at 11:05 PM Brad Larson <blarson@....com> wrote:
> On Thu, Sep 21, 2023 at 18:19:57 +0300 Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> > On Thu, Sep 14, 2023 at 12:52 AM Brad Larson <blarson@....com> wrote:
...
> >> + u8 tx_buf[PENCTRL_MAX_MSG_LEN];
> >> + u8 rx_buf[PENCTRL_MAX_MSG_LEN];
> >
> > These are not DMA-safe, is this a problem?
>
> It's not a problem, the peripheral is PIO FIFO driven only.
The question was about the SPI controller itself.
Also, depending on the driver it may or may not require DMA-safe
pointers. I believe with the new pump queue used in the SPI core all
drivers that are using it are DMA-safe and the caller needs no
additional care.
...
> >> + msg = memdup_user((struct penctrl_spi_xfer *)arg, size);
> >> + if (IS_ERR(msg)) {
> >> + ret = PTR_ERR(msg);
> >> + goto out_unlock;
> >> + }
> >
> > Wondering if you can start using cleanup.h.
>
> Perhaps if recommended, I don't see DEFINE_(FREE,UNLOCK,...) being used.
It's guard()() and scoped_guard() for locks and __free() for the allocations.
Plenty of uses in a few modules already (talking about Linux Next snapshot).
...
> >> + spi->chip_select = current_cs;
> >
> > spi_set_chipselect()
>
> Yes, I'll change to inline function spi_set_chipselect(spi, 0, current_cs). The
> second arg must be legacy as its unused.
Actually, it's a placeholder for the future support of indexed CS'.
...
> >> + u8 txbuf[3];
> >> + u8 rxbuf[1];
> >
> > Not DMA-safe. Is it a problem?
>
> Not a problem, the peripheral is PIO only using FIFOs.
Same as somewhere above.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists