| /linux/drivers/gpio/ |
| H A D | gpio-sch311x.c | 1 // 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 D | file.c | 1 // 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 D | inode.c | 1 // 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 D | cache.c | 1 // 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 D | block.c | 1 // 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 D | misc.c | 1 // 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/sound/soc/codecs/ |
| H A D | tas2781-fmwlib.c | 1 // 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> 48 /*should not include B0_P53_R44-R47 */ 96 unsigned char offset; member 182 * receiver, games, audio-to-haptics, PMIC record, bypass mode, in tasdevice_add_config() 185 * ultrasonic application. In order to support these variable-numbers in tasdevice_add_config() 191 *status = -ENOMEM; in tasdevice_add_config() 195 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config() [all …]
|
| /linux/sound/pci/emu10k1/ |
| H A D | emu10k1_patch.c | 1 // 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 D | prestera_counter.c | 1 // 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 D | datastream.c | 1 // 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/fs/isofs/ |
| H A D | namei.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * (C) 1991 Linus Torvalds - minix filesystem 16 if (likely(!dentry->d_op)) in isofs_cmp() 17 return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); in isofs_cmp() 18 return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, in isofs_cmp() 35 unsigned long block, f_pos, offset, block_saved, offset_saved; in isofs_find_entry() local 37 struct isofs_sb_info *sbi = ISOFS_SB(dir->i_sb); in isofs_find_entry() 39 if (!ISOFS_I(dir)->i_first_extent) in isofs_find_entry() 43 offset = 0; in isofs_find_entry() 44 block = 0; in isofs_find_entry() [all …]
|
| H A D | isofs.h | 1 /* 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/drivers/mtd/ |
| H A D | rfd_ftl.c | 1 // 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/xfs/libxfs/ |
| H A D | xfs_rtbitmap.h | 1 // 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 …]
|
| /linux/fs/jffs2/ |
| H A D | erase.c | 2 * 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 D | dm-ebs.rst | 2 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 D | hd64570.h | 1 /* 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 D | sst_pvt.c | 1 // 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/fs/verity/ |
| H A D | verify.c | 1 // 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 D | security.h | 1 /* 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 D | namei.c | 1 // 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 D | bcm47xxpart.c | 1 // 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 …]
|
| /linux/fs/btrfs/ |
| H A D | free-space-tree.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "disk-io.h" 12 #include "free-space-tree.h" 14 #include "block-group.h" 17 #include "extent-tree.h" 18 #include "root-tree.h" 29 .offset = 0, in btrfs_free_space_root() 32 if (btrfs_fs_incompat(block_group->fs_info, EXTENT_TREE_V2)) in btrfs_free_space_root() 33 key.offset = block_group->global_root_id; in btrfs_free_space_root() 34 return btrfs_global_root(block_group->fs_info, &key); in btrfs_free_space_root() [all …]
|
| /linux/sound/isa/sb/ |
| H A D | emu8000_patch.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 1999-2000 Takashi Iwai <tiwai@suse.de> 30 snd_emux_lock_voice(emu->emu, i); in snd_emu8000_open_dma() 57 snd_emux_unlock_voice(emu->emu, i); in snd_emu8000_close_dma() 74 read_word(const void __user *buf, int offset, int mode) in read_word() argument 79 get_user(cc, (unsigned char __user *)buf + offset); in read_word() 80 c = cc << 8; /* convert 8bit -> 16bit */ in read_word() 83 get_user(c, (unsigned short __user *)buf + offset); in read_word() 86 get_user(cc, (unsigned short __user *)buf + offset); in read_word() 91 c ^= 0x8000; /* unsigned -> signed */ in read_word() [all …]
|
| /linux/drivers/mtd/nand/onenand/ |
| H A D | onenand_base.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright © 2005-2009 Samsung Electronics 9 * Adrian Hunter <ext-adrian.hunter@nokia.com>: 10 * auto-placement support, read-while load support, various fixes 13 * Flex-OneNAND support 39 /* Default Flex-OneNAND boundary and lock respectively */ 40 static int flex_bdry[MAX_DIES * 2] = { -1, 0, -1, 0 }; 43 MODULE_PARM_DESC(flex_bdry, "SLC Boundary information for Flex-OneNAND" 47 " : 0->Set boundary in unlocked status" 48 " : 1->Set boundary in locked status"); [all …]
|