[PATCH v2 0/3] rust: serdev: Refactor

Markus Probst posted 3 patches 4 days, 6 hours ago
drivers/tty/serdev/core.c           |  50 ++++++++++-
drivers/tty/serdev/serdev-ttyport.c |  38 ++++++++
include/linux/serdev.h              |   6 ++
rust/kernel/serdev.rs               | 167 ++++++++++++------------------------
4 files changed, 147 insertions(+), 114 deletions(-)
[PATCH v2 0/3] rust: serdev: Refactor
Posted by Markus Probst 4 days, 6 hours ago
The following has been changed:
- 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 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 (3):
      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           |  50 ++++++++++-
 drivers/tty/serdev/serdev-ttyport.c |  38 ++++++++
 include/linux/serdev.h              |   6 ++
 rust/kernel/serdev.rs               | 167 ++++++++++++------------------------
 4 files changed, 147 insertions(+), 114 deletions(-)
---
base-commit: c2cd463d6ee7d55a3ec0719d93c49ff99022d58f
change-id: 20260905-rust_serdev_probe_refactor-0e2b044354a7