This header contains the public declarations usable in the rest of the kernel for rqspinlock. Reviewed-by: Barret Rhoden <brho@xxxxxxxxxx> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> --- include/asm-generic/rqspinlock.h | 18 ++++++++++++++++++ kernel/locking/rqspinlock.c | 1 + 2 files changed, 19 insertions(+) create mode 100644 include/asm-generic/rqspinlock.h diff --git a/include/asm-generic/rqspinlock.h b/include/asm-generic/rqspinlock.h new file mode 100644 index 000000000000..5c2cd3097fb2 --- /dev/null +++ b/include/asm-generic/rqspinlock.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Resilient Queued Spin Lock + * + * (C) Copyright 2024 Meta Platforms, Inc. and affiliates. + * + * Authors: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> + */ +#ifndef __ASM_GENERIC_RQSPINLOCK_H +#define __ASM_GENERIC_RQSPINLOCK_H + +#include <linux/types.h> + +struct qspinlock; + +extern void resilient_queued_spin_lock_slowpath(struct qspinlock *lock, u32 val); + +#endif /* __ASM_GENERIC_RQSPINLOCK_H */ diff --git a/kernel/locking/rqspinlock.c b/kernel/locking/rqspinlock.c index caaa7c9bbc79..b7920ae79410 100644 --- a/kernel/locking/rqspinlock.c +++ b/kernel/locking/rqspinlock.c @@ -23,6 +23,7 @@ #include <asm/byteorder.h> #include <asm/qspinlock.h> #include <trace/events/lock.h> +#include <asm/rqspinlock.h> /* * Include queued spinlock definitions and statistics code -- 2.43.5