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

Mark Brown <[email protected]>
Newsgroups org.kernel.vger.linux-next,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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();
  	}
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqMNxcACgkQJNaLcl1U
h9BgSwf+K3Nay+1hjqkV/TtfR8tC5IHflURNQWmlnoecwso3mh6YFsUFDIsrFif1
OZh4iYOynUuxVIV3PQ95SQ6Gw3BjTBKzpSgm8FV9jYzUh2YI0G6M7qDRGnhC2vl2
/ttAY1ULPJW+dbeyXuk+4V4vK8TcQY002CB0YdY6jEhxBH5WqzwT4CFNcyKT+9V0
EONZeQcDjWDRAzkn9nWmLP5efqXWzsC5uElBvK+La0v/c3GSKjK4xTzOoKbM0+g6
BY11c6awtvD5IZxxQpjWzUcMtWfI5JeHHcaYTjLJa2g9Jfob3W3Ij2TUJ6nlzqtS
OPJa092ljD4bXLgaDKhPQwCBiurAjg==
=ad+m
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.