From: Markus Probst <markus.probst@posteo.de>
To: "Ayush Singh" <ayush@beagleboard.org>,
"Johan Hovold" <johan@kernel.org>,
"Alex Elder" <elder@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Eric Biggers" <ebiggers@kernel.org>,
"Ard Biesheuvel" <ardb@kernel.org>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Vlastimil Babka" <vbabka@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Uladzislau Rezki" <urezki@gmail.com>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: greybus-dev@lists.linaro.org, linux-serial@vger.kernel.org,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev,
Markus Probst <markus.probst@posteo.de>,
Sashiko Bot <sashiko-bot@kernel.org>
Subject: [PATCH RESEND v6 0/4] rust: serdev: Refactor
Date: Fri, 04 Dec 2026 16:58:20 +0000 [thread overview]
Message-ID: <20261204-rust_serdev_probe_refactor-v6-0-0e12b6e6853b@posteo.de> (raw)
The following has been changed:
- introduce mutex to C serdev tty port controller
- introduce a new C serdev API to fix race conditions and simplify rust
code. Should also be useful on the C side.
- fix race conditions
- simplify rust code
Signed-off-by: Markus Probst <markus.probst@posteo.de>
---
Changes in v6:
- fix issues reported by Sashiko:
- fix compile error on 3. patch
- rebase onto v7.4-rc2
- use dev_WARN instead of WARN_ON (WARN intentionally kept)
- Link to v5: https://patch.msgid.link/20261022-rust_serdev_probe_refactor-v5-0-a27d862a415a@posteo.de
Changes in v5:
- fix issues reported by Sashiko:
- fix access to serport->tty outside of locked mutex
- only lock receive_lock in ttyport_open for set_bit
- Link to v4: https://patch.msgid.link/20261016-rust_serdev_probe_refactor-v4-0-46832e034757@posteo.de
Changes in v4:
- fix issues reported by Sashiko:
- add receive_lock to prevent deadlocks
- Link to v3: https://patch.msgid.link/20260930-rust_serdev_probe_refactor-v3-0-d1b6e77135e0@posteo.de
Changes in v3:
- add mutex
- Link to v2: https://patch.msgid.link/20260920-rust_serdev_probe_refactor-v2-0-43b855162f5d@posteo.de
Changes in v2:
- fix missing memory barriers in serdev apis
- use `tty_buffer_restart_work` instead of `tty_flip_buffer_push`
- use `tty_buffer_flush_work` instead of exclusively locking the mutex
- add `#[inline]` to `PrivateData::driver_data`
- remove patches for mutable references
- Link to v1: https://patch.msgid.link/20260906-rust_serdev_probe_refactor-v1-0-69cdae0074ec@posteo.de
---
Markus Probst (4):
tty: serdev: Add mutex lock
tty: serdev: Export functions to pause receive_buf callback calls
rust: serdev: Replace `active` mutex with receive pause
rust: serdev: Simplify callbacks
drivers/tty/serdev/core.c | 56 +++++++++++-
drivers/tty/serdev/serdev-ttyport.c | 80 +++++++++++++++--
include/linux/serdev.h | 8 +-
rust/kernel/serdev.rs | 167 ++++++++++++------------------------
4 files changed, 186 insertions(+), 125 deletions(-)
---
base-commit: fd9230005e85472b81c1c7c16afe93dd878996b1
change-id: 20260905-rust_serdev_probe_refactor-0e2b044354a7
-----BEGIN PGP SIGNATURE-----
iQJPBAABCAA5FiEEgnQYxPSsWOdyMMRzNHYf+OetQ9IFAmr1964bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJEDR2H/jnrUPSTjcP/0JUJpxBfi4xWI8m2J9z
yBYBAgoD2ePHJ40IeQBlIOQhIrj7+Y86G6ex78GybRK3bobR+PGek7XlJtfbWY6t
ACkgiI7CXyB5XfEQdNFF9wXxDCPGCnBUc7UUT7LJFDCqtn4rLueMcvgOxvDnnUx0
KdiRX75Rc+BGo9+/3IqttFvzXfwCAq/B45o1jScq4owclH7lXzy7UpBhxq1tLcpv
evyGBhWzjHW5H35NnI5uqPhqMUAS0QcByYcNDJLSjDZcnMURnpGZ5K5evmJQXue9
SoIJsFhBopV+hnbqeu6dAdVrclrNTtFG71xp8sjsZrrWfUxLZ+Iv9BsliLJ8NnKr
SeYuHFZvUJv//uXmK9/x0bxEVOgeV09sWRjfTEfd7D3itjscZ1b0yKmtp+jjWyAO
/CYEq/g+6Dvy0NDYiYPxg3sbXcNFJNQNiH+SqQx7GgewQ96Uv8MfZgD3Klt/KRxu
cXL1EdM0ILrqUkiK5C3M2DLUpa+59e7QEZz1lkv50SxiYyLN12xG8d95Ax7y5NwK
IAd6o6+LvgEMmxz3euopeKeOPolNdn5+eZ+LdB+EEyhyvBBHQONgdMGVPdAnI6NK
4VsnkSgWY6gKxSsO53O/bWihMzC+kVYbBLJppC4JZwV2oqnSgJf8ufRtqIFXUioL
B8Ev8Cb3L0yZqBqfbymZ7Jrg
=SI2b
-----END PGP SIGNATURE-----
--
Markus Probst <markus.probst@posteo.de>
next reply other threads:[~2026-12-04 16:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 16:58 Markus Probst [this message]
2026-12-04 16:58 ` [PATCH RESEND v6 1/4] tty: serdev: Add mutex lock Markus Probst
2026-12-04 17:22 ` sashiko-bot
2026-12-04 17:45 ` Markus Probst
2026-12-04 16:58 ` [PATCH RESEND v6 2/4] tty: serdev: Export functions to pause receive_buf callback calls Markus Probst
2026-12-04 17:23 ` sashiko-bot
2026-12-04 16:58 ` [PATCH RESEND v6 3/4] rust: serdev: Replace `active` mutex with receive pause Markus Probst
2026-12-04 16:58 ` [PATCH RESEND v6 4/4] rust: serdev: Simplify callbacks Markus Probst
2026-12-04 17:13 ` sashiko-bot
2026-12-04 17:37 ` Markus Probst
2026-12-04 17:23 ` [PATCH RESEND v6 0/4] rust: serdev: Refactor sashiko-bot
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=20261204-rust_serdev_probe_refactor-v6-0-0e12b6e6853b@posteo.de \
--to=markus.probst@posteo.de \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=ardb@kernel.org \
--cc=ayush@beagleboard.org \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=ebiggers@kernel.org \
--cc=elder@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=urezki@gmail.com \
--cc=vbabka@kernel.org \
--cc=work@onurozkan.dev \
/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