<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/rust/kernel/time/hrtimer.rs, branch v6.15</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.15</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.15'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-03-25T22:41:14Z</updated>
<entry>
<title>Merge tag 'rust-hrtimer-for-v6.15-v3' of https://github.com/Rust-for-Linux/linux into rust-next</title>
<updated>2025-03-25T22:41:14Z</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2025-03-25T21:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6ea10d5dbe082c54add289b44f08c9fcfe658af'/>
<id>urn:sha1:e6ea10d5dbe082c54add289b44f08c9fcfe658af</id>
<content type='text'>
Pull rust-hrtimer updates from Andreas Hindborg:
 "Introduce Rust support for the 'hrtimer' subsystem:

   - Add a way to use the 'hrtimer' subsystem from Rust. Rust code can
     now set up intrusive timers without allocating when starting the
     timer.

   - Add support for 'Pin&lt;Box&lt;_&gt;&gt;', 'Arc&lt;_&gt;', 'Pin&lt;&amp;_&gt;' and
     'Pin&lt;&amp;mut _&gt;' as pointer types for use with timer callbacks.

   - Add support for setting clock source and timer mode.

  'kernel' crate:

   - Add 'Arc::as_ptr' for converting an 'Arc' to a raw pointer. This is
     a dependency for the 'hrtimer' API.

   - Add 'Box::into_pin' for converting a 'Box&lt;_&gt;' into a 'Pin&lt;Box&lt;_&gt;&gt;'
     to align with Rust 'alloc'. This is a dependency for the 'hrtimer'
     API."

* tag 'rust-hrtimer-for-v6.15-v3' of https://github.com/Rust-for-Linux/linux:
  rust: hrtimer: add maintainer entry
  rust: hrtimer: add clocksource selection through `ClockId`
  rust: hrtimer: add `HrTimerMode`
  rust: hrtimer: implement `HrTimerPointer` for `Pin&lt;Box&lt;T&gt;&gt;`
  rust: alloc: add `Box::into_pin`
  rust: hrtimer: implement `UnsafeHrTimerPointer` for `Pin&lt;&amp;mut T&gt;`
  rust: hrtimer: implement `UnsafeHrTimerPointer` for `Pin&lt;&amp;T&gt;`
  rust: hrtimer: add `hrtimer::ScopedHrTimerPointer`
  rust: hrtimer: add `UnsafeHrTimerPointer`
  rust: hrtimer: allow timer restart from timer handler
  rust: hrtimer: implement `HrTimerPointer` for `Arc`
  rust: sync: add `Arc::as_ptr`
  rust: hrtimer: introduce hrtimer support
</content>
</entry>
<entry>
<title>rust: hrtimer: add clocksource selection through `ClockId`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa33de03a3d58a8e502ead3ca0d445a4fba22c83'/>
<id>urn:sha1:aa33de03a3d58a8e502ead3ca0d445a4fba22c83</id>
<content type='text'>
Allow selecting a clock source for timers by passing a `ClockId`
variant to `HrTimer::new`.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-12-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: add `HrTimerMode`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:19:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bfa3a410bf03ca41a7a58dea1e9c2acac9295bf7'/>
<id>urn:sha1:bfa3a410bf03ca41a7a58dea1e9c2acac9295bf7</id>
<content type='text'>
Allow selection of timer mode by passing a `HrTimerMode` variant to
`HrTimer::new`.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-11-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: implement `HrTimerPointer` for `Pin&lt;Box&lt;T&gt;&gt;`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:19:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=374b60a0134e4b136f6c3d8b3c9eb99b3b104249'/>
<id>urn:sha1:374b60a0134e4b136f6c3d8b3c9eb99b3b104249</id>
<content type='text'>
Allow `Pin&lt;Box&lt;T&gt;&gt;` to be the target of a timer callback.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-10-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: implement `UnsafeHrTimerPointer` for `Pin&lt;&amp;mut T&gt;`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=042b0c7947d39aeac34b35fb89034ca1345f1fc3'/>
<id>urn:sha1:042b0c7947d39aeac34b35fb89034ca1345f1fc3</id>
<content type='text'>
Allow pinned mutable references to structs that contain a `HrTimer` node to
be scheduled with the `hrtimer` subsystem.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-8-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: implement `UnsafeHrTimerPointer` for `Pin&lt;&amp;T&gt;`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=582523d9de9a8875df62a08af7443884ff5d9969'/>
<id>urn:sha1:582523d9de9a8875df62a08af7443884ff5d9969</id>
<content type='text'>
Allow pinned references to structs that contain a `HrTimer` node to be
scheduled with the `hrtimer` subsystem.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-7-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: add `hrtimer::ScopedHrTimerPointer`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:18:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f93b0d8360e5e690ca82c3236ba7f7f9d6a6b5e7'/>
<id>urn:sha1:f93b0d8360e5e690ca82c3236ba7f7f9d6a6b5e7</id>
<content type='text'>
Add the trait `ScopedHrTimerPointer` to allow safe use of stack allocated
timers. Safety is achieved by pinning the stack in place while timers are
running.

Implement the trait for all types that implement `UnsafeHrTimerPointer`.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-6-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: add `UnsafeHrTimerPointer`</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:18:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6968ce3769660658e5c956987dc9e75b369d4b6'/>
<id>urn:sha1:a6968ce3769660658e5c956987dc9e75b369d4b6</id>
<content type='text'>
Add a trait to allow unsafely queuing stack allocated timers.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-5-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: allow timer restart from timer handler</title>
<updated>2025-03-22T11:08:54Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:18:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94e05a66ea3ebed48e7e1a0dee68d40184386d25'/>
<id>urn:sha1:94e05a66ea3ebed48e7e1a0dee68d40184386d25</id>
<content type='text'>
Allow timer handlers to report that they want a timer to be restarted after
the timer handler has finished executing.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Reviewed-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-4-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: hrtimer: implement `HrTimerPointer` for `Arc`</title>
<updated>2025-03-11T20:00:42Z</updated>
<author>
<name>Andreas Hindborg</name>
<email>a.hindborg@kernel.org</email>
</author>
<published>2025-03-09T15:18:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7bf4786b5250b0e490a937d1f8a16ee3a54adbe'/>
<id>urn:sha1:d7bf4786b5250b0e490a937d1f8a16ee3a54adbe</id>
<content type='text'>
Allow the use of intrusive `hrtimer` fields in structs that are managed by
an `Arc` by implementing `HrTimerPointer` and `RawTimerCallbck` for `Arc`.

Acked-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Link: https://lore.kernel.org/r/20250309-hrtimer-v3-v6-12-rc2-v12-3-73586e2bd5f1@kernel.org
Signed-off-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
</content>
</entry>
</feed>
