Commit 7dfb03dd authored by Neeraj Upadhyay (AMD)'s avatar Neeraj Upadhyay (AMD)
Browse files

Merge branches 'doc.2023.12.13a', 'torture.2023.11.23a', 'fixes.2023.12.13a',...

Merge branches 'doc.2023.12.13a', 'torture.2023.11.23a', 'fixes.2023.12.13a', 'rcu-tasks.2023.12.12b' and 'srcu.2023.12.13a' into rcu-merge.2023.12.13a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5302,6 +5302,12 @@
			Dump ftrace buffer after reporting RCU CPU
			stall warning.

	rcupdate.rcu_cpu_stall_notifiers= [KNL]
			Provide RCU CPU stall notifiers, but see the
			warnings in the RCU_CPU_STALL_NOTIFIER Kconfig
			option's help text.  TL;DR:  You almost certainly
			do not want rcupdate.rcu_cpu_stall_notifiers.

	rcupdate.rcu_cpu_stall_suppress= [KNL]
			Suppress RCU CPU stall warning messages.

+3 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#define RCU_STALL_NOTIFY_NORM	1
#define RCU_STALL_NOTIFY_EXP	2

#ifdef CONFIG_RCU_STALL_COMMON
#if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER)

#include <linux/notifier.h>
#include <linux/types.h>
@@ -21,12 +21,12 @@
int rcu_stall_chain_notifier_register(struct notifier_block *n);
int rcu_stall_chain_notifier_unregister(struct notifier_block *n);

#else // #ifdef CONFIG_RCU_STALL_COMMON
#else // #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER)

// No RCU CPU stall warnings in Tiny RCU.
static inline int rcu_stall_chain_notifier_register(struct notifier_block *n) { return -EEXIST; }
static inline int rcu_stall_chain_notifier_unregister(struct notifier_block *n) { return -ENOENT; }

#endif // #else // #ifdef CONFIG_RCU_STALL_COMMON
#endif // #else // #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER)

#endif /* __LINUX_RCU_NOTIFIER_H */
+6 −3
Original line number Diff line number Diff line
@@ -34,9 +34,6 @@

#define ULONG_CMP_GE(a, b)	(ULONG_MAX / 2 >= (a) - (b))
#define ULONG_CMP_LT(a, b)	(ULONG_MAX / 2 < (a) - (b))
#define ulong2long(a)		(*(long *)(&(a)))
#define USHORT_CMP_GE(a, b)	(USHRT_MAX / 2 >= (unsigned short)((a) - (b)))
#define USHORT_CMP_LT(a, b)	(USHRT_MAX / 2 < (unsigned short)((a) - (b)))

/* Exported common interfaces */
void call_rcu(struct rcu_head *head, rcu_callback_t func);
@@ -301,6 +298,11 @@ static inline void rcu_lock_acquire(struct lockdep_map *map)
	lock_acquire(map, 0, 0, 2, 0, NULL, _THIS_IP_);
}

static inline void rcu_try_lock_acquire(struct lockdep_map *map)
{
	lock_acquire(map, 0, 1, 2, 0, NULL, _THIS_IP_);
}

static inline void rcu_lock_release(struct lockdep_map *map)
{
	lock_release(map, _THIS_IP_);
@@ -315,6 +317,7 @@ int rcu_read_lock_any_held(void);
#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */

# define rcu_lock_acquire(a)		do { } while (0)
# define rcu_try_lock_acquire(a)	do { } while (0)
# define rcu_lock_release(a)		do { } while (0)

static inline int rcu_read_lock_held(void)
+1 −1
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ static inline int srcu_read_lock_nmisafe(struct srcu_struct *ssp) __acquires(ssp

	srcu_check_nmi_safety(ssp, true);
	retval = __srcu_read_lock_nmisafe(ssp);
	rcu_lock_acquire(&ssp->dep_map);
	rcu_try_lock_acquire(&ssp->dep_map);
	return retval;
}

+9 −9
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ struct call_rcu_chain {
	struct rcu_head crc_rh;
	bool crc_stop;
};
struct call_rcu_chain *call_rcu_chain;
struct call_rcu_chain *call_rcu_chain_list;

/* Forward reference. */
static void lock_torture_cleanup(void);
@@ -1074,12 +1074,12 @@ static int call_rcu_chain_init(void)

	if (call_rcu_chains <= 0)
		return 0;
	call_rcu_chain = kcalloc(call_rcu_chains, sizeof(*call_rcu_chain), GFP_KERNEL);
	if (!call_rcu_chain)
	call_rcu_chain_list = kcalloc(call_rcu_chains, sizeof(*call_rcu_chain_list), GFP_KERNEL);
	if (!call_rcu_chain_list)
		return -ENOMEM;
	for (i = 0; i < call_rcu_chains; i++) {
		call_rcu_chain[i].crc_stop = false;
		call_rcu(&call_rcu_chain[i].crc_rh, call_rcu_chain_cb);
		call_rcu_chain_list[i].crc_stop = false;
		call_rcu(&call_rcu_chain_list[i].crc_rh, call_rcu_chain_cb);
	}
	return 0;
}
@@ -1089,13 +1089,13 @@ static void call_rcu_chain_cleanup(void)
{
	int i;

	if (!call_rcu_chain)
	if (!call_rcu_chain_list)
		return;
	for (i = 0; i < call_rcu_chains; i++)
		smp_store_release(&call_rcu_chain[i].crc_stop, true);
		smp_store_release(&call_rcu_chain_list[i].crc_stop, true);
	rcu_barrier();
	kfree(call_rcu_chain);
	call_rcu_chain = NULL;
	kfree(call_rcu_chain_list);
	call_rcu_chain_list = NULL;
}

static void lock_torture_cleanup(void)
Loading