Home
last modified time | relevance | path

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

12345678910>>...259

/kernel/linux/linux-5.10/drivers/staging/gasket/
Dgasket_sysfs.c17 * The device bound to this mapping. If this is NULL, then this mapping
34 /* Tracks active users of this mapping. */
50 /* Callback when a mapping's refcount goes to zero. */
56 /* Look up mapping information for the given device. */
71 dev_dbg(device, "%s: Mapping to device %s not found\n", in get_mapping()
76 /* Put a reference to a mapping. */
77 static void put_mapping(struct gasket_sysfs_mapping *mapping) in put_mapping() argument
84 if (!mapping) { in put_mapping()
85 pr_debug("%s: Mapping should not be NULL\n", __func__); in put_mapping()
89 mutex_lock(&mapping->mutex); in put_mapping()
[all …]
/kernel/linux/linux-6.6/mm/
Dtruncate.c31 static inline void __clear_shadow_entry(struct address_space *mapping, in __clear_shadow_entry() argument
34 XA_STATE(xas, &mapping->i_pages, index); in __clear_shadow_entry()
42 static void clear_shadow_entry(struct address_space *mapping, pgoff_t index, in clear_shadow_entry() argument
45 spin_lock(&mapping->host->i_lock); in clear_shadow_entry()
46 xa_lock_irq(&mapping->i_pages); in clear_shadow_entry()
47 __clear_shadow_entry(mapping, index, entry); in clear_shadow_entry()
48 xa_unlock_irq(&mapping->i_pages); in clear_shadow_entry()
49 if (mapping_shrinkable(mapping)) in clear_shadow_entry()
50 inode_add_lru(mapping->host); in clear_shadow_entry()
51 spin_unlock(&mapping->host->i_lock); in clear_shadow_entry()
[all …]
Dfilemap.c126 static void page_cache_delete(struct address_space *mapping, in page_cache_delete() argument
129 XA_STATE(xas, &mapping->i_pages, folio->index); in page_cache_delete()
132 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()
210 mapping_can_writeback(mapping))) in filemap_unaccount_folio()
211 folio_account_cleaned(folio, inode_to_wb(mapping->host)); in filemap_unaccount_folio()
[all …]
/kernel/linux/linux-5.10/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()
43 mapping->nrexceptional--; in __clear_shadow_entry()
46 static void clear_shadow_entry(struct address_space *mapping, pgoff_t index, in clear_shadow_entry() argument
49 xa_lock_irq(&mapping->i_pages); in clear_shadow_entry()
50 __clear_shadow_entry(mapping, index, entry); in clear_shadow_entry()
51 xa_unlock_irq(&mapping->i_pages); in clear_shadow_entry()
59 static void truncate_exceptional_pvec_entries(struct address_space *mapping, in truncate_exceptional_pvec_entries() argument
67 if (shmem_mapping(mapping)) in truncate_exceptional_pvec_entries()
77 dax = dax_mapping(mapping); in truncate_exceptional_pvec_entries()
[all …]
Dfilemap.c120 static void page_cache_delete(struct address_space *mapping, in page_cache_delete() argument
123 XA_STATE(xas, &mapping->i_pages, page->index); in page_cache_delete()
126 mapping_set_update(&xas, mapping); in page_cache_delete()
141 page->mapping = NULL; in page_cache_delete()
145 mapping->nrexceptional += nr; in page_cache_delete()
154 mapping->nrpages -= nr; in page_cache_delete()
157 static void unaccount_page_cache_page(struct address_space *mapping, in unaccount_page_cache_page() argument
170 cleancache_invalidate_page(mapping, page); in unaccount_page_cache_page()
184 if (mapping_exiting(mapping) && in unaccount_page_cache_page()
210 filemap_nr_thps_dec(mapping); in unaccount_page_cache_page()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/include/linux/
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,
39 int filemap_fdatawait_keep_errors(struct address_space *mapping);
41 int filemap_fdatawait_range_keep_errors(struct address_space *mapping,
44 static inline int filemap_fdatawait(struct address_space *mapping) in filemap_fdatawait() argument
46 return filemap_fdatawait_range(mapping, 0, LLONG_MAX); in filemap_fdatawait()
50 int filemap_write_and_wait_range(struct address_space *mapping,
52 int __filemap_fdatawrite_range(struct address_space *mapping,
54 int filemap_fdatawrite_range(struct address_space *mapping,
[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()
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 …]
/kernel/linux/linux-5.10/include/linux/
Dpagemap.h22 * Bits in mapping->flags.
37 * @mapping: the mapping in which an error should be set
38 * @error: the error to set in the mapping
46 * mapping_set_error to record the error in the mapping so that it can be
49 static inline void mapping_set_error(struct address_space *mapping, int error) in mapping_set_error() argument
55 __filemap_set_wb_err(mapping, error); in mapping_set_error()
58 if (mapping->host) in mapping_set_error()
59 errseq_set(&mapping->host->i_sb->s_wb_err, error); in mapping_set_error()
63 set_bit(AS_ENOSPC, &mapping->flags); in mapping_set_error()
65 set_bit(AS_EIO, &mapping->flags); 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()
72 return iomap_atomic_prot_pfn(PHYS_PFN(phys_addr), mapping->prot); in io_mapping_map_atomic_wc()
82 io_mapping_map_wc(struct io_mapping *mapping, in io_mapping_map_wc() argument
[all …]
/kernel/linux/linux-6.6/arch/arm/mm/
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_*)
754 static int extend_iommu_mapping(struct dma_iommu_mapping *mapping);
756 static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping, in __alloc_iova() argument
762 size_t mapping_size = mapping->bits << PAGE_SHIFT; in __alloc_iova()
773 spin_lock_irqsave(&mapping->lock, flags); in __alloc_iova()
774 for (i = 0; i < mapping->nr_bitmaps; i++) { in __alloc_iova()
[all …]
/kernel/linux/linux-6.6/drivers/gpu/drm/tegra/
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()
189 struct tegra_drm_mapping *mapping; in tegra_drm_ioctl_channel_map() local
[all …]
/kernel/linux/linux-6.6/drivers/media/usb/uvc/
Duvc_ctrl.c373 * device. The custom menu_mapping in the control @mapping is used when
384 static int uvc_mapping_get_menu_value(const struct uvc_control_mapping *mapping, in uvc_mapping_get_menu_value() argument
387 if (!test_bit(idx, &mapping->menu_mask)) in uvc_mapping_get_menu_value()
390 if (mapping->menu_mapping) in uvc_mapping_get_menu_value()
391 return mapping->menu_mapping[idx]; in uvc_mapping_get_menu_value()
397 uvc_mapping_get_menu_name(const struct uvc_control_mapping *mapping, u32 idx) in uvc_mapping_get_menu_name() argument
399 if (!test_bit(idx, &mapping->menu_mask)) in uvc_mapping_get_menu_name()
402 if (mapping->menu_names) in uvc_mapping_get_menu_name()
403 return mapping->menu_names[idx]; in uvc_mapping_get_menu_name()
405 return v4l2_ctrl_get_menu(mapping->id)[idx]; in uvc_mapping_get_menu_name()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/liteos_a/kernel/base/vm/
Dlos_vm_filemap.c72 STATIC VOID OsPageCacheAdd(LosFilePage *page, struct page_mapping *mapping, VM_OFFSET_T pgoff) in OsPageCacheAdd() argument
76 LOS_DL_LIST_FOR_EACH_ENTRY(fpage, &mapping->page_list, LosFilePage, node) { in OsPageCacheAdd()
83 LOS_ListTailInsert(&mapping->page_list, &page->node); in OsPageCacheAdd()
86 mapping->nrpages++; in OsPageCacheAdd()
89 VOID OsAddToPageacheLru(LosFilePage *page, struct page_mapping *mapping, VM_OFFSET_T pgoff) in OsAddToPageacheLru() argument
91 OsPageCacheAdd(page, mapping, pgoff); in OsAddToPageacheLru()
99 fpage->mapping->nrpages--; in OsPageCacheDel()
176 struct page_mapping *mapping = NULL; in OsVmmFileRemove() local
185 mapping = &vnode->mapping; in OsVmmFileRemove()
196 LOS_SpinLockSave(&mapping->list_lock, &intSave); in OsVmmFileRemove()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/drivers/gpu/drm/etnaviv/
Detnaviv_mmu.c6 #include <linux/dma-mapping.h>
65 /* unroll mapping in case something went wrong */ in etnaviv_context_map()
127 struct etnaviv_vram_mapping *mapping) in etnaviv_iommu_remove_mapping() argument
129 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_iommu_remove_mapping()
133 etnaviv_iommu_unmap(context, mapping->vram_node.start, in etnaviv_iommu_remove_mapping()
135 drm_mm_remove_node(&mapping->vram_node); in etnaviv_iommu_remove_mapping()
138 void etnaviv_iommu_reap_mapping(struct etnaviv_vram_mapping *mapping) in etnaviv_iommu_reap_mapping() argument
140 struct etnaviv_iommu_context *context = mapping->context; in etnaviv_iommu_reap_mapping()
143 WARN_ON(mapping->use); in etnaviv_iommu_reap_mapping()
145 etnaviv_iommu_remove_mapping(context, mapping); in etnaviv_iommu_reap_mapping()
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/uvc/
Duvc_ctrl.c366 static s32 uvc_ctrl_get_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_get_zoom() argument
384 static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_set_zoom() argument
391 static s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_get_rel_speed() argument
394 unsigned int first = mapping->offset / 8; in uvc_ctrl_get_rel_speed()
411 static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_set_rel_speed() argument
414 unsigned int first = mapping->offset / 8; in uvc_ctrl_set_rel_speed()
760 /* Extract the bit string specified by mapping->offset and mapping->size
762 * a signed 32bit integer. Sign extension will be performed if the mapping
765 static s32 uvc_get_le_value(struct uvc_control_mapping *mapping, in uvc_get_le_value() argument
768 int bits = mapping->size; in uvc_get_le_value()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/drivers/gpu/drm/exynos/
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 …]
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
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()
127 // This test validates that MREMAP_DONTUNMAP on a shared mapping works as expected.
147 // Try to just move the whole mapping anywhere (not fixed). in mremap_dontunmap_simple_shmem()
154 "unable to unmap source mapping"); in mremap_dontunmap_simple_shmem()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/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
69 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping()
91 static int check_file_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_file_memory_mapping() argument
105 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping()
130 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument
140 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag()
161 ptr = (char *)mte_allocate_file_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag()
213 "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check off\n"); in main()
215 …"Check file memory with private mapping, sync error mode, mmap/mprotect memory and tag check off\n… in main()
219 "Check anonymous memory with private mapping, no error mode, mmap memory and tag check off\n"); in main()
[all …]

12345678910>>...259