Home
last modified time | relevance | path

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

12345678910>>...189

/Linux-v5.15/drivers/gpu/drm/tegra/
Duapi.c17 struct tegra_drm_mapping *mapping = in tegra_drm_mapping_release() local
20 if (mapping->sgt) in tegra_drm_mapping_release()
21 dma_unmap_sgtable(mapping->dev, mapping->sgt, mapping->direction, in tegra_drm_mapping_release()
24 host1x_bo_unpin(mapping->dev, mapping->bo, mapping->sgt); in tegra_drm_mapping_release()
25 host1x_bo_put(mapping->bo); in tegra_drm_mapping_release()
27 kfree(mapping); in tegra_drm_mapping_release()
30 void tegra_drm_mapping_put(struct tegra_drm_mapping *mapping) in tegra_drm_mapping_put() argument
32 kref_put(&mapping->ref, tegra_drm_mapping_release); in tegra_drm_mapping_put()
37 struct tegra_drm_mapping *mapping; in tegra_drm_channel_context_close() local
40 xa_for_each(&context->mappings, id, mapping) in tegra_drm_channel_context_close()
[all …]
/Linux-v5.15/mm/
Dtruncate.c34 static inline void __clear_shadow_entry(struct address_space *mapping, in __clear_shadow_entry() argument
37 XA_STATE(xas, &mapping->i_pages, index); in __clear_shadow_entry()
45 static void clear_shadow_entry(struct address_space *mapping, pgoff_t index, in clear_shadow_entry() argument
48 xa_lock_irq(&mapping->i_pages); in clear_shadow_entry()
49 __clear_shadow_entry(mapping, index, entry); in clear_shadow_entry()
50 xa_unlock_irq(&mapping->i_pages); in clear_shadow_entry()
58 static void truncate_exceptional_pvec_entries(struct address_space *mapping, in truncate_exceptional_pvec_entries() argument
65 if (shmem_mapping(mapping)) in truncate_exceptional_pvec_entries()
75 dax = dax_mapping(mapping); in truncate_exceptional_pvec_entries()
77 xa_lock_irq(&mapping->i_pages); in truncate_exceptional_pvec_entries()
[all …]
Dfilemap.c124 static void page_cache_delete(struct address_space *mapping, in page_cache_delete() argument
127 XA_STATE(xas, &mapping->i_pages, page->index); in page_cache_delete()
130 mapping_set_update(&xas, mapping); in page_cache_delete()
145 page->mapping = NULL; in page_cache_delete()
147 mapping->nrpages -= nr; in page_cache_delete()
150 static void unaccount_page_cache_page(struct address_space *mapping, in unaccount_page_cache_page() argument
163 cleancache_invalidate_page(mapping, page); in unaccount_page_cache_page()
177 if (mapping_exiting(mapping) && in unaccount_page_cache_page()
203 filemap_nr_thps_dec(mapping); in unaccount_page_cache_page()
217 account_page_cleaned(page, mapping, inode_to_wb(mapping->host)); in unaccount_page_cache_page()
[all …]
Dreadahead.c34 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) in file_ra_state_init() argument
36 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init()
48 static void read_cache_pages_invalidate_page(struct address_space *mapping, in read_cache_pages_invalidate_page() argument
54 page->mapping = mapping; in read_cache_pages_invalidate_page()
56 page->mapping = NULL; in read_cache_pages_invalidate_page()
65 static void read_cache_pages_invalidate_pages(struct address_space *mapping, in read_cache_pages_invalidate_pages() argument
73 read_cache_pages_invalidate_page(mapping, victim); in read_cache_pages_invalidate_pages()
79 * @mapping: the address_space
89 int read_cache_pages(struct address_space *mapping, struct list_head *pages, in read_cache_pages() argument
98 if (add_to_page_cache_lru(page, mapping, page->index, in read_cache_pages()
[all …]
/Linux-v5.15/drivers/gpu/drm/panfrost/
Dpanfrost_gem.c7 #include <linux/dma-mapping.h>
59 struct panfrost_gem_mapping *iter, *mapping = NULL; in panfrost_gem_mapping_get() local
65 mapping = iter; in panfrost_gem_mapping_get()
71 return mapping; in panfrost_gem_mapping_get()
75 panfrost_gem_teardown_mapping(struct panfrost_gem_mapping *mapping) in panfrost_gem_teardown_mapping() argument
77 if (mapping->active) in panfrost_gem_teardown_mapping()
78 panfrost_mmu_unmap(mapping); in panfrost_gem_teardown_mapping()
80 spin_lock(&mapping->mmu->mm_lock); in panfrost_gem_teardown_mapping()
81 if (drm_mm_node_allocated(&mapping->mmnode)) in panfrost_gem_teardown_mapping()
82 drm_mm_remove_node(&mapping->mmnode); in panfrost_gem_teardown_mapping()
[all …]
/Linux-v5.15/include/linux/
Dpagemap.h21 static inline bool mapping_empty(struct address_space *mapping) in mapping_empty() argument
23 return xa_empty(&mapping->i_pages); in mapping_empty()
27 * Bits in mapping->flags.
42 * @mapping: the mapping in which an error should be set
43 * @error: the error to set in the mapping
51 * mapping_set_error to record the error in the mapping so that it can be
54 static inline void mapping_set_error(struct address_space *mapping, int error) in mapping_set_error() argument
60 __filemap_set_wb_err(mapping, error); in mapping_set_error()
63 if (mapping->host) in mapping_set_error()
64 errseq_set(&mapping->host->i_sb->s_wb_err, error); in mapping_set_error()
[all …]
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()
74 return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot); in io_mapping_map_atomic_wc()
86 io_mapping_map_local_wc(struct io_mapping *mapping, unsigned long offset) in io_mapping_map_local_wc() argument
[all …]
Ddma-buf-map.h71 * Test if a mapping is valid with either dma_buf_map_is_set() or
134 * dma_buf_map_set_vaddr - Sets a dma-buf mapping structure to an address in system memory
135 * @map: The dma-buf mapping structure
147 * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping structure to an address in I/O memory
148 * @map: The dma-buf mapping structure
161 * dma_buf_map_is_equal - Compares two dma-buf mapping structures for equality
162 * @lhs: The dma-buf mapping structure
163 * @rhs: A dma-buf mapping structure to compare with
165 * Two dma-buf mapping structures are equal if they both refer to the same type of memory
183 * dma_buf_map_is_null - Tests for a dma-buf mapping to be NULL
[all …]
Dtpm_eventlog.h166 void *mapping = NULL; in __calc_tpm2_event_size() local
186 mapping = TPM_MEMREMAP((unsigned long)marker_start, in __calc_tpm2_event_size()
188 if (!mapping) { in __calc_tpm2_event_size()
193 mapping = marker_start; in __calc_tpm2_event_size()
196 event = (struct tcg_pcr_event2_head *)mapping; in __calc_tpm2_event_size()
233 TPM_MEMUNMAP(mapping, mapping_size); in __calc_tpm2_event_size()
235 mapping = TPM_MEMREMAP((unsigned long)marker, in __calc_tpm2_event_size()
237 if (!mapping) { in __calc_tpm2_event_size()
242 mapping = marker; in __calc_tpm2_event_size()
245 memcpy(&halg, mapping, halg_size); in __calc_tpm2_event_size()
[all …]
/Linux-v5.15/Documentation/admin-guide/mm/
Dnommu-mmap.rst2 No-MMU memory mapping support
5 The kernel has limited support for memory mapping under no-MMU conditions, such
7 mapping is made use of in conjunction with the mmap() system call, the shmat()
9 mapping is actually performed by the binfmt drivers, which call back into the
12 Memory mapping behaviour also involves the way fork(), vfork(), clone() and
19 (#) Anonymous mapping, MAP_PRIVATE
27 (#) Anonymous mapping, MAP_SHARED
37 the underlying file are reflected in the mapping; copied across fork.
41 - If one exists, the kernel will re-use an existing mapping to the
45 - If possible, the file mapping will be directly on the backing device
[all …]
/Linux-v5.15/drivers/gpu/drm/exynos/
Dexynos_drm_dma.c35 * drm_iommu_attach_device- attach device to iommu mapping
41 * mapping.
58 * Keep the original DMA mapping of the sub-device and in drm_iommu_attach_device()
67 ret = arm_iommu_attach_device(subdrv_dev, priv->mapping); in drm_iommu_attach_device()
69 ret = iommu_attach_device(priv->mapping, subdrv_dev); in drm_iommu_attach_device()
76 * drm_iommu_detach_device -detach device address space mapping from device
82 * mapping
93 iommu_detach_device(priv->mapping, subdrv_dev); in drm_iommu_detach_device()
103 DRM_INFO("Exynos DRM: using %s device for DMA mapping operations\n", in exynos_drm_register_dma()
110 if (!priv->mapping) { in exynos_drm_register_dma()
[all …]
/Linux-v5.15/Documentation/driver-api/
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-v5.15/drivers/media/usb/uvc/
Duvc_ctrl.c373 static s32 uvc_ctrl_get_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_get_zoom() argument
391 static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_set_zoom() argument
398 static s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_get_rel_speed() argument
401 unsigned int first = mapping->offset / 8; in uvc_ctrl_get_rel_speed()
418 static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_set_rel_speed() argument
421 unsigned int first = mapping->offset / 8; in uvc_ctrl_set_rel_speed()
777 /* Extract the bit string specified by mapping->offset and mapping->size
779 * a signed 32bit integer. Sign extension will be performed if the mapping
782 static s32 uvc_get_le_value(struct uvc_control_mapping *mapping, in uvc_get_le_value() argument
785 int bits = mapping->size; in uvc_get_le_value()
[all …]
/Linux-v5.15/tools/testing/selftests/vm/
Dmremap_dontunmap.c62 "unable to unmap destination mapping"); in kernel_support_for_mremap_dontunmap()
66 "unable to unmap source mapping"); in kernel_support_for_mremap_dontunmap()
70 // This helper will just validate that an entire mapping contains the expected
97 // the source mapping mapped.
109 // Try to just move the whole mapping anywhere (not fixed). in mremap_dontunmap_simple()
125 "unable to unmap destination mapping"); in mremap_dontunmap_simple()
127 "unable to unmap source mapping"); in mremap_dontunmap_simple()
130 // This test validates that MREMAP_DONTUNMAP on a shared mapping works as expected.
150 // Try to just move the whole mapping anywhere (not fixed). in mremap_dontunmap_simple_shmem()
157 "unable to unmap source mapping"); in mremap_dontunmap_simple_shmem()
[all …]
/Linux-v5.15/tools/testing/selftests/arm64/mte/
Dcheck_mmap_options.c60 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_anonymous_memory_mapping() argument
70 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping()
92 static int check_file_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_file_memory_mapping() argument
106 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping()
131 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument
141 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag()
162 ptr = (char *)mte_allocate_file_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag()
214 "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check off\n"); in main()
216 …"Check file memory with private mapping, sync error mode, mmap/mprotect memory and tag check off\n… in main()
220 "Check anonymous memory with private mapping, no error mode, mmap memory and tag check off\n"); in main()
[all …]
/Linux-v5.15/arch/arm/mm/
Ddma-mapping.c3 * linux/arch/arm/mm/dma-mapping.c
7 * DMA uncached mapping support.
420 * Clear previous low-memory mapping to ensure that the in dma_contiguous_remap()
783 * Create userspace mapping for the DMA-coherent memory.
801 * Free a buffer as defined by the above mapping.
910 * Use the driver DMA support - see dma-mapping.h (dma_sync_*)
1101 static int extend_iommu_mapping(struct dma_iommu_mapping *mapping);
1103 static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping, in __alloc_iova() argument
1109 size_t mapping_size = mapping->bits << PAGE_SHIFT; in __alloc_iova()
1120 spin_lock_irqsave(&mapping->lock, flags); in __alloc_iova()
[all …]
Dflush.c199 void __flush_dcache_page(struct address_space *mapping, struct page *page) in __flush_dcache_page() argument
202 * Writeback any data associated with the kernel mapping of this in __flush_dcache_page()
204 * coherent with the kernels mapping. in __flush_dcache_page()
232 if (mapping && cache_is_vipt_aliasing()) in __flush_dcache_page()
237 static void __flush_dcache_aliases(struct address_space *mapping, struct page *page) in __flush_dcache_aliases() argument
247 * - aliasing VIPT: we only need to find one mapping of this page. in __flush_dcache_aliases()
251 flush_dcache_mmap_lock(mapping); in __flush_dcache_aliases()
252 vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) { in __flush_dcache_aliases()
265 flush_dcache_mmap_unlock(mapping); in __flush_dcache_aliases()
273 struct address_space *mapping; in __sync_icache_dcache() local
[all …]
/Linux-v5.15/drivers/gpu/drm/etnaviv/
Detnaviv_mmu.c6 #include <linux/dma-mapping.h>
65 /* unroll mapping in case something went wrong */ in etnaviv_context_map()
123 struct etnaviv_vram_mapping *mapping) in etnaviv_iommu_remove_mapping() argument
125 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_iommu_remove_mapping()
129 etnaviv_iommu_unmap(context, mapping->vram_node.start, in etnaviv_iommu_remove_mapping()
131 drm_mm_remove_node(&mapping->vram_node); in etnaviv_iommu_remove_mapping()
166 * so we must keep its mapping. in etnaviv_iommu_find_iova()
198 * this mapping. in etnaviv_iommu_find_iova()
230 struct etnaviv_vram_mapping *mapping, u64 va) in etnaviv_iommu_map_gem() argument
247 mapping->iova = iova; in etnaviv_iommu_map_gem()
[all …]
Detnaviv_gem.c7 #include <linux/dma-mapping.h>
218 struct etnaviv_vram_mapping *mapping; in etnaviv_gem_get_vram_mapping() local
220 list_for_each_entry(mapping, &obj->vram_list, obj_node) { in etnaviv_gem_get_vram_mapping()
221 if (mapping->context == context) in etnaviv_gem_get_vram_mapping()
222 return mapping; in etnaviv_gem_get_vram_mapping()
228 void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping) in etnaviv_gem_mapping_unreference() argument
230 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_gem_mapping_unreference()
233 WARN_ON(mapping->use == 0); in etnaviv_gem_mapping_unreference()
234 mapping->use -= 1; in etnaviv_gem_mapping_unreference()
245 struct etnaviv_vram_mapping *mapping; in etnaviv_gem_mapping_get() local
[all …]
/Linux-v5.15/fs/
Ddax.c191 * @entry may no longer be the entry at the index in the mapping.
342 static void dax_associate_entry(void *entry, struct address_space *mapping, in dax_associate_entry() argument
355 WARN_ON_ONCE(page->mapping); in dax_associate_entry()
356 page->mapping = mapping; in dax_associate_entry()
361 static void dax_disassociate_entry(void *entry, struct address_space *mapping, in dax_disassociate_entry() argument
373 WARN_ON_ONCE(page->mapping && page->mapping != mapping); in dax_disassociate_entry()
374 page->mapping = NULL; in dax_disassociate_entry()
405 /* Ensure page->mapping isn't freed while we look at it */ in dax_lock_page()
408 struct address_space *mapping = READ_ONCE(page->mapping); in dax_lock_page() local
411 if (!mapping || !dax_mapping(mapping)) in dax_lock_page()
[all …]
/Linux-v5.15/drivers/sh/clk/
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-v5.15/arch/nios2/mm/
Dcacheflush.c74 static void flush_aliases(struct address_space *mapping, struct page *page) in flush_aliases() argument
82 flush_dcache_mmap_lock(mapping); in flush_aliases()
83 vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) { in flush_aliases()
95 flush_dcache_mmap_unlock(mapping); in flush_aliases()
161 void __flush_dcache_page(struct address_space *mapping, struct page *page) in __flush_dcache_page() argument
164 * Writeback any data associated with the kernel mapping of this in __flush_dcache_page()
166 * coherent with the kernels mapping. in __flush_dcache_page()
175 struct address_space *mapping; in flush_dcache_page() local
184 mapping = page_mapping_file(page); in flush_dcache_page()
187 if (mapping && !mapping_mapped(mapping)) { in flush_dcache_page()
[all …]
/Linux-v5.15/fs/gfs2/
Daops.c91 struct inode *inode = page->mapping->host; in gfs2_writepage()
120 struct inode * const inode = page->mapping->host; in gfs2_write_jdata_page()
153 struct inode *inode = page->mapping->host; in __gfs2_jdata_writepage()
179 struct inode *inode = page->mapping->host; in gfs2_jdata_writepage()
198 * @mapping: The mapping to write
203 static int gfs2_writepages(struct address_space *mapping, in gfs2_writepages() argument
206 struct gfs2_sbd *sdp = gfs2_mapping2sbd(mapping); in gfs2_writepages()
216 ret = iomap_writepages(mapping, wbc, &wpc, &gfs2_writeback_ops); in gfs2_writepages()
224 * @mapping: The mapping
233 static int gfs2_write_jdata_pagevec(struct address_space *mapping, in gfs2_write_jdata_pagevec() argument
[all …]
/Linux-v5.15/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_xdp.c25 dma_addr_t mapping, u32 len) in bnxt_xmit_bd() argument
40 txbd->tx_bd_haddr = cpu_to_le64(mapping); in bnxt_xmit_bd()
48 dma_addr_t mapping, u32 len, u16 rx_prod) in __bnxt_xmit_xdp() argument
52 tx_buf = bnxt_xmit_bd(bp, txr, mapping, len); in __bnxt_xmit_xdp()
59 dma_addr_t mapping, u32 len, in __bnxt_xmit_xdp_redirect() argument
64 tx_buf = bnxt_xmit_bd(bp, txr, mapping, len); in __bnxt_xmit_xdp_redirect()
67 dma_unmap_addr_set(tx_buf, mapping, mapping); in __bnxt_xmit_xdp_redirect()
88 dma_unmap_addr(tx_buf, mapping), in bnxt_tx_int_xdp()
119 dma_addr_t mapping; in bnxt_rx_xdp() local
132 mapping = rx_buf->mapping - bp->rx_dma_offset; in bnxt_rx_xdp()
[all …]
/Linux-v5.15/fs/afs/
Dwrite.c30 int afs_write_begin(struct file *file, struct address_space *mapping, in afs_write_begin() argument
49 ret = netfs_write_begin(file, mapping, pos, len, flags, &page, fsdata, in afs_write_begin()
108 int afs_write_end(struct file *file, struct address_space *mapping, in afs_write_end() argument
173 static void afs_kill_pages(struct address_space *mapping, in afs_kill_pages() argument
176 struct afs_vnode *vnode = AFS_FS_I(mapping->host); in afs_kill_pages()
188 pv.nr = find_get_pages_contig(mapping, start / PAGE_SIZE, in afs_kill_pages()
205 generic_error_remove_page(mapping, page); in afs_kill_pages()
219 struct address_space *mapping, in afs_redirty_pages() argument
222 struct afs_vnode *vnode = AFS_FS_I(mapping->host); in afs_redirty_pages()
234 pv.nr = find_get_pages_contig(mapping, start / PAGE_SIZE, in afs_redirty_pages()
[all …]

12345678910>>...189