Searched refs:range (Results 1 - 200 of 3360) sorted by relevance

1234567891011>>

/linux-4.4.14/include/linux/
H A Drange.h4 struct range { struct
9 int add_range(struct range *range, int az, int nr_range,
13 int add_range_with_merge(struct range *range, int az, int nr_range,
16 void subtract_range(struct range *range, int az, u64 start, u64 end);
18 int clean_sort_range(struct range *range, int az);
20 void sort_range(struct range *range, int nr_range);
H A Dpage-isolation.h43 * If specified range includes migrate types other than MOVABLE or CMA,
46 * For isolating all pages in the range finally, the caller have to
47 * free all pages in the range. test_page_isolated() can be used for
56 * target range is [start_pfn, end_pfn)
H A Dof_address.h9 const __be32 *range; member in struct:of_pci_range_parser
23 #define for_each_of_pci_range(parser, range) \
24 for (; of_pci_range_parser_one(parser, range);)
55 struct of_pci_range *range);
94 struct of_pci_range *range) of_pci_range_parser_one()
144 extern int of_pci_range_to_resource(struct of_pci_range *range,
159 static inline int of_pci_range_to_resource(struct of_pci_range *range, of_pci_range_to_resource() argument
92 of_pci_range_parser_one( struct of_pci_range_parser *parser, struct of_pci_range *range) of_pci_range_parser_one() argument
H A Dmemblock.h113 * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
114 * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
115 * @p_nid: ptr to int for nid of the range, can be %NULL
133 * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
134 * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
135 * @p_nid: ptr to int for nid of the range, can be %NULL
149 * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
150 * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
194 * for_each_mem_pfn_range - early memory pfn range iterator
197 * @p_start: ptr to ulong for start pfn of the range, can be %NULL
198 * @p_end: ptr to ulong for end pfn of the range, can be %NULL
199 * @p_nid: ptr to int for nid of the range, can be %NULL
212 * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
213 * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
214 * @p_nid: ptr to int for nid of the range, can be %NULL
228 * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
229 * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
230 * @p_nid: ptr to int for nid of the range, can be %NULL
H A Dcordic.h42 * values are scaled by 2^16 for precision. The range for theta is
43 * for -180 degrees to +180 degrees. Passed values outside this range are
H A Dtime.h162 * the number of seconds after the minute, normally in the range
166 /* the number of minutes after the hour, in the range 0 to 59*/
168 /* the number of hours past midnight, in the range 0 to 23 */
170 /* the day of the month, in the range 1 to 31 */
172 /* the number of months since January, in the range 0 to 11 */
176 /* the number of days since Sunday, in the range 0 to 6 */
178 /* the number of days since January 1, in the range 0 to 365 */
/linux-4.4.14/kernel/
H A Drange.c8 #include <linux/range.h>
10 int add_range(struct range *range, int az, int nr_range, u64 start, u64 end) add_range() argument
19 range[nr_range].start = start; add_range()
20 range[nr_range].end = end; add_range()
27 int add_range_with_merge(struct range *range, int az, int nr_range, add_range_with_merge() argument
39 if (!range[i].end) add_range_with_merge()
42 common_start = max(range[i].start, start); add_range_with_merge()
43 common_end = min(range[i].end, end); add_range_with_merge()
48 start = min(range[i].start, start); add_range_with_merge()
49 end = max(range[i].end, end); add_range_with_merge()
51 memmove(&range[i], &range[i + 1], add_range_with_merge()
52 (nr_range - (i + 1)) * sizeof(range[i])); add_range_with_merge()
53 range[nr_range - 1].start = 0; add_range_with_merge()
54 range[nr_range - 1].end = 0; add_range_with_merge()
60 return add_range(range, az, nr_range, start, end); add_range_with_merge()
63 void subtract_range(struct range *range, int az, u64 start, u64 end) subtract_range() argument
71 if (!range[j].end) subtract_range()
74 if (start <= range[j].start && end >= range[j].end) { subtract_range()
75 range[j].start = 0; subtract_range()
76 range[j].end = 0; subtract_range()
80 if (start <= range[j].start && end < range[j].end && subtract_range()
81 range[j].start < end) { subtract_range()
82 range[j].start = end; subtract_range()
87 if (start > range[j].start && end >= range[j].end && subtract_range()
88 range[j].end > start) { subtract_range()
89 range[j].end = start; subtract_range()
93 if (start > range[j].start && end < range[j].end) { subtract_range()
96 if (range[i].end == 0) subtract_range()
100 range[i].end = range[j].end; subtract_range()
101 range[i].start = end; subtract_range()
106 range[j].end = start; subtract_range()
114 const struct range *r1 = x1; cmp_range()
115 const struct range *r2 = x2; cmp_range()
124 int clean_sort_range(struct range *range, int az) clean_sort_range() argument
129 if (range[i].end) clean_sort_range()
132 if (range[j].end) { clean_sort_range()
139 range[i].start = range[k].start; clean_sort_range()
140 range[i].end = range[k].end; clean_sort_range()
141 range[k].start = 0; clean_sort_range()
142 range[k].end = 0; clean_sort_range()
147 if (!range[i].end) { clean_sort_range()
154 sort(range, nr_range, sizeof(struct range), cmp_range, NULL); clean_sort_range()
159 void sort_range(struct range *range, int nr_range) sort_range() argument
162 sort(range, nr_range, sizeof(struct range), cmp_range, NULL); sort_range()
/linux-4.4.14/security/selinux/ss/
H A Dcontext.h24 * identity, a role, a type and a MLS range.
31 struct mls_range range; member in struct:context
37 memset(&c->range, 0, sizeof(c->range)); mls_context_init()
44 dst->range.level[0].sens = src->range.level[0].sens; mls_context_cpy()
45 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); mls_context_cpy()
49 dst->range.level[1].sens = src->range.level[1].sens; mls_context_cpy()
50 rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[1].cat); mls_context_cpy()
52 ebitmap_destroy(&dst->range.level[0].cat); mls_context_cpy()
58 * Sets both levels in the MLS range of 'dst' to the low level of 'src'.
64 dst->range.level[0].sens = src->range.level[0].sens; mls_context_cpy_low()
65 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[0].cat); mls_context_cpy_low()
69 dst->range.level[1].sens = src->range.level[0].sens; mls_context_cpy_low()
70 rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[0].cat); mls_context_cpy_low()
72 ebitmap_destroy(&dst->range.level[0].cat); mls_context_cpy_low()
78 * Sets both levels in the MLS range of 'dst' to the high level of 'src'.
84 dst->range.level[0].sens = src->range.level[1].sens; mls_context_cpy_high()
85 rc = ebitmap_cpy(&dst->range.level[0].cat, &src->range.level[1].cat); mls_context_cpy_high()
89 dst->range.level[1].sens = src->range.level[1].sens; mls_context_cpy_high()
90 rc = ebitmap_cpy(&dst->range.level[1].cat, &src->range.level[1].cat); mls_context_cpy_high()
92 ebitmap_destroy(&dst->range.level[0].cat); mls_context_cpy_high()
99 return ((c1->range.level[0].sens == c2->range.level[0].sens) && mls_context_cmp()
100 ebitmap_cmp(&c1->range.level[0].cat, &c2->range.level[0].cat) && mls_context_cmp()
101 (c1->range.level[1].sens == c2->range.level[1].sens) && mls_context_cmp()
102 ebitmap_cmp(&c1->range.level[1].cat, &c2->range.level[1].cat)); mls_context_cmp()
107 ebitmap_destroy(&c->range.level[0].cat); mls_context_destroy()
108 ebitmap_destroy(&c->range.level[1].cat); mls_context_destroy()
H A Dmls.c47 int index_sens = context->range.level[l].sens; mls_compute_context_len()
53 e = &context->range.level[l].cat; ebitmap_for_each_positive_bit()
72 if (mls_level_eq(&context->range.level[0],
73 &context->range.level[1]))
106 context->range.level[l].sens - 1)); mls_sid_to_context()
112 e = &context->range.level[l].cat; ebitmap_for_each_positive_bit()
148 if (mls_level_eq(&context->range.level[0],
149 &context->range.level[1]))
198 if (!mls_range_isvalid(p, &c->range)) mls_context_isvalid()
205 * User must be authorized for the MLS range. mls_context_isvalid()
210 if (!mls_range_contains(usrdatum->range, c->range)) mls_context_isvalid()
211 return 0; /* user may not be associated with range */ mls_context_isvalid()
288 context->range.level[l].sens = levdatum->level->sens; mls_context_to_sid()
300 /* Separate into range if exists */ mls_context_to_sid()
314 rc = ebitmap_set_bit(&context->range.level[l].cat, mls_context_to_sid()
319 /* If range, set all categories in range */ mls_context_to_sid()
335 rc = ebitmap_set_bit(&context->range.level[l].cat, i, 1); mls_context_to_sid()
359 context->range.level[1].sens = context->range.level[0].sens; mls_context_to_sid()
360 rc = ebitmap_cpy(&context->range.level[1].cat, mls_context_to_sid()
361 &context->range.level[0].cat); mls_context_to_sid()
400 * Copies the MLS range `range' into `context'.
403 struct mls_range *range) mls_range_set()
407 /* Copy the MLS range into the context */ mls_range_set()
409 context->range.level[l].sens = range->level[l].sens; mls_range_set()
410 rc = ebitmap_cpy(&context->range.level[l].cat, mls_range_set()
411 &range->level[l].cat); mls_range_set()
423 struct mls_level *fromcon_sen = &(fromcon->range.level[0]); mls_setup_user_range()
424 struct mls_level *fromcon_clr = &(fromcon->range.level[1]); mls_setup_user_range()
425 struct mls_level *user_low = &(user->range.level[0]); mls_setup_user_range()
426 struct mls_level *user_clr = &(user->range.level[1]); mls_setup_user_range()
428 struct mls_level *usercon_sen = &(usercon->range.level[0]); mls_setup_user_range()
429 struct mls_level *usercon_clr = &(usercon->range.level[1]); mls_setup_user_range()
478 c->range.level[l].sens - 1)); mls_convert_context()
482 c->range.level[l].sens = levdatum->level->sens; mls_convert_context()
485 ebitmap_for_each_positive_bit(&c->range.level[l].cat, node, i) { mls_convert_context()
498 ebitmap_destroy(&c->range.level[l].cat); mls_convert_context()
499 c->range.level[l].cat = bitmap; mls_convert_context()
522 /* Look for a range transition rule. */ mls_compute_sid()
585 secattr->attr.mls.lvl = context->range.level[0].sens - 1; mls_export_netlbl_lvl()
605 context->range.level[0].sens = secattr->attr.mls.lvl + 1; mls_import_netlbl_lvl()
606 context->range.level[1].sens = context->range.level[0].sens; mls_import_netlbl_lvl()
627 rc = ebitmap_netlbl_export(&context->range.level[0].cat, mls_export_netlbl_cat()
655 rc = ebitmap_netlbl_import(&context->range.level[0].cat, mls_import_netlbl_cat()
659 memcpy(&context->range.level[1].cat, &context->range.level[0].cat, mls_import_netlbl_cat()
660 sizeof(context->range.level[0].cat)); mls_import_netlbl_cat()
665 ebitmap_destroy(&context->range.level[0].cat); mls_import_netlbl_cat()
402 mls_range_set(struct context *context, struct mls_range *range) mls_range_set() argument
/linux-4.4.14/drivers/soc/ti/
H A Dknav_qmss_acc.c37 #define knav_range_offset_to_inst(kdev, range, q) \
38 (range->queue_base_inst + (q << kdev->inst_shift))
40 static void __knav_acc_notify(struct knav_range_info *range, __knav_acc_notify() argument
43 struct knav_device *kdev = range->kdev; __knav_acc_notify()
47 range_base = kdev->base_id + range->queue_base; __knav_acc_notify()
49 if (range->flags & RANGE_MULTI_QUEUE) { __knav_acc_notify()
50 for (queue = 0; queue < range->num_queues; queue++) { __knav_acc_notify()
51 inst = knav_range_offset_to_inst(kdev, range, __knav_acc_notify()
61 queue = acc->channel - range->acc_info.start_channel; __knav_acc_notify()
62 inst = knav_range_offset_to_inst(kdev, range, queue); __knav_acc_notify()
69 static int knav_acc_set_notify(struct knav_range_info *range, knav_acc_set_notify() argument
73 struct knav_pdsp_info *pdsp = range->acc_info.pdsp; knav_acc_set_notify()
74 struct knav_device *kdev = range->kdev; knav_acc_set_notify()
98 struct knav_range_info *range; knav_acc_int_handler() local
107 range = _instdata; knav_acc_int_handler()
108 info = &range->acc_info; knav_acc_int_handler()
109 kdev = range->kdev; knav_acc_int_handler()
110 pdsp = range->acc_info.pdsp; knav_acc_int_handler()
111 acc = range->acc; knav_acc_int_handler()
113 range_base = kdev->base_id + range->queue_base; knav_acc_int_handler()
114 if ((range->flags & RANGE_MULTI_QUEUE) == 0) { knav_acc_int_handler()
115 for (queue = 0; queue < range->num_irqs; queue++) knav_acc_int_handler()
116 if (range->irqs[queue].irq == irq) knav_acc_int_handler()
118 kq = knav_range_offset_to_inst(kdev, range, queue); knav_acc_int_handler()
129 __knav_acc_notify(range, acc); knav_acc_int_handler()
164 if (range->flags & RANGE_MULTI_QUEUE) { knav_acc_int_handler()
167 queue >= range_base + range->num_queues) { knav_acc_int_handler()
171 range_base + range->num_queues); knav_acc_int_handler()
175 kq = knav_range_offset_to_inst(kdev, range, knav_acc_int_handler()
194 __knav_acc_notify(range, acc); knav_acc_int_handler()
212 static int knav_range_setup_acc_irq(struct knav_range_info *range, knav_range_setup_acc_irq() argument
215 struct knav_device *kdev = range->kdev; knav_range_setup_acc_irq()
221 if (range->flags & RANGE_MULTI_QUEUE) { knav_range_setup_acc_irq()
222 acc = range->acc; knav_range_setup_acc_irq()
223 irq = range->irqs[0].irq; knav_range_setup_acc_irq()
224 cpu_map = range->irqs[0].cpu_map; knav_range_setup_acc_irq()
226 acc = range->acc + queue; knav_range_setup_acc_irq()
227 irq = range->irqs[queue].irq; knav_range_setup_acc_irq()
228 cpu_map = range->irqs[queue].cpu_map; knav_range_setup_acc_irq()
250 range); knav_range_setup_acc_irq()
254 dev_warn(range->kdev->dev, knav_range_setup_acc_irq()
266 dev_warn(range->kdev->dev, knav_range_setup_acc_irq()
268 free_irq(irq, range); knav_range_setup_acc_irq()
318 struct knav_range_info *range, knav_acc_setup_cmd()
322 struct knav_acc_info *info = &range->acc_info; knav_acc_setup_cmd()
327 if (range->flags & RANGE_MULTI_QUEUE) { knav_acc_setup_cmd()
328 acc = range->acc; knav_acc_setup_cmd()
329 queue_base = range->queue_base; knav_acc_setup_cmd()
330 queue_mask = BIT(range->num_queues) - 1; knav_acc_setup_cmd()
332 acc = range->acc + queue; knav_acc_setup_cmd()
333 queue_base = range->queue_base + queue; knav_acc_setup_cmd()
345 if (range->flags & RANGE_MULTI_QUEUE) knav_acc_setup_cmd()
352 struct knav_range_info *range, knav_acc_stop()
359 acc = range->acc + queue; knav_acc_stop()
361 knav_acc_setup_cmd(kdev, range, &cmd, queue); knav_acc_stop()
363 result = knav_acc_write(kdev, range->acc_info.pdsp, &cmd); knav_acc_stop()
370 struct knav_range_info *range, knav_acc_start()
377 acc = range->acc + queue; knav_acc_start()
379 knav_acc_setup_cmd(kdev, range, &cmd, queue); knav_acc_start()
381 result = knav_acc_write(kdev, range->acc_info.pdsp, &cmd); knav_acc_start()
389 static int knav_acc_init_range(struct knav_range_info *range) knav_acc_init_range() argument
391 struct knav_device *kdev = range->kdev; knav_acc_init_range()
396 for (queue = 0; queue < range->num_queues; queue++) { knav_acc_init_range()
397 acc = range->acc + queue; knav_acc_init_range()
399 knav_acc_stop(kdev, range, queue); knav_acc_init_range()
401 result = knav_acc_start(kdev, range, queue); knav_acc_init_range()
406 if (range->flags & RANGE_MULTI_QUEUE) knav_acc_init_range()
412 static int knav_acc_init_queue(struct knav_range_info *range, knav_acc_init_queue() argument
415 unsigned id = kq->id - range->queue_base; knav_acc_init_queue()
417 kq->descs = devm_kzalloc(range->kdev->dev, knav_acc_init_queue()
422 kq->acc = range->acc; knav_acc_init_queue()
423 if ((range->flags & RANGE_MULTI_QUEUE) == 0) knav_acc_init_queue()
428 static int knav_acc_open_queue(struct knav_range_info *range, knav_acc_open_queue() argument
431 unsigned id = inst->id - range->queue_base; knav_acc_open_queue()
433 return knav_range_setup_acc_irq(range, id, true); knav_acc_open_queue()
436 static int knav_acc_close_queue(struct knav_range_info *range, knav_acc_close_queue() argument
439 unsigned id = inst->id - range->queue_base; knav_acc_close_queue()
441 return knav_range_setup_acc_irq(range, id, false); knav_acc_close_queue()
444 static int knav_acc_free_range(struct knav_range_info *range) knav_acc_free_range() argument
446 struct knav_device *kdev = range->kdev; knav_acc_free_range()
451 info = &range->acc_info; knav_acc_free_range()
453 if (range->flags & RANGE_MULTI_QUEUE) knav_acc_free_range()
456 channels = range->num_queues; knav_acc_free_range()
459 acc = range->acc + channel; knav_acc_free_range()
466 devm_kfree(range->kdev->dev, range->acc); knav_acc_free_range()
484 * @range: qmms range information
490 struct knav_range_info *range) knav_init_acc_range()
501 range->flags |= RANGE_HAS_ACCUMULATOR; knav_init_acc_range()
502 info = &range->acc_info; knav_init_acc_range()
515 dev_err(kdev->dev, "channel %d invalid for range %s\n", knav_init_acc_range()
516 info->start_channel, range->name); knav_init_acc_range()
521 dev_err(kdev->dev, "pacing mode %d invalid for range %s\n", knav_init_acc_range()
522 info->pacing_mode, range->name); knav_init_acc_range()
528 dev_err(kdev->dev, "pdsp id %d not found for range %s\n", knav_init_acc_range()
529 info->pdsp_id, range->name); knav_init_acc_range()
534 dev_err(kdev->dev, "pdsp id %d not started for range %s\n", knav_init_acc_range()
535 info->pdsp_id, range->name); knav_init_acc_range()
540 channels = range->num_queues; knav_init_acc_range()
542 range->flags |= RANGE_MULTI_QUEUE; knav_init_acc_range()
544 if (range->queue_base & (32 - 1)) { knav_init_acc_range()
546 "misaligned multi-queue accumulator range %s\n", knav_init_acc_range()
547 range->name); knav_init_acc_range()
550 if (range->num_queues > 32) { knav_init_acc_range()
552 "too many queues in accumulator range %s\n", knav_init_acc_range()
553 range->name); knav_init_acc_range()
564 range->acc = devm_kzalloc(kdev->dev, channels * sizeof(*range->acc), knav_init_acc_range()
566 if (!range->acc) knav_init_acc_range()
570 acc = range->acc + channel; knav_init_acc_range()
598 range->ops = &knav_acc_range_ops; knav_init_acc_range()
317 knav_acc_setup_cmd(struct knav_device *kdev, struct knav_range_info *range, struct knav_reg_acc_command *cmd, int queue) knav_acc_setup_cmd() argument
351 knav_acc_stop(struct knav_device *kdev, struct knav_range_info *range, int queue) knav_acc_stop() argument
369 knav_acc_start(struct knav_device *kdev, struct knav_range_info *range, int queue) knav_acc_start() argument
488 knav_init_acc_range(struct knav_device *kdev, struct device_node *node, struct knav_range_info *range) knav_init_acc_range() argument
H A Dknav_qmss_queue.c110 static int knav_queue_setup_irq(struct knav_range_info *range, knav_queue_setup_irq() argument
113 unsigned queue = inst->id - range->queue_base; knav_queue_setup_irq()
117 if (range->flags & RANGE_HAS_IRQ) { knav_queue_setup_irq()
118 irq = range->irqs[queue].irq; knav_queue_setup_irq()
119 cpu_map = range->irqs[queue].cpu_map; knav_queue_setup_irq()
128 dev_warn(range->kdev->dev, knav_queue_setup_irq()
139 struct knav_range_info *range = inst->range; knav_queue_free_irq() local
140 unsigned queue = inst->id - inst->range->queue_base; knav_queue_free_irq()
143 if (range->flags & RANGE_HAS_IRQ) { knav_queue_free_irq()
144 irq = range->irqs[queue].irq; knav_queue_free_irq()
157 return inst->range->flags & RANGE_RESERVED; knav_queue_is_reserved()
179 (inst->range->flags & RANGE_HAS_IRQ)) { knav_queue_match_type()
182 (inst->range->flags & RANGE_HAS_ACCUMULATOR)) { knav_queue_match_type()
185 !(inst->range->flags & knav_queue_match_type()
235 struct knav_range_info *range = inst->range; __knav_queue_open() local
238 if (range->ops && range->ops->open_queue) __knav_queue_open()
239 ret = range->ops->open_queue(range, inst, flags); __knav_queue_open()
307 struct knav_range_info *range = inst->range; knav_queue_set_notify() local
309 if (range->ops && range->ops->set_notify) knav_queue_set_notify()
310 range->ops->set_notify(range, inst, enabled); knav_queue_set_notify()
358 if (!(qh->inst->range->flags & (RANGE_HAS_ACCUMULATOR | RANGE_HAS_IRQ))) knav_queue_set_notifier()
373 static int knav_gp_set_notify(struct knav_range_info *range, knav_gp_set_notify() argument
379 if (range->flags & RANGE_HAS_IRQ) { knav_gp_set_notify()
380 queue = inst->id - range->queue_base; knav_gp_set_notify()
382 enable_irq(range->irqs[queue].irq); knav_gp_set_notify()
384 disable_irq_nosync(range->irqs[queue].irq); knav_gp_set_notify()
389 static int knav_gp_open_queue(struct knav_range_info *range, knav_gp_open_queue() argument
392 return knav_queue_setup_irq(range, inst); knav_gp_open_queue()
395 static int knav_gp_close_queue(struct knav_range_info *range, knav_gp_close_queue() argument
554 struct knav_range_info *range = inst->range; knav_queue_close() local
556 if (range->ops && range->ops->close_queue) knav_queue_close()
557 range->ops->close_queue(range, inst); knav_queue_close()
1138 * if the range specified is 0x0c000000-0x0c003fff (i.e., 16K entries knav_get_link_ram()
1196 struct knav_range_info *range; knav_setup_queue_range() local
1201 range = devm_kzalloc(dev, sizeof(*range), GFP_KERNEL); knav_setup_queue_range()
1202 if (!range) { knav_setup_queue_range()
1203 dev_err(dev, "out of memory allocating range\n"); knav_setup_queue_range()
1207 range->kdev = kdev; knav_setup_queue_range()
1208 range->name = knav_queue_find_name(node); knav_setup_queue_range()
1211 range->queue_base = temp[0] - kdev->base_id; knav_setup_queue_range()
1212 range->num_queues = temp[1]; knav_setup_queue_range()
1214 dev_err(dev, "invalid queue range %s\n", range->name); knav_setup_queue_range()
1215 devm_kfree(dev, range); knav_setup_queue_range()
1225 range->irqs[i].irq = irq_create_of_mapping(&oirq); knav_setup_queue_range()
1226 if (range->irqs[i].irq == IRQ_NONE) knav_setup_queue_range()
1229 range->num_irqs++; knav_setup_queue_range()
1232 range->irqs[i].cpu_map = knav_setup_queue_range()
1236 range->num_irqs = min(range->num_irqs, range->num_queues); knav_setup_queue_range()
1237 if (range->num_irqs) knav_setup_queue_range()
1238 range->flags |= RANGE_HAS_IRQ; knav_setup_queue_range()
1241 range->flags |= RANGE_RESERVED; knav_setup_queue_range()
1244 ret = knav_init_acc_range(kdev, node, range); knav_setup_queue_range()
1246 devm_kfree(dev, range); knav_setup_queue_range()
1250 range->ops = &knav_gp_range_ops; knav_setup_queue_range()
1255 start = max(qmgr->start_queue, range->queue_base); for_each_qmgr()
1257 range->queue_base + range->num_queues); for_each_qmgr()
1267 list_add_tail(&range->list, &kdev->queue_ranges);
1268 dev_dbg(dev, "added range %s: %d-%d, %d irqs%s%s%s\n",
1269 range->name, range->queue_base,
1270 range->queue_base + range->num_queues - 1,
1271 range->num_irqs,
1272 (range->flags & RANGE_HAS_IRQ) ? ", has irq" : "",
1273 (range->flags & RANGE_RESERVED) ? ", reserved" : "",
1274 (range->flags & RANGE_HAS_ACCUMULATOR) ? ", acc" : "");
1275 kdev->num_queues_in_use += range->num_queues;
1282 struct device_node *type, *range; knav_setup_queue_pools() local
1286 for_each_child_of_node(type, range) { for_each_child_of_node()
1287 ret = knav_setup_queue_range(kdev, range); for_each_child_of_node()
1294 dev_err(kdev->dev, "no valid queue range found\n");
1301 struct knav_range_info *range) knav_free_queue_range()
1303 if (range->ops && range->ops->free_range) knav_free_queue_range()
1304 range->ops->free_range(range); knav_free_queue_range()
1305 list_del(&range->list); knav_free_queue_range()
1306 devm_kfree(kdev->dev, range); knav_free_queue_range()
1311 struct knav_range_info *range; knav_free_queue_ranges() local
1314 range = first_queue_range(kdev); knav_free_queue_ranges()
1315 if (!range) knav_free_queue_ranges()
1317 knav_free_queue_range(kdev, range); knav_free_queue_ranges()
1385 dev_err(dev, "invalid qmgr queue range\n"); for_each_child_of_node()
1600 * and stated flag and when initialize the acc range, check knav_queue_start_pdsps()
1601 * it and init the range only if pdsp is started. knav_queue_start_pdsps()
1632 struct knav_range_info *range, knav_queue_init_queue()
1643 inst->range = range; knav_queue_init_queue()
1649 if (range->ops && range->ops->init_queue) knav_queue_init_queue()
1650 return range->ops->init_queue(range, inst); knav_queue_init_queue()
1657 struct knav_range_info *range; knav_queue_init_queues() local
1673 for_each_queue_range(kdev, range) { for_each_queue_range()
1674 if (range->ops && range->ops->init_range) for_each_queue_range()
1675 range->ops->init_range(range); for_each_queue_range()
1677 for (id = range->queue_base; for_each_queue_range()
1678 id < range->queue_base + range->num_queues; id++, idx++) { for_each_queue_range()
1679 ret = knav_queue_init_queue(kdev, range, for_each_queue_range()
1684 range->queue_base_inst = for_each_queue_range()
1724 if (of_property_read_u32_array(node, "queue-range", temp, 2)) { knav_queue_probe()
1725 dev_err(dev, "queue-range not specified\n"); knav_queue_probe()
1757 /* get usable queue range values from device tree */ knav_queue_probe()
1300 knav_free_queue_range(struct knav_device *kdev, struct knav_range_info *range) knav_free_queue_range() argument
1631 knav_queue_init_queue(struct knav_device *kdev, struct knav_range_info *range, struct knav_queue_inst *inst, unsigned id) knav_queue_init_queue() argument
H A Dknav_qmss.h246 * @range: range info
261 struct knav_range_info *range; member in struct:knav_queue_inst
311 int (*init_range)(struct knav_range_info *range);
312 int (*free_range)(struct knav_range_info *range);
313 int (*init_queue)(struct knav_range_info *range,
315 int (*open_queue)(struct knav_range_info *range,
317 int (*close_queue)(struct knav_range_info *range,
319 int (*set_notify)(struct knav_range_info *range,
355 #define for_each_queue_range(kdev, range) \
356 list_for_each_entry(range, &kdev->queue_ranges, list)
384 struct knav_range_info *range);
/linux-4.4.14/include/uapi/linux/netfilter/ipset/
H A Dip_set_bitmap.h6 /* The element is out of the range of the set */
8 /* The range exceeds the size limit of the set type */
H A Dip_set_hash.h16 /* Invalid range */
/linux-4.4.14/net/netfilter/
H A Dnf_nat_proto_common.c39 const struct nf_nat_range *range, nf_nat_l4proto_unique_tuple()
53 /* If no range specified... */ nf_nat_l4proto_unique_tuple()
54 if (!(range->flags & NF_NAT_RANGE_PROTO_SPECIFIED)) { nf_nat_l4proto_unique_tuple()
73 min = ntohs(range->min_proto.all); nf_nat_l4proto_unique_tuple()
74 range_size = ntohs(range->max_proto.all) - min + 1; nf_nat_l4proto_unique_tuple()
77 if (range->flags & NF_NAT_RANGE_PROTO_RANDOM) { nf_nat_l4proto_unique_tuple()
81 } else if (range->flags & NF_NAT_RANGE_PROTO_RANDOM_FULLY) { nf_nat_l4proto_unique_tuple()
91 if (!(range->flags & NF_NAT_RANGE_PROTO_RANDOM_ALL)) nf_nat_l4proto_unique_tuple()
100 struct nf_nat_range *range) nf_nat_l4proto_nlattr_to_range()
103 range->min_proto.all = nla_get_be16(tb[CTA_PROTONAT_PORT_MIN]); nf_nat_l4proto_nlattr_to_range()
104 range->max_proto.all = range->min_proto.all; nf_nat_l4proto_nlattr_to_range()
105 range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; nf_nat_l4proto_nlattr_to_range()
108 range->max_proto.all = nla_get_be16(tb[CTA_PROTONAT_PORT_MAX]); nf_nat_l4proto_nlattr_to_range()
109 range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; nf_nat_l4proto_nlattr_to_range()
37 nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto, struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range, enum nf_nat_manip_type maniptype, const struct nf_conn *ct, u16 *rover) nf_nat_l4proto_unique_tuple() argument
99 nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[], struct nf_nat_range *range) nf_nat_l4proto_nlattr_to_range() argument
H A Dxt_NETMAP.c24 const struct nf_nat_range *range = par->targinfo; netmap_tg6() local
32 for (i = 0; i < ARRAY_SIZE(range->min_addr.ip6); i++) netmap_tg6()
33 netmask.ip6[i] = ~(range->min_addr.ip6[i] ^ netmap_tg6()
34 range->max_addr.ip6[i]); netmap_tg6()
44 new_addr.ip6[i] |= range->min_addr.ip6[i] & netmap_tg6()
48 newrange.flags = range->flags | NF_NAT_RANGE_MAP_IPS; netmap_tg6()
51 newrange.min_proto = range->min_proto; netmap_tg6()
52 newrange.max_proto = range->max_proto; netmap_tg6()
59 const struct nf_nat_range *range = par->targinfo; netmap_tg6_checkentry() local
61 if (!(range->flags & NF_NAT_RANGE_MAP_IPS)) netmap_tg6_checkentry()
81 netmask = ~(mr->range[0].min_ip ^ mr->range[0].max_ip); netmap_tg4()
88 new_ip |= mr->range[0].min_ip & netmask; netmap_tg4()
92 newrange.flags = mr->range[0].flags | NF_NAT_RANGE_MAP_IPS; netmap_tg4()
95 newrange.min_proto = mr->range[0].min; netmap_tg4()
96 newrange.max_proto = mr->range[0].max; netmap_tg4()
98 /* Hand modified range to generic setup. */ netmap_tg4()
106 if (!(mr->range[0].flags & NF_NAT_RANGE_MAP_IPS)) { netmap_tg4_check()
H A Dxt_nat.c46 struct nf_nat_range range; xt_snat_target_v0() local
55 xt_nat_convert_range(&range, &mr->range[0]); xt_snat_target_v0()
56 return nf_nat_setup_info(ct, &range, NF_NAT_MANIP_SRC); xt_snat_target_v0()
63 struct nf_nat_range range; xt_dnat_target_v0() local
71 xt_nat_convert_range(&range, &mr->range[0]); xt_dnat_target_v0()
72 return nf_nat_setup_info(ct, &range, NF_NAT_MANIP_DST); xt_dnat_target_v0()
78 const struct nf_nat_range *range = par->targinfo; xt_snat_target_v1() local
87 return nf_nat_setup_info(ct, range, NF_NAT_MANIP_SRC); xt_snat_target_v1()
93 const struct nf_nat_range *range = par->targinfo; xt_dnat_target_v1() local
101 return nf_nat_setup_info(ct, range, NF_NAT_MANIP_DST); xt_dnat_target_v1()
H A Dnf_nat_core.c151 * that meet the constraints of range.
156 const struct nf_nat_range *range) in_range()
159 * range specified, otherwise let this drag us onto a new src IP. in_range()
161 if (range->flags & NF_NAT_RANGE_MAP_IPS && in_range()
162 !l3proto->in_range(tuple, range)) in_range()
165 if (!(range->flags & NF_NAT_RANGE_PROTO_SPECIFIED) || in_range()
167 &range->min_proto, &range->max_proto)) in_range()
193 const struct nf_nat_range *range) find_appropriate_src()
208 if (in_range(l3proto, l4proto, result, range)) find_appropriate_src()
217 * if the range specifies 1.2.3.4 ports 10000-10005 and 1.2.3.5 ports
224 const struct nf_nat_range *range, find_best_ips_proto()
235 if (!(range->flags & NF_NAT_RANGE_MAP_IPS)) find_best_ips_proto()
244 if (nf_inet_addr_cmp(&range->min_addr, &range->max_addr)) { find_best_ips_proto()
245 *var_ipp = range->min_addr; find_best_ips_proto()
262 range->flags & NF_NAT_RANGE_PERSISTENT ? find_best_ips_proto()
268 * distance. Otherwise use the full range. find_best_ips_proto()
271 minip = ntohl((__force __be32)range->min_addr.all[i]); find_best_ips_proto()
272 maxip = ntohl((__force __be32)range->max_addr.all[i]); find_best_ips_proto()
281 if (var_ipp->all[i] != range->max_addr.all[i]) find_best_ips_proto()
284 if (!(range->flags & NF_NAT_RANGE_PERSISTENT)) find_best_ips_proto()
289 /* Manipulate the tuple into the range given. For NF_INET_POST_ROUTING,
290 * we change the source to map into the range. For NF_INET_PRE_ROUTING
292 * range. It might not be possible to get a unique tuple, but we try.
298 const struct nf_nat_range *range, get_unique_tuple()
316 * range, use that. get_unique_tuple()
323 !(range->flags & NF_NAT_RANGE_PROTO_RANDOM_ALL)) { get_unique_tuple()
325 if (in_range(l3proto, l4proto, orig_tuple, range)) { get_unique_tuple()
331 orig_tuple, tuple, range)) { get_unique_tuple()
338 /* 2) Select the least-used IP/proto combination in the given range */ get_unique_tuple()
340 find_best_ips_proto(zone, tuple, range, ct, maniptype); get_unique_tuple()
343 * the range to make a unique tuple. get_unique_tuple()
346 /* Only bother mapping if it's not already in range and unique */ get_unique_tuple()
347 if (!(range->flags & NF_NAT_RANGE_PROTO_RANDOM_ALL)) { get_unique_tuple()
348 if (range->flags & NF_NAT_RANGE_PROTO_SPECIFIED) { get_unique_tuple()
350 &range->min_proto, get_unique_tuple()
351 &range->max_proto) && get_unique_tuple()
352 (range->min_proto.all == range->max_proto.all || get_unique_tuple()
361 l4proto->unique_tuple(l3proto, tuple, range, maniptype, ct); get_unique_tuple()
381 const struct nf_nat_range *range, nf_nat_setup_info()
405 get_unique_tuple(&new_tuple, &curr_tuple, range, ct, maniptype); nf_nat_setup_info()
451 /* Force range to this IP; let proto decide mapping for __nf_nat_alloc_null_binding()
459 struct nf_nat_range range = { __nf_nat_alloc_null_binding() local
464 return nf_nat_setup_info(ct, &range, manip); __nf_nat_alloc_null_binding()
730 struct nf_nat_range *range) nfnetlink_parse_nat_proto()
742 err = l4proto->nlattr_to_range(tb, range); nfnetlink_parse_nat_proto()
757 const struct nf_conn *ct, struct nf_nat_range *range, nfnetlink_parse_nat()
763 memset(range, 0, sizeof(*range)); nfnetlink_parse_nat()
769 err = l3proto->nlattr_to_range(tb, range); nfnetlink_parse_nat()
776 return nfnetlink_parse_nat_proto(tb[CTA_NAT_PROTO], ct, range); nfnetlink_parse_nat()
785 struct nf_nat_range range; nfnetlink_parse_nat_setup() local
806 err = nfnetlink_parse_nat(attr, ct, &range, l3proto); nfnetlink_parse_nat_setup()
810 return nf_nat_setup_info(ct, &range, manip); nfnetlink_parse_nat_setup()
153 in_range(const struct nf_nat_l3proto *l3proto, const struct nf_nat_l4proto *l4proto, const struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range) in_range() argument
187 find_appropriate_src(struct net *net, const struct nf_conntrack_zone *zone, const struct nf_nat_l3proto *l3proto, const struct nf_nat_l4proto *l4proto, const struct nf_conntrack_tuple *tuple, struct nf_conntrack_tuple *result, const struct nf_nat_range *range) find_appropriate_src() argument
222 find_best_ips_proto(const struct nf_conntrack_zone *zone, struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range, const struct nf_conn *ct, enum nf_nat_manip_type maniptype) find_best_ips_proto() argument
296 get_unique_tuple(struct nf_conntrack_tuple *tuple, const struct nf_conntrack_tuple *orig_tuple, const struct nf_nat_range *range, struct nf_conn *ct, enum nf_nat_manip_type maniptype) get_unique_tuple() argument
380 nf_nat_setup_info(struct nf_conn *ct, const struct nf_nat_range *range, enum nf_nat_manip_type maniptype) nf_nat_setup_info() argument
728 nfnetlink_parse_nat_proto(struct nlattr *attr, const struct nf_conn *ct, struct nf_nat_range *range) nfnetlink_parse_nat_proto() argument
756 nfnetlink_parse_nat(const struct nlattr *nat, const struct nf_conn *ct, struct nf_nat_range *range, const struct nf_nat_l3proto *l3proto) nfnetlink_parse_nat() argument
H A Dnf_nat_redirect.c68 /* Transfer from original range. */ nf_nat_redirect_ipv4()
71 newrange.flags = mr->range[0].flags | NF_NAT_RANGE_MAP_IPS; nf_nat_redirect_ipv4()
74 newrange.min_proto = mr->range[0].min; nf_nat_redirect_ipv4()
75 newrange.max_proto = mr->range[0].max; nf_nat_redirect_ipv4()
77 /* Hand modified range to generic setup. */ nf_nat_redirect_ipv4()
85 nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range *range, nf_nat_redirect_ipv6() argument
116 newrange.flags = range->flags | NF_NAT_RANGE_MAP_IPS; nf_nat_redirect_ipv6()
119 newrange.min_proto = range->min_proto; nf_nat_redirect_ipv6()
120 newrange.max_proto = range->max_proto; nf_nat_redirect_ipv6()
H A Dnft_nat.c46 struct nf_nat_range range; nft_nat_eval() local
48 memset(&range, 0, sizeof(range)); nft_nat_eval()
51 range.min_addr.ip = (__force __be32) nft_nat_eval()
53 range.max_addr.ip = (__force __be32) nft_nat_eval()
57 memcpy(range.min_addr.ip6, nft_nat_eval()
59 sizeof(range.min_addr.ip6)); nft_nat_eval()
60 memcpy(range.max_addr.ip6, nft_nat_eval()
62 sizeof(range.max_addr.ip6)); nft_nat_eval()
64 range.flags |= NF_NAT_RANGE_MAP_IPS; nft_nat_eval()
68 range.min_proto.all = nft_nat_eval()
70 range.max_proto.all = nft_nat_eval()
72 range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED; nft_nat_eval()
75 range.flags |= priv->flags; nft_nat_eval()
77 regs->verdict.code = nf_nat_setup_info(ct, &range, priv->type); nft_nat_eval()
H A Dxt_iprange.c31 pr_debug("src IP %pI4 NOT in range %s%pI4-%pI4\n", iprange_mt4()
44 pr_debug("dst IP %pI4 NOT in range %s%pI4-%pI4\n", iprange_mt4()
80 pr_debug("src IP %pI6 NOT in range %s%pI6-%pI6\n", iprange_mt6()
93 pr_debug("dst IP %pI6 NOT in range %s%pI6-%pI6\n", iprange_mt6()
138 MODULE_DESCRIPTION("Xtables: arbitrary IPv4 range matching");
H A Dnf_nat_helper.c194 struct nf_nat_range range; nf_nat_follow_master() local
200 range.flags = NF_NAT_RANGE_MAP_IPS; nf_nat_follow_master()
201 range.min_addr = range.max_addr nf_nat_follow_master()
203 nf_nat_setup_info(ct, &range, NF_NAT_MANIP_SRC); nf_nat_follow_master()
206 range.flags = (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED); nf_nat_follow_master()
207 range.min_proto = range.max_proto = exp->saved_proto; nf_nat_follow_master()
208 range.min_addr = range.max_addr nf_nat_follow_master()
210 nf_nat_setup_info(ct, &range, NF_NAT_MANIP_DST); nf_nat_follow_master()
H A Dxt_REDIRECT.c39 const struct nf_nat_range *range = par->targinfo; redirect_tg6_checkentry() local
41 if (range->flags & NF_NAT_RANGE_MAP_IPS) redirect_tg6_checkentry()
51 if (mr->range[0].flags & NF_NAT_RANGE_MAP_IPS) { redirect_tg4_check()
H A Dnf_nat_proto_sctp.c22 const struct nf_nat_range *range, sctp_unique_tuple()
26 nf_nat_l4proto_unique_tuple(l3proto, tuple, range, maniptype, ct, sctp_unique_tuple()
20 sctp_unique_tuple(const struct nf_nat_l3proto *l3proto, struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range, enum nf_nat_manip_type maniptype, const struct nf_conn *ct) sctp_unique_tuple() argument
H A Dnf_nat_proto_udp.c25 const struct nf_nat_range *range, udp_unique_tuple()
29 nf_nat_l4proto_unique_tuple(l3proto, tuple, range, maniptype, ct, udp_unique_tuple()
23 udp_unique_tuple(const struct nf_nat_l3proto *l3proto, struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range, enum nf_nat_manip_type maniptype, const struct nf_conn *ct) udp_unique_tuple() argument
/linux-4.4.14/drivers/hid/
H A Dhid-roccat-kovaplus.h25 /* write; value = profile number range 0-4 */
27 /* write; value = profile number range 0-4 */
40 uint8_t profile_index; /* range 0-4 */
42 uint8_t sensitivity_x; /* range 1-10 */
43 uint8_t sensitivity_y; /* range 1-10 */
45 uint8_t cpi_startup_level; /* range 1-4 */
52 uint8_t profile_index; /* range 0-4 */
88 /* data1 = profile_number range 1-5; no release event */
90 /* data1 = profile_number range 1-5; no release event */
92 /* data1 = button_number range 1-18; data2 = action */
94 /* data1 = button_number range 1-18; data2 = action */
96 /* data1 = button_number range 1-18; data2 = action */
98 /* data1 = button_number range 1-18; data2 = action */
102 /* data1 + data2 = sense range 1-10; no release event */
H A Dhid-roccat-savu.h29 /* data1 = new profile range 1-5 */
32 /* data1 = button number range 1-24; data2 = action */
35 /* data1 = button number range 1-24; data2 = action */
38 /* data1 = setting number range 1-5 */
41 /* data1 and data2 = range 0x1-0xb */
H A Dhid-roccat-kone.h37 uint8_t number; /* range 1-8 */
92 uint8_t red; /* range 0x00-0xff */
93 uint8_t green; /* range 0x00-0xff */
94 uint8_t blue; /* range 0x00-0xff */
102 * range 1-5
106 uint8_t profile; /* range 1-5 */
108 uint16_t main_sensitivity; /* range 100-1000 */
110 uint16_t x_sensitivity; /* range 100-1000 */
111 uint16_t y_sensitivity; /* range 100-1000 */
113 uint8_t startup_dpi; /* range 1-6 */
120 uint8_t light_effect_1; /* range 1-3 */
121 uint8_t light_effect_2; /* range 1-5 */
122 uint8_t light_effect_3; /* range 1-4 */
123 uint8_t light_effect_speed; /* range 0-255 */
H A Dhid-roccat-koneplus.h82 /* data1 = new profile range 1-5 */
85 /* data1 = button number range 1-24; data2 = action */
88 /* data1 = button number range 1-24; data2 = action */
91 /* data1 = setting number range 1-5 */
94 /* data1 and data2 = range 0x1-0xb */
H A Dhid-lg4ff.c75 static void lg4ff_set_range_dfp(struct hid_device *hid, u16 range);
76 static void lg4ff_set_range_g25(struct hid_device *hid, u16 range);
80 u16 range; member in struct:lg4ff_wheel_data
92 void (*set_range)(struct hid_device *hid, u16 range);
112 void (*set_range)(struct hid_device *hid, u16 range);
283 /* Recalculates X axis value accordingly to currently selected range */ lg4ff_adjust_dfp_x_axis()
284 static s32 lg4ff_adjust_dfp_x_axis(s32 value, u16 range) lg4ff_adjust_dfp_x_axis() argument
289 if (range == 900) lg4ff_adjust_dfp_x_axis()
291 else if (range == 200) lg4ff_adjust_dfp_x_axis()
293 else if (range < 200) lg4ff_adjust_dfp_x_axis()
298 new_value = 8192 + mult_frac(value - 8192, max_range, range); lg4ff_adjust_dfp_x_axis()
322 new_value = lg4ff_adjust_dfp_x_axis(value, entry->wdata.range); lg4ff_adjust_input_event()
540 /* Sends command to set range compatible with G25/G27/Driving Force GT */ lg4ff_set_range_g25()
541 static void lg4ff_set_range_g25(struct hid_device *hid, u16 range) lg4ff_set_range_g25() argument
560 dbg_hid("G25/G27/DFGT: setting range to %u\n", range); lg4ff_set_range_g25()
565 value[2] = range & 0x00ff; lg4ff_set_range_g25()
566 value[3] = (range & 0xff00) >> 8; lg4ff_set_range_g25()
575 /* Sends commands to set range compatible with Driving Force Pro wheel */ lg4ff_set_range_dfp()
576 static void lg4ff_set_range_dfp(struct hid_device *hid, u16 range) lg4ff_set_range_dfp() argument
596 dbg_hid("Driving Force Pro: setting range to %u\n", range); lg4ff_set_range_dfp()
608 if (range > 200) { lg4ff_set_range_dfp()
626 if (range == 200 || range == 900) { /* Do not apply any fine limit */ lg4ff_set_range_dfp()
633 start_left = (((full_range - range + 1) * 2047) / full_range); lg4ff_set_range_dfp()
890 /* Export the currently set range of the wheel */ lg4ff_range_show()
911 count = scnprintf(buf, PAGE_SIZE, "%u\n", entry->wdata.range); lg4ff_range_show()
915 /* Set range to user specified value, call appropriate function
923 u16 range = simple_strtoul(buf, NULL, 10); lg4ff_range_store() local
937 if (range == 0) lg4ff_range_store()
938 range = entry->wdata.max_range; lg4ff_range_store()
940 /* Check if the wheel supports range setting lg4ff_range_store()
941 * and that the range is within limits for the wheel */ lg4ff_range_store()
942 if (entry->wdata.set_range && range >= entry->wdata.min_range && range <= entry->wdata.max_range) { lg4ff_range_store()
943 entry->wdata.set_range(hid, range); lg4ff_range_store()
944 entry->wdata.range = range; lg4ff_range_store()
949 static DEVICE_ATTR(range, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, lg4ff_range_show, lg4ff_range_store);
1266 hid_warn(hid, "Unable to create sysfs interface for \"range\", errno %d\n", error); lg4ff_init()
1277 /* Set the maximum range to start with */ lg4ff_init()
1278 entry->wdata.range = entry->wdata.max_range; lg4ff_init()
1280 entry->wdata.set_range(hid, entry->wdata.range); lg4ff_init()
/linux-4.4.14/net/ipv4/netfilter/
H A Dipt_MASQUERADE.c1 /* Masquerade. Simple mapping which alters range to a local IP address
36 if (mr->range[0].flags & NF_NAT_RANGE_MAP_IPS) { masquerade_tg_check()
50 struct nf_nat_range range; masquerade_tg() local
54 range.flags = mr->range[0].flags; masquerade_tg()
55 range.min_proto = mr->range[0].min; masquerade_tg()
56 range.max_proto = mr->range[0].max; masquerade_tg()
58 return nf_nat_masquerade_ipv4(skb, par->hooknum, &range, par->out); masquerade_tg()
H A Dnft_masq_ipv4.c24 struct nf_nat_range range; nft_masq_ipv4_eval() local
26 memset(&range, 0, sizeof(range)); nft_masq_ipv4_eval()
27 range.flags = priv->flags; nft_masq_ipv4_eval()
30 &range, pkt->out); nft_masq_ipv4_eval()
H A Dnf_nat_proto_icmp.c33 const struct nf_nat_range *range, icmp_unique_tuple()
41 range_size = ntohs(range->max_proto.icmp.id) - icmp_unique_tuple()
42 ntohs(range->min_proto.icmp.id) + 1; icmp_unique_tuple()
43 /* If no range specified... */ icmp_unique_tuple()
44 if (!(range->flags & NF_NAT_RANGE_PROTO_SPECIFIED)) icmp_unique_tuple()
48 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + icmp_unique_tuple()
31 icmp_unique_tuple(const struct nf_nat_l3proto *l3proto, struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range, enum nf_nat_manip_type maniptype, const struct nf_conn *ct) icmp_unique_tuple() argument
H A Dnft_redir_ipv4.c29 mr.range[0].min.all = nft_redir_ipv4_eval()
31 mr.range[0].max.all = nft_redir_ipv4_eval()
33 mr.range[0].flags |= NF_NAT_RANGE_PROTO_SPECIFIED; nft_redir_ipv4_eval()
36 mr.range[0].flags |= priv->flags; nft_redir_ipv4_eval()
H A Dnf_nat_pptp.c51 struct nf_nat_range range; pptp_nat_expected() local
92 range.flags = NF_NAT_RANGE_MAP_IPS; pptp_nat_expected()
93 range.min_addr = range.max_addr pptp_nat_expected()
96 range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED; pptp_nat_expected()
97 range.min_proto = range.max_proto = exp->saved_proto; pptp_nat_expected()
99 nf_nat_setup_info(ct, &range, NF_NAT_MANIP_SRC); pptp_nat_expected()
102 range.flags = NF_NAT_RANGE_MAP_IPS; pptp_nat_expected()
103 range.min_addr = range.max_addr pptp_nat_expected()
106 range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED; pptp_nat_expected()
107 range.min_proto = range.max_proto = exp->saved_proto; pptp_nat_expected()
109 nf_nat_setup_info(ct, &range, NF_NAT_MANIP_DST); pptp_nat_expected()
H A Dnf_nat_masquerade_ipv4.c27 const struct nf_nat_range *range, nf_nat_masquerade_ipv4()
61 /* Transfer from original range. */ nf_nat_masquerade_ipv4()
64 newrange.flags = range->flags | NF_NAT_RANGE_MAP_IPS; nf_nat_masquerade_ipv4()
67 newrange.min_proto = range->min_proto; nf_nat_masquerade_ipv4()
68 newrange.max_proto = range->max_proto; nf_nat_masquerade_ipv4()
70 /* Hand modified range to generic setup. */ nf_nat_masquerade_ipv4()
26 nf_nat_masquerade_ipv4(struct sk_buff *skb, unsigned int hooknum, const struct nf_nat_range *range, const struct net_device *out) nf_nat_masquerade_ipv4() argument
H A Dnf_nat_h323.c398 struct nf_nat_range range; ip_nat_q931_expect() local
409 range.flags = NF_NAT_RANGE_MAP_IPS; ip_nat_q931_expect()
410 range.min_addr = range.max_addr = ip_nat_q931_expect()
412 nf_nat_setup_info(new, &range, NF_NAT_MANIP_SRC); ip_nat_q931_expect()
415 range.flags = (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED); ip_nat_q931_expect()
416 range.min_proto = range.max_proto = this->saved_proto; ip_nat_q931_expect()
417 range.min_addr = range.max_addr = ip_nat_q931_expect()
419 nf_nat_setup_info(new, &range, NF_NAT_MANIP_DST); ip_nat_q931_expect()
497 struct nf_nat_range range; ip_nat_callforwarding_expect() local
503 range.flags = NF_NAT_RANGE_MAP_IPS; ip_nat_callforwarding_expect()
504 range.min_addr = range.max_addr = ip_nat_callforwarding_expect()
506 nf_nat_setup_info(new, &range, NF_NAT_MANIP_SRC); ip_nat_callforwarding_expect()
509 range.flags = (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED); ip_nat_callforwarding_expect()
510 range.min_proto = range.max_proto = this->saved_proto; ip_nat_callforwarding_expect()
511 range.min_addr = range.max_addr = this->saved_addr; ip_nat_callforwarding_expect()
512 nf_nat_setup_info(new, &range, NF_NAT_MANIP_DST); ip_nat_callforwarding_expect()
/linux-4.4.14/arch/sparc/mm/
H A Dextable.c13 /* Caller knows they are in a range if ret->fixup == 0 */
41 /* A range entry, skip both parts. */ search_extable()
54 /* 2. Try to find a range match. */ search_extable()
73 bool range; trim_init_extable() local
75 for (i = 0; i < m->num_exentries; i += range ? 2 : 1) { trim_init_extable()
76 range = m->extable[i].fixup == 0; trim_init_extable()
80 if (range) trim_init_extable()
83 if (range) trim_init_extable()
98 /* Inside range? Fix g2 and return correct fixup */ search_extables_range()
/linux-4.4.14/include/net/netfilter/ipv6/
H A Dnf_nat_masquerade.h5 nf_nat_masquerade_ipv6(struct sk_buff *skb, const struct nf_nat_range *range,
/linux-4.4.14/drivers/base/
H A Dmap.c23 unsigned long range; member in struct:kobj_map::probe
32 int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range, kobj_map() argument
36 unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; kobj_map()
53 p->range = range; kobj_map()
59 while (*s && (*s)->range < range) kobj_map()
68 void kobj_unmap(struct kobj_map *domain, dev_t dev, unsigned long range) kobj_unmap() argument
70 unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; kobj_unmap()
83 if (p->dev == dev && p->range == range) { kobj_unmap()
108 if (p->dev > dev || p->dev + p->range - 1 < dev) kobj_lookup()
110 if (p->range - 1 >= best) kobj_lookup()
117 best = p->range - 1; kobj_lookup()
148 base->range = ~0; kobj_map_init()
/linux-4.4.14/net/ipv6/netfilter/
H A Dnft_redir_ipv6.c25 struct nf_nat_range range; nft_redir_ipv6_eval() local
27 memset(&range, 0, sizeof(range)); nft_redir_ipv6_eval()
29 range.min_proto.all = nft_redir_ipv6_eval()
31 range.max_proto.all = nft_redir_ipv6_eval()
33 range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED; nft_redir_ipv6_eval()
36 range.flags |= priv->flags; nft_redir_ipv6_eval()
38 regs->verdict.code = nf_nat_redirect_ipv6(pkt->skb, &range, pkt->hook); nft_redir_ipv6_eval()
H A Dnft_masq_ipv6.c25 struct nf_nat_range range; nft_masq_ipv6_eval() local
27 memset(&range, 0, sizeof(range)); nft_masq_ipv6_eval()
28 range.flags = priv->flags; nft_masq_ipv6_eval()
30 regs->verdict.code = nf_nat_masquerade_ipv6(pkt->skb, &range, pkt->out); nft_masq_ipv6_eval()
H A Dnf_nat_proto_icmpv6.c35 const struct nf_nat_range *range, icmpv6_unique_tuple()
43 range_size = ntohs(range->max_proto.icmp.id) - icmpv6_unique_tuple()
44 ntohs(range->min_proto.icmp.id) + 1; icmpv6_unique_tuple()
46 if (!(range->flags & NF_NAT_RANGE_PROTO_SPECIFIED)) icmpv6_unique_tuple()
50 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + icmpv6_unique_tuple()
33 icmpv6_unique_tuple(const struct nf_nat_l3proto *l3proto, struct nf_conntrack_tuple *tuple, const struct nf_nat_range *range, enum nf_nat_manip_type maniptype, const struct nf_conn *ct) icmpv6_unique_tuple() argument
H A Dnf_nat_masquerade_ipv6.c25 nf_nat_masquerade_ipv6(struct sk_buff *skb, const struct nf_nat_range *range, nf_nat_masquerade_ipv6() argument
43 newrange.flags = range->flags | NF_NAT_RANGE_MAP_IPS; nf_nat_masquerade_ipv6()
46 newrange.min_proto = range->min_proto; nf_nat_masquerade_ipv6()
47 newrange.max_proto = range->max_proto; nf_nat_masquerade_ipv6()
H A Dip6t_MASQUERADE.c32 const struct nf_nat_range *range = par->targinfo; masquerade_tg6_checkentry() local
34 if (range->flags & NF_NAT_RANGE_MAP_IPS) masquerade_tg6_checkentry()
/linux-4.4.14/drivers/staging/android/
H A Dashmem.c63 * struct ashmem_range - A range of unpinned/evictable pages
103 #define range_size(range) \
104 ((range)->pgend - (range)->pgstart + 1)
106 #define range_on_lru(range) \
107 ((range)->purged == ASHMEM_NOT_PURGED)
109 #define page_range_subsumes_range(range, start, end) \
110 (((range)->pgstart >= (start)) && ((range)->pgend <= (end)))
112 #define page_range_subsumed_by_range(range, start, end) \
113 (((range)->pgstart <= (start)) && ((range)->pgend >= (end)))
115 #define page_in_range(range, page) \
116 (((range)->pgstart <= (page)) && ((range)->pgend >= (page)))
118 #define page_range_in_range(range, start, end) \
119 (page_in_range(range, start) || page_in_range(range, end) || \
120 page_range_subsumes_range(range, start, end))
122 #define range_before_page(range, page) \
123 ((range)->pgend < (page))
128 * lru_add() - Adds a range of memory to the LRU list
129 * @range: The memory range being added.
131 * The range is first added to the end (tail) of the LRU list.
132 * After this, the size of the range is added to @lru_count
134 static inline void lru_add(struct ashmem_range *range) lru_add() argument
136 list_add_tail(&range->lru, &ashmem_lru_list); lru_add()
137 lru_count += range_size(range); lru_add()
141 * lru_del() - Removes a range of memory from the LRU list
142 * @range: The memory range being removed
144 * The range is first deleted from the LRU list.
145 * After this, the size of the range is removed from @lru_count
147 static inline void lru_del(struct ashmem_range *range) lru_del() argument
149 list_del(&range->lru); lru_del()
150 lru_count -= range_size(range); lru_del()
169 struct ashmem_range *range; range_alloc() local
171 range = kmem_cache_zalloc(ashmem_range_cachep, GFP_KERNEL); range_alloc()
172 if (unlikely(!range)) range_alloc()
175 range->asma = asma; range_alloc()
176 range->pgstart = start; range_alloc()
177 range->pgend = end; range_alloc()
178 range->purged = purged; range_alloc()
180 list_add_tail(&range->unpinned, &prev_range->unpinned); range_alloc()
182 if (range_on_lru(range)) range_alloc()
183 lru_add(range); range_alloc()
190 * @range: The associated ashmem_range that has previously been allocated
192 static void range_del(struct ashmem_range *range) range_del() argument
194 list_del(&range->unpinned); range_del()
195 if (range_on_lru(range)) range_del()
196 lru_del(range); range_del()
197 kmem_cache_free(ashmem_range_cachep, range); range_del()
202 * @range: The associated ashmem_range being shrunk
203 * @start: The starting byte of the new range
204 * @end: The ending byte of the new range
206 * This does not modify the data inside the existing range in any way - It
207 * simply shrinks the boundaries of the range.
210 * to range_resize, and expand the lru_count if the new range is larger.
212 static inline void range_shrink(struct ashmem_range *range, range_shrink() argument
215 size_t pre = range_size(range); range_shrink()
217 range->pgstart = start; range_shrink()
218 range->pgend = end; range_shrink()
220 if (range_on_lru(range)) range_shrink()
221 lru_count -= pre - range_size(range); range_shrink()
266 struct ashmem_range *range, *next; ashmem_release() local
269 list_for_each_entry_safe(range, next, &asma->unpinned_list, unpinned) ashmem_release()
270 range_del(range); ashmem_release()
437 struct ashmem_range *range, *next; ashmem_shrink_scan() local
445 list_for_each_entry_safe(range, next, &ashmem_lru_list, lru) { ashmem_shrink_scan()
446 loff_t start = range->pgstart * PAGE_SIZE; ashmem_shrink_scan()
447 loff_t end = (range->pgend + 1) * PAGE_SIZE; ashmem_shrink_scan()
449 vfs_fallocate(range->asma->file, ashmem_shrink_scan()
452 range->purged = ASHMEM_WAS_PURGED; ashmem_shrink_scan()
453 lru_del(range); ashmem_shrink_scan()
455 freed += range_size(range); ashmem_shrink_scan()
581 struct ashmem_range *range, *next; ashmem_pin() local
584 list_for_each_entry_safe(range, next, &asma->unpinned_list, unpinned) { ashmem_pin()
586 if (range_before_page(range, pgstart)) ashmem_pin()
594 * 1. The requested range subsumes an existing range, so we ashmem_pin()
595 * just remove the entire matching range. ashmem_pin()
596 * 2. The requested range overlaps the start of an existing ashmem_pin()
597 * range, so we just update that range. ashmem_pin()
598 * 3. The requested range overlaps the end of an existing ashmem_pin()
599 * range, so we just update that range. ashmem_pin()
600 * 4. The requested range punches a hole in an existing range, ashmem_pin()
601 * so we have to update one side of the range and then ashmem_pin()
602 * create a new range for the other side. ashmem_pin()
604 if (page_range_in_range(range, pgstart, pgend)) { ashmem_pin()
605 ret |= range->purged; ashmem_pin()
608 if (page_range_subsumes_range(range, pgstart, pgend)) { ashmem_pin()
609 range_del(range); ashmem_pin()
614 if (range->pgstart >= pgstart) { ashmem_pin()
615 range_shrink(range, pgend + 1, range->pgend); ashmem_pin()
620 if (range->pgend <= pgend) { ashmem_pin()
621 range_shrink(range, range->pgstart, ashmem_pin()
628 * more complicated, we allocate a new range for the ashmem_pin()
631 range_alloc(asma, range, range->purged, ashmem_pin()
632 pgend + 1, range->pgend); ashmem_pin()
633 range_shrink(range, range->pgstart, pgstart - 1); ashmem_pin()
642 * ashmem_unpin - unpin the given range of pages. Returns zero on success.
648 struct ashmem_range *range, *next; ashmem_unpin() local
652 list_for_each_entry_safe(range, next, &asma->unpinned_list, unpinned) { ashmem_unpin()
654 if (range_before_page(range, pgstart)) ashmem_unpin()
661 if (page_range_subsumed_by_range(range, pgstart, pgend)) ashmem_unpin()
663 if (page_range_in_range(range, pgstart, pgend)) { ashmem_unpin()
664 pgstart = min_t(size_t, range->pgstart, pgstart); ashmem_unpin()
665 pgend = max_t(size_t, range->pgend, pgend); ashmem_unpin()
666 purged |= range->purged; ashmem_unpin()
667 range_del(range); ashmem_unpin()
672 return range_alloc(asma, range, purged, pgstart, pgend); ashmem_unpin()
684 struct ashmem_range *range; ashmem_get_pin_status() local
687 list_for_each_entry(range, &asma->unpinned_list, unpinned) { ashmem_get_pin_status()
688 if (range_before_page(range, pgstart)) ashmem_get_pin_status()
690 if (page_range_in_range(range, pgstart, pgend)) { ashmem_get_pin_status()
/linux-4.4.14/include/uapi/linux/
H A Dfalloc.h5 #define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
9 * FALLOC_FL_COLLAPSE_RANGE is used to remove a range of a file
11 * the range being removed is appended to the start offset of the range
13 * resulting in a file layout that looks like the range that was
14 * removed never existed. As such collapsing a range of a file changes
15 * the size of the file, reducing it by the same length of the range
24 * Attempting to collapse a range that crosses the end of the file is
26 * to collapse a range that crosses EOF.
31 * FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably
33 * span holes in the file, and the entire range is preferable converted to
35 * extent or do whatever which will result in reading zeros from the range
36 * while the range remains allocated for the file.
H A Duserfaultfd.h31 * Valid ioctl command number range with this API is from 0x00 to
123 struct uffdio_range range; member in struct:uffdio_register
130 * range, keep at the end as the last 8 bytes aren't read.
143 * range according to the uffdio_register.ioctls.
156 struct uffdio_range range; member in struct:uffdio_zeropage
/linux-4.4.14/drivers/staging/lustre/lustre/fld/
H A Dfld_cache.c161 /* check merge possibility with next range */ list_for_each_entry_safe()
170 /* check if current range overlaps with next range. */ list_for_each_entry_safe()
186 * range too. better restart. */ list_for_each_entry_safe()
255 * punch hole in existing range. divide this range and add new
263 const struct lu_seq_range *range = &f_new->fce_range; fld_cache_punch_hole() local
264 const u64 new_start = range->lsr_start; fld_cache_punch_hole()
265 const u64 new_end = range->lsr_end; fld_cache_punch_hole()
278 /* f_new = *range */ fld_cache_punch_hole()
296 * handle range overlap in fld cache.
302 const struct lu_seq_range *range = &f_new->fce_range; fld_cache_overlap_handle() local
303 const u64 new_start = range->lsr_start; fld_cache_overlap_handle()
304 const u64 new_end = range->lsr_end; fld_cache_overlap_handle()
305 const u32 mdt = range->lsr_index; fld_cache_overlap_handle()
308 * prev range only. fixup will handle overlapping with next range. */ fld_cache_overlap_handle()
322 /* case 1: new range completely overshadowed existing range. fld_cache_overlap_handle()
323 * e.g. whole range migrated. update fld cache entry */ fld_cache_overlap_handle()
325 f_curr->fce_range = *range; fld_cache_overlap_handle()
331 /* case 2: new range fit within existing range. */ fld_cache_overlap_handle()
355 CERROR("NEW range ="DRANGE" curr = "DRANGE"\n", fld_cache_overlap_handle()
356 PRANGE(range), PRANGE(&f_curr->fce_range)); fld_cache_overlap_handle()
360 *fld_cache_entry_create(const struct lu_seq_range *range) fld_cache_entry_create() argument
364 LASSERT(range_is_sane(range)); fld_cache_entry_create()
370 f_new->fce_range = *range; fld_cache_entry_create()
410 /* check if this range is to left of new range. */ list_for_each_entry_safe()
421 CDEBUG(D_INFO, "insert range "DRANGE"\n", PRANGE(&f_new->fce_range));
429 const struct lu_seq_range *range) fld_cache_insert()
434 flde = fld_cache_entry_create(range); fld_cache_insert()
448 const struct lu_seq_range *range) fld_cache_delete_nolock()
457 if (range->lsr_start == flde->fce_range.lsr_start || list_for_each_entry_safe()
458 (range->lsr_end == flde->fce_range.lsr_end && list_for_each_entry_safe()
459 range->lsr_flags == flde->fce_range.lsr_flags)) { list_for_each_entry_safe()
471 const struct lu_seq_range *range) fld_cache_delete()
474 fld_cache_delete_nolock(cache, range); fld_cache_delete()
480 struct lu_seq_range *range) fld_cache_entry_lookup_nolock()
488 if (range->lsr_start == flde->fce_range.lsr_start || list_for_each_entry()
489 (range->lsr_end == flde->fce_range.lsr_end && list_for_each_entry()
490 range->lsr_flags == flde->fce_range.lsr_flags)) { list_for_each_entry()
500 * lookup \a seq sequence for range in fld cache.
503 *fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range) fld_cache_entry_lookup() argument
508 got = fld_cache_entry_lookup_nolock(cache, range); fld_cache_entry_lookup()
514 * lookup \a seq sequence for range in fld cache.
517 const u64 seq, struct lu_seq_range *range) fld_cache_lookup()
530 *range = prev->fce_range; list_for_each_entry()
536 *range = flde->fce_range; list_for_each_entry()
428 fld_cache_insert(struct fld_cache *cache, const struct lu_seq_range *range) fld_cache_insert() argument
447 fld_cache_delete_nolock(struct fld_cache *cache, const struct lu_seq_range *range) fld_cache_delete_nolock() argument
470 fld_cache_delete(struct fld_cache *cache, const struct lu_seq_range *range) fld_cache_delete() argument
479 fld_cache_entry_lookup_nolock(struct fld_cache *cache, struct lu_seq_range *range) fld_cache_entry_lookup_nolock() argument
516 fld_cache_lookup(struct fld_cache *cache, const u64 seq, struct lu_seq_range *range) fld_cache_lookup() argument
H A Dfld_internal.h76 * fld cache entries are sorted on range->lsr_start field. */
142 struct lu_seq_range *range, __u32 fld_op);
154 const struct lu_seq_range *range);
157 *fld_cache_entry_create(const struct lu_seq_range *range);
162 const struct lu_seq_range *range);
164 const struct lu_seq_range *range);
166 const u64 seq, struct lu_seq_range *range);
169 fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range);
176 struct lu_seq_range *range);
/linux-4.4.14/arch/x86/kernel/
H A Dmmconf-fam10h_64.c10 #include <linux/range.h>
36 const struct range *r1 = x1; cmp_range()
37 const struct range *r2 = x2; cmp_range()
65 struct range range[8]; get_fam10h_pci_mmconf_base() local
114 * need to check if the range is in the high mmio range that is get_fam10h_pci_mmconf_base()
133 range[hi_mmio_num].start = start; get_fam10h_pci_mmconf_base()
134 range[hi_mmio_num].end = end; get_fam10h_pci_mmconf_base()
141 /* sort the range */ get_fam10h_pci_mmconf_base()
142 sort(range, hi_mmio_num, sizeof(struct range), cmp_range, NULL); get_fam10h_pci_mmconf_base()
144 if (range[hi_mmio_num - 1].end < base) get_fam10h_pci_mmconf_base()
146 if (range[0].start > base + MMCONF_SIZE) get_fam10h_pci_mmconf_base()
150 base = (range[0].start & MMCONF_MASK) - MMCONF_UNIT; get_fam10h_pci_mmconf_base()
153 base = (range[hi_mmio_num - 1].end + MMCONF_UNIT) & MMCONF_MASK; get_fam10h_pci_mmconf_base()
158 base = (range[i - 1].end + MMCONF_UNIT) & MMCONF_MASK; get_fam10h_pci_mmconf_base()
159 val = range[i].start & MMCONF_MASK; get_fam10h_pci_mmconf_base()
/linux-4.4.14/arch/x86/pci/
H A Damd_bus.c5 #include <linux/range.h>
72 struct range range[RANGE_NUM]; early_root_info_init() local
118 /* Check if that register is enabled for bus range */ early_root_info_init()
147 memset(range, 0, sizeof(range)); early_root_info_init()
148 add_range(range, RANGE_NUM, 0, 0, 0xffff + 1); early_root_info_init()
172 subtract_range(range, RANGE_NUM, start, end + 1); early_root_info_init()
174 /* add left over io port range to def node/link, [0, 0xffff] */ early_root_info_init()
179 if (!range[i].end) early_root_info_init()
182 update_res(info, range[i].start, range[i].end - 1, early_root_info_init()
187 memset(range, 0, sizeof(range)); early_root_info_init()
191 add_range(range, RANGE_NUM, 0, 0, end); early_root_info_init()
199 subtract_range(range, RANGE_NUM, 0, end); early_root_info_init()
203 /* need to take out mmconf range */ early_root_info_init()
208 subtract_range(range, RANGE_NUM, fam10h_mmconf_start, early_root_info_init()
238 * some sick allocation would have range overlap with fam10h early_root_info_init()
239 * mmconf range, so need to update start and end. early_root_info_init()
261 subtract_range(range, RANGE_NUM, start, early_root_info_init()
279 subtract_range(range, RANGE_NUM, start, end + 1); early_root_info_init()
294 subtract_range(range, RANGE_NUM, 1ULL<<32, end); early_root_info_init()
298 * add left over mmio range to def node/link ? early_root_info_init()
299 * that is tricky, just record range in from start_min to 4G early_root_info_init()
304 if (!range[i].end) early_root_info_init()
307 update_res(info, cap_resource(range[i].start), early_root_info_init()
308 cap_resource(range[i].end - 1), early_root_info_init()
/linux-4.4.14/net/phonet/
H A Dsysctl.c43 static void set_local_port_range(int range[2]) set_local_port_range() argument
46 local_port_range[0] = range[0]; set_local_port_range()
47 local_port_range[1] = range[1]; set_local_port_range()
69 int range[2] = {local_port_range[0], local_port_range[1]}; proc_local_port_range() local
71 .data = &range, proc_local_port_range()
72 .maxlen = sizeof(range), proc_local_port_range()
81 if (range[1] < range[0]) proc_local_port_range()
84 set_local_port_range(range); proc_local_port_range()
/linux-4.4.14/drivers/staging/comedi/
H A DMakefile3 comedi-y := comedi_fops.o range.o drivers.o \
H A Dcomedidev.h80 * @range_table: If non-NULL, this points to a COMEDI range table for the
81 * subdevice. If NULL, the range table is channel-specific. (Initialized
82 * by the low-level driver, will be set to an "invalid" range table during
85 * @range_table_list: If the COMEDI range table is channel-specific, this
86 * points to an array of pointers to COMEDI range tables indexed by
137 * range 48 to 255. This is used to allow the COMEDI device to be opened
581 /* range stuff */
610 * struct comedi_lrange - Describes a COMEDI range table
611 * @length: Number of entries in the range table.
612 * @range: Array of &struct comedi_krange, one for each range.
614 * Each element of @range[] describes the minimum and maximum physical range
615 * range and the type of units. Typically, the type of unit is %UNIT_volt
622 struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; member in struct:comedi_lrange
626 * comedi_range_is_bipolar() - Test if subdevice range is bipolar
628 * @range: Index of range within a range table.
630 * Tests whether a range is bipolar by checking whether its minimum value
633 * Assumes @range is valid. Does not work for subdevices using a
634 * channel-specific range table list.
637 * %true if the range is bipolar.
638 * %false if the range is unipolar.
641 unsigned int range) comedi_range_is_bipolar()
643 return s->range_table->range[range].min < 0; comedi_range_is_bipolar()
647 * comedi_range_is_unipolar() - Test if subdevice range is unipolar
649 * @range: Index of range within a range table.
651 * Tests whether a range is unipolar by checking whether its minimum value
654 * Assumes @range is valid. Does not work for subdevices using a
655 * channel-specific range table list.
658 * %true if the range is unipolar.
659 * %false if the range is bipolar.
662 unsigned int range) comedi_range_is_unipolar()
664 return s->range_table->range[range].min >= 0; comedi_range_is_unipolar()
668 * comedi_range_is_external() - Test if subdevice range is external
670 * @range: Index of range within a range table.
672 * Tests whether a range is externally reference by checking whether its
675 * Assumes @range is valid. Does not work for subdevices using a
676 * channel-specific range table list.
679 * %true if the range is external.
680 * %false if the range is internal.
683 unsigned int range) comedi_range_is_external()
685 return !!(s->range_table->range[range].flags & RF_EXTERNAL); comedi_range_is_external()
689 * comedi_chan_range_is_bipolar() - Test if channel-specific range is bipolar
692 * @range: Index of range within a range table.
694 * Tests whether a range is bipolar by checking whether its minimum value
697 * Assumes @chan and @range are valid. Only works for subdevices with a
698 * channel-specific range table list.
701 * %true if the range is bipolar.
702 * %false if the range is unipolar.
706 unsigned int range) comedi_chan_range_is_bipolar()
708 return s->range_table_list[chan]->range[range].min < 0; comedi_chan_range_is_bipolar()
712 * comedi_chan_range_is_unipolar() - Test if channel-specific range is unipolar
715 * @range: Index of range within a range table.
717 * Tests whether a range is unipolar by checking whether its minimum value
720 * Assumes @chan and @range are valid. Only works for subdevices with a
721 * channel-specific range table list.
724 * %true if the range is unipolar.
725 * %false if the range is bipolar.
729 unsigned int range) comedi_chan_range_is_unipolar()
731 return s->range_table_list[chan]->range[range].min >= 0; comedi_chan_range_is_unipolar()
735 * comedi_chan_range_is_external() - Test if channel-specific range is external
738 * @range: Index of range within a range table.
740 * Tests whether a range is externally reference by checking whether its
743 * Assumes @chan and @range are valid. Only works for subdevices with a
744 * channel-specific range table list.
747 * %true if the range is bipolar.
748 * %false if the range is unipolar.
752 unsigned int range) comedi_chan_range_is_external()
754 return !!(s->range_table_list[chan]->range[range].flags & RF_EXTERNAL); comedi_chan_range_is_external()
640 comedi_range_is_bipolar(struct comedi_subdevice *s, unsigned int range) comedi_range_is_bipolar() argument
661 comedi_range_is_unipolar(struct comedi_subdevice *s, unsigned int range) comedi_range_is_unipolar() argument
682 comedi_range_is_external(struct comedi_subdevice *s, unsigned int range) comedi_range_is_external() argument
704 comedi_chan_range_is_bipolar(struct comedi_subdevice *s, unsigned int chan, unsigned int range) comedi_chan_range_is_bipolar() argument
727 comedi_chan_range_is_unipolar(struct comedi_subdevice *s, unsigned int chan, unsigned int range) comedi_chan_range_is_unipolar() argument
750 comedi_chan_range_is_external(struct comedi_subdevice *s, unsigned int chan, unsigned int range) comedi_chan_range_is_external() argument
H A Drange.c2 * comedi/range.c
46 * range information
93 if (copy_to_user(it.range_ptr, lr->range, do_rangeinfo_ioctl()
106 * Each element consists of a channel number, a range index, an analog
109 * This checks that the channel number and range index are supported by
136 "bad chanlist[%d]=0x%08x chan=%d range length=%d\n", comedi_check_chanlist()
/linux-4.4.14/drivers/of/
H A Dof_pci.c72 * of_pci_parse_bus_range() - parse the bus-range property of a PCI device
74 * @res: address to a struct resource to return the bus-range
83 values = of_get_property(node, "bus-range", &len); of_pci_parse_bus_range()
102 * Returns the associated domain number from DT in the range [0-0xffff], or
149 * @dev: device node of the host bridge having the range property
152 * @resources: list where the range of resources will be added after DT parsing
154 * address for the start of the I/O range. Can be NULL if the caller doesn't
163 * It returns zero if the range parsing has been successful or a standard error
173 struct of_pci_range range; of_pci_get_host_bridge_resources() local
192 pr_info(" No bus range found for %s, using %pR\n", of_pci_get_host_bridge_resources()
206 for_each_of_pci_range(&parser, &range) { of_pci_get_host_bridge_resources()
208 if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_IO) of_pci_get_host_bridge_resources()
210 else if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_MEM) of_pci_get_host_bridge_resources()
215 range.cpu_addr, range.cpu_addr + range.size - 1, of_pci_get_host_bridge_resources()
216 range.pci_addr); of_pci_get_host_bridge_resources()
220 * then skip this range of_pci_get_host_bridge_resources()
222 if (range.cpu_addr == OF_BAD_ADDR || range.size == 0) of_pci_get_host_bridge_resources()
231 err = of_pci_range_to_resource(&range, dev, res); of_pci_get_host_bridge_resources()
239 pr_err("I/O range found for %s. Please provide an io_base pointer to save CPU base address\n", of_pci_get_host_bridge_resources()
245 pr_warn("More than one I/O resource converted for %s. CPU base address for old range lost!\n", of_pci_get_host_bridge_resources()
247 *io_base = range.cpu_addr; of_pci_get_host_bridge_resources()
250 pci_add_resource_offset(resources, res, res->start - range.pci_addr); of_pci_get_host_bridge_resources()
H A Daddress.c42 u64 (*map)(__be32 *addr, const __be32 *range, of_dump_addr()
61 static u64 of_bus_default_map(__be32 *addr, const __be32 *range, of_bus_default_map() argument
66 cp = of_read_number(range, na); of_bus_default_map()
67 s = of_read_number(range + na + pna, ns); of_bus_default_map()
140 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, of_bus_pci_map() argument
147 rf = of_bus_pci_get_flags(range); of_bus_pci_map()
154 cp = of_read_number(range + 1, na - 1); of_bus_pci_map()
155 s = of_read_number(range + na + pna, ns); of_bus_pci_map()
242 parser->range = of_get_property(node, "ranges", &rlen); of_pci_range_parser_init()
243 if (parser->range == NULL) of_pci_range_parser_init()
246 parser->end = parser->range + rlen / sizeof(__be32); of_pci_range_parser_init()
253 struct of_pci_range *range) of_pci_range_parser_one()
257 if (!range) of_pci_range_parser_one()
260 if (!parser->range || parser->range + parser->np > parser->end) of_pci_range_parser_one()
263 range->pci_space = parser->range[0]; of_pci_range_parser_one()
264 range->flags = of_bus_pci_get_flags(parser->range); of_pci_range_parser_one()
265 range->pci_addr = of_read_number(parser->range + 1, ns); of_pci_range_parser_one()
266 range->cpu_addr = of_translate_address(parser->node, of_pci_range_parser_one()
267 parser->range + na); of_pci_range_parser_one()
268 range->size = of_read_number(parser->range + parser->pna + na, ns); of_pci_range_parser_one()
270 parser->range += parser->np; of_pci_range_parser_one()
273 while (parser->range + parser->np <= parser->end) { of_pci_range_parser_one()
277 pci_space = be32_to_cpup(parser->range); of_pci_range_parser_one()
278 flags = of_bus_pci_get_flags(parser->range); of_pci_range_parser_one()
279 pci_addr = of_read_number(parser->range + 1, ns); of_pci_range_parser_one()
281 parser->range + na); of_pci_range_parser_one()
282 size = of_read_number(parser->range + parser->pna + na, ns); of_pci_range_parser_one()
284 if (flags != range->flags) of_pci_range_parser_one()
286 if (pci_addr != range->pci_addr + range->size || of_pci_range_parser_one()
287 cpu_addr != range->cpu_addr + range->size) of_pci_range_parser_one()
290 range->size += size; of_pci_range_parser_one()
291 parser->range += parser->np; of_pci_range_parser_one()
294 return range; of_pci_range_parser_one()
300 * @range: the PCI range that describes the resource
301 * @np: device node where the range belongs to
303 * reflect the values contained in the range.
305 * Returns EINVAL if the range cannot be converted to resource.
307 * Note that if the range is an IO range, the resource will be converted
309 * if the range cannot be matched to any host bridge IO space (our case here).
310 * To guard against that we try to register the IO range first.
313 int of_pci_range_to_resource(struct of_pci_range *range, of_pci_range_to_resource() argument
317 res->flags = range->flags; of_pci_range_to_resource()
323 err = pci_register_io_range(range->cpu_addr, range->size); of_pci_range_to_resource()
326 port = pci_address_to_pio(range->cpu_addr); of_pci_range_to_resource()
334 upper_32_bits(range->cpu_addr)) { of_pci_range_to_resource()
339 res->start = range->cpu_addr; of_pci_range_to_resource()
341 res->end = res->start + range->size - 1; of_pci_range_to_resource()
369 static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, of_bus_isa_map() argument
375 if ((addr[0] ^ range[0]) & cpu_to_be32(1)) of_bus_isa_map()
379 cp = of_read_number(range + 1, na - 1); of_bus_isa_map()
380 s = of_read_number(range + na + pna, ns); of_bus_isa_map()
688 * Record the PCI IO range (expressed as CPU physical address + size).
696 struct io_range *range; pci_register_io_range() local
699 /* check if the range hasn't been previously recorded */ pci_register_io_range()
701 list_for_each_entry(range, &io_range_list, list) { pci_register_io_range()
702 if (addr >= range->start && addr + size <= range->start + size) { pci_register_io_range()
703 /* range already registered, bail out */ pci_register_io_range()
706 allocated_size += range->size; pci_register_io_range()
709 /* range not registed yet, check for available space */ pci_register_io_range()
718 pr_warn("Requested IO range too big, new size set to 64K\n"); pci_register_io_range()
721 /* add the range to the list */ pci_register_io_range()
722 range = kzalloc(sizeof(*range), GFP_ATOMIC); pci_register_io_range()
723 if (!range) { pci_register_io_range()
728 range->start = addr; pci_register_io_range()
729 range->size = size; pci_register_io_range()
731 list_add_tail(&range->list, &io_range_list); pci_register_io_range()
745 struct io_range *range; pci_pio_to_address() local
752 list_for_each_entry(range, &io_range_list, list) { pci_pio_to_address()
753 if (pio >= allocated_size && pio < allocated_size + range->size) { pci_pio_to_address()
754 address = range->start + pio - allocated_size; pci_pio_to_address()
757 allocated_size += range->size; pci_pio_to_address()
868 * @device: the device whose io range will be mapped
869 * @index: index of the io range
887 * @device: the device whose io range will be mapped
888 * @index: index of the io range
921 * of_dma_get_range - Get DMA range info
922 * @np: device node to get DMA range info
923 * @dma_addr: pointer to store initial DMA address of DMA range
924 * @paddr: pointer to store initial CPU address of DMA range
925 * @size: pointer to store size of DMA range
252 of_pci_range_parser_one(struct of_pci_range_parser *parser, struct of_pci_range *range) of_pci_range_parser_one() argument
/linux-4.4.14/include/net/netfilter/ipv4/
H A Dnf_nat_masquerade.h8 const struct nf_nat_range *range,
/linux-4.4.14/include/net/netfilter/
H A Dnf_nat_redirect.h9 nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range *range,
H A Dnf_nat_l4proto.h30 * maniptype), to give a unique tuple in the given range if
36 const struct nf_nat_range *range,
41 struct nf_nat_range *range);
65 const struct nf_nat_range *range,
70 struct nf_nat_range *range);
H A Dnf_nat.h41 /* Set up the info structure to map into this range. */
43 const struct nf_nat_range *range,
/linux-4.4.14/include/uapi/linux/netfilter/
H A Dxt_tcpudp.h8 __u16 spts[2]; /* Source port range. */
9 __u16 dpts[2]; /* Destination port range. */
25 __u16 spts[2]; /* Source port range. */
26 __u16 dpts[2]; /* Destination port range. */
H A Dnf_nat.h31 struct nf_nat_ipv4_range range[1]; member in struct:nf_nat_ipv4_multi_range_compat
/linux-4.4.14/arch/ia64/include/uapi/asm/
H A Dauxvec.h5 * Architecture-neutral AT_ values are in the range 0-17. Leave some room for more of
/linux-4.4.14/tools/include/linux/
H A Dlist.h10 * list_del_range - deletes range of entries from list.
11 * @begin: first element in the range to delete from the list.
12 * @end: last element in the range to delete from the list.
13 * Note: list_empty on the range of entries does not return true after this,
/linux-4.4.14/drivers/pci/hotplug/
H A Dibmphp_res.c135 /* need to insert our range */ alloc_bus_range()
183 * 2. If cannot allocate out of PFMem range, allocate from Mem ranges. PFmemFromMem
315 * assign a -1 and then update once the range ibmphp_rsrc_init()
357 * range actually appears... ibmphp_rsrc_init()
383 * This function adds a range into a sorted list of ranges per bus for a particular
384 * range type, it then calls another routine to update the range numbers on the
387 * Input: type of the resource, range to add, current bus
388 * Output: 0 or -1, bus and range ptrs
390 static int add_bus_range (int type, struct range_node *range, struct bus_node *bus_cur) add_bus_range() argument
414 if (range->start < range_cur->start) add_bus_range()
421 /* our range will go at the beginning of the list */ add_bus_range()
424 bus_cur->rangeMem = range; add_bus_range()
427 bus_cur->rangePFMem = range; add_bus_range()
430 bus_cur->rangeIO = range; add_bus_range()
433 range->next = range_cur; add_bus_range()
434 range->rangeno = 1; add_bus_range()
437 /* our range will go at the end of the list */ add_bus_range()
438 range->next = NULL; add_bus_range()
439 range_prev->next = range; add_bus_range()
440 range->rangeno = range_prev->rangeno + 1; add_bus_range()
443 /* the range is in the middle */ add_bus_range()
444 range_prev->next = range; add_bus_range()
445 range->next = range_cur; add_bus_range()
446 range->rangeno = range_cur->rangeno; add_bus_range()
461 * the range numbers that they correspond to. It was called from add_bus_range fnc
500 /* found the range */ update_resources()
509 static void fix_me (struct resource_node *res, struct bus_node *bus_cur, struct range_node *range) fix_me() argument
526 while (range) { fix_me()
527 if ((res->start >= range->start) && (res->end <= range->end)) { fix_me()
528 res->rangeno = range->rangeno; fix_me()
543 range = range->next; fix_me()
555 * This routine reassigns the range numbers to the resources that had a -1
558 * know the range, we assign -1, and this routine is called after a new range
559 * is assigned to see the resources with unknown range belong to the added range
566 struct range_node *range; fix_resources() local
573 range = bus_cur->rangeIO; fix_resources()
574 fix_me (res, bus_cur, range); fix_resources()
578 range = bus_cur->rangeMem; fix_resources()
579 fix_me (res, bus_cur, range); fix_resources()
583 range = bus_cur->rangePFMem; fix_resources()
584 fix_me (res, bus_cur, range); fix_resources()
666 debug ("The range is %d\n", res->rangeno); ibmphp_add_resource()
705 /* in the same range */ ibmphp_add_resource()
713 /* the last resource in this range */ ibmphp_add_resource()
719 /* at the beginning or middle of the range */ ibmphp_add_resource()
741 /* this is the case where it is 1st occurrence of the range */ ibmphp_add_resource()
941 struct range_node *range = NULL; find_range() local
945 range = bus_cur->rangeIO; find_range()
948 range = bus_cur->rangeMem; find_range()
951 range = bus_cur->rangePFMem; find_range()
957 while (range) { find_range()
958 if (res->rangeno == range->rangeno) find_range()
960 range = range->next; find_range()
962 return range; find_range()
977 struct range_node *range = NULL; ibmphp_check_resource() local
1033 range = find_range (bus_cur, res_cur); ibmphp_check_resource()
1036 if (!range) { ibmphp_check_resource()
1037 err ("no range for the device exists... bailing out...\n"); ibmphp_check_resource()
1041 /* found our range */ ibmphp_check_resource()
1044 len_tmp = res_cur->start - 1 - range->start; ibmphp_check_resource()
1046 if ((res_cur->start != range->start) && (len_tmp >= res->len)) { ibmphp_check_resource()
1051 if ((range->start % tmp_divide) == 0) { ibmphp_check_resource()
1055 start_cur = range->start; ibmphp_check_resource()
1058 tmp_start = range->start; ibmphp_check_resource()
1085 /* last device on the range */ ibmphp_check_resource()
1086 len_tmp = range->end - (res_cur->end + 1); ibmphp_check_resource()
1088 if ((range->end != res_cur->end) && (len_tmp >= res->len)) { ibmphp_check_resource()
1102 while ((len_tmp = range->end - tmp_start) >= res->len) { ibmphp_check_resource()
1110 if (tmp_start >= range->end) ibmphp_check_resource()
1126 /* 1st device on this range */ ibmphp_check_resource()
1127 len_tmp = res_cur->start - 1 - range->start; ibmphp_check_resource()
1129 if ((res_cur->start != range->start) && (len_tmp >= res->len)) { ibmphp_check_resource()
1131 if ((range->start % tmp_divide) == 0) { ibmphp_check_resource()
1135 start_cur = range->start; ibmphp_check_resource()
1138 tmp_start = range->start; ibmphp_check_resource()
1163 /* in the same range */ ibmphp_check_resource()
1212 /* need to find appropriate range */ ibmphp_check_resource()
1215 range = bus_cur->rangeIO; ibmphp_check_resource()
1218 range = bus_cur->rangeMem; ibmphp_check_resource()
1221 range = bus_cur->rangePFMem; ibmphp_check_resource()
1224 while (range) { ibmphp_check_resource()
1225 len_tmp = range->end - range->start; ibmphp_check_resource()
1229 if ((range->start % tmp_divide) == 0) { ibmphp_check_resource()
1233 start_cur = range->start; ibmphp_check_resource()
1236 tmp_start = range->start; ibmphp_check_resource()
1239 while ((len_tmp = range->end - tmp_start) >= res->len) { ibmphp_check_resource()
1247 if (tmp_start >= range->end) ibmphp_check_resource()
1260 range = range->next; ibmphp_check_resource()
1263 if ((!range) && (len_cur == 0)) { ibmphp_check_resource()
1265 err ("no appropriate range.. bailing out...\n"); ibmphp_check_resource()
1281 range = bus_cur->rangeIO; ibmphp_check_resource()
1284 range = bus_cur->rangeMem; ibmphp_check_resource()
1287 range = bus_cur->rangePFMem; ibmphp_check_resource()
1290 while (range) { ibmphp_check_resource()
1291 len_tmp = range->end - range->start; ibmphp_check_resource()
1295 if ((range->start % tmp_divide) == 0) { ibmphp_check_resource()
1299 start_cur = range->start; ibmphp_check_resource()
1302 tmp_start = range->start; ibmphp_check_resource()
1305 while ((len_tmp = range->end - tmp_start) >= res->len) { ibmphp_check_resource()
1313 if (tmp_start >= range->end) ibmphp_check_resource()
1326 range = range->next; ibmphp_check_resource()
1329 if ((!range) && (len_cur == 0)) { ibmphp_check_resource()
1331 err ("no appropriate range.. bailing out...\n"); ibmphp_check_resource()
1348 err ("no appropriate range.. bailing out...\n"); ibmphp_check_resource()
1682 * pfmem out of memory buckets of the bus. If so, it will change the range numbers
1789 struct range_node *range; ibmphp_print_test() local
1808 range = bus_cur->rangeIO; ibmphp_print_test()
1810 debug_pci ("rangeno is %d\n", range->rangeno); ibmphp_print_test()
1811 debug_pci ("[%x - %x]\n", range->start, range->end); ibmphp_print_test()
1812 range = range->next; ibmphp_print_test()
1818 range = bus_cur->rangeMem; ibmphp_print_test()
1820 debug_pci ("rangeno is %d\n", range->rangeno); ibmphp_print_test()
1821 debug_pci ("[%x - %x]\n", range->start, range->end); ibmphp_print_test()
1822 range = range->next; ibmphp_print_test()
1829 range = bus_cur->rangePFMem; ibmphp_print_test()
1831 debug_pci ("rangeno is %d\n", range->rangeno); ibmphp_print_test()
1832 debug_pci ("[%x - %x]\n", range->start, range->end); ibmphp_print_test()
1833 range = range->next; ibmphp_print_test()
1843 debug_pci ("The range # is %d\n", res->rangeno); ibmphp_print_test()
1858 debug_pci ("The range # is %d\n", res->rangeno); ibmphp_print_test()
1873 debug_pci ("The range # is %d\n", res->rangeno); ibmphp_print_test()
1889 debug_pci ("The range # is %d\n", res->rangeno); ibmphp_print_test()
1899 static int range_exists_already (struct range_node * range, struct bus_node * bus_cur, u8 type) range_exists_already() argument
1913 err ("wrong type passed to find out if range already exists\n"); range_exists_already()
1918 if ((range_cur->start == range->start) && (range_cur->end == range->end)) range_exists_already()
1927 * range info for the secondary bus, and will also input this info into
1950 struct range_node *range; update_bridge_ranges() local
2005 range = kzalloc(sizeof(struct range_node), GFP_KERNEL); update_bridge_ranges()
2006 if (!range) { update_bridge_ranges()
2010 range->start = start_address; update_bridge_ranges()
2011 range->end = end_address + 0xfff; update_bridge_ranges()
2014 if (!range_exists_already (range, bus_sec, IO)) { update_bridge_ranges()
2015 add_bus_range (IO, range, bus_sec); update_bridge_ranges()
2018 kfree (range); update_bridge_ranges()
2019 range = NULL; update_bridge_ranges()
2023 range->rangeno = 1; update_bridge_ranges()
2024 bus_sec->rangeIO = range; update_bridge_ranges()
2032 kfree (range); update_bridge_ranges()
2054 range = kzalloc(sizeof(struct range_node), GFP_KERNEL); update_bridge_ranges()
2055 if (!range) { update_bridge_ranges()
2059 range->start = start_address; update_bridge_ranges()
2060 range->end = end_address + 0xfffff; update_bridge_ranges()
2063 if (!range_exists_already (range, bus_sec, MEM)) { update_bridge_ranges()
2064 add_bus_range (MEM, range, bus_sec); update_bridge_ranges()
2067 kfree (range); update_bridge_ranges()
2068 range = NULL; update_bridge_ranges()
2072 range->rangeno = 1; update_bridge_ranges()
2073 bus_sec->rangeMem = range; update_bridge_ranges()
2082 kfree (range); update_bridge_ranges()
2108 range = kzalloc(sizeof(struct range_node), GFP_KERNEL); update_bridge_ranges()
2109 if (!range) { update_bridge_ranges()
2113 range->start = start_address; update_bridge_ranges()
2114 range->end = end_address + 0xfffff; update_bridge_ranges()
2117 if (!range_exists_already (range, bus_sec, PFMEM)) { update_bridge_ranges()
2118 add_bus_range (PFMEM, range, bus_sec); update_bridge_ranges()
2121 kfree (range); update_bridge_ranges()
2122 range = NULL; update_bridge_ranges()
2126 range->rangeno = 1; update_bridge_ranges()
2127 bus_sec->rangePFMem = range; update_bridge_ranges()
2135 kfree (range); update_bridge_ranges()
/linux-4.4.14/include/linux/iio/dac/
H A Dad5421.h5 * enum ad5421_current_range - Current range the AD5421 is configured for.
20 * @current_range: Current range the AD5421 is configured for
/linux-4.4.14/include/linux/platform_data/
H A Dad7266.h13 * enum ad7266_range - AD7266 reference voltage range
14 * @AD7266_RANGE_VREF: Device is configured for input range 0V - VREF
16 * @AD7266_RANGE_2VREF: Device is configured for input range 0V - 2VREF
41 * @range: Reference voltage range the device is configured for
48 enum ad7266_range range; member in struct:ad7266_platform_data
/linux-4.4.14/arch/x86/kernel/cpu/mtrr/
H A Dcleanup.c28 #include <linux/range.h>
54 static struct range __initdata range[RANGE_NUM]; variable in typeref:struct:__initdata
66 x86_get_mtrr_mem_range(struct range *range, int nr_range, x86_get_mtrr_mem_range() argument
80 nr_range = add_range_with_merge(range, RANGE_NUM, nr_range, x86_get_mtrr_mem_range()
87 range[i].start, range[i].end); x86_get_mtrr_mem_range()
110 subtract_range(range, RANGE_NUM, base, base + size); x86_get_mtrr_mem_range()
113 subtract_range(range, RANGE_NUM, extra_remove_base, x86_get_mtrr_mem_range()
119 if (!range[i].end) x86_get_mtrr_mem_range()
122 range[i].start, range[i].end); x86_get_mtrr_mem_range()
127 nr_range = clean_sort_range(range, RANGE_NUM); x86_get_mtrr_mem_range()
132 range[i].start, range[i].end); x86_get_mtrr_mem_range()
140 static unsigned long __init sum_ranges(struct range *range, int nr_range) sum_ranges() argument
146 sum += range[i].end - range[i].start; sum_ranges()
260 /* Compute the maximum size with which we can make a range: */ range_to_mtrr()
279 "base: %ld%cB, range: %ld%cB, type %s\n", range_to_mtrr()
387 /* Need to handle left over range: */ range_to_mtrr_with_hole()
390 Dprintk("range: %016lx - %016lx\n", range_to_mtrr_with_hole()
423 /* See if I can merge with the last range: */ set_var_mtrr_range()
430 /* Write the range mtrrs: */ set_var_mtrr_range()
475 x86_setup_var_mtrrs(struct range *range, int nr_range, x86_setup_var_mtrrs() argument
490 /* Write the range: */ x86_setup_var_mtrrs()
492 set_var_mtrr_range(&var_state, range[i].start, x86_setup_var_mtrrs()
493 range[i].end - range[i].start); x86_setup_var_mtrrs()
496 /* Write the last range: */ x86_setup_var_mtrrs()
547 printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n", print_out_mtrr_range_state()
596 static struct range range_new[RANGE_NUM]; mtrr_calc_range_state()
602 num_reg = x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size); mtrr_calc_range_state()
623 if (nr_range_new != nr_range || memcmp(range, range_new, sizeof(range))) mtrr_calc_range_state()
712 memset(range, 0, sizeof(range)); mtrr_cleanup()
722 nr_range = add_range_with_merge(range, RANGE_NUM, 0, 0, mtrr_cleanup()
725 nr_range = x86_get_mtrr_mem_range(range, nr_range, mtrr_cleanup()
728 range_sums = sum_ranges(range, nr_range); mtrr_cleanup()
784 x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size); mtrr_cleanup()
939 memset(range, 0, sizeof(range)); mtrr_trim_uncached_memory()
942 range[nr_range].start = (1ULL<<(32 - PAGE_SHIFT)); mtrr_trim_uncached_memory()
943 range[nr_range].end = mtrr_tom2 >> PAGE_SHIFT; mtrr_trim_uncached_memory()
944 if (highest_pfn < range[nr_range].end) mtrr_trim_uncached_memory()
945 highest_pfn = range[nr_range].end; mtrr_trim_uncached_memory()
948 nr_range = x86_get_mtrr_mem_range(range, nr_range, 0, 0); mtrr_trim_uncached_memory()
952 if (range[0].start) mtrr_trim_uncached_memory()
953 total_trim_size += real_trim_memory(0, range[0].start); mtrr_trim_uncached_memory()
957 if (range[i].end < range[i+1].start) mtrr_trim_uncached_memory()
958 total_trim_size += real_trim_memory(range[i].end, mtrr_trim_uncached_memory()
959 range[i+1].start); mtrr_trim_uncached_memory()
964 if (range[i].end < end_pfn) mtrr_trim_uncached_memory()
965 total_trim_size += real_trim_memory(range[i].end, mtrr_trim_uncached_memory()
H A Dgeneric.c66 /* Get the size of contiguous MTRR range */ get_mtrr_size()
111 * 0x00000 - 0x7FFFF : This range is divided into eight 64KB sub-ranges
112 * 0x80000 - 0xBFFFF : This range is divided into sixteen 16KB sub-ranges
113 * 0xC0000 - 0xFFFFF : This range is divided into sixty-four 4KB sub-ranges
151 * repeat - Set to 1 when [start:end] spanned across MTRR range and type
313 /* Get the MSR pair relating to a var range */
321 /* Fill the MSR pair relating to a var range */ fill_mtrr_var_range()
529 * set_fixed_range - checks & updates a fixed-range MTRR if it
591 /* Invalid (i.e. free) range */ generic_get_mtrr()
618 * contiguous range: generic_get_mtrr()
629 * set_fixed_ranges - checks & updates the fixed-range MTRRs if they
631 * @frs: pointer to fixed-range MTRR values, saved by get_fixed_ranges()
637 int block = -1, range; set_fixed_ranges() local
642 for (range = 0; range < fixed_range_blocks[block].ranges; range++) set_fixed_ranges()
643 set_fixed_range(fixed_range_blocks[block].base_msr + range, set_fixed_ranges()
651 * Set the MSR pair relating to a var range.
830 * clear the relevant mask register to disable a range. generic_set_mtrr()
/linux-4.4.14/fs/jfs/
H A Djfs_discard.c33 * FUNCTION: TRIM the specified block range on device, if supported
74 * range - the range, given by user space
80 int jfs_ioc_trim(struct inode *ip, struct fstrim_range *range) jfs_ioc_trim() argument
95 start = range->start >> sb->s_blocksize_bits; jfs_ioc_trim()
96 end = start + (range->len >> sb->s_blocksize_bits) - 1; jfs_ioc_trim()
97 minlen = range->minlen >> sb->s_blocksize_bits; jfs_ioc_trim()
103 range->len < sb->s_blocksize) jfs_ioc_trim()
110 * we trim all ag's within the range jfs_ioc_trim()
118 range->len = trimmed << sb->s_blocksize_bits; jfs_ioc_trim()
H A Dioctl.c135 struct fstrim_range range; jfs_ioctl() local
146 if (copy_from_user(&range, (struct fstrim_range __user *)arg, jfs_ioctl()
147 sizeof(range))) jfs_ioctl()
150 range.minlen = max_t(unsigned int, range.minlen, jfs_ioctl()
153 ret = jfs_ioc_trim(inode, &range); jfs_ioctl()
157 if (copy_to_user((struct fstrim_range __user *)arg, &range, jfs_ioctl()
158 sizeof(range))) jfs_ioctl()
H A Djfs_uniupr.c60 /* Upper case range - Greek */
67 /* Upper case range - Cyrillic */
74 /* Upper case range - Extended cyrillic */
82 /* Upper case range - Extended latin and greek */
118 /* Upper case range - Wide latin */
H A Djfs_unicode.h128 rp = UniUpperRange; /* Use range tables */ UniToupper()
130 if (uc < rp->start) /* Before start of range */ UniToupper()
132 if (uc <= rp->end) /* In range */ UniToupper()
134 rp++; /* Try next range */ UniToupper()
137 return uc; /* Past last range */ UniToupper()
/linux-4.4.14/scripts/
H A Dconmakehash.c129 * <range> idem main()
130 * <range> <unicode range> main()
132 * where <range> ::= <fontpos>-<fontpos> main()
176 "%s: Bad end of range (0x%x)\n", main()
183 /* we have a range; expect the word "idem" or a Unicode range of the main()
201 "%s: Corresponding to a range of font positions, there should be a Unicode range\n", main()
210 "%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n", main()
217 "%s: Unicode range U+%x-U+%x not of the same length as font position range 0x%x-0x%x\n", main()
227 /* no range; expect a list of unicode values for a single font position */ main()
/linux-4.4.14/drivers/staging/comedi/drivers/
H A Djr3_pci.c117 struct comedi_krange range; member in struct:jr3_pci_subdev_private::__anon10282
118 } range[9]; member in struct:jr3_pci_subdev_private
541 spriv->range[0].range.min = -get_s16(&fs->fx) * 1000; jr3_pci_poll_subdevice()
542 spriv->range[0].range.max = get_s16(&fs->fx) * 1000; jr3_pci_poll_subdevice()
543 spriv->range[1].range.min = -get_s16(&fs->fy) * 1000; jr3_pci_poll_subdevice()
544 spriv->range[1].range.max = get_s16(&fs->fy) * 1000; jr3_pci_poll_subdevice()
545 spriv->range[2].range.min = -get_s16(&fs->fz) * 1000; jr3_pci_poll_subdevice()
546 spriv->range[2].range.max = get_s16(&fs->fz) * 1000; jr3_pci_poll_subdevice()
547 spriv->range[3].range.min = -get_s16(&fs->mx) * 100; jr3_pci_poll_subdevice()
548 spriv->range[3].range.max = get_s16(&fs->mx) * 100; jr3_pci_poll_subdevice()
549 spriv->range[4].range.min = -get_s16(&fs->my) * 100; jr3_pci_poll_subdevice()
550 spriv->range[4].range.max = get_s16(&fs->my) * 100; jr3_pci_poll_subdevice()
551 spriv->range[5].range.min = -get_s16(&fs->mz) * 100; jr3_pci_poll_subdevice()
553 spriv->range[5].range.max = get_s16(&fs->mz) * 100; jr3_pci_poll_subdevice()
554 spriv->range[6].range.min = -get_s16(&fs->v1) * 100; jr3_pci_poll_subdevice()
555 spriv->range[6].range.max = get_s16(&fs->v1) * 100; jr3_pci_poll_subdevice()
556 spriv->range[7].range.min = -get_s16(&fs->v2) * 100; jr3_pci_poll_subdevice()
557 spriv->range[7].range.max = get_s16(&fs->v2) * 100; jr3_pci_poll_subdevice()
558 spriv->range[8].range.min = 0; jr3_pci_poll_subdevice()
559 spriv->range[8].range.max = 65535; jr3_pci_poll_subdevice()
652 spriv->range[j].length = 1; jr3_pci_alloc_spriv()
653 spriv->range[j].range.min = -1000000; jr3_pci_alloc_spriv()
654 spriv->range[j].range.max = 1000000; jr3_pci_alloc_spriv()
658 (struct comedi_lrange *)&spriv->range[j]; jr3_pci_alloc_spriv()
662 spriv->range[8].length = 1; jr3_pci_alloc_spriv()
663 spriv->range[8].range.min = 0; jr3_pci_alloc_spriv()
664 spriv->range[8].range.max = 65536; jr3_pci_alloc_spriv()
666 spriv->range_table_list[56] = (struct comedi_lrange *)&spriv->range[8]; jr3_pci_alloc_spriv()
667 spriv->range_table_list[57] = (struct comedi_lrange *)&spriv->range[8]; jr3_pci_alloc_spriv()
730 /* Channel specific range and maxdata */ jr3_pci_auto_attach()
H A Ddt2815.c42 [5] - Analog output 0 range configuration
45 [6] - Analog output 1 range configuration (same options)
46 [7] - Analog output 2 range configuration (same options)
47 [8] - Analog output 3 range configuration (same options)
48 [9] - Analog output 4 range configuration (same options)
49 [10] - Analog output 5 range configuration (same options)
50 [11] - Analog output 6 range configuration (same options)
51 [12] - Analog output 7 range configuration (same options)
136 options[5] Analog output 0 range configuration
139 options[6] Analog output 1 range configuration
141 options[12] Analog output 7 range configuration
H A Dserial2002.c44 struct comedi_krange range; member in struct:serial2002_range_table_t
79 * 33:14 - the base value for the range
339 struct serial2002_range_table_t *range, serial2002_setup_subdevice()
364 } else if (range) { serial2002_setup_subdevice()
365 range_table_list = kmalloc_array(s->n_chan, sizeof(*range), serial2002_setup_subdevice()
375 if (range && range_table_list) { serial2002_setup_subdevice()
376 range[j].length = 1; serial2002_setup_subdevice()
377 range[j].range.min = cfg[j].min; serial2002_setup_subdevice()
378 range[j].range.max = cfg[j].max; serial2002_setup_subdevice()
380 (const struct comedi_lrange *)&range[j]; serial2002_setup_subdevice()
418 int range = S2002_CFG_BASE(data.value); serial2002_setup_subdevs() local
458 range *= 1000000; serial2002_setup_subdevs()
461 range *= 1000; serial2002_setup_subdevs()
464 range *= 1; serial2002_setup_subdevs()
468 range = -range; serial2002_setup_subdevs()
470 cfg[channel].min = range; serial2002_setup_subdevs()
472 cfg[channel].max = range; serial2002_setup_subdevs()
480 struct serial2002_range_table_t *range = NULL; serial2002_setup_subdevs() local
499 range = devpriv->in_range; serial2002_setup_subdevs()
505 range = devpriv->out_range; serial2002_setup_subdevs()
511 range = devpriv->in_range; serial2002_setup_subdevs()
516 if (serial2002_setup_subdevice(s, cfg, range, mapping, kind)) serial2002_setup_subdevs()
337 serial2002_setup_subdevice(struct comedi_subdevice *s, struct config_t *cfg, struct serial2002_range_table_t *range, unsigned char *mapping, int kind) serial2002_setup_subdevice() argument
H A Dicp_multi.c54 #define ICP_MULTI_ADC_CSR_BI BIT(4) /* Bipolar input range */
55 #define ICP_MULTI_ADC_CSR_RA BIT(5) /* Input range 0 = 5V, 1 = 10V */
63 #define ICP_MULTI_DAC_CSR_BI BIT(4) /* Bipolar output range */
64 #define ICP_MULTI_DAC_CSR_RA BIT(5) /* Output range 0 = 5V, 1 = 10V */
85 /* analog input and output have the same range options */
116 unsigned int range = CR_RANGE(insn->chanspec); icp_multi_ai_insn_read() local
122 /* Set mode and range data for specified channel */ icp_multi_ai_insn_read()
129 adc_csr |= range_codes_analog[range]; icp_multi_ai_insn_read()
169 unsigned int range = CR_RANGE(insn->chanspec); icp_multi_ao_insn_write() local
173 /* Select channel and range */ icp_multi_ao_insn_write()
175 dac_csr |= range_codes_analog[range]; icp_multi_ao_insn_write()
234 /* Select channel and 0..5V range */ icp_multi_reset()
H A Dcb_pcidda.c57 #define CB_DDA_DA_CTRL_RANGE2V5 (0 << 6) /* 2.5V range */
58 #define CB_DDA_DA_CTRL_RANGE5V (2 << 6) /* 5V range */
59 #define CB_DDA_DA_CTRL_RANGE10V (3 << 6) /* 10V range */
60 #define CB_DDA_DA_CTRL_UNIP (1 << 8) /* Unipolar range */
156 /* current range settings for output channels */
265 /* set caldacs to eeprom values for given channel and range */ cb_pcidda_calibrate()
267 unsigned int range) cb_pcidda_calibrate()
272 unsigned int index = 2 * range + 12 * channel; cb_pcidda_calibrate()
276 /* save range so we can tell when we need to readjust calibration */ cb_pcidda_calibrate()
277 devpriv->ao_range[channel] = range; cb_pcidda_calibrate()
301 unsigned int range = CR_RANGE(insn->chanspec); cb_pcidda_ao_insn_write() local
304 if (range != devpriv->ao_range[channel]) cb_pcidda_ao_insn_write()
305 cb_pcidda_calibrate(dev, channel, range); cb_pcidda_ao_insn_write()
309 switch (range) { cb_pcidda_ao_insn_write()
324 if (range > 2) cb_pcidda_ao_insn_write()
266 cb_pcidda_calibrate(struct comedi_device *dev, unsigned int channel, unsigned int range) cb_pcidda_calibrate() argument
H A Dpcl726.c30 * [2] - D/A output range for channel 0
31 * [3] - D/A output range for channel 1
34 * [4] - D/A output range for channel 2
35 * [5] - D/A output range for channel 3
36 * [6] - D/A output range for channel 4
37 * [7] - D/A output range for channel 5
40 * [8] - D/A output range for channel 6
41 * [9] - D/A output range for channel 7
42 * [10] - D/A output range for channel 8
43 * [11] - D/A output range for channel 9
44 * [12] - D/A output range for channel 10
45 * [13] - D/A output range for channel 11
247 unsigned int range = CR_RANGE(insn->chanspec); pcl726_ao_insn_write() local
256 if (comedi_chan_range_is_bipolar(s, chan, range)) pcl726_ao_insn_write()
H A Dni_daq_700.c38 * Analog: The input range is 0 to 4095 with a default of -10 to +10 volts.
149 unsigned int range = CR_RANGE(insn->chanspec); daq700_ai_rinsn() local
155 /* write channel mode/range */ daq700_ai_rinsn()
156 if (range >= 1) daq700_ai_rinsn()
157 range++; /* convert range to hardware value */ daq700_ai_rinsn()
158 outb(r3_bits | (range & 0x03), dev->iobase + CMD_R3); daq700_ai_rinsn()
199 * The analog input range is set to +-10 V
211 outb(0x00, iobase + CMD_R3); /* set +-10 range */ daq700_ai_config()
H A Dpcmad.c36 * 0 = straight binary (0-5V input range)
37 * 1 = two's complement (+-10V input range)
82 unsigned int range = CR_RANGE(insn->chanspec); pcmad_ai_insn_read() local
101 if (comedi_range_is_bipolar(s, range)) { pcmad_ai_insn_read()
H A Ddac02.c41 * The output range is selected by jumpering pins on the I/O connector.
83 unsigned int range = CR_RANGE(insn->chanspec); dac02_ao_insn_write() local
97 if (comedi_range_is_bipolar(s, range)) dac02_ao_insn_write()
H A Dpcl816.c137 unsigned int range) pcl816_ai_set_chan_range()
140 outb(range, dev->iobase + PCL816_RANGE_REG); pcl816_ai_set_chan_range()
157 unsigned int range; pcl816_ai_setup_chanlist() local
160 /* store range list to card */ pcl816_ai_setup_chanlist()
163 range = CR_RANGE(chanlist[i]); pcl816_ai_setup_chanlist()
165 pcl816_ai_set_chan_range(dev, last_chan, range); pcl816_ai_setup_chanlist()
286 /* correct channel and range number check itself comedi/range.c */ check_channel_list()
288 dev_err(dev->class_dev, "range/channel list is empty!\n"); check_channel_list()
317 "bad channel or range number! chanlist[%i]=%d,%d,%d and not %d,%d,%d!\n", check_channel_list()
507 unsigned int range = CR_RANGE(insn->chanspec); pcl816_ai_insn_read() local
513 pcl816_ai_set_chan_range(dev, chan, range); pcl816_ai_insn_read()
135 pcl816_ai_set_chan_range(struct comedi_device *dev, unsigned int chan, unsigned int range) pcl816_ai_set_chan_range() argument
H A Dadv_pci1724.c38 * have an output range significantly different from the board's
39 * nominal output ranges. For a calibrated +/-10V range, the analog
40 * output's offset will be set somewhere near mid-range (0x2000) and
46 * outputs in the desired range.
/linux-4.4.14/drivers/regulator/
H A Dqcom_spmi-regulator.c264 /* VSET value to decide the range of ULT SMPS */
276 * to pick which range should be used in the case of
279 * range
280 * @range_sel: Voltage range register value corresponding to this range
289 * specify that the voltage range has meaning, but is not preferred.
303 * so that range[i].set_point_max_uV < range[i+1].set_point_min_uV.
306 struct spmi_voltage_range *range; member in struct:spmi_voltage_set_points
384 .range = name##_ranges, \
545 const struct spmi_voltage_range *range; spmi_regulator_select_voltage() local
549 /* Check if request voltage is outside of physically settable range. */ spmi_regulator_select_voltage()
550 lim_min_uV = vreg->set_points->range[0].set_point_min_uV; spmi_regulator_select_voltage()
552 vreg->set_points->range[vreg->set_points->count - 1].set_point_max_uV; spmi_regulator_select_voltage()
564 /* Find the range which uV is inside of. */ spmi_regulator_select_voltage()
566 range_max_uV = vreg->set_points->range[i - 1].set_point_max_uV; spmi_regulator_select_voltage()
572 range = &vreg->set_points->range[range_id]; spmi_regulator_select_voltage()
573 *range_sel = range->range_sel; spmi_regulator_select_voltage()
579 *voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); spmi_regulator_select_voltage()
580 uV = *voltage_sel * range->step_uV + range->min_uV; spmi_regulator_select_voltage()
592 *selector += vreg->set_points->range[i].n_voltages; spmi_regulator_select_voltage()
593 *selector += (uV - range->set_point_min_uV) / range->step_uV; spmi_regulator_select_voltage()
602 const struct spmi_voltage_range *range, *end; spmi_regulator_find_range() local
604 range = vreg->set_points->range; spmi_regulator_find_range()
605 end = range + vreg->set_points->count; spmi_regulator_find_range()
609 for (; range < end; range++) spmi_regulator_find_range()
610 if (range->range_sel == range_sel) spmi_regulator_find_range()
611 return range; spmi_regulator_find_range()
620 const struct spmi_voltage_range *range; spmi_regulator_select_voltage_same_range() local
624 range = spmi_regulator_find_range(vreg); spmi_regulator_select_voltage_same_range()
625 if (!range) spmi_regulator_select_voltage_same_range()
628 if (uV < range->min_uV && max_uV >= range->min_uV) spmi_regulator_select_voltage_same_range()
629 uV = range->min_uV; spmi_regulator_select_voltage_same_range()
631 if (uV < range->min_uV || uV > range->max_uV) { spmi_regulator_select_voltage_same_range()
632 /* Current range doesn't support the requested voltage. */ spmi_regulator_select_voltage_same_range()
640 *voltage_sel = DIV_ROUND_UP(uV - range->min_uV, range->step_uV); spmi_regulator_select_voltage_same_range()
641 uV = *voltage_sel * range->step_uV + range->min_uV; spmi_regulator_select_voltage_same_range()
645 * No set point in the current voltage range is within the spmi_regulator_select_voltage_same_range()
646 * requested min_uV to max_uV range. spmi_regulator_select_voltage_same_range()
653 if (uV >= vreg->set_points->range[i].set_point_min_uV spmi_regulator_select_voltage_same_range()
654 && uV <= vreg->set_points->range[i].set_point_max_uV) { spmi_regulator_select_voltage_same_range()
656 (uV - vreg->set_points->range[i].set_point_min_uV) spmi_regulator_select_voltage_same_range()
657 / vreg->set_points->range[i].step_uV; spmi_regulator_select_voltage_same_range()
661 *selector += vreg->set_points->range[i].n_voltages; spmi_regulator_select_voltage_same_range()
683 * Favor staying in the current voltage range if possible. This avoids spmi_regulator_common_set_voltage()
684 * voltage spikes that occur when changing the voltage range. spmi_regulator_common_set_voltage()
700 const struct spmi_voltage_range *range; spmi_regulator_set_voltage_time_sel() local
703 range = spmi_regulator_find_range(vreg); spmi_regulator_set_voltage_time_sel()
704 if (!range) spmi_regulator_set_voltage_time_sel()
707 diff_uV = abs(new_selector - old_selector) * range->step_uV; spmi_regulator_set_voltage_time_sel()
715 const struct spmi_voltage_range *range; spmi_regulator_common_get_voltage() local
720 range = spmi_regulator_find_range(vreg); spmi_regulator_common_get_voltage()
721 if (!range) spmi_regulator_common_get_voltage()
724 return range->step_uV * voltage_sel + range->min_uV; spmi_regulator_common_get_voltage()
742 * Certain types of regulators do not have a range select register so spmi_regulator_single_range_set_voltage()
751 const struct spmi_voltage_range *range = vreg->set_points->range; spmi_regulator_single_range_get_voltage() local
756 return range->step_uV * voltage_sel + range->min_uV; spmi_regulator_single_range_get_voltage()
767 * Favor staying in the current voltage range if possible. This avoids spmi_regulator_ult_lo_smps_set_voltage()
768 * voltage spikes that occur when changing the voltage range. spmi_regulator_ult_lo_smps_set_voltage()
776 * Calculate VSET based on range spmi_regulator_ult_lo_smps_set_voltage()
777 * In case of range 0: voltage_sel is a 7 bit value, can be written spmi_regulator_ult_lo_smps_set_voltage()
779 * In case of range 1: voltage_sel is a 5 bit value, bits[7-5] set to spmi_regulator_ult_lo_smps_set_voltage()
792 const struct spmi_voltage_range *range; spmi_regulator_ult_lo_smps_get_voltage() local
797 range = spmi_regulator_find_range(vreg); spmi_regulator_ult_lo_smps_get_voltage()
798 if (!range) spmi_regulator_ult_lo_smps_get_voltage()
801 if (range->range_sel == 1) spmi_regulator_ult_lo_smps_get_voltage()
804 return range->step_uV * voltage_sel + range->min_uV; spmi_regulator_ult_lo_smps_get_voltage()
818 if (selector < vreg->set_points->range[i].n_voltages) { spmi_regulator_common_list_voltage()
819 uV = selector * vreg->set_points->range[i].step_uV spmi_regulator_common_list_voltage()
820 + vreg->set_points->range[i].set_point_min_uV; spmi_regulator_common_list_voltage()
824 selector -= vreg->set_points->range[i].n_voltages; spmi_regulator_common_list_voltage()
1180 struct spmi_voltage_range *range = points->range; spmi_calculate_num_voltages() local
1182 for (; range < points->range + points->count; range++) { spmi_calculate_num_voltages()
1184 if (range->set_point_max_uV) { spmi_calculate_num_voltages()
1185 n = range->set_point_max_uV - range->set_point_min_uV; spmi_calculate_num_voltages()
1186 n = (n / range->step_uV) + 1; spmi_calculate_num_voltages()
1188 range->n_voltages = n; spmi_calculate_num_voltages()
1253 const struct spmi_voltage_range *range; spmi_regulator_ftsmps_init_slew_rate() local
1261 range = spmi_regulator_find_range(vreg); spmi_regulator_ftsmps_init_slew_rate()
1262 if (!range) spmi_regulator_ftsmps_init_slew_rate()
1272 slew_rate = SPMI_FTSMPS_CLOCK_RATE * range->step_uV * (1 << step); spmi_regulator_ftsmps_init_slew_rate()
H A Dhelpers.c180 * range. regulator_map_voltage_iterate()
290 const struct regulator_linear_range *range; regulator_map_voltage_linear_range() local
302 range = &rdev->desc->linear_ranges[i]; regulator_map_voltage_linear_range()
303 linear_max_uV = range->min_uV + regulator_map_voltage_linear_range()
304 (range->max_sel - range->min_sel) * range->uV_step; regulator_map_voltage_linear_range()
306 if (!(min_uV <= linear_max_uV && max_uV >= range->min_uV)) regulator_map_voltage_linear_range()
309 if (min_uV <= range->min_uV) regulator_map_voltage_linear_range()
310 min_uV = range->min_uV; regulator_map_voltage_linear_range()
312 /* range->uV_step == 0 means fixed voltage range */ regulator_map_voltage_linear_range()
313 if (range->uV_step == 0) { regulator_map_voltage_linear_range()
316 ret = DIV_ROUND_UP(min_uV - range->min_uV, regulator_map_voltage_linear_range()
317 range->uV_step); regulator_map_voltage_linear_range()
322 ret += range->min_sel; regulator_map_voltage_linear_range()
376 const struct regulator_linear_range *range; regulator_list_voltage_linear_range() local
385 range = &rdev->desc->linear_ranges[i]; regulator_list_voltage_linear_range()
387 if (!(selector >= range->min_sel && regulator_list_voltage_linear_range()
388 selector <= range->max_sel)) regulator_list_voltage_linear_range()
391 selector -= range->min_sel; regulator_list_voltage_linear_range()
393 return range->min_uV + (range->uV_step * selector); regulator_list_voltage_linear_range()
H A Dtps65912-regulator.c130 int range; tps65912_get_range() local
134 range = tps65912_reg_read(mfd, TPS65912_DCDC1_LIMIT); tps65912_get_range()
137 range = tps65912_reg_read(mfd, TPS65912_DCDC2_LIMIT); tps65912_get_range()
140 range = tps65912_reg_read(mfd, TPS65912_DCDC3_LIMIT); tps65912_get_range()
143 range = tps65912_reg_read(mfd, TPS65912_DCDC4_LIMIT); tps65912_get_range()
149 if (range >= 0) tps65912_get_range()
150 range = (range & DCDC_LIMIT_RANGE_MASK) tps65912_get_range()
153 pmic->dcdc_range[id] = range; tps65912_get_range()
154 return range; tps65912_get_range()
369 int range, voltage = 0, id = rdev_get_id(dev); tps65912_list_voltage() local
374 range = pmic->dcdc_range[id]; tps65912_list_voltage()
376 switch (range) { tps65912_list_voltage()
481 int range = 0; tps65912_probe() local
498 range = tps65912_get_range(pmic, i); tps65912_probe()
/linux-4.4.14/drivers/pinctrl/
H A Dcore.c205 /* Deletes a range of pin descriptors */ pinctrl_free_pindescs()
283 * gpio_to_pin() - GPIO range GPIO number to pin number translation
284 * @range: GPIO range used for the translation
287 * Finds the pin number for a given GPIO using the specified GPIO range
291 * This function assumes the gpio is part of the specified GPIO range, use
295 static inline int gpio_to_pin(struct pinctrl_gpio_range *range, gpio_to_pin() argument
298 unsigned int offset = gpio - range->base; gpio_to_pin()
299 if (range->pins) gpio_to_pin()
300 return range->pins[offset]; gpio_to_pin()
302 return range->pin_base + offset; gpio_to_pin()
306 * pinctrl_match_gpio_range() - check if a certain GPIO pin is in range
311 * controller, return the range or NULL
316 struct pinctrl_gpio_range *range = NULL; pinctrl_match_gpio_range() local
320 list_for_each_entry(range, &pctldev->gpio_ranges, node) { pinctrl_match_gpio_range()
321 /* Check if we're in the valid range */ pinctrl_match_gpio_range()
322 if (gpio >= range->base && pinctrl_match_gpio_range()
323 gpio < range->base + range->npins) { pinctrl_match_gpio_range()
325 return range; pinctrl_match_gpio_range()
334 * the same GPIO chip are in range
349 struct pinctrl_gpio_range *range = NULL; pinctrl_ready_for_gpio_range() local
361 list_for_each_entry(range, &pctldev->gpio_ranges, node) { pinctrl_ready_for_gpio_range()
362 /* Check if any gpio range overlapped with gpio chip */ pinctrl_ready_for_gpio_range()
363 if (range->base + range->npins - 1 < chip->base || pinctrl_ready_for_gpio_range()
364 range->base > chip->base + chip->ngpio - 1) pinctrl_ready_for_gpio_range()
382 * pinctrl_get_device_gpio_range() - find device for GPIO range pinctrl_ready_for_gpio_range()
385 * @outrange: the GPIO range if found pinctrl_ready_for_gpio_range()
388 * the GPIO subsystem, return the device and the matching GPIO range. Returns pinctrl_ready_for_gpio_range()
389 * -EPROBE_DEFER if the GPIO range could not be found in any device since it pinctrl_ready_for_gpio_range()
402 struct pinctrl_gpio_range *range; pinctrl_get_device_gpio_range() local
404 range = pinctrl_match_gpio_range(pctldev, gpio); pinctrl_get_device_gpio_range()
405 if (range != NULL) { pinctrl_get_device_gpio_range()
407 *outrange = range; pinctrl_get_device_gpio_range()
419 * pinctrl_add_gpio_range() - register a GPIO range for a controller
420 * @pctldev: pin controller device to add the range to
421 * @range: the GPIO range to add
423 * This adds a range of GPIOs to be handled by a certain pin controller. Call
427 struct pinctrl_gpio_range *range) pinctrl_add_gpio_range()
430 list_add_tail(&range->node, &pctldev->gpio_ranges); pinctrl_add_gpio_range()
447 struct pinctrl_gpio_range *range) pinctrl_find_and_add_gpio_range()
456 * range need to defer probing. pinctrl_find_and_add_gpio_range()
461 pinctrl_add_gpio_range(pctldev, range); pinctrl_find_and_add_gpio_range()
485 * pinctrl_find_gpio_range_from_pin() - locate the GPIO range for a pin
487 * @pin: a controller-local number to find the range for
493 struct pinctrl_gpio_range *range; pinctrl_find_gpio_range_from_pin() local
497 list_for_each_entry(range, &pctldev->gpio_ranges, node) { pinctrl_find_gpio_range_from_pin()
498 /* Check if we're in the valid range */ pinctrl_find_gpio_range_from_pin()
499 if (range->pins) { pinctrl_find_gpio_range_from_pin()
501 for (a = 0; a < range->npins; a++) { pinctrl_find_gpio_range_from_pin()
502 if (range->pins[a] == pin) pinctrl_find_gpio_range_from_pin()
505 } else if (pin >= range->pin_base && pinctrl_find_gpio_range_from_pin()
506 pin < range->pin_base + range->npins) pinctrl_find_gpio_range_from_pin()
509 range = NULL; pinctrl_find_gpio_range_from_pin()
512 return range; pinctrl_find_gpio_range_from_pin()
517 * pinctrl_remove_gpio_range() - remove a range of GPIOs fro a pin controller
518 * @pctldev: pin controller device to remove the range from
519 * @range: the GPIO range to remove
522 struct pinctrl_gpio_range *range) pinctrl_remove_gpio_range()
525 list_del(&range->node); pinctrl_remove_gpio_range()
573 struct pinctrl_gpio_range *range; pinctrl_request_gpio() local
577 ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); pinctrl_request_gpio()
587 pin = gpio_to_pin(range, gpio); pinctrl_request_gpio()
589 ret = pinmux_request_gpio(pctldev, range, pin, gpio); pinctrl_request_gpio()
608 struct pinctrl_gpio_range *range; pinctrl_free_gpio() local
612 ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); pinctrl_free_gpio()
619 pin = gpio_to_pin(range, gpio); pinctrl_free_gpio()
621 pinmux_free_gpio(pctldev, pin, range); pinctrl_free_gpio()
630 struct pinctrl_gpio_range *range; pinctrl_gpio_direction() local
634 ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range); pinctrl_gpio_direction()
642 pin = gpio_to_pin(range, gpio); pinctrl_gpio_direction()
643 ret = pinmux_gpio_direction(pctldev, range, pin, input); pinctrl_gpio_direction()
1422 struct pinctrl_gpio_range *range = NULL; pinctrl_gpioranges_show() local
1429 list_for_each_entry(range, &pctldev->gpio_ranges, node) { pinctrl_gpioranges_show()
1430 if (range->pins) { pinctrl_gpioranges_show()
1433 range->id, range->name, pinctrl_gpioranges_show()
1434 range->base, (range->base + range->npins - 1)); pinctrl_gpioranges_show()
1435 for (a = 0; a < range->npins - 1; a++) pinctrl_gpioranges_show()
1436 seq_printf(s, "%u, ", range->pins[a]); pinctrl_gpioranges_show()
1437 seq_printf(s, "%u}\n", range->pins[a]); pinctrl_gpioranges_show()
1441 range->id, range->name, pinctrl_gpioranges_show()
1442 range->base, (range->base + range->npins - 1), pinctrl_gpioranges_show()
1443 range->pin_base, pinctrl_gpioranges_show()
1444 (range->pin_base + range->npins - 1)); pinctrl_gpioranges_show()
1835 struct pinctrl_gpio_range *range, *n; pinctrl_unregister() local
1854 list_for_each_entry_safe(range, n, &pctldev->gpio_ranges, node) pinctrl_unregister()
1855 list_del(&range->node); pinctrl_unregister()
426 pinctrl_add_gpio_range(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range) pinctrl_add_gpio_range() argument
446 pinctrl_find_and_add_gpio_range(const char *devname, struct pinctrl_gpio_range *range) pinctrl_find_and_add_gpio_range() argument
521 pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range) pinctrl_remove_gpio_range() argument
H A Dpinmux.h20 struct pinctrl_gpio_range *range,
23 struct pinctrl_gpio_range *range);
25 struct pinctrl_gpio_range *range,
47 struct pinctrl_gpio_range *range, pinmux_request_gpio()
55 struct pinctrl_gpio_range *range) pinmux_free_gpio()
60 struct pinctrl_gpio_range *range, pinmux_gpio_direction()
46 pinmux_request_gpio(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, unsigned pin, unsigned gpio) pinmux_request_gpio() argument
53 pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin, struct pinctrl_gpio_range *range) pinmux_free_gpio() argument
59 pinmux_gpio_direction(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, unsigned pin, bool input) pinmux_gpio_direction() argument
/linux-4.4.14/drivers/staging/rtl8192u/
H A Dr8192U_wx.c231 struct iw_range *range = (struct iw_range *)extra; rtl8180_wx_get_range() local
232 struct iw_range_with_scan_capa *tmp = (struct iw_range_with_scan_capa *)range; rtl8180_wx_get_range()
237 wrqu->data.length = sizeof(*range); rtl8180_wx_get_range()
238 memset(range, 0, sizeof(*range)); rtl8180_wx_get_range()
249 range->throughput = 5 * 1000 * 1000; rtl8180_wx_get_range()
252 /* range->min_nwid; */ /* Minimal NWID we are able to set */ rtl8180_wx_get_range()
254 /* range->max_nwid; */ /* Maximal NWID we are able to set */ rtl8180_wx_get_range()
257 /* range->old_num_channels; */ rtl8180_wx_get_range()
258 /* range->old_num_frequency; */ rtl8180_wx_get_range()
259 /* range->old_freq[6]; */ /* Filler to keep "version" at the same offset */ rtl8180_wx_get_range()
261 range->sensitivity = priv->max_sens; /* signal level threshold range */ rtl8180_wx_get_range()
263 range->max_qual.qual = 100; rtl8180_wx_get_range()
265 range->max_qual.level = 0; rtl8180_wx_get_range()
266 range->max_qual.noise = 0x100 - 98; rtl8180_wx_get_range()
267 range->max_qual.updated = 7; /* Updated all three */ rtl8180_wx_get_range()
269 range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */ rtl8180_wx_get_range()
271 range->avg_qual.level = 0x100 - 78; rtl8180_wx_get_range()
272 range->avg_qual.noise = 0; rtl8180_wx_get_range()
273 range->avg_qual.updated = 7; /* Updated all three */ rtl8180_wx_get_range()
275 range->num_bitrates = RATE_COUNT; rtl8180_wx_get_range()
278 range->bitrate[i] = rtl8180_rates[i]; rtl8180_wx_get_range()
280 range->min_frag = MIN_FRAG_THRESHOLD; rtl8180_wx_get_range()
281 range->max_frag = MAX_FRAG_THRESHOLD; rtl8180_wx_get_range()
283 range->min_pmp = 0; rtl8180_wx_get_range()
284 range->max_pmp = 5000000; rtl8180_wx_get_range()
285 range->min_pmt = 0; rtl8180_wx_get_range()
286 range->max_pmt = 65535*1000; rtl8180_wx_get_range()
287 range->pmp_flags = IW_POWER_PERIOD; rtl8180_wx_get_range()
288 range->pmt_flags = IW_POWER_TIMEOUT; rtl8180_wx_get_range()
289 range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R; rtl8180_wx_get_range()
291 range->we_version_compiled = WIRELESS_EXT; rtl8180_wx_get_range()
292 range->we_version_source = 16; rtl8180_wx_get_range()
294 /* range->retry_capa; */ /* What retry options are supported */ rtl8180_wx_get_range()
295 /* range->retry_flags; */ /* How to decode max/min retry limit */ rtl8180_wx_get_range()
296 /* range->r_time_flags; */ /* How to decode max/min retry life */ rtl8180_wx_get_range()
297 /* range->min_retry; */ /* Minimal number of retries */ rtl8180_wx_get_range()
298 /* range->max_retry; */ /* Maximal number of retries */ rtl8180_wx_get_range()
299 /* range->min_r_time; */ /* Minimal retry lifetime */ rtl8180_wx_get_range()
300 /* range->max_r_time; */ /* Maximal retry lifetime */ rtl8180_wx_get_range()
307 range->freq[val].i = i + 1; rtl8180_wx_get_range()
308 range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000; rtl8180_wx_get_range()
309 range->freq[val].e = 1; rtl8180_wx_get_range()
319 range->num_frequency = val; rtl8180_wx_get_range()
320 range->num_channels = val; rtl8180_wx_get_range()
321 range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2| rtl8180_wx_get_range()
/linux-4.4.14/fs/xfs/
H A Dxfs_discard.c91 * use daddr format for all range/len calculations as that is xfs_trim_extents()
92 * the format the range/len variables are supplied in by xfs_trim_extents()
107 * If the extent is entirely outside of the range we are xfs_trim_extents()
117 * If any blocks in the range are still busy, skip the xfs_trim_extents()
146 * trim a range of the filesystem.
151 * is a linear address range. Hence we need to use DADDR based conversions and
161 struct fstrim_range range; xfs_ioc_trim() local
171 if (copy_from_user(&range, urange, sizeof(range))) xfs_ioc_trim()
181 if (range.start >= XFS_FSB_TO_B(mp, mp->m_sb.sb_dblocks) || xfs_ioc_trim()
182 range.minlen > XFS_FSB_TO_B(mp, XFS_ALLOC_AG_MAX_USABLE(mp)) || xfs_ioc_trim()
183 range.len < mp->m_sb.sb_blocksize) xfs_ioc_trim()
186 start = BTOBB(range.start); xfs_ioc_trim()
187 end = start + BTOBBT(range.len) - 1; xfs_ioc_trim()
188 minlen = BTOBB(max_t(u64, granularity, range.minlen)); xfs_ioc_trim()
206 range.len = XFS_FSB_TO_B(mp, blocks_trimmed); xfs_ioc_trim()
207 if (copy_to_user(urange, &range, sizeof(range))) xfs_ioc_trim()
/linux-4.4.14/fs/ocfs2/
H A Dmove_extents.c51 struct ocfs2_move_extents *range; member in struct:ocfs2_move_extents_context
312 context->range->me_flags &= ~OCFS2_MOVE_EXT_FL_COMPLETE; ocfs2_defrag_extent()
402 * 'vict_blkno' was out of the valid range. ocfs2_find_victim_alloc_group()
468 struct ocfs2_move_extents *range) ocfs2_validate_and_adjust_move_goal()
481 range->me_goal = ocfs2_block_to_cluster_start(inode->i_sb, ocfs2_validate_and_adjust_move_goal()
482 range->me_goal); ocfs2_validate_and_adjust_move_goal()
487 ret = ocfs2_find_victim_alloc_group(inode, range->me_goal, ocfs2_validate_and_adjust_move_goal()
500 if (range->me_goal == le64_to_cpu(bg->bg_blkno)) ocfs2_validate_and_adjust_move_goal()
501 range->me_goal += c_to_b; ocfs2_validate_and_adjust_move_goal()
507 range->me_len) { ocfs2_validate_and_adjust_move_goal()
513 * moving operation for each extent range. ocfs2_validate_and_adjust_move_goal()
516 range->me_goal); ocfs2_validate_and_adjust_move_goal()
578 context->range->me_threshold); ocfs2_move_extent()
770 struct ocfs2_move_extents *range = context->range; __ocfs2_move_extents_range() local
773 if ((i_size_read(inode) == 0) || (range->me_len == 0)) __ocfs2_move_extents_range()
797 move_start = ocfs2_clusters_for_bytes(osb->sb, range->me_start); __ocfs2_move_extents_range()
798 len_to_move = (range->me_start + range->me_len) >> __ocfs2_move_extents_range()
806 defrag_thresh = range->me_threshold >> osb->s_clustersize_bits; __ocfs2_move_extents_range()
811 range->me_goal); __ocfs2_move_extents_range()
816 (unsigned long long)range->me_start, __ocfs2_move_extents_range()
817 (unsigned long long)range->me_len, __ocfs2_move_extents_range()
882 range->me_flags |= OCFS2_MOVE_EXT_FL_COMPLETE; __ocfs2_move_extents_range()
885 range->me_moved_len = ocfs2_clusters_to_bytes(osb->sb, __ocfs2_move_extents_range()
887 range->me_new_offset = ocfs2_clusters_to_bytes(osb->sb, __ocfs2_move_extents_range()
982 struct ocfs2_move_extents range; ocfs2_ioctl_move_extents() local
1012 if (copy_from_user(&range, argp, sizeof(range))) { ocfs2_ioctl_move_extents()
1017 if (range.me_start > i_size_read(inode)) { ocfs2_ioctl_move_extents()
1022 if (range.me_start + range.me_len > i_size_read(inode)) ocfs2_ioctl_move_extents()
1023 range.me_len = i_size_read(inode) - range.me_start; ocfs2_ioctl_move_extents()
1025 context->range = &range; ocfs2_ioctl_move_extents()
1027 if (range.me_flags & OCFS2_MOVE_EXT_FL_AUTO_DEFRAG) { ocfs2_ioctl_move_extents()
1034 if (!range.me_threshold) ocfs2_ioctl_move_extents()
1035 range.me_threshold = 1024 * 1024; ocfs2_ioctl_move_extents()
1037 if (range.me_threshold > i_size_read(inode)) ocfs2_ioctl_move_extents()
1038 range.me_threshold = i_size_read(inode); ocfs2_ioctl_move_extents()
1040 if (range.me_flags & OCFS2_MOVE_EXT_FL_PART_DEFRAG) ocfs2_ioctl_move_extents()
1050 status = ocfs2_validate_and_adjust_move_goal(inode, &range); ocfs2_ioctl_move_extents()
1064 if (copy_to_user(argp, &range, sizeof(range))) ocfs2_ioctl_move_extents()
467 ocfs2_validate_and_adjust_move_goal(struct inode *inode, struct ocfs2_move_extents *range) ocfs2_validate_and_adjust_move_goal() argument
/linux-4.4.14/tools/vm/
H A Dslabinfo-gnuplot.sh45 echo "-r %d,%d - use data samples from a given range"
60 local range="every ::$xmin"
70 range="$range::$xmax"
101 plot "$file" $range u 2$xtic title 'SIZE' with boxes,\
102 '' $range u 3 title 'LOSS' with boxes
113 local range="every ::$xmin"
117 range="$range::$xmax"
124 gnuplot_cmd="$gnuplot_cmd '$i' $range using 1 title\
126 gnuplot_cmd="$gnuplot_cmd '' $range using 2 title \
/linux-4.4.14/drivers/acpi/acpica/
H A Dutaddress.c3 * Module Name: utaddress - op_region address range check
62 * DESCRIPTION: Add the Operation Region address range to the global list.
110 "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n", acpi_ut_add_address_range()
163 "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n", acpi_ut_remove_address_range()
188 * length - Length of address range
194 * DESCRIPTION: Check if the input address range overlaps any of the
226 * address range. There are four cases to consider: acpi_ut_check_address_range()
229 * address range acpi_ut_check_address_range()
230 * 2) Input address/length overlaps range at the range start acpi_ut_check_address_range()
231 * 3) Input address/length overlaps range at the range end acpi_ut_check_address_range()
232 * 4) Input address/length completely encompasses the range acpi_ut_check_address_range()
237 /* Found an address range overlap */ acpi_ut_check_address_range()
246 "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)", acpi_ut_check_address_range()
273 * DESCRIPTION: Delete all global address range lists (called during
284 /* Delete all elements in all address range lists */ acpi_ut_delete_address_lists()
H A Dhwvalid.c169 * Check if the requested address range will write to a reserved acpi_hw_validate_io_request()
172 * 1) Address range is contained completely in the port address range acpi_hw_validate_io_request()
173 * 2) Address range overlaps port range at the port range start acpi_hw_validate_io_request()
174 * 3) Address range overlaps port range at the port range end acpi_hw_validate_io_request()
175 * 4) Address range completely encompasses the port range acpi_hw_validate_io_request()
194 /* Finished if address range ends before the end of this port */ acpi_hw_validate_io_request()
/linux-4.4.14/drivers/firmware/efi/
H A Dfake_mem.c9 * specific memory range by updating original (firmware provided) EFI
39 struct range range; member in struct:fake_mem
50 if (m1->range.start < m2->range.start) cmp_fake_mem()
52 if (m1->range.start > m2->range.start) cmp_fake_mem()
77 /* modifying range */ efi_fake_memmap()
78 m_start = fake_mems[i].range.start; efi_fake_memmap()
79 m_end = fake_mems[i].range.end; efi_fake_memmap()
122 /* modifying range */ efi_fake_memmap()
123 m_start = fake_mems[i].range.start; efi_fake_memmap()
124 m_end = fake_mems[i].range.end; efi_fake_memmap()
218 fake_mems[nr_fake_mem].range.start = start; setup_fake_mem()
219 fake_mems[nr_fake_mem].range.end = start + mem_size - 1; setup_fake_mem()
232 fake_mems[i].attribute, fake_mems[i].range.start, setup_fake_mem()
233 fake_mems[i].range.end); setup_fake_mem()
/linux-4.4.14/arch/sparc/lib/
H A Diomap.c8 /* Create a virtual mapping cookie for an IO port range */ ioport_map()
/linux-4.4.14/drivers/clk/at91/
H A Dclk-peripheral.c45 struct clk_range range; member in struct:clk_sam9x5_peripheral
144 if (periph->range.max) { clk_sam9x5_peripheral_autodiv()
151 if (parent_rate >> shift <= periph->range.max) clk_sam9x5_peripheral_autodiv()
249 if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) clk_sam9x5_peripheral_round_rate()
252 if (periph->range.max) { clk_sam9x5_peripheral_round_rate()
255 if (cur_rate <= periph->range.max) clk_sam9x5_peripheral_round_rate()
290 if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) { clk_sam9x5_peripheral_set_rate()
297 if (periph->range.max && rate > periph->range.max) clk_sam9x5_peripheral_set_rate()
323 const struct clk_range *range) at91_clk_register_sam9x5_peripheral()
347 periph->range = *range; at91_clk_register_sam9x5_peripheral()
390 struct clk_range range = CLK_RANGE(0, 0); for_each_child_of_node() local
393 "atmel,clk-output-range", for_each_child_of_node()
394 &range); for_each_child_of_node()
398 id, &range); for_each_child_of_node()
321 at91_clk_register_sam9x5_peripheral(struct at91_pmc *pmc, const char *name, const char *parent_name, u32 id, const struct clk_range *range) at91_clk_register_sam9x5_peripheral() argument
H A Dclk-generated.c32 struct clk_range range; member in struct:clk_generated
120 (gck->range.max && min_rate > gck->range.max)) clk_generated_determine_rate()
184 if (gck->range.max && rate > gck->range.max) clk_generated_set_rate()
234 u8 id, const struct clk_range *range) at91_clk_register_generated()
253 gck->range = *range; at91_clk_register_generated()
274 struct clk_range range = CLK_RANGE(0, 0); of_sama5d2_clk_generated_setup() local
296 of_at91_get_clk_range(gcknp, "atmel,clk-output-range", for_each_child_of_node()
297 &range); for_each_child_of_node()
300 num_parents, id, &range); for_each_child_of_node()
232 at91_clk_register_generated(struct at91_pmc *pmc, const char *name, const char **parent_names, u8 num_parents, u8 id, const struct clk_range *range) at91_clk_register_generated() argument
/linux-4.4.14/include/uapi/linux/netfilter_ipv6/
H A Dip6t_mh.h8 __u8 types[2]; /* MH type range */
H A Dip6t_frag.h7 __u32 ids[2]; /* Identification range */
/linux-4.4.14/arch/frv/lib/
H A Dcache.S20 # Write back a range of dcache
40 # Invalidate a range of dcache and icache
61 # Invalidate a range of icache
81 # Write back and invalidate a range of dcache and icache
H A D__ashldi3.S29 # deal with a shift in the range 1<=N<=31
36 # deal with a shift in the range 32<=N<=63
H A D__ashrdi3.S30 # deal with a shift in the range 1<=N<=31
37 # deal with a shift in the range 32<=N<=63
H A D__lshrdi3.S29 # deal with a shift in the range 1<=N<=31
36 # deal with a shift in the range 32<=N<=63
/linux-4.4.14/tools/perf/util/
H A Dctype.c30 /* Nothing in the 128.. range */
H A Dsigchain.c16 die("BUG: signal out of range: %d", sig); check_signum()
/linux-4.4.14/fs/cifs/
H A Dcifs_uniupr.h61 /* Upper case range - Greek */
69 /* Upper case range - Cyrillic */
76 /* Upper case range - Extended cyrillic */
84 /* Upper case range - Extended latin and greek */
120 /* Upper case range - Wide latin */
178 /* Lower case range - Greek */
185 /* Lower case range - Cyrillic */
192 /* Lower case range - Extended cyrillic */
200 /* Lower case range - Extended latin and greek */
236 /* Lower case range - Wide latin */
H A Dcifs_unicode.h43 * Windows maps these to the user defined 16 bit Unicode range since they are
346 rp = CifsUniUpperRange; /* Use range tables */ UniToupper()
348 if (uc < rp->start) /* Before start of range */ UniToupper()
350 if (uc <= rp->end) /* In range */ UniToupper()
352 rp++; /* Try next range */ UniToupper()
355 return uc; /* Past last range */ UniToupper()
388 rp = CifsUniLowerRange; /* Use range tables */ UniTolower()
390 if (uc < rp->start) /* Before start of range */ UniTolower()
392 if (uc <= rp->end) /* In range */ UniTolower()
394 rp++; /* Try next range */ UniTolower()
397 return uc; /* Past last range */ UniTolower()
/linux-4.4.14/arch/mn10300/mm/
H A Dcache-smp-flush.c34 * Flush a range of addresses in the data cache on all CPUs covering
50 * mn10300_dcache_flush_range - Globally flush range of data cache
54 * Flush a range of addresses in the data cache on all CPUs, between start and
68 * mn10300_dcache_flush_range2 - Globally flush range of data cache
72 * Flush a range of addresses in the data cache on all CPUs, between start and
105 * Flush and invalidate a range of addresses in the data cache on all CPUs
121 * mn10300_dcache_flush_inv_range - Globally flush and invalidate range of data
126 * Flush and invalidate a range of addresses in the data cache on all CPUs,
140 * mn10300_dcache_flush_inv_range2 - Globally flush and invalidate range of data
145 * Flush and invalidate a range of addresses in the data cache on all CPUs,
H A Dcache-smp-inv.c34 * Invalidate a range of addresses in the instruction cache on all CPUs
50 * mn10300_icache_inv_range - Globally invalidate range of instruction cache
54 * Invalidate a range of addresses in the instruction cache on all CPUs,
68 * mn10300_icache_inv_range2 - Globally invalidate range of instruction cache
72 * Invalidate a range of addresses in the instruction cache on all CPUs,
104 * Invalidate a range of addresses in the data cache on all CPUs covering the
120 * mn10300_dcache_inv_range - Globally invalidate range of data cache
124 * Invalidate a range of addresses in the data cache on all CPUs, between start
138 * mn10300_dcache_inv_range2 - Globally invalidate range of data cache
142 * Invalidate a range of addresses in the data cache on all CPUs, between start
/linux-4.4.14/arch/x86/mm/
H A Dkasan_init_64.c13 extern struct range pfn_mapped[E820_X_MAX];
15 static int __init map_range(struct range *range) map_range() argument
20 start = (unsigned long)kasan_mem_to_shadow(pfn_to_kaddr(range->start)); map_range()
21 end = (unsigned long)kasan_mem_to_shadow(pfn_to_kaddr(range->end)); map_range()
H A Dinit.c195 panic("run out of range for init_memory_mapping\n"); save_mr()
206 * adjust the page_size_mask for small range to go with
297 /* big page (2M) range */ split_mem_range()
314 /* big page (1G) range */ split_mem_range()
364 struct range pfn_mapped[E820_X_MAX];
424 * that cannot be marked as UC by fixed/variable range MTRRs.
428 * init_mem_mapping() calls init_range_memory_mapping() with big range.
429 * That range would have hole in the middle or ends, and only ram parts
467 * to map 1G range with PTE. Hence we use one less than the get_new_step_size()
481 * @map_start: start address of the target memory range
482 * @map_end: end address of the target memory range
484 * This function will setup direct mapping for memory range
497 /* xen has big range in reserved near end of ram, skip it at first.*/ memory_map_top_down()
534 * @map_start: start address of the target memory range
535 * @map_end: end address of the target memory range
537 * This function will setup direct mapping for memory range
589 /* the ISA range is always mapped regardless of memory holes */ init_mem_mapping()
/linux-4.4.14/drivers/firmware/
H A Dmemmap.c40 u64 start; /* start of the memory range */
41 u64 end; /* end of the memory range (incl.) */
42 const char *type; /* type of the memory range */
139 * @start: Start of the memory range.
140 * @end: End of the memory range (exclusive).
141 * @type: Type of the memory range.
215 * @start: Start of the memory range.
216 * @end: End of the memory range (exclusive).
217 * @type: Type of the memory range.
220 * This function is to find the memmap entey of a given memory range in a
243 * @start: Start of the memory range.
244 * @end: End of the memory range (exclusive).
245 * @type: Type of the memory range.
247 * This function is to find the memmap entey of a given memory range.
261 * @start: Start of the memory range.
262 * @end: End of the memory range (exclusive).
263 * @type: Type of the memory range.
280 * @start: Start of the memory range.
281 * @end: End of the memory range (exclusive)
282 * @type: Type of the memory range.
321 * @start: Start of the memory range.
322 * @end: End of the memory range.
323 * @type: Type of the memory range.
345 * @start: Start of the memory range.
346 * @end: End of the memory range.
347 * @type: Type of the memory range.
/linux-4.4.14/drivers/clk/versatile/
H A Dclk-vexpress-osc.c76 u32 range[2]; vexpress_osc_probe() local
86 if (of_property_read_u32_array(pdev->dev.of_node, "freq-range", range, vexpress_osc_probe()
87 ARRAY_SIZE(range)) == 0) { vexpress_osc_probe()
88 osc->rate_min = range[0]; vexpress_osc_probe()
89 osc->rate_max = range[1]; vexpress_osc_probe()
/linux-4.4.14/drivers/pinctrl/sh-pfc/
H A Dcore.c120 const struct sh_pfc_pin_range *range = &pfc->ranges[i]; sh_pfc_get_pin_index() local
122 if (pin <= range->end) sh_pfc_get_pin_index()
123 return pin >= range->start sh_pfc_get_pin_index()
124 ? offset + pin - range->start : -1; sh_pfc_get_pin_index()
126 offset += range->end - range->start + 1; sh_pfc_get_pin_index()
297 const struct pinmux_range *range; sh_pfc_config_mux() local
303 range = NULL; sh_pfc_config_mux()
307 range = &pfc->info->output; sh_pfc_config_mux()
311 range = &pfc->info->input; sh_pfc_config_mux()
349 in_range = sh_pfc_enum_in_range(enum_id, range); sh_pfc_config_mux()
356 if (in_range && enum_id == range->force) sh_pfc_config_mux()
377 struct sh_pfc_pin_range *range; sh_pfc_init_ranges() local
383 * in its pin arrays yet. Consider the pin numbers range as sh_pfc_init_ranges()
384 * continuous and allocate a single range. sh_pfc_init_ranges()
414 range = pfc->ranges; sh_pfc_init_ranges()
415 range->start = pfc->info->pins[0].pin; sh_pfc_init_ranges()
421 range->end = pfc->info->pins[i-1].pin; sh_pfc_init_ranges()
423 pfc->nr_gpio_pins = range->end + 1; sh_pfc_init_ranges()
425 range++; sh_pfc_init_ranges()
426 range->start = pfc->info->pins[i].pin; sh_pfc_init_ranges()
429 range->end = pfc->info->pins[i-1].pin; sh_pfc_init_ranges()
431 pfc->nr_gpio_pins = range->end + 1; sh_pfc_init_ranges()
/linux-4.4.14/arch/alpha/include/uapi/asm/
H A Dgentrap.h25 #define GEN_RANGERR -17 /* range error */
29 #define GEN_SUBRNG3 -21 /* these report range errors for */
/linux-4.4.14/net/bridge/netfilter/
H A Debt_vlan.c100 /* Check for bitmask range ebt_vlan_mt_check()
108 /* Check for inversion flags range */ ebt_vlan_mt_check()
122 if (!!info->id) { /* if id!=0 => check vid range */ ebt_vlan_mt_check()
124 pr_debug("id %d is out of range (1-4096)\n", ebt_vlan_mt_check()
134 /* Else, id=0 (null VLAN ID) => user_priority range (any?) */ ebt_vlan_mt_check()
139 pr_debug("prio %d is out of range (0-7)\n", ebt_vlan_mt_check()
144 /* Check for encapsulated proto range - it is possible to be ebt_vlan_mt_check()
145 * any value for u_short range. ebt_vlan_mt_check()
/linux-4.4.14/arch/sparc/kernel/
H A Dof_device_common.h16 int of_bus_default_map(u32 *addr, const u32 *range, int na, int ns, int pna);
31 int (*map)(u32 *addr, const u32 *range,
H A Dof_device_common.c92 /* Make sure the least significant 64-bits are in-range. Even
111 int of_bus_default_map(u32 *addr, const u32 *range, int na, int ns, int pna) of_bus_default_map() argument
121 if (of_out_of_range(addr, range, range + na + pna, na, ns)) of_bus_default_map()
124 /* Start with the parent range base. */ of_bus_default_map()
125 memcpy(result, range + na, pna * 4); of_bus_default_map()
131 range[na - 1 - i]); of_bus_default_map()
H A Dof_device_32.c48 static int of_bus_pci_map(u32 *addr, const u32 *range, of_bus_pci_map() argument
55 if ((addr[0] ^ range[0]) & 0x03000000) of_bus_pci_map()
58 if (of_out_of_range(addr + 1, range + 1, range + na + pna, of_bus_pci_map()
62 /* Start with the parent range base. */ of_bus_pci_map()
63 memcpy(result, range + na, pna * 4); of_bus_pci_map()
69 range[na - 1 - i]); of_bus_pci_map()
120 static int of_bus_ambapp_map(u32 *addr, const u32 *range, of_bus_ambapp_map() argument
123 return of_bus_default_map(addr, range, na, ns, pna); of_bus_ambapp_map()
/linux-4.4.14/arch/mn10300/lib/
H A D__ashldi3.S32 # the count is in the range 1-31
44 # the count is in the range 32-63
H A D__lshrdi3.S33 # the count is in the range 1-31
45 # the count is in the range 32-63
H A D__ashrdi3.S32 # the count is in the range 1-31
44 # the count is in the range 32-63
/linux-4.4.14/arch/ia64/sn/kernel/sn2/
H A Dcache.c14 * sn_flush_all_caches - flush a range of address from all caches (incl. L4)
18 * Flush a range of addresses from all caches including L4.
/linux-4.4.14/arch/avr32/include/asm/
H A Dtlbflush.h20 * - flush_tlb_range(vma, start, end) flushes a range of pages
21 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
/linux-4.4.14/arch/x86/kvm/
H A Dmtrr.c143 * - range, a range is covered in one memory cache type.
302 static void var_mtrr_range(struct kvm_mtrr_range *range, u64 *start, u64 *end) var_mtrr_range() argument
306 *start = range->base & PAGE_MASK; var_mtrr_range()
308 mask = range->mask & PAGE_MASK; var_mtrr_range()
337 /* variable range MTRRs. */ update_mtrr()
345 static bool var_mtrr_range_is_valid(struct kvm_mtrr_range *range) var_mtrr_range_is_valid() argument
347 return (range->mask & (1 << 11)) != 0; var_mtrr_range_is_valid()
473 struct kvm_mtrr_range *range; member in struct:mtrr_iter::__anon3191::__anon3193
501 struct kvm_mtrr_range *range) match_var_range()
505 var_mtrr_range(range, &start, &end); match_var_range()
507 iter->range = range; match_var_range()
528 list_for_each_entry_continue(iter->range, &mtrr_state->head, node) __mtrr_lookup_var_next()
529 if (match_var_range(iter, iter->range)) __mtrr_lookup_var_next()
532 iter->range = NULL; __mtrr_lookup_var_next()
542 iter->range = list_prepare_entry(iter->range, &mtrr_state->head, node); mtrr_lookup_var_start()
552 iter->range = NULL; mtrr_lookup_fixed_next()
592 iter->range = NULL; mtrr_lookup_init()
604 if (iter->range) { mtrr_lookup_okay()
605 iter->mem_type = iter->range->base & 0xff; mtrr_lookup_okay()
500 match_var_range(struct mtrr_iter *iter, struct kvm_mtrr_range *range) match_var_range() argument
/linux-4.4.14/arch/powerpc/kernel/
H A Disa-bridge.c65 const struct isa_range *range; pci_process_ISA_OF_ranges() local
71 range = of_get_property(isa_node, "ranges", &rlen); pci_process_ISA_OF_ranges()
72 if (range == NULL || (rlen < sizeof(struct isa_range))) pci_process_ISA_OF_ranges()
81 * cell 5: the size of the range pci_process_ISA_OF_ranges()
83 if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) { pci_process_ISA_OF_ranges()
84 range++; pci_process_ISA_OF_ranges()
89 if ((range->isa_addr.a_hi & ISA_SPACE_MASK) != ISA_SPACE_IO) pci_process_ISA_OF_ranges()
92 isa_addr = range->isa_addr.a_lo; pci_process_ISA_OF_ranges()
93 pci_addr = (unsigned long) range->pci_addr.a_mid << 32 | pci_process_ISA_OF_ranges()
94 range->pci_addr.a_lo; pci_process_ISA_OF_ranges()
107 size = PAGE_ALIGN(range->size); pci_process_ISA_OF_ranges()
116 printk(KERN_ERR "no ISA IO ranges or unexpected isa range, " pci_process_ISA_OF_ranges()
/linux-4.4.14/arch/metag/include/asm/
H A Dtlbflush.h16 * - flush_tlb_range(mm, start, end) flushes a range of pages
17 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
18 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
/linux-4.4.14/arch/mips/pci/
H A Dpci.c128 struct of_pci_range range; pci_load_of_ranges() local
137 for_each_of_pci_range(&parser, &range) { pci_load_of_ranges()
140 switch (range.flags & IORESOURCE_TYPE_BITS) { pci_load_of_ranges()
143 range.cpu_addr, pci_load_of_ranges()
144 range.cpu_addr + range.size - 1); pci_load_of_ranges()
146 (unsigned long)ioremap(range.cpu_addr, pci_load_of_ranges()
147 range.size); pci_load_of_ranges()
152 range.cpu_addr, pci_load_of_ranges()
153 range.cpu_addr + range.size - 1); pci_load_of_ranges()
158 of_pci_range_to_resource(&range, node, res); pci_load_of_ranges()
/linux-4.4.14/include/linux/mfd/
H A Dhtc-egpio.h15 * struct htc_egpio_chip - descriptor to create gpio_chip for register range
17 * @gpio_base: gpio number of first pin in this register range
18 * @num_gpios: number of gpios in this register range, max BITS_PER_LONG
/linux-4.4.14/include/linux/mfd/pcf50633/
H A Dbacklight.h23 * Valid range 0-63.
30 * Valid range 0-63. Can be changed later with pcf50633_bl_set_brightness_limit.
37 * Valid range 0-255
/linux-4.4.14/net/wireless/
H A Dwext-compat.c145 struct iw_range *range = (struct iw_range *) extra; cfg80211_wext_giwrange() local
153 memset(range, 0, sizeof(struct iw_range)); cfg80211_wext_giwrange()
155 range->we_version_compiled = WIRELESS_EXT; cfg80211_wext_giwrange()
156 range->we_version_source = 21; cfg80211_wext_giwrange()
157 range->retry_capa = IW_RETRY_LIMIT; cfg80211_wext_giwrange()
158 range->retry_flags = IW_RETRY_LIMIT; cfg80211_wext_giwrange()
159 range->min_retry = 0; cfg80211_wext_giwrange()
160 range->max_retry = 255; cfg80211_wext_giwrange()
161 range->min_rts = 0; cfg80211_wext_giwrange()
162 range->max_rts = 2347; cfg80211_wext_giwrange()
163 range->min_frag = 256; cfg80211_wext_giwrange()
164 range->max_frag = 2346; cfg80211_wext_giwrange()
166 range->max_encoding_tokens = 4; cfg80211_wext_giwrange()
168 range->max_qual.updated = IW_QUAL_NOISE_INVALID; cfg80211_wext_giwrange()
174 range->max_qual.level = (u8)-110; cfg80211_wext_giwrange()
175 range->max_qual.qual = 70; cfg80211_wext_giwrange()
176 range->avg_qual.qual = 35; cfg80211_wext_giwrange()
177 range->max_qual.updated |= IW_QUAL_DBM; cfg80211_wext_giwrange()
178 range->max_qual.updated |= IW_QUAL_QUAL_UPDATED; cfg80211_wext_giwrange()
179 range->max_qual.updated |= IW_QUAL_LEVEL_UPDATED; cfg80211_wext_giwrange()
182 range->max_qual.level = 100; cfg80211_wext_giwrange()
183 range->max_qual.qual = 100; cfg80211_wext_giwrange()
184 range->avg_qual.qual = 50; cfg80211_wext_giwrange()
185 range->max_qual.updated |= IW_QUAL_QUAL_UPDATED; cfg80211_wext_giwrange()
186 range->max_qual.updated |= IW_QUAL_LEVEL_UPDATED; cfg80211_wext_giwrange()
190 range->avg_qual.level = range->max_qual.level / 2; cfg80211_wext_giwrange()
191 range->avg_qual.noise = range->max_qual.noise / 2; cfg80211_wext_giwrange()
192 range->avg_qual.updated = range->max_qual.updated; cfg80211_wext_giwrange()
197 range->enc_capa |= (IW_ENC_CAPA_CIPHER_TKIP | cfg80211_wext_giwrange()
202 range->enc_capa |= (IW_ENC_CAPA_CIPHER_CCMP | cfg80211_wext_giwrange()
207 range->encoding_size[range->num_encoding_sizes++] = cfg80211_wext_giwrange()
212 range->encoding_size[range->num_encoding_sizes++] = cfg80211_wext_giwrange()
230 range->freq[c].i = cfg80211_wext_giwrange()
233 range->freq[c].m = chan->center_freq; cfg80211_wext_giwrange()
234 range->freq[c].e = 6; cfg80211_wext_giwrange()
239 range->num_channels = c; cfg80211_wext_giwrange()
240 range->num_frequency = c; cfg80211_wext_giwrange()
242 IW_EVENT_CAPA_SET_KERNEL(range->event_capa); cfg80211_wext_giwrange()
243 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); cfg80211_wext_giwrange()
244 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); cfg80211_wext_giwrange()
247 range->scan_capa |= IW_SCAN_CAPA_ESSID; cfg80211_wext_giwrange()
/linux-4.4.14/drivers/staging/fsl-mc/include/
H A Dmc-private.h43 * range
44 * @mc_region_type: Type of MC region for the range being translated
45 * @start_mc_offset: Start MC offset of the range being translated
46 * @end_mc_offset: MC offset of the first byte after the range (last MC
47 * offset of the range is end_mc_offset - 1)
/linux-4.4.14/drivers/media/i2c/
H A Daptina-pll.c61 * range. Compute the factor by which we should multiply them given the aptina_pll_calculate()
88 * 1. p1 is in the [p1_min, p1_max] range given by the limits and is aptina_pll_calculate()
90 * 2. mf is in the [mf_min, mf_max] range computed above aptina_pll_calculate()
95 * [int_clock_min, int_clock_max] range given by the limits aptina_pll_calculate()
97 * [out_clock_min, out_clock_max] range given by the limits aptina_pll_calculate()
104 * Instead of iterating over all mf values in the [mf_min, mf_max] range aptina_pll_calculate()
113 * Furthermore, conditions (4) and (5) only restrict the range of aptina_pll_calculate()
130 * We can thus iterate over the restricted p1 range defined by the aptina_pll_calculate()
131 * combination of (1) and (7), and then compute the restricted mf range aptina_pll_calculate()
133 * range is not empty, any value in the mf range is acceptable. We thus aptina_pll_calculate()
/linux-4.4.14/fs/
H A Duserfaultfd.c76 struct userfaultfd_wake_range *range = key; userfaultfd_wake_function() local
84 start = range->start; userfaultfd_wake_function()
85 len = range->len; userfaultfd_wake_function()
432 struct userfaultfd_wake_range range = { .len = 0, }; userfaultfd_release() local
476 __wake_up_locked_key(&ctx->fault_pending_wqh, TASK_NORMAL, &range); userfaultfd_release()
477 __wake_up_locked_key(&ctx->fault_wqh, TASK_NORMAL, &range); userfaultfd_release()
649 struct userfaultfd_wake_range *range) __wake_userfault()
653 start = range->start; __wake_userfault()
654 end = range->start + range->len; __wake_userfault()
657 /* wake all in the range and autoremove */ __wake_userfault()
660 range); __wake_userfault()
662 __wake_up_locked_key(&ctx->fault_wqh, TASK_NORMAL, range); __wake_userfault()
667 struct userfaultfd_wake_range *range) wake_userfault()
694 __wake_userfault(ctx, range); wake_userfault()
755 ret = validate_range(mm, uffdio_register.range.start, userfaultfd_register()
756 uffdio_register.range.len); userfaultfd_register()
760 start = uffdio_register.range.start; userfaultfd_register()
761 end = start + uffdio_register.range.len; userfaultfd_register()
770 /* check that there's at least one vma in the range */ userfaultfd_register()
871 * succeed on this range. userfaultfd_register()
912 /* check that there's at least one vma in the range */ userfaultfd_unregister()
1014 struct userfaultfd_wake_range range; userfaultfd_wake() local
1025 range.start = uffdio_wake.start; userfaultfd_wake()
1026 range.len = uffdio_wake.len; userfaultfd_wake()
1032 VM_BUG_ON(!range.len); userfaultfd_wake()
1034 wake_userfault(ctx, &range); userfaultfd_wake()
1047 struct userfaultfd_wake_range range; userfaultfd_copy() local
1063 * in the userland range. userfaultfd_copy()
1079 range.len = ret; userfaultfd_copy()
1081 range.start = uffdio_copy.dst; userfaultfd_copy()
1082 wake_userfault(ctx, &range); userfaultfd_copy()
1084 ret = range.len == uffdio_copy.len ? 0 : -EAGAIN; userfaultfd_copy()
1095 struct userfaultfd_wake_range range; userfaultfd_zeropage() local
1105 ret = validate_range(ctx->mm, uffdio_zeropage.range.start, userfaultfd_zeropage()
1106 uffdio_zeropage.range.len); userfaultfd_zeropage()
1113 ret = mfill_zeropage(ctx->mm, uffdio_zeropage.range.start, userfaultfd_zeropage()
1114 uffdio_zeropage.range.len); userfaultfd_zeropage()
1121 range.len = ret; userfaultfd_zeropage()
1123 range.start = uffdio_zeropage.range.start; userfaultfd_zeropage()
1124 wake_userfault(ctx, &range); userfaultfd_zeropage()
1126 ret = range.len == uffdio_zeropage.range.len ? 0 : -EAGAIN; userfaultfd_zeropage()
648 __wake_userfault(struct userfaultfd_ctx *ctx, struct userfaultfd_wake_range *range) __wake_userfault() argument
666 wake_userfault(struct userfaultfd_ctx *ctx, struct userfaultfd_wake_range *range) wake_userfault() argument
H A Dsync.c173 * vfs_fsync_range - helper to sync a range of data & metadata to disk
175 * @start: offset in bytes of the beginning of data range to sync
176 * @end: offset in bytes of the end of data range (inclusive)
179 * Write back data in range @start..@end and metadata for @file to disk. If
237 * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is
242 * SYNC_FILE_RANGE_WAIT_BEFORE: wait upon writeout of all pages in the range
246 * range which are not presently under writeback. Note that this may block for
249 * SYNC_FILE_RANGE_WAIT_AFTER: wait upon writeout of all pages in the range
255 * in the range which were dirty on entry to sys_sync_file_range() are placed
258 * SYNC_FILE_RANGE_WRITE: start writeout of all dirty pages in the range which
263 * completion of writeout of all pages in the range. This will be used after an
269 * which will ensure that all pages in the range which were dirty on entry to
307 * The range starts outside a 32 bit machine's SYSCALL_DEFINE4()
H A Dchar_dev.c63 * Register a single major with a specified minor range.
68 * If major > 0 this function will attempt to reserve the passed range of
166 * register_chrdev_region() - register a range of device numbers
167 * @from: the first in the desired range of device numbers; must include
200 * alloc_chrdev_region() - register a range of char device numbers
202 * @baseminor: first of the requested range of minor numbers
206 * Allocates a range of char device numbers. The major number will be
222 * __register_chrdev() - create and register a cdev occupying a range of minors
224 * @baseminor: first of the requested range of minor numbers
226 * @name: name of this range of devices
277 * unregister_chrdev_region() - unregister a range of device numbers
278 * @from: the first in the range of numbers to unregister
281 * This function will unregister a range of @count device numbers,
301 * @baseminor: first of the range of minor numbers
303 * @name: name of this range of devices
/linux-4.4.14/arch/m68k/fpsp040/
H A Dsmovecr.S48 | check range of offset
52 cmpib #0x0a,%d0 |check range $01 - $0a
53 bles Z_VAL |if in this range, return zero
54 cmpib #0x0e,%d0 |check range $0b - $0e
55 bles SM_TBL |valid constants in this range
56 cmpib #0x2f,%d0 |check range $10 - $2f
57 bles Z_VAL |if in this range, return zero
58 cmpib #0x3f,%d0 |check range $30 - $3f
59 ble BG_TBL |valid constants in this range
78 subil #0xb,%d0 |make offset in 0 - 4 range
99 subil #0x30,%d0 |make offset in 0 - f range
/linux-4.4.14/arch/arm/mm/
H A Dcache-feroceon-l2.c31 * 'clean/invalidate L2 range by MVA' operations.
33 * Cache range operations are initiated by writing the start and
35 * cache line whose first byte address lies in the inclusive range
38 * The cache range operations stall the CPU pipeline until completion.
40 * The range operations require two successive cp15 writes, in
48 * Because range ops can't be done on physical addresses, l2_get_va()
79 * L2 is PIPT and range operations only do a TLB lookup on l2_clean_pa_range()
110 * L2 is PIPT and range operations only do a TLB lookup on l2_inv_pa_range()
134 * noninclusive, while the hardware cache range operations use
156 * since cache range operations stall the CPU pipeline calc_range_end()
163 * Cache range operations can't straddle a page boundary. calc_range_end()
H A Dtlb-v6.S26 * Invalidate a range of TLB entries in the specified address space.
30 * - vma - vma_struct describing address range
64 * Invalidate a range of kernel TLB entries
/linux-4.4.14/drivers/staging/lustre/lustre/fid/
H A Dlproc_fid.c63 struct lu_seq_range *range) ldebugfs_fid_write_common()
69 LASSERT(range != NULL); ldebugfs_fid_write_common()
80 memset(range, 0, sizeof(*range)); ldebugfs_fid_write_common()
89 tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end) ldebugfs_fid_write_common()
91 *range = tmp; ldebugfs_fid_write_common()
62 ldebugfs_fid_write_common(const char __user *buffer, size_t count, struct lu_seq_range *range) ldebugfs_fid_write_common() argument
/linux-4.4.14/arch/tile/include/asm/
H A Dcacheflush.h78 /* Flush a VA range; pads to L2 cacheline boundaries. */ __flush_buffer()
89 /* Flush & invalidate a VA range; pads to L2 cacheline boundaries. */ __finv_buffer()
102 * Flush a locally-homecached VA range and wait for the evicted
112 * Flush and invalidate a locally-homecached VA range and wait for the
122 /* Invalidate a VA range; pads to L2 cacheline boundaries. */ __inv_buffer()
133 /* Invalidate a VA range and wait for it to be complete. */ inv_buffer()
142 * Flush and invalidate a VA range that is homed remotely, waiting
/linux-4.4.14/drivers/mfd/
H A Dab8500-debugfs.c113 * @first: the first address of the range
114 * @last: the last address of the range
115 * @perm: access permissions for the range
127 * @range: the list of register ranges
132 const struct ab8500_reg_range *range; member in struct:ab8500_prcmu_ranges
165 .range = NULL,
169 .range = (struct ab8500_reg_range[]) {
186 .range = (struct ab8500_reg_range[]) {
207 .range = (struct ab8500_reg_range[]) {
224 .range = (struct ab8500_reg_range[]) {
251 .range = (struct ab8500_reg_range[]) {
264 .range = (struct ab8500_reg_range[]) {
305 .range = NULL,
309 .range = (struct ab8500_reg_range[]) {
318 .range = NULL,
322 .range = (struct ab8500_reg_range[]) {
331 .range = (struct ab8500_reg_range[]) {
372 .range = (struct ab8500_reg_range[]) {
389 .range = (struct ab8500_reg_range[]) {
398 .range = (struct ab8500_reg_range[]) {
407 .range = (struct ab8500_reg_range[]) {
416 .range = NULL,
420 .range = (struct ab8500_reg_range[]) {
429 .range = (struct ab8500_reg_range[]) {
466 .range = NULL,
470 .range = NULL,
474 .range = NULL,
478 .range = NULL,
482 .range = (struct ab8500_reg_range[]) {
494 .range = NULL,
498 .range = (struct ab8500_reg_range[]) {
523 .range = (struct ab8500_reg_range[]) {
548 .range = (struct ab8500_reg_range[]) {
565 .range = (struct ab8500_reg_range[]) {
596 .range = (struct ab8500_reg_range[]) {
613 .range = NULL,
617 .range = NULL,
621 .range = (struct ab8500_reg_range[]) {
630 .range = NULL,
634 .range = (struct ab8500_reg_range[]) {
643 .range = (struct ab8500_reg_range[]) {
684 .range = (struct ab8500_reg_range[]) {
701 .range = (struct ab8500_reg_range[]) {
710 .range = (struct ab8500_reg_range[]) {
761 .range = (struct ab8500_reg_range[]) {
774 .range = (struct ab8500_reg_range[]) {
811 .range = (struct ab8500_reg_range[]) {
824 .range = (struct ab8500_reg_range[]) {
833 .range = NULL,
837 .range = NULL,
841 .range = (struct ab8500_reg_range[]) {
853 .range = (struct ab8500_reg_range[]) {
862 .range = (struct ab8500_reg_range[]) {
891 .range = (struct ab8500_reg_range[]) {
916 .range = (struct ab8500_reg_range[]) {
937 .range = (struct ab8500_reg_range[]) {
974 .range = (struct ab8500_reg_range[]) {
991 .range = NULL
995 .range = (struct ab8500_reg_range[]) {
1016 .range = (struct ab8500_reg_range[]) {
1029 .range = NULL,
1033 .range = (struct ab8500_reg_range[]) {
1054 .range = (struct ab8500_reg_range[]) {
1099 .range = (struct ab8500_reg_range[]) {
1116 .range = (struct ab8500_reg_range[]) {
1125 .range = (struct ab8500_reg_range[]) {
1156 .range = (struct ab8500_reg_range[]) {
1173 .range = (struct ab8500_reg_range[]) {
1214 .range = (struct ab8500_reg_range[]) {
1231 .range = (struct ab8500_reg_range[]) {
1248 .range = NULL,
1252 .range = NULL,
1256 .range = (struct ab8500_reg_range[]) {
1293 for (reg = debug_ranges[bank].range[i].first; ab8500_registers_print()
1294 reg <= debug_ranges[bank].range[i].last; ab8500_registers_print()
1401 for (reg = debug_ranges[bank].range[i].first; ab8500_dump_all_banks_to_mem()
1402 reg <= debug_ranges[bank].range[i].last; ab8500_dump_all_banks_to_mem()
/linux-4.4.14/net/openvswitch/
H A Dflow_table.c54 static u16 range_n_bytes(const struct sw_flow_key_range *range) range_n_bytes() argument
56 return range->end - range->start; range_n_bytes()
62 int start = full ? 0 : mask->range.start; ovs_flow_mask_key()
63 int len = full ? sizeof *dst : range_n_bytes(&mask->range); ovs_flow_mask_key()
70 * if 'full' is false the memory outside of the 'mask->range' is left ovs_flow_mask_key()
72 * operations on 'dst' only use contents within 'mask->range'. ovs_flow_mask_key()
416 const struct sw_flow_key_range *range) flow_hash()
418 int key_start = range->start; flow_hash()
419 int key_end = range->end; flow_hash()
455 const struct sw_flow_key_range *range) flow_cmp_masked_key()
457 return cmp_key(&flow->key, key, range->start, range->end); flow_cmp_masked_key()
465 int key_end = match->range.end; ovs_flow_cmp_unmasked_key()
481 hash = flow_hash(&masked_key, &mask->range); masked_flow_lookup()
485 flow_cmp_masked_key(flow, &masked_key, &mask->range)) hlist_for_each_entry_rcu()
551 return flow_cmp_masked_key(flow, match->key, &match->range); ovs_flow_cmp()
643 const u8 *a_ = (const u8 *)&a->key + a->range.start; mask_equal()
644 const u8 *b_ = (const u8 *)&b->key + b->range.start; mask_equal()
646 return (a->range.end == b->range.end) mask_equal()
647 && (a->range.start == b->range.start) mask_equal()
648 && (memcmp(a_, b_, range_n_bytes(&a->range)) == 0); mask_equal()
678 mask->range = new->range; flow_mask_insert()
695 flow->flow_table.hash = flow_hash(&flow->key, &flow->mask->range); flow_key_insert()
415 flow_hash(const struct sw_flow_key *key, const struct sw_flow_key_range *range) flow_hash() argument
453 flow_cmp_masked_key(const struct sw_flow *flow, const struct sw_flow_key *key, const struct sw_flow_key_range *range) flow_cmp_masked_key() argument
/linux-4.4.14/arch/tile/kernel/
H A Dsetup.c396 HV_PhysAddrRange range = hv_inquire_physical(i); setup_memory() local
397 if (range.size == 0) setup_memory()
402 range.size, range.start + range.size); setup_memory()
407 if ((unsigned long)range.start) { setup_memory()
409 range.start, range.start + range.size); setup_memory()
413 if ((range.start & (HPAGE_SIZE-1)) != 0 || setup_memory()
414 (range.size & (HPAGE_SIZE-1)) != 0) { setup_memory()
415 unsigned long long start_pa = range.start; setup_memory()
416 unsigned long long orig_size = range.size; setup_memory()
417 range.start = (start_pa + HPAGE_SIZE - 1) & HPAGE_MASK; setup_memory()
418 range.size -= (range.start - start_pa); setup_memory()
419 range.size &= HPAGE_MASK; setup_memory()
422 range.start, range.start + range.size); setup_memory()
424 highbits = __pa_to_highbits(range.start); setup_memory()
427 range.start, range.start + range.size); setup_memory()
432 range.start, range.start + range.size); setup_memory()
436 if (PFN_DOWN(range.size) > maxnodemem_pfn[i]) { setup_memory()
441 range.size = PFN_PHYS(max_size); setup_memory()
447 if (physpages + PFN_DOWN(range.size) > maxmem_pfn) { setup_memory()
452 range.size = PFN_PHYS(max_size); setup_memory()
460 i, range.size, range.size + range.start); setup_memory()
464 start = range.start >> PAGE_SHIFT; setup_memory()
465 size = range.size >> PAGE_SHIFT; setup_memory()
470 (range.start + range.size)) { setup_memory()
472 range.start, range.start + range.size); setup_memory()
480 * region at the top of the range. If there isn't setup_memory()
504 node_controller[i] = range.controller; setup_memory()
1241 HV_VirtAddrRange range = hv_inquire_virtual(i); validate_va() local
1242 if (range.size == 0) validate_va()
1244 if (range.start <= MEM_USER_INTRPT && validate_va()
1245 range.start + range.size >= MEM_HV_START) validate_va()
1247 if (range.start == 0) validate_va()
1248 max_va = range.size; validate_va()
1249 BUG_ON(range.start + range.size > list_va); validate_va()
1555 panic("PCPU addr %#lx outside vmalloc range %#lx..%#lx; try increasing CONFIG_VMALLOC_RESERVE\n", pcpu_fc_populate_pte()
/linux-4.4.14/drivers/pci/host/
H A Dpci-xgene.c380 struct of_pci_range *range, u8 *ib_reg_mask) xgene_pcie_setup_ib_reg()
386 u64 cpu_addr = range->cpu_addr; xgene_pcie_setup_ib_reg()
387 u64 pci_addr = range->pci_addr; xgene_pcie_setup_ib_reg()
388 u64 size = range->size; xgene_pcie_setup_ib_reg()
394 region = xgene_pcie_select_ib_reg(ib_reg_mask, range->size); xgene_pcie_setup_ib_reg()
396 dev_warn(port->dev, "invalid pcie dma-range config\n"); xgene_pcie_setup_ib_reg()
400 if (range->flags & IORESOURCE_PREFETCH) xgene_pcie_setup_ib_reg()
441 parser->range = of_get_property(node, "dma-ranges", &rlen); pci_dma_range_parser_init()
442 if (!parser->range) pci_dma_range_parser_init()
444 parser->end = parser->range + rlen / sizeof(__be32); pci_dma_range_parser_init()
452 struct of_pci_range range; xgene_pcie_parse_map_dma_ranges() local
463 for_each_of_pci_range(&parser, &range) { xgene_pcie_parse_map_dma_ranges()
464 u64 end = range.cpu_addr + range.size - 1; xgene_pcie_parse_map_dma_ranges()
467 range.flags, range.cpu_addr, end, range.pci_addr); xgene_pcie_parse_map_dma_ranges()
468 xgene_pcie_setup_ib_reg(port, &range, &ib_reg_mask); xgene_pcie_parse_map_dma_ranges()
379 xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port, struct of_pci_range *range, u8 *ib_reg_mask) xgene_pcie_setup_ib_reg() argument
H A Dpcie-rcar.c817 struct of_pci_range *range, rcar_pcie_inbound_ranges()
820 u64 restype = range->flags; rcar_pcie_inbound_ranges()
821 u64 cpu_addr = range->cpu_addr; rcar_pcie_inbound_ranges()
822 u64 cpu_end = range->cpu_addr + range->size; rcar_pcie_inbound_ranges()
823 u64 pci_addr = range->pci_addr; rcar_pcie_inbound_ranges()
833 * If the size of the range is larger than the alignment of the start rcar_pcie_inbound_ranges()
840 size = min(range->size, alignment); rcar_pcie_inbound_ranges()
842 size = range->size; rcar_pcie_inbound_ranges()
852 * Set up 64-bit inbound regions as the range parser doesn't rcar_pcie_inbound_ranges()
887 parser->range = of_get_property(node, "dma-ranges", &rlen); pci_dma_range_parser_init()
888 if (!parser->range) pci_dma_range_parser_init()
891 parser->end = parser->range + rlen / sizeof(__be32); pci_dma_range_parser_init()
898 struct of_pci_range range; rcar_pcie_parse_map_dma_ranges() local
907 for_each_of_pci_range(&parser, &range) { rcar_pcie_parse_map_dma_ranges()
908 u64 end = range.cpu_addr + range.size - 1; rcar_pcie_parse_map_dma_ranges()
910 range.flags, range.cpu_addr, end, range.pci_addr); rcar_pcie_parse_map_dma_ranges()
912 err = rcar_pcie_inbound_ranges(pcie, &range, &index); rcar_pcie_parse_map_dma_ranges()
932 struct of_pci_range range; rcar_pcie_probe() local
945 /* Get the bus range */ rcar_pcie_probe()
947 dev_err(&pdev->dev, "failed to parse bus-range property\n"); rcar_pcie_probe()
962 for_each_of_pci_range(&parser, &range) { rcar_pcie_probe()
963 err = of_pci_range_to_resource(&range, pdev->dev.of_node, rcar_pcie_probe()
816 rcar_pcie_inbound_ranges(struct rcar_pcie *pcie, struct of_pci_range *range, int *index) rcar_pcie_inbound_ranges() argument
/linux-4.4.14/drivers/ata/
H A Dpata_at91.c55 * struct smc_range - range of valid values for SMC register.
74 * @range: array of SMC ranges with valid values
81 static int adjust_smc_value(int *value, struct smc_range *range, int size) adjust_smc_value() argument
83 int maximum = (range + size - 1)->max; adjust_smc_value()
87 if (*value < range->min) { adjust_smc_value()
88 remainder = range->min - *value; adjust_smc_value()
89 *value = range->min; /* nearest valid value */ adjust_smc_value()
91 } else if ((range->min <= *value) && (*value <= range->max)) adjust_smc_value()
94 range++; adjust_smc_value()
125 {.min = 0, .max = 31}, /* first range */ calc_smc_vals()
126 {.min = 128, .max = 159} /* second range */ calc_smc_vals()
129 {.min = 0, .max = 63}, /* first range */ calc_smc_vals()
130 {.min = 256, .max = 319} /* second range */ calc_smc_vals()
133 {.min = 0, .max = 127}, /* first range */ calc_smc_vals()
134 {.min = 256, .max = 383}, /* second range */ calc_smc_vals()
135 {.min = 512, .max = 639}, /* third range */ calc_smc_vals()
136 {.min = 768, .max = 895} /* fourth range */ calc_smc_vals()
/linux-4.4.14/drivers/hwmon/
H A Dmax197.c34 #define MAX197_RNG (1 << 4) /* Full range */
46 * @limit: Max range value (10V for MAX197, 4V for MAX199).
97 int range; max197_show_range() local
102 range = max197_is_full_range(data, channel) ? max197_show_range()
106 range = -range; max197_show_range()
108 range = 0; max197_show_range()
113 return sprintf(buf, "%d\n", range); max197_show_range()
159 /* We can deduce only the range */ max197_store_range()
162 /* We can deduce only the range */ max197_store_range()
H A Dmax16065.c96 int range[MAX16065_NUM_ADC + 1];/* voltage range */ member in struct:max16065_data
106 static inline int ADC_TO_MV(int adc, int range) ADC_TO_MV() argument
108 return (adc * range) / 1024; ADC_TO_MV()
115 static inline int LIMIT_TO_MV(int limit, int range) LIMIT_TO_MV() argument
117 return limit * range / 256; LIMIT_TO_MV()
120 static inline int MV_TO_LIMIT(int mv, int range) MV_TO_LIMIT() argument
122 return clamp_val(DIV_ROUND_CLOSEST(mv * 256, range), 0, 255); MV_TO_LIMIT()
207 ADC_TO_MV(adc, data->range[attr->index])); max16065_show_input()
236 limit = MV_TO_LIMIT(val, data->range[attr2->index]); max16065_set_limit()
240 = LIMIT_TO_MV(limit, data->range[attr2->index]); max16065_set_limit()
525 if (index >= data->num_adc || !data->range[index]) max16065_basic_is_visible()
594 /* Read scale registers, convert to range */ max16065_probe()
600 data->range[i * 4 + j] = max16065_probe()
615 data->limit[i][j] = LIMIT_TO_MV(val, data->range[j]); max16065_probe()
635 data->range[MAX16065_NUM_ADC] max16065_probe()
/linux-4.4.14/drivers/mmc/host/
H A Dsdhci-sirf.c86 int start = -1, end = 0, tuning_value = -1, range = 0; sdhci_sirf_execute_tuning() local
109 range++; sdhci_sirf_execute_tuning()
111 && range > longest_range) sdhci_sirf_execute_tuning()
116 if (range > longest_range) { sdhci_sirf_execute_tuning()
118 longest_range = range; sdhci_sirf_execute_tuning()
121 end = range = 0; sdhci_sirf_execute_tuning()
/linux-4.4.14/lib/
H A Dcmdline.c21 * range of numbers, M-N. This will expand the range and insert
49 * 3 - hyphen found to denote a range
79 * list of integers, a hyphen-separated range of _positive_ integers,
104 * last number in the range. The next iteration get_options()
105 * will handle the upper number in the range get_options()
H A Ddecompress_unlzma.c7 *Based on small lzma deflate implementation/Small range coder
56 /* Small range coder implementation for lzma.
74 uint32_t range; member in struct:rc
115 rc->range = 0xFFFFFFFF; rc_init()
135 rc->range <<= 8; rc_do_normalize()
140 if (rc->range < (1 << RC_TOP_BITS)) rc_normalize()
151 rc->bound = *p * (rc->range >> RC_MODEL_TOTAL_BITS); rc_is_bit_0_helper()
163 rc->range = rc->bound; rc_update_bit_0()
168 rc->range -= rc->bound; rc_update_bit_1()
191 rc->range >>= 1; rc_direct_bit()
192 if (rc->code >= rc->range) { rc_direct_bit()
193 rc->code -= rc->range; rc_direct_bit()
/linux-4.4.14/sound/isa/gus/
H A Dgus_volume.c86 unsigned short range, increment, value, i;
94 range = 4;
100 range = i;
105 if (range == 4) {
106 range = 3;
110 return (range << 6) | (increment & 0x3f);
/linux-4.4.14/drivers/staging/rtl8192e/rtl8192e/
H A Drtl_wx.c322 struct iw_range *range = (struct iw_range *)extra; _rtl92e_wx_get_range() local
327 wrqu->data.length = sizeof(*range); _rtl92e_wx_get_range()
328 memset(range, 0, sizeof(*range)); _rtl92e_wx_get_range()
331 range->throughput = 130 * 1000 * 1000; _rtl92e_wx_get_range()
334 /* signal level threshold range */ _rtl92e_wx_get_range()
335 range->sensitivity = priv->max_sens; _rtl92e_wx_get_range()
337 range->max_qual.qual = 100; _rtl92e_wx_get_range()
338 range->max_qual.level = 0; _rtl92e_wx_get_range()
339 range->max_qual.noise = 0; _rtl92e_wx_get_range()
340 range->max_qual.updated = 7; /* Updated all three */ _rtl92e_wx_get_range()
342 range->avg_qual.qual = 70; /* > 8% missed beacons is 'bad' */ _rtl92e_wx_get_range()
343 range->avg_qual.level = 0; _rtl92e_wx_get_range()
344 range->avg_qual.noise = 0; _rtl92e_wx_get_range()
345 range->avg_qual.updated = 7; /* Updated all three */ _rtl92e_wx_get_range()
347 range->num_bitrates = min(RATE_COUNT, IW_MAX_BITRATES); _rtl92e_wx_get_range()
349 for (i = 0; i < range->num_bitrates; i++) _rtl92e_wx_get_range()
350 range->bitrate[i] = rtl8192_rates[i]; _rtl92e_wx_get_range()
352 range->max_rts = DEFAULT_RTS_THRESHOLD; _rtl92e_wx_get_range()
353 range->min_frag = MIN_FRAG_THRESHOLD; _rtl92e_wx_get_range()
354 range->max_frag = MAX_FRAG_THRESHOLD; _rtl92e_wx_get_range()
356 range->min_pmp = 0; _rtl92e_wx_get_range()
357 range->max_pmp = 5000000; _rtl92e_wx_get_range()
358 range->min_pmt = 0; _rtl92e_wx_get_range()
359 range->max_pmt = 65535*1000; _rtl92e_wx_get_range()
360 range->pmp_flags = IW_POWER_PERIOD; _rtl92e_wx_get_range()
361 range->pmt_flags = IW_POWER_TIMEOUT; _rtl92e_wx_get_range()
362 range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R; _rtl92e_wx_get_range()
363 range->we_version_compiled = WIRELESS_EXT; _rtl92e_wx_get_range()
364 range->we_version_source = 18; _rtl92e_wx_get_range()
368 range->freq[val].i = i + 1; _rtl92e_wx_get_range()
369 range->freq[val].m = rtllib_wlan_frequencies[i] * _rtl92e_wx_get_range()
371 range->freq[val].e = 1; _rtl92e_wx_get_range()
378 range->num_frequency = val; _rtl92e_wx_get_range()
379 range->num_channels = val; _rtl92e_wx_get_range()
380 range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2| _rtl92e_wx_get_range()
382 range->scan_capa = IW_SCAN_CAPA_ESSID | IW_SCAN_CAPA_TYPE; _rtl92e_wx_get_range()
/linux-4.4.14/drivers/extcon/
H A Dextcon-arizona.c411 unsigned int val, range; arizona_hpdet_read() local
447 &range); arizona_hpdet_read()
448 range = (range & ARIZONA_HP_IMPEDANCE_RANGE_MASK) arizona_hpdet_read()
451 if (range < ARRAY_SIZE(arizona_hpdet_b_ranges) - 1 && arizona_hpdet_read()
452 (val < arizona_hpdet_b_ranges[range].threshold || arizona_hpdet_read()
454 range++; arizona_hpdet_read()
455 dev_dbg(arizona->dev, "Moving to HPDET range %d\n", arizona_hpdet_read()
456 range); arizona_hpdet_read()
460 range << arizona_hpdet_read()
465 /* If we go out of range report top of range */ arizona_hpdet_read()
466 if (val < arizona_hpdet_b_ranges[range].threshold || arizona_hpdet_read()
468 dev_dbg(arizona->dev, "Measurement out of range\n"); arizona_hpdet_read()
472 dev_dbg(arizona->dev, "HPDET read %d in range %d\n", arizona_hpdet_read()
473 val, range); arizona_hpdet_read()
475 val = arizona_hpdet_b_ranges[range].factor_b arizona_hpdet_read()
477 arizona_hpdet_b_ranges[range].factor_a); arizona_hpdet_read()
492 &range); arizona_hpdet_read()
493 range = (range & ARIZONA_HP_IMPEDANCE_RANGE_MASK) arizona_hpdet_read()
496 /* Skip up a range, or report? */ arizona_hpdet_read()
497 if (range < ARRAY_SIZE(arizona_hpdet_c_ranges) - 1 && arizona_hpdet_read()
498 (val >= arizona_hpdet_c_ranges[range].max)) { arizona_hpdet_read()
499 range++; arizona_hpdet_read()
500 dev_dbg(arizona->dev, "Moving to HPDET range %d-%d\n", arizona_hpdet_read()
501 arizona_hpdet_c_ranges[range].min, arizona_hpdet_read()
502 arizona_hpdet_c_ranges[range].max); arizona_hpdet_read()
506 range << arizona_hpdet_read()
511 if (range && (val < arizona_hpdet_c_ranges[range].min)) { arizona_hpdet_read()
512 dev_dbg(arizona->dev, "Reporting range boundary %d\n", arizona_hpdet_read()
513 arizona_hpdet_c_ranges[range].min); arizona_hpdet_read()
514 val = arizona_hpdet_c_ranges[range].min; arizona_hpdet_read()
634 /* Reset back to starting range */ arizona_hpdet_irq()
658 /* Reset back to starting range */ arizona_hpdet_irq()
1473 /* Enable reporting of that range */ arizona_extcon_probe()
/linux-4.4.14/mm/
H A Dnobootmem.c17 #include <linux/range.h>
72 * @addr: starting address of the range
73 * @size: size of the range in bytes
205 * free_bootmem_node - mark a page range as usable
206 * @pgdat: node the range resides on
207 * @physaddr: starting address of the range
208 * @size: size of the range in bytes
212 * The range must reside completely on the specified node.
221 * free_bootmem - mark a page range as usable
222 * @addr: starting address of the range
223 * @size: size of the range in bytes
227 * The range must be contiguous but may span node boundaries.
H A Dpage_isolation.c34 * number of pages in a range that are held by the balloon set_migratetype_isolate()
117 * should be no freepage in the range, so we could avoid costly unset_migratetype_isolate()
145 * start_isolate_page_range() -- make page-allocation-type of range of pages
147 * @start_pfn: The lower PFN of the range to be isolated.
148 * @end_pfn: The upper PFN of the range to be isolated.
152 * the range will never be allocated. Any free pages and pages freed in the
156 * Returns 0 on success and -EBUSY if any part of range cannot be isolated.
209 * Test all pages in the range is free(means isolated) or not.
213 * Returns 1 if all pages in the range are isolated.
H A Dbootmem.c17 #include <linux/range.h>
150 * @addr: starting physical address of the range
151 * @size: size of the range in bytes
391 * free_bootmem_node - mark a page range as usable
392 * @pgdat: node the range resides on
393 * @physaddr: starting address of the range
394 * @size: size of the range in bytes
398 * The range must reside completely on the specified node.
414 * free_bootmem - mark a page range as usable
415 * @addr: starting physical address of the range
416 * @size: size of the range in bytes
420 * The range must be contiguous but may span node boundaries.
435 * reserve_bootmem_node - mark a page range as reserved
436 * @pgdat: node the range resides on
437 * @physaddr: starting address of the range
438 * @size: size of the range in bytes
443 * The range must reside completely on the specified node.
457 * reserve_bootmem - mark a page range as reserved
458 * @addr: starting address of the range
459 * @size: size of the range in bytes
464 * The range must be contiguous but may span node boundaries.
/linux-4.4.14/arch/microblaze/pci/
H A Dpci-common.c217 /* In the range of this resource? */ __pci_mmap_make_offset()
284 /* In the range of this resource? */ for_each_pci_dev()
533 * - We can only cope with one IO space range and up to 3 Memory space
559 struct of_pci_range range; pci_process_bridge_OF_ranges() local
570 for_each_of_pci_range(&parser, &range) { pci_process_bridge_OF_ranges()
573 range.pci_space, range.pci_addr); pci_process_bridge_OF_ranges()
575 range.cpu_addr, range.size); pci_process_bridge_OF_ranges()
582 if (range.cpu_addr == OF_BAD_ADDR || range.size == 0) pci_process_bridge_OF_ranges()
587 switch (range.flags & IORESOURCE_TYPE_BITS) { pci_process_bridge_OF_ranges()
590 range.cpu_addr, range.cpu_addr + range.size - 1, pci_process_bridge_OF_ranges()
591 range.pci_addr); pci_process_bridge_OF_ranges()
593 /* We support only one IO range */ pci_process_bridge_OF_ranges()
599 if (range.size > 0x01000000) pci_process_bridge_OF_ranges()
600 range.size = 0x01000000; pci_process_bridge_OF_ranges()
603 hose->io_base_virt = ioremap(range.cpu_addr, pci_process_bridge_OF_ranges()
604 range.size); pci_process_bridge_OF_ranges()
613 hose->pci_io_size = range.pci_addr + range.size; pci_process_bridge_OF_ranges()
614 hose->io_base_phys = range.cpu_addr - range.pci_addr; pci_process_bridge_OF_ranges()
618 range.cpu_addr = range.pci_addr; pci_process_bridge_OF_ranges()
623 range.cpu_addr, range.cpu_addr + range.size - 1, pci_process_bridge_OF_ranges()
624 range.pci_addr, pci_process_bridge_OF_ranges()
625 (range.pci_space & 0x40000000) ? pci_process_bridge_OF_ranges()
634 if (range.pci_addr == 0) { pci_process_bridge_OF_ranges()
635 isa_mb = range.cpu_addr; pci_process_bridge_OF_ranges()
638 isa_mem_base = range.cpu_addr; pci_process_bridge_OF_ranges()
639 hose->isa_mem_phys = range.cpu_addr; pci_process_bridge_OF_ranges()
640 hose->isa_mem_size = range.size; pci_process_bridge_OF_ranges()
643 /* We get the PCI/Mem offset from the first range or pci_process_bridge_OF_ranges()
648 (isa_hole >= 0 && range.pci_addr != 0 && pci_process_bridge_OF_ranges()
650 hose->pci_mem_offset = range.cpu_addr - pci_process_bridge_OF_ranges()
651 range.pci_addr; pci_process_bridge_OF_ranges()
652 else if (range.pci_addr != 0 && pci_process_bridge_OF_ranges()
653 hose->pci_mem_offset != range.cpu_addr - pci_process_bridge_OF_ranges()
654 range.pci_addr) { pci_process_bridge_OF_ranges()
665 res->flags = range.flags; pci_process_bridge_OF_ranges()
666 res->start = range.cpu_addr; pci_process_bridge_OF_ranges()
667 res->end = range.cpu_addr + range.size - 1; pci_process_bridge_OF_ranges()
/linux-4.4.14/arch/mips/pmcs-msp71xx/
H A Dmsp_irq_slp.c27 /* check for PER interrupt range */ unmask_msp_slp_irq()
38 /* check for PER interrupt range */ mask_msp_slp_irq()
53 /* check for PER interrupt range */ ack_msp_slp_irq()
/linux-4.4.14/arch/powerpc/boot/
H A Dsimpleboot.c50 /* Find the memory range */ platform_init()
57 fatal("cannot get memory range\n"); platform_init()
62 fatal("Memory range is not based at address 0\n"); platform_init()
/linux-4.4.14/arch/um/include/asm/
H A Dtlbflush.h19 * - flush_tlb_range(vma, start, end) flushes a range of pages
/linux-4.4.14/arch/xtensa/include/asm/
H A Dcacheasm.h27 * ___flush_invalidate_dcache_{all|range|page}
28 * ___flush_dcache_{all|range|page}
29 * ___invalidate_dcache_{all|range|page}
30 * ___invalidate_icache_{all|range|page}
/linux-4.4.14/fs/btrfs/tests/
H A Dextent-io-tests.c149 test_msg("Couldn't find delalloc in our range\n"); test_find_delalloc()
159 test_msg("There were unlocked pages in the range\n"); test_find_delalloc()
183 test_msg("Found range when we shouldn't have\n"); test_find_delalloc()
204 test_msg("Didn't find our range\n"); test_find_delalloc()
214 test_msg("Pages in range were not all locked\n"); test_find_delalloc()
221 * range we want to find. test_find_delalloc()
237 * Currently if we fail to find dirty pages in the delalloc range we test_find_delalloc()
245 test_msg("Didn't find our range\n"); test_find_delalloc()
256 test_msg("Pages in range were not all locked\n"); test_find_delalloc()
/linux-4.4.14/include/misc/
H A Dcxl-base.h19 irq_hw_number_t range[CXL_IRQ_RANGES]; member in struct:cxl_irq_ranges
/linux-4.4.14/include/asm-generic/
H A Ddelay.h15 * limited range of data type" warning with non-const 8-bit arguments.
/linux-4.4.14/include/linux/pinctrl/
H A Dpinctrl.h52 * @name: a name for the chip in this range
53 * @id: an ID number for the chip in this range
54 * @base: base offset of the GPIO range
55 * @pin_base: base pin number of the GPIO range if pins == NULL
56 * @pins: enumeration of pins in GPIO range or NULL
57 * @npins: number of pins in the GPIO range, including the base number
149 struct pinctrl_gpio_range *range);
154 struct pinctrl_gpio_range *range);
157 struct pinctrl_gpio_range *range);
H A Dpinmux.h50 * affected GPIO range is passed along with an offset(pin number) into that
51 * specific GPIO range - function selectors and pin groups are orthogonal
76 struct pinctrl_gpio_range *range,
79 struct pinctrl_gpio_range *range,
82 struct pinctrl_gpio_range *range,
/linux-4.4.14/arch/mips/include/asm/mach-generic/
H A Dioremap.h16 * outside the low 32-bit range -- generic pass-through version.
/linux-4.4.14/net/ipv4/
H A Dsysctl_net_ipv4.c46 /* Update system visible IP port range */ set_local_port_range()
47 static void set_local_port_range(struct net *net, int range[2]) set_local_port_range() argument
49 bool same_parity = !((range[0] ^ range[1]) & 1); set_local_port_range()
56 net->ipv4.ip_local_ports.range[0] = range[0]; set_local_port_range()
57 net->ipv4.ip_local_ports.range[1] = range[1]; set_local_port_range()
67 container_of(table->data, struct net, ipv4.ip_local_ports.range); ipv4_local_port_range()
69 int range[2]; ipv4_local_port_range() local
71 .data = &range, ipv4_local_port_range()
72 .maxlen = sizeof(range), ipv4_local_port_range()
78 inet_get_local_port_range(net, &range[0], &range[1]); ipv4_local_port_range()
83 if (range[1] < range[0]) ipv4_local_port_range()
86 set_local_port_range(net, range); ipv4_local_port_range()
97 container_of(table->data, struct net, ipv4.ping_group_range.range); inet_get_ping_group_range_table()
107 /* Update system visible IP port range */ set_ping_group_range()
112 container_of(table->data, struct net, ipv4.ping_group_range.range); set_ping_group_range()
850 .data = &init_net.ipv4.ping_group_range.range,
871 .maxlen = sizeof(init_net.ipv4.ip_local_ports.range),
872 .data = &init_net.ipv4.ip_local_ports.range,
/linux-4.4.14/arch/s390/mm/
H A Dextmem.c52 struct qrange range[6]; member in struct:qout64
66 struct qrange_old range[6]; member in struct:qout64_old
88 struct qrange range[6]; member in struct:dcss_segment
293 qout->range[i].start = query_segment_type()
294 (unsigned long) qout_old->range[i].start; query_segment_type()
295 qout->range[i].end = query_segment_type()
296 (unsigned long) qout_old->range[i].end; query_segment_type()
306 seg->vm_segtype = qout->range[0].start & 0xff; query_segment_type()
314 if (((qout->range[i].start & 0xff) != SEG_TYPE_EW) && query_segment_type()
315 ((qout->range[i].start & 0xff) != SEG_TYPE_EN)) { query_segment_type()
319 if (start != qout->range[i].start >> PAGE_SHIFT) { query_segment_type()
323 start = (qout->range[i].end >> PAGE_SHIFT) + 1; query_segment_type()
332 memcpy (seg->range, qout->range, 6*sizeof(struct qrange)); query_segment_type()
477 pr_info("DCSS %s of range %p to %p and type %s loaded as " __segment_load()
481 pr_info("DCSS %s of range %p to %p and type %s loaded in " __segment_load()
511 * -ERANGE : segment cannot be used (exceeds kernel mapping range)
692 seg->range[i].start >> PAGE_SHIFT, segment_save()
693 seg->range[i].end >> PAGE_SHIFT, segment_save()
694 segtype_string[seg->range[i].start & 0xff]); segment_save()
753 pr_err("DCSS %s exceeds the kernel mapping range (%lu) " segment_warning()
/linux-4.4.14/arch/x86/include/asm/
H A Dpage.h20 #include <linux/range.h>
21 extern struct range pfn_mapped[];
/linux-4.4.14/drivers/clk/tegra/
H A Dclk-dfll.h29 * @tune0_low: DFLL tuning register 0 (low voltage range)
30 * @tune0_high: DFLL tuning register 0 (high voltage range)
/linux-4.4.14/include/net/netns/
H A Dipv4.h21 int range[2]; member in struct:local_ports
27 kgid_t range[2]; member in struct:ping_group_range
/linux-4.4.14/include/drm/i2c/
H A Dsil164.h59 int input_skew; /** < Allowed range [-4, 3], use 0 for no de-skew. */
60 int duallink_skew; /** < Allowed range [-4, 3]. */
/linux-4.4.14/include/linux/sched/
H A Dprio.h11 * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority
38 * it's a [ 0 ... 39 ] range.
/linux-4.4.14/arch/powerpc/mm/
H A Dsubpage-prot.c90 * Clear the subpage protection map for an address range, allowing
127 /* now flush any existing HPTEs for the range */ subpage_prot_clear()
152 * We don't try too hard, we just mark all the vma in that range subpage_mark_vma_nohuge()
157 * If the range is in unmapped range, just return subpage_mark_vma_nohuge()
179 * Copy in a subpage protection map for an address range.
207 /* Clear out the protection map for the address range */ sys_subpage_prot()
257 /* now flush any existing HPTEs for the range */ sys_subpage_prot()
/linux-4.4.14/arch/mips/include/asm/
H A Dtlbflush.h12 * - flush_tlb_range(vma, start, end) flushes a range of pages
13 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
/linux-4.4.14/arch/sh/include/asm/
H A Dtlbflush.h10 * - flush_tlb_range(vma, start, end) flushes a range of pages
11 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
/linux-4.4.14/arch/mn10300/proc-mn103e010/include/proc/
H A Dcache.h35 * The size of range at which it becomes more economical to just flush the
36 * whole cache rather than trying to flush the specified range.
/linux-4.4.14/arch/mn10300/proc-mn2ws0050/include/proc/
H A Dcache.h41 * The size of range at which it becomes more economical to just flush the
42 * whole cache rather than trying to flush the specified range.
/linux-4.4.14/arch/nios2/include/asm/
H A Dtlbflush.h30 * - flush_tlb_range(vma, start, end) flushes a range of pages
31 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
/linux-4.4.14/arch/frv/mm/
H A Dkmap.c29 * Map some physical address range into the kernel address space.
46 * The caller must push data for that range itself, if such data may already
/linux-4.4.14/include/linux/input/
H A Dkxtj9.h45 /* CTRL_REG1: set resolution, g-range, data ready enable */
50 /* Output g-range: +/-2g, 4g, or 8g */
/linux-4.4.14/tools/perf/scripts/python/
H A Dnetdev-times.py91 for i in range(len(irq_list)):
102 for i in range(len(irq_list)):
108 for j in range(len(irq_event_list)):
119 for i in range(len(event_list)):
156 for i in range(len(sys.argv)):
177 for i in range(len(all_event_list)):
208 for i in range(len(receive_hunk_list)):
214 for i in range(len(tx_free_list)):
412 for i in range(len(tx_queue_list)):
426 for i in range(len(tx_queue_list)):
431 for i in range(len(tx_xmit_list)):
438 for i in range(len(rx_skb_list)):
448 for i in range(len(tx_xmit_list)):
458 for i in range(len(rx_skb_list)):
/linux-4.4.14/arch/s390/pci/
H A Dpci_insn.c60 static inline u8 __rpcit(u64 fn, u64 addr, u64 range, u8 *status) __rpcit() argument
63 register u64 __range asm("3") = range; __rpcit()
77 int zpci_refresh_trans(u64 fn, u64 addr, u64 range) zpci_refresh_trans() argument
82 cc = __rpcit(fn, addr, range, &status); zpci_refresh_trans()
88 zpci_err_insn(cc, status, addr, range); zpci_refresh_trans()
/linux-4.4.14/include/linux/iio/frequency/
H A Dad9523.h128 * @pll2_ndiv_a_cnt: PLL2 Feedback N-divider, A Counter, range 0..4.
129 * @pll2_ndiv_b_cnt: PLL2 Feedback N-divider, B Counter, range 0..63.
131 * @pll2_r2_div: PLL2 R2 divider, range 0..31.
132 * @pll2_vco_diff_m1: VCO1 divider, range 3..5.
133 * @pll2_vco_diff_m2: VCO2 divider, range 3..5.
/linux-4.4.14/arch/x86/platform/intel-quark/
H A Dimr.c80 * Determines if an IMR is enabled based on address range and read/write
81 * mask. An IMR set with an address range set to zero and a read/write
192 WARN(ret, "IOSF-MBI write fail range 0x%08x-0x%08x unreliable\n", imr_write()
291 * imr_check_params - check passed address range IMR alignment and non-zero size
295 * @return: zero on valid range -EINVAL on unaligned base/size.
383 * Find a free IMR while checking for an existing overlapping range. imr_add_range()
394 /* Find overlap @ base or end of requested range. */ imr_add_range()
415 /* Enable IMR at specified range and access mask. */ imr_add_range()
444 * by address range specified by base and size respectively. If you specify an
452 * @return: -EINVAL on invalid range or out or range id
470 * Validate address range if deleting by address, else we are __imr_remove_range()
497 /* Search for match based on address range. */ __imr_remove_range()
538 * This function allows you to delete an IMR by an address range specified
544 * @return: -EINVAL on invalid range or out or range id
557 * This function allows you to delete an IMR by an address range specified
563 * @return: -EINVAL on invalid range or out or range id
/linux-4.4.14/fs/hfs/
H A Dbitmap.c22 * in that range.
24 * Returns >= 'size' if no zero bits are found in the range.
117 * the hfs MDB. 'mdb' had better be locked or the returned range
127 * returned range. If the bitmap is fragmented, this will be less than
130 * The number of the first bit of the range of cleared bits which has been
185 * -2: One or more of the bits are out of range of the bitmap.
204 /* are all of the bits in range? */ hfs_clear_vbm_bits()
/linux-4.4.14/drivers/block/paride/
H A Dparide.c277 int best, range; pi_probe_mode() local
282 range = 3; pi_probe_mode()
284 range = 8; pi_probe_mode()
285 if ((range == 8) && (pi->port % 8)) pi_probe_mode()
287 pi->reserved = range; pi_probe_mode()
292 range = 3; pi_probe_mode()
294 range = 8; pi_probe_mode()
295 if ((range == 8) && (pi->port % 8)) pi_probe_mode()
297 pi->reserved = range; pi_probe_mode()
/linux-4.4.14/drivers/iio/accel/
H A Dstk8312.c105 u8 range; member in struct:stk8312_data
281 static int stk8312_set_range(struct stk8312_data *data, u8 range) stk8312_set_range() argument
288 if (range != 1 && range != 2) stk8312_set_range()
290 else if (range == data->range) stk8312_set_range()
304 masked_reg |= range << STK8312_RNG_SHIFT; stk8312_set_range()
310 data->range = range; stk8312_set_range()
315 dev_err(&client->dev, "failed to change sensor range\n"); stk8312_set_range()
368 *val = stk8312_scale_table[data->range - 1][0]; stk8312_read_raw()
369 *val2 = stk8312_scale_table[data->range - 1][1]; stk8312_read_raw()
/linux-4.4.14/arch/powerpc/sysdev/
H A Dmv64x60_pci.c136 /* Get bus range if any */ mv64x60_add_bridge()
137 bus_range = of_get_property(dev, "bus-range", &len); mv64x60_add_bridge()
139 printk(KERN_WARNING "Can't get bus-range for %s, assume" mv64x60_add_bridge()
/linux-4.4.14/arch/m68k/kernel/
H A Dints.c72 * standard do_IRQ(), it will be called with irq numbers in the range
87 * setup user vector interrupts, this includes activating the specified range
110 * Change the controller for the specified range of irq, which will be used to
/linux-4.4.14/arch/arm/probes/kprobes/
H A Dactions-common.c137 /* Instruction only uses registers in the range R0..R12 */ kprobe_decode_ldmstm()
141 /* Instruction only uses registers in the range R2..R14 */ kprobe_decode_ldmstm()
147 /* Instruction only uses registers in the range R3..R15 */ kprobe_decode_ldmstm()
/linux-4.4.14/arch/arm/mach-integrator/
H A Dpci_v3.c262 * The V3 chip translates an address by checking its range within
772 struct of_pci_range range; pci_v3_probe() local
818 for_each_of_pci_range(&parser, &range) { pci_v3_probe()
819 if (!range.flags) { pci_v3_probe()
820 ret = of_pci_range_to_resource(&range, np, &conf_mem); pci_v3_probe()
823 if (range.flags & IORESOURCE_IO) { pci_v3_probe()
824 ret = of_pci_range_to_resource(&range, np, &io_mem); pci_v3_probe()
827 if ((range.flags & IORESOURCE_MEM) && pci_v3_probe()
828 !(range.flags & IORESOURCE_PREFETCH)) { pci_v3_probe()
829 non_mem_pci = range.pci_addr; pci_v3_probe()
830 non_mem_pci_sz = range.size; pci_v3_probe()
831 ret = of_pci_range_to_resource(&range, np, &non_mem); pci_v3_probe()
834 if ((range.flags & IORESOURCE_MEM) && pci_v3_probe()
835 (range.flags & IORESOURCE_PREFETCH)) { pci_v3_probe()
836 pre_mem_pci = range.pci_addr; pci_v3_probe()
837 pre_mem_pci_sz = range.size; pci_v3_probe()
838 ret = of_pci_range_to_resource(&range, np, &pre_mem); pci_v3_probe()

Completed in 5037 milliseconds

1234567891011>>