public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] local_lock: Move this_cpu_ptr() notation from internal to main header
@ 2025-06-30  7:51 Sebastian Andrzej Siewior
  2025-06-30  7:51 ` [PATCH v3 1/1] " Sebastian Andrzej Siewior
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-06-30  7:51 UTC (permalink / raw)
  To: linux-kernel, linux-rt-devel
  Cc: tglx, Peter Zijlstra, Ingo Molnar, Will Deacon, Waiman Long,
	Boqun Feng, Alexei Starovoitov, Sebastian Andrzej Siewior

While looking at what needs extra locks for PREEMPT_RT in order to rid
of the lock in local_bh_disable() I stumbled uppon two users which need
to lock the structure but the pointer is no longer per_cpu.

The moves this_cpu_ptr() from the internal header to the main one in order to
free the name space and have the __ prefix function to do the same but without
the this_cpu_ptr(). This gives us
    local_lock_nested_bh() -> on per-CPU memory
  __local_lock_nested_bh() -> on local memory.

This change has been made to all local_lock*() functions.

I made an example for the crypto user
	https://lore.kernel.org/all/20250514110750.852919-3-bigeasy@linutronix.de/

and would route if via crypto once this is accepted.

v2…v3: https://lore.kernel.org/all/20250610110205.1111719-1-bigeasy@linutronix.de/
  - Properly align the trailing backslash.

v1…v2: https://lore.kernel.org/all/20250514110750.852919-1-bigeasy@linutronix.de/
   - Repost without the crypto user.

Sebastian Andrzej Siewior (1):
  local_lock: Move this_cpu_ptr() notation from internal to main header.

 include/linux/local_lock.h          | 20 +++++++++----------
 include/linux/local_lock_internal.h | 30 ++++++++++++++---------------
 2 files changed, 25 insertions(+), 25 deletions(-)

-- 
2.50.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-30 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30  7:51 [PATCH v3 0/1] local_lock: Move this_cpu_ptr() notation from internal to main header Sebastian Andrzej Siewior
2025-06-30  7:51 ` [PATCH v3 1/1] " Sebastian Andrzej Siewior
2025-06-30 13:07   ` Peter Zijlstra
2025-06-30 15:49   ` Thomas Gleixner
2025-06-30 15:58   ` [tip: locking/core] " tip-bot2 for Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox