Lines Matching refs:range

53 static struct range __initdata		range[RANGE_NUM];  variable
65 x86_get_mtrr_mem_range(struct range *range, int nr_range, in x86_get_mtrr_mem_range() argument
79 nr_range = add_range_with_merge(range, RANGE_NUM, nr_range, in x86_get_mtrr_mem_range()
86 range[i].start, range[i].end); in x86_get_mtrr_mem_range()
109 subtract_range(range, RANGE_NUM, base, base + size); in x86_get_mtrr_mem_range()
112 subtract_range(range, RANGE_NUM, extra_remove_base, in x86_get_mtrr_mem_range()
118 if (!range[i].end) in x86_get_mtrr_mem_range()
121 range[i].start, range[i].end); in x86_get_mtrr_mem_range()
126 nr_range = clean_sort_range(range, RANGE_NUM); in x86_get_mtrr_mem_range()
131 range[i].start, range[i].end); in x86_get_mtrr_mem_range()
139 static unsigned long __init sum_ranges(struct range *range, int nr_range) in sum_ranges() argument
145 sum += range[i].end - range[i].start; in sum_ranges()
473 x86_setup_var_mtrrs(struct range *range, int nr_range, in x86_setup_var_mtrrs() argument
490 set_var_mtrr_range(&var_state, range[i].start, in x86_setup_var_mtrrs()
491 range[i].end - range[i].start); in x86_setup_var_mtrrs()
601 static struct range range_new[RANGE_NUM] __initdata; in mtrr_calc_range_state()
607 num_reg = x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size); in mtrr_calc_range_state()
628 if (nr_range_new != nr_range || memcmp(range, range_new, sizeof(range))) in mtrr_calc_range_state()
717 memset(range, 0, sizeof(range)); in mtrr_cleanup()
727 nr_range = add_range_with_merge(range, RANGE_NUM, 0, 0, in mtrr_cleanup()
730 nr_range = x86_get_mtrr_mem_range(range, nr_range, in mtrr_cleanup()
733 range_sums = sum_ranges(range, nr_range); in mtrr_cleanup()
788 x86_setup_var_mtrrs(range, nr_range, chunk_size, gran_size); in mtrr_cleanup()
944 memset(range, 0, sizeof(range)); in mtrr_trim_uncached_memory()
947 range[nr_range].start = (1ULL<<(32 - PAGE_SHIFT)); in mtrr_trim_uncached_memory()
948 range[nr_range].end = mtrr_tom2 >> PAGE_SHIFT; in mtrr_trim_uncached_memory()
949 if (highest_pfn < range[nr_range].end) in mtrr_trim_uncached_memory()
950 highest_pfn = range[nr_range].end; in mtrr_trim_uncached_memory()
953 nr_range = x86_get_mtrr_mem_range(range, nr_range, 0, 0); in mtrr_trim_uncached_memory()
957 if (range[0].start) in mtrr_trim_uncached_memory()
958 total_trim_size += real_trim_memory(0, range[0].start); in mtrr_trim_uncached_memory()
962 if (range[i].end < range[i+1].start) in mtrr_trim_uncached_memory()
963 total_trim_size += real_trim_memory(range[i].end, in mtrr_trim_uncached_memory()
964 range[i+1].start); in mtrr_trim_uncached_memory()
969 if (range[i].end < end_pfn) in mtrr_trim_uncached_memory()
970 total_trim_size += real_trim_memory(range[i].end, in mtrr_trim_uncached_memory()