Home
last modified time | relevance | path

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

12345678910>>...233

/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-4.19/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-4.19/mm/
Dtruncate.c33 static inline void __clear_shadow_entry(struct address_space *mapping, in __clear_shadow_entry() argument
39 if (!__radix_tree_lookup(&mapping->i_pages, index, &node, &slot)) in __clear_shadow_entry()
43 __radix_tree_replace(&mapping->i_pages, node, slot, NULL, in __clear_shadow_entry()
45 mapping->nrexceptional--; in __clear_shadow_entry()
48 static void clear_shadow_entry(struct address_space *mapping, pgoff_t index, in clear_shadow_entry() argument
51 xa_lock_irq(&mapping->i_pages); in clear_shadow_entry()
52 __clear_shadow_entry(mapping, index, entry); in clear_shadow_entry()
53 xa_unlock_irq(&mapping->i_pages); in clear_shadow_entry()
61 static void truncate_exceptional_pvec_entries(struct address_space *mapping, in truncate_exceptional_pvec_entries() argument
69 if (shmem_mapping(mapping)) in truncate_exceptional_pvec_entries()
[all …]
Dfilemap.c114 static int page_cache_tree_insert(struct address_space *mapping, in page_cache_tree_insert() argument
121 error = __radix_tree_create(&mapping->i_pages, page->index, 0, in page_cache_tree_insert()
129 &mapping->i_pages.xa_lock); in page_cache_tree_insert()
133 mapping->nrexceptional--; in page_cache_tree_insert()
137 __radix_tree_replace(&mapping->i_pages, node, slot, page, in page_cache_tree_insert()
138 workingset_lookup_update(mapping)); in page_cache_tree_insert()
139 mapping->nrpages++; in page_cache_tree_insert()
143 static void page_cache_tree_delete(struct address_space *mapping, in page_cache_tree_delete() argument
159 __radix_tree_lookup(&mapping->i_pages, page->index + i, in page_cache_tree_delete()
164 radix_tree_clear_tags(&mapping->i_pages, node, slot); in page_cache_tree_delete()
[all …]
Dreadahead.c32 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) in file_ra_state_init() argument
34 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init()
46 static void read_cache_pages_invalidate_page(struct address_space *mapping, in read_cache_pages_invalidate_page() argument
52 page->mapping = mapping; in read_cache_pages_invalidate_page()
54 page->mapping = NULL; in read_cache_pages_invalidate_page()
63 static void read_cache_pages_invalidate_pages(struct address_space *mapping, in read_cache_pages_invalidate_pages() argument
71 read_cache_pages_invalidate_page(mapping, victim); in read_cache_pages_invalidate_pages()
77 * @mapping: the address_space
85 int read_cache_pages(struct address_space *mapping, struct list_head *pages, in read_cache_pages() argument
94 if (add_to_page_cache_lru(page, mapping, page->index, in read_cache_pages()
[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-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-4.19/include/linux/
Dpagemap.h22 * Bits in mapping->flags.
36 * @mapping - the mapping in which an error should be set
37 * @error - the error to set in the mapping
45 * mapping_set_error to record the error in the mapping so that it can be
48 static inline void mapping_set_error(struct address_space *mapping, int error) in mapping_set_error() argument
54 filemap_set_wb_err(mapping, error); in mapping_set_error()
58 set_bit(AS_ENOSPC, &mapping->flags); in mapping_set_error()
60 set_bit(AS_EIO, &mapping->flags); in mapping_set_error()
63 static inline void mapping_set_unevictable(struct address_space *mapping) in mapping_set_unevictable() argument
65 set_bit(AS_UNEVICTABLE, &mapping->flags); in mapping_set_unevictable()
[all …]
Dio-mapping.h28 * The io_mapping mechanism provides an abstraction for mapping
31 * See Documentation/io-mapping.txt
45 * For small address space machines, mapping large objects
68 io_mapping_fini(struct io_mapping *mapping) in io_mapping_fini() argument
70 iomap_free(mapping->base, mapping->size); in io_mapping_fini()
75 io_mapping_map_atomic_wc(struct io_mapping *mapping, in io_mapping_map_atomic_wc() argument
81 BUG_ON(offset >= mapping->size); in io_mapping_map_atomic_wc()
82 phys_addr = mapping->base + offset; in io_mapping_map_atomic_wc()
84 return iomap_atomic_prot_pfn(pfn, mapping->prot); in io_mapping_map_atomic_wc()
94 io_mapping_map_wc(struct io_mapping *mapping, in io_mapping_map_wc() argument
[all …]
/kernel/linux/linux-4.19/fs/
Ddax.c118 struct address_space *mapping; member
127 static wait_queue_head_t *dax_entry_waitqueue(struct address_space *mapping, in dax_entry_waitqueue() argument
140 key->mapping = mapping; in dax_entry_waitqueue()
143 hash = hash_long((unsigned long)mapping ^ index, DAX_WAIT_TABLE_BITS); in dax_entry_waitqueue()
154 if (key->mapping != ewait->key.mapping || in wake_exceptional_entry_func()
161 * @entry may no longer be the entry at the index in the mapping.
165 static void dax_wake_mapping_entry_waiter(struct address_space *mapping, in dax_wake_mapping_entry_waiter() argument
171 wq = dax_entry_waitqueue(mapping, index, entry, &key); in dax_wake_mapping_entry_waiter()
187 static inline int slot_locked(struct address_space *mapping, void **slot) in slot_locked() argument
190 radix_tree_deref_slot_protected(slot, &mapping->i_pages.xa_lock); in slot_locked()
[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-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-4.19/Documentation/
Dnommu-mmap.txt2 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 …]
Dio-mapping.txt8 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
26 With this mapping object, individual pages can be mapped either atomically
30 void *io_mapping_map_atomic_wc(struct io_mapping *mapping,
33 'offset' is the offset within the defined mapping region.
59 void *io_mapping_map_wc(struct io_mapping *mapping,
75 void io_mapping_free(struct io_mapping *mapping)
[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-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-4.19/drivers/media/usb/uvc/
Duvc_ctrl.c370 static s32 uvc_ctrl_get_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_get_zoom() argument
388 static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_set_zoom() argument
395 static s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_get_rel_speed() argument
398 unsigned int first = mapping->offset / 8; in uvc_ctrl_get_rel_speed()
415 static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_set_rel_speed() argument
418 unsigned int first = mapping->offset / 8; in uvc_ctrl_set_rel_speed()
764 /* Extract the bit string specified by mapping->offset and mapping->size
766 * a signed 32bit integer. Sign extension will be performed if the mapping
769 static s32 uvc_get_le_value(struct uvc_control_mapping *mapping, in uvc_get_le_value() argument
772 int bits = mapping->size; in uvc_get_le_value()
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/uvc/
Duvc_ctrl.c365 static s32 uvc_ctrl_get_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_get_zoom() argument
383 static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, in uvc_ctrl_set_zoom() argument
390 static s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_get_rel_speed() argument
393 unsigned int first = mapping->offset / 8; in uvc_ctrl_get_rel_speed()
410 static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, in uvc_ctrl_set_rel_speed() argument
413 unsigned int first = mapping->offset / 8; in uvc_ctrl_set_rel_speed()
759 /* Extract the bit string specified by mapping->offset and mapping->size
761 * a signed 32bit integer. Sign extension will be performed if the mapping
764 static s32 uvc_get_le_value(struct uvc_control_mapping *mapping, in uvc_get_le_value() argument
767 int bits = mapping->size; in uvc_get_le_value()
[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-4.19/arch/arm/mm/
Ddma-mapping.c2 * linux/arch/arm/mm/dma-mapping.c
10 * DMA uncached mapping support.
21 #include <linux/dma-mapping.h>
486 * Clear previous low-memory mapping to ensure that the in dma_contiguous_remap()
853 * Create userspace mapping for the DMA-coherent memory.
871 * Free a buffer as defined by the above mapping.
991 * Use the driver DMA support - see dma-mapping.h (dma_sync_*)
1182 static int extend_iommu_mapping(struct dma_iommu_mapping *mapping);
1184 static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping, in __alloc_iova() argument
1190 size_t mapping_size = mapping->bits << PAGE_SHIFT; in __alloc_iova()
[all …]
/kernel/linux/linux-4.19/drivers/gpu/drm/etnaviv/
Detnaviv_gem.c227 struct etnaviv_vram_mapping *mapping; in etnaviv_gem_get_vram_mapping() local
229 list_for_each_entry(mapping, &obj->vram_list, obj_node) { in etnaviv_gem_get_vram_mapping()
230 if (mapping->mmu == mmu) in etnaviv_gem_get_vram_mapping()
231 return mapping; in etnaviv_gem_get_vram_mapping()
237 void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping) in etnaviv_gem_mapping_reference() argument
239 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_gem_mapping_reference()
244 WARN_ON(mapping->use == 0); in etnaviv_gem_mapping_reference()
245 mapping->use += 1; in etnaviv_gem_mapping_reference()
249 void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping) in etnaviv_gem_mapping_unreference() argument
251 struct etnaviv_gem_object *etnaviv_obj = mapping->object; in etnaviv_gem_mapping_unreference()
[all …]
/kernel/linux/linux-5.10/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
26 With this mapping object, individual pages can be mapped either atomically
30 void *io_mapping_map_atomic_wc(struct io_mapping *mapping,
33 'offset' is the offset within the defined mapping region.
59 void *io_mapping_map_wc(struct io_mapping *mapping,
75 void io_mapping_free(struct io_mapping *mapping)
[all …]
/kernel/linux/linux-5.10/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_*)
1099 static int extend_iommu_mapping(struct dma_iommu_mapping *mapping);
1101 static inline dma_addr_t __alloc_iova(struct dma_iommu_mapping *mapping, in __alloc_iova() argument
1107 size_t mapping_size = mapping->bits << PAGE_SHIFT; in __alloc_iova()
1118 spin_lock_irqsave(&mapping->lock, flags); in __alloc_iova()
[all …]

12345678910>>...233