<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/rust/kernel/faux.rs, branch v6.15-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>rust/kernel/faux: mark Registration methods inline</title>
<updated>2025-03-11T09:42:23+00:00</updated>
<author>
<name>Ethan Carter Edwards</name>
<email>ethan@ethancedwards.com</email>
</author>
<published>2025-03-10T19:51:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=10b20f2d1bbeddcb6c1f6c01b6eb1b8d2828b663'/>
<id>10b20f2d1bbeddcb6c1f6c01b6eb1b8d2828b663</id>
<content type='text'>
When building the kernel on Arch Linux using on x86_64 with tools:
$ rustc --version
rustc 1.84.0 (9fc6b4312 2025-01-07)
$ clang --version
clang version 19.1.7
Target: x86_64-pc-linux-gnu

The following symbols are generated:
$ nm vmlinux | rg ' _R' | rustfilt | rg faux
ffffffff81959ae0 T &lt;kernel::faux::Registration&gt;::new
ffffffff81959b40 T &lt;kernel::faux::Registration as core::ops::drop::Drop&gt;::drop

However, these Rust symbols are wrappers around bindings in the C faux
code. Inlining these functions removes the middle-man wrapper function
After applying this patch, the above function signatures disappear.

Link: https://github.com/Rust-for-Linux/linux/issues/1145
Signed-off-by: Ethan Carter Edwards &lt;ethan@ethancedwards.com&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Link: https://lore.kernel.org/r/jesg4yu7m6fvzmgg5tlsktrrjm36l4qsranto5mdmnucx4pvf3@nhvt4juw5es3
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building the kernel on Arch Linux using on x86_64 with tools:
$ rustc --version
rustc 1.84.0 (9fc6b4312 2025-01-07)
$ clang --version
clang version 19.1.7
Target: x86_64-pc-linux-gnu

The following symbols are generated:
$ nm vmlinux | rg ' _R' | rustfilt | rg faux
ffffffff81959ae0 T &lt;kernel::faux::Registration&gt;::new
ffffffff81959b40 T &lt;kernel::faux::Registration as core::ops::drop::Drop&gt;::drop

However, these Rust symbols are wrappers around bindings in the C faux
code. Inlining these functions removes the middle-man wrapper function
After applying this patch, the above function signatures disappear.

Link: https://github.com/Rust-for-Linux/linux/issues/1145
Signed-off-by: Ethan Carter Edwards &lt;ethan@ethancedwards.com&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Link: https://lore.kernel.org/r/jesg4yu7m6fvzmgg5tlsktrrjm36l4qsranto5mdmnucx4pvf3@nhvt4juw5es3
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust/faux: Add missing parent argument to Registration::new()</title>
<updated>2025-02-28T02:03:17+00:00</updated>
<author>
<name>Lyude Paul</name>
<email>lyude@redhat.com</email>
</author>
<published>2025-02-27T19:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95cb0cb546c2892b7a31ff2fce6573f201a214b8'/>
<id>95cb0cb546c2892b7a31ff2fce6573f201a214b8</id>
<content type='text'>
A little late in the review of the faux device interface, we added the
ability to specify a parent device when creating new faux devices - but
this never got ported over to the rust bindings. So, let's add the missing
argument now so we don't have to convert other users later down the line.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250227193522.198344-1-lyude@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A little late in the review of the faux device interface, we added the
ability to specify a parent device when creating new faux devices - but
this never got ported over to the rust bindings. So, let's add the missing
argument now so we don't have to convert other users later down the line.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250227193522.198344-1-lyude@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust/faux: Drop #[repr(transparent)] from faux::Registration</title>
<updated>2025-02-28T02:02:24+00:00</updated>
<author>
<name>Lyude Paul</name>
<email>lyude@redhat.com</email>
</author>
<published>2025-02-25T21:29:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6853d9d13dbe596a73ae968e6fb27ba9680b2441'/>
<id>6853d9d13dbe596a73ae968e6fb27ba9680b2441</id>
<content type='text'>
I think this change got missed during review, we don't need
 #[repr(transparent)] since Registration just holds a single NonNull. This
attribute had originally been added by me when I was still figuring out how
the bindings should look like but got committed by mistake. So, just drop
it.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Reviewed-by: Fiona Behrens &lt;me@Kloenk.dev&gt;
Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Link: https://lore.kernel.org/r/20250225213112.872264-2-lyude@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think this change got missed during review, we don't need
 #[repr(transparent)] since Registration just holds a single NonNull. This
attribute had originally been added by me when I was still figuring out how
the bindings should look like but got committed by mistake. So, just drop
it.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Reviewed-by: Fiona Behrens &lt;me@Kloenk.dev&gt;
Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Link: https://lore.kernel.org/r/20250225213112.872264-2-lyude@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust/kernel: Add faux device bindings</title>
<updated>2025-02-13T15:58:58+00:00</updated>
<author>
<name>Lyude Paul</name>
<email>lyude@redhat.com</email>
</author>
<published>2025-02-10T12:30:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=78418f300d3999f1cf8a9ac71065bf2eca61f4dd'/>
<id>78418f300d3999f1cf8a9ac71065bf2eca61f4dd</id>
<content type='text'>
This introduces a module for working with faux devices in rust, along with
adding sample code to show how the API is used. Unlike other types of
devices, we don't provide any hooks for device probe/removal - since these
are optional for the faux API and are unnecessary in rust.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Maíra Canal &lt;mairacanal@riseup.net&gt;
Cc: Danilo Krummrich &lt;dakr@kernel.org&gt;
Cc: Miguel Ojeda &lt;miguel.ojeda.sandonis@gmail.com&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Link: https://lore.kernel.org/r/2025021026-exert-accent-b4c6@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces a module for working with faux devices in rust, along with
adding sample code to show how the API is used. Unlike other types of
devices, we don't provide any hooks for device probe/removal - since these
are optional for the faux API and are unnecessary in rust.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Maíra Canal &lt;mairacanal@riseup.net&gt;
Cc: Danilo Krummrich &lt;dakr@kernel.org&gt;
Cc: Miguel Ojeda &lt;miguel.ojeda.sandonis@gmail.com&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Link: https://lore.kernel.org/r/2025021026-exert-accent-b4c6@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
