/Linux-v5.15/lib/ |
D | btree.c | 135 static void dec_key(struct btree_geo *geo, unsigned long *key) in dec_key() argument 140 for (i = geo->keylen - 1; i >= 0; i--) { in dec_key() 148 static unsigned long *bkey(struct btree_geo *geo, unsigned long *node, int n) in bkey() argument 150 return &node[n * geo->keylen]; in bkey() 153 static void *bval(struct btree_geo *geo, unsigned long *node, int n) in bval() argument 155 return (void *)node[geo->no_longs + n]; in bval() 158 static void setkey(struct btree_geo *geo, unsigned long *node, int n, in setkey() argument 161 longcpy(bkey(geo, node, n), key, geo->keylen); in setkey() 164 static void setval(struct btree_geo *geo, unsigned long *node, int n, in setval() argument 167 node[geo->no_longs + n] = (unsigned long) val; in setval() [all …]
|
/Linux-v5.15/drivers/net/wireless/intel/ipw2x00/ |
D | libipw_geo.c | 37 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0) in libipw_is_valid_channel() 41 for (i = 0; i < ieee->geo.bg_channels; i++) in libipw_is_valid_channel() 45 if ((ieee->geo.bg[i].channel == channel) && in libipw_is_valid_channel() 46 !(ieee->geo.bg[i].flags & LIBIPW_CH_INVALID) && in libipw_is_valid_channel() 48 !(ieee->geo.bg[i].flags & LIBIPW_CH_B_ONLY))) in libipw_is_valid_channel() 52 for (i = 0; i < ieee->geo.a_channels; i++) in libipw_is_valid_channel() 53 if ((ieee->geo.a[i].channel == channel) && in libipw_is_valid_channel() 54 !(ieee->geo.a[i].flags & LIBIPW_CH_INVALID)) in libipw_is_valid_channel() 66 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0) in libipw_channel_to_index() 70 for (i = 0; i < ieee->geo.bg_channels; i++) in libipw_channel_to_index() [all …]
|
/Linux-v5.15/fs/xfs/libxfs/ |
D | xfs_dir2.h | 125 xfs_dir2_byte_to_db(struct xfs_da_geometry *geo, xfs_dir2_off_t by) in xfs_dir2_byte_to_db() argument 127 return (xfs_dir2_db_t)(by >> geo->blklog); in xfs_dir2_byte_to_db() 134 xfs_dir2_dataptr_to_db(struct xfs_da_geometry *geo, xfs_dir2_dataptr_t dp) in xfs_dir2_dataptr_to_db() argument 136 return xfs_dir2_byte_to_db(geo, xfs_dir2_dataptr_to_byte(dp)); in xfs_dir2_dataptr_to_db() 143 xfs_dir2_byte_to_off(struct xfs_da_geometry *geo, xfs_dir2_off_t by) in xfs_dir2_byte_to_off() argument 145 return (xfs_dir2_data_aoff_t)(by & (geo->blksize - 1)); in xfs_dir2_byte_to_off() 152 xfs_dir2_dataptr_to_off(struct xfs_da_geometry *geo, xfs_dir2_dataptr_t dp) in xfs_dir2_dataptr_to_off() argument 154 return xfs_dir2_byte_to_off(geo, xfs_dir2_dataptr_to_byte(dp)); in xfs_dir2_dataptr_to_off() 161 xfs_dir2_db_off_to_byte(struct xfs_da_geometry *geo, xfs_dir2_db_t db, in xfs_dir2_db_off_to_byte() argument 164 return ((xfs_dir2_off_t)db << geo->blklog) + o; in xfs_dir2_db_off_to_byte() [all …]
|
D | xfs_sb.c | 1065 struct xfs_fsop_geom *geo, in xfs_fs_geometry() argument 1070 memset(geo, 0, sizeof(struct xfs_fsop_geom)); in xfs_fs_geometry() 1072 geo->blocksize = sbp->sb_blocksize; in xfs_fs_geometry() 1073 geo->rtextsize = sbp->sb_rextsize; in xfs_fs_geometry() 1074 geo->agblocks = sbp->sb_agblocks; in xfs_fs_geometry() 1075 geo->agcount = sbp->sb_agcount; in xfs_fs_geometry() 1076 geo->logblocks = sbp->sb_logblocks; in xfs_fs_geometry() 1077 geo->sectsize = sbp->sb_sectsize; in xfs_fs_geometry() 1078 geo->inodesize = sbp->sb_inodesize; in xfs_fs_geometry() 1079 geo->imaxpct = sbp->sb_imax_pct; in xfs_fs_geometry() [all …]
|
D | xfs_dir2_leaf.c | 145 struct xfs_da_geometry *geo = mp->m_dir_geo; in xfs_dir3_leaf_check_int() local 150 ltp = xfs_dir2_leaf_tail_p(geo, leaf); in xfs_dir3_leaf_check_int() 157 if (hdr->count > geo->leaf_max_ents) in xfs_dir3_leaf_check_int() 358 ASSERT(bno >= xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET) && in xfs_dir3_leaf_get_buf() 359 bno < xfs_dir2_byte_to_db(args->geo, XFS_DIR2_FREE_OFFSET)); in xfs_dir3_leaf_get_buf() 361 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, bno), in xfs_dir3_leaf_get_buf() 411 ldb = xfs_dir2_da_to_db(args->geo, blkno); in xfs_dir2_block_to_leaf() 412 ASSERT(ldb == xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET)); in xfs_dir2_block_to_leaf() 423 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_to_leaf() 451 (xfs_dir2_data_aoff_t)((char *)hdr + args->geo->blksize - in xfs_dir2_block_to_leaf() [all …]
|
D | xfs_attr_leaf.c | 94 struct xfs_da_geometry *geo, in xfs_attr3_leaf_firstused_from_disk() argument 114 ASSERT(geo->blksize > USHRT_MAX); in xfs_attr3_leaf_firstused_from_disk() 115 to->firstused = geo->blksize; in xfs_attr3_leaf_firstused_from_disk() 121 struct xfs_da_geometry *geo, in xfs_attr3_leaf_firstused_to_disk() argument 138 ASSERT(from->firstused == geo->blksize); in xfs_attr3_leaf_firstused_to_disk() 152 struct xfs_da_geometry *geo, in xfs_attr3_leaf_hdr_from_disk() argument 169 xfs_attr3_leaf_firstused_from_disk(geo, to, from); in xfs_attr3_leaf_hdr_from_disk() 183 xfs_attr3_leaf_firstused_from_disk(geo, to, from); in xfs_attr3_leaf_hdr_from_disk() 194 struct xfs_da_geometry *geo, in xfs_attr3_leaf_hdr_to_disk() argument 211 xfs_attr3_leaf_firstused_to_disk(geo, to, from); in xfs_attr3_leaf_hdr_to_disk() [all …]
|
D | xfs_dir2_node.c | 40 xfs_dir2_db_to_fdb(struct xfs_da_geometry *geo, xfs_dir2_db_t db) in xfs_dir2_db_to_fdb() argument 42 return xfs_dir2_byte_to_db(geo, XFS_DIR2_FREE_OFFSET) + in xfs_dir2_db_to_fdb() 43 (db / geo->free_max_bests); in xfs_dir2_db_to_fdb() 50 xfs_dir2_db_to_fdindex(struct xfs_da_geometry *geo, xfs_dir2_db_t db) in xfs_dir2_db_to_fdindex() argument 52 return db % geo->free_max_bests; in xfs_dir2_db_to_fdindex() 329 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, fbno), in xfs_dir3_free_get_buf() 396 args->geo->free_hdr_size - 1); in xfs_dir2_free_log_header() 432 ASSERT(fdb == xfs_dir2_byte_to_db(args->geo, XFS_DIR2_FREE_OFFSET)); in xfs_dir2_leaf_to_node() 442 ltp = xfs_dir2_leaf_tail_p(args->geo, leaf); in xfs_dir2_leaf_to_node() 444 (uint)dp->i_disk_size / args->geo->blksize) { in xfs_dir2_leaf_to_node() [all …]
|
D | xfs_dir2_data.c | 85 struct xfs_da_geometry *geo) in xfs_dir2_data_max_leaf_entries() argument 87 return (geo->blksize - sizeof(struct xfs_dir2_block_tail) - in xfs_dir2_data_max_leaf_entries() 88 geo->data_entry_offset) / in xfs_dir2_data_max_leaf_entries() 118 struct xfs_da_geometry *geo = mp->m_dir_geo; in __xfs_dir3_data_check() local 127 offset = geo->data_entry_offset; in __xfs_dir3_data_check() 132 btp = xfs_dir2_block_tail_p(geo, hdr); in __xfs_dir3_data_check() 136 xfs_dir2_data_max_leaf_entries(geo)) in __xfs_dir3_data_check() 145 end = xfs_dir3_data_end_offset(geo, hdr); in __xfs_dir3_data_check() 233 addr = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in __xfs_dir3_data_check() 643 struct xfs_da_geometry *geo = mp->m_dir_geo; in xfs_dir2_data_freescan() local [all …]
|
D | xfs_dir2.c | 230 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_init() 267 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_createname() 363 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_lookup() 435 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_removename() 496 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_replace() 572 count = args->geo->fsbcount; in xfs_dir2_grow_inode() 578 *dbp = xfs_dir2_da_to_db(args->geo, (xfs_dablk_t)bno); in xfs_dir2_grow_inode() 608 rval = XFS_FSB_TO_B(args->dp->i_mount, last) == args->geo->blksize; in xfs_dir2_isblock() 611 args->dp->i_disk_size != args->geo->blksize)) in xfs_dir2_isblock() 630 *vp = last == args->geo->leafblk + args->geo->fsbcount; in xfs_dir2_isleaf() [all …]
|
D | xfs_dir2_block.c | 393 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_addname() 653 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup() 659 xfs_dir2_dataptr_to_off(args->geo, in xfs_dir2_block_lookup() 704 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_lookup_int() 742 ((char *)hdr + xfs_dir2_dataptr_to_off(args->geo, addr)); in xfs_dir2_block_lookup_int() 807 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_removename() 813 xfs_dir2_dataptr_to_off(args->geo, in xfs_dir2_block_removename() 882 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_replace() 888 xfs_dir2_dataptr_to_off(args->geo, in xfs_dir2_block_replace() 954 ltp = xfs_dir2_leaf_tail_p(args->geo, leaf); in xfs_dir2_leaf_to_block() [all …]
|
D | xfs_da_btree.c | 460 XFS_DA_LOGRANGE(node, &node->hdr, args->geo->node_hdr_size)); in xfs_da3_node_create() 727 (args->whichfork == XFS_DATA_FORK) ? args->geo->leafblk : 0, in xfs_da3_root_split() 745 ASSERT(blk1->blkno >= args->geo->leafblk && in xfs_da3_root_split() 746 blk1->blkno < args->geo->freeblk); in xfs_da3_root_split() 747 ASSERT(blk2->blkno >= args->geo->leafblk && in xfs_da3_root_split() 748 blk2->blkno < args->geo->freeblk); in xfs_da3_root_split() 792 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split() 968 state->args->geo->node_hdr_size)); in xfs_da3_node_rebalance() 973 state->args->geo->node_hdr_size + in xfs_da3_node_rebalance() 1024 ASSERT(newblk->blkno >= state->args->geo->leafblk && in xfs_da3_node_add() [all …]
|
D | xfs_dir2_sf.c | 186 struct xfs_da_geometry *geo; in xfs_dir2_block_sfsize() local 189 geo = mp->m_dir_geo; in xfs_dir2_block_sfsize() 198 btp = xfs_dir2_block_tail_p(geo, hdr); in xfs_dir2_block_sfsize() 211 xfs_dir2_dataptr_to_off(geo, addr)); in xfs_dir2_block_sfsize() 269 unsigned int offset = args->geo->data_entry_offset; in xfs_dir2_block_to_sf() 286 end = xfs_dir3_data_end_offset(args->geo, bp->b_addr); in xfs_dir2_block_to_sf() 332 error = xfs_dir2_shrink_inode(args, args->geo->datablk, bp); in xfs_dir2_block_to_sf() 541 for (offset = args->geo->data_first_offset, in xfs_dir2_sf_addname_hard() 619 offset = args->geo->data_first_offset; in xfs_dir2_sf_addname_pick() 646 if (used + (holefit ? 0 : size) > args->geo->blksize) in xfs_dir2_sf_addname_pick() [all …]
|
/Linux-v5.15/fs/xfs/ |
D | xfs_dir2_readdir.c | 58 struct xfs_da_geometry *geo = args->geo; in xfs_dir2_sf_getdents() local 69 if (xfs_dir2_dataptr_to_db(geo, ctx->pos) > geo->datablk) in xfs_dir2_sf_getdents() 77 dot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xfs_dir2_sf_getdents() 78 geo->data_entry_offset); in xfs_dir2_sf_getdents() 79 dotdot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xfs_dir2_sf_getdents() 80 geo->data_entry_offset + in xfs_dir2_sf_getdents() 109 off = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xfs_dir2_sf_getdents() 130 ctx->pos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk + 1, 0) & in xfs_dir2_sf_getdents() 148 struct xfs_da_geometry *geo = args->geo; in xfs_dir2_block_getdents() local 156 if (xfs_dir2_dataptr_to_db(geo, ctx->pos) > geo->datablk) in xfs_dir2_block_getdents() [all …]
|
D | xfs_health.c | 294 struct xfs_fsop_geom *geo, in xfgeo_health_tick() argument 300 geo->checked |= m->ioctl_mask; in xfgeo_health_tick() 302 geo->sick |= m->ioctl_mask; in xfgeo_health_tick() 309 struct xfs_fsop_geom *geo) in xfs_fsop_geom_health() argument 315 geo->sick = 0; in xfs_fsop_geom_health() 316 geo->checked = 0; in xfs_fsop_geom_health() 320 xfgeo_health_tick(geo, sick, checked, m); in xfs_fsop_geom_health() 324 xfgeo_health_tick(geo, sick, checked, m); in xfs_fsop_geom_health()
|
/Linux-v5.15/block/partitions/ |
D | ibm.c | 31 static sector_t cchh2blk(struct vtoc_cchh *ptr, struct hd_geometry *geo) in cchh2blk() argument 41 return cyl * geo->heads * geo->sectors + in cchh2blk() 42 head * geo->sectors; in cchh2blk() 49 static sector_t cchhb2blk(struct vtoc_cchhb *ptr, struct hd_geometry *geo) in cchhb2blk() argument 59 return cyl * geo->heads * geo->sectors + in cchhb2blk() 60 head * geo->sectors + in cchhb2blk() 66 struct hd_geometry *geo, in find_label() argument 134 struct hd_geometry *geo, in find_vol1_partitions() argument 155 blk = cchhb2blk(&label->vol.vtoc, geo) + 1; in find_vol1_partitions() 175 offset = cchh2blk(&f1.DS1EXT1.llimit, geo); in find_vol1_partitions() [all …]
|
/Linux-v5.15/drivers/media/pci/bt8xx/ |
D | bttv-risc.c | 326 bttv_calc_geo_old(struct bttv *btv, struct bttv_geometry *geo, in bttv_calc_geo_old() argument 346 geo->hscale = ((totalwidth*4096UL)/xsf-4096); in bttv_calc_geo_old() 347 geo->hdelay = tvnorm->hdelayx1; in bttv_calc_geo_old() 348 geo->hdelay = (geo->hdelay*width)/swidth; in bttv_calc_geo_old() 349 geo->hdelay &= 0x3fe; in bttv_calc_geo_old() 351 geo->vscale = (0x10000UL-sr) & 0x1fff; in bttv_calc_geo_old() 352 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | in bttv_calc_geo_old() 354 geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0; in bttv_calc_geo_old() 355 geo->vdelay = vdelay; in bttv_calc_geo_old() 356 geo->width = width; in bttv_calc_geo_old() [all …]
|
/Linux-v5.15/drivers/mtd/nand/raw/gpmi-nand/ |
D | gpmi-nand.c | 200 struct bch_geometry *geo = &this->bch_geometry; in gpmi_dump_info() local 228 geo->gf_len, in gpmi_dump_info() 229 geo->ecc_strength, in gpmi_dump_info() 230 geo->page_size, in gpmi_dump_info() 231 geo->metadata_size, in gpmi_dump_info() 232 geo->ecc_chunk_size, in gpmi_dump_info() 233 geo->ecc_chunk_count, in gpmi_dump_info() 234 geo->payload_size, in gpmi_dump_info() 235 geo->auxiliary_size, in gpmi_dump_info() 236 geo->auxiliary_status_offset, in gpmi_dump_info() [all …]
|
/Linux-v5.15/drivers/md/ |
D | raid10.c | 94 int size = offsetof(struct r10bio, devs[conf->geo.raid_disks]); in r10bio_pool_alloc() 241 for (i = 0; i < conf->geo.raid_disks; i++) { in put_all_bios() 332 for (slot = 0; slot < conf->geo.raid_disks; slot++) { in find_bio_disk() 562 static void __raid10_find_phys(struct geom *geo, struct r10bio *r10bio) in __raid10_find_phys() argument 572 last_far_set_start = (geo->raid_disks / geo->far_set_size) - 1; in __raid10_find_phys() 573 last_far_set_start *= geo->far_set_size; in __raid10_find_phys() 575 last_far_set_size = geo->far_set_size; in __raid10_find_phys() 576 last_far_set_size += (geo->raid_disks % geo->far_set_size); in __raid10_find_phys() 579 chunk = r10bio->sector >> geo->chunk_shift; in __raid10_find_phys() 580 sector = r10bio->sector & geo->chunk_mask; in __raid10_find_phys() [all …]
|
/Linux-v5.15/drivers/media/platform/ |
D | sh_vou.c | 506 static void vou_adjust_input(struct sh_vou_geometry *geo, v4l2_std_id std) in vou_adjust_input() argument 518 v4l_bound_align_image(&geo->in_width, in vou_adjust_input() 520 &geo->in_height, in vou_adjust_input() 526 unsigned int found = geo->output.width * vou_scale_h_den[i] / in vou_adjust_input() 533 err = abs(found - geo->in_width); in vou_adjust_input() 543 geo->in_width = best; in vou_adjust_input() 544 geo->scale_idx_h = idx; in vou_adjust_input() 551 unsigned int found = geo->output.height * vou_scale_v_den[i] / in vou_adjust_input() 558 err = abs(found - geo->in_height); in vou_adjust_input() 568 geo->in_height = best; in vou_adjust_input() [all …]
|
/Linux-v5.15/include/linux/ |
D | btree.h | 100 void *btree_lookup(struct btree_head *head, struct btree_geo *geo, 115 int __must_check btree_insert(struct btree_head *head, struct btree_geo *geo, 128 int btree_update(struct btree_head *head, struct btree_geo *geo, 140 void *btree_remove(struct btree_head *head, struct btree_geo *geo, 159 struct btree_geo *geo, gfp_t gfp); 172 void *btree_last(struct btree_head *head, struct btree_geo *geo, 186 void *btree_get_prev(struct btree_head *head, struct btree_geo *geo, 191 size_t btree_visitor(struct btree_head *head, struct btree_geo *geo, 199 size_t btree_grim_visitor(struct btree_head *head, struct btree_geo *geo,
|
/Linux-v5.15/drivers/block/rsxx/ |
D | dev.c | 73 static int rsxx_getgeo(struct block_device *bdev, struct hd_geometry *geo) in rsxx_getgeo() argument 83 geo->heads = 64; in rsxx_getgeo() 84 geo->sectors = 16; in rsxx_getgeo() 85 do_div(blocks, (geo->heads * geo->sectors)); in rsxx_getgeo() 86 geo->cylinders = blocks; in rsxx_getgeo() 88 geo->heads = 0; in rsxx_getgeo() 89 geo->sectors = 0; in rsxx_getgeo() 90 geo->cylinders = 0; in rsxx_getgeo()
|
/Linux-v5.15/fs/xfs/scrub/ |
D | dir.c | 207 struct xfs_da_geometry *geo = mp->m_dir_geo; in xchk_dir_rec() local 241 db = xfs_dir2_dataptr_to_db(geo, ptr); in xchk_dir_rec() 242 off = xfs_dir2_dataptr_to_off(geo, ptr); in xchk_dir_rec() 243 rec_bno = xfs_dir2_db_to_da(geo, db); in xchk_dir_rec() 245 if (rec_bno >= geo->leafblk) { in xchk_dir_rec() 266 iter_off = geo->data_entry_offset; in xchk_dir_rec() 267 end = xfs_dir3_data_end_offset(geo, bp->b_addr); in xchk_dir_rec() 507 struct xfs_da_geometry *geo = sc->mp->m_dir_geo; in xchk_directory_leaf1_bestfree() local 525 ltp = xfs_dir2_leaf_tail_p(geo, leaf); in xchk_directory_leaf1_bestfree() 540 if (bestcount != xfs_dir2_byte_to_db(geo, sc->ip->i_disk_size)) { in xchk_directory_leaf1_bestfree() [all …]
|
/Linux-v5.15/block/ |
D | ioctl.c | 366 struct hd_geometry geo; in blkdev_getgeo() local 378 memset(&geo, 0, sizeof(geo)); in blkdev_getgeo() 379 geo.start = get_start_sect(bdev); in blkdev_getgeo() 380 ret = disk->fops->getgeo(bdev, &geo); in blkdev_getgeo() 383 if (copy_to_user(argp, &geo, sizeof(geo))) in blkdev_getgeo() 400 struct hd_geometry geo; in compat_hdio_getgeo() local 408 memset(&geo, 0, sizeof(geo)); in compat_hdio_getgeo() 413 geo.start = get_start_sect(bdev); in compat_hdio_getgeo() 414 ret = disk->fops->getgeo(bdev, &geo); in compat_hdio_getgeo() 418 ret = copy_to_user(ugeo, &geo, 4); in compat_hdio_getgeo() [all …]
|
/Linux-v5.15/arch/m68k/emu/ |
D | nfblock.c | 82 static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo) in nfhd_getgeo() argument 86 geo->cylinders = dev->blocks >> (6 - dev->bshift); in nfhd_getgeo() 87 geo->heads = 4; in nfhd_getgeo() 88 geo->sectors = 16; in nfhd_getgeo()
|
/Linux-v5.15/drivers/block/aoe/ |
D | aoeblk.c | 285 aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo) in aoeblk_getgeo() argument 294 geo->cylinders = d->geo.cylinders; in aoeblk_getgeo() 295 geo->heads = d->geo.heads; in aoeblk_getgeo() 296 geo->sectors = d->geo.sectors; in aoeblk_getgeo()
|