1 /* SPDX-License-Identifier: GPL-2.0 */
4 #include <linux/types.h>
11 static inline u64 range_len(const struct range *range)
13 return range->end - range->start + 1;
16 int add_range(struct range *range, int az, int nr_range,
20 int add_range_with_merge(struct range *range, int az, int nr_range,
23 void subtract_range(struct range *range, int az, u64 start, u64 end);
25 int clean_sort_range(struct range *range, int az);
27 void sort_range(struct range *range, int nr_range);
29 #define MAX_RESOURCE ((resource_size_t)~0)
30 static inline resource_size_t cap_resource(u64 val)
32 if (val > MAX_RESOURCE)