aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-10-04 18:55:16 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-11-28 18:51:18 -0500
commit84585aa8b6ad24e5bdfba9db4a320a6aeed192ab (patch)
tree5a1f2c43c2bb24d8458071b848bc57a52465d81b /kernel
parentbd2b879a1ca55486fdb9dcac691bfd3dd79c83d6 (diff)
rcu: Shrink ->dynticks_{nmi_,}nesting from long long to long
Because the ->dynticks_nesting field now only contains the process-based nesting level instead of a value encoding both the process nesting level and the irq "nesting" level, we no longer need a long long, even on 32-bit systems. This commit therefore changes both the ->dynticks_nesting and ->dynticks_nmi_nesting fields to long. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcu/rcu.h2
-rw-r--r--kernel/rcu/tree.c6
-rw-r--r--kernel/rcu/tree.h4
-rw-r--r--kernel/rcu/tree_plugin.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index afe0559d1867..6334f2c1abd0 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -31,7 +31,7 @@
31#endif /* #else #ifdef CONFIG_RCU_TRACE */ 31#endif /* #else #ifdef CONFIG_RCU_TRACE */
32 32
33/* Offset to allow for unmatched rcu_irq_{enter,exit}(). */ 33/* Offset to allow for unmatched rcu_irq_{enter,exit}(). */
34#define DYNTICK_IRQ_NONIDLE ((INT_MAX / 2) + 1) 34#define DYNTICK_IRQ_NONIDLE ((LONG_MAX / 2) + 1)
35 35
36 36
37/* 37/*
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index d069ba2d8412..92de3bacda07 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -946,7 +946,7 @@ void rcu_irq_exit_irqson(void)
946 * we really have exited idle, and must do the appropriate accounting. 946 * we really have exited idle, and must do the appropriate accounting.
947 * The caller must have disabled interrupts. 947 * The caller must have disabled interrupts.
948 */ 948 */
949static void rcu_eqs_exit_common(long long newval, int user) 949static void rcu_eqs_exit_common(long newval, int user)
950{ 950{
951 RCU_TRACE(struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);) 951 RCU_TRACE(struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);)
952 952
@@ -979,7 +979,7 @@ static void rcu_eqs_exit_common(long long newval, int user)
979static void rcu_eqs_exit(bool user) 979static void rcu_eqs_exit(bool user)
980{ 980{
981 struct rcu_dynticks *rdtp; 981 struct rcu_dynticks *rdtp;
982 long long oldval; 982 long oldval;
983 983
984 lockdep_assert_irqs_disabled(); 984 lockdep_assert_irqs_disabled();
985 rdtp = this_cpu_ptr(&rcu_dynticks); 985 rdtp = this_cpu_ptr(&rcu_dynticks);
@@ -1043,7 +1043,7 @@ void rcu_user_exit(void)
1043void rcu_nmi_enter(void) 1043void rcu_nmi_enter(void)
1044{ 1044{
1045 struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks); 1045 struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
1046 int incby = 2; 1046 long incby = 2;
1047 1047
1048 /* Complain about underflow. */ 1048 /* Complain about underflow. */
1049 WARN_ON_ONCE(rdtp->dynticks_nmi_nesting < 0); 1049 WARN_ON_ONCE(rdtp->dynticks_nmi_nesting < 0);
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index dbd7e3753bed..6488a3b0e729 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -38,8 +38,8 @@
38 * Dynticks per-CPU state. 38 * Dynticks per-CPU state.
39 */ 39 */
40struct rcu_dynticks { 40struct rcu_dynticks {
41 long long dynticks_nesting; /* Track irq/process nesting level. */ 41 long dynticks_nesting; /* Track process nesting level. */
42 int dynticks_nmi_nesting; /* Track NMI nesting level. */ 42 long dynticks_nmi_nesting; /* Track irq/NMI nesting level. */
43 atomic_t dynticks; /* Even value for idle, else odd. */ 43 atomic_t dynticks; /* Even value for idle, else odd. */
44 bool rcu_need_heavy_qs; /* GP old, need heavy quiescent state. */ 44 bool rcu_need_heavy_qs; /* GP old, need heavy quiescent state. */
45 unsigned long rcu_qs_ctr; /* Light universal quiescent state ctr. */ 45 unsigned long rcu_qs_ctr; /* Light universal quiescent state ctr. */
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index db85ca3975f1..e94e754464cd 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1687,7 +1687,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
1687 } 1687 }
1688 print_cpu_stall_fast_no_hz(fast_no_hz, cpu); 1688 print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
1689 delta = rdp->mynode->gpnum - rdp->rcu_iw_gpnum; 1689 delta = rdp->mynode->gpnum - rdp->rcu_iw_gpnum;
1690 pr_err("\t%d-%c%c%c%c: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u fqs=%ld %s\n", 1690 pr_err("\t%d-%c%c%c%c: (%lu %s) idle=%03x/%ld/%ld softirq=%u/%u fqs=%ld %s\n",
1691 cpu, 1691 cpu,
1692 "O."[!!cpu_online(cpu)], 1692 "O."[!!cpu_online(cpu)],
1693 "o."[!!(rdp->grpmask & rdp->mynode->qsmaskinit)], 1693 "o."[!!(rdp->grpmask & rdp->mynode->qsmaskinit)],