From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Simon Trimmer" <simont@opensource.cirrus.com>,
"Charles Keepax" <ckeepax@opensource.cirrus.com>,
"Mark Brown" <broonie@kernel.org>
Cc: <patches@opensource.cirrus.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] firmware: cs_dsp: Remove usage of GFP_DMA
Date: Thu, 13 Feb 2025 14:28:06 +0000 [thread overview]
Message-ID: <e93d1b72-43da-4e96-9523-e1bbf3853031@opensource.cirrus.com> (raw)
In-Reply-To: <0e9c1cca-592f-4983-93f4-ab2f76a3c97e@opensource.cirrus.com>
On 11/02/2025 5:21 pm, Richard Fitzgerald wrote:
> On 11/02/2025 5:03 pm, Thomas Weißschuh wrote:
>> Also drop the bounce buffer in cs_dsp_coeff_write_ctrl_raw().
>>
>> The bounce buffer in cs_dsp_coeff_write_ctrl_raw() could theoretically
>> also be removed. That would be a functional change as the output may be
>> modified in error cases.
>> As I don't know the driver very well I left that part out.
>>
>> Not tested on real hardware.
>> This came up while porting kunit to mips64.
>> Apparently GFP_DMA does not work there, but IMO the usage of GFP_DMA by
I would say that is a bug in mips64 that should be fixed in mips64.
It is not reasonable to expect generic drivers to have special cases for
platforms that don't handle GFP_DMA.
>> cs_dsp is unnecessary in the first place.
>>
>
> You're sure that all I2C and SPI bus controllers now handle non-DMA-safe
> buffers correctly?
>
I just tested this.
The spi kernel doc says this:
* struct spi_transfer - a read/write buffer pair
* @tx_buf: data to be written (DMA-safe memory), or NULL
* @rx_buf: data to be read (DMA-safe memory), or NULL
On x86_64() a spi_write() fails with -EINVAL if I pass it a non-dma-safe
buffer of data. But it works if I pass it a buffer allocated with
GFP_DMA.
So I think it is a bad idea to remove GFP_DMA to workaround mips64.
>> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>> ---
>> Thomas Weißschuh (2):
>> firmware: cs_dsp: Remove usage of GFP_DMA
>> firmware: cs_dsp: Remove bounce buffer in
>> cs_dsp_coeff_write_ctrl_raw()
>>
>> drivers/firmware/cirrus/cs_dsp.c | 15 +++------------
>> 1 file changed, 3 insertions(+), 12 deletions(-)
>> ---
>> base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
>> change-id: 20250211-cs_dsp-gfp_dma-0581bdd09dd5
>>
>> Best regards,
>
next prev parent reply other threads:[~2025-02-13 14:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 17:03 [PATCH 0/2] firmware: cs_dsp: Remove usage of GFP_DMA Thomas Weißschuh
2025-02-11 17:03 ` [PATCH 1/2] " Thomas Weißschuh
2025-02-11 17:03 ` [PATCH 2/2] firmware: cs_dsp: Remove bounce buffer in cs_dsp_coeff_write_ctrl_raw() Thomas Weißschuh
2025-02-11 17:21 ` [PATCH 0/2] firmware: cs_dsp: Remove usage of GFP_DMA Richard Fitzgerald
2025-02-12 13:12 ` Thomas Weißschuh
2025-02-13 14:28 ` Richard Fitzgerald [this message]
2025-02-13 15:06 ` Mark Brown
2025-02-13 15:16 ` Thomas Weißschuh
2025-02-19 16:26 ` Richard Fitzgerald
2025-02-20 9:52 ` Charles Keepax
2025-02-20 10:29 ` Richard Fitzgerald
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=e93d1b72-43da-4e96-9523-e1bbf3853031@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=simont@opensource.cirrus.com \
--cc=thomas.weissschuh@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: 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