Home
last modified time | relevance | path

Searched refs:mas (Results 1 – 25 of 27) sorted by relevance

12

/Linux-v6.1/lib/
Dmaple_tree.c187 static void mas_set_height(struct ma_state *mas) in mas_set_height() argument
189 unsigned int new_flags = mas->tree->ma_flags; in mas_set_height()
192 BUG_ON(mas->depth > MAPLE_HEIGHT_MAX); in mas_set_height()
193 new_flags |= mas->depth << MT_FLAGS_HEIGHT_OFFSET; in mas_set_height()
194 mas->tree->ma_flags = new_flags; in mas_set_height()
197 static unsigned int mas_mt_height(struct ma_state *mas) in mas_mt_height() argument
199 return mt_height(mas->tree); in mas_mt_height()
233 static inline void mas_set_err(struct ma_state *mas, long err) in mas_set_err() argument
235 mas->node = MA_ERROR(err); in mas_set_err()
238 static inline bool mas_is_ptr(struct ma_state *mas) in mas_is_ptr() argument
[all …]
Dtest_maple_tree.c322 MA_STATE(mas, mt, 0, 0); in check_rev_find()
329 mas_set(&mas, 1000); in check_rev_find()
330 val = mas_find_rev(&mas, 1000); in check_rev_find()
332 val = mas_find_rev(&mas, 1000); in check_rev_find()
335 mas_set(&mas, 999); in check_rev_find()
336 val = mas_find_rev(&mas, 997); in check_rev_find()
339 mas_set(&mas, 1000); in check_rev_find()
340 val = mas_find_rev(&mas, 900); in check_rev_find()
342 val = mas_find_rev(&mas, 900); in check_rev_find()
345 mas_set(&mas, 20); in check_rev_find()
[all …]
/Linux-v6.1/drivers/spi/
Dspi-geni-qcom.c101 struct spi_geni_master *mas, in get_spi_clk_cfg() argument
109 ret = geni_se_clk_freq_match(&mas->se, in get_spi_clk_cfg()
110 speed_hz * mas->oversampling, in get_spi_clk_cfg()
113 dev_err(mas->dev, "Failed(%d) to find src clk for %dHz\n", in get_spi_clk_cfg()
118 *clk_div = DIV_ROUND_UP(sclk_freq, mas->oversampling * speed_hz); in get_spi_clk_cfg()
119 actual_hz = sclk_freq / (mas->oversampling * *clk_div); in get_spi_clk_cfg()
121 dev_dbg(mas->dev, "req %u=>%u sclk %lu, idx %d, div %d\n", speed_hz, in get_spi_clk_cfg()
123 ret = dev_pm_opp_set_rate(mas->dev, sclk_freq); in get_spi_clk_cfg()
125 dev_err(mas->dev, "dev_pm_opp_set_rate failed %d\n", ret); in get_spi_clk_cfg()
127 mas->cur_sclk_hz = sclk_freq; in get_spi_clk_cfg()
[all …]
/Linux-v6.1/include/trace/events/
Dmaple_tree.h15 TP_PROTO(const char *fn, struct ma_state *mas),
17 TP_ARGS(fn, mas),
30 __entry->min = mas->min;
31 __entry->max = mas->max;
32 __entry->index = mas->index;
33 __entry->last = mas->last;
34 __entry->node = mas->node;
48 TP_PROTO(const char *fn, struct ma_state *mas),
50 TP_ARGS(fn, mas),
63 __entry->min = mas->min;
[all …]
/Linux-v6.1/include/linux/
Dmaple_tree.h387 struct ma_state *mas; member
401 #define mas_lock(mas) spin_lock(&((mas)->tree->ma_lock)) argument
402 #define mas_unlock(mas) spin_unlock(&((mas)->tree->ma_lock)) argument
440 .mas = ma_state, \
452 void *mas_walk(struct ma_state *mas);
453 void *mas_store(struct ma_state *mas, void *entry);
454 void *mas_erase(struct ma_state *mas);
455 int mas_store_gfp(struct ma_state *mas, void *entry, gfp_t gfp);
456 void mas_store_prealloc(struct ma_state *mas, void *entry);
457 void *mas_find(struct ma_state *mas, unsigned long max);
[all …]
Dmm_types.h807 struct ma_state mas; member
812 .mas = { \
822 vmi->mas.tree = &mm->mm_mt; in vma_iter_init()
823 vmi->mas.index = addr; in vma_iter_init()
824 vmi->mas.node = MAS_START; in vma_iter_init()
Dmm.h667 return mas_find(&vmi->mas, max); in vma_find()
681 return mas_prev(&vmi->mas, 0); in vma_prev()
686 return vmi->mas.index; in vma_iter_addr()
2702 void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas);
2703 void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas);
2752 extern int do_mas_munmap(struct ma_state *mas, struct mm_struct *mm,
/Linux-v6.1/mm/
Dmmap.c165 static int do_brk_munmap(struct ma_state *mas, struct vm_area_struct *vma,
168 static int do_brk_flags(struct ma_state *mas, struct vm_area_struct *brkvma,
179 MA_STATE(mas, &mm->mm_mt, 0, 0); in SYSCALL_DEFINE1()
227 mas_set(&mas, newbrk); in SYSCALL_DEFINE1()
228 brkvma = mas_find(&mas, oldbrk); in SYSCALL_DEFINE1()
237 ret = do_brk_munmap(&mas, brkvma, newbrk, oldbrk, &uf); in SYSCALL_DEFINE1()
255 mas_set(&mas, oldbrk); in SYSCALL_DEFINE1()
256 next = mas_find(&mas, newbrk - 1 + PAGE_SIZE + stack_guard_gap); in SYSCALL_DEFINE1()
260 brkvma = mas_prev(&mas, mm->start_brk); in SYSCALL_DEFINE1()
262 if (do_brk_flags(&mas, brkvma, oldbrk, newbrk - oldbrk, 0) < 0) in SYSCALL_DEFINE1()
[all …]
Dnommu.c547 void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas) in vma_mas_store() argument
549 mas_set_range(mas, vma->vm_start, vma->vm_end - 1); in vma_mas_store()
550 mas_store_prealloc(mas, vma); in vma_mas_store()
553 void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas) in vma_mas_remove() argument
555 mas->index = vma->vm_start; in vma_mas_remove()
556 mas->last = vma->vm_end - 1; in vma_mas_remove()
557 mas_store_prealloc(mas, NULL); in vma_mas_remove()
584 static void mas_add_vma_to_mm(struct ma_state *mas, struct mm_struct *mm, in mas_add_vma_to_mm() argument
592 vma_mas_store(vma, mas); in mas_add_vma_to_mm()
603 MA_STATE(mas, &mm->mm_mt, vma->vm_start, vma->vm_end); in add_vma_to_mm()
[all …]
Dmlock.c474 MA_STATE(mas, &current->mm->mm_mt, start, start); in apply_vma_lock_flags()
483 vma = mas_walk(&mas); in apply_vma_lock_flags()
490 prev = mas_prev(&mas, 0); in apply_vma_lock_flags()
661 MA_STATE(mas, &current->mm->mm_mt, 0, 0); in apply_mlockall_flags()
682 mas_for_each(&mas, vma, ULONG_MAX) { in apply_mlockall_flags()
690 mas_pause(&mas); in apply_mlockall_flags()
Dmprotect.c681 MA_STATE(mas, &current->mm->mm_mt, 0, 0); in do_mprotect_pkey()
713 mas_set(&mas, start); in do_mprotect_pkey()
714 vma = mas_find(&mas, ULONG_MAX); in do_mprotect_pkey()
740 prev = mas_prev(&mas, 0); in do_mprotect_pkey()
Dmempolicy.c790 MA_STATE(mas, &mm->mm_mt, start, start); in mbind_range()
796 prev = mas_prev(&mas, 0); in mbind_range()
798 mas_set(&mas, start); in mbind_range()
800 vma = mas_find(&mas, end - 1); in mbind_range()
807 for (; vma; vma = mas_next(&mas, end - 1)) { in mbind_range()
822 mas_pause(&mas); in mbind_range()
831 mas_pause(&mas); in mbind_range()
838 mas_pause(&mas); in mbind_range()
Dmremap.c986 MA_STATE(mas, &mm->mm_mt, addr + new_len, addr + new_len); in SYSCALL_DEFINE5()
988 retval = do_mas_munmap(&mas, mm, addr + new_len, in SYSCALL_DEFINE5()
Dmemory.c400 MA_STATE(mas, mt, vma->vm_end, vma->vm_end); in free_pgtables()
410 next = mas_find(&mas, ceiling - 1); in free_pgtables()
429 next = mas_find(&mas, ceiling - 1); in free_pgtables()
1718 MA_STATE(mas, mt, vma->vm_end, vma->vm_end); in unmap_vmas()
1725 } while ((vma = mas_find(&mas, end_addr - 1)) != NULL); in unmap_vmas()
1744 MA_STATE(mas, mt, vma->vm_end, vma->vm_end); in zap_page_range()
1754 } while ((vma = mas_find(&mas, end - 1)) != NULL); in zap_page_range()
/Linux-v6.1/tools/testing/radix-tree/
Dmaple.c69 MA_STATE(mas, mt, 0, 0); in check_new_node()
75 mas_node_count(&mas, 3); in check_new_node()
77 MT_BUG_ON(mt, mas_alloc_req(&mas) != 3); in check_new_node()
79 MT_BUG_ON(mt, mas.node != MA_ERROR(-ENOMEM)); in check_new_node()
80 MT_BUG_ON(mt, !mas_nomem(&mas, GFP_KERNEL)); in check_new_node()
82 MT_BUG_ON(mt, mas_allocated(&mas) != 3); in check_new_node()
83 mn = mas_pop_node(&mas); in check_new_node()
86 MT_BUG_ON(mt, mas.alloc == NULL); in check_new_node()
87 MT_BUG_ON(mt, mas.alloc->slot[0] == NULL); in check_new_node()
88 mas_push_node(&mas, mn); in check_new_node()
[all …]
/Linux-v6.1/arch/ia64/kernel/
Dmodule.c906 struct mod_arch_specific *mas = &mod->arch; in module_finalize() local
909 if (mas->unwind) in module_finalize()
916 mas->opd_addr = (void *)mas->opd->sh_addr; in module_finalize()
917 mas->opd_size = mas->opd->sh_size; in module_finalize()
923 mas->core_plt = NULL; in module_finalize()
924 mas->init_plt = NULL; in module_finalize()
925 mas->got = NULL; in module_finalize()
926 mas->opd = NULL; in module_finalize()
927 mas->unwind = NULL; in module_finalize()
928 mas->gp = 0; in module_finalize()
[all …]
/Linux-v6.1/fs/
Duserfaultfd.c860 MA_STATE(mas, &mm->mm_mt, 0, 0); in userfaultfd_release()
877 mas_for_each(&mas, vma, ULONG_MAX) { in userfaultfd_release()
892 mas_pause(&mas); in userfaultfd_release()
1279 MA_STATE(mas, &mm->mm_mt, 0, 0); in userfaultfd_register()
1322 mas_set(&mas, start); in userfaultfd_register()
1323 vma = mas_find(&mas, ULONG_MAX); in userfaultfd_register()
1348 for (cur = vma; cur; cur = mas_next(&mas, end - 1)) { in userfaultfd_register()
1408 mas_set(&mas, start); in userfaultfd_register()
1409 prev = mas_prev(&mas, 0); in userfaultfd_register()
1411 mas_next(&mas, ULONG_MAX); in userfaultfd_register()
[all …]
Dcoredump.c1107 static struct vm_area_struct *coredump_next_vma(struct ma_state *mas, in coredump_next_vma() argument
1114 vma = mas_next(mas, ULONG_MAX); in coredump_next_vma()
1142 MA_STATE(mas, &mm->mm_mt, 0, 0); in dump_vma_snapshot()
1163 while ((vma = coredump_next_vma(&mas, vma, gate_vma)) != NULL) { in dump_vma_snapshot()
/Linux-v6.1/mm/damon/
Dvaddr-test.h21 MA_STATE(mas, mt, 0, 0); in __link_vmas()
26 mas_lock(&mas); in __link_vmas()
28 vma_mas_store(&vmas[i], &mas); in __link_vmas()
29 mas_unlock(&mas); in __link_vmas()
/Linux-v6.1/Documentation/core-api/
Dmaple_tree.rst141 The advanced API is based around the ma_state, this is where the 'mas'
148 The maple state keeps track of the range start and end in mas->index and
149 mas->last, respectively.
151 mas_walk() will walk the tree to the location of mas->index and set the
152 mas->index and mas->last according to the range for the entry.
/Linux-v6.1/drivers/media/i2c/
Dmax9286.c616 struct max9286_asd *mas; in max9286_v4l2_notifier_register() local
618 mas = v4l2_async_nf_add_fwnode(&priv->notifier, source->fwnode, in max9286_v4l2_notifier_register()
620 if (IS_ERR(mas)) { in max9286_v4l2_notifier_register()
622 i, PTR_ERR(mas)); in max9286_v4l2_notifier_register()
624 return PTR_ERR(mas); in max9286_v4l2_notifier_register()
627 mas->source = source; in max9286_v4l2_notifier_register()
/Linux-v6.1/fs/proc/
Dtask_mmu.c887 MA_STATE(mas, &mm->mm_mt, 0, 0); in show_smaps_rollup()
905 vma = mas_find(&mas, ULONG_MAX); in show_smaps_rollup()
920 mas_pause(&mas); in show_smaps_rollup()
964 vma = mas_find(&mas, ULONG_MAX); in show_smaps_rollup()
978 } while ((vma = mas_find(&mas, ULONG_MAX)) != NULL); in show_smaps_rollup()
1274 MA_STATE(mas, &mm->mm_mt, 0, 0); in clear_refs_write()
1294 mas_for_each(&mas, vma, ULONG_MAX) { in clear_refs_write()
/Linux-v6.1/kernel/
Dfork.c586 MA_STATE(mas, &mm->mm_mt, 0, 0); in dup_mmap()
613 retval = mas_expected_entries(&mas, oldmm->map_count); in dup_mmap()
683 mas.index = tmp->vm_start; in dup_mmap()
684 mas.last = tmp->vm_end - 1; in dup_mmap()
685 mas_store(&mas, tmp); in dup_mmap()
686 if (mas_is_err(&mas)) in dup_mmap()
702 mas_destroy(&mas); in dup_mmap()
/Linux-v6.1/drivers/media/pci/saa7164/
Dsaa7164-api.c615 u8 mas; in saa7164_api_set_dif() local
621 mas = 0xd0; in saa7164_api_set_dif()
623 mas = 0xe0; in saa7164_api_set_dif()
639 buf[0x0a] = mas; in saa7164_api_set_dif()
/Linux-v6.1/ipc/
Dshm.c1790 mas_pause(&vmi.mas); in ksys_shmdt()
1815 mas_pause(&vmi.mas); in ksys_shmdt()

12