Home
last modified time | relevance | path

Searched +full:block +full:- +full:offset (Results 1 – 25 of 1062) sorted by relevance

12345678910>>...43

/linux/drivers/gpio/
H A Dgpio-sch311x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * GPIO driver for the SMSC SCH311x Super-I/O chips
20 #define DRV_NAME "gpio-sch311x"
39 struct sch311x_gpio_block { /* one GPIO block runtime data */
44 spinlock_t lock; /* lock for this GPIO block */
93 * Super-IO functions
102 return -EBUSY; in sch311x_sio_enter()
132 static int sch311x_gpio_request(struct gpio_chip *chip, unsigned offset) in sch311x_gpio_request() argument
134 struct sch311x_gpio_block *block = gpiochip_get_data(chip); in sch311x_gpio_request() local
136 if (block->config_regs[offset] == 0) /* GPIO is not available */ in sch311x_gpio_request()
[all …]
/linux/fs/squashfs/
H A Dinode.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
14 * Inodes in Squashfs are identified by a 48-bit inode which encodes the
15 * location of the compressed metadata block containing the inode, and the byte
16 * offset into that block where the inode is placed (<block, offset>).
51 inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); in squashfs_new_inode()
52 if (inode->i_ino == 0) in squashfs_new_inode()
53 return -EINVAL; in squashfs_new_inode()
55 err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &i_uid); in squashfs_new_inode()
59 err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &i_gid); in squashfs_new_inode()
[all …]
H A Dcache.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
23 * are decompressed and cached in the page-cache in the normal way. The
29 * have been packed with it, these because of locality-of-reference may be read
49 * Look-up block in cache, and increment usage count. If not in cache, read
53 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
58 spin_lock(&cache->lock); in squashfs_cache_get()
61 for (i = cache->curr_blk, n = 0; n < cache->entries; n++) { in squashfs_cache_get()
62 if (cache->entry[i].block == block) { in squashfs_cache_get()
63 cache->curr_blk = i; in squashfs_cache_get()
[all …]
H A Dblock.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
8 * block.c
12 * This file implements the low-level routines to read and decompress
35 int offset, int req_length) in copy_bio_to_actor() argument
50 int bytes_to_copy = min_t(int, bvec->bv_len - offset, in copy_bio_to_actor()
51 PAGE_SIZE - actor_offset); in copy_bio_to_actor()
54 req_length - copied_bytes); in copy_bio_to_actor()
57 offset, bytes_to_copy); in copy_bio_to_actor()
61 offset += bytes_to_copy; in copy_bio_to_actor()
[all …]
H A Ddir.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
31 * Lookup offset (f_pos) in the directory index, returning the
32 * metadata block containing it.
35 * (if any) we have managed to read - the index isn't essential, just
42 struct squashfs_sb_info *msblk = sb->s_fs_info; in get_dir_index_using_offset()
52 * is offset by 3 because we invent "." and ".." entries which are in get_dir_index_using_offset()
57 f_pos -= 3; in get_dir_index_using_offset()
85 msblk->directory_table; in get_dir_index_using_offset()
100 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in squashfs_readdir()
[all …]
/linux/sound/soc/codecs/
H A Dtas2781-fmwlib.c1 // SPDX-License-Identifier: GPL-2.0
3 // tas2781-fmwlib.c -- TASDEVICE firmware support
5 // Copyright 2023 - 2025 Texas Instruments, Inc.
7 // Author: Shenghao Ding <shenghao-ding@ti.com>
44 /*should not include B0_P53_R44-R47 */
84 unsigned char offset; member
164 * receiver, games, audio-to-haptics, PMIC record, bypass mode, in tasdevice_add_config()
167 * ultrasonic application. In order to support these variable-numbers in tasdevice_add_config()
173 *status = -ENOMEM; in tasdevice_add_config()
177 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
[all …]
/linux/drivers/md/dm-vdo/
H A Dencodings.c1 // SPDX-License-Identifier: GPL-2.0-only
11 #include "memory-alloc.h"
15 #include "status-codes.h"
109 * The current version for the data encoded in the super block. This must be changed any time there
129 /* This is the minimum size, if the super block contains no components. */
130 .size = VDO_SUPER_BLOCK_FIXED_SIZE - VDO_ENCODED_HEADER_SIZE,
134 * validate_version() - Check whether a version matches an expected version.
162 * vdo_validate_header() - Check whether a header matches expectations.
181 if (expected_header->id != actual_header->id) { in vdo_validate_header()
184 name, expected_header->id, in vdo_validate_header()
[all …]
/linux/sound/pci/emu10k1/
H A Demu10k1_patch.c1 // SPDX-License-Identifier: GPL-2.0-or-later
22 * allocate a sample block and copy data from userspace
32 int offset; in snd_emu10k1_sample_new() local
37 emu = rec->hw; in snd_emu10k1_sample_new()
39 return -EINVAL; in snd_emu10k1_sample_new()
41 if (sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP | SNDRV_SFNT_SAMPLE_REVERSE_LOOP)) { in snd_emu10k1_sample_new()
42 /* should instead return -ENOTSUPP; but compatibility */ in snd_emu10k1_sample_new()
43 dev_warn(emu->card->dev, in snd_emu10k1_sample_new()
45 sp->v.sample); in snd_emu10k1_sample_new()
48 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS) { in snd_emu10k1_sample_new()
[all …]
/linux/fs/udf/
H A Dmisc.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Miscellaneous routines for the OSTA-UDF(tm) filesystem.
10 * (C) 1998-2004 Ben Fennema
11 * (C) 1999-2000 Stelias Computing Inc
22 #include <linux/crc-itu-t.h>
31 int offset; in udf_add_extendedattr() local
35 ea = iinfo->i_data; in udf_add_extendedattr()
36 if (iinfo->i_lenEAttr) { in udf_add_extendedattr()
37 ad = iinfo->i_data + iinfo->i_lenEAttr; in udf_add_extendedattr()
43 offset = inode->i_sb->s_blocksize - udf_file_entry_alloc_offset(inode) - in udf_add_extendedattr()
[all …]
/linux/fs/befs/
H A Ddatastream.c1 // SPDX-License-Identifier: GPL-2.0
7 * Based on portions of file.c by Makoto Kato <m_kato@ga2.so-net.ne.jp>
39 * befs_read_datastream - get buffer_head containing data, starting from pos.
43 * @off: offset of data in buffer_head->b_data
45 * Returns pointer to buffer_head containing data starting with offset @off,
46 * if you don't need to know offset just set @off = NULL.
54 befs_blocknr_t block; /* block coresponding to pos */ in befs_read_datastream() local
56 befs_debug(sb, "---> %s %llu", __func__, pos); in befs_read_datastream()
57 block = pos >> BEFS_SB(sb)->block_shift; in befs_read_datastream()
59 *off = pos - (block << BEFS_SB(sb)->block_shift); in befs_read_datastream()
[all …]
/linux/drivers/mtd/
H A Drfd_ftl.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rfd_ftl.c -- resident flash disk (flash translation layer)
28 MODULE_PARM_DESC(block_size, "Block size to use by RFD, defaults to erase unit size");
57 struct block { struct
68 u_long offset; member
80 int reserved_block; /* block next up for reclaim */ argument
81 int current_block; /* block to write to */
88 struct block *blocks;
95 struct block *block = &part->blocks[block_no]; in build_block_map() local
98 block->offset = part->block_size * block_no; in build_block_map()
[all …]
/linux/fs/isofs/
H A Dnamei.c1 // SPDX-License-Identifier: GPL-2.0
7 * (C) 1991 Linus Torvalds - minix filesystem
24 if (likely(!dentry->d_op)) in isofs_cmp()
25 return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); in isofs_cmp()
26 return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, &qstr); in isofs_cmp()
42 unsigned long block, f_pos, offset, block_saved, offset_saved; in isofs_find_entry() local
44 struct isofs_sb_info *sbi = ISOFS_SB(dir->i_sb); in isofs_find_entry()
46 if (!ISOFS_I(dir)->i_first_extent) in isofs_find_entry()
50 offset = 0; in isofs_find_entry()
51 block = 0; in isofs_find_entry()
[all …]
H A Disofs.h1 /* SPDX-License-Identifier: GPL-2.0 */
30 * iso9660 super-block data in memory
39 int s_rock_offset; /* offset of SUSP fields within SU area */
63 #define ISOFS_INVALID_MODE ((umode_t) -1)
67 return sb->s_fs_info; in ISOFS_SB()
127 unsigned long block,
128 unsigned long offset,
132 unsigned long block, in isofs_iget() argument
133 unsigned long offset) in isofs_iget() argument
135 return __isofs_iget(sb, block, offset, 0); in isofs_iget()
[all …]
/linux/fs/ext4/
H A Dballoc.c1 // SPDX-License-Identifier: GPL-2.0
7 * Laboratoire MASI - Institut Blaise Pascal
10 * Enhanced block allocation by Stephen Tweedie (sct@redhat.com), 1993
11 * Big-endian to little-endian byte-swapping/bitmaps by
34 * Calculate block group number for a given block number
37 ext4_fsblk_t block) in ext4_get_group_number() argument
42 group = (block - in ext4_get_group_number()
43 le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) >> in ext4_get_group_number()
46 ext4_get_group_no_and_offset(sb, block, &group, NULL); in ext4_get_group_number()
51 * Calculate the block group number and offset into the block/cluster
[all …]
/linux/fs/verity/
H A Dverify.c1 // SPDX-License-Identifier: GPL-2.0
3 * Data verification functions, i.e. hooks for ->readahead()
16 * Returns true if the hash block with index @hblock_idx in the tree, located in
26 * When the Merkle tree block size and page size are the same, then the in is_hash_block_verified()
27 * ->hash_block_verified bitmap isn't allocated, and we use PG_checked in is_hash_block_verified()
28 * to directly indicate whether the page's block has been verified. in is_hash_block_verified()
30 * Using PG_checked also guarantees that we re-verify hash pages that in is_hash_block_verified()
31 * get evicted and re-instantiated from the backing storage, as new in is_hash_block_verified()
34 if (!vi->hash_block_verified) in is_hash_block_verified()
38 * When the Merkle tree block size and page size differ, we use a bitmap in is_hash_block_verified()
[all …]
/linux/fs/efs/
H A Dinode.c1 // SPDX-License-Identifier: GPL-2.0-only
22 static sector_t _efs_bmap(struct address_space *mapping, sector_t block) in _efs_bmap() argument
24 return generic_block_bmap(mapping,block,efs_get_block); in _efs_bmap()
36 * the bits so that dst ends up in cpu byte-order. in extent_copy()
39 dst->cooked.ex_magic = (unsigned int) src->raw[0]; in extent_copy()
40 dst->cooked.ex_bn = ((unsigned int) src->raw[1] << 16) | in extent_copy()
41 ((unsigned int) src->raw[2] << 8) | in extent_copy()
42 ((unsigned int) src->raw[3] << 0); in extent_copy()
43 dst->cooked.ex_length = (unsigned int) src->raw[4]; in extent_copy()
44 dst->cooked.ex_offset = ((unsigned int) src->raw[5] << 16) | in extent_copy()
[all …]
/linux/fs/xfs/libxfs/
H A Dxfs_rtbitmap.h1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
16 struct xfs_buf *rbmbp; /* bitmap block buffer */
17 struct xfs_buf *sumbp; /* summary block buffer */
19 xfs_fileoff_t rbmoff; /* bitmap block number */
20 xfs_fileoff_t sumoff; /* summary block number */
31 if (mp->m_rtxblklog >= 0) in xfs_rtx_to_rtb()
32 return start + (rtx << mp->m_rtxblklog); in xfs_rtx_to_rtb()
33 return start + (rtx * mp->m_sb.sb_rextsize); in xfs_rtx_to_rtb()
42 if (likely(mp->m_rtxblklog >= 0)) in xfs_rgbno_to_rtx()
[all …]
H A Dxfs_dir2_data.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
34 return ((struct xfs_dir3_data_hdr *)hdr)->best_free; in xfs_dir2_data_bestfree_p()
35 return hdr->bestfree; in xfs_dir2_data_bestfree_p()
47 xfs_dir2_data_entsize(mp, dep->namelen) - sizeof(__be16)); in xfs_dir2_data_entry_tag_p()
56 uint8_t ftype = dep->name[dep->namelen]; in xfs_dir2_data_get_ftype()
72 ASSERT(dep->namelen != 0); in xfs_dir2_data_put_ftype()
75 dep->name[dep->namelen] = ftype; in xfs_dir2_data_put_ftype()
79 * The number of leaf entries is limited by the size of the block and the amount
82 * the block right now.
[all …]
/linux/fs/jffs2/
H A Derase.c2 * JFFS2 -- Journalling Flash File System, Version 2.
4 * Copyright © 2001-2007 Red Hat, Inc.
5 * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
39 bad_offset = jeb->offset; in jffs2_erase_block()
43 jffs2_dbg(1, "%s(): erase block %#08x (range %#08x-%#08x)\n", in jffs2_erase_block()
45 jeb->offset, jeb->offset, jeb->offset + c->sector_size); in jffs2_erase_block()
48 pr_warn("kzalloc for struct erase_info in jffs2_erase_block failed. Refiling block for later\n"); in jffs2_erase_block()
49 mutex_lock(&c->erase_free_sem); in jffs2_erase_block()
50 spin_lock(&c->erase_completion_lock); in jffs2_erase_block()
51 list_move(&jeb->list, &c->erase_pending_list); in jffs2_erase_block()
[all …]
/linux/fs/affs/
H A Dbitmap.c1 // SPDX-License-Identifier: GPL-2.0
5 * (c) 1996 Hans-Joachim Widmaier
7 * bitmap.c contains the code that handles all bitmap related stuff -
8 * block allocation, deallocation, calculation of free space.
26 mutex_lock(&AFFS_SB(sb)->s_bmlock); in affs_count_free_blocks()
28 bm = AFFS_SB(sb)->s_bitmap; in affs_count_free_blocks()
30 for (i = AFFS_SB(sb)->s_bmap_count; i > 0; bm++, i--) in affs_count_free_blocks()
31 free += bm->bm_free; in affs_count_free_blocks()
33 mutex_unlock(&AFFS_SB(sb)->s_bmlock); in affs_count_free_blocks()
39 affs_free_block(struct super_block *sb, u32 block) in affs_free_block() argument
[all …]
/linux/drivers/net/wan/
H A Dhd64570.h1 /* SPDX-License-Identifier: GPL-2.0 */
5 /* SCA HD64570 register definitions - all addresses for mode 0 (8086 MPU)
42 /* MSCI channel (port) 0 registers - offset 0x20
43 MSCI channel (port) 1 registers - offset 0x40 */
77 /* Timer channel 0 (port 0 RX) registers - offset 0x60
78 Timer channel 1 (port 0 TX) registers - offset 0x68
79 Timer channel 2 (port 1 RX) registers - offset 0x70
80 Timer channel 3 (port 1 TX) registers - offset 0x78
88 #define TCNTL 0x00 /* Up-counter L */
89 #define TCNTH 0x01 /* Up-counter H */
[all …]
/linux/sound/soc/intel/atom/sst/
H A Dsst_pvt.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * sst_pvt.c - Intel SST Driver for audio engine
5 * Copyright (C) 2008-14 Intel Corp
27 #include "../sst-mfld-platform.h"
30 int sst_shim_write(void __iomem *addr, int offset, int value) in sst_shim_write() argument
32 writel(value, addr + offset); in sst_shim_write()
36 u32 sst_shim_read(void __iomem *addr, int offset) in sst_shim_read() argument
38 return readl(addr + offset); in sst_shim_read()
41 u64 sst_reg_read64(void __iomem *addr, int offset) in sst_reg_read64() argument
45 memcpy_fromio(&val, addr + offset, sizeof(val)); in sst_reg_read64()
[all …]
/linux/Documentation/admin-guide/device-mapper/
H A Ddm-ebs.rst2 dm-ebs
7 a smaller logical block size on a device with a larger logical block
11 Supported emulated logical block sizes 512, 1024, 2048 and 4096.
13 Underlying block size can be set to > 4K to test buffering larger units.
17 ----------------
18 <dev path> <offset> <emulated sectors> [<underlying sectors>]
23 Full pathname to the underlying block-device,
24 or a "major:minor" device-number.
25 <offset>:
29 Number of sectors defining the logical block size to be emulated;
[all …]
/linux/drivers/accel/habanalabs/common/
H A Dsecurity.h1 /* SPDX-License-Identifier: GPL-2.0
3 * Copyright 2016-2022 HabanaLabs, Ltd.
11 #include <linux/io-64-nonatomic-lo-hi.h>
17 /* GLBL_ERR_ADDR register offset from the start of the block */
19 /* GLBL_ERR_CAUSE register offset from the start of the block */
23 * struct hl_special_block_info - stores address details of a particular type of
24 * IP block which has a SPECIAL part.
26 * @block_type: block type as described in every ASIC's block_types enum.
27 * @base_addr: base address of the first block of particular type,
28 * e.g., address of NIC0_UMR0_0 of 'NIC_UMR' block.
[all …]
/linux/drivers/mtd/parsers/
H A Dbcm47xxpart.c1 // SPDX-License-Identifier: GPL-2.0-only
25 * Amount of bytes we read when analyzing each block of flash memory.
51 uint32_t offset[3]; member
55 u64 offset, uint32_t mask_flags) in bcm47xxpart_add_part() argument
57 part->name = name; in bcm47xxpart_add_part()
58 part->offset = offset; in bcm47xxpart_add_part()
59 part->mask_flags = mask_flags; in bcm47xxpart_add_part()
63 * bcm47xxpart_bootpartition - gets index of TRX partition used by bootloader
94 uint32_t offset; in bcm47xxpart_parse() local
95 uint32_t blocksize = master->erasesize; in bcm47xxpart_parse()
[all …]

12345678910>>...43