| /kernel/linux/linux-6.6/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> 43 size_t size; member 53 size_t size; member [all …]
|
| /kernel/linux/linux-6.6/kernel/dma/ |
| D | direct.c | 1 // 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 dev->coherent_dma_mask, in dma_direct_optimal_gfp_mask() 51 dev->bus_dma_limit); in dma_direct_optimal_gfp_mask() 69 bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size) in dma_coherent_ok() argument [all …]
|
| D | ops_helpers.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/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> 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 …]
|
| /kernel/linux/linux-5.10/kernel/dma/ |
| D | direct.c | 1 // 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() 68 static bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size) in dma_coherent_ok() argument 74 return dma_addr + size - 1 <= in dma_coherent_ok() [all …]
|
| D | ops_helpers.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| D | vmm.c | 32 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 …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| D | vmm.c | 32 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 …]
|
| /kernel/linux/linux-6.6/arch/arm64/include/asm/ |
| D | kvm_pgtable.h | 1 // SPDX-License-Identifier: GPL-2.0-only 17 * The largest supported block sizes for KVM (no 52-bit PA support): 18 * - 4K (level 1): 1GB 19 * - 16K (level 2): 32MB 20 * - 64K (level 2): 512MB 45 #define KVM_PHYS_INVALID (-1ULL) 106 static inline bool kvm_is_block_size_supported(u64 size) in kvm_is_block_size_supported() argument 108 bool is_power_of_two = IS_ALIGNED(size, size); in kvm_is_block_size_supported() 110 return is_power_of_two && (size & kvm_supported_block_sizes()); in kvm_is_block_size_supported() 114 * struct kvm_pgtable_mm_ops - Memory management callbacks. [all …]
|
| /kernel/linux/linux-5.10/arch/arm64/include/asm/ |
| D | kvm_pgtable.h | 1 // SPDX-License-Identifier: GPL-2.0-only 17 * struct kvm_pgtable - KVM page-table. 18 * @ia_bits: Maximum input address size, in bits. 19 * @start_level: Level at which the page-table walk starts. 20 * @pgd: Pointer to the first top-level entry of the page-table. 21 * @mmu: Stage-2 KVM MMU struct. Unused for stage-1 page-tables. 28 /* Stage-2 only */ 33 * enum kvm_pgtable_prot - Page-table permissions and attributes. 53 * enum kvm_pgtable_walk_flags - Flags to control a depth-first page-table walk. 73 * struct kvm_pgtable_walker - Hook into a page-table walk. [all …]
|
| /kernel/linux/linux-5.10/mm/ |
| D | dmapool.c | 1 // 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 …]
|
| D | readahead.c | 1 // 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> 36 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init() 37 ra->prev_pos = -1; in file_ra_state_init() 42 * see if a page needs releasing upon read_cache_pages() failure 43 * - the caller of read_cache_pages() may have set PG_private or PG_fscache 49 struct page *page) in read_cache_pages_invalidate_page() argument 51 if (page_has_private(page)) { in read_cache_pages_invalidate_page() [all …]
|
| D | zsmalloc.c | 10 * 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 …]
|
| /kernel/linux/linux-6.6/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 */ 32 /* get offset address from aligned page */ [all …]
|
| /kernel/linux/linux-5.10/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 */ 32 /* get offset address from aligned page */ [all …]
|
| /kernel/linux/linux-6.6/Documentation/admin-guide/mm/ |
| D | hugetlbpage.rst | 9 the Linux kernel. This support is built on top of multiple page size support 11 support 4K and 2M (1G if architecturally supported) page sizes, ia64 12 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, 13 256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical 19 Users can use the huge page support in Linux kernel by either using the mmap 28 persistent hugetlb pages in the kernel's huge page pool. It also displays 29 default huge page size and information about the number of free, reserved 30 and surplus huge pages in the pool of huge pages of default size. 31 The huge page size is needed for generating the proper alignment and 32 size of the arguments to system calls that map huge page regions. [all …]
|
| /kernel/linux/linux-6.6/mm/ |
| D | zsmalloc.c | 10 * 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->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->page_type: 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 …]
|
| D | dmapool.c | 1 // 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 19 * keep a count of how many are currently allocated from each page. 23 #include <linux/dma-mapping.h> 56 unsigned int size; member [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | dma-map-ops.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 #include <linux/dma-mapping.h> 15 void *(*alloc)(struct device *dev, size_t size, 18 void (*free)(struct device *dev, size_t size, void *vaddr, 20 struct page *(*alloc_pages)(struct device *dev, size_t size, 23 void (*free_pages)(struct device *dev, size_t size, struct page *vaddr, 25 void *(*alloc_noncoherent)(struct device *dev, size_t size, 28 void (*free_noncoherent)(struct device *dev, size_t size, void *vaddr, 34 void *cpu_addr, dma_addr_t dma_addr, size_t size, 37 dma_addr_t (*map_page)(struct device *dev, struct page *page, [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/gasket/ |
| D | gasket_page_table.h | 1 /* 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 …]
|
| /kernel/linux/linux-5.10/Documentation/admin-guide/mm/ |
| D | hugetlbpage.rst | 11 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 …]
|
| /kernel/liteos_a/kernel/base/vm/ |
| D | los_vm_phys.c | 2 * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. 3 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 48 .size = SYS_MEM_SIZE_DEFAULT, 64 LOS_SpinInit(&seg->lruLock); in OsVmPhysLruInit() 66 LOS_SpinLockSave(&seg->lruLock, &intSave); in OsVmPhysLruInit() 68 seg->lruSize[i] = 0; in OsVmPhysLruInit() 69 LOS_ListInit(&seg->lruList[i]); in OsVmPhysLruInit() 71 LOS_SpinUnlockRestore(&seg->lruLock, intSave); in OsVmPhysLruInit() 74 STATIC INT32 OsVmPhysSegCreate(paddr_t start, size_t size) in OsVmPhysSegCreate() argument 79 return -1; in OsVmPhysSegCreate() [all …]
|
| /kernel/linux/linux-5.10/fs/ntfs/ |
| D | logfile.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/fs/ntfs/ |
| D | logfile.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | dma-map-ops.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 #include <linux/dma-mapping.h> 26 void *(*alloc)(struct device *dev, size_t size, 29 void (*free)(struct device *dev, size_t size, void *vaddr, 31 struct page *(*alloc_pages)(struct device *dev, size_t size, 34 void (*free_pages)(struct device *dev, size_t size, struct page *vaddr, 36 struct sg_table *(*alloc_noncontiguous)(struct device *dev, size_t size, 39 void (*free_noncontiguous)(struct device *dev, size_t size, 45 void *cpu_addr, dma_addr_t dma_addr, size_t size, 48 dma_addr_t (*map_page)(struct device *dev, struct page *page, [all …]
|