Home
last modified time | relevance | path

Searched refs:geo (Results 1 – 25 of 83) sorted by relevance

1234

/linux-6.6.21/lib/
Dbtree.c135 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-6.6.21/drivers/net/wireless/intel/ipw2x00/
Dlibipw_geo.c37 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-6.6.21/fs/xfs/libxfs/
Dxfs_dir2.h125 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 …]
Dxfs_sb.c1182 struct xfs_fsop_geom *geo, in xfs_fs_geometry() argument
1187 memset(geo, 0, sizeof(struct xfs_fsop_geom)); in xfs_fs_geometry()
1189 geo->blocksize = sbp->sb_blocksize; in xfs_fs_geometry()
1190 geo->rtextsize = sbp->sb_rextsize; in xfs_fs_geometry()
1191 geo->agblocks = sbp->sb_agblocks; in xfs_fs_geometry()
1192 geo->agcount = sbp->sb_agcount; in xfs_fs_geometry()
1193 geo->logblocks = sbp->sb_logblocks; in xfs_fs_geometry()
1194 geo->sectsize = sbp->sb_sectsize; in xfs_fs_geometry()
1195 geo->inodesize = sbp->sb_inodesize; in xfs_fs_geometry()
1196 geo->imaxpct = sbp->sb_imax_pct; in xfs_fs_geometry()
[all …]
Dxfs_dir2_leaf.c145 struct xfs_da_geometry *geo = mp->m_dir_geo; in xfs_dir3_leaf_check_int() local
152 ltp = xfs_dir2_leaf_tail_p(geo, leaf); in xfs_dir3_leaf_check_int()
159 if (hdr->count > geo->leaf_max_ents) in xfs_dir3_leaf_check_int()
179 if (isleaf1 && xfs_dir2_dataptr_to_db(geo, in xfs_dir3_leaf_check_int()
363 ASSERT(bno >= xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET) && in xfs_dir3_leaf_get_buf()
364 bno < xfs_dir2_byte_to_db(args->geo, XFS_DIR2_FREE_OFFSET)); in xfs_dir3_leaf_get_buf()
366 error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, bno), in xfs_dir3_leaf_get_buf()
416 ldb = xfs_dir2_da_to_db(args->geo, blkno); in xfs_dir2_block_to_leaf()
417 ASSERT(ldb == xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET)); in xfs_dir2_block_to_leaf()
428 btp = xfs_dir2_block_tail_p(args->geo, hdr); in xfs_dir2_block_to_leaf()
[all …]
Dxfs_attr_leaf.c95 struct xfs_da_geometry *geo, in xfs_attr3_leaf_firstused_from_disk() argument
115 ASSERT(geo->blksize > USHRT_MAX); in xfs_attr3_leaf_firstused_from_disk()
116 to->firstused = geo->blksize; in xfs_attr3_leaf_firstused_from_disk()
122 struct xfs_da_geometry *geo, in xfs_attr3_leaf_firstused_to_disk() argument
139 ASSERT(from->firstused == geo->blksize); in xfs_attr3_leaf_firstused_to_disk()
153 struct xfs_da_geometry *geo, in xfs_attr3_leaf_hdr_from_disk() argument
170 xfs_attr3_leaf_firstused_from_disk(geo, to, from); in xfs_attr3_leaf_hdr_from_disk()
184 xfs_attr3_leaf_firstused_from_disk(geo, to, from); in xfs_attr3_leaf_hdr_from_disk()
195 struct xfs_da_geometry *geo, in xfs_attr3_leaf_hdr_to_disk() argument
212 xfs_attr3_leaf_firstused_to_disk(geo, to, from); in xfs_attr3_leaf_hdr_to_disk()
[all …]
Dxfs_dir2_node.c40 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 …]
Dxfs_dir2_data.c85 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 …]
Dxfs_dir2.c243 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_init()
280 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_createname()
376 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_lookup()
448 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_removename()
509 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_replace()
585 count = args->geo->fsbcount; in xfs_dir2_grow_inode()
591 *dbp = xfs_dir2_da_to_db(args->geo, (xfs_dablk_t)bno); in xfs_dir2_grow_inode()
625 if (XFS_FSB_TO_B(mp, eof) != args->geo->blksize) in xfs_dir2_isblock()
629 if (XFS_IS_CORRUPT(mp, args->dp->i_disk_size != args->geo->blksize)) in xfs_dir2_isblock()
650 if (eof != args->geo->leafblk + args->geo->fsbcount) in xfs_dir2_isleaf()
[all …]
Dxfs_dir2_block.c393 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 …]
Dxfs_da_btree.c472 XFS_DA_LOGRANGE(node, &node->hdr, args->geo->node_hdr_size)); in xfs_da3_node_create()
742 (args->whichfork == XFS_DATA_FORK) ? args->geo->leafblk : 0, in xfs_da3_root_split()
760 ASSERT(blk1->blkno >= args->geo->leafblk && in xfs_da3_root_split()
761 blk1->blkno < args->geo->freeblk); in xfs_da3_root_split()
762 ASSERT(blk2->blkno >= args->geo->leafblk && in xfs_da3_root_split()
763 blk2->blkno < args->geo->freeblk); in xfs_da3_root_split()
807 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split()
980 state->args->geo->node_hdr_size)); in xfs_da3_node_rebalance()
985 state->args->geo->node_hdr_size + in xfs_da3_node_rebalance()
1036 ASSERT(newblk->blkno >= state->args->geo->leafblk && in xfs_da3_node_add()
[all …]
/linux-6.6.21/fs/xfs/
Dxfs_dir2_readdir.c58 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()
149 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 …]
Dxfs_health.c294 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-6.6.21/drivers/mtd/nand/raw/gpmi-nand/
Dgpmi-nand.c198 struct bch_geometry *geo = &this->bch_geometry; in gpmi_dump_info() local
227 geo->gf_len, in gpmi_dump_info()
228 geo->ecc_strength, in gpmi_dump_info()
229 geo->page_size, in gpmi_dump_info()
230 geo->metadata_size, in gpmi_dump_info()
231 geo->ecc0_chunk_size, in gpmi_dump_info()
232 geo->eccn_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()
[all …]
/linux-6.6.21/block/partitions/
Dibm.c31 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-6.6.21/drivers/media/pci/bt8xx/
Dbttv-risc.c237 bttv_calc_geo_old(struct bttv *btv, struct bttv_geometry *geo, in bttv_calc_geo_old() argument
257 geo->hscale = ((totalwidth*4096UL)/xsf-4096); in bttv_calc_geo_old()
258 geo->hdelay = tvnorm->hdelayx1; in bttv_calc_geo_old()
259 geo->hdelay = (geo->hdelay*width)/swidth; in bttv_calc_geo_old()
260 geo->hdelay &= 0x3fe; in bttv_calc_geo_old()
262 geo->vscale = (0x10000UL-sr) & 0x1fff; in bttv_calc_geo_old()
263 geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) | in bttv_calc_geo_old()
265 geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0; in bttv_calc_geo_old()
266 geo->vdelay = vdelay; in bttv_calc_geo_old()
267 geo->width = width; in bttv_calc_geo_old()
[all …]
/linux-6.6.21/fs/xfs/scrub/
Dreaddir.c37 struct xfs_da_geometry *geo = mp->m_dir_geo; in xchk_dir_walk_sf() local
51 dapos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xchk_dir_walk_sf()
52 geo->data_entry_offset); in xchk_dir_walk_sf()
59 dapos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xchk_dir_walk_sf()
60 geo->data_entry_offset + in xchk_dir_walk_sf()
73 dapos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, in xchk_dir_walk_sf()
99 struct xfs_da_geometry *geo = mp->m_dir_geo; in xchk_dir_walk_block() local
109 end = xfs_dir3_data_end_offset(geo, bp->b_addr); in xchk_dir_walk_block()
110 for (off = geo->data_entry_offset; off < end; off = next_off) { in xchk_dir_walk_block()
128 dapos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, off); in xchk_dir_walk_block()
[all …]
Ddir.c155 struct xfs_da_geometry *geo = mp->m_dir_geo; in xchk_dir_rec() local
189 db = xfs_dir2_dataptr_to_db(geo, ptr); in xchk_dir_rec()
190 off = xfs_dir2_dataptr_to_off(geo, ptr); in xchk_dir_rec()
191 rec_bno = xfs_dir2_db_to_da(geo, db); in xchk_dir_rec()
193 if (rec_bno >= geo->leafblk) { in xchk_dir_rec()
214 iter_off = geo->data_entry_offset; in xchk_dir_rec()
215 end = xfs_dir3_data_end_offset(geo, bp->b_addr); in xchk_dir_rec()
460 struct xfs_da_geometry *geo = sc->mp->m_dir_geo; in xchk_directory_leaf1_bestfree() local
478 ltp = xfs_dir2_leaf_tail_p(geo, leaf); in xchk_directory_leaf1_bestfree()
503 if (leafhdr.count > geo->leaf_max_ents) { in xchk_directory_leaf1_bestfree()
[all …]
/linux-6.6.21/drivers/md/
Draid10.c109 int size = offsetof(struct r10bio, devs[conf->geo.raid_disks]); in r10bio_pool_alloc()
263 for (i = 0; i < conf->geo.raid_disks; i++) { in put_all_bios()
358 for (slot = 0; slot < conf->geo.raid_disks; slot++) { in find_bio_disk()
587 static void __raid10_find_phys(struct geom *geo, struct r10bio *r10bio) in __raid10_find_phys() argument
597 last_far_set_start = (geo->raid_disks / geo->far_set_size) - 1; in __raid10_find_phys()
598 last_far_set_start *= geo->far_set_size; in __raid10_find_phys()
600 last_far_set_size = geo->far_set_size; in __raid10_find_phys()
601 last_far_set_size += (geo->raid_disks % geo->far_set_size); in __raid10_find_phys()
604 chunk = r10bio->sector >> geo->chunk_shift; in __raid10_find_phys()
605 sector = r10bio->sector & geo->chunk_mask; in __raid10_find_phys()
[all …]
/linux-6.6.21/drivers/media/platform/renesas/
Dsh_vou.c506 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-6.6.21/include/linux/
Dbtree.h100 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-6.6.21/block/
Dioctl.c405 struct hd_geometry geo; in blkdev_getgeo() local
417 memset(&geo, 0, sizeof(geo)); in blkdev_getgeo()
418 geo.start = get_start_sect(bdev); in blkdev_getgeo()
419 ret = disk->fops->getgeo(bdev, &geo); in blkdev_getgeo()
422 if (copy_to_user(argp, &geo, sizeof(geo))) in blkdev_getgeo()
439 struct hd_geometry geo; in compat_hdio_getgeo() local
447 memset(&geo, 0, sizeof(geo)); in compat_hdio_getgeo()
452 geo.start = get_start_sect(bdev); in compat_hdio_getgeo()
453 ret = disk->fops->getgeo(bdev, &geo); in compat_hdio_getgeo()
457 ret = copy_to_user(ugeo, &geo, 4); in compat_hdio_getgeo()
[all …]
/linux-6.6.21/arch/m68k/emu/
Dnfblock.c80 static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo) in nfhd_getgeo() argument
84 geo->cylinders = dev->blocks >> (6 - dev->bshift); in nfhd_getgeo()
85 geo->heads = 4; in nfhd_getgeo()
86 geo->sectors = 16; in nfhd_getgeo()
/linux-6.6.21/drivers/net/wireless/mediatek/mt76/
Dmt792x_acpi_sar.c182 ret = mt792x_asar_acpi_read_mtgs(dev, (u8 **)&asar->geo, asar->ver); in mt792x_init_acpi_sar()
184 devm_kfree(dev->mt76.dev, asar->geo); in mt792x_init_acpi_sar()
185 asar->geo = NULL; in mt792x_init_acpi_sar()
209 if (!asar->geo) in mt792x_asar_get_geo_pwr()
225 band_pwr = &asar->geo->tbl[idx].band[0]; in mt792x_asar_get_geo_pwr()
226 max = ARRAY_SIZE(asar->geo->tbl[idx].band); in mt792x_asar_get_geo_pwr()
/linux-6.6.21/drivers/block/aoe/
Daoeblk.c272 aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo) in aoeblk_getgeo() argument
281 geo->cylinders = d->geo.cylinders; in aoeblk_getgeo()
282 geo->heads = d->geo.heads; in aoeblk_getgeo()
283 geo->sectors = d->geo.sectors; in aoeblk_getgeo()

1234