Lines Matching refs:percpu_count_ptr
42 static unsigned long __percpu *percpu_count_ptr(struct percpu_ref *ref) in percpu_count_ptr() function
45 (ref->percpu_count_ptr & ~__PERCPU_REF_ATOMIC_DEAD); in percpu_count_ptr()
71 ref->percpu_count_ptr = (unsigned long) in percpu_ref_init()
73 if (!ref->percpu_count_ptr) in percpu_ref_init()
78 free_percpu((void __percpu *)ref->percpu_count_ptr); in percpu_ref_init()
86 ref->percpu_count_ptr |= __PERCPU_REF_ATOMIC; in percpu_ref_init()
93 ref->percpu_count_ptr |= __PERCPU_REF_DEAD; in percpu_ref_init()
109 unsigned long __percpu *percpu_count = percpu_count_ptr(ref); in __percpu_ref_exit()
115 ref->percpu_count_ptr = __PERCPU_REF_ATOMIC_DEAD; in __percpu_ref_exit()
140 ref->percpu_count_ptr |= atomic_long_read(&ref->data->count) << in percpu_ref_exit()
171 unsigned long __percpu *percpu_count = percpu_count_ptr(ref); in percpu_ref_switch_to_atomic_rcu()
215 if (ref->percpu_count_ptr & __PERCPU_REF_ATOMIC) { in __percpu_ref_switch_to_atomic()
222 ref->percpu_count_ptr |= __PERCPU_REF_ATOMIC; in __percpu_ref_switch_to_atomic()
237 unsigned long __percpu *percpu_count = percpu_count_ptr(ref); in __percpu_ref_switch_to_percpu()
242 if (!(ref->percpu_count_ptr & __PERCPU_REF_ATOMIC)) in __percpu_ref_switch_to_percpu()
259 smp_store_release(&ref->percpu_count_ptr, in __percpu_ref_switch_to_percpu()
260 ref->percpu_count_ptr & ~__PERCPU_REF_ATOMIC); in __percpu_ref_switch_to_percpu()
392 ref->percpu_count_ptr |= __PERCPU_REF_DEAD; in percpu_ref_kill_and_confirm()
421 count = ref->percpu_count_ptr >> __PERCPU_REF_FLAG_BITS; in percpu_ref_is_zero()
471 ref->percpu_count_ptr &= ~__PERCPU_REF_DEAD; in percpu_ref_resurrect()