All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Dirk Behme" <dirk.behme@gmail.com>,
	"Beata Michalska" <beata.michalska@arm.com>, <dakr@kernel.org>,
	<ojeda@kernel.org>, <rust-for-linux@vger.kernel.org>
Cc: <abdiel.janulgue@gmail.com>, <daniel.almeida@collabora.com>,
	<aliceryhl@google.com>, <robin.murphy@arm.com>,
	<a.hindborg@kernel.org>, <boqun.feng@gmail.com>,
	<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
	<lossin@kernel.org>, <tmgross@umich.edu>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] rust: dma: allow drivers to tune max segment size
Date: Fri, 23 Jan 2026 16:48:37 +0000	[thread overview]
Message-ID: <DFW4F5OSDO7A.TBUOX6RCN8G7@garyguo.net> (raw)
In-Reply-To: <70412586-7b40-4230-bc21-504a865e3376@gmail.com>

On Fri Jan 23, 2026 at 4:39 PM GMT, Dirk Behme wrote:
> On 23.01.26 14:13, Beata Michalska wrote:
>> Make dma_set_max_seg_size() available to Rust so drivers can perform
>> standard DMA setup steps.
>> 
>> Signed-off-by: Beata Michalska <beata.michalska@arm.com>
>> ---
>> 
>> v2:
>> - Aligned safety requirements
>> 
>>  rust/helpers/dma.c |  5 +++++
>>  rust/kernel/dma.rs | 17 +++++++++++++++++
>>  2 files changed, 22 insertions(+)
>> 
>> diff --git a/rust/helpers/dma.c b/rust/helpers/dma.c
>> index 2afa32c21c94..220b9308830f 100644
>> --- a/rust/helpers/dma.c
>> +++ b/rust/helpers/dma.c
>> @@ -40,3 +40,8 @@ size_t rust_helper_dma_max_mapping_size(struct device *dev)
>>  {
>>  	return dma_max_mapping_size(dev);
>>  }
>> +
>> +void rust_helper_dma_set_max_seg_size(struct device *dev, unsigned int size)
>> +{
>> +	dma_set_max_seg_size(dev, size);
>> +}
>
> I was about to ask "please add __rust_helper" [1]. But looking into
> driver-core-next it looks like some of the function in dma.c have
> __rust_helper (from [1]) and some don't (from [2]). Is this by
> intention or was this an omission in [2]?

This is an omission. It's an also a relatively new addition which means that
it's not covered in Alice's series.

Best,
Gary

      reply	other threads:[~2026-01-23 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 13:13 [PATCH v2] rust: dma: allow drivers to tune max segment size Beata Michalska
2026-01-23 16:39 ` Dirk Behme
2026-01-23 16:48   ` Gary Guo [this message]

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=DFW4F5OSDO7A.TBUOX6RCN8G7@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=abdiel.janulgue@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=beata.michalska@arm.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dirk.behme@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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.