mbox series

[v1,0/2] cleanup.h: Introduce DEFINE_INACTIVE_GUARD()/activate_guard()

Message ID 20240828143719.828968-1-mathieu.desnoyers@efficios.com (mailing list archive)
Headers show
Series cleanup.h: Introduce DEFINE_INACTIVE_GUARD()/activate_guard() | expand

Message

Mathieu Desnoyers Aug. 28, 2024, 2:37 p.m. UTC
In preparation to introduce a "DEFINE_INACTIVE_GUARD()" to actually
define a guard variable, rename all the guard "DEFINE_" prefix to
"DECLARE_".

To cover scenarios where the scope of the guard differs from the scope
of its activation, introduce DEFINE_INACTIVE_GUARD() and activate_guard().

The faultable tracepoints depend on this.

Based on v6.11-rc5.

Thanks,

Mathieu

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Yonghong Song <yhs@fb.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: bpf@vger.kernel.org
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: linux-trace-kernel@vger.kernel.org

Mathieu Desnoyers (2):
  cleanup.h guard: Rename DEFINE_ prefix to DECLARE_
  cleanup.h: Introduce DEFINE_INACTIVE_GUARD and activate_guard

 crypto/asymmetric_keys/x509_parser.h         |  4 +-
 drivers/cxl/acpi.c                           |  6 +-
 drivers/cxl/core/cdat.c                      |  2 +-
 drivers/cxl/cxl.h                            |  2 +-
 drivers/gpio/gpiolib.h                       |  2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h |  2 +-
 drivers/platform/x86/intel/pmc/core_ssram.c  |  2 +-
 fs/fuse/virtio_fs.c                          |  2 +-
 fs/namespace.c                               |  2 +-
 fs/pstore/inode.c                            |  4 +-
 include/linux/bitmap.h                       |  2 +-
 include/linux/cleanup.h                      | 79 +++++++++++++-------
 include/linux/cpuhplock.h                    |  2 +-
 include/linux/cpumask.h                      |  2 +-
 include/linux/device.h                       |  6 +-
 include/linux/file.h                         |  6 +-
 include/linux/firmware.h                     |  2 +-
 include/linux/firmware/qcom/qcom_tzmem.h     |  2 +-
 include/linux/gpio/driver.h                  |  4 +-
 include/linux/iio/iio.h                      |  4 +-
 include/linux/interrupt.h                    |  4 +-
 include/linux/irqflags.h                     |  4 +-
 include/linux/local_lock.h                   | 22 +++---
 include/linux/mutex.h                        |  6 +-
 include/linux/netdevice.h                    |  2 +-
 include/linux/nsproxy.h                      |  2 +-
 include/linux/of.h                           |  2 +-
 include/linux/path.h                         |  2 +-
 include/linux/pci.h                          |  4 +-
 include/linux/percpu.h                       |  2 +-
 include/linux/preempt.h                      |  6 +-
 include/linux/property.h                     |  2 +-
 include/linux/rcupdate.h                     |  2 +-
 include/linux/rtnetlink.h                    |  2 +-
 include/linux/rwsem.h                        | 10 +--
 include/linux/sched/task.h                   |  4 +-
 include/linux/slab.h                         |  4 +-
 include/linux/spinlock.h                     | 38 +++++-----
 include/linux/srcu.h                         |  8 +-
 include/sound/pcm.h                          |  6 +-
 kernel/sched/core.c                          |  2 +-
 kernel/sched/sched.h                         | 16 ++--
 kernel/sched/syscalls.c                      |  4 +-
 lib/locking-selftest.c                       | 12 +--
 sound/core/control_led.c                     |  2 +-
 45 files changed, 163 insertions(+), 142 deletions(-)