diff options
author | Alice Ryhl <aliceryhl@google.com> | 2024-03-22 08:59:38 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-04-11 23:20:43 +0200 |
commit | 48b7f4d29ac8fcdc35a97ce38e4aecdee83b0e3f (patch) | |
tree | 7839771348bd2cf6dd17507b1380f613099e845d /drivers/fpga/tests | |
parent | 8ff1e6c5aca5fd908e81c33c460c45f9555e1c22 (diff) |
rust: time: Add Ktime
Introduce a wrapper around `ktime_t` with a few different useful methods.
Rust Binder will use these bindings to compute how many milliseconds a
transaction has been active for when dumping the current state of the
Binder driver. This replicates the logic in C Binder [1].
For a usage example in Rust Binder, see [2].
ktime_get() cannot be safely called in NMI context. This requirement is not
checked by these abstractions, but it is intended that klint [3] or a
similar tool will be used to check it in the future.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/r/20240322-rust-ktime_ms_delta-v2-1-d98de1f7c282@google.com
Link: https://lore.kernel.org/lkml/5ac8c0d09392290be789423f0dd78a520b830fab.1682333709.git.zhangchuang3@xiaomi.com/ [1]
Link: https://r.android.com/3004103 [2]
Link: https://rust-for-linux.com/klint [3]
Diffstat (limited to 'drivers/fpga/tests')
0 files changed, 0 insertions, 0 deletions