~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to include/linux/rcupdate.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
                rcu_irq_exit(); \
262
262
        } while (0)
263
263
 
 
264
#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP)
 
265
extern bool __rcu_is_watching(void);
 
266
#endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */
 
267
 
264
268
/*
265
269
 * Infrastructure to implement the synchronize_() primitives in
266
270
 * TREE_RCU and rcu_barrier_() primitives in TINY_RCU.
297
301
}
298
302
#endif  /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
299
303
 
300
 
#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SMP)
301
 
extern int rcu_is_cpu_idle(void);
302
 
#endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SMP) */
303
 
 
304
304
#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU)
305
305
bool rcu_lockdep_current_cpu_online(void);
306
306
#else /* #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU) */
351
351
{
352
352
        if (!debug_lockdep_rcu_enabled())
353
353
                return 1;
354
 
        if (rcu_is_cpu_idle())
 
354
        if (!rcu_is_watching())
355
355
                return 0;
356
356
        if (!rcu_lockdep_current_cpu_online())
357
357
                return 0;
402
402
 
403
403
        if (!debug_lockdep_rcu_enabled())
404
404
                return 1;
405
 
        if (rcu_is_cpu_idle())
 
405
        if (!rcu_is_watching())
406
406
                return 0;
407
407
        if (!rcu_lockdep_current_cpu_online())
408
408
                return 0;
771
771
        __rcu_read_lock();
772
772
        __acquire(RCU);
773
773
        rcu_lock_acquire(&rcu_lock_map);
774
 
        rcu_lockdep_assert(!rcu_is_cpu_idle(),
 
774
        rcu_lockdep_assert(rcu_is_watching(),
775
775
                           "rcu_read_lock() used illegally while idle");
776
776
}
777
777
 
792
792
 */
793
793
static inline void rcu_read_unlock(void)
794
794
{
795
 
        rcu_lockdep_assert(!rcu_is_cpu_idle(),
 
795
        rcu_lockdep_assert(rcu_is_watching(),
796
796
                           "rcu_read_unlock() used illegally while idle");
797
797
        rcu_lock_release(&rcu_lock_map);
798
798
        __release(RCU);
821
821
        local_bh_disable();
822
822
        __acquire(RCU_BH);
823
823
        rcu_lock_acquire(&rcu_bh_lock_map);
824
 
        rcu_lockdep_assert(!rcu_is_cpu_idle(),
 
824
        rcu_lockdep_assert(rcu_is_watching(),
825
825
                           "rcu_read_lock_bh() used illegally while idle");
826
826
}
827
827
 
832
832
 */
833
833
static inline void rcu_read_unlock_bh(void)
834
834
{
835
 
        rcu_lockdep_assert(!rcu_is_cpu_idle(),
 
835
        rcu_lockdep_assert(rcu_is_watching(),
836
836
                           "rcu_read_unlock_bh() used illegally while idle");
837
837
        rcu_lock_release(&rcu_bh_lock_map);
838
838
        __release(RCU_BH);
857
857
        preempt_disable();
858
858
        __acquire(RCU_SCHED);
859
859
        rcu_lock_acquire(&rcu_sched_lock_map);
860
 
        rcu_lockdep_assert(!rcu_is_cpu_idle(),
 
860
        rcu_lockdep_assert(rcu_is_watching(),
861
861
                           "rcu_read_lock_sched() used illegally while idle");
862
862
}
863
863
 
875
875
 */
876
876
static inline void rcu_read_unlock_sched(void)
877
877
{
878
 
        rcu_lockdep_assert(!rcu_is_cpu_idle(),
 
878
        rcu_lockdep_assert(rcu_is_watching(),
879
879
                           "rcu_read_unlock_sched() used illegally while idle");
880
880
        rcu_lock_release(&rcu_sched_lock_map);
881
881
        __release(RCU_SCHED);