Home
last modified time | relevance | path

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

12345678910>>...77

/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/fs/epfs/
Dfile.c53 int check_range(struct epfs_range *range) in check_range() argument
57 if (range->range[0].begin >= range->range[0].end) { in check_range()
58 epfs_err("Invalid range: [%llu, %llu)", range->range[0].begin, in check_range()
59 range->range[0].end); in check_range()
63 for (index = 1; index < range->num; index++) { in check_range()
64 if ((range->range[index].begin >= range->range[index].end) || in check_range()
65 (range->range[index].begin < range->range[index - 1].end)) { in check_range()
67 range->range[index - 1].begin, in check_range()
68 range->range[index - 1].end, in check_range()
69 range->range[index].begin, in check_range()
[all …]
/kernel/linux/linux-5.10/arch/mips/loongson64/
Dinit.c77 struct logic_pio_hwaddr *range; in add_legacy_isa_io() local
80 range = kzalloc(sizeof(*range), GFP_ATOMIC); in add_legacy_isa_io()
81 if (!range) in add_legacy_isa_io()
84 range->fwnode = fwnode; in add_legacy_isa_io()
85 range->size = size = round_up(size, PAGE_SIZE); in add_legacy_isa_io()
86 range->hw_start = hw_start; in add_legacy_isa_io()
87 range->flags = LOGIC_PIO_CPU_MMIO; in add_legacy_isa_io()
89 ret = logic_pio_register_range(range); in add_legacy_isa_io()
91 kfree(range); in add_legacy_isa_io()
96 if (range->io_start != 0) { in add_legacy_isa_io()
[all …]
/kernel/linux/linux-5.10/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()
200 if (!mls_range_isvalid(p, &c->range)) in mls_context_isvalid()
212 if (!mls_range_contains(usrdatum->range, c->range)) in mls_context_isvalid()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/drivers/staging/android/
Dashmem.c132 static inline unsigned long range_size(struct ashmem_range *range) in range_size() argument
134 return range->pgend - range->pgstart + 1; in range_size()
137 static inline bool range_on_lru(struct ashmem_range *range) in range_on_lru() argument
139 return range->purged == ASHMEM_NOT_PURGED; in range_on_lru()
142 static inline bool page_range_subsumes_range(struct ashmem_range *range, in page_range_subsumes_range() argument
145 return (range->pgstart >= start) && (range->pgend <= end); in page_range_subsumes_range()
148 static inline bool page_range_subsumed_by_range(struct ashmem_range *range, in page_range_subsumed_by_range() argument
151 return (range->pgstart <= start) && (range->pgend >= end); in page_range_subsumed_by_range()
154 static inline bool page_in_range(struct ashmem_range *range, size_t page) in page_in_range() argument
156 return (range->pgstart <= page) && (range->pgend >= page); in page_in_range()
[all …]
/kernel/linux/linux-5.10/mm/
Dmemremap.c66 static void pgmap_array_delete(struct range *range) in pgmap_array_delete() argument
68 xa_store_range(&pgmap_array, PHYS_PFN(range->start), PHYS_PFN(range->end), in pgmap_array_delete()
75 struct range *range = &pgmap->ranges[range_id]; in pfn_first() local
76 unsigned long pfn = PHYS_PFN(range->start); in pfn_first()
88 struct range *range = &pgmap->ranges[i]; in pgmap_pfn_valid() local
90 if (pfn >= PHYS_PFN(range->start) && in pgmap_pfn_valid()
91 pfn <= PHYS_PFN(range->end)) in pgmap_pfn_valid()
100 const struct range *range = &pgmap->ranges[range_id]; in pfn_end() local
102 return (range->start + range_len(range)) >> PAGE_SHIFT; in pfn_end()
141 struct range *range = &pgmap->ranges[range_id]; in pageunmap_range() local
[all …]
Dhmm.c30 struct hmm_range *range; member
41 struct hmm_range *range, unsigned long cpu_flags) in hmm_pfns_fill() argument
43 unsigned long i = (addr - range->start) >> PAGE_SHIFT; in hmm_pfns_fill()
46 range->hmm_pfns[i] = cpu_flags; in hmm_pfns_fill()
88 struct hmm_range *range = hmm_vma_walk->range; in hmm_pte_need_fault() local
100 pfn_req_flags &= range->pfn_flags_mask; in hmm_pte_need_fault()
101 pfn_req_flags |= range->default_flags; in hmm_pte_need_fault()
123 struct hmm_range *range = hmm_vma_walk->range; in hmm_range_need_fault() local
132 if (!((range->default_flags | range->pfn_flags_mask) & in hmm_range_need_fault()
149 struct hmm_range *range = hmm_vma_walk->range; in hmm_vma_walk_hole() local
[all …]
/kernel/linux/linux-5.10/drivers/dax/
Dkmem.c22 static int dax_kmem_range(struct dev_dax *dev_dax, int i, struct range *r) in dax_kmem_range()
25 struct range *range = &dax_range->range; in dax_kmem_range() local
28 r->start = ALIGN(range->start, memory_block_size_bytes()); in dax_kmem_range()
29 r->end = ALIGN_DOWN(range->end + 1, memory_block_size_bytes()) - 1; in dax_kmem_range()
31 r->start = range->start; in dax_kmem_range()
32 r->end = range->end; in dax_kmem_range()
74 struct range range; in dev_dax_kmem_probe() local
76 rc = dax_kmem_range(dev_dax, i, &range); in dev_dax_kmem_probe()
79 i, range.start, range.end); in dev_dax_kmem_probe()
84 res = request_mem_region(range.start, range_len(&range), data->res_name); in dev_dax_kmem_probe()
[all …]
/kernel/linux/linux-5.10/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.h179 const struct mmu_notifier_range *range);
181 const struct mmu_notifier_range *range);
247 const struct mmu_notifier_range *range,
398 mmu_notifier_range_update_to_read_only(const struct mmu_notifier_range *range);
401 mmu_notifier_range_blockable(const struct mmu_notifier_range *range) in mmu_notifier_range_blockable() argument
403 return (range->flags & MMU_NOTIFIER_RANGE_BLOCKABLE); in mmu_notifier_range_blockable()
446 mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range) in mmu_notifier_invalidate_range_start() argument
451 if (mm_has_notifiers(range->mm)) { in mmu_notifier_invalidate_range_start()
452 range->flags |= MMU_NOTIFIER_RANGE_BLOCKABLE; in mmu_notifier_invalidate_range_start()
453 __mmu_notifier_invalidate_range_start(range); in mmu_notifier_invalidate_range_start()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/net/netfilter/
Dnf_nat_core.c221 const struct nf_nat_range2 *range) in nf_nat_inet_in_range() argument
224 return ntohl(t->src.u3.ip) >= ntohl(range->min_addr.ip) && in nf_nat_inet_in_range()
225 ntohl(t->src.u3.ip) <= ntohl(range->max_addr.ip); in nf_nat_inet_in_range()
227 return ipv6_addr_cmp(&t->src.u3.in6, &range->min_addr.in6) >= 0 && in nf_nat_inet_in_range()
228 ipv6_addr_cmp(&t->src.u3.in6, &range->max_addr.in6) <= 0; in nf_nat_inet_in_range()
266 const struct nf_nat_range2 *range) in in_range() argument
271 if (range->flags & NF_NAT_RANGE_MAP_IPS && in in_range()
272 !nf_nat_inet_in_range(tuple, range)) in in_range()
275 if (!(range->flags & NF_NAT_RANGE_PROTO_SPECIFIED)) in in_range()
279 &range->min_proto, &range->max_proto); in in_range()
[all …]
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 …]
Dnft_nat.c33 static void nft_nat_setup_addr(struct nf_nat_range2 *range, in nft_nat_setup_addr() argument
39 range->min_addr.ip = (__force __be32) in nft_nat_setup_addr()
41 range->max_addr.ip = (__force __be32) in nft_nat_setup_addr()
45 memcpy(range->min_addr.ip6, &regs->data[priv->sreg_addr_min], in nft_nat_setup_addr()
46 sizeof(range->min_addr.ip6)); in nft_nat_setup_addr()
47 memcpy(range->max_addr.ip6, &regs->data[priv->sreg_addr_max], in nft_nat_setup_addr()
48 sizeof(range->max_addr.ip6)); in nft_nat_setup_addr()
53 static void nft_nat_setup_proto(struct nf_nat_range2 *range, in nft_nat_setup_proto() argument
57 range->min_proto.all = (__force __be16) in nft_nat_setup_proto()
59 range->max_proto.all = (__force __be16) in nft_nat_setup_proto()
[all …]
/kernel/linux/linux-5.10/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()
166 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument
173 rf = of_bus_pci_get_flags(range); in of_bus_pci_map()
180 cp = of_read_number(range + 1, na - 1); in of_bus_pci_map()
181 s = of_read_number(range + na + pna, ns); in of_bus_pci_map()
271 int of_pci_range_to_resource(struct of_pci_range *range, in of_pci_range_to_resource() argument
275 res->flags = range->flags; in of_pci_range_to_resource()
[all …]
/kernel/linux/linux-5.10/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 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 n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; in kobj_unmap()
83 if (p->dev == dev && p->range == range) { in kobj_unmap()
95 void kobj_delete(struct kobj_map *domain, dev_t dev, unsigned long range, in kobj_delete() argument
98 unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; in kobj_delete()
[all …]
/kernel/linux/linux-5.10/drivers/regulator/
Dqcom_spmi-regulator.c366 struct spmi_voltage_range *range; member
444 .range = name##_ranges, \
608 const struct spmi_voltage_range *range; in spmi_regulator_select_voltage() local
614 lim_min_uV = vreg->set_points->range[0].set_point_min_uV; in spmi_regulator_select_voltage()
616 vreg->set_points->range[vreg->set_points->count - 1].set_point_max_uV; in spmi_regulator_select_voltage()
630 range_max_uV = vreg->set_points->range[i - 1].set_point_max_uV; in spmi_regulator_select_voltage()
636 range = &vreg->set_points->range[range_id]; in spmi_regulator_select_voltage()
642 voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); in spmi_regulator_select_voltage()
643 uV = voltage_sel * range->step_uV + range->min_uV; in spmi_regulator_select_voltage()
655 selector += vreg->set_points->range[i].n_voltages; in spmi_regulator_select_voltage()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/drivers/mfd/
Dab8500-debugfs.c126 const struct ab8500_reg_range *range; member
158 .range = NULL,
162 .range = (struct ab8500_reg_range[]) {
179 .range = (struct ab8500_reg_range[]) {
200 .range = (struct ab8500_reg_range[]) {
217 .range = (struct ab8500_reg_range[]) {
246 .range = (struct ab8500_reg_range[]) {
259 .range = (struct ab8500_reg_range[]) {
300 .range = NULL,
304 .range = (struct ab8500_reg_range[]) {
[all …]
/kernel/linux/linux-5.10/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 …]

12345678910>>...77