Home
last modified time | relevance | path

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

12345678910>>...41

/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 Dfile.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
14 * compressed fragment block (tail-end packed block). The compressed size
15 * of each datablock is stored in a block list contained within the
20 * block index to datablock location on disk.
23 * retaining a simple and space-efficient block list on disk. The cache
46 * Locate cache slot in range [offset, index] for specified inode. If
49 static struct meta_index *locate_meta_index(struct inode *inode, int offset, in locate_meta_index() argument
53 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in locate_meta_index()
56 mutex_lock(&msblk->meta_index_mutex); in locate_meta_index()
[all …]
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 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 …]
/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 …]
H A Dpartition.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Partition handling routines for the OSTA-UDF(tm) filesystem.
9 * (C) 1998-2001 Ben Fennema
25 uint32_t udf_get_pblock(struct super_block *sb, uint32_t block, in udf_get_pblock() argument
26 uint16_t partition, uint32_t offset) in udf_get_pblock() argument
30 if (partition >= sbi->s_partitions) { in udf_get_pblock()
31 udf_debug("block=%u, partition=%u, offset=%u: invalid partition\n", in udf_get_pblock()
32 block, partition, offset); in udf_get_pblock()
35 map = &sbi->s_partmaps[partition]; in udf_get_pblock()
36 if (map->s_partition_func) in udf_get_pblock()
[all …]
H A Dballoc.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Block allocation handling routines for the OSTA-UDF(tm) filesystem.
9 * (C) 1999-2001 Ben Fennema
32 struct udf_bitmap *bitmap, unsigned int block, in read_block_bitmap() argument
40 loc.logicalBlockNum = bitmap->s_extPosition; in read_block_bitmap()
41 loc.partitionReferenceNum = UDF_SB(sb)->s_partition; in read_block_bitmap()
43 bh = sb_bread(sb, udf_get_lb_pblock(sb, &loc, block)); in read_block_bitmap()
44 bitmap->s_block_bitmap[bitmap_nr] = bh; in read_block_bitmap()
46 return -EIO; in read_block_bitmap()
49 max_bits = sb->s_blocksize * 8; in read_block_bitmap()
[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 - 2026 Texas Instruments, Inc.
7 // Author: Shenghao Ding <shenghao-ding@ti.com>
49 /*should not include B0_P53_R44-R47 */
97 unsigned char offset; member
183 * receiver, games, audio-to-haptics, PMIC record, bypass mode, in tasdevice_add_config()
186 * ultrasonic application. In order to support these variable-numbers in tasdevice_add_config()
192 *status = -ENOMEM; in tasdevice_add_config()
196 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
[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/drivers/net/ethernet/marvell/prestera/
H A Dprestera_counter.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
27 u32 offset; member
45 prestera_counter_is_ready(struct prestera_counter_block *block, u32 id) in prestera_counter_is_ready() argument
47 return block->counter_flag[id - block->offset] == COUNTER_FLAG_READY; in prestera_counter_is_ready()
52 mutex_lock(&counter->mtx); in prestera_counter_lock()
57 mutex_unlock(&counter->mtx); in prestera_counter_unlock()
60 static void prestera_counter_block_lock(struct prestera_counter_block *block) in prestera_counter_block_lock() argument
62 mutex_lock(&block->mtx); in prestera_counter_block_lock()
65 static void prestera_counter_block_unlock(struct prestera_counter_block *block) in prestera_counter_block_unlock() argument
67 mutex_unlock(&block->mtx); in prestera_counter_block_unlock()
[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/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/isofs/
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()
119 unsigned long offset,
130 unsigned long block,
131 unsigned long offset,
135 unsigned long block, in isofs_iget() argument
136 unsigned long offset) in isofs_iget() argument
[all …]
H A Dnamei.c1 // SPDX-License-Identifier: GPL-2.0
7 * (C) 1991 Linus Torvalds - minix filesystem
14 unsigned long offset, in isofs_dir_record_valid() argument
21 if (offset > bufsize || bufsize - offset < min_len) in isofs_dir_record_valid()
24 len = isonum_711(de->length); in isofs_dir_record_valid()
25 name_len = isonum_711(de->name_len); in isofs_dir_record_valid()
26 if (len < min_len || name_len > len - min_len) in isofs_dir_record_valid()
28 if (len > bufsize - offset) in isofs_dir_record_valid()
36 if (likely(!dentry->d_op)) in isofs_cmp()
37 return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); in isofs_cmp()
[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/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/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
28 #include "../sst-mfld-platform.h"
31 int sst_shim_write(void __iomem *addr, int offset, int value) in sst_shim_write()
33 writel(value, addr + offset); in sst_shim_write()
30 sst_shim_write(void __iomem * addr,int offset,int value) sst_shim_write() argument
36 sst_shim_read(void __iomem * addr,int offset) sst_shim_read() argument
41 sst_reg_read64(void __iomem * addr,int offset) sst_reg_read64() argument
50 sst_shim_write64(void __iomem * addr,int offset,u64 value) sst_shim_write64() argument
56 sst_shim_read64(void __iomem * addr,int offset) sst_shim_read64() argument
81 sst_wait_timeout(struct intel_sst_drv * sst_drv_ctx,struct sst_block * block) sst_wait_timeout() argument
154 sst_create_block_and_ipc_msg(struct ipc_post ** arg,bool large,struct intel_sst_drv * sst_drv_ctx,struct sst_block ** block,u32 msg_id,u32 drv_id) sst_create_block_and_ipc_msg() argument
192 struct sst_block *block = NULL; sst_prepare_and_post_msg() local
[all...]
/linux/fs/verity/
H A Dverify.c1 // SPDX-License-Identifier: GPL-2.0
3 * Data verification functions, i.e. hooks for ->readahead()
28 * performance significantly vs. sequential hashing of each block.
39 * fsverity_readahead() - kick off readahead on fsverity hashes
47 * To be called from the file systems' ->read_folio and ->readahead methods to
54 struct inode *inode = vi->inode; in fsverity_readahead()
55 const struct merkle_tree_params *params = &vi->tree_params; in fsverity_readahead()
56 u64 start_hidx = (u64)index << params->log_blocks_per_page; in fsverity_readahead()
58 (((u64)index + nr_pages) << params->log_blocks_per_page) - 1; in fsverity_readahead()
61 if (!inode->i_sb->s_vop->readahead_merkle_tree) in fsverity_readahead()
[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/fs/qnx4/
H A Dnamei.c1 // SPDX-License-Identifier: GPL-2.0
11 * 01-06-1998 by Richard Frowijn : first release.
12 * 21-06-1998 by Frank Denis : dcache support, fixed error codes.
13 * 04-07-1998 by Frank Denis : first step for rmdir/unlink.
27 struct buffer_head *bh, unsigned long *offset) in qnx4_match() argument
37 de = (union qnx4_directory_entry *) (bh->b_data + *offset); in qnx4_match()
38 *offset += QNX4_DIR_ENTRY_SIZE; in qnx4_match()
53 unsigned long block, offset, blkofs; in qnx4_find_entry() local
58 block = offset = blkofs = 0; in qnx4_find_entry()
59 while (blkofs * QNX4_BLOCK_SIZE + offset < dir->i_size) { in qnx4_find_entry()
[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>>...41