Home
last modified time | relevance | path

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

12345678910>>...46

/OK3568_Linux_fs/kernel/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>
33 #include <asm/dma-iommu.h>
36 #include <xen/swiotlb-xen.h>
43 size_t size; member
53 size_t size; member
55 struct page *page; member
[all …]
/OK3568_Linux_fs/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dvmm.c32 kvfree(pgt->pde); in nvkm_vmm_pt_del()
41 const struct nvkm_vmm_page *page) in nvkm_vmm_pt_new() argument
43 const u32 pten = 1 << desc->bits; in nvkm_vmm_pt_new()
47 if (desc->type > PGT) { in nvkm_vmm_pt_new()
48 if (desc->type == SPT) { in nvkm_vmm_pt_new()
49 const struct nvkm_vmm_desc *pair = page[-1].desc; in nvkm_vmm_pt_new()
50 lpte = pten >> (desc->bits - pair->bits); in nvkm_vmm_pt_new()
58 pgt->page = page ? page->shift : 0; in nvkm_vmm_pt_new()
59 pgt->sparse = sparse; in nvkm_vmm_pt_new()
61 if (desc->type == PGD) { in nvkm_vmm_pt_new()
[all …]
/OK3568_Linux_fs/kernel/kernel/dma/
H A Ddirect.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2018-2020 Christoph Hellwig.
10 #include <linux/dma-map-ops.h>
21 * override the variable below for dma-direct to work properly.
33 static inline struct page *dma_direct_to_page(struct device *dev, in dma_direct_to_page()
41 phys_addr_t phys = (phys_addr_t)(max_pfn - 1) << PAGE_SHIFT; in dma_direct_get_required_mask()
44 return (1ULL << (fls64(max_dma) - 1)) * 2 - 1; in dma_direct_get_required_mask()
50 u64 dma_limit = min_not_zero(dma_mask, dev->bus_dma_limit); in dma_direct_optimal_gfp_mask()
69 static bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size) in dma_coherent_ok() argument
75 return dma_addr + size - 1 <= in dma_coherent_ok()
[all …]
H A Dops_helpers.c1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/dma-map-ops.h>
8 static struct page *dma_common_vaddr_to_page(void *cpu_addr) in dma_common_vaddr_to_page()
16 * Create scatter-list for the already allocated DMA buffer.
19 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_common_get_sgtable() argument
22 struct page *page = dma_common_vaddr_to_page(cpu_addr); in dma_common_get_sgtable() local
27 sg_set_page(sgt->sgl, page, PAGE_ALIGN(size), 0); in dma_common_get_sgtable()
32 * Create userspace mapping for the DMA-coherent memory.
35 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_common_mmap() argument
40 unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT; in dma_common_mmap()
[all …]
H A Dpool.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-map-ops.h>
9 #include <linux/dma-direct.h>
23 /* Size can be defined by the coherent_pool command line */
49 static void dma_atomic_pool_size_add(gfp_t gfp, size_t size) in dma_atomic_pool_size_add() argument
52 pool_size_dma += size; in dma_atomic_pool_size_add()
54 pool_size_dma32 += size; in dma_atomic_pool_size_add()
56 pool_size_kernel += size; in dma_atomic_pool_size_add()
61 unsigned long size; in cma_in_zone() local
69 size = cma_get_size(cma); in cma_in_zone()
[all …]
/OK3568_Linux_fs/kernel/mm/
H A Ddmapool.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * This allocator returns small blocks of a given size which are DMA-able by
10 * the given device. It uses the dma_alloc_coherent page allocator to get
11 * new pages, then splits them up into blocks of the required size.
15 * represented by the 'struct dma_pool' which keeps a doubly-linked list of
16 * allocated pages. Each page in the page_list is split into blocks of at
17 * least 'size' bytes. Free blocks are tracked in an unsorted singly-linked
18 * list of free blocks within the page. Used blocks aren't tracked, but we
19 * keep a count of how many are currently allocated from each page.
23 #include <linux/dma-mapping.h>
[all …]
H A Dzsmalloc.c10 * Released under the terms of 3-clause BSD License
16 * struct page(s) to form a zspage.
18 * Usage of struct page fields:
19 * page->private: points to zspage
20 * page->freelist(index): links together all component pages of a zspage
21 * For the huge page, this is always 0, so we use this field
23 * page->units: first object offset in a subpage of zspage
25 * Usage of struct page flags:
26 * PG_private: identifies the first component page
27 * PG_owner_priv_1: identifies the huge component page
[all …]
H A Dreadahead.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * mm/readahead.c - address_space-level file readahead.
16 #include <linux/backing-dev.h>
23 #include <linux/blk-cgroup.h>
41 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init()
42 ra->prev_pos = -1; in file_ra_state_init()
47 * see if a page needs releasing upon read_cache_pages() failure
48 * - the caller of read_cache_pages() may have set PG_private or PG_fscache
54 struct page *page) in read_cache_pages_invalidate_page() argument
56 if (page_has_private(page)) { in read_cache_pages_invalidate_page()
[all …]
H A Dslub.c1 // SPDX-License-Identifier: GPL-2.0
34 #include <linux/fault-inject.h>
49 * 2. node->list_lock
50 * 3. slab_lock(page) (Only on some arches and for debugging)
59 * A. page->freelist -> List of object free in a page
60 * B. page->inuse -> Number of objects in use
61 * C. page->objects -> Number of objects in page
62 * D. page->frozen -> frozen state
66 * slab is the one who can perform list operations on the page. Other
69 * page's freelist.
[all …]
H A Dslob.c1 // SPDX-License-Identifier: GPL-2.0
14 * will require 4 bytes on 32-bit and 8 bytes on 64-bit.
17 * and within each page, there is a singly-linked list of free blocks
22 * Allocation from heap involves first searching for a page with
23 * sufficient free blocks (using a next-fit-like approach) followed by
24 * a first-fit scan of the page. Deallocation inserts objects back
26 * address-ordered first fit.
29 * from kmalloc are prepended with a 4-byte header with the kmalloc size.
31 * alloc_pages() directly, allocating compound pages so the page order
38 * 4-byte alignment unless the SLAB_HWCACHE_ALIGN flag is set, in which
[all …]
H A Dslab.c1 // SPDX-License-Identifier: GPL-2.0
7 * kmem_cache_destroy() + some cleanup - 1999 Andrea Arcangeli
9 * Major cleanup, different bufctl logic, per-cpu arrays
17 * Pub: Prentice Hall ISBN 0-13-101908-2
19 * The Slab Allocator: An Object-Caching Kernel Memory Allocator
26 * page long) and always contiguous), and each slab contains multiple
48 * Each cache has a short per-cpu head array, most allocs
54 * The c_cpuarray may not be read with enabled local interrupts -
61 * The per-cpu arrays are never accessed from the wrong cpu, no locking,
62 * and local interrupts are disabled so slab code is preempt-safe.
[all …]
H A Dmemory_hotplug.c1 // SPDX-License-Identifier: GPL-2.0-only
29 #include <linux/page-isolation.h>
33 #include <linux/firmware-map.h>
46 * online_page_callback contains pointer to current page onlining function.
101 static struct resource *register_memory_resource(u64 start, u64 size, in register_memory_resource() argument
113 * refer to document of 'mem=' in kernel-parameters.txt for more in register_memory_resource()
116 if (start + size > max_mem_size && system_state < SYSTEM_RUNNING) in register_memory_resource()
117 return ERR_PTR(-E2BIG); in register_memory_resource()
124 res = __request_region(&iomem_resource, start, size, in register_memory_resource()
128 pr_debug("Unable to reserve System RAM region: %016llx->%016llx\n", in register_memory_resource()
[all …]
/OK3568_Linux_fs/kernel/arch/arm64/include/asm/
H A Dkvm_pgtable.h1 // SPDX-License-Identifier: GPL-2.0-only
29 * struct kvm_pgtable_mm_ops - Memory management callbacks.
30 * @zalloc_page: Allocate a single zeroed memory page. The @arg parameter
32 * initial refcount of the page is 1.
34 * @size parameter is in bytes, and is rounded-up to the
35 * next page boundary. The resulting allocation is
39 * @get_page: Increment the refcount on a page.
40 * @put_page: Decrement the refcount on a page. When the refcount
41 * reaches 0 the page is automatically freed.
42 * @page_count: Return the refcount of a page.
[all …]
/OK3568_Linux_fs/kernel/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 */
32 /* get offset address from aligned page */
[all …]
/OK3568_Linux_fs/kernel/Documentation/admin-guide/mm/
H A Dhugetlbpage.rst11 the Linux kernel. This support is built on top of multiple page size support
13 support 4K and 2M (1G if architecturally supported) page sizes, ia64
14 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M,
15 256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical
21 Users can use the huge page support in Linux kernel by either using the mmap
30 persistent hugetlb pages in the kernel's huge page pool. It also displays
31 default huge page size and information about the number of free, reserved
32 and surplus huge pages in the pool of huge pages of default size.
33 The huge page size is needed for generating the proper alignment and
34 size of the arguments to system calls that map huge page regions.
[all …]
/OK3568_Linux_fs/kernel/drivers/staging/gasket/
H A Dgasket_page_table.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Gasket Page Table functionality. This file describes the address
5 * As much as possible, internal details are hidden to simplify use -
6 * all calls are thread-safe (protected by an internal mutex) except where
29 * @ppage_table: Pointer to Gasket page table pointer. Set by this call.
42 * Description: Allocates and initializes data to track address translation -
43 * simple and extended page table metadata. Initially, the page table is
44 * partitioned such that all addresses are "simple" (single-level lookup).
55 * Deallocate and cleanup page table data.
56 * @page_table: Gasket page table pointer.
[all …]
/OK3568_Linux_fs/kernel/include/linux/
H A Ddma-map-ops.h1 /* SPDX-License-Identifier: GPL-2.0 */
9 #include <linux/dma-mapping.h>
16 void *(*alloc)(struct device *dev, size_t size,
19 void (*free)(struct device *dev, size_t size, void *vaddr,
21 struct page *(*alloc_pages)(struct device *dev, size_t size,
24 void (*free_pages)(struct device *dev, size_t size, struct page *vaddr,
26 void *(*alloc_noncoherent)(struct device *dev, size_t size,
29 void (*free_noncoherent)(struct device *dev, size_t size, void *vaddr,
35 void *cpu_addr, dma_addr_t dma_addr, size_t size,
38 dma_addr_t (*map_page)(struct device *dev, struct page *page,
[all …]
H A Dkasan.h1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <linux/kasan-enabled.h>
12 struct page;
61 int kasan_add_zero_shadow(void *start, unsigned long size);
62 void kasan_remove_zero_shadow(void *start, unsigned long size);
72 static inline int kasan_add_zero_shadow(void *start, unsigned long size) in kasan_add_zero_shadow() argument
77 unsigned long size) in kasan_remove_zero_shadow() argument
87 void kasan_alloc_pages(struct page *page, unsigned int order, gfp_t flags);
88 void kasan_free_pages(struct page *page, unsigned int order);
92 static __always_inline void kasan_alloc_pages(struct page *page, in kasan_alloc_pages() argument
[all …]
/OK3568_Linux_fs/kernel/fs/ntfs/
H A Dlogfile.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * logfile.c - NTFS kernel journal handling. Part of the Linux-NTFS project.
5 * Copyright (c) 2002-2007 Anton Altaparmakov
27 * ntfs_check_restart_page_header - check the page header for consistency
28 * @vi: $LogFile inode to which the restart page header belongs
29 * @rp: restart page header to check
30 * @pos: position in @vi at which the restart page header resides
32 * Check the restart page header @rp for consistency and return 'true' if it is
36 * require the full restart page.
47 * If the system or log page sizes are smaller than the ntfs block size in ntfs_check_restart_page_header()
[all …]
/OK3568_Linux_fs/kernel/fs/hfsplus/
H A Dbitmap.c1 // SPDX-License-Identifier: GPL-2.0
19 int hfsplus_block_allocate(struct super_block *sb, u32 size, in hfsplus_block_allocate() argument
23 struct page *page; in hfsplus_block_allocate() local
32 return size; in hfsplus_block_allocate()
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()
39 start = size; in hfsplus_block_allocate()
[all …]
/OK3568_Linux_fs/kernel/drivers/iommu/
H A Ddma-iommu.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * A fairly generic DMA-API to IOMMU-API glue layer.
5 * Copyright (C) 2014-2015 ARM Ltd.
7 * based in part on arch/arm/mm/dma-mapping.c:
8 * Copyright (C) 2000-2004 Russell King
13 #include <linux/dma-map-ops.h>
14 #include <linux/dma-iommu.h>
44 /* Trivial linear page allocator for IOMMU_DMA_MSI_COOKIE */
60 if (cookie->type == IOMMU_DMA_IOVA_COOKIE) in cookie_msi_granule()
61 return cookie->iovad.granule; in cookie_msi_granule()
[all …]
/OK3568_Linux_fs/kernel/drivers/misc/
H A Dvmw_balloon.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2000-2018, VMware, Inc. All Rights Reserved.
48 …"Enable non-cooperative out-of-memory protection. Disabled by default as it may degrade performanc…
56 /* Magic number for the balloon mount-point */
82 #define VMW_BALLOON_2M_ORDER (PMD_SHIFT - PAGE_SHIFT)
85 * 64-bit targets are only supported in 64-bit
120 * enum vmballoon_cmd_type - backdoor commands.
142 * @VMW_BALLOON_CMD_GET_TARGET: Gets the balloon target size.
143 * @VMW_BALLOON_CMD_LOCK: Informs the hypervisor about a ballooned page.
144 * @VMW_BALLOON_CMD_UNLOCK: Informs the hypervisor about a page that is about
[all …]
/OK3568_Linux_fs/kernel/arch/powerpc/include/asm/nohash/32/
H A Dmmu-8xx.h1 /* SPDX-License-Identifier: GPL-2.0 */
10 * During software tablewalk, the registers used perform mask/shift-add
34 * Then we use the APG to say whether accesses are according to Page rules or
39 * 0 => Kernel => 11 (all accesses performed according as user iaw page definition)
40 * 1 => Kernel+Accessed => 01 (all accesses performed according to page definition)
41 * 2 => User => 11 (all accesses performed according as user iaw page definition)
42 * 3 => User+Accessed => 00 (all accesses performed as supervisor iaw page definition) for INIT
43 * => 10 (all accesses performed according to swaped page definition) for KUEP
44 * 4-15 => Not Used
49 /* The effective page number register. When read, contains the information
[all …]
/OK3568_Linux_fs/kernel/arch/powerpc/mm/
H A Ddma-noncoherent.c1 // SPDX-License-Identifier: GPL-2.0-only
13 #include <linux/dma-direct.h>
14 #include <linux/dma-map-ops.h>
22 static void __dma_sync(void *vaddr, size_t size, int direction) in __dma_sync() argument
25 unsigned long end = start + size; in __dma_sync()
32 * invalidate only when cache-line aligned otherwise there is in __dma_sync()
35 if ((start | end) & (L1_CACHE_BYTES - 1)) in __dma_sync()
52 * In this case, each page of a buffer must be kmapped/kunmapped
57 * beyond the first page.
59 static inline void __dma_sync_page_highmem(struct page *page, in __dma_sync_page_highmem() argument
[all …]
/OK3568_Linux_fs/kernel/fs/ufs/
H A Dutil.c1 // SPDX-License-Identifier: GPL-2.0
20 struct super_block *sb, u64 fragment, u64 size) in _ubh_bread_() argument
25 if (size & ~uspi->s_fmask) in _ubh_bread_()
27 count = size >> uspi->s_fshift; in _ubh_bread_()
33 ubh->fragment = fragment; in _ubh_bread_()
34 ubh->count = count; in _ubh_bread_()
36 if (!(ubh->bh[i] = sb_bread(sb, fragment + i))) in _ubh_bread_()
39 ubh->bh[i] = NULL; in _ubh_bread_()
43 brelse (ubh->bh[j]); in _ubh_bread_()
49 struct super_block *sb, u64 fragment, u64 size) in ubh_bread_uspi() argument
[all …]

12345678910>>...46