/linux-6.12.1/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 | 327 size += c->sector_size - 1; /* ... and round up */ in jffs2_calc_trigger_levels() 329 c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size); in jffs2_calc_trigger_levels() 353 c->nospc_dirty_size = c->sector_size + (c->flash_size / 100); in jffs2_calc_trigger_levels() 356 c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); in jffs2_calc_trigger_levels() 358 c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); in jffs2_calc_trigger_levels() 360 c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024); in jffs2_calc_trigger_levels() 362 c->resv_blocks_gctrigger, c->resv_blocks_gctrigger*c->sector_size/1024); in jffs2_calc_trigger_levels() 364 c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024); in jffs2_calc_trigger_levels() 366 c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024); in jffs2_calc_trigger_levels() 380 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() 118 …dirty = c->dirty_size + c->erasing_size - c->nr_erasing_blocks * c->sector_size + c->unchecked_siz… in jffs2_reserve_space() 127 c->sector_size); in jffs2_reserve_space() 144 if ( (avail / c->sector_size) <= blocksneeded) { in jffs2_reserve_space() 152 avail, blocksneeded * c->sector_size); in jffs2_reserve_space() 346 if (!(c->wbuf_ofs % c->sector_size) && !c->wbuf_len) in jffs2_find_nextblock() 441 (jeb->offset + c->sector_size - waste) | REF_OBSOLETE, in jffs2_do_reserve_space() 462 if (jeb->free_size != c->sector_size - c->cleanmarker_size) { in jffs2_do_reserve_space() 487 *len, jeb->offset + (c->sector_size - jeb->free_size)); in jffs2_do_reserve_space() 513 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.12.1/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.12.1/drivers/mtd/spi-nor/ |
D | everspin.c | 15 .sector_size = SZ_16K, 21 .sector_size = SZ_32K, 27 .sector_size = SZ_128K, 32 .sector_size = SZ_512K,
|
D | micron-st.c | 166 .sector_size = SZ_128K, 176 .sector_size = SZ_128K, 243 .sector_size = SZ_32K, 247 .sector_size = SZ_32K, 269 .sector_size = SZ_256K, 274 .sector_size = SZ_32K, 279 .sector_size = SZ_32K, 308 .sector_size = SZ_256K,
|
D | issi.c | 52 .sector_size = SZ_32K, 58 .sector_size = SZ_32K, 65 .sector_size = SZ_32K,
|
D | swp.c | 41 unsigned int sector_size = nor->info->sector_size ?: SPI_NOR_DEFAULT_SECTOR_SIZE; in spi_nor_get_min_prot_length_sr() local 42 u64 n_sectors = div_u64(nor->params->size, sector_size); in spi_nor_get_min_prot_length_sr() 50 return sector_size << (bp_slots_needed - bp_slots); in spi_nor_get_min_prot_length_sr() 52 return sector_size; in spi_nor_get_min_prot_length_sr()
|
D | spansion.c | 795 .sector_size = SZ_256K, 802 .sector_size = SZ_256K, 821 .sector_size = SZ_256K, 829 .sector_size = SZ_256K, 837 .sector_size = SZ_256K, 846 .sector_size = SZ_256K, 853 .sector_size = SZ_256K, 922 .sector_size = SZ_512K, 1060 nor->mtd.erasesize = nor->info->sector_size ?: in spansion_nor_late_init()
|
/linux-6.12.1/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.12.1/drivers/scsi/ |
D | sd.c | 853 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard() 945 unsigned int logical_block_size = sdkp->device->sector_size, in sd_config_atomic() 953 sdkp->device->sector_size; in sd_config_atomic() 1009 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd() 1036 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd() 1093 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same() 1408 cmd->transfersize = sdp->sector_size; in sd_setup_read_write_cmnd() 1411 cmd->sdb.length = nr_blocks * sdp->sector_size; in sd_setup_read_write_cmnd() 2238 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes() 2281 unsigned int sector_size = SCpnt->device->sector_size; in sd_done() local [all …]
|
D | sr.c | 328 if (cd->device->sector_size == 2048) in sr_done() 390 s_size = cd->device->sector_size; in sr_init_command() 462 SCpnt->transfersize = cd->device->sector_size; in sr_init_command() 671 sdev->sector_size = 2048; /* A guess, just in case */ in sr_probe() 729 int sector_size; in get_sectorsize() local 750 sector_size = 2048; /* A guess, just in case */ in get_sectorsize() 765 sector_size = get_unaligned_be32(&buffer[4]); in get_sectorsize() 766 switch (sector_size) { in get_sectorsize() 776 sector_size = 2048; in get_sectorsize() 785 "unsupported sector size %d.", sector_size); in get_sectorsize() [all …]
|
D | sd.h | 213 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors() 218 return blocks * sdev->sector_size; in logical_to_bytes() 223 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical() 228 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
|
/linux-6.12.1/drivers/md/ |
D | dm-crypt.c | 182 unsigned short sector_size; member 265 sector_align = max(bdev_logical_block_size(cc->dev->bdev), (unsigned)cc->sector_size); in get_max_request_size() 462 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr() 620 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr() 793 *(__le64 *)buf = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_eboiv_gen() 995 *(__le64 *)es = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_elephant() 1021 memcpy(data_offset, data2 + sg2->offset, cc->sector_size); in crypt_iv_elephant() 1026 diffuser_disk_to_cpu((u32 *)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 1027 diffuser_b_decrypt((u32 *)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 1028 diffuser_a_decrypt((u32 *)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() [all …]
|
/linux-6.12.1/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.12.1/drivers/spi/ |
D | spi-mtk-snfi.c | 237 u16 sector_size; member 253 .sector_size = 512, 267 .sector_size = 512, 281 .sector_size = 1024, 548 nsectors = page_size / snf->caps->sector_size; in mtk_snand_setup_pagefmt() 554 if (snf->caps->sector_size == 512) { in mtk_snand_setup_pagefmt() 567 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 573 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 579 if (snf->caps->sector_size == 512) in mtk_snand_setup_pagefmt() 595 if (snf->caps->sector_size == 1024) in mtk_snand_setup_pagefmt() [all …]
|
/linux-6.12.1/drivers/nfc/s3fwrn5/ |
D | firmware.h | 43 __u16 sector_size; member 84 u32 sector_size; member
|
/linux-6.12.1/drivers/nvdimm/ |
D | btt.c | 515 unsigned long len = arena->sector_size; in arena_clear_freelist_error() 758 arena->sector_size = btt->sector_size; in alloc_arena() 1054 return btt->lbasize - btt->sector_size; in btt_meta_size() 1068 __u64 lba = div_u64(sector << SECTOR_SHIFT, btt->sector_size); in lba_to_arena() 1147 meta_nsoff = to_namespace_offset(arena, postmap) + btt->sector_size; in btt_rw_integrity() 1209 cur_len = min(btt->sector_size, len); in btt_read_pg() 1277 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg() 1324 cur_len = min(btt->sector_size, len); in btt_write_pg() 1407 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg() 1455 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()
|
/linux-6.12.1/include/scsi/ |
D | scsi_cmnd.h | 230 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_get_lba() 237 unsigned int shift = ilog2(scmd->device->sector_size); in scsi_logical_block_count() 313 return scmd->device->sector_size; in scsi_prot_interval()
|