Home
last modified time | relevance | path

Searched refs:range (Results 1 – 25 of 1892) sorted by relevance

12345678910>>...76

/linux-6.1.9/kernel/
Drange.c12 int add_range(struct range *range, int az, int nr_range, u64 start, u64 end) in add_range() argument
21 range[nr_range].start = start; in add_range()
22 range[nr_range].end = end; in add_range()
29 int add_range_with_merge(struct range *range, int az, int nr_range, in add_range_with_merge() argument
41 if (!range[i].end) in add_range_with_merge()
44 common_start = max(range[i].start, start); in add_range_with_merge()
45 common_end = min(range[i].end, end); in add_range_with_merge()
50 start = min(range[i].start, start); in add_range_with_merge()
51 end = max(range[i].end, end); in add_range_with_merge()
53 memmove(&range[i], &range[i + 1], in add_range_with_merge()
[all …]
/linux-6.1.9/drivers/soc/ti/
Dknav_qmss_acc.c20 #define knav_range_offset_to_inst(kdev, range, q) \ argument
21 (range->queue_base_inst + (q << kdev->inst_shift))
23 static void __knav_acc_notify(struct knav_range_info *range, in __knav_acc_notify() argument
26 struct knav_device *kdev = range->kdev; in __knav_acc_notify()
30 range_base = kdev->base_id + range->queue_base; in __knav_acc_notify()
32 if (range->flags & RANGE_MULTI_QUEUE) { in __knav_acc_notify()
33 for (queue = 0; queue < range->num_queues; queue++) { in __knav_acc_notify()
34 inst = knav_range_offset_to_inst(kdev, range, in __knav_acc_notify()
44 queue = acc->channel - range->acc_info.start_channel; in __knav_acc_notify()
45 inst = knav_range_offset_to_inst(kdev, range, queue); in __knav_acc_notify()
[all …]
Dknav_qmss_queue.c112 static int knav_queue_setup_irq(struct knav_range_info *range, in knav_queue_setup_irq() argument
115 unsigned queue = inst->id - range->queue_base; in knav_queue_setup_irq()
118 if (range->flags & RANGE_HAS_IRQ) { in knav_queue_setup_irq()
119 irq = range->irqs[queue].irq; in knav_queue_setup_irq()
125 if (range->irqs[queue].cpu_mask) { in knav_queue_setup_irq()
126 ret = irq_set_affinity_hint(irq, range->irqs[queue].cpu_mask); in knav_queue_setup_irq()
128 dev_warn(range->kdev->dev, in knav_queue_setup_irq()
139 struct knav_range_info *range = inst->range; in knav_queue_free_irq() local
140 unsigned queue = inst->id - inst->range->queue_base; in knav_queue_free_irq()
143 if (range->flags & RANGE_HAS_IRQ) { in knav_queue_free_irq()
[all …]
/linux-6.1.9/security/selinux/ss/
Dcontext.h32 struct mls_range range; member
38 memset(&c->range, 0, sizeof(c->range)); in mls_context_init()
45 dst->range.level[0].sens = src->range.level[0].sens; in mls_context_cpy()
46 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); in mls_context_cpy()
50 dst->range.level[1].sens = src->range.level[1].sens; in mls_context_cpy()
51 rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[1].cat); in mls_context_cpy()
53 ebitmap_destroy(&dst->range.level[0].cat); in mls_context_cpy()
65 dst->range.level[0].sens = src->range.level[0].sens; in mls_context_cpy_low()
66 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); in mls_context_cpy_low()
70 dst->range.level[1].sens = src->range.level[0].sens; in mls_context_cpy_low()
[all …]
Dmls.c48 int index_sens = context->range.level[l].sens; in mls_compute_context_len()
54 e = &context->range.level[l].cat; in mls_compute_context_len()
73 if (mls_level_eq(&context->range.level[0], in mls_compute_context_len()
74 &context->range.level[1])) in mls_compute_context_len()
108 context->range.level[l].sens - 1)); in mls_sid_to_context()
114 e = &context->range.level[l].cat; in mls_sid_to_context()
150 if (mls_level_eq(&context->range.level[0], in mls_sid_to_context()
151 &context->range.level[1])) in mls_sid_to_context()
199 if (!mls_range_isvalid(p, &c->range)) in mls_context_isvalid()
211 if (!mls_range_contains(usrdatum->range, c->range)) in mls_context_isvalid()
[all …]
/linux-6.1.9/lib/
Dlogic_pio.c38 struct logic_pio_hwaddr *range; in logic_pio_register_range() local
53 list_for_each_entry(range, &io_range_list, list) { in logic_pio_register_range()
54 if (range->fwnode == new_range->fwnode) { in logic_pio_register_range()
59 if (range->flags == LOGIC_PIO_CPU_MMIO && in logic_pio_register_range()
62 if (start >= range->hw_start + range->size || in logic_pio_register_range()
63 end < range->hw_start) { in logic_pio_register_range()
64 mmio_end = range->io_start + range->size; in logic_pio_register_range()
69 } else if (range->flags == LOGIC_PIO_INDIRECT && in logic_pio_register_range()
71 iio_sz += range->size; in logic_pio_register_range()
112 void logic_pio_unregister_range(struct logic_pio_hwaddr *range) in logic_pio_unregister_range() argument
[all …]
/linux-6.1.9/mm/
Dmemremap.c65 static void pgmap_array_delete(struct range *range) in pgmap_array_delete() argument
67 xa_store_range(&pgmap_array, PHYS_PFN(range->start), PHYS_PFN(range->end), in pgmap_array_delete()
74 struct range *range = &pgmap->ranges[range_id]; in pfn_first() local
75 unsigned long pfn = PHYS_PFN(range->start); in pfn_first()
87 struct range *range = &pgmap->ranges[i]; in pgmap_pfn_valid() local
89 if (pfn >= PHYS_PFN(range->start) && in pgmap_pfn_valid()
90 pfn <= PHYS_PFN(range->end)) in pgmap_pfn_valid()
99 const struct range *range = &pgmap->ranges[range_id]; in pfn_end() local
101 return (range->start + range_len(range)) >> PAGE_SHIFT; in pfn_end()
112 struct range *range = &pgmap->ranges[range_id]; in pageunmap_range() local
[all …]
Dhmm.c32 struct hmm_range *range; member
43 struct hmm_range *range, unsigned long cpu_flags) in hmm_pfns_fill() argument
45 unsigned long i = (addr - range->start) >> PAGE_SHIFT; in hmm_pfns_fill()
48 range->hmm_pfns[i] = cpu_flags; in hmm_pfns_fill()
90 struct hmm_range *range = hmm_vma_walk->range; in hmm_pte_need_fault() local
102 pfn_req_flags &= range->pfn_flags_mask; in hmm_pte_need_fault()
103 pfn_req_flags |= range->default_flags; in hmm_pte_need_fault()
125 struct hmm_range *range = hmm_vma_walk->range; in hmm_range_need_fault() local
134 if (!((range->default_flags | range->pfn_flags_mask) & in hmm_range_need_fault()
151 struct hmm_range *range = hmm_vma_walk->range; in hmm_vma_walk_hole() local
[all …]
/linux-6.1.9/drivers/dax/
Dkmem.c30 static int dax_kmem_range(struct dev_dax *dev_dax, int i, struct range *r) in dax_kmem_range()
33 struct range *range = &dax_range->range; in dax_kmem_range() local
36 r->start = ALIGN(range->start, memory_block_size_bytes()); in dax_kmem_range()
37 r->end = ALIGN_DOWN(range->end + 1, memory_block_size_bytes()) - 1; in dax_kmem_range()
39 r->start = range->start; in dax_kmem_range()
40 r->end = range->end; in dax_kmem_range()
75 struct range range; in dev_dax_kmem_probe() local
77 rc = dax_kmem_range(dev_dax, i, &range); in dev_dax_kmem_probe()
80 i, range.start, range.end); in dev_dax_kmem_probe()
83 total_len += range_len(&range); in dev_dax_kmem_probe()
[all …]
/linux-6.1.9/arch/mips/loongson64/
Dinit.c138 struct logic_pio_hwaddr *range; in add_legacy_isa_io() local
141 range = kzalloc(sizeof(*range), GFP_ATOMIC); in add_legacy_isa_io()
142 if (!range) in add_legacy_isa_io()
145 range->fwnode = fwnode; in add_legacy_isa_io()
146 range->size = size = round_up(size, PAGE_SIZE); in add_legacy_isa_io()
147 range->hw_start = hw_start; in add_legacy_isa_io()
148 range->flags = LOGIC_PIO_CPU_MMIO; in add_legacy_isa_io()
150 ret = logic_pio_register_range(range); in add_legacy_isa_io()
152 kfree(range); in add_legacy_isa_io()
157 if (range->io_start != 0) { in add_legacy_isa_io()
[all …]
/linux-6.1.9/include/linux/
Drange.h6 struct range { struct
11 static inline u64 range_len(const struct range *range) in range_len() argument
13 return range->end - range->start + 1; in range_len()
16 int add_range(struct range *range, int az, int nr_range,
20 int add_range_with_merge(struct range *range, int az, int nr_range,
23 void subtract_range(struct range *range, int az, u64 start, u64 end);
25 int clean_sort_range(struct range *range, int az);
27 void sort_range(struct range *range, int nr_range);
Dmmu_notifier.h185 const struct mmu_notifier_range *range);
187 const struct mmu_notifier_range *range);
253 const struct mmu_notifier_range *range,
404 mmu_notifier_range_update_to_read_only(const struct mmu_notifier_range *range);
407 mmu_notifier_range_blockable(const struct mmu_notifier_range *range) in mmu_notifier_range_blockable() argument
409 return (range->flags & MMU_NOTIFIER_RANGE_BLOCKABLE); in mmu_notifier_range_blockable()
452 mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range) in mmu_notifier_invalidate_range_start() argument
457 if (mm_has_notifiers(range->mm)) { in mmu_notifier_invalidate_range_start()
458 range->flags |= MMU_NOTIFIER_RANGE_BLOCKABLE; in mmu_notifier_invalidate_range_start()
459 __mmu_notifier_invalidate_range_start(range); in mmu_notifier_invalidate_range_start()
[all …]
/linux-6.1.9/drivers/of/
Daddress.c50 u64 (*map)(__be32 *addr, const __be32 *range,
70 static u64 of_bus_default_map(__be32 *addr, const __be32 *range, in of_bus_default_map() argument
75 cp = of_read_number(range, na); in of_bus_default_map()
76 s = of_read_number(range + na + pna, ns); in of_bus_default_map()
167 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument
174 rf = of_bus_pci_get_flags(range); in of_bus_pci_map()
181 cp = of_read_number(range + 1, na - 1); in of_bus_pci_map()
182 s = of_read_number(range + na + pna, ns); in of_bus_pci_map()
224 int of_pci_range_to_resource(struct of_pci_range *range, in of_pci_range_to_resource() argument
228 res->flags = range->flags; in of_pci_range_to_resource()
[all …]
/linux-6.1.9/drivers/pci/hotplug/
Dibmphp_res.c368 static int add_bus_range(int type, struct range_node *range, struct bus_node *bus_cur) in add_bus_range() argument
392 if (range->start < range_cur->start) in add_bus_range()
402 bus_cur->rangeMem = range; in add_bus_range()
405 bus_cur->rangePFMem = range; in add_bus_range()
408 bus_cur->rangeIO = range; in add_bus_range()
411 range->next = range_cur; in add_bus_range()
412 range->rangeno = 1; in add_bus_range()
416 range->next = NULL; in add_bus_range()
417 range_prev->next = range; in add_bus_range()
418 range->rangeno = range_prev->rangeno + 1; in add_bus_range()
[all …]
/linux-6.1.9/net/netfilter/
Dnf_nat_core.c201 const struct nf_nat_range2 *range) in nf_nat_inet_in_range() argument
204 return ntohl(t->src.u3.ip) >= ntohl(range->min_addr.ip) && in nf_nat_inet_in_range()
205 ntohl(t->src.u3.ip) <= ntohl(range->max_addr.ip); in nf_nat_inet_in_range()
207 return ipv6_addr_cmp(&t->src.u3.in6, &range->min_addr.in6) >= 0 && in nf_nat_inet_in_range()
208 ipv6_addr_cmp(&t->src.u3.in6, &range->max_addr.in6) <= 0; in nf_nat_inet_in_range()
246 const struct nf_nat_range2 *range) in in_range() argument
251 if (range->flags & NF_NAT_RANGE_MAP_IPS && in in_range()
252 !nf_nat_inet_in_range(tuple, range)) in in_range()
255 if (!(range->flags & NF_NAT_RANGE_PROTO_SPECIFIED)) in in_range()
259 &range->min_proto, &range->max_proto); in in_range()
[all …]
Dnf_nat_bpf.c39 struct nf_nat_range2 range; in bpf_ct_set_nat_info() local
44 memset(&range, 0, sizeof(struct nf_nat_range2)); in bpf_ct_set_nat_info()
45 range.flags = NF_NAT_RANGE_MAP_IPS; in bpf_ct_set_nat_info()
46 range.min_addr = *addr; in bpf_ct_set_nat_info()
47 range.max_addr = range.min_addr; in bpf_ct_set_nat_info()
49 range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED; in bpf_ct_set_nat_info()
50 range.min_proto.all = cpu_to_be16(port); in bpf_ct_set_nat_info()
51 range.max_proto.all = range.min_proto.all; in bpf_ct_set_nat_info()
54 return nf_nat_setup_info(ct, &range, manip) == NF_DROP ? -ENOMEM : 0; in bpf_ct_set_nat_info()
Dxt_nat.c55 struct nf_nat_range2 range; in xt_snat_target_v0() local
64 xt_nat_convert_range(&range, &mr->range[0]); in xt_snat_target_v0()
65 return nf_nat_setup_info(ct, &range, NF_NAT_MANIP_SRC); in xt_snat_target_v0()
72 struct nf_nat_range2 range; in xt_dnat_target_v0() local
80 xt_nat_convert_range(&range, &mr->range[0]); in xt_dnat_target_v0()
81 return nf_nat_setup_info(ct, &range, NF_NAT_MANIP_DST); in xt_dnat_target_v0()
88 struct nf_nat_range2 range; in xt_snat_target_v1() local
97 memcpy(&range, range_v1, sizeof(*range_v1)); in xt_snat_target_v1()
98 memset(&range.base_proto, 0, sizeof(range.base_proto)); in xt_snat_target_v1()
100 return nf_nat_setup_info(ct, &range, NF_NAT_MANIP_SRC); in xt_snat_target_v1()
[all …]
Dxt_NETMAP.c21 const struct nf_nat_range2 *range = par->targinfo; in netmap_tg6() local
29 for (i = 0; i < ARRAY_SIZE(range->min_addr.ip6); i++) in netmap_tg6()
30 netmask.ip6[i] = ~(range->min_addr.ip6[i] ^ in netmap_tg6()
31 range->max_addr.ip6[i]); in netmap_tg6()
41 new_addr.ip6[i] |= range->min_addr.ip6[i] & in netmap_tg6()
45 newrange.flags = range->flags | NF_NAT_RANGE_MAP_IPS; in netmap_tg6()
48 newrange.min_proto = range->min_proto; in netmap_tg6()
49 newrange.max_proto = range->max_proto; in netmap_tg6()
56 const struct nf_nat_range2 *range = par->targinfo; in netmap_tg6_checkentry() local
58 if (!(range->flags & NF_NAT_RANGE_MAP_IPS)) in netmap_tg6_checkentry()
[all …]
/linux-6.1.9/drivers/gpu/drm/sprd/
Dmegacores_pll.c221 u32 range[2], constant; in dphy_timing_config() local
236 range[L] = 50 * scale; in dphy_timing_config()
237 range[H] = INFINITY; in dphy_timing_config()
238 val[CLK] = DIV_ROUND_UP(range[L] * (factor << 1), t_byteck) - 2; in dphy_timing_config()
243 range[L] = 38 * scale; in dphy_timing_config()
244 range[H] = 95 * scale; in dphy_timing_config()
245 tmp = AVERAGE(range[L], range[H]); in dphy_timing_config()
246 val[CLK] = DIV_ROUND_UP(AVERAGE(range[L], range[H]), t_half_byteck) - 1; in dphy_timing_config()
247 range[L] = 40 * scale + 4 * t_ui; in dphy_timing_config()
248 range[H] = 85 * scale + 6 * t_ui; in dphy_timing_config()
[all …]
/linux-6.1.9/tools/arch/x86/kcpuid/
Dkcpuid.c135 static bool cpuid_store(struct cpuid_range *range, u32 f, int subleaf, in cpuid_store() argument
149 func = &range->funcs[f & 0xffff]; in cpuid_store()
178 static void raw_dump_range(struct cpuid_range *range) in raw_dump_range() argument
183 printf("%s Leafs :\n", range->is_ext ? "Extended" : "Basic"); in raw_dump_range()
186 for (f = 0; (int)f < range->nr; f++) { in raw_dump_range()
187 struct cpuid_func *func = &range->funcs[f]; in raw_dump_range()
190 if (range->is_ext) in raw_dump_range()
208 struct cpuid_range *range; in setup_cpuid_range() local
221 range = malloc(sizeof(struct cpuid_range)); in setup_cpuid_range()
222 if (!range) in setup_cpuid_range()
[all …]
/linux-6.1.9/arch/x86/kernel/cpu/mtrr/
Dcleanup.c53 static struct range __initdata range[RANGE_NUM]; variable
65 x86_get_mtrr_mem_range(struct range *range, int nr_range, in x86_get_mtrr_mem_range() argument
79 nr_range = add_range_with_merge(range, RANGE_NUM, nr_range, in x86_get_mtrr_mem_range()
86 range[i].start, range[i].end); in x86_get_mtrr_mem_range()
109 subtract_range(range, RANGE_NUM, base, base + size); in x86_get_mtrr_mem_range()
112 subtract_range(range, RANGE_NUM, extra_remove_base, in x86_get_mtrr_mem_range()
118 if (!range[i].end) in x86_get_mtrr_mem_range()
121 range[i].start, range[i].end); in x86_get_mtrr_mem_range()
126 nr_range = clean_sort_range(range, RANGE_NUM); in x86_get_mtrr_mem_range()
131 range[i].start, range[i].end); in x86_get_mtrr_mem_range()
[all …]
/linux-6.1.9/drivers/pinctrl/
Dcore.c272 static inline int gpio_to_pin(struct pinctrl_gpio_range *range, in gpio_to_pin() argument
275 unsigned int offset = gpio - range->base; in gpio_to_pin()
276 if (range->pins) in gpio_to_pin()
277 return range->pins[offset]; in gpio_to_pin()
279 return range->pin_base + offset; in gpio_to_pin()
293 struct pinctrl_gpio_range *range; in pinctrl_match_gpio_range() local
297 list_for_each_entry(range, &pctldev->gpio_ranges, node) { in pinctrl_match_gpio_range()
299 if (gpio >= range->base && in pinctrl_match_gpio_range()
300 gpio < range->base + range->npins) { in pinctrl_match_gpio_range()
302 return range; in pinctrl_match_gpio_range()
[all …]
/linux-6.1.9/drivers/regulator/
Dqcom_spmi-regulator.c403 struct spmi_voltage_range *range; member
481 .range = name##_ranges, \
669 const struct spmi_voltage_range *range; in spmi_regulator_select_voltage() local
675 lim_min_uV = vreg->set_points->range[0].set_point_min_uV; in spmi_regulator_select_voltage()
677 vreg->set_points->range[vreg->set_points->count - 1].set_point_max_uV; in spmi_regulator_select_voltage()
691 range_max_uV = vreg->set_points->range[i - 1].set_point_max_uV; in spmi_regulator_select_voltage()
697 range = &vreg->set_points->range[range_id]; in spmi_regulator_select_voltage()
703 voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); in spmi_regulator_select_voltage()
704 uV = voltage_sel * range->step_uV + range->min_uV; in spmi_regulator_select_voltage()
716 selector += vreg->set_points->range[i].n_voltages; in spmi_regulator_select_voltage()
[all …]
/linux-6.1.9/Documentation/translations/zh_CN/mm/
Dhmm.rst129 int hmm_range_fault(struct hmm_range *range);
142 struct hmm_range range;
145 range.notifier = &interval_sub;
146 range.start = ...;
147 range.end = ...;
148 range.hmm_pfns = ...;
154 range.notifier_seq = mmu_interval_read_begin(&interval_sub);
156 ret = hmm_range_fault(&range);
166 if (mmu_interval_read_retry(&ni, range.notifier_seq) {
189 range->default_flags = HMM_PFN_REQ_FAULT;
[all …]
/linux-6.1.9/drivers/base/
Dmap.c23 unsigned long range; member
32 int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range, in kobj_map() argument
36 unsigned int n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; in kobj_map()
53 p->range = range; in kobj_map()
59 while (*s && (*s)->range < range) in kobj_map()
68 void kobj_unmap(struct kobj_map *domain, dev_t dev, unsigned long range) in kobj_unmap() argument
70 unsigned int n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; in kobj_unmap()
83 if (p->dev == dev && p->range == range) { in kobj_unmap()
108 if (p->dev > dev || p->dev + p->range - 1 < dev) in kobj_lookup()
110 if (p->range - 1 >= best) in kobj_lookup()
[all …]

12345678910>>...76