Home
last modified time | relevance | path

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

12345678910>>...44

/openbmc/linux/include/linux/
H A Dhighmem.h1 /* 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 …]
H A Dscatterlist.h1 /* 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 …]
/openbmc/u-boot/drivers/mtd/onenand/
H A Donenand_spl.c1 // SPDX-License-Identifier: GPL-2.0+
6 * Copyright (C) 2005-2009 Samsung Electronics
17 * - 2048b page, 128k erase block.
18 * - 4096b page, 256k erase block.
28 #define onenand_sector_address(page) (page << 2) argument
73 density_mask = 1 << (18 + density - ffs(size)); in onenand_spl_get_geometry()
81 static int onenand_spl_read_page(uint32_t block, uint32_t page, uint32_t *buf, in onenand_spl_read_page() argument
85 uint32_t offset; in onenand_spl_read_page() local
93 onenand_writew(onenand_sector_address(page), in onenand_spl_read_page()
107 if (page < 2 && (onenand_readw(ONENAND_SPARERAM) != 0xffff)) in onenand_spl_read_page()
[all …]
/openbmc/linux/sound/pci/emu10k1/
H A Dmemory.c1 // 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 …]
/openbmc/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
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 …]
H A Dblock.c1 // 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 …]
H A Dsymlink.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Squashfs - a compressed read only filesystem for Linux
35 struct page *page = &folio->page; in squashfs_symlink_read_folio() local
36 struct inode *inode = page->mapping->host; in squashfs_symlink_read_folio()
37 struct super_block *sb = inode->i_sb; in squashfs_symlink_read_folio()
38 struct squashfs_sb_info *msblk = sb->s_fs_info; in squashfs_symlink_read_folio()
39 int index = page->index << PAGE_SHIFT; in squashfs_symlink_read_folio()
40 u64 block = squashfs_i(inode)->start; in squashfs_symlink_read_folio()
41 int offset = squashfs_i(inode)->offset; in squashfs_symlink_read_folio() local
42 int length = min_t(int, i_size_read(inode) - index, PAGE_SIZE); in squashfs_symlink_read_folio()
[all …]
/openbmc/linux/fs/jfs/
H A Djfs_metapage.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) International Business Machines Corp., 2000-2005
4 * Portions Copyright (C) Christoph Hellwig, 2001-2002
26 uint pagealloc; /* # of page allocations */
27 uint pagefree; /* # of page frees */
32 #define metapage_locked(mp) test_bit(META_locked, &(mp)->flag)
33 #define trylock_metapage(mp) test_and_set_bit_lock(META_locked, &(mp)->flag)
37 clear_bit_unlock(META_locked, &mp->flag); in unlock_metapage()
38 wake_up(&mp->wait); in unlock_metapage()
45 add_wait_queue_exclusive(&mp->wait, &wait); in __lock_metapage()
[all …]
/openbmc/qemu/include/exec/
H A Dram_addr.h10 * later. See the COPYING file in the top-level directory.
28 #include "exec/exec-all.h"
37 * @shift: guest page number shift
47 * clear_bmap_set: set clear bitmap for the page range. Must be with
51 * @start: the start page number
59 uint8_t shift = rb->clear_bmap_shift; in clear_bmap_set()
61 bitmap_set(rb->clear_bmap, start >> shift, clear_bmap_size(npages, shift)); in clear_bmap_set()
65 * clear_bmap_test_and_clear: test clear bitmap for the page, clear if set.
69 * @page: the page number to check
73 static inline bool clear_bmap_test_and_clear(RAMBlock *rb, uint64_t page) in clear_bmap_test_and_clear() argument
[all …]
/openbmc/u-boot/drivers/mtd/nand/raw/
H A Dnand_spl_loaders.c4 unsigned int page, page_offset; in nand_spl_load_image() local
6 /* offs has to be aligned to a page address! */ in nand_spl_load_image()
8 lastblock = (offs + size - 1) / CONFIG_SYS_NAND_BLOCK_SIZE; in nand_spl_load_image()
9 page = (offs % CONFIG_SYS_NAND_BLOCK_SIZE) / CONFIG_SYS_NAND_PAGE_SIZE; in nand_spl_load_image()
15 while (page < CONFIG_SYS_NAND_PAGE_COUNT) { in nand_spl_load_image()
16 nand_read_page(block, page, dst); in nand_spl_load_image()
18 * When offs is not aligned to page address the in nand_spl_load_image()
19 * extra offset is copied to dst as well. Copy in nand_spl_load_image()
26 dst = (void *)((int)dst - page_offset); in nand_spl_load_image()
30 page++; in nand_spl_load_image()
[all …]
/openbmc/linux/fs/ecryptfs/
H A Dread_write.c1 // 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 …]
/openbmc/linux/fs/hfsplus/
H A Dbitmap.c1 // 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 …]
/openbmc/linux/drivers/nvmem/
H A Drave-sp-eeprom.c1 // 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 …]
/openbmc/linux/drivers/gpu/drm/i915/gem/
H A Di915_gem_object.h2 * SPDX-License-Identifier: MIT
23 #define obj_to_i915(obj__) to_i915((obj__)->base.dev)
29 if (overflows_type(size, obj->base.size)) in i915_gem_object_size_2big()
88 * i915_gem_object_lookup_rcu - look up a temporary GEM object from its handle
104 return idr_find(&file->object_idr, handle); in i915_gem_object_lookup_rcu()
110 if (obj && !kref_get_unless_zero(&obj->base.refcount)) in i915_gem_object_get_rcu()
137 drm_gem_object_get(&obj->base); in i915_gem_object_get()
145 __drm_gem_object_put(&obj->base); in i915_gem_object_put()
148 #define assert_object_held(obj) dma_resv_assert_held((obj)->base.resv)
160 kref_read(&obj->base.refcount) > 0) in assert_object_held_shared()
[all …]
/openbmc/linux/drivers/video/fbdev/core/
H A Dfb_defio.c26 static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs) in fb_deferred_io_page()
28 void *screen_base = (void __force *) info->screen_base; in fb_deferred_io_page()
29 struct page *page; in fb_deferred_io_page() local
32 page = vmalloc_to_page(screen_base + offs); in fb_deferred_io_page()
34 page = pfn_to_page((info->fix.smem_start + offs) >> PAGE_SHIFT); in fb_deferred_io_page()
36 return page; in fb_deferred_io_page()
40 unsigned long offset, in fb_deferred_io_pageref_get() argument
41 struct page *page) in fb_deferred_io_pageref_get() argument
43 struct fb_deferred_io *fbdefio = info->fbdefio; in fb_deferred_io_pageref_get()
44 struct list_head *pos = &fbdefio->pagereflist; in fb_deferred_io_pageref_get()
[all …]
/openbmc/u-boot/drivers/net/phy/
H A Db53.c1 // SPDX-License-Identifier: GPL-2.0+
32 /* Pseudo-PHY address (non configurable) to access internal registers */
40 /* Port VLAN Page */
43 /* Control Page registers */
102 #define REG_MII_PAGE 0x10 /* MII Page register */
118 static int b53_mdio_op(struct mii_dev *bus, u8 page, u8 reg, u16 op) in b53_mdio_op() argument
124 /* set page number */ in b53_mdio_op()
125 v = (page << 8) | REG_MII_PAGE_ENABLE; in b53_mdio_op()
126 ret = bus->write(bus, BRCM_PSEUDO_PHY_ADDR, MDIO_DEVAD_NONE, in b53_mdio_op()
133 ret = bus->write(bus, BRCM_PSEUDO_PHY_ADDR, MDIO_DEVAD_NONE, in b53_mdio_op()
[all …]
/openbmc/linux/drivers/gpu/drm/
H A Ddrm_vm.c69 pgprot_t tmp = vm_get_page_prot(vma->vm_flags); in drm_io_prot()
73 if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) in drm_io_prot()
78 if (efi_range_is_wc(vma->vm_start, vma->vm_end - in drm_io_prot()
79 vma->vm_start)) in drm_io_prot()
91 pgprot_t tmp = vm_get_page_prot(vma->vm_flags); in drm_dma_prot()
104 * \return pointer to the page structure.
106 * Find the right map and if it's AGP memory find the real physical page to
107 * map, get the page, increment the use count and return it.
112 struct vm_area_struct *vma = vmf->vma; in drm_vm_fault()
113 struct drm_file *priv = vma->vm_file->private_data; in drm_vm_fault()
[all …]
/openbmc/linux/arch/arm/mm/
H A Ddma-mapping.c1 // 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 …]
/openbmc/linux/sound/pci/trident/
H A Dtrident_memory.c1 // 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 …]
/openbmc/linux/arch/x86/include/uapi/asm/
H A Dsgx.h1 /* 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 …]
/openbmc/linux/drivers/net/ethernet/intel/e1000e/
H A Dphy.c1 // 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 …]
/openbmc/qemu/migration/
H A Dram.c4 * Copyright (c) 2003-2008 Fabrice Bellard
5 * Copyright (c) 2011-2015 Red Hat Inc
34 #include "qemu/main-loop.h"
38 #include "migration-stats.h"
41 #include "qemu-file.h"
42 #include "postcopy-ram.h"
44 #include "qemu/error-report.h"
46 #include "qapi/qapi-types-migration.h"
47 #include "qapi/qapi-events-migration.h"
48 #include "qapi/qapi-commands-migration.h"
[all …]
/openbmc/linux/tools/virtio/linux/
H A Dscatterlist.h1 /* 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 …]
/openbmc/linux/fs/btrfs/
H A Dextent_io.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/page-flags.h>
19 #include "extent-io-tree.h"
24 #include "check-integrity.h"
26 #include "rcu-string.h"
28 #include "disk-io.h"
31 #include "block-group.h"
35 #include "file-item.h"
37 #include "dev-replace.h"
46 struct btrfs_fs_info *fs_info = eb->fs_info; in btrfs_leak_debug_add_eb()
[all …]
/openbmc/linux/mm/
H A Dswapfile.c1 // SPDX-License-Identifier: GPL-2.0-only
22 #include <linux/blk-cgroup.h>
31 #include <linux/backing-dev.h>
67 static int least_priority = -1;
75 static const char Bad_offset[] = "Bad swap offset entry ";
76 static const char Unused_offset[] = "Unused swap offset entry ";
91 * swap_info_struct changes between not-full/full, it needs to
92 * add/remove itself to/from this list, but the swap_info_struct->lock
94 * before any swap_info_struct->lock.
126 * corresponding page
[all …]

12345678910>>...44