Home | History | Annotate | Download | only in kern

Lines Matching refs:bdevsw

101 #define	BDEVSW_SIZE	(sizeof(struct bdevsw *))
109 /* XXX bdevsw, cdevsw, max_bdevsws, and max_cdevsws should be volatile */
110 extern const struct bdevsw **bdevsw, *bdevsw0[];
120 static int bdevsw_attach(const struct bdevsw *, devmajor_t *);
122 static void devsw_detach_locked(const struct bdevsw *, const struct cdevsw *);
132 "struct bdevsw *"/*bdevsw*/,
139 "struct bdevsw *"/*bdevsw*/,
144 "struct bdevsw *"/*bdevsw*/,
150 "struct bdevsw *"/*bdevsw*/,
158 "struct bdevsw *"/*bdevsw*/,
163 "struct bdevsw *"/*bdevsw*/,
170 "struct bdevsw *"/*bdevsw*/,
175 "struct bdevsw *"/*bdevsw*/,
182 "struct bdevsw *"/*bdevsw*/,
186 "struct bdevsw *"/*bdevsw*/,
191 "struct bdevsw *"/*bdevsw*/,
197 "struct bdevsw *"/*bdevsw*/,
205 "struct bdevsw *"/*bdevsw*/,
208 "struct bdevsw *"/*bdevsw*/,
213 "struct bdevsw *"/*bdevsw*/,
218 "struct bdevsw *"/*bdevsw*/,
383 const struct bdevsw *bdev, devmajor_t *bmajor,
414 if ((*bmajor >= 0 && bdevsw[*bmajor] != NULL) ||
488 bdevsw_attach(const struct bdevsw *devsw, devmajor_t *devmajor)
490 const struct bdevsw **newbdevsw = NULL;
503 if (bdevsw[bmajor] != NULL)
530 KASSERT(bdevsw == bdevsw0);
535 memcpy(newbdevsw, bdevsw, max_bdevsws * sizeof(bdevsw[0]));
536 atomic_store_release(&bdevsw, newbdevsw);
540 if (bdevsw[*devmajor] != NULL)
548 atomic_store_release(&bdevsw[*devmajor], devsw);
617 bdevsw *bdev, const struct cdevsw *cdev)
651 if (bdevsw[bi] != bdev)
653 atomic_store_relaxed(&bdevsw[bi], NULL);
709 devsw_detach(const struct bdevsw *bdev, const struct cdevsw *cdev)
722 const struct bdevsw *
733 return atomic_load_consume(&bdevsw)[bmajor];
736 static const struct bdevsw *
740 const struct bdevsw *bdev = NULL, *const *curbdevsw;
761 curbdevsw = atomic_load_consume(&bdevsw);
777 bdevsw_release(const struct bdevsw *bdev, struct localcount *lc)
860 bdevsw_lookup_major(const struct bdevsw *bdev)
862 const struct bdevsw *const *curbdevsw;
866 curbdevsw = atomic_load_consume(&bdevsw);
914 if (bmajor < 0 || bmajor >= max_bdevsws || bdevsw[bmajor] == NULL) {
1011 bdevsw[bmajor] == NULL)
1105 if (bmajor >= 0 && bmajor < max_bdevsws && bdevsw[bmajor] != NULL)
1130 if (bmajor < 0 || bmajor >= max_bdevsws || bdevsw[bmajor] == NULL) {
1164 const struct bdevsw *d;
1217 const struct bdevsw *d;
1237 const struct bdevsw *d;
1258 const struct bdevsw *d;
1280 const struct bdevsw *d;
1298 const struct bdevsw *d;
1319 const struct bdevsw *d;
1329 const struct bdevsw *d;
1339 const struct bdevsw *d;
1364 const struct bdevsw *d;
1382 const struct bdevsw *d;
1700 * bdevsw, cdevsw::d_devtounit for drivers whose /dev nodes are