Lines Matching refs:bm
206 struct bio_mapping *bm; in bio_register() local
211 bm = kmem_zalloc(sizeof(*bm), KM_SLEEP); in bio_register()
212 bm->bm_dev = dev; in bio_register()
213 bm->bm_ioctl = ioctl; in bio_register()
215 LIST_INSERT_HEAD(&bios, bm, bm_link); in bio_register()
223 struct bio_mapping *bm, *next; in bio_unregister() local
226 for (bm = LIST_FIRST(&bios); bm != NULL; bm = next) { in bio_unregister()
227 next = LIST_NEXT(bm, bm_link); in bio_unregister()
229 if (dev == bm->bm_dev) { in bio_unregister()
230 LIST_REMOVE(bm, bm_link); in bio_unregister()
231 kmem_free(bm, sizeof(*bm)); in bio_unregister()
240 struct bio_mapping *bm; in bio_lookup() local
243 LIST_FOREACH(bm, &bios, bm_link) { in bio_lookup()
244 if (strcmp(name, device_xname(bm->bm_dev)) == 0) { in bio_lookup()
246 return bm; in bio_lookup()
256 struct bio_mapping *bm; in bio_validate() local
258 LIST_FOREACH(bm, &bios, bm_link) in bio_validate()
259 if (bm == cookie) in bio_validate()
268 struct bio_mapping *bm = cookie; in bio_delegate_ioctl() local
270 return bm->bm_ioctl(bm->bm_dev, cmd, addr); in bio_delegate_ioctl()