linux-next: manual merge of the paulmck tree with the origin tree

From: Mark Brown

Date: Mon Aug 24 2026 - 08:26:10 EST


Hi all,

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

kernel/smp.c

between commit:

b46883305f261 ("smp: Disable preemption explicitly in __csd_lock_wait()")

from the origin tree and commit:

07230d21630f4 ("locking/csd-lock: Pack csd_lock_wait_toolong() state into a struct")

from the paulmck 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 kernel/smp.c
index b696bcc60c08f,9092315c144a9..0000000000000
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@@ -285,19 -298,13 +311,19 @@@ static bool csd_lock_wait_toolong(call_
cpux = 0;
else
cpux = cpu;
- cpu_cur_csd = smp_load_acquire(&per_cpu(cur_csd, cpux)); /* Before func and info. */
+ /*
+ * Pairs with smp_store_release() of cur_csd in __csd_lock_record():
+ * a non-NULL cur_csd here implies cur_csd_func and cur_csd_info
+ * are the matching publication; a NULL value is ordered after any
+ * preceding CSD callback/unlock on the remote CPU.
+ */
+ cpu_cur_csd = smp_load_acquire(&per_cpu(cur_csd, cpux));
/* How long since this CSD lock was stuck. */
- ts_delta = ts2 - ts0;
+ ts_delta = ts_now - state->ts_start;
pr_alert("csd: %s non-responsive CSD lock (#%d) on CPU#%d, waiting %lld ns for CPU#%02d %pS(%ps).\n",
- firsttime ? "Detected" : "Continued", *bug_id, raw_smp_processor_id(), (s64)ts_delta,
+ firsttime ? "Detected" : "Continued", state->bug_id, raw_smp_processor_id(), (s64)ts_delta,
cpu, csd->func, csd->info);
- (*nmessages)++;
+ state->nmessages++;
if (firsttime)
atomic_inc(&n_csd_lock_stuck);
/*
@@@ -338,15 -346,11 +365,13 @@@
*/
static void __csd_lock_wait(call_single_data_t *csd)
{
- unsigned long nmessages = 0;
- int bug_id = 0;
- u64 ts0, ts1;
+ struct csd_wait_state state = {};

+ guard(preempt)();
+
- ts1 = ts0 = ktime_get_mono_fast_ns();
+ state.ts_report = state.ts_start = ktime_get_mono_fast_ns();
for (;;) {
- if (csd_lock_wait_toolong(csd, ts0, &ts1, &bug_id, &nmessages))
+ if (csd_lock_wait_toolong(csd, &state))
break;
cpu_relax();
}

Attachment: signature.asc
Description: PGP signature