Home
last modified time | relevance | path

Searched refs:bdev (Results 1 – 25 of 59) sorted by relevance

123

/freebsd/sys/dev/drm2/ttm/
H A Dttm_bo.c60 static void ttm_mem_type_debug(struct ttm_bo_device *bdev, int mem_type) in ttm_mem_type_debug() argument
62 struct ttm_mem_type_manager *man = &bdev->man[mem_type]; in ttm_mem_type_debug()
90 ttm_mem_type_debug(bo->bdev, mem_type); in ttm_bo_mem_space_debug()
111 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_release_list() local
130 ttm_mem_global_free(bdev->glob->mem_glob, acc_size); in ttm_bo_release_list()
159 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_add_to_lru() local
168 man = &bdev->man[bo->mem.mem_type]; in ttm_bo_add_to_lru()
370 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_add_ttm() local
378 if (bdev->need_dma32) in ttm_bo_add_ttm()
386 bo->ttm = bdev->driver->ttm_tt_create(bdev, bo->num_pages << PAGE_SHIFT, in ttm_bo_add_ttm()
[all …]
H A Dttm_bo_util.c114 static int ttm_mem_io_reserve(struct ttm_bo_device *bdev, in ttm_mem_io_reserve() argument
117 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_reserve()
120 if (!bdev->driver->io_mem_reserve) in ttm_mem_io_reserve()
123 return bdev->driver->io_mem_reserve(bdev, mem); in ttm_mem_io_reserve()
125 if (bdev->driver->io_mem_reserve && in ttm_mem_io_reserve()
128 ret = bdev->driver->io_mem_reserve(bdev, mem); in ttm_mem_io_reserve()
138 static void ttm_mem_io_free(struct ttm_bo_device *bdev, in ttm_mem_io_free() argument
141 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_free()
146 if (bdev->driver->io_mem_reserve && in ttm_mem_io_free()
148 bdev->driver->io_mem_free) in ttm_mem_io_free()
[all …]
H A Dttm_bo_api.h192 struct ttm_bo_device *bdev; member
405 extern int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev);
412 extern void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev,
450 size_t ttm_bo_acc_size(struct ttm_bo_device *bdev,
453 size_t ttm_bo_dma_acc_size(struct ttm_bo_device *bdev,
491 extern int ttm_bo_init(struct ttm_bo_device *bdev,
529 extern int ttm_bo_create(struct ttm_bo_device *bdev,
568 extern int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
597 extern int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type);
618 extern int ttm_bo_evict_mm(struct ttm_bo_device *bdev, unsigned mem_type);
[all …]
H A Dttm_bo_vm.c69 static struct ttm_buffer_object *ttm_bo_vm_lookup_rb(struct ttm_bo_device *bdev, in ttm_bo_vm_lookup_rb() argument
77 bo = RB_ROOT(&bdev->addr_space_rb); in ttm_bo_vm_lookup_rb()
105 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_vm_fault() local
111 &bdev->man[bo->mem.mem_type]; in ttm_bo_vm_fault()
130 if (bdev->driver->fault_reserve_notify) { in ttm_bo_vm_fault()
131 ret = bdev->driver->fault_reserve_notify(bo); in ttm_bo_vm_fault()
151 mtx_lock(&bdev->fence_lock); in ttm_bo_vm_fault()
170 mtx_unlock(&bdev->fence_lock); in ttm_bo_vm_fault()
176 mtx_unlock(&bdev->fence_lock); in ttm_bo_vm_fault()
205 if (ttm->bdev->driver->ttm_tt_populate(ttm)) { in ttm_bo_vm_fault()
[all …]
H A Dttm_bo_driver.h112 struct ttm_bo_device *bdev; member
265 struct ttm_bo_device *bdev; member
330 struct ttm_tt *(*ttm_tt_create)(struct ttm_bo_device *bdev,
367 int (*invalidate_caches) (struct ttm_bo_device *bdev, uint32_t flags);
368 int (*init_mem_type) (struct ttm_bo_device *bdev, uint32_t type,
451 int (*io_mem_reserve)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem);
452 void (*io_mem_free)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem);
599 extern int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev,
602 extern int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_bo_device *bdev,
695 extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev,
[all …]
H A Dttm_execbuf_util.c131 val_seq = entry->bo->bdev->val_seq++; in ttm_eu_reserve_buffers()
165 val_seq = entry->bo->bdev->val_seq++; in ttm_eu_reserve_buffers()
208 struct ttm_bo_device *bdev; in ttm_eu_fence_buffer_objects() local
215 bdev = bo->bdev; in ttm_eu_fence_buffer_objects()
216 driver = bdev->driver; in ttm_eu_fence_buffer_objects()
220 mtx_lock(&bdev->fence_lock); in ttm_eu_fence_buffer_objects()
229 mtx_unlock(&bdev->fence_lock); in ttm_eu_fence_buffer_objects()
H A Dttm_tt.c170 ttm->bdev->driver->ttm_tt_unpopulate(ttm); in ttm_tt_destroy()
181 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_bo_device *bdev, in ttm_tt_init() argument
185 ttm->bdev = bdev; in ttm_tt_init()
186 ttm->glob = bdev->glob; in ttm_tt_init()
209 int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_bo_device *bdev, in ttm_dma_tt_init() argument
215 ttm->bdev = bdev; in ttm_dma_tt_init()
216 ttm->glob = bdev->glob; in ttm_dma_tt_init()
265 ret = ttm->bdev->driver->ttm_tt_populate(ttm); in ttm_tt_bind()
351 ttm->bdev->driver->ttm_tt_unpopulate(ttm); in ttm_tt_swapout()
/freebsd/sys/contrib/openzfs/include/os/linux/kernel/linux/
H A Dblkdev_compat.h77 zfs_bdev_has_write_cache(struct block_device *bdev) in zfs_bdev_has_write_cache() argument
80 return (test_bit(QUEUE_FLAG_HW_WC, &bdev_get_queue(bdev)->queue_flags)); in zfs_bdev_has_write_cache()
82 return (test_bit(QUEUE_FLAG_WC, &bdev_get_queue(bdev)->queue_flags)); in zfs_bdev_has_write_cache()
112 bio_set_flags_failfast(struct block_device *bdev, int *flags, bool dev, in bio_set_flags_failfast() argument
125 if ((MAJOR(bdev->bd_dev) == LOOP_MAJOR) || in bio_set_flags_failfast()
126 (MAJOR(bdev->bd_dev) == MD_MAJOR)) in bio_set_flags_failfast()
130 if (MAJOR(bdev->bd_dev) == BLOCK_EXT_MAJOR) in bio_set_flags_failfast()
235 zfs_check_disk_status(struct block_device *bdev) in zfs_check_disk_status() argument
238 return (!!(bdev->bd_disk->flags & GENHD_FL_UP)); in zfs_check_disk_status()
240 return (!test_bit(GD_DEAD, &bdev->bd_disk->state)); in zfs_check_disk_status()
[all …]
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/
H A Dvdev_disk.c55 #define BDH_BDEV(bdh) ((bdh)->bdev)
149 bdev_capacity(struct block_device *bdev) in bdev_capacity() argument
152 return (bdev_nr_bytes(bdev)); in bdev_capacity()
154 return (i_size_read(bdev->bd_inode)); in bdev_capacity()
160 bdev_whole(struct block_device *bdev) in bdev_whole() argument
162 return (bdev->bd_contains); in bdev_whole()
167 #define vdev_bdevname(bdev, name) bdevname(bdev, name) argument
170 vdev_bdevname(struct block_device *bdev, char *name) in vdev_bdevname() argument
172 snprintf(name, BDEVNAME_SIZE, "%pg", bdev); in vdev_bdevname()
195 bdev_max_capacity(struct block_device *bdev, uint64_t wholedisk) in bdev_max_capacity() argument
[all …]
/freebsd/sys/contrib/openzfs/config/
H A Dkernel-blkdev.m410 struct block_device *bdev __attribute__ ((unused)) = NULL;
15 bdev = blkdev_get_by_path(path, mode, holder);
28 struct block_device *bdev __attribute__ ((unused)) = NULL;
34 bdev = blkdev_get_by_path(path, mode, holder, &h);
144 struct block_device *bdev = NULL;
147 blkdev_put(bdev, mode);
160 struct block_device *bdev = NULL;
163 blkdev_put(bdev, holder);
224 struct block_device *bdev = NULL;
227 error = blkdev_reread_part(bdev);
[all …]
H A Dkernel-generic_io_acct.m48 struct block_device *bdev = NULL;
13 start_time = bdev_start_io_acct(bdev, bio_op(bio),
15 bdev_end_io_acct(bdev, bio_op(bio), bio_sectors(bio), start_time);
21 struct block_device *bdev = NULL;
26 start_time = bdev_start_io_acct(bdev, bio_sectors(bio),
28 bdev_end_io_acct(bdev, bio_op(bio), start_time);
/freebsd/stand/i386/zfsboot/
H A Dzfsboot.c106 static struct i386_devdesc *bdev; variable
224 if (bdev != NULL && bdev->dd.d_dev->dv_type == DEVT_ZFS) { in main()
226 strncpy(boot_devname, devformat(&bdev->dd), sizeof (boot_devname)); in main()
227 if (zfs_get_bootonce(bdev, OS_BOOTONCE, cmd, in main()
242 if (zfs_get_bootenv(bdev, &benv) == 0) { in main()
245 zfs_set_bootenv(bdev, benv); in main()
253 free(bdev); in main()
254 i386_getdev((void **)&bdev, boot_devname, NULL); in main()
465 if (bdev->dd.d_dev->dv_type == DEVT_ZFS) { in load()
467 zfsargs.pool = bdev->zfs.pool_guid; in load()
[all …]
/freebsd/sys/dev/usb/controller/
H A Dehci_msm.c128 sc->sc_bus.bdev = device_add_child(dev, "usbus", DEVICE_UNIT_ANY); in ehci_msm_attach()
129 if (!sc->sc_bus.bdev) { in ehci_msm_attach()
133 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in ehci_msm_attach()
134 device_set_desc(sc->sc_bus.bdev, EHCI_HC_DEVSTR); in ehci_msm_attach()
151 err = device_probe_and_attach(sc->sc_bus.bdev); in ehci_msm_attach()
169 device_t bdev; in ehci_msm_detach() local
174 if (sc->sc_bus.bdev) { in ehci_msm_detach()
175 bdev = sc->sc_bus.bdev; in ehci_msm_detach()
176 device_detach(bdev); in ehci_msm_detach()
[all...]
H A Dusb_controller.c338 DPRINTF("%s: Controller shutdown\n", device_get_nameunit(bus->bdev)); in usb_shutdown()
351 device_get_nameunit(bus->bdev)); in usb_shutdown()
434 dev = bus->bdev; in usb_bus_detach()
451 bus->bdev = NULL; in usb_bus_detach()
472 if (udev == NULL || bus->bdev == NULL) in usb_bus_suspend()
486 bus_generic_shutdown(bus->bdev); in usb_bus_suspend()
492 device_printf(bus->bdev, "Could not unconfigure root HUB\n"); in usb_bus_suspend()
529 if (udev == NULL || bus->bdev == NULL) in usb_bus_resume()
538 USB_TAKE_CONTROLLER(device_get_parent(bus->bdev)); in usb_bus_resume()
559 device_printf(bus->bdev, "Could not configure root HUB\n"); in usb_bus_resume()
[all …]
H A Dgeneric_xhci.c102 sc->sc_bus.bdev = device_add_child(dev, "usbus", DEVICE_UNIT_ANY); in generic_xhci_attach()
103 if (sc->sc_bus.bdev == NULL) { in generic_xhci_attach()
109 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in generic_xhci_attach()
112 device_set_desc(sc->sc_bus.bdev, XHCI_HC_DEVSTR); in generic_xhci_attach()
138 err = device_probe_and_attach(sc->sc_bus.bdev); in generic_xhci_attach()
H A Dehci_fsl.c309 sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY); in fsl_ehci_attach()
310 if (!sc->sc_bus.bdev) { in fsl_ehci_attach()
320 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in fsl_ehci_attach()
355 err = device_probe_and_attach(sc->sc_bus.bdev); in fsl_ehci_attach()
402 if (sc->sc_bus.bdev) { in fsl_ehci_detach()
403 device_delete_child(self, sc->sc_bus.bdev); in fsl_ehci_detach()
404 sc->sc_bus.bdev = NULL; in fsl_ehci_detach()
H A Dehci_pci.c363 sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY); in ehci_pci_attach()
364 if (!sc->sc_bus.bdev) { in ehci_pci_attach()
368 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in ehci_pci_attach()
374 device_set_desc(sc->sc_bus.bdev, ehci_pci_match(self)); in ehci_pci_attach()
491 err = device_probe_and_attach(sc->sc_bus.bdev); in ehci_pci_attach()
566 device_printf(sc->sc_bus.bdev, "waiting for BIOS " in ehci_pci_take_controller()
578 device_printf(sc->sc_bus.bdev, in ehci_pci_take_controller()
H A Dgeneric_ehci.c103 sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY); in generic_ehci_attach()
104 if (!sc->sc_bus.bdev) { in generic_ehci_attach()
108 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in generic_ehci_attach()
124 err = device_probe_and_attach(sc->sc_bus.bdev); in generic_ehci_attach()
H A Dmusb_otg_allwinner.c497 sc->sc.sc_bus.bdev = device_add_child(dev, "usbus", DEVICE_UNIT_ANY); in awusbdrd_attach()
498 if (sc->sc.sc_bus.bdev == NULL) { in awusbdrd_attach()
502 device_set_ivars(sc->sc.sc_bus.bdev, &sc->sc.sc_bus); in awusbdrd_attach()
536 error = device_probe_and_attach(sc->sc.sc_bus.bdev); in awusbdrd_attach()
564 device_t bdev; in awusbdrd_detach() local
569 if (sc->sc.sc_bus.bdev != NULL) { in awusbdrd_detach()
570 bdev = sc->sc.sc_bus.bdev; in awusbdrd_detach()
571 device_detach(bdev); in awusbdrd_detach()
572 device_delete_child(dev, bdev); in awusbdrd_detach()
[all...]
H A Dohci_pci.c243 sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY); in ohci_pci_attach()
244 if (!sc->sc_bus.bdev) { in ohci_pci_attach()
248 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in ohci_pci_attach()
254 device_set_desc(sc->sc_bus.bdev, ohci_pci_match(self)); in ohci_pci_attach()
306 err = device_probe_and_attach(sc->sc_bus.bdev); in ohci_pci_attach()
H A Duhci_pci.c326 sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY); in uhci_pci_attach()
327 if (!sc->sc_bus.bdev) { in uhci_pci_attach()
331 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in uhci_pci_attach()
337 device_set_desc(sc->sc_bus.bdev, uhci_pci_match(self)); in uhci_pci_attach()
400 err = device_probe_and_attach(sc->sc_bus.bdev); in uhci_pci_attach()
/freebsd/lib/libusb/
H A Dlibusb10_hotplug.c56 struct libusb20_device *bdev = _bdev->os_priv; in libusb_hotplug_equal() local
58 if (adev->bus_number != bdev->bus_number) in libusb_hotplug_equal()
60 if (adev->device_address != bdev->device_address) in libusb_hotplug_equal()
62 if (memcmp(&adev->ddesc, &bdev->ddesc, sizeof(adev->ddesc))) in libusb_hotplug_equal()
64 if (memcmp(&adev->session_data, &bdev->session_data, sizeof(adev->session_data))) in libusb_hotplug_equal()
114 libusb_device *bdev; in libusb_hotplug_scan() local
135 TAILQ_FOREACH(bdev, &hotplug_devs, hotplug_entry) { in libusb_hotplug_scan()
136 if (libusb_hotplug_equal(adev, bdev)) in libusb_hotplug_scan()
139 if (bdev == NULL) { in libusb_hotplug_scan()
154 TAILQ_FOREACH(bdev, &ctx->hotplug_devs, hotplug_entry) { in libusb_hotplug_scan()
[all …]
/freebsd/sys/dev/agp/
H A Dagp_i810.c204 device_t bdev; /* bridge device */ member
759 device_t bdev; in agp_i810_probe() local
769 bdev = agp_i810_find_bridge(dev); in agp_i810_probe()
770 if (bdev == NULL) { in agp_i810_probe()
779 err = match->driver->check_active(bdev); in agp_i810_probe()
798 pci_read_config(sc->bdev, AGP_I810_MISCC, 2)); in agp_i810_dump_regs()
809 pci_read_config(sc->bdev, AGP_I830_GCC1, 1)); in agp_i830_dump_regs()
820 pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); in agp_i855_dump_regs()
831 pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); in agp_i915_dump_regs()
833 pci_read_config(sc->bdev, AGP_I915_MSA in agp_i915_dump_regs()
[all...]
/freebsd/sys/powerpc/ps3/
H A Dohci_ps3.c115 sc->sc_bus.bdev = device_add_child(dev, "usbus", DEVICE_UNIT_ANY); in ohci_ps3_attach()
116 if (!sc->sc_bus.bdev) { in ohci_ps3_attach()
121 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in ohci_ps3_attach()
141 err = device_probe_and_attach(sc->sc_bus.bdev); in ohci_ps3_attach()
H A Dehci_ps3.c125 sc->sc_bus.bdev = device_add_child(dev, "usbus", DEVICE_UNIT_ANY); in ehci_ps3_attach()
126 if (!sc->sc_bus.bdev) { in ehci_ps3_attach()
131 device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); in ehci_ps3_attach()
149 err = device_probe_and_attach(sc->sc_bus.bdev); in ehci_ps3_attach()

123