/Linux-v5.4/kernel/ |
D | range.c | 11 int add_range(struct range *range, int az, int nr_range, u64 start, u64 end) in add_range() argument 20 range[nr_range].start = start; in add_range() 21 range[nr_range].end = end; in add_range() 28 int add_range_with_merge(struct range *range, int az, int nr_range, in add_range_with_merge() argument 40 if (!range[i].end) in add_range_with_merge() 43 common_start = max(range[i].start, start); in add_range_with_merge() 44 common_end = min(range[i].end, end); in add_range_with_merge() 49 start = min(range[i].start, start); in add_range_with_merge() 50 end = max(range[i].end, end); in add_range_with_merge() 52 memmove(&range[i], &range[i + 1], in add_range_with_merge() [all …]
|
/Linux-v5.4/drivers/soc/ti/ |
D | knav_qmss_acc.c | 20 #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 …]
|
D | knav_qmss_queue.c | 109 static int knav_queue_setup_irq(struct knav_range_info *range, in knav_queue_setup_irq() argument 112 unsigned queue = inst->id - range->queue_base; in knav_queue_setup_irq() 115 if (range->flags & RANGE_HAS_IRQ) { in knav_queue_setup_irq() 116 irq = range->irqs[queue].irq; in knav_queue_setup_irq() 122 if (range->irqs[queue].cpu_mask) { in knav_queue_setup_irq() 123 ret = irq_set_affinity_hint(irq, range->irqs[queue].cpu_mask); in knav_queue_setup_irq() 125 dev_warn(range->kdev->dev, in knav_queue_setup_irq() 136 struct knav_range_info *range = inst->range; in knav_queue_free_irq() local 137 unsigned queue = inst->id - inst->range->queue_base; in knav_queue_free_irq() 140 if (range->flags & RANGE_HAS_IRQ) { in knav_queue_free_irq() [all …]
|
/Linux-v5.4/mm/ |
D | hmm.c | 85 struct hmm_range *range; in notifiers_decrement() local 87 list_for_each_entry(range, &hmm->ranges, list) { in notifiers_decrement() 88 if (range->valid) in notifiers_decrement() 90 range->valid = true; in notifiers_decrement() 102 struct hmm_range *range; in hmm_invalidate_range_start() local 108 list_for_each_entry(range, &hmm->ranges, list) { in hmm_invalidate_range_start() 109 if (nrange->end < range->start || nrange->start >= range->end) in hmm_invalidate_range_start() 112 range->valid = false; in hmm_invalidate_range_start() 217 struct hmm_range *range; member 228 struct hmm_range *range = hmm_vma_walk->range; in hmm_vma_do_fault() local [all …]
|
/Linux-v5.4/security/selinux/ss/ |
D | context.h | 32 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 …]
|
D | mls.c | 48 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 …]
|
/Linux-v5.4/drivers/staging/android/ |
D | ashmem.c | 98 static inline unsigned long range_size(struct ashmem_range *range) in range_size() argument 100 return range->pgend - range->pgstart + 1; in range_size() 103 static inline bool range_on_lru(struct ashmem_range *range) in range_on_lru() argument 105 return range->purged == ASHMEM_NOT_PURGED; in range_on_lru() 108 static inline bool page_range_subsumes_range(struct ashmem_range *range, in page_range_subsumes_range() argument 111 return (range->pgstart >= start) && (range->pgend <= end); in page_range_subsumes_range() 114 static inline bool page_range_subsumed_by_range(struct ashmem_range *range, in page_range_subsumed_by_range() argument 117 return (range->pgstart <= start) && (range->pgend >= end); in page_range_subsumed_by_range() 120 static inline bool page_in_range(struct ashmem_range *range, size_t page) in page_in_range() argument 122 return (range->pgstart <= page) && (range->pgend >= page); in page_in_range() [all …]
|
/Linux-v5.4/include/linux/ |
D | hmm.h | 181 static inline bool hmm_range_wait_until_valid(struct hmm_range *range, in hmm_range_wait_until_valid() argument 184 return wait_event_timeout(range->hmm->wq, range->valid, in hmm_range_wait_until_valid() 193 static inline bool hmm_range_valid(struct hmm_range *range) in hmm_range_valid() argument 195 return range->valid; in hmm_range_valid() 207 static inline struct page *hmm_device_entry_to_page(const struct hmm_range *range, in hmm_device_entry_to_page() argument 210 if (entry == range->values[HMM_PFN_NONE]) in hmm_device_entry_to_page() 212 if (entry == range->values[HMM_PFN_ERROR]) in hmm_device_entry_to_page() 214 if (entry == range->values[HMM_PFN_SPECIAL]) in hmm_device_entry_to_page() 216 if (!(entry & range->flags[HMM_PFN_VALID])) in hmm_device_entry_to_page() 218 return pfn_to_page(entry >> range->pfn_shift); in hmm_device_entry_to_page() [all …]
|
D | mmu_notifier.h | 194 const struct mmu_notifier_range *range); 196 const struct mmu_notifier_range *range); 296 mmu_notifier_range_update_to_read_only(const struct mmu_notifier_range *range); 299 mmu_notifier_range_blockable(const struct mmu_notifier_range *range) in mmu_notifier_range_blockable() argument 301 return (range->flags & MMU_NOTIFIER_RANGE_BLOCKABLE); in mmu_notifier_range_blockable() 344 mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range) in mmu_notifier_invalidate_range_start() argument 349 if (mm_has_notifiers(range->mm)) { in mmu_notifier_invalidate_range_start() 350 range->flags |= MMU_NOTIFIER_RANGE_BLOCKABLE; in mmu_notifier_invalidate_range_start() 351 __mmu_notifier_invalidate_range_start(range); in mmu_notifier_invalidate_range_start() 357 mmu_notifier_invalidate_range_start_nonblock(struct mmu_notifier_range *range) in mmu_notifier_invalidate_range_start_nonblock() argument [all …]
|
D | range.h | 5 struct range { struct 10 int add_range(struct range *range, int az, int nr_range, argument 14 int add_range_with_merge(struct range *range, int az, int nr_range, 17 void subtract_range(struct range *range, int az, u64 start, u64 end); 19 int clean_sort_range(struct range *range, int az); 21 void sort_range(struct range *range, int nr_range);
|
/Linux-v5.4/lib/ |
D | logic_pio.c | 35 struct logic_pio_hwaddr *range; in logic_pio_register_range() local 49 list_for_each_entry(range, &io_range_list, list) { in logic_pio_register_range() 50 if (range->fwnode == new_range->fwnode) { in logic_pio_register_range() 54 if (range->flags == LOGIC_PIO_CPU_MMIO && in logic_pio_register_range() 57 if (start >= range->hw_start + range->size || in logic_pio_register_range() 58 end < range->hw_start) { in logic_pio_register_range() 59 mmio_end = range->io_start + range->size; in logic_pio_register_range() 64 } else if (range->flags == LOGIC_PIO_INDIRECT && in logic_pio_register_range() 66 iio_sz += range->size; in logic_pio_register_range() 107 void logic_pio_unregister_range(struct logic_pio_hwaddr *range) in logic_pio_unregister_range() argument [all …]
|
/Linux-v5.4/drivers/pci/hotplug/ |
D | ibmphp_res.c | 368 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-v5.4/net/netfilter/ |
D | nf_nat_core.c | 221 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 …]
|
D | xt_nat.c | 55 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 …]
|
D | xt_NETMAP.c | 21 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 …]
|
D | xt_MASQUERADE.c | 23 if (mr->range[0].flags & NF_NAT_RANGE_MAP_IPS) { in masquerade_tg_check() 37 struct nf_nat_range2 range; in masquerade_tg() local 41 range.flags = mr->range[0].flags; in masquerade_tg() 42 range.min_proto = mr->range[0].min; in masquerade_tg() 43 range.max_proto = mr->range[0].max; in masquerade_tg() 45 return nf_nat_masquerade_ipv4(skb, xt_hooknum(par), &range, in masquerade_tg() 63 const struct nf_nat_range2 *range = par->targinfo; in masquerade_tg6_checkentry() local 65 if (range->flags & NF_NAT_RANGE_MAP_IPS) in masquerade_tg6_checkentry()
|
/Linux-v5.4/drivers/regulator/ |
D | helpers.c | 130 int range; in regulator_get_voltage_sel_pickable_regmap() local 149 range = regulator_range_selector_to_index(rdev, r_val); in regulator_get_voltage_sel_pickable_regmap() 150 if (range < 0) in regulator_get_voltage_sel_pickable_regmap() 153 for (i = 0; i < range; i++) in regulator_get_voltage_sel_pickable_regmap() 175 unsigned int range; in regulator_set_voltage_sel_pickable_regmap() local 193 range = rdev->desc->linear_range_selectors[i]; in regulator_set_voltage_sel_pickable_regmap() 199 rdev->desc->vsel_mask, sel | range); in regulator_set_voltage_sel_pickable_regmap() 203 rdev->desc->vsel_range_mask, range); in regulator_set_voltage_sel_pickable_regmap() 406 const struct regulator_linear_range *range; in regulator_map_voltage_linear_range() local 418 range = &rdev->desc->linear_ranges[i]; in regulator_map_voltage_linear_range() [all …]
|
D | qcom_spmi-regulator.c | 354 struct spmi_voltage_range *range; member 432 .range = name##_ranges, \ 576 const struct spmi_voltage_range *range; in spmi_regulator_select_voltage() local 582 lim_min_uV = vreg->set_points->range[0].set_point_min_uV; in spmi_regulator_select_voltage() 584 vreg->set_points->range[vreg->set_points->count - 1].set_point_max_uV; in spmi_regulator_select_voltage() 598 range_max_uV = vreg->set_points->range[i - 1].set_point_max_uV; in spmi_regulator_select_voltage() 604 range = &vreg->set_points->range[range_id]; in spmi_regulator_select_voltage() 610 voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); in spmi_regulator_select_voltage() 611 uV = voltage_sel * range->step_uV + range->min_uV; in spmi_regulator_select_voltage() 623 selector += vreg->set_points->range[i].n_voltages; in spmi_regulator_select_voltage() [all …]
|
/Linux-v5.4/arch/x86/kernel/cpu/mtrr/ |
D | cleanup.c | 53 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-v5.4/drivers/of/ |
D | address.c | 47 u64 (*map)(__be32 *addr, const __be32 *range, 66 static u64 of_bus_default_map(__be32 *addr, const __be32 *range, in of_bus_default_map() argument 71 cp = of_read_number(range, na); in of_bus_default_map() 72 s = of_read_number(range + na + pna, ns); in of_bus_default_map() 145 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument 152 rf = of_bus_pci_get_flags(range); in of_bus_pci_map() 159 cp = of_read_number(range + 1, na - 1); in of_bus_pci_map() 160 s = of_read_number(range + na + pna, ns); in of_bus_pci_map() 245 parser->range = of_get_property(node, name, &rlen); in parser_init() 246 if (parser->range == NULL) in parser_init() [all …]
|
/Linux-v5.4/drivers/base/ |
D | map.c | 23 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() 108 if (p->dev > dev || p->dev + p->range - 1 < dev) in kobj_lookup() 110 if (p->range - 1 >= best) in kobj_lookup() [all …]
|
/Linux-v5.4/net/phonet/ |
D | sysctl.c | 30 static void set_local_port_range(int range[2]) in set_local_port_range() 33 local_port_range[0] = range[0]; in set_local_port_range() 34 local_port_range[1] = range[1]; in set_local_port_range() 56 int range[2] = {local_port_range[0], local_port_range[1]}; in proc_local_port_range() local 58 .data = &range, in proc_local_port_range() 59 .maxlen = sizeof(range), in proc_local_port_range() 68 if (range[1] < range[0]) in proc_local_port_range() 71 set_local_port_range(range); in proc_local_port_range()
|
/Linux-v5.4/Documentation/devicetree/bindings/iio/dac/ |
D | ad5758.txt | 36 - adi,range-microvolt: Voltage output range 38 * <0 5000000>: 0 V to 5 V voltage range 39 * <0 10000000>: 0 V to 10 V voltage range 40 * <(-5000000) 5000000>: ±5 V voltage range 41 * <(-10000000) 10000000>: ±10 V voltage range 42 - adi,range-microamp: Current output range 44 * <0 20000>: 0 mA to 20 mA current range 45 * <0 24000>: 0 mA to 24 mA current range 46 * <4 24000>: 4 mA to 20 mA current range 47 * <(-20000) 20000>: ±20 mA current range [all …]
|
/Linux-v5.4/arch/x86/kernel/ |
D | mmconf-fam10h_64.c | 37 const struct range *r1 = x1; in cmp_range() 38 const struct range *r2 = x2; in cmp_range() 66 struct range range[8]; in get_fam10h_pci_mmconf_base() local 134 range[hi_mmio_num].start = start; in get_fam10h_pci_mmconf_base() 135 range[hi_mmio_num].end = end; in get_fam10h_pci_mmconf_base() 143 sort(range, hi_mmio_num, sizeof(struct range), cmp_range, NULL); in get_fam10h_pci_mmconf_base() 145 if (range[hi_mmio_num - 1].end < base) in get_fam10h_pci_mmconf_base() 147 if (range[0].start > base + MMCONF_SIZE) in get_fam10h_pci_mmconf_base() 151 base = (range[0].start & MMCONF_MASK) - MMCONF_UNIT; in get_fam10h_pci_mmconf_base() 154 base = (range[hi_mmio_num - 1].end + MMCONF_UNIT) & MMCONF_MASK; in get_fam10h_pci_mmconf_base() [all …]
|
/Linux-v5.4/fs/xfs/ |
D | xfs_discard.c | 152 struct fstrim_range range; in xfs_ioc_trim() local 170 if (copy_from_user(&range, urange, sizeof(range))) in xfs_ioc_trim() 173 range.minlen = max_t(u64, granularity, range.minlen); in xfs_ioc_trim() 174 minlen = BTOBB(range.minlen); in xfs_ioc_trim() 182 if (range.start >= XFS_FSB_TO_B(mp, mp->m_sb.sb_dblocks) || in xfs_ioc_trim() 183 range.minlen > XFS_FSB_TO_B(mp, mp->m_ag_max_usable) || in xfs_ioc_trim() 184 range.len < mp->m_sb.sb_blocksize) in xfs_ioc_trim() 187 start = BTOBB(range.start); in xfs_ioc_trim() 188 end = start + BTOBBT(range.len) - 1; in xfs_ioc_trim() 209 range.len = XFS_FSB_TO_B(mp, blocks_trimmed); in xfs_ioc_trim() [all …]
|