update.c (efa3c40cfac0777071e30383d209534e09ee454b) update.c (be42f00b73a0f50710d16eb7cb4efda0cce062dd)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Read-Copy Update mechanism for mutual exclusion
4 *
5 * Copyright IBM Corporation, 2001
6 *
7 * Authors: Dipankar Sarma <dipankar@in.ibm.com>
8 * Manfred Spraul <manfred@colorfullife.com>

--- 494 unchanged lines hidden (view full) ---

503module_param(rcu_cpu_stall_ftrace_dump, int, 0644);
504int rcu_cpu_stall_suppress __read_mostly; // !0 = suppress stall warnings.
505EXPORT_SYMBOL_GPL(rcu_cpu_stall_suppress);
506module_param(rcu_cpu_stall_suppress, int, 0644);
507int rcu_cpu_stall_timeout __read_mostly = CONFIG_RCU_CPU_STALL_TIMEOUT;
508module_param(rcu_cpu_stall_timeout, int, 0644);
509int rcu_exp_cpu_stall_timeout __read_mostly = CONFIG_RCU_EXP_CPU_STALL_TIMEOUT;
510module_param(rcu_exp_cpu_stall_timeout, int, 0644);
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Read-Copy Update mechanism for mutual exclusion
4 *
5 * Copyright IBM Corporation, 2001
6 *
7 * Authors: Dipankar Sarma <dipankar@in.ibm.com>
8 * Manfred Spraul <manfred@colorfullife.com>

--- 494 unchanged lines hidden (view full) ---

503module_param(rcu_cpu_stall_ftrace_dump, int, 0644);
504int rcu_cpu_stall_suppress __read_mostly; // !0 = suppress stall warnings.
505EXPORT_SYMBOL_GPL(rcu_cpu_stall_suppress);
506module_param(rcu_cpu_stall_suppress, int, 0644);
507int rcu_cpu_stall_timeout __read_mostly = CONFIG_RCU_CPU_STALL_TIMEOUT;
508module_param(rcu_cpu_stall_timeout, int, 0644);
509int rcu_exp_cpu_stall_timeout __read_mostly = CONFIG_RCU_EXP_CPU_STALL_TIMEOUT;
510module_param(rcu_exp_cpu_stall_timeout, int, 0644);
511int rcu_cpu_stall_cputime __read_mostly = IS_ENABLED(CONFIG_RCU_CPU_STALL_CPUTIME);
512module_param(rcu_cpu_stall_cputime, int, 0644);
511#endif /* #ifdef CONFIG_RCU_STALL_COMMON */
512
513// Suppress boot-time RCU CPU stall warnings and rcutorture writer stall
514// warnings. Also used by rcutorture even if stall warnings are excluded.
515int rcu_cpu_stall_suppress_at_boot __read_mostly; // !0 = suppress boot stalls.
516EXPORT_SYMBOL_GPL(rcu_cpu_stall_suppress_at_boot);
517module_param(rcu_cpu_stall_suppress_at_boot, int, 0444);
518

--- 31 unchanged lines hidden (view full) ---

550
551struct early_boot_kfree_rcu {
552 struct rcu_head rh;
553};
554
555static void early_boot_test_call_rcu(void)
556{
557 static struct rcu_head head;
513#endif /* #ifdef CONFIG_RCU_STALL_COMMON */
514
515// Suppress boot-time RCU CPU stall warnings and rcutorture writer stall
516// warnings. Also used by rcutorture even if stall warnings are excluded.
517int rcu_cpu_stall_suppress_at_boot __read_mostly; // !0 = suppress boot stalls.
518EXPORT_SYMBOL_GPL(rcu_cpu_stall_suppress_at_boot);
519module_param(rcu_cpu_stall_suppress_at_boot, int, 0444);
520

--- 31 unchanged lines hidden (view full) ---

552
553struct early_boot_kfree_rcu {
554 struct rcu_head rh;
555};
556
557static void early_boot_test_call_rcu(void)
558{
559 static struct rcu_head head;
558 int idx;
559 static struct rcu_head shead;
560 struct early_boot_kfree_rcu *rhp;
561
560 static struct rcu_head shead;
561 struct early_boot_kfree_rcu *rhp;
562
562 idx = srcu_down_read(&early_srcu);
563 srcu_up_read(&early_srcu, idx);
564 call_rcu(&head, test_callback);
565 early_srcu_cookie = start_poll_synchronize_srcu(&early_srcu);
566 call_srcu(&early_srcu, &shead, test_callback);
567 rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
568 if (!WARN_ON_ONCE(!rhp))
569 kfree_rcu(rhp, rh);
570}
571

--- 12 unchanged lines hidden (view full) ---

584 int early_boot_test_counter = 0;
585
586 if (rcu_self_test) {
587 early_boot_test_counter++;
588 rcu_barrier();
589 early_boot_test_counter++;
590 srcu_barrier(&early_srcu);
591 WARN_ON_ONCE(!poll_state_synchronize_srcu(&early_srcu, early_srcu_cookie));
563 call_rcu(&head, test_callback);
564 early_srcu_cookie = start_poll_synchronize_srcu(&early_srcu);
565 call_srcu(&early_srcu, &shead, test_callback);
566 rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
567 if (!WARN_ON_ONCE(!rhp))
568 kfree_rcu(rhp, rh);
569}
570

--- 12 unchanged lines hidden (view full) ---

583 int early_boot_test_counter = 0;
584
585 if (rcu_self_test) {
586 early_boot_test_counter++;
587 rcu_barrier();
588 early_boot_test_counter++;
589 srcu_barrier(&early_srcu);
590 WARN_ON_ONCE(!poll_state_synchronize_srcu(&early_srcu, early_srcu_cookie));
592 cleanup_srcu_struct(&early_srcu);
593 }
594 if (rcu_self_test_counter != early_boot_test_counter) {
595 WARN_ON(1);
596 ret = -1;
597 }
598
599 return ret;
600}

--- 28 unchanged lines hidden ---
591 }
592 if (rcu_self_test_counter != early_boot_test_counter) {
593 WARN_ON(1);
594 ret = -1;
595 }
596
597 return ret;
598}

--- 28 unchanged lines hidden ---