/linux-6.12.1/include/linux/ |
D | highmem.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 #include "highmem-internal.h" 17 * kmap - Map a page for long term usage 18 * @page: Pointer to the page to be mapped 37 static inline void *kmap(struct page *page); 40 * kunmap - Unmap the virtual address mapped by kmap() 41 * @page: Pointer to the page which was mapped by kmap() 46 static inline void kunmap(struct page *page); 49 * kmap_to_page - Get the page for a kmap'ed address 52 * Returns: The page which is mapped to @addr. [all …]
|
D | scatterlist.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 13 unsigned int offset; member 31 #define sg_dma_address(sg) ((sg)->dma_address) 34 #define sg_dma_len(sg) ((sg)->dma_length) 36 #define sg_dma_len(sg) ((sg)->length) 55 * the page pointer AND encode information about the sg table as well. The two 71 * We overload the LSB of the page pointer to indicate whether it's 73 * Those low bits are there for everyone! (thanks mason :-) 79 return sg->page_link & SG_PAGE_LINK_MASK; in __sg_flags() 84 return (struct scatterlist *)(sg->page_link & ~SG_PAGE_LINK_MASK); in sg_chain_ptr() [all …]
|
D | swapops.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 #include <linux/radix-tree.h> 18 * the low-order bits. 20 * We arrange the `type' and `offset' fields so that `type' is at the six 21 * high-order bits of the swp_entry_t and `offset' is right-aligned in the 25 * swp_entry_t's are *never* stored anywhere in their arch-dependent format. 27 #define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT) 28 #define SWP_OFFSET_MASK ((1UL << SWP_TYPE_SHIFT) - 1) 36 #define SWP_PFN_BITS (MAX_PHYSMEM_BITS - PAGE_SHIFT) 39 sizeof(phys_addr_t) * 8 - PAGE_SHIFT, \ [all …]
|
/linux-6.12.1/fs/squashfs/ |
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 23 * retaining a simple and space-efficient block list on disk. The cache 45 * Locate cache slot in range [offset, index] for specified inode. If 48 static struct meta_index *locate_meta_index(struct inode *inode, int offset, in locate_meta_index() argument 52 struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; in locate_meta_index() 55 mutex_lock(&msblk->meta_index_mutex); in locate_meta_index() 57 TRACE("locate_meta_index: index %d, offset %d\n", index, offset); in locate_meta_index() 59 if (msblk->meta_index == NULL) in locate_meta_index() [all …]
|
D | block.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Squashfs - a compressed read only filesystem for Linux 12 * This file implements the low-level routines to read and decompress 31 * Returns the amount of bytes copied to the page actor. 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-6.12.1/sound/pci/emu10k1/ |
D | memory.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * EMU10K1 memory page allocation (PTB area) 18 /* page arguments of these two macros are Emu page (4096 bytes), not like 21 #define __set_ptb_entry(emu,page,addr) \ argument 22 (((__le32 *)(emu)->ptb_pages.area)[page] = \ 23 cpu_to_le32(((addr) << (emu->address_mode)) | (page))) 24 #define __get_ptb_entry(emu, page) \ argument 25 (le32_to_cpu(((__le32 *)(emu)->ptb_pages.area)[page])) 30 /* get aligned page from offset address */ 31 #define get_aligned_page(offset) ((offset) >> PAGE_SHIFT) argument [all …]
|
/linux-6.12.1/include/net/page_pool/ |
D | helpers.h | 1 /* SPDX-License-Identifier: GPL-2.0 11 * The page_pool allocator is optimized for recycling page or page fragment used 15 * which allocate memory with or without page splitting depending on the 19 * always smaller than half a page, it can use one of the more specific API 22 * 1. page_pool_alloc_pages(): allocate memory without page splitting when 23 * driver knows that the memory it need is always bigger than half of the page 24 * allocated from page pool. There is no cache line dirtying for 'struct page' 25 * when a page is recycled back to the page pool. 27 * 2. page_pool_alloc_frag(): allocate memory with page splitting when driver 29 * page allocated from page pool. Page splitting enables memory saving and thus [all …]
|
/linux-6.12.1/rust/kernel/ |
D | page.rs | 1 // SPDX-License-Identifier: GPL-2.0 3 //! Kernel page allocation and management. 14 /// A bitwise shift for the page size. 17 /// The number of bytes in a page. 20 /// A bitmask that gives the page containing a given address. 21 pub const PAGE_MASK: usize = !(PAGE_SIZE - 1); 23 /// A pointer to a page that owns the page allocation. 27 /// The pointer is valid, and has ownership over the page. 28 pub struct Page { struct 29 page: NonNull<bindings::page>, field [all …]
|
/linux-6.12.1/fs/ecryptfs/ |
D | read_write.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 * @offset: Byte offset in the lower file to which to write the data 20 * @size: Number of bytes from @data to write at @offset in the lower 28 loff_t offset, size_t size) in ecryptfs_write_lower() argument 33 lower_file = ecryptfs_inode_to_private(ecryptfs_inode)->lower_file; in ecryptfs_write_lower() 35 return -EIO; in ecryptfs_write_lower() 36 rc = kernel_write(lower_file, data, size, &offset); in ecryptfs_write_lower() 44 * @page_for_lower: The page containing the data to be written to the 46 * @offset_in_page: The offset in the @page_for_lower from which to 51 * Determines the byte offset in the file for the given page and [all …]
|
/linux-6.12.1/fs/hfsplus/ |
D | bitmap.c | 1 // SPDX-License-Identifier: GPL-2.0 20 u32 offset, u32 *max) in hfsplus_block_allocate() argument 23 struct page *page; in hfsplus_block_allocate() local 34 hfs_dbg(BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len); in hfsplus_block_allocate() 35 mutex_lock(&sbi->alloc_mutex); in hfsplus_block_allocate() 36 mapping = sbi->alloc_file->i_mapping; in hfsplus_block_allocate() 37 page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, NULL); in hfsplus_block_allocate() 38 if (IS_ERR(page)) { in hfsplus_block_allocate() 42 pptr = kmap_local_page(page); in hfsplus_block_allocate() 43 curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32; in hfsplus_block_allocate() [all …]
|
/linux-6.12.1/drivers/nvmem/ |
D | rave-sp-eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 #include <linux/mfd/rave-sp.h> 12 #include <linux/nvmem-provider.h> 18 * enum rave_sp_eeprom_access_type - Supported types of EEPROM access 29 * enum rave_sp_eeprom_header_size - EEPROM command header sizes 43 * struct rave_sp_eeprom_page - RAVE SP EEPROM page 59 * struct rave_sp_eeprom - RAVE SP EEPROM device 76 * rave_sp_eeprom_io - Low-level part of EEPROM page access 80 * @idx: number of the EEPROM page 81 * @page: Data to write or buffer to store result (via page->data) [all …]
|
/linux-6.12.1/drivers/gpu/drm/i915/gem/ |
D | i915_gem_object.h | 2 * SPDX-License-Identifier: MIT 22 #define obj_to_i915(obj__) to_i915((obj__)->base.dev) 28 if (overflows_type(size, obj->base.size)) in i915_gem_object_size_2big() 87 * i915_gem_object_lookup_rcu - look up a temporary GEM object from its handle 102 return idr_find(&file->object_idr, handle); in i915_gem_object_lookup_rcu() 108 if (obj && !kref_get_unless_zero(&obj->base.refcount)) in i915_gem_object_get_rcu() 135 drm_gem_object_get(&obj->base); in i915_gem_object_get() 143 __drm_gem_object_put(&obj->base); in i915_gem_object_put() 146 #define assert_object_held(obj) dma_resv_assert_held((obj)->base.resv) 158 kref_read(&obj->base.refcount) > 0) in assert_object_held_shared() [all …]
|
/linux-6.12.1/drivers/video/fbdev/core/ |
D | fb_defio.c | 26 static struct page *fb_deferred_io_get_page(struct fb_info *info, unsigned long offs) in fb_deferred_io_get_page() 28 struct fb_deferred_io *fbdefio = info->fbdefio; in fb_deferred_io_get_page() 29 const void *screen_buffer = info->screen_buffer; in fb_deferred_io_get_page() 30 struct page *page = NULL; in fb_deferred_io_get_page() local 32 if (fbdefio->get_page) in fb_deferred_io_get_page() 33 return fbdefio->get_page(info, offs); in fb_deferred_io_get_page() 36 page = vmalloc_to_page(screen_buffer + offs); in fb_deferred_io_get_page() 37 else if (info->fix.smem_start) in fb_deferred_io_get_page() 38 page = pfn_to_page((info->fix.smem_start + offs) >> PAGE_SHIFT); in fb_deferred_io_get_page() 40 if (page) in fb_deferred_io_get_page() [all …]
|
/linux-6.12.1/arch/arm/mm/ |
D | dma-mapping.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/arch/arm/mm/dma-mapping.c 5 * Copyright (C) 2000-2004 Russell King 17 #include <linux/dma-direct.h> 18 #include <linux/dma-map-ops.h> 28 #include <asm/page.h> 33 #include <asm/dma-iommu.h> 36 #include <asm/xen/xen-ops.h> 55 struct page *page; member 64 struct page **ret_page); [all …]
|
/linux-6.12.1/sound/pci/trident/ |
D | trident_memory.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Trident 4DWave-NX memory page allocation (TLB area) 19 /* page arguments of these two macros are Trident page (4096 bytes), not like 22 #define __set_tlb_bus(trident,page,addr) \ argument 23 (trident)->tlb.entries[page] = cpu_to_le32((addr) & ~(SNDRV_TRIDENT_PAGE_SIZE-1)) 24 #define __tlb_to_addr(trident,page) \ argument 25 (dma_addr_t)le32_to_cpu((trident->tlb.entries[page]) & ~(SNDRV_TRIDENT_PAGE_SIZE - 1)) 28 /* page size == SNDRV_TRIDENT_PAGE_SIZE */ 29 #define ALIGN_PAGE_SIZE PAGE_SIZE /* minimum page size for allocation */ 31 /* fill TLB entrie(s) corresponding to page with ptr */ [all …]
|
/linux-6.12.1/lib/ |
D | iov_iter.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 #include <linux/fault-inject-usercopy.h> 78 * fault_in_iov_iter_readable - fault in iov iterator for reading 83 * @size. For each iovec, fault in each page that constitutes the iovec. 88 * Always returns 0 for non-userspace iterators. 94 n -= fault_in_readable(i->ubuf + i->iov_offset, n); in fault_in_iov_iter_readable() 95 return size - n; in fault_in_iov_iter_readable() 101 size -= count; in fault_in_iov_iter_readable() 102 for (p = iter_iov(i), skip = i->iov_offset; count; p++, skip = 0) { in fault_in_iov_iter_readable() 103 size_t len = min(count, p->iov_len - skip); in fault_in_iov_iter_readable() [all …]
|
/linux-6.12.1/drivers/net/ethernet/intel/e1000e/ |
D | phy.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 8 static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset, 10 static u32 e1000_get_phy_addr_for_hv_page(u32 page); 11 static s32 e1000_access_phy_debug_regs_hv(struct e1000_hw *hw, u32 offset, 37 * e1000e_check_reset_block_generic - Check if PHY reset is blocked 54 * e1000e_get_phy_id - Retrieve the PHY ID and revision 62 struct e1000_phy_info *phy = &hw->phy; in e1000e_get_phy_id() 67 if (!phy->ops.read_reg) in e1000e_get_phy_id() 75 phy->id = (u32)(phy_id << 16); in e1000e_get_phy_id() [all …]
|
/linux-6.12.1/arch/x86/include/uapi/asm/ |
D | sgx.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 3 * Copyright(c) 2016-20 Intel Corporation. 12 * enum sgx_page_flags - page control flags 13 * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of 40 * struct sgx_enclave_create - parameter structure for the 42 * @src: address for the SECS page data 49 * struct sgx_enclave_add_pages - parameter structure for the 51 * @src: start address for the page data 52 * @offset: starting page offset 53 * @length: length of the data (multiple of the page size) [all …]
|
/linux-6.12.1/tools/virtio/linux/ |
D | scatterlist.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 unsigned int offset; member 15 #define sg_is_chain(sg) ((sg)->page_link & 0x01) 16 #define sg_is_last(sg) ((sg)->page_link & 0x02) 18 ((struct scatterlist *) ((sg)->page_link & ~0x03)) 21 * sg_assign_page - Assign a given page to an SG entry 23 * @page: The page 26 * Assign page to sg entry. Also see sg_set_page(), the most commonly used 30 static inline void sg_assign_page(struct scatterlist *sg, struct page *page) in sg_assign_page() argument 32 unsigned long page_link = sg->page_link & 0x3; in sg_assign_page() [all …]
|
/linux-6.12.1/fs/verity/ |
D | read_metadata.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/backing-dev.h> 17 void __user *buf, u64 offset, int length) in fsverity_read_merkle_tree() argument 19 const struct fsverity_operations *vops = inode->i_sb->s_vop; in fsverity_read_merkle_tree() 26 end_offset = min(offset + length, vi->tree_params.tree_size); in fsverity_read_merkle_tree() 27 if (offset >= end_offset) in fsverity_read_merkle_tree() 29 offs_in_page = offset_in_page(offset); in fsverity_read_merkle_tree() 30 last_index = (end_offset - 1) >> PAGE_SHIFT; in fsverity_read_merkle_tree() 33 * Iterate through each Merkle tree page in the requested range and copy in fsverity_read_merkle_tree() 38 for (index = offset >> PAGE_SHIFT; index <= last_index; index++) { in fsverity_read_merkle_tree() [all …]
|
/linux-6.12.1/net/ethtool/ |
D | eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 u32 offset; member 12 u8 page; member 33 u32 offset = request->offset; in fallback_set_params() local 34 u32 length = request->length; in fallback_set_params() 36 if (request->page) in fallback_set_params() 37 offset = request->page * ETH_MODULE_EEPROM_PAGE_LEN + offset; in fallback_set_params() 39 if (modinfo->type == ETH_MODULE_SFF_8472 && in fallback_set_params() 40 request->i2c_address == 0x51) in fallback_set_params() 41 offset += ETH_MODULE_EEPROM_PAGE_LEN * 2; in fallback_set_params() [all …]
|
/linux-6.12.1/drivers/md/dm-vdo/indexer/ |
D | index-page-map.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include "index-page-map.h" 10 #include "memory-alloc.h" 13 #include "string-utils.h" 14 #include "thread-utils.h" 16 #include "hash-utils.h" 20 * The index page map is conceptually a two-dimensional array indexed by chapter number and index 21 * page number within the chapter. Each entry contains the number of the last delta list on that 22 * index page. In order to save memory, the information for the last page in each chapter is not 28 #define PAGE_MAP_MAGIC_LENGTH (sizeof(PAGE_MAP_MAGIC) - 1) [all …]
|
/linux-6.12.1/drivers/hwmon/pmbus/ |
D | stpddc60.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 37 * Calculate the closest absolute offset between commanded vout value 44 int offset; in stpddc60_get_offset() local 47 v = 250 + (vout - 1) * 5; /* Convert VID to mv */ in stpddc60_get_offset() 53 offset = DIV_ROUND_CLOSEST(abs(l - v), 50); in stpddc60_get_offset() 55 if (offset > 0) in stpddc60_get_offset() 56 offset--; in stpddc60_get_offset() 58 return clamp_val(offset, 0, 7); in stpddc60_get_offset() 70 d = e - fixed; in stpddc60_adjust_linear() 75 m >>= -d; in stpddc60_adjust_linear() [all …]
|
/linux-6.12.1/arch/csky/mm/ |
D | dma-mapping.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 5 #include <linux/dma-map-ops.h> 17 struct page *page = phys_to_page(paddr); in cache_op() local 18 void *start = __va(page_to_phys(page)); in cache_op() 19 unsigned long offset = offset_in_page(paddr); in cache_op() local 25 if (offset + len > PAGE_SIZE) in cache_op() 26 len = PAGE_SIZE - offset; in cache_op() 28 if (PageHighMem(page)) { in cache_op() 29 start = kmap_atomic(page); in cache_op() [all …]
|
/linux-6.12.1/fs/f2fs/ |
D | node.c | 1 // SPDX-License-Identifier: GPL-2.0 23 #define on_f2fs_build_free_nids(nm_i) mutex_is_locked(&(nm_i)->build_lock) 35 if (unlikely(nid < F2FS_ROOT_INO(sbi) || nid >= NM_I(sbi)->max_nid)) { in f2fs_check_nid_range() 37 f2fs_warn(sbi, "%s: out-of-range nid=%x, run fsck to fix.", in f2fs_check_nid_range() 40 return -EFSCORRUPTED; in f2fs_check_nid_range() 48 struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info; in f2fs_available_free_memory() 60 avail_ram = val.totalram - val.totalhigh; in f2fs_available_free_memory() 66 mem_size = (nm_i->nid_cnt[FREE_NID] * in f2fs_available_free_memory() 68 res = mem_size < ((avail_ram * nm_i->ram_thresh / 100) >> 2); in f2fs_available_free_memory() 70 mem_size = (nm_i->nat_cnt[TOTAL_NAT] * in f2fs_available_free_memory() [all …]
|