Lines Matching refs:i
125 int i; in assert_maps_equivalent() local
126 for (i = 0; i < XCHAL_MPU_ENTRIES; i++) in assert_maps_equivalent()
128 assert_attributes_equivalent(XTHAL_MPU_ENTRY_GET_VSTARTADDR(initial[i]), initial, fg, bg); in assert_maps_equivalent()
129 assert_attributes_equivalent(XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]), initial, fg, bg); in assert_maps_equivalent()
131 for (i = 0; i < XCHAL_MPU_BACKGROUND_ENTRIES; i++) in assert_maps_equivalent()
132 assert_attributes_equivalent(XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i]), initial, fg, bg); in assert_maps_equivalent()
364 int i; in _xthal_get_entry() local
365 for (i = XCHAL_MPU_ENTRIES - 1; i >= 0; i--) in _xthal_get_entry()
367 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) <= addr) in _xthal_get_entry()
369 if (XTHAL_MPU_ENTRY_GET_VALID(fg[i])) in _xthal_get_entry()
373 return fg[i]; in _xthal_get_entry()
379 for (i = XCHAL_MPU_BACKGROUND_ENTRIES - 1; i >= 0; i--) in _xthal_get_entry()
381 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i]) <= addr) in _xthal_get_entry()
385 return bg[i]; in _xthal_get_entry()
394 int i; in _xthal_in_bgmap() local
395 for (i = 0; i < XCHAL_MPU_BACKGROUND_ENTRIES; i++) in _xthal_in_bgmap()
396 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i]) == address) in _xthal_in_bgmap()
423 unsigned int i; in move_map_down() local
424 for (i = dup; i > idx; i--) in move_map_down()
426 write_map_entry(fg, i, fg[i - 1]); in move_map_down()
434 int i; in move_map_up() local
435 for (i = dup; i < idx - 1; i++) in move_map_up()
437 write_map_entry(fg, i, fg[i + 1]); in move_map_up()
446 int i; in bubble_free_to_ip() local
454 for (i = ip - 2; i >= 0 && required;) in bubble_free_to_ip()
456 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i + 1])) in bubble_free_to_ip()
458 move_map_up(fg, i, ip); in bubble_free_to_ip()
462 i--; in bubble_free_to_ip()
480 for (i = ip + 1; i < XCHAL_MPU_ENTRIES && required;) in bubble_free_to_ip()
482 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i - 1])) in bubble_free_to_ip()
484 move_map_down(fg, i, ip); in bubble_free_to_ip()
488 i++; in bubble_free_to_ip()
500 int i; in remove_inaccessible_entries() local
501 for (i = 1; i < XCHAL_MPU_ENTRIES; i++) in remove_inaccessible_entries()
503 …_GET_VALID(fg[i]) == XTHAL_MPU_ENTRY_GET_VALID(fg[i - 1])) && (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i… in remove_inaccessible_entries()
504 …MEMORY_TYPE(fg[i]) == XTHAL_MPU_ENTRY_GET_MEMORY_TYPE(fg[i - 1])) && (XTHAL_MPU_ENTRY_GET_ACCESS(f… in remove_inaccessible_entries()
508 (!_xthal_in_bgmap(XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]), bg))) in remove_inaccessible_entries()
509 …L_MPU_ENTRY_GET_VALID(fg[i]) && (!XTHAL_MPU_ENTRY_GET_VALID(fg[i - 1])) && (!_xthal_in_bgmap(XTHAL… in remove_inaccessible_entries()
511 write_map_entry(fg, i, fg[i - 1]); in remove_inaccessible_entries()
538 int i; in find_entry() local
539 for (i = XCHAL_MPU_ENTRIES - 1; i >= 0; i--) in find_entry()
541 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) <= first) in find_entry()
542 return i + 1; in find_entry()
559 int i; in needed_entries_exist() local
560 for (i = 0; i < XCHAL_MPU_ENTRIES; i++) in needed_entries_exist()
562 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == first) in needed_entries_exist()
571 for (k = i; k < XCHAL_MPU_ENTRIES; k++) in needed_entries_exist()
577 for (j = i; j < XCHAL_MPU_ENTRIES; j++) in needed_entries_exist()
581 for (k = i; k <= j; k++) in needed_entries_exist()
597 int i; in number_available() local
600 for (i = 0; i < XCHAL_MPU_ENTRIES; i++) in number_available()
604 if (XTHAL_MPU_ENTRY_GET_VALID(fg[i])) in number_available()
614 … if (i && (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i - 1]))) in number_available()
627 int i; in get_bg_map_index() local
628 for (i = XCHAL_MPU_BACKGROUND_ENTRIES - 1; i >= 0; i--) in get_bg_map_index()
629 if (first > XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i])) in get_bg_map_index()
630 return i; in get_bg_map_index()
762 int i; in safe_and_commit_overlaped_regions() local
768 for (i = XCHAL_MPU_ENTRIES - 1; i >= 0; i--) in safe_and_commit_overlaped_regions()
769 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) < last) in safe_and_commit_overlaped_regions()
772 safe_region(fg, i, end_of_segment, memoryType, wb, inv, &post_inv_all); in safe_and_commit_overlaped_regions()
773 end_of_segment = XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]); in safe_and_commit_overlaped_regions()
776 next = next_address_to_commit(fg, bg, first, i); in safe_and_commit_overlaped_regions()
777 if (next == XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i - 1])) in safe_and_commit_overlaped_regions()
778 i--; in safe_and_commit_overlaped_regions()
779 XTHAL_MPU_ENTRY_SET_VSTARTADDR(fg[i], next); in safe_and_commit_overlaped_regions()
780 safe_region(fg, i, last, memoryType, wb, inv, &post_inv_all); in safe_and_commit_overlaped_regions()
781 end_of_segment = XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]); in safe_and_commit_overlaped_regions()
788 for (; i < XCHAL_MPU_ENTRIES && XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) < last; i++) in safe_and_commit_overlaped_regions()
790 XTHAL_MPU_ENTRY_SET_MEMORY_TYPE(fg[i], memoryType); in safe_and_commit_overlaped_regions()
791 XTHAL_MPU_ENTRY_SET_ACCESS(fg[i], accessRights); in safe_and_commit_overlaped_regions()
792 XTHAL_MPU_ENTRY_SET_VALID(fg[i], 1); in safe_and_commit_overlaped_regions()
793 write_map_entry(fg, i, fg[i]); in safe_and_commit_overlaped_regions()
816 int i; in handle_invalid_pred() local
825 for (i = XCHAL_MPU_BACKGROUND_ENTRIES - 1; i >= 0; i--) in handle_invalid_pred()
827 unsigned addr = XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i]); in handle_invalid_pred()
831 fgipm1_bg_map_index = i; in handle_invalid_pred()
834 fgip_bg_map_index = i; in handle_invalid_pred()
837 first_bg_map_index = i; in handle_invalid_pred()
864 int i; in insert_entry_if_needed_with_existing_attr() local
869 for (i = XCHAL_MPU_ENTRIES - 1; i >= 0; i--) in insert_entry_if_needed_with_existing_attr()
870 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == first) in insert_entry_if_needed_with_existing_attr()
872 if (XTHAL_MPU_ENTRY_GET_VALID(fg[i]) || invalid) in insert_entry_if_needed_with_existing_attr()
877 ip = i; in insert_entry_if_needed_with_existing_attr()
906 int i; in smallest_entry_greater_than_equal() local
907 for (i = 0; i < XCHAL_MPU_ENTRIES; i++) in smallest_entry_greater_than_equal()
908 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) >= x) in smallest_entry_greater_than_equal()
909 return XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]); in smallest_entry_greater_than_equal()
918 int i; in create_aligning_entries_if_required() local
924 for (i = XCHAL_MPU_ENTRIES - 1; i >= 0; i--) in create_aligning_entries_if_required()
926 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) < x) in create_aligning_entries_if_required()
928 if (XTHAL_MPU_ENTRY_GET_VALID(fg[i])) in create_aligning_entries_if_required()
935 next_entry_address = XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]); in create_aligning_entries_if_required()
936 next_entry_valid = XTHAL_MPU_ENTRY_GET_VALID(fg[i]); in create_aligning_entries_if_required()
1001 int i; in start_initial_region() local
1003 for (i = XCHAL_MPU_BACKGROUND_ENTRIES - 1; i >= 0; i--) in start_initial_region()
1005 addr = XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i]); in start_initial_region()
1232 int i; in check_map() local
1238 for (i = 0; i < n; i++) in check_map()
1240 if (XTHAL_MPU_ENTRY_GET_VALID(fg[i]) && bad_accessRights(XTHAL_MPU_ENTRY_GET_ACCESS(fg[i]))) in check_map()
1242 if ((XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) < current)) in check_map()
1244 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) & MPU_VSTART_CORRECTNESS_MASK) in check_map()
1246 current = XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]); in check_map()
1251 for (i = 0; i < n- 1; i++) in check_map()
1252 …if (XCHAL_MPU_ALIGN_REQ && !XTHAL_MPU_ENTRY_GET_VALID(fg[i]) && XTHAL_MPU_ENTRY_GET_VALID(fg[i + 1… in check_map()
1253 && !_xthal_in_bgmap(XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i + 1]), bg)) in check_map()
1451 unsigned i; in xthal_read_map() local
1575 int i; in xthal_get_entry_for_address() local
1578 for (i = XCHAL_MPU_BACKGROUND_ENTRIES - 1; i > 0; i--) in xthal_get_entry_for_address()
1580 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(Xthal_mpu_bgmap[i]) <= (unsigned) paddr) in xthal_get_entry_for_address()
1582 return Xthal_mpu_bgmap[i]; in xthal_get_entry_for_address()