Lines Matching refs:ref
95 struct ioremap_guard_ref *ref; in ioremap_phys_range_hook() local
98 ref = xa_load(&ioremap_guard_array, pfn); in ioremap_phys_range_hook()
99 if (ref) { in ioremap_phys_range_hook()
100 refcount_inc(&ref->count); in ioremap_phys_range_hook()
112 ref = kzalloc(sizeof(*ref), GFP_KERNEL); in ioremap_phys_range_hook()
113 if (ref) { in ioremap_phys_range_hook()
114 refcount_set(&ref->count, 1); in ioremap_phys_range_hook()
115 if (xa_err(xa_store(&ioremap_guard_array, pfn, ref, in ioremap_phys_range_hook()
117 kfree(ref); in ioremap_phys_range_hook()
118 ref = NULL; in ioremap_phys_range_hook()
128 kfree(ref); in ioremap_phys_range_hook()
151 struct ioremap_guard_ref *ref; in iounmap_phys_range_hook() local
154 ref = xa_load(&ioremap_guard_array, pfn); in iounmap_phys_range_hook()
155 if (!ref) { in iounmap_phys_range_hook()
161 if (!refcount_dec_and_test(&ref->count)) in iounmap_phys_range_hook()
165 kfree(ref); in iounmap_phys_range_hook()