mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Boqun Feng <boqun@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>,
	Philipp Stanner <phasta@kernel.org>
Subject: linux-next: manual merge of the tip tree with the rust tree
Date: Mon, 10 Aug 2026 17:58:02 +0100	[thread overview]
Message-ID: <anoDGk0XqfBjHfUn@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2518 bytes --]

Hi all,

Today's linux-next merge of the tip tree got a conflict in:

  rust/kernel/sync/rcu.rs

between commit:

  d8973c4754437 ("rust: sync: Add abstraction for rcu_barrier()")

from the rust tree and commit:

  1fb92e0625596 ("rust: sync: Add abstraction for synchronize_rcu()")

from the tip tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc rust/kernel/sync/rcu.rs
index 42d1b26a21437,d867240be7369..0000000000000
--- a/rust/kernel/sync/rcu.rs
+++ b/rust/kernel/sync/rcu.rs
@@@ -51,22 -51,18 +51,38 @@@ pub fn read_lock() -> Guard 
      Guard::new()
  }
  
 +/// Wait until all in-flight `call_rcu()` callbacks complete.
 +///
 +/// Note that this primitive does not necessarily wait for an RCU grace period
 +/// to complete. For example, if there are no RCU callbacks queued anywhere
 +/// in the system, then [`rcu_barrier()`] is within its rights to return
 +/// immediately, without waiting for anything, much less an RCU grace period.
 +/// In fact, [`rcu_barrier()`] will normally not result in any RCU grace periods
 +/// beyond those that were already destined to be executed.
 +///
 +/// In kernels built with `CONFIG_RCU_LAZY=y`, this function also hurries all
 +/// pending lazy RCU callbacks.
 +///
 +/// Note that this is one of the RCU primitives which must not be called in
 +/// atomic context.
 +#[inline]
 +pub fn rcu_barrier() {
 +    // SAFETY: `rcu_barrier()` is always safe to be called. It just might wait for a grace period.
 +    unsafe { bindings::rcu_barrier() };
 +}
++
+ /// Wait for one RCU grace period.
+ ///
+ /// Waits for all RCU read-side critical sections (such as those established by
+ /// a [`Guard`]) at the moment of the function call to finish.
+ ///
+ /// Does not prevent new read-side critical sections from starting, which may
+ /// begin and run while this call is blocking.
+ ///
+ /// Note that this is one of the RCU primitives which must not be called in
+ /// atomic context.
+ #[inline]
+ pub fn synchronize_rcu() {
+     // SAFETY: `synchronize_rcu()` is always safe to be called from process context.
+     unsafe { bindings::synchronize_rcu() };
+ }

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-08-10 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10 16:58 Mark Brown [this message]
2026-08-10 21:25 ` Miguel Ojeda

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=anoDGk0XqfBjHfUn@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=boqun@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=phasta@kernel.org \
    --cc=tglx@kernel.org \
    /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

all inboxes | Powered by JetHome®