/linux-6.1.9/fs/jffs2/ |
D | erase.c | 45 jeb->offset, jeb->offset, jeb->offset + c->sector_size); in jffs2_erase_block() 52 c->erasing_size -= c->sector_size; in jffs2_erase_block() 53 c->dirty_size += c->sector_size; in jffs2_erase_block() 54 jeb->dirty_size = c->sector_size; in jffs2_erase_block() 61 instr->len = c->sector_size; in jffs2_erase_block() 81 c->erasing_size -= c->sector_size; in jffs2_erase_block() 82 c->dirty_size += c->sector_size; in jffs2_erase_block() 83 jeb->dirty_size = c->sector_size; in jffs2_erase_block() 129 c->erasing_size += c->sector_size; in jffs2_erase_pending_blocks() 184 c->erasing_size -= c->sector_size; in jffs2_erase_failed() [all …]
|
D | build.c | 324 size += c->sector_size - 1; /* ... and round up */ in jffs2_calc_trigger_levels() 326 c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size); in jffs2_calc_trigger_levels() 350 c->nospc_dirty_size = c->sector_size + (c->flash_size / 100); in jffs2_calc_trigger_levels() 353 c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); in jffs2_calc_trigger_levels() 355 c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); in jffs2_calc_trigger_levels() 357 c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024); in jffs2_calc_trigger_levels() 359 c->resv_blocks_gctrigger, c->resv_blocks_gctrigger*c->sector_size/1024); in jffs2_calc_trigger_levels() 361 c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024); in jffs2_calc_trigger_levels() 363 c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024); in jffs2_calc_trigger_levels() 377 c->nr_blocks = c->flash_size / c->sector_size; in jffs2_do_mount_fs() [all …]
|
D | scan.c | 62 static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) { in EMPTY_SCAN_SIZE() argument 63 if (sector_size < DEFAULT_EMPTY_SCAN_SIZE) in EMPTY_SCAN_SIZE() 64 return sector_size; in EMPTY_SCAN_SIZE() 117 try_size = c->sector_size; in jffs2_scan_medium() 232 c->bad_size += c->sector_size; in jffs2_scan_medium() 233 c->free_size -= c->sector_size; in jffs2_scan_medium() 317 else if (!ISDIRTY(c->sector_size - (jeb->used_size + jeb->unchecked_size))) { in jffs2_scan_classify_jeb() 492 sm = (void *)buf + c->sector_size - sizeof(*sm); in jffs2_scan_eraseblock() 495 sumlen = c->sector_size - je32_to_cpu(sm->offset); in jffs2_scan_eraseblock() 506 jeb->offset + c->sector_size - buf_len, in jffs2_scan_eraseblock() [all …]
|
D | nodemgmt.c | 30 c->erasing_size - c->resv_blocks_write * c->sector_size in jffs2_rp_can_write() 115 …dirty = c->dirty_size + c->erasing_size - c->nr_erasing_blocks * c->sector_size + c->unchecked_siz… in jffs2_reserve_space() 124 c->sector_size); in jffs2_reserve_space() 141 if ( (avail / c->sector_size) <= blocksneeded) { in jffs2_reserve_space() 149 avail, blocksneeded * c->sector_size); in jffs2_reserve_space() 343 if (!(c->wbuf_ofs % c->sector_size) && !c->wbuf_len) in jffs2_find_nextblock() 438 (jeb->offset + c->sector_size - waste) | REF_OBSOLETE, in jffs2_do_reserve_space() 459 if (jeb->free_size != c->sector_size - c->cleanmarker_size) { in jffs2_do_reserve_space() 484 *len, jeb->offset + (c->sector_size - jeb->free_size)); in jffs2_do_reserve_space() 507 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_add_physical_node_ref() [all …]
|
D | debug.c | 33 jeb->unchecked_size != c->sector_size)) { in __jffs2_dbg_acct_sanity_check_nolock() 37 jeb->wasted_size, jeb->unchecked_size, c->sector_size); in __jffs2_dbg_acct_sanity_check_nolock() 251 erasing += c->sector_size; in __jffs2_dbg_superblock_counts() 255 erasing += c->sector_size; in __jffs2_dbg_superblock_counts() 259 erasing += c->sector_size; in __jffs2_dbg_superblock_counts() 263 bad += c->sector_size; in __jffs2_dbg_superblock_counts() 322 ref_offset(ref2) > jeb->offset + c->sector_size) { in __jffs2_dbg_acct_paranoia_check_nolock() 365 && my_used_size + my_unchecked_size + my_dirty_size != c->sector_size) { in __jffs2_dbg_acct_paranoia_check_nolock() 368 c->sector_size); in __jffs2_dbg_acct_paranoia_check_nolock() 479 printk(JFFS2_DBG "sector_size: %#08x\n", c->sector_size); in __jffs2_dbg_dump_block_lists_nolock() [all …]
|
D | wbuf.c | 168 (jeb->offset+c->sector_size-oldfree) | REF_OBSOLETE, in jffs2_block_refile() 285 jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; in jffs2_wbuf_recover() 460 new_jeb = &c->blocks[ofs / c->sector_size]; in jffs2_wbuf_recover() 599 wbuf_jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; in __jffs2_flush_wbuf() 926 jeb = &c->blocks[outvec_to / c->sector_size]; in jffs2_flash_writev() 1253 c->sector_size = 8 * c->mtd->erasesize; in jffs2_dataflash_setup() 1255 while (c->sector_size < 8192) { in jffs2_dataflash_setup() 1256 c->sector_size *= 2; in jffs2_dataflash_setup() 1262 if ((c->flash_size % c->sector_size) != 0) { in jffs2_dataflash_setup() 1263 c->flash_size = (c->flash_size / c->sector_size) * c->sector_size; in jffs2_dataflash_setup() [all …]
|
D | fs.c | 226 if (avail > c->sector_size * c->resv_blocks_write) in jffs2_statfs() 227 avail -= c->sector_size * c->resv_blocks_write; in jffs2_statfs() 539 c->sector_size = c->mtd->erasesize; in jffs2_do_fill_super() 540 blocks = c->flash_size / c->sector_size; in jffs2_do_fill_super() 545 if ((c->sector_size * blocks) != c->flash_size) { in jffs2_do_fill_super() 546 c->flash_size = c->sector_size * blocks; in jffs2_do_fill_super() 551 if (c->flash_size < 5*c->sector_size) { in jffs2_do_fill_super() 553 c->flash_size / c->sector_size); in jffs2_do_fill_super()
|
D | summary.c | 28 uint32_t sum_size = min_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE); in jffs2_sum_init() 260 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_sum_add_kvec() 376 if ((ofs & ~3) > c->sector_size - jeb->free_size) { in sum_link_node_ref() 378 jffs2_scan_dirty_space(c, jeb, (ofs & ~3) - (c->sector_size - jeb->free_size)); in sum_link_node_ref() 557 c->free_size += c->sector_size - jeb->free_size; in jffs2_sum_process_sum_data() 561 jeb->free_size = c->sector_size; in jffs2_sum_process_sum_data() 580 ofs = c->sector_size - sumsize; in jffs2_sum_scan_sumnode() 806 sm->offset = cpu_to_je32(c->sector_size - jeb->free_size); in jffs2_sum_write_data() 817 sum_ofs = jeb->offset + c->sector_size - jeb->free_size; in jffs2_sum_write_data()
|
/linux-6.1.9/arch/x86/boot/ |
D | edd.c | 40 int sector_size; in read_mbr_sig() local 46 sector_size = ei->params.bytes_per_sector; in read_mbr_sig() 47 if (!sector_size) in read_mbr_sig() 48 sector_size = 512; /* Best available guess */ in read_mbr_sig() 52 mbr_base = (buf_base+sector_size-1) & ~(sector_size-1); in read_mbr_sig() 54 mbrbuf_end = mbrbuf_ptr + sector_size; in read_mbr_sig() 62 memset(mbrbuf_ptr, 0, sector_size); in read_mbr_sig()
|
/linux-6.1.9/drivers/scsi/ |
D | sd.c | 785 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard() 877 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd() 909 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd() 964 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same() 1202 cmd->transfersize = sdp->sector_size; in sd_setup_read_write_cmnd() 1205 cmd->sdb.length = nr_blocks * sdp->sector_size; in sd_setup_read_write_cmnd() 1884 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes() 1927 unsigned int sector_size = SCpnt->device->sector_size; in sd_done() local 1958 if (resid & (sector_size - 1)) { in sd_done() 1961 resid, sector_size); in sd_done() [all …]
|
D | sr.c | 325 if (cd->device->sector_size == 2048) in sr_done() 387 s_size = cd->device->sector_size; in sr_init_command() 459 SCpnt->transfersize = cd->device->sector_size; in sr_init_command() 670 sdev->sector_size = 2048; /* A guess, just in case */ in sr_probe() 724 int sector_size; in get_sectorsize() local 744 sector_size = 2048; /* A guess, just in case */ in get_sectorsize() 759 sector_size = get_unaligned_be32(&buffer[4]); in get_sectorsize() 760 switch (sector_size) { in get_sectorsize() 770 sector_size = 2048; in get_sectorsize() 779 "unsupported sector size %d.", sector_size); in get_sectorsize() [all …]
|
D | sd.h | 207 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors() 212 return blocks * sdev->sector_size; in logical_to_bytes() 217 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical() 222 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
|
/linux-6.1.9/block/partitions/ |
D | msdos.c | 138 sector_t sector_size; in parse_extended() local 143 sector_size = queue_logical_block_size(state->disk->queue) / 512; in parse_extended() 181 offs = start_sect(p)*sector_size; in parse_extended() 182 size = nr_sects(p)*sector_size; in parse_extended() 215 this_sector = first_sector + start_sect(p) * sector_size; in parse_extended() 216 this_size = nr_sects(p) * sector_size; in parse_extended() 583 sector_t sector_size; in msdos_partition() local 591 sector_size = queue_logical_block_size(state->disk->queue) / 512; in msdos_partition() 664 sector_t start = start_sect(p)*sector_size; in msdos_partition() 665 sector_t size = nr_sects(p)*sector_size; in msdos_partition() [all …]
|
/linux-6.1.9/drivers/md/ |
D | dm-crypt.c | 174 unsigned short int sector_size; member 426 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr() 584 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr() 756 *(__le64 *)buf = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_eboiv_gen() 958 *(__le64 *)es = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_elephant() 984 memcpy(data_offset, data2 + sg2->offset, cc->sector_size); in crypt_iv_elephant() 989 diffuser_disk_to_cpu((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 990 diffuser_b_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 991 diffuser_a_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 992 diffuser_cpu_to_disk((__le32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() [all …]
|
/linux-6.1.9/drivers/video/fbdev/ |
D | broadsheetfb.c | 593 int addr, const char *data, int sector_size) in broadsheet_spiflash_write_sector() argument 598 for (i = 0; i < sector_size; i += BS_SPIFLASH_PAGE_SIZE) { in broadsheet_spiflash_write_sector() 612 int sector_size, int data_start_addr, in broadsheet_spiflash_rewrite_sector() argument 620 sector_buffer = kzalloc(sector_size, GFP_KERNEL); in broadsheet_spiflash_rewrite_sector() 625 start_sector_addr = (data_start_addr / sector_size) * sector_size; in broadsheet_spiflash_rewrite_sector() 649 tail_start_addr = (data_start_addr + data_len) % sector_size; in broadsheet_spiflash_rewrite_sector() 654 tail_len = sector_size - tail_start_addr; in broadsheet_spiflash_rewrite_sector() 672 sector_buffer, sector_size); in broadsheet_spiflash_rewrite_sector() 681 int sector_size; in broadsheet_write_spiflash() local 690 sector_size = 32*1024; in broadsheet_write_spiflash() [all …]
|
/linux-6.1.9/drivers/spi/ |
D | spi-mtk-snfi.c | 224 u16 sector_size; member 239 .sector_size = 512, 252 .sector_size = 512, 517 nsectors = page_size / snf->caps->sector_size; in mtk_snand_setup_pagefmt() 523 if (snf->caps->sector_size == 512) { in mtk_snand_setup_pagefmt() 536 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 542 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 548 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 564 if (snf->caps->sector_size == 1024) in mtk_snand_setup_pagefmt() 570 if (snf->caps->sector_size == 1024) in mtk_snand_setup_pagefmt() [all …]
|
/linux-6.1.9/drivers/nfc/s3fwrn5/ |
D | firmware.h | 43 __u16 sector_size; member 84 u32 sector_size; member
|
D | firmware.c | 380 fw_info->sector_size = bootinfo.sector_size; in s3fwrn5_fw_setup() 418 image_size = fw_info->sector_size * fw->image_sectors; in s3fwrn5_fw_download() 447 for (off = 0; off < image_size; off += fw_info->sector_size) { in s3fwrn5_fw_download()
|
/linux-6.1.9/drivers/nvdimm/ |
D | btt.c | 513 unsigned long len = arena->sector_size; in arena_clear_freelist_error() 756 arena->sector_size = btt->sector_size; in alloc_arena() 1058 return btt->lbasize - btt->sector_size; in btt_meta_size() 1072 __u64 lba = div_u64(sector << SECTOR_SHIFT, btt->sector_size); in lba_to_arena() 1151 meta_nsoff = to_namespace_offset(arena, postmap) + btt->sector_size; in btt_rw_integrity() 1213 cur_len = min(btt->sector_size, len); in btt_read_pg() 1281 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg() 1328 cur_len = min(btt->sector_size, len); in btt_write_pg() 1411 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg() 1459 if (len > PAGE_SIZE || len < btt->sector_size || in btt_submit_bio() [all …]
|
D | badrange.c | 187 const unsigned int sector_size = 512; in __add_badblock_range() local 192 start_sector = div_u64(ns_offset, sector_size); in __add_badblock_range() 193 end_sector = div_u64_rem(ns_offset + len, sector_size, &rem); in __add_badblock_range()
|
D | btt.h | 178 u32 sector_size; member 227 u32 sector_size; member
|
/linux-6.1.9/include/scsi/ |
D | scsi_cmnd.h | 224 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_get_lba() 231 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_logical_block_count() 307 return scmd->device->sector_size; in scsi_prot_interval()
|
/linux-6.1.9/drivers/mtd/spi-nor/ |
D | xilinx.c | 31 .sector_size = (8 * (_page_size)), \ 151 nor->mtd.erasesize = nor->info->sector_size; in xilinx_nor_setup()
|
D | core.h | 494 unsigned sector_size; member 540 .sector_size = (_sector_size), \ 554 .sector_size = (_sector_size), \ 559 .sector_size = (_sector_size), \
|
/linux-6.1.9/drivers/block/ |
D | swim_asm.S | 43 .equ sector_size, 512 define 193 movel #sector_size-1, %d4 /* sector size */ 236 movel #sector_size, %d0
|