| /linux/tools/testing/selftests/arm64/mte/ |
| H A D | check_mmap_options.c | 47 int mapping; member 113 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, in check_anonymous_memory_mapping() argument 126 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping() 148 static int check_file_memory_mapping(int mem_type, int mode, int mapping, in check_file_memory_mapping() argument 166 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping() 191 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping, int atag_check) in check_clear_prot_mte_flag() argument 201 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag() 222 ptr = (char *)mte_allocate_file_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag() 300 switch (tc->mapping) { in format_test_name() 337 "Check %s with %s mapping, in format_test_name() [all...] |
| H A D | check_child_memory.c | 84 static int check_child_memory_mapping(int mem_type, int mode, int mapping) in check_child_memory_mapping() argument 93 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_child_memory_mapping() 106 static int check_child_file_mapping(int mem_type, int mode, int mapping) in check_child_file_mapping() argument 119 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_child_file_mapping() 172 "Check child anonymous memory with private mapping, precise mode and mmap memory\n"); in main() 174 "Check child anonymous memory with shared mapping, precise mode and mmap memory\n"); in main() 176 "Check child anonymous memory with private mapping, imprecise mode and mmap memory\n"); in main() 178 "Check child anonymous memory with shared mapping, imprecise mode and mmap memory\n"); in main() 180 "Check child anonymous memory with private mapping, precise mode and mmap/mprotect memory\n"); in main() 182 "Check child anonymous memory with shared mapping, precis in main() [all...] |
| H A D | check_hugetlb_options.c | 146 static int check_hugetlb_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_hugetlb_memory_mapping() argument 155 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_hugetlb_memory_mapping() 176 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument 185 map_ptr = (char *)mte_allocate_memory_tag_range(map_size, mem_type, mapping, in check_clear_prot_mte_flag() 205 static int check_child_hugetlb_memory_mapping(int mem_type, int mode, int mapping) in check_child_hugetlb_memory_mapping() argument 214 ptr = (char *)mte_allocate_memory_tag_range(map_size, mem_type, mapping, in check_child_hugetlb_memory_mapping() 265 "Check hugetlb memory with private mapping, sync error mode, mmap memory and tag check off\n"); in main() 269 "Check hugetlb memory with private mapping, no error mode, mmap memory and tag check off\n"); in main() 272 "Check hugetlb memory with private mapping, sync error mode, mmap memory and tag check on\n"); in main() 274 "Check hugetlb memory with private mapping, syn in main() [all...] |
| /linux/include/linux/ |
| H A D | io-mapping.h | 17 * The io_mapping mechanism provides an abstraction for mapping 20 * See Documentation/driver-api/io-mapping.rst 35 * For small address space machines, mapping large objects 58 io_mapping_fini(struct io_mapping *mapping) in io_mapping_fini() argument 60 iomap_free(mapping->base, mapping->size); in io_mapping_fini() 65 io_mapping_map_atomic_wc(struct io_mapping *mapping, in io_mapping_map_atomic_wc() argument 70 BUG_ON(offset >= mapping->size); in io_mapping_map_atomic_wc() 71 phys_addr = mapping->base + offset; in io_mapping_map_atomic_wc() 77 return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot); in io_mapping_map_atomic_wc() 92 io_mapping_map_local_wc(struct io_mapping *mapping, unsigned long offset) in io_mapping_map_local_wc() argument [all …]
|
| /linux/drivers/gpu/drm/tegra/ |
| H A D | uapi.c | 17 struct tegra_drm_mapping *mapping = in tegra_drm_mapping_release() local 20 host1x_bo_unpin(mapping->map); in tegra_drm_mapping_release() 21 host1x_bo_put(mapping->bo); in tegra_drm_mapping_release() 23 kfree(mapping); in tegra_drm_mapping_release() 26 void tegra_drm_mapping_put(struct tegra_drm_mapping *mapping) in tegra_drm_mapping_put() argument 28 kref_put(&mapping->ref, tegra_drm_mapping_release); in tegra_drm_mapping_put() 33 struct tegra_drm_mapping *mapping; in tegra_drm_channel_context_close() local 39 xa_for_each(&context->mappings, id, mapping) in tegra_drm_channel_context_close() 40 tegra_drm_mapping_put(mapping); in tegra_drm_channel_context_close() 192 struct tegra_drm_mapping *mapping; in tegra_drm_ioctl_channel_map() local [all …]
|
| /linux/arch/arm/mm/ |
| H A D | dma-mapping.c | 3 * linux/arch/arm/mm/dma-mapping.c 7 * DMA uncached mapping support. 290 * Clear previous low-memory mapping to ensure that the in dma_contiguous_remap() 603 * Free a buffer as defined by the above mapping. 677 * Use the driver DMA support - see dma-mapping.h (dma_sync_*) 752 static int extend_iommu_mapping(struct dma_iommu_mapping *mapping); 754 static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping, in __alloc_iova() argument 760 size_t mapping_size = mapping->bits << PAGE_SHIFT; in __alloc_iova() 771 spin_lock_irqsave(&mapping->lock, flags); in __alloc_iova() 772 for (i = 0; i < mapping->nr_bitmaps; i++) { in __alloc_iova() [all …]
|
| /linux/drivers/gpu/drm/etnaviv/ |
| H A D | etnaviv_mmu.c | 6 #include <linux/dma-mapping.h> 55 /* unroll mapping in case something went wrong */ in etnaviv_context_map() 115 struct etnaviv_vram_mapping *mapping) in etnaviv_iommu_remove_mapping() argument 117 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_iommu_remove_mapping() 121 etnaviv_iommu_unmap(context, mapping->vram_node.start, in etnaviv_iommu_remove_mapping() 123 drm_mm_remove_node(&mapping->vram_node); in etnaviv_iommu_remove_mapping() 126 void etnaviv_iommu_reap_mapping(struct etnaviv_vram_mapping *mapping) in etnaviv_iommu_reap_mapping() argument 128 struct etnaviv_iommu_context *context = mapping->context; in etnaviv_iommu_reap_mapping() 131 WARN_ON(mapping->use); in etnaviv_iommu_reap_mapping() 133 etnaviv_iommu_remove_mapping(context, mapping); in etnaviv_iommu_reap_mapping() [all …]
|
| /linux/Documentation/driver-api/ |
| H A D | io-mapping.rst | 8 The io_mapping functions in linux/io-mapping.h provide an abstraction for 9 efficiently mapping small regions of an I/O device to the CPU. The initial 14 A mapping object is created during driver initialization using:: 20 mappable, while 'size' indicates how large a mapping region to 23 This _wc variant provides a mapping which may only be used with 27 With this mapping object, individual pages can be mapped either temporarily 31 void *io_mapping_map_local_wc(struct io_mapping *mapping, 34 void *io_mapping_map_atomic_wc(struct io_mapping *mapping, 37 'offset' is the offset within the defined mapping region. Accessing 46 Temporary mappings are only valid in the context of the caller. The mapping [all …]
|
| /linux/tools/testing/selftests/mm/ |
| H A D | mremap_dontunmap.c | 59 "unable to unmap destination mapping"); in kernel_support_for_mremap_dontunmap() 63 "unable to unmap source mapping"); in kernel_support_for_mremap_dontunmap() 67 // This helper will just validate that an entire mapping contains the expected 94 // the source mapping mapped. 106 // Try to just move the whole mapping anywhere (not fixed). in mremap_dontunmap_simple() 122 "unable to unmap destination mapping"); in mremap_dontunmap_simple() 124 "unable to unmap source mapping"); in mremap_dontunmap_simple() 128 // This test validates that MREMAP_DONTUNMAP on a shared mapping works as expected. 148 // Try to just move the whole mapping anywhere (not fixed). in mremap_dontunmap_simple_shmem() 155 "unable to unmap source mapping"); in mremap_dontunmap_simple_shmem() [all...] |
| /linux/tools/testing/selftests/vfio/ |
| H A D | vfio_dma_mapping_test.c | 39 struct iommu_mapping *mapping) in intel_iommu_mapping_get() argument 67 memset(mapping, 0, sizeof(*mapping)); in intel_iommu_mapping_get() 68 parse_next_value(&rest, &mapping->pgd); in intel_iommu_mapping_get() 69 parse_next_value(&rest, &mapping->p4d); in intel_iommu_mapping_get() 70 parse_next_value(&rest, &mapping->pud); in intel_iommu_mapping_get() 71 parse_next_value(&rest, &mapping->pmd); in intel_iommu_mapping_get() 72 parse_next_value(&rest, &mapping->pte); in intel_iommu_mapping_get() 87 struct iommu_mapping *mapping) in iommu_mapping_get() argument 90 return intel_iommu_mapping_get(bdf, iova, mapping); in iommu_mapping_get() 139 struct iommu_mapping mapping; TEST_F() local [all...] |
| /linux/Documentation/core-api/ |
| H A D | dma-attributes.rst | 6 defined in linux/dma-mapping.h. 11 DMA_ATTR_WEAK_ORDERING specifies that reads and writes to the mapping 21 DMA_ATTR_WRITE_COMBINE specifies that writes to the mapping may be 32 virtual mapping for the allocated buffer. On some architectures creating 33 such mapping is non-trivial task and consumes very limited resources 52 having a mapping created separately for each device and is usually 67 device domain after releasing a mapping for it. Use this attribute with 73 By default DMA-mapping subsystem is allowed to assemble the buffer 82 This is a hint to the DMA-mapping subsystem that it's probably not worth 84 efficiency (AKA it's not worth trying to build the mapping out of larger [all …]
|
| /linux/drivers/sh/clk/ |
| H A D | core.c | 340 struct clk_mapping *mapping = clk->mapping; in clk_establish_mapping() local 345 if (!mapping) { in clk_establish_mapping() 349 * dummy mapping for root clocks with no specified ranges in clk_establish_mapping() 352 clk->mapping = &dummy_mapping; in clk_establish_mapping() 357 * If we're on a child clock and it provides no mapping of its in clk_establish_mapping() 358 * own, inherit the mapping from its root clock. in clk_establish_mapping() 361 mapping = clkp->mapping; in clk_establish_mapping() 362 BUG_ON(!mapping); in clk_establish_mapping() 366 * Establish initial mapping. in clk_establish_mapping() 368 if (!mapping->base && mapping->phys) { in clk_establish_mapping() [all …]
|
| /linux/mm/ |
| H A D | readahead.c | 142 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) in file_ra_state_init() argument 144 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init() 162 const struct address_space_operations *aops = rac->mapping->a_ops; in read_pages() 218 * Context: File is referenced by caller, and ractl->mapping->invalidate_lock 225 struct address_space *mapping = ractl->mapping; in page_cache_ra_unbounded() local 227 gfp_t gfp_mask = readahead_gfp_mask(mapping); in page_cache_ra_unbounded() 229 unsigned int min_nrpages = mapping_min_folio_nrpages(mapping); in page_cache_ra_unbounded() 238 * filesystems already specify __GFP_NOFS in their mapping's in page_cache_ra_unbounded() 243 lockdep_assert_held(&mapping->invalidate_lock); in page_cache_ra_unbounded() 245 trace_page_cache_ra_unbounded(mapping->host, index, nr_to_read, in page_cache_ra_unbounded() [all …]
|
| /linux/Documentation/mm/ |
| H A D | highmem.rst | 18 The part of (physical) memory not covered by a permanent mapping is what we 64 These mappings are thread-local and CPU-local, meaning that the mapping 66 CPU while the mapping is active. Although preemption is never disabled by 68 CPU-hotplug until the mapping is disposed. 71 in which the local mapping is acquired does not allow it for other reasons. 82 virtual address of the direct mapping. Only real highmem pages are 95 therefore try to design their code to avoid the use of kmap() by mapping 107 NOTE: Conversions to kmap_local_page() must take care to follow the mapping 116 This permits a very short duration mapping of a single page. Since the 117 mapping is restricted to the CPU that issued it, it performs well, but [all …]
|
| /linux/tools/testing/selftests/namespaces/ |
| H A D | file_handle_test.c | 491 /* Disable setgroups to allow gid mapping */ in TEST() 496 char mapping[64]; in TEST() local 497 snprintf(mapping, sizeof(mapping), "0 %d 1", getuid()); in TEST() 498 write(uid_map_fd, mapping, strlen(mapping)); in TEST() 501 snprintf(mapping, sizeof(mapping), "0 %d 1", getgid()); in TEST() 502 write(gid_map_fd, mapping, strlen(mapping)); in TEST() 620 /* Disable setgroups to allow gid mapping */ in TEST() 625 char mapping[64]; in TEST() local 626 snprintf(mapping, sizeof(mapping), "0 %d 1", getuid()); in TEST() 627 write(uid_map_fd, mapping, strlen(mapping)); in TEST() [all …]
|
| /linux/Documentation/arch/riscv/ |
| H A D | boot.rst | 14 mapping is set up. 40 PMPs, in the direct mapping, so the firmware must correctly mark those regions 117 Virtual mapping installation 120 The installation of the virtual mapping is done in 2 steps in the RISC-V kernel: 122 1. ``setup_vm()`` installs a temporary kernel mapping in ``early_pg_dir`` which 124 at this point. When establishing this mapping, no allocation can be done 128 2. ``setup_vm_final()`` creates the final kernel mapping in ``swapper_pg_dir`` 130 mapping. When establishing this mapping, the kernel can allocate memory but 131 cannot access it directly (since the direct mapping is not present yet), so 136 direct mapping addresses to physical addresses, they need to know the start of [all …]
|
| /linux/drivers/net/wireless/marvell/mwifiex/ |
| H A D | util.h | 57 struct mwifiex_dma_mapping *mapping) in mwifiex_store_mapping() argument 61 memcpy(&cb->dma_mapping, mapping, sizeof(*mapping)); in mwifiex_store_mapping() 65 struct mwifiex_dma_mapping *mapping) in mwifiex_get_mapping() argument 69 memcpy(mapping, &cb->dma_mapping, sizeof(*mapping)); in mwifiex_get_mapping() 74 struct mwifiex_dma_mapping mapping; in MWIFIEX_SKB_DMA_ADDR() local 76 mwifiex_get_mapping(skb, &mapping); in MWIFIEX_SKB_DMA_ADDR() 78 return mapping.addr; in MWIFIEX_SKB_DMA_ADDR()
|
| /linux/drivers/pci/controller/ |
| H A D | pcie-iproc.h | 33 * struct iproc_pcie_ob - iProc PCIe outbound mapping 36 * @nr_windows: total number of supported outbound mapping windows 44 * struct iproc_pcie_ib - iProc PCIe inbound mapping 45 * @nr_regions: total number of supported inbound mapping regions 73 * @need_ob_cfg: indicates SW needs to configure the outbound mapping window 74 * @ob: outbound mapping related parameters 75 * @ob_map: outbound mapping related parameters specific to the controller 77 * @need_ib_cfg: indicates SW needs to configure the inbound mapping window 78 * @ib: inbound mapping related parameters 79 * @ib_map: outbound mapping region related parameters
|
| /linux/include/trace/events/ |
| H A D | page_ref.h | 24 __field(void *, mapping) 34 __entry->mapping = page->mapping; 39 TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d", 43 __entry->mapcount, __entry->mapping, __entry->mt, 72 __field(void *, mapping) 83 __entry->mapping = page->mapping; 89 TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d ret=%d", 93 __entry->mapcount, __entry->mapping, __entry->mt,
|
| /linux/arch/nios2/include/asm/ |
| H A D | cacheflush.h | 54 #define flush_dcache_mmap_lock(mapping) xa_lock_irq(&mapping->i_pages) argument 55 #define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&mapping->i_pages) argument 56 #define flush_dcache_mmap_lock_irqsave(mapping, flags) \ argument 57 xa_lock_irqsave(&mapping->i_pages, flags) 58 #define flush_dcache_mmap_unlock_irqrestore(mapping, flags) \ argument 59 xa_unlock_irqrestore(&mapping->i_pages, flags)
|
| /linux/arch/powerpc/boot/dts/fsl/ |
| H A D | t4240si-pre.dtsi | 95 fsl,portid-mapping = <0x80000000>; 102 fsl,portid-mapping = <0x80000000>; 109 fsl,portid-mapping = <0x80000000>; 116 fsl,portid-mapping = <0x80000000>; 123 fsl,portid-mapping = <0x40000000>; 130 fsl,portid-mapping = <0x40000000>; 137 fsl,portid-mapping = <0x40000000>; 144 fsl,portid-mapping = <0x40000000>; 151 fsl,portid-mapping = <0x20000000>; 158 fsl,portid-mapping = <0x20000000>; [all …]
|
| /linux/fs/ntfs/ |
| H A D | aops.c | 25 struct ntfs_inode *ni = NTFS_I(folio->mapping->host); in ntfs_iomap_read_end_io() 70 struct ntfs_inode *ni = NTFS_I(folio->mapping->host); in ntfs_read_folio() 112 * @mapping: address space mapping to which the block to be mapped belongs 117 * mapping @mapping to its physical device block. 125 * Return the physical device block if the mapping succeeded or 0 if the block 133 static sector_t ntfs_bmap(struct address_space *mapping, sector_t block) in ntfs_bmap() argument 139 struct ntfs_inode *ni = NTFS_I(mapping->host); in ntfs_bmap() 193 "Not enough memory to complete mapping for inode 0x%llx. Returning 0.", in ntfs_bmap() 198 "Failed to complete mapping for inode 0x%llx. Run chkdsk. Returning 0.", in ntfs_bmap() 234 struct address_space *mapping = rac->mapping; in ntfs_readahead() local [all …]
|
| /linux/fs/xfs/ |
| H A D | xfs_aops.c | 81 * out. If we don't, we can leave a stale delalloc mapping covered by a clean 82 * page that needs to be dirtied again before the delalloc mapping can be 83 * converted. This stale delalloc mapping can trip up a later direct I/O read 97 struct xfs_inode *ip = XFS_I(folio->mapping->host); in xfs_discard_folio() 117 * Fast revalidation of the cached writeback mapping. Return true if the current 118 * mapping is valid, false otherwise. 130 * If this is a COW mapping, it is sufficient to check that the mapping in xfs_imap_valid() 132 * can revalidate a COW mapping without updating the data seqno. in xfs_imap_valid() 138 * This is not a COW mapping. Check the sequence number of the data fork in xfs_imap_valid() 185 * check for overlap on reflink inodes unless the mapping is already a in xfs_map_blocks() [all …]
|
| /linux/drivers/net/ethernet/broadcom/bnxt/ |
| H A D | bnxt_xdp.c | 28 dma_addr_t mapping, u32 len, in bnxt_xmit_bd() argument 56 txbd->tx_bd_haddr = cpu_to_le64(mapping); in bnxt_xmit_bd() 96 dma_addr_t mapping, u32 len, u16 rx_prod, in __bnxt_xmit_xdp() argument 101 tx_buf = bnxt_xmit_bd(bp, txr, mapping, len, xdp); in __bnxt_xmit_xdp() 109 dma_addr_t mapping, u32 len, in __bnxt_xmit_xdp_redirect() argument 114 tx_buf = bnxt_xmit_bd(bp, txr, mapping, len, NULL); in __bnxt_xmit_xdp_redirect() 117 dma_unmap_addr_set(tx_buf, mapping, mapping); in __bnxt_xmit_xdp_redirect() 142 dma_unmap_addr(tx_buf, mapping), in bnxt_tx_int_xdp() 189 dma_addr_t mapping; in bnxt_xdp_buff_init() local 196 mapping = rx_buf->mapping - bp->rx_dma_offset; in bnxt_xdp_buff_init() [all …]
|
| /linux/Documentation/arch/arm/ |
| H A D | memory.rst | 26 setup a minicache mapping. 42 fffe8000 fffeffff DTCM mapping area for platforms with 45 fffe0000 fffe7fff ITCM mapping area for platforms with 48 ffc80000 ffefffff Fixmap mapping region. Addresses provided 53 ff800000 ffbfffff Permanent, fixed read-only mapping of the 56 fee00000 feffffff Mapping of PCI I/O space. This is a static 57 mapping within the vmalloc space. 73 One way of mapping HIGHMEM pages into kernel 93 space are also caught via this mapping. 100 Since future CPUs may impact the kernel mapping layout, user programs
|