/linux-2.6.39/fs/ |
D | block_dev.c | 32 struct block_device bdev; member 45 return &BDEV_I(inode)->bdev; in I_BDEV() 67 static sector_t max_block(struct block_device *bdev) in max_block() argument 70 loff_t sz = i_size_read(bdev->bd_inode); in max_block() 73 unsigned int size = block_size(bdev); in max_block() 81 static void kill_bdev(struct block_device *bdev) in kill_bdev() argument 83 if (bdev->bd_inode->i_mapping->nrpages == 0) in kill_bdev() 86 truncate_inode_pages(bdev->bd_inode->i_mapping, 0); in kill_bdev() 89 int set_blocksize(struct block_device *bdev, int size) in set_blocksize() argument 96 if (size < bdev_logical_block_size(bdev)) in set_blocksize() [all …]
|
D | super.c | 459 struct super_block *get_super(struct block_device *bdev) in get_super() argument 463 if (!bdev) in get_super() 471 if (sb->s_bdev == bdev) { in get_super() 499 struct super_block *get_active_super(struct block_device *bdev) in get_active_super() argument 503 if (!bdev) in get_active_super() 511 if (sb->s_bdev == bdev) { in get_active_super() 774 struct block_device *bdev; in mount_bdev() local 782 bdev = blkdev_get_by_path(dev_name, mode, fs_type); in mount_bdev() 783 if (IS_ERR(bdev)) in mount_bdev() 784 return ERR_CAST(bdev); in mount_bdev() [all …]
|
/linux-2.6.39/block/ |
D | ioctl.c | 11 static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg) in blkpg_ioctl() argument 28 disk = bdev->bd_disk; in blkpg_ioctl() 29 if (bdev != bdev->bd_contains) in blkpg_ioctl() 47 mutex_lock(&bdev->bd_mutex); in blkpg_ioctl() 56 mutex_unlock(&bdev->bd_mutex); in blkpg_ioctl() 65 mutex_unlock(&bdev->bd_mutex); in blkpg_ioctl() 87 mutex_lock_nested(&bdev->bd_mutex, 1); in blkpg_ioctl() 89 mutex_unlock(&bdev->bd_mutex); in blkpg_ioctl() 99 static int blkdev_reread_part(struct block_device *bdev) in blkdev_reread_part() argument 101 struct gendisk *disk = bdev->bd_disk; in blkdev_reread_part() [all …]
|
D | compat_ioctl.c | 51 static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev, in compat_hdio_getgeo() argument 66 geo.start = get_start_sect(bdev); in compat_hdio_getgeo() 67 ret = disk->fops->getgeo(bdev, &geo); in compat_hdio_getgeo() 79 static int compat_hdio_ioctl(struct block_device *bdev, fmode_t mode, in compat_hdio_ioctl() argument 88 error = __blkdev_driver_ioctl(bdev, mode, in compat_hdio_ioctl() 119 static int compat_cdrom_read_audio(struct block_device *bdev, fmode_t mode, in compat_cdrom_read_audio() argument 142 return __blkdev_driver_ioctl(bdev, mode, cmd, in compat_cdrom_read_audio() 146 static int compat_cdrom_generic_command(struct block_device *bdev, fmode_t mode, in compat_cdrom_generic_command() argument 175 return __blkdev_driver_ioctl(bdev, mode, cmd, (unsigned long)cgc); in compat_cdrom_generic_command() 185 static int compat_blkpg_ioctl(struct block_device *bdev, fmode_t mode, in compat_blkpg_ioctl() argument [all …]
|
/linux-2.6.39/drivers/input/misc/ |
D | cobalt_btns.c | 51 struct buttons_dev *bdev = dev->private; in handle_buttons() local 56 status = ~readl(bdev->reg) >> 24; in handle_buttons() 58 for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { in handle_buttons() 60 if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { in handle_buttons() 62 input_report_key(input, bdev->keymap[i], 1); in handle_buttons() 66 if (bdev->count[i] >= BUTTONS_COUNT_THRESHOLD) { in handle_buttons() 68 input_report_key(input, bdev->keymap[i], 0); in handle_buttons() 71 bdev->count[i] = 0; in handle_buttons() 78 struct buttons_dev *bdev; in cobalt_buttons_probe() local 84 bdev = kzalloc(sizeof(struct buttons_dev), GFP_KERNEL); in cobalt_buttons_probe() [all …]
|
D | sgi_btns.c | 69 struct buttons_dev *bdev = dev->private; in handle_buttons() local 76 for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { in handle_buttons() 78 if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { in handle_buttons() 80 input_report_key(input, bdev->keymap[i], 1); in handle_buttons() 84 if (bdev->count[i] >= BUTTONS_COUNT_THRESHOLD) { in handle_buttons() 86 input_report_key(input, bdev->keymap[i], 0); in handle_buttons() 89 bdev->count[i] = 0; in handle_buttons() 96 struct buttons_dev *bdev; in sgi_buttons_probe() local 101 bdev = kzalloc(sizeof(struct buttons_dev), GFP_KERNEL); in sgi_buttons_probe() 103 if (!bdev || !poll_dev) { in sgi_buttons_probe() [all …]
|
/linux-2.6.39/drivers/gpu/drm/ttm/ |
D | ttm_bo.c | 67 static void ttm_mem_type_debug(struct ttm_bo_device *bdev, int mem_type) in ttm_mem_type_debug() argument 69 struct ttm_mem_type_manager *man = &bdev->man[mem_type]; in ttm_mem_type_debug() 99 ttm_mem_type_debug(bo->bdev, mem_type); in ttm_bo_mem_space_debug() 139 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_release_list() local 155 ttm_mem_global_free(bdev->glob->mem_glob, bo->acc_size); in ttm_bo_release_list() 174 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_add_to_lru() local 183 man = &bdev->man[bo->mem.mem_type]; in ttm_bo_add_to_lru() 324 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_add_ttm() local 332 if (bdev->need_dma32) in ttm_bo_add_ttm() 340 bo->ttm = ttm_tt_create(bdev, bo->num_pages << PAGE_SHIFT, in ttm_bo_add_ttm() [all …]
|
D | ttm_bo_util.c | 114 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 …]
|
D | ttm_bo_vm.c | 41 static struct ttm_buffer_object *ttm_bo_vm_lookup_rb(struct ttm_bo_device *bdev, in ttm_bo_vm_lookup_rb() argument 45 struct rb_node *cur = bdev->addr_space_rb.rb_node; in ttm_bo_vm_lookup_rb() 76 struct ttm_bo_device *bdev = bo->bdev; in ttm_bo_vm_fault() local 87 &bdev->man[bo->mem.mem_type]; in ttm_bo_vm_fault() 102 if (bdev->driver->fault_reserve_notify) { in ttm_bo_vm_fault() 103 ret = bdev->driver->fault_reserve_notify(bo); in ttm_bo_vm_fault() 123 spin_lock(&bdev->fence_lock); in ttm_bo_vm_fault() 126 spin_unlock(&bdev->fence_lock); in ttm_bo_vm_fault() 133 spin_unlock(&bdev->fence_lock); in ttm_bo_vm_fault() 246 struct ttm_bo_device *bdev) in ttm_bo_mmap() argument [all …]
|
/linux-2.6.39/drivers/input/keyboard/ |
D | gpio_keys_polled.c | 69 struct gpio_keys_polled_dev *bdev = dev->private; in gpio_keys_polled_poll() local 70 struct gpio_keys_platform_data *pdata = bdev->pdata; in gpio_keys_polled_poll() 74 for (i = 0; i < bdev->pdata->nbuttons; i++) { in gpio_keys_polled_poll() 75 struct gpio_keys_button_data *bdata = &bdev->data[i]; in gpio_keys_polled_poll() 87 struct gpio_keys_polled_dev *bdev = dev->private; in gpio_keys_polled_open() local 88 struct gpio_keys_platform_data *pdata = bdev->pdata; in gpio_keys_polled_open() 91 pdata->enable(bdev->dev); in gpio_keys_polled_open() 96 struct gpio_keys_polled_dev *bdev = dev->private; in gpio_keys_polled_close() local 97 struct gpio_keys_platform_data *pdata = bdev->pdata; in gpio_keys_polled_close() 100 pdata->disable(bdev->dev); in gpio_keys_polled_close() [all …]
|
/linux-2.6.39/drivers/staging/comedi/drivers/ |
D | comedi_bond.c | 279 struct BondedDevice *bdev = devpriv->devs[i]; in bonding_dio_insn_bits() local 284 unsigned int subdevMask = ((1 << bdev->nchans) - 1); in bonding_dio_insn_bits() 288 if (bdev->nchans >= LSAMPL_BITS) in bonding_dio_insn_bits() 295 if (comedi_dio_bitfield(bdev->dev, bdev->subdev, writeMask, in bonding_dio_insn_bits() 306 num_done += bdev->nchans; in bonding_dio_insn_bits() 318 struct BondedDevice *bdev; in bonding_dio_insn_config() local 322 bdev = devpriv->chanIdDevMap[chan]; in bonding_dio_insn_config() 347 chan -= bdev->chanid_offset; in bonding_dio_insn_config() 348 ret = comedi_dio_config(bdev->dev, bdev->subdev, chan, io); in bonding_dio_insn_config() 381 struct BondedDevice *bdev = NULL; in doDevConfig() local [all …]
|
/linux-2.6.39/drivers/s390/block/ |
D | dasd_ioctl.c | 43 dasd_ioctl_enable(struct block_device *bdev) in dasd_ioctl_enable() argument 50 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_enable() 56 mutex_lock(&bdev->bd_mutex); in dasd_ioctl_enable() 57 i_size_write(bdev->bd_inode, in dasd_ioctl_enable() 59 mutex_unlock(&bdev->bd_mutex); in dasd_ioctl_enable() 69 dasd_ioctl_disable(struct block_device *bdev) in dasd_ioctl_disable() argument 76 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_disable() 92 mutex_lock(&bdev->bd_mutex); in dasd_ioctl_disable() 93 i_size_write(bdev->bd_inode, 0); in dasd_ioctl_disable() 94 mutex_unlock(&bdev->bd_mutex); in dasd_ioctl_disable() [all …]
|
D | dasd_genhd.c | 103 struct block_device *bdev; in dasd_scan_partitions() local 105 bdev = bdget_disk(block->gdp, 0); in dasd_scan_partitions() 106 if (!bdev || blkdev_get(bdev, FMODE_READ, NULL) < 0) in dasd_scan_partitions() 112 ioctl_by_bdev(bdev, BLKRRPART, 0); in dasd_scan_partitions() 123 block->bdev = bdev; in dasd_scan_partitions() 136 struct block_device *bdev; in dasd_destroy_partitions() local 142 bdev = block->bdev; in dasd_destroy_partitions() 143 block->bdev = NULL; in dasd_destroy_partitions() 155 ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); in dasd_destroy_partitions() 159 blkdev_put(bdev, FMODE_READ); in dasd_destroy_partitions()
|
/linux-2.6.39/drivers/char/ |
D | raw.c | 50 struct block_device *bdev; in raw_open() local 63 bdev = raw_devices[minor].binding; in raw_open() 65 if (!bdev) in raw_open() 67 igrab(bdev->bd_inode); in raw_open() 68 err = blkdev_get(bdev, filp->f_mode | FMODE_EXCL, raw_open); in raw_open() 71 err = set_blocksize(bdev, bdev_logical_block_size(bdev)); in raw_open() 75 filp->f_mapping = bdev->bd_inode->i_mapping; in raw_open() 78 bdev->bd_inode->i_mapping; in raw_open() 79 filp->private_data = bdev; in raw_open() 84 blkdev_put(bdev, filp->f_mode | FMODE_EXCL); in raw_open() [all …]
|
/linux-2.6.39/include/drm/ttm/ |
D | ttm_bo_api.h | 203 struct ttm_bo_device *bdev; member 414 extern int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev); 421 extern void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev, 485 extern int ttm_bo_init(struct ttm_bo_device *bdev, 524 extern int ttm_bo_create(struct ttm_bo_device *bdev, 564 extern int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type, 593 extern int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type); 614 extern int ttm_bo_evict_mm(struct ttm_bo_device *bdev, unsigned mem_type); 694 struct ttm_bo_device *bdev); 717 extern ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp, [all …]
|
D | ttm_bo_driver.h | 116 struct ttm_bo_device *bdev; member 301 struct ttm_bo_device *bdev; member 362 (struct ttm_bo_device *bdev); 376 int (*invalidate_caches) (struct ttm_bo_device *bdev, uint32_t flags); 377 int (*init_mem_type) (struct ttm_bo_device *bdev, uint32_t type, 460 int (*io_mem_reserve)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem); 461 void (*io_mem_free)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem); 615 extern struct ttm_tt *ttm_tt_create(struct ttm_bo_device *bdev, 732 extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev, 783 extern int ttm_bo_device_release(struct ttm_bo_device *bdev); [all …]
|
/linux-2.6.39/drivers/staging/gma500/ |
D | psb_buffer.c | 47 static int psb_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, in psb_init_mem_type() argument 52 container_of(bdev, struct drm_psb_private, bdev); in psb_init_mem_type() 128 static int psb_invalidate_caches(struct ttm_bo_device *bdev, in psb_invalidate_caches() argument 237 struct ttm_bo_device *bdev = backend->bdev; in drm_psb_tbe_unbind() local 239 container_of(bdev, struct drm_psb_private, bdev); in drm_psb_tbe_unbind() 267 struct ttm_bo_device *bdev = backend->bdev; in drm_psb_tbe_bind() local 269 container_of(bdev, struct drm_psb_private, bdev); in drm_psb_tbe_bind() 273 struct ttm_mem_type_manager *man = &bdev->man[bo_mem->mem_type]; in drm_psb_tbe_bind() 341 static struct ttm_backend *drm_psb_tbe_init(struct ttm_bo_device *bdev) in drm_psb_tbe_init() argument 350 psb_be->base.bdev = bdev; in drm_psb_tbe_init() [all …]
|
D | psb_ttm_placement_user.c | 51 static size_t ttm_pl_size(struct ttm_bo_device *bdev, unsigned long num_pages) in ttm_pl_size() argument 57 pl_bo_size = bdev->glob->ttm_bo_extra_size + in ttm_pl_size() 61 return bdev->glob->ttm_bo_size + 2 * page_array_size; in ttm_pl_size() 169 static int ttm_bo_create_private(struct ttm_bo_device *bdev, in ttm_bo_create_private() argument 180 struct ttm_mem_global *mem_glob = bdev->glob->mem_glob; in ttm_bo_create_private() 184 ttm_bo_size(bdev->glob, (size + PAGE_SIZE - 1) >> PAGE_SHIFT); in ttm_bo_create_private() 196 ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment, in ttm_bo_create_private() 231 int ttm_buffer_object_create(struct ttm_bo_device *bdev, in ttm_buffer_object_create() argument 250 ret = ttm_bo_create_private(bdev, in ttm_buffer_object_create() 265 struct ttm_bo_device *bdev, in ttm_pl_create_ioctl() argument [all …]
|
/linux-2.6.39/drivers/md/ |
D | dm-table.c | 313 if (dd->dm_dev.bdev->bd_dev == dev) in find_device() 326 struct block_device *bdev; in open_dev() local 330 BUG_ON(d->dm_dev.bdev); in open_dev() 332 bdev = blkdev_get_by_dev(dev, d->dm_dev.mode | FMODE_EXCL, _claim_ptr); in open_dev() 333 if (IS_ERR(bdev)) in open_dev() 334 return PTR_ERR(bdev); in open_dev() 336 r = bd_link_disk_holder(bdev, dm_disk(md)); in open_dev() 338 blkdev_put(bdev, d->dm_dev.mode | FMODE_EXCL); in open_dev() 342 d->dm_dev.bdev = bdev; in open_dev() 351 if (!d->dm_dev.bdev) in close_dev() [all …]
|
D | dm-snap.c | 269 struct block_device *bdev; member 313 static unsigned origin_hash(struct block_device *bdev) in origin_hash() argument 315 return bdev->bd_dev & ORIGIN_MASK; in origin_hash() 325 if (bdev_equal(o->bdev, origin)) in __lookup_origin() 333 struct list_head *sl = &_origins[origin_hash(o->bdev)]; in __insert_origin() 362 o = __lookup_origin(snap->origin->bdev); in __find_snapshots_sharing_cow() 369 if (!bdev_equal(s->cow->bdev, snap->cow->bdev)) in __find_snapshots_sharing_cow() 460 struct block_device *bdev = snap->origin->bdev; in register_snapshot() local 475 o = __lookup_origin(bdev); in register_snapshot() 484 o->bdev = bdev; in register_snapshot() [all …]
|
/linux-2.6.39/drivers/gpu/drm/radeon/ |
D | radeon_ttm.c | 48 static struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev) in radeon_get_rdev() argument 53 mman = container_of(bdev, struct radeon_mman, bdev); in radeon_get_rdev() 120 radeon_create_ttm_backend_entry(struct ttm_bo_device *bdev) in radeon_create_ttm_backend_entry() argument 124 rdev = radeon_get_rdev(bdev); in radeon_create_ttm_backend_entry() 127 return ttm_agp_backend_init(bdev, rdev->ddev->agp->bridge); in radeon_create_ttm_backend_entry() 135 static int radeon_invalidate_caches(struct ttm_bo_device *bdev, uint32_t flags) in radeon_invalidate_caches() argument 140 static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, in radeon_init_mem_type() argument 145 rdev = radeon_get_rdev(bdev); in radeon_init_mem_type() 246 rdev = radeon_get_rdev(bo->bdev); in radeon_move_blit() 300 rdev = radeon_get_rdev(bo->bdev); in radeon_move_vram_ram() [all …]
|
/linux-2.6.39/fs/udf/ |
D | lowlevel.c | 32 struct block_device *bdev = sb->s_bdev; in udf_get_last_session() local 37 i = ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long)&ms_info); in udf_get_last_session() 52 struct block_device *bdev = sb->s_bdev; in udf_get_last_block() local 59 if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock) || in udf_get_last_block() 61 lblock = bdev->bd_inode->i_size >> sb->s_blocksize_bits; in udf_get_last_block()
|
/linux-2.6.39/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_buffer.c | 162 struct ttm_backend *vmw_ttm_backend_init(struct ttm_bo_device *bdev) in vmw_ttm_backend_init() argument 171 vmw_be->dev_priv = container_of(bdev, struct vmw_private, bdev); in vmw_ttm_backend_init() 176 int vmw_invalidate_caches(struct ttm_bo_device *bdev, uint32_t flags) in vmw_invalidate_caches() argument 181 int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, in vmw_init_mem_type() argument 234 static int vmw_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) in vmw_ttm_io_mem_reserve() argument 236 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in vmw_ttm_io_mem_reserve() 237 struct vmw_private *dev_priv = container_of(bdev, struct vmw_private, bdev); in vmw_ttm_io_mem_reserve() 261 static void vmw_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) in vmw_ttm_io_mem_free() argument
|
/linux-2.6.39/fs/partitions/ |
D | efi.c | 144 static u64 last_lba(struct block_device *bdev) in last_lba() argument 146 if (!bdev || !bdev->bd_inode) in last_lba() 148 return div_u64(bdev->bd_inode->i_size, in last_lba() 149 bdev_logical_block_size(bdev)) - 1ULL; in last_lba() 196 struct block_device *bdev = state->bdev; in read_lba() local 197 sector_t n = lba * (bdev_logical_block_size(bdev) / 512); in read_lba() 199 if (!buffer || lba > last_lba(bdev)) in read_lba() 268 unsigned ssz = bdev_logical_block_size(state->bdev); in alloc_read_gpt_header() 337 lastlba = last_lba(state->bdev); in is_gpt_valid() 527 lastlba = last_lba(state->bdev); in find_valid_gpt() [all …]
|
/linux-2.6.39/fs/logfs/ |
D | dev_bdev.c | 21 static int sync_request(struct page *page, struct block_device *bdev, int rw) in sync_request() argument 35 bio.bi_bdev = bdev; in sync_request() 49 struct block_device *bdev = logfs_super(sb)->s_bdev; in bdev_readpage() local 52 err = sync_request(page, bdev, READ); in bdev_readpage() 293 struct block_device *bdev = logfs_super(sb)->s_bdev; in bdev_write_sb() local 296 return sync_request(page, bdev, WRITE); in bdev_write_sb() 324 struct block_device *bdev; in logfs_get_sb_bdev() local 326 bdev = blkdev_get_by_path(devname, FMODE_READ|FMODE_WRITE|FMODE_EXCL, in logfs_get_sb_bdev() 328 if (IS_ERR(bdev)) in logfs_get_sb_bdev() 329 return PTR_ERR(bdev); in logfs_get_sb_bdev() [all …]
|