Home
last modified time | relevance | path

Searched full:mapping (Results 1 – 25 of 3119) sorted by relevance

12345678910>>...125

/linux/include/linux/
H A Dpagemap.h21 unsigned long invalidate_mapping_pages(struct address_space *mapping,
30 int invalidate_inode_pages2(struct address_space *mapping);
31 int invalidate_inode_pages2_range(struct address_space *mapping,
35 int filemap_invalidate_pages(struct address_space *mapping,
41 int filemap_flush_nr(struct address_space *mapping, long *nr_to_write);
42 int filemap_fdatawait_keep_errors(struct address_space *mapping);
44 int filemap_fdatawait_range_keep_errors(struct address_space *mapping,
49 static inline int filemap_fdatawait(struct address_space *mapping) in filemap_fdatawait() argument
51 return filemap_fdatawait_range(mapping, 0, LLONG_MAX); in filemap_fdatawait()
55 int filemap_write_and_wait_range(struct address_space *mapping,
[all …]
H A Dio-mapping.h17 * 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 …]
H A Dtpm_eventlog.h141 static inline void TPM_MEMUNMAP(void *mapping, size_t size) in TPM_MEMUNMAP() argument
171 void *mapping = NULL; in __calc_tpm2_event_size() local
191 mapping = TPM_MEMREMAP((unsigned long)marker_start, in __calc_tpm2_event_size()
193 if (!mapping) { in __calc_tpm2_event_size()
198 mapping = marker_start; in __calc_tpm2_event_size()
201 event = (struct tcg_pcr_event2_head *)mapping; in __calc_tpm2_event_size()
238 TPM_MEMUNMAP(mapping, mapping_size); in __calc_tpm2_event_size()
240 mapping = TPM_MEMREMAP((unsigned long)marker, in __calc_tpm2_event_size()
242 if (!mapping) { in __calc_tpm2_event_size()
247 mapping = marker; in __calc_tpm2_event_size()
[all …]
/linux/tools/testing/selftests/arm64/mte/
H A Dcheck_mmap_options.c47 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, %s mode, %s memory and %s (%s)\n", in format_test_name()
[all …]
H A Dcheck_child_memory.c84 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()
170 "Check child anonymous memory with private mapping, precise mode and mmap memory\n"); in main()
172 "Check child anonymous memory with shared mapping, precise mode and mmap memory\n"); in main()
174 "Check child anonymous memory with private mapping, imprecise mode and mmap memory\n"); in main()
176 "Check child anonymous memory with shared mapping, imprecise mode and mmap memory\n"); in main()
178 "Check child anonymous memory with private mapping, precise mode and mmap/mprotect memory\n"); in main()
180 "Check child anonymous memory with shared mapping, precise mode and mmap/mprotect memory\n"); in main()
[all …]
H A Dcheck_hugetlb_options.c146 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()
263 "Check hugetlb memory with private mapping, sync error mode, mmap memory and tag check off\n"); in main()
267 "Check hugetlb memory with private mapping, no error mode, mmap memory and tag check off\n"); in main()
270 "Check hugetlb memory with private mapping, sync error mode, mmap memory and tag check on\n"); in main()
272 …"Check hugetlb memory with private mapping, sync error mode, mmap/mprotect memory and tag check on… in main()
[all …]
/linux/arch/arm/mm/
H A Ddma-mapping.c3 * 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 …]
H A Dflush.c199 void __flush_dcache_folio(struct address_space *mapping, struct folio *folio) in __flush_dcache_folio() argument
202 * Writeback any data associated with the kernel mapping of this in __flush_dcache_folio()
204 * coherent with the kernels mapping. in __flush_dcache_folio()
234 if (mapping && cache_is_vipt_aliasing()) in __flush_dcache_folio()
238 static void __flush_dcache_aliases(struct address_space *mapping, struct folio *folio) in __flush_dcache_aliases() argument
248 * - aliasing VIPT: we only need to find one mapping of this page. in __flush_dcache_aliases()
253 flush_dcache_mmap_lock(mapping); in __flush_dcache_aliases()
254 vma_interval_tree_foreach(vma, &mapping->i_mmap, pgoff, pgoff_end) { in __flush_dcache_aliases()
281 flush_dcache_mmap_unlock(mapping); in __flush_dcache_aliases()
289 struct address_space *mapping; in __sync_icache_dcache() local
[all …]
/linux/drivers/media/usb/uvc/
H A Duvc_ctrl.c410 static bool uvc_ctrl_mapping_is_compound(struct uvc_control_mapping *mapping) in uvc_ctrl_mapping_is_compound() argument
412 return mapping->v4l2_type >= V4L2_CTRL_COMPOUND_TYPES; in uvc_ctrl_mapping_is_compound()
415 static s32 uvc_mapping_get_s32(struct uvc_control_mapping *mapping, in uvc_mapping_get_s32() argument
420 mapping->get(mapping, query, data_in, sizeof(data_out), &data_out); in uvc_mapping_get_s32()
425 static void uvc_mapping_set_s32(struct uvc_control_mapping *mapping, in uvc_mapping_set_s32() argument
428 mapping->set(mapping, sizeof(data_in), &data_in, data_out); in uvc_mapping_set_s32()
434 * device. The custom menu_mapping in the control @mapping is used when
445 static int uvc_mapping_get_menu_value(const struct uvc_control_mapping *mapping, in uvc_mapping_get_menu_value() argument
448 if (!test_bit(idx, &mapping->menu_mask)) in uvc_mapping_get_menu_value()
451 if (mapping->menu_mapping) in uvc_mapping_get_menu_value()
[all …]
/linux/drivers/gpu/drm/tegra/
H A Duapi.c17 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/drivers/gpu/drm/etnaviv/
H A Detnaviv_mmu.c6 #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 …]
H A Detnaviv_gem.c8 #include <linux/dma-mapping.h>
219 struct etnaviv_vram_mapping *mapping; in etnaviv_gem_get_vram_mapping() local
221 list_for_each_entry(mapping, &obj->vram_list, obj_node) { in etnaviv_gem_get_vram_mapping()
222 if (mapping->context == context) in etnaviv_gem_get_vram_mapping()
223 return mapping; in etnaviv_gem_get_vram_mapping()
229 void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping) in etnaviv_gem_mapping_unreference() argument
231 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_gem_mapping_unreference()
234 WARN_ON(mapping->use == 0); in etnaviv_gem_mapping_unreference()
235 mapping->use -= 1; in etnaviv_gem_mapping_unreference()
246 struct etnaviv_vram_mapping *mapping; in etnaviv_gem_mapping_get() local
[all …]
/linux/mm/
H A Dfilemap.c129 static void page_cache_delete(struct address_space *mapping, in page_cache_delete() argument
132 XA_STATE(xas, &mapping->i_pages, folio->index); in page_cache_delete()
135 mapping_set_update(&xas, mapping); in page_cache_delete()
145 folio->mapping = NULL; in page_cache_delete()
147 mapping->nrpages -= nr; in page_cache_delete()
150 static void filemap_unaccount_folio(struct address_space *mapping, in filemap_unaccount_folio() argument
163 if (mapping_exiting(mapping) && !folio_test_large(folio)) { in filemap_unaccount_folio()
192 filemap_nr_thps_dec(mapping); in filemap_unaccount_folio()
194 if (test_bit(AS_KERNEL_FILE, &folio->mapping->flags)) in filemap_unaccount_folio()
213 mapping_can_writeback(mapping))) in filemap_unaccount_folio()
[all …]
/linux/Documentation/driver-api/
H A Dio-mapping.rst8 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/drivers/gpu/drm/exynos/
H A Dexynos_drm_dma.c34 * drm_iommu_attach_device- attach device to iommu mapping
40 * mapping.
57 * Keep the original DMA mapping of the sub-device and in drm_iommu_attach_device()
66 ret = arm_iommu_attach_device(subdrv_dev, priv->mapping); in drm_iommu_attach_device()
68 ret = iommu_attach_device(priv->mapping, subdrv_dev); in drm_iommu_attach_device()
75 * drm_iommu_detach_device -detach device address space mapping from device
81 * mapping
92 iommu_detach_device(priv->mapping, subdrv_dev); in drm_iommu_detach_device()
102 DRM_INFO("Exynos DRM: using %s device for DMA mapping operations\n", in exynos_drm_register_dma()
109 if (!priv->mapping) { in exynos_drm_register_dma()
[all …]
/linux/Documentation/filesystems/iomap/
H A Ddesign.rst70 of mapping function calls into the filesystem across a larger amount of
78 1. Obtain a space mapping via ``->iomap_begin``
82 1. Revalidate the mapping and go back to (1) above, if necessary.
89 4. Release the mapping via ``->iomap_end``, if necessary
130 * **filesystem mapping lock**: This synchronization primitive is
131 internal to the filesystem and must protect the file mapping data
132 from updates while a mapping is being sampled.
138 mapping.
154 The filesystem communicates to the iomap iterator the mapping of
176 bytes, covered by this mapping.
[all …]
/linux/tools/testing/selftests/mm/
H A Dmremap_dontunmap.c59 "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 Dvfio_dma_mapping_test.c39 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; in TEST_F() local
[all …]
/linux/drivers/sh/clk/
H A Dcore.c340 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/tools/testing/selftests/namespaces/
H A Dfile_handle_test.c491 /* 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/mm/
H A Dhighmem.rst18 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/Documentation/arch/riscv/
H A Dboot.rst14 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/fs/freevxfs/
H A Dvxfs_subr.c34 * @mapping: mapping to read from
44 vxfs_get_page(struct address_space *mapping, u_long n) in vxfs_get_page() argument
48 pp = read_mapping_page(mapping, n, NULL); in vxfs_get_page()
134 * vxfs_bmap - perform logical to physical block mapping
135 * @mapping: logical to physical mapping to use
136 * @block: logical block (relative to @mapping).
140 * @mapping, @block pair.
149 vxfs_bmap(struct address_space *mapping, sector_t block) in vxfs_bmap() argument
151 return generic_block_bmap(mapping, block, vxfs_getblk); in vxfs_bmap()
/linux/Documentation/core-api/
H A Ddma-attributes.rst6 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/net/wireless/marvell/mwifiex/
H A Dutil.h57 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()

12345678910>>...125