linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Vladimir Oltean <olteanv@gmail.com>,
	Mark Brown <broonie@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Larisa Grigore <larisa.grigore@nxp.com>,
	Frank Li <Frank.li@nxp.com>, Christoph Hellwig <hch@lst.de>,
	linux-spi@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/7] spi: spi-fsl-dspi: Stub out DMA functions
Date: Mon, 1 Sep 2025 10:09:10 +0100	[thread overview]
Message-ID: <ce55ed06-7326-473b-a2f9-40b0bc61c396@linaro.org> (raw)
In-Reply-To: <20250829142636.7nv3ylyck5yda3fd@skbuf>



On 29/08/2025 3:26 pm, Vladimir Oltean wrote:
> Hi James,
> 
> On Fri, Aug 29, 2025 at 12:46:45PM +0100, James Clark wrote:
>> This will allow the build to succeed with !CONFIG_DMA_ENGINE, either due
>> to a randconfig build test or when the target only uses one of the
>> non-DMA transfer modes which this driver supports.
>>
>> Signed-off-by: James Clark <james.clark@linaro.org>
>> ---
> 
> Sorry for not paying attention to this previously. I didn't pick up from
> previous conversations what problem this is addressing. I built an arm64
> kernel with CONFIG_DMA_ENGINE disabled (by unsetting CONFIG_DMADEVICES)
> and it got built successfully. The .config is attached.

Did you test with or without these patches applied? It's only needed to 
make the commit "spi: spi-fsl-dspi: Use non-coherent memory for DMA" 
build because that's a newer function that isn't stubbed out like the 
old ones.

I originally tried to fix it in the DMA code so it got spun out into a 
new thread, which is probably why you missed it. And the commit message 
is missing the reported-by and closes tags which I'll add.

> 
> Please post the specific build error if you haven't done so already, and
> give a reasonable hint at the technical motivation in the commit message.

The reason we saw the issue was a randconfig build. But it's possible 
that someone is building the driver without DMA as well, hence: "or when 
the target only uses one of the non-DMA transfer modes which this driver 
supports".

The new commit message can be:

   spi: spi-fsl-dspi: Stub out DMA functions

   In a later commit we'll use dma_alloc_noncoherent() which isn't
   stubbed out for builds without CONFIG_DMA_ENGINE and results in the
   following build error:

     spi-fsl-dspi.c:(.text+0x644): undefined reference to
        `dma_free_pages'
     m68k-linux-ld: spi-fsl-dspi.c:(.text+0x67a): undefined reference to
        `dma_free_pages'

   To continue to support devices that only need XSPI mode and so that
   randconfig builds work, stub out DMA functionality in the DSPI driver.

   Reported-by: kernel test robot <lkp@intel.com>
   Closes: 
https://lore.kernel.org/oe-kbuild-all/202506160036.t9VDxF6p-lkp@intel.com/
   Signed-off-by: James Clark <james.clark@linaro.org>




  reply	other threads:[~2025-09-01  9:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 11:46 [PATCH v5 0/7] spi: spi-fsl-dspi: Target mode improvements James Clark
2025-08-29 11:46 ` [PATCH v5 1/7] spi: fsl-dspi: Avoid using -EINPROGRESS error code James Clark
2025-08-29 12:54   ` Vladimir Oltean
2025-09-01  9:10     ` James Clark
2025-08-29 11:46 ` [PATCH v5 2/7] spi: fsl-dspi: Store status directly in cur_msg->status James Clark
2025-08-29 11:46 ` [PATCH v5 3/7] spi: spi-fsl-dspi: Stub out DMA functions James Clark
2025-08-29 14:26   ` Vladimir Oltean
2025-09-01  9:09     ` James Clark [this message]
2025-09-01 13:03       ` Vladimir Oltean
2025-08-29 11:46 ` [PATCH v5 4/7] spi: spi-fsl-dspi: Use non-coherent memory for DMA James Clark
2025-08-29 14:29   ` Vladimir Oltean
2025-08-29 11:46 ` [PATCH v5 5/7] spi: spi-fsl-dspi: Use whole page for DMA buffers James Clark
2025-08-29 11:46 ` [PATCH v5 6/7] spi: spi-fsl-dspi: Increase target mode DMA buffer size James Clark
2025-08-29 11:46 ` [PATCH v5 7/7] spi: spi-fsl-dspi: Report FIFO overflows as errors James Clark

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=ce55ed06-7326-473b-a2f9-40b0bc61c396@linaro.org \
    --to=james.clark@linaro.org \
    --cc=Frank.li@nxp.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=hch@lst.de \
    --cc=imx@lists.linux.dev \
    --cc=larisa.grigore@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vladimir.oltean@nxp.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 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).