Merge branch 'topic/intel8x0' into for-linus
[firefly-linux-kernel-4.4.55.git] / include / linux / rcuclassic.h
index 301dda829e37499f5cdaa0950e3a11f0c4ed3b74..80044a4f3ab9e1c890021fc0ff9dca533c00f71e 100644 (file)
@@ -59,8 +59,8 @@ struct rcu_ctrlblk {
        int     signaled;
 
        spinlock_t      lock    ____cacheline_internodealigned_in_smp;
-       cpumask_t       cpumask; /* CPUs that need to switch in order    */
-                                /* for current batch to proceed.        */
+       DECLARE_BITMAP(cpumask, NR_CPUS); /* CPUs that need to switch for */
+                                         /* current batch to proceed.     */
 } ____cacheline_internodealigned_in_smp;
 
 /* Is batch a before batch b ? */
@@ -181,4 +181,10 @@ extern long rcu_batches_completed_bh(void);
 #define rcu_enter_nohz()       do { } while (0)
 #define rcu_exit_nohz()                do { } while (0)
 
+/* A context switch is a grace period for rcuclassic. */
+static inline int rcu_blocking_is_gp(void)
+{
+       return num_online_cpus() == 1;
+}
+
 #endif /* __LINUX_RCUCLASSIC_H */