/linux/Documentation/translations/zh_CN/mm/ |
H A D | highmem.rst | 64 在本地的kmap区域中采取pagefaults是有效的,除非获取本地映射的上下文由于其他原因不允许 76 虽然它比kmap()快得多,但在高内存的情况下,它对指针的有效性有限制。与kmap()映射相反, 81 kmap(),将页面映射到将被使用的同一线程中,并优先使用kmap_local_page()。 98 * kmap()。这应该被用来对单个页面进行短时间的映射,对抢占或迁移没有限制。它会带来开销, 102 映射变化必须广播到所有CPU(核)上,kmap()还需要在kmap的池被回绕(TLB项用光了,需要从第 104 槽出现。因此,kmap()只能从可抢占的上下文中调用。 107 高内存映射都是短暂的,而且只在一个地方使用。这意味着在这种情况下,kmap()的成本大 108 多被浪费了。kmap()并不是为长期映射而设计的,但是它已经朝着这个方向发展了,在较新 111 在64位系统中,调用kmap_local_page()、kmap_atomic()和kmap()没有实际作用,因为64位
|
/linux/tools/perf/util/ |
H A D | map.c | 227 map = calloc(1, sizeof(*map) + (dso__kernel(dso) ? sizeof(struct kmap) : 0)); in map__new2() 245 struct kmap *kmap = __map__kmap((struct map *)map); in __map__is_extra_kernel_map() local 247 return kmap && kmap->name[0]; in __map__is_extra_kernel_map() 420 size += sizeof(struct kmap); in map__clone() 530 struct kmap *kmap = __map__kmap(map); in map__rip_2objdump() local 538 if (kmap && is_entry_trampoline(kmap->name) && kmap->kmaps) { in map__rip_2objdump() 539 struct machine *machine = maps__machine(kmap->kmaps); in map__rip_2objdump() 613 struct kmap *__map__kmap(struct map *map) in __map__kmap() 619 return (struct kmap *)(&RC_CHK_ACCESS(map)[1]); in __map__kmap() 622 struct kmap *map__kmap(struct map *map) in map__kmap() [all …]
|
H A D | symbol-elf.c | 1387 * @kmap: kernel maps and relocation reference symbol 1393 static bool ref_reloc_sym_not_found(struct kmap *kmap) in ref_reloc_sym_not_found() argument 1395 return kmap && kmap->ref_reloc_sym && kmap->ref_reloc_sym->name && in ref_reloc_sym_not_found() 1396 !kmap->ref_reloc_sym->unrelocated_addr; in ref_reloc_sym_not_found() 1401 * @kmap: kernel maps and relocation reference symbol 1407 static u64 ref_reloc(struct kmap *kmap) in ref_reloc() argument 1421 dso__process_kernel_symbol(struct dso * dso,struct map * map,GElf_Sym * sym,GElf_Shdr * shdr,struct maps * kmaps,struct kmap * kmap,struct dso ** curr_dsop,struct map ** curr_mapp,const char * section_name,bool adjust_kernel_syms,bool kmodule,bool * remap_kernel,u64 max_text_sh_offset) dso__process_kernel_symbol() argument 1550 struct kmap *kmap = dso->kernel ? map__kmap(map) : NULL; dso__load_sym_internal() local [all...] |
H A D | machine.c | 1017 struct kmap *kmap; in machine__create_extra_kernel_map() 1028 kmap = map__kmap(map); in machine__create_extra_kernel_map() 1030 strlcpy(kmap->name, xm->name, KMAP_NAME_LEN); in machine__create_extra_kernel_map() 1036 kmap->name, map__start(map), map__end(map)); in machine__create_extra_kernel_map() 1084 struct kmap *kmap = __map__kmap(map); in machine__map_x86_64_entry_trampolines_cb() 1086 if (!kmap || !is_entry_trampoline(kmap->name)) in machine__map_x86_64_entry_trampolines_cb() 1169 struct kmap *kma in machine__destroy_kernel_maps() 1015 struct kmap *kmap; machine__create_extra_kernel_map() local 1082 struct kmap *kmap = __map__kmap(map); machine__map_x86_64_entry_trampolines_cb() local 1167 struct kmap *kmap; machine__destroy_kernel_maps() local 3205 struct map *kmap; machine__is_lock_function() local [all...] |
H A D | bpf_lock_contention.c | 69 struct map *kmap; in lock_contention_prepare() local 75 &kmap); in lock_contention_prepare() 89 addrs[con->filters->nr_addrs++] = map__unmap_ip(kmap, sym->start); in lock_contention_prepare() 327 struct map *kmap; in lock_contention_get_name() local 358 sym = machine__find_kernel_symbol(machine, key->lock_addr_or_cgroup, &kmap); in lock_contention_get_name() 388 sym = machine__find_kernel_symbol(machine, addr, &kmap); in lock_contention_get_name() 393 offset = map__map_ip(kmap, addr) - sym->start; in lock_contention_get_name()
|
H A D | symbol.c | 1232 struct kmap *kmap = map__kmap(map); in validate_kcore_addresses() local 1234 if (!kmap) in validate_kcore_addresses() 1237 if (kmap->ref_reloc_sym && kmap->ref_reloc_sym->name) { in validate_kcore_addresses() 1241 kmap->ref_reloc_sym->name, &start)) in validate_kcore_addresses() 1243 if (start != kmap->ref_reloc_sym->addr) in validate_kcore_addresses() 1460 static int kallsyms__delta(struct kmap *kmap, const char *filename, u64 *delta) in kallsyms__delta() argument 1464 if (!kmap->ref_reloc_sym || !kmap->ref_reloc_sym->name) in kallsyms__delta() 1467 if (kallsyms__get_function_start(filename, kmap->ref_reloc_sym->name, &addr)) in kallsyms__delta() 1470 *delta = addr - kmap->ref_reloc_sym->addr; in kallsyms__delta() 1477 struct kmap *kmap = map__kmap(map); in __dso__load_kallsyms() local [all …]
|
H A D | map.h | 41 struct kmap; 43 struct kmap *__map__kmap(struct map *map); 44 struct kmap *map__kmap(struct map *map);
|
H A D | maps.h | 17 struct kmap { struct
|
/linux/drivers/gpu/drm/panthor/ |
H A D | panthor_gem.h | 77 void *kmap; member 117 if (bo->kmap) in panthor_kernel_bo_vmap() 124 bo->kmap = map.vaddr; in panthor_kernel_bo_vmap() 131 if (bo->kmap) { in panthor_kernel_bo_vunmap() 132 struct iosys_map map = IOSYS_MAP_INIT_VADDR(bo->kmap); in panthor_kernel_bo_vunmap() 135 bo->kmap = NULL; in panthor_kernel_bo_vunmap()
|
H A D | panthor_fw.c | 412 bool was_mapped = !!section->mem->kmap; in panthor_fw_init_section_mem() 423 memcpy(section->mem->kmap, section->data.buf, section->data.size); in panthor_fw_init_section_mem() 425 memset(section->mem->kmap + section->data.size, 0, in panthor_fw_init_section_mem() 473 memset(mem->kmap, 0, panthor_kernel_bo_size(mem)); in panthor_fw_alloc_queue_iface_mem() 474 *input = mem->kmap; in panthor_fw_alloc_queue_iface_mem() 475 *output = mem->kmap + SZ_4K; in panthor_fw_alloc_queue_iface_mem() 828 return ptdev->fw->shared_section->mem->kmap + (mcu_va - shared_mem_start); in iface_fw_to_cpu_addr() 849 cs_iface->control = ptdev->fw->shared_section->mem->kmap + iface_offset; in panthor_init_cs_iface() 900 csg_iface->control = ptdev->fw->shared_section->mem->kmap + iface_offset; in panthor_init_csg_iface() 948 if (!ptdev->fw->shared_section->mem->kmap) in panthor_fw_init_ifaces() [all …]
|
H A D | panthor_sched.c | 444 void *kmap; member 829 if (queue->syncwait.kmap) { in panthor_queue_put_syncwait_obj() 830 struct iosys_map map = IOSYS_MAP_INIT_VADDR(queue->syncwait.kmap); in panthor_queue_put_syncwait_obj() 833 queue->syncwait.kmap = NULL; in panthor_queue_put_syncwait_obj() 848 if (queue->syncwait.kmap) in panthor_queue_get_syncwait_obj() 849 return queue->syncwait.kmap + queue->syncwait.offset; in panthor_queue_get_syncwait_obj() 862 queue->syncwait.kmap = map.vaddr; in panthor_queue_get_syncwait_obj() 863 if (drm_WARN_ON(&ptdev->base, !queue->syncwait.kmap)) in panthor_queue_get_syncwait_obj() 866 return queue->syncwait.kmap + queue->syncwait.offset; in panthor_queue_get_syncwait_obj() 2077 syncobj = group->syncobjs->kmap + (i * sizeof(*syncobj)); in group_term_post_processing() [all …]
|
/linux/tools/perf/arch/x86/util/ |
H A D | event.c | 28 struct kmap *kmap; in perf_event__synthesize_extra_kmaps_cb() local 34 kmap = map__kmap(map); in perf_event__synthesize_extra_kmaps_cb() 37 PERF_ALIGN(strlen(kmap->name) + 1, sizeof(u64)) + in perf_event__synthesize_extra_kmaps_cb() 60 strlcpy(event->mmap.filename, kmap->name, PATH_MAX); in perf_event__synthesize_extra_kmaps_cb()
|
/linux/Documentation/mm/ |
H A D | highmem.rst | 61 These functions should always be used, whereas kmap_atomic() and kmap() have 70 It's valid to take pagefaults in a local kmap region, unless the context 87 While they are significantly faster than kmap(), for the highmem case they 88 come with restrictions about the pointers validity. Contrary to kmap() 95 therefore try to design their code to avoid the use of kmap() by mapping 131 * kmap(). This function has been deprecated; use kmap_local_page(). 146 Mapping changes must be propagated across all the CPUs. kmap() also 147 requires global TLB invalidation when the kmap's pool wraps and it might 149 available. Therefore, kmap() is only callable from preemptible context. 154 kmap() is mostly wasted in such cases. kmap() was not intended for long [all …]
|
/linux/arch/m68k/mm/ |
H A D | Makefile | 9 obj-$(CONFIG_MMU_MOTOROLA) += kmap.o memory.o motorola.o hwtest.o 11 obj-$(CONFIG_MMU_COLDFIRE) += kmap.o memory.o mcfmmu.o
|
/linux/drivers/gpu/drm/nouveau/include/nvkm/core/ |
H A D | memory.h | 41 int (*kmap)(struct nvkm_memory *, struct nvkm_memory **); member 68 #define nvkm_memory_kmap(p,i) ((p)->func->kmap ? (p)->func->kmap((p), (i)) : -ENOSYS)
|
/linux/include/linux/ |
H A D | highmem-internal.h | 40 static inline void *kmap(struct page *page) in kmap() function 162 static inline void *kmap(struct page *page) in kmap() function
|
/linux/drivers/gpu/drm/nouveau/ |
H A D | nouveau_bo.h | 19 struct ttm_bo_kmap_obj kmap; member 98 &nvbo->kmap, &is_iomem); in nvbo_kmap_obj_iovirtual()
|
/linux/mm/ |
H A D | highmem.c | 577 void *kmap; in __kmap_local_page_prot() local 588 kmap = arch_kmap_local_high_get(page); in __kmap_local_page_prot() 589 if (kmap) in __kmap_local_page_prot() 590 return kmap; in __kmap_local_page_prot()
|
/linux/drivers/gpu/drm/xe/ |
H A D | xe_bo_types.h | 47 struct ttm_bo_kmap_obj kmap; member
|
/linux/tools/perf/ |
H A D | builtin-lock.c | 526 struct map *kmap; in match_callstack_filter() local 555 sym = machine__find_kernel_symbol(machine, ip, &kmap); in match_callstack_filter() 1071 struct map *kmap; in report_lock_contention_begin_event() local 1089 &kmap); in report_lock_contention_begin_event() 1103 addrs[filters.nr_addrs++] = map__unmap_ip(kmap, sym->start); in report_lock_contention_begin_event() 1115 sym = machine__find_kernel_symbol(machine, key, &kmap); in report_lock_contention_begin_event() 1755 struct map *kmap; in print_lock_stat_stdio() local 1765 sym = machine__find_kernel_symbol(con->machine, ip, &kmap); in print_lock_stat_stdio() 1766 get_symbol_name_offset(kmap, sym, ip, buf, sizeof(buf)); in print_lock_stat_stdio() 1808 struct map *kmap; in print_lock_stat_csv() local [all …]
|
/linux/fs/freevxfs/ |
H A D | vxfs_subr.c | 51 kmap(pp); in vxfs_get_page()
|
/linux/drivers/gpu/drm/loongson/ |
H A D | lsdc_ttm.h | 35 struct ttm_bo_kmap_obj kmap; member
|
H A D | lsdc_ttm.c | 370 err = ttm_bo_kmap(tbo, 0, PFN_UP(lsdc_bo_size(lbo)), &lbo->kmap); in lsdc_bo_kmap() 376 lbo->kptr = ttm_kmap_obj_virtual(&lbo->kmap, &lbo->is_iomem); in lsdc_bo_kmap() 387 ttm_bo_kunmap(&lbo->kmap); in lsdc_bo_kunmap()
|
/linux/fs/vboxsf/ |
H A D | file.c | 283 buf = kmap(page); in vboxsf_writepage() 316 buf = kmap(&folio->page); in vboxsf_write_end()
|
/linux/arch/sh/mm/ |
H A D | Makefile | 19 mmu-$(CONFIG_MMU) := extable_32.o fault.o ioremap.o kmap.o \
|