Lines Matching refs:next
248 struct memscrub_page_retire_span *next; member
768 struct memlist *prev, *next; in memscrub_add_span_gen() local
800 for (prev = NULL, next = *list; in memscrub_add_span_gen()
801 next != NULL; in memscrub_add_span_gen()
802 prev = next, next = next->ml_next) { in memscrub_add_span_gen()
803 if (address > (next->ml_address + next->ml_size)) in memscrub_add_span_gen()
813 if ((address + bytes) == next->ml_address) { in memscrub_add_span_gen()
816 next->ml_address = address; in memscrub_add_span_gen()
817 next->ml_size += bytes; in memscrub_add_span_gen()
825 if (address == (next->ml_address + next->ml_size)) { in memscrub_add_span_gen()
828 if (next->ml_next) { in memscrub_add_span_gen()
833 next->ml_next->ml_address) { in memscrub_add_span_gen()
841 next->ml_next->ml_address) { in memscrub_add_span_gen()
842 struct memlist *mlp = next->ml_next; in memscrub_add_span_gen()
844 if (next == *list) in memscrub_add_span_gen()
845 *list = next->ml_next; in memscrub_add_span_gen()
847 mlp->ml_address = next->ml_address; in memscrub_add_span_gen()
848 mlp->ml_size += next->ml_size; in memscrub_add_span_gen()
851 if (next->ml_prev) in memscrub_add_span_gen()
852 next->ml_prev->ml_next = mlp; in memscrub_add_span_gen()
853 mlp->ml_prev = next->ml_prev; in memscrub_add_span_gen()
855 kmem_free(next, in memscrub_add_span_gen()
861 next->ml_size += bytes; in memscrub_add_span_gen()
867 if ((address + bytes) > next->ml_address) { in memscrub_add_span_gen()
877 dst->ml_next = next; in memscrub_add_span_gen()
878 next->ml_prev = dst; in memscrub_add_span_gen()
911 struct memlist *dst, *next; in memscrub_delete_span() local
926 for (next = memscrub_memlist; next != NULL; next = next->ml_next) { in memscrub_delete_span()
927 if ((address >= next->ml_address) && in memscrub_delete_span()
928 (address < next->ml_address + next->ml_size)) in memscrub_delete_span()
935 if (next == NULL) { in memscrub_delete_span()
943 if (address + bytes > next->ml_address + next->ml_size) { in memscrub_delete_span()
951 if (address == next->ml_address) { in memscrub_delete_span()
955 if (bytes == next->ml_size) { in memscrub_delete_span()
956 if (next == memscrub_memlist) in memscrub_delete_span()
957 memscrub_memlist = next->ml_next; in memscrub_delete_span()
958 if (next->ml_prev != NULL) in memscrub_delete_span()
959 next->ml_prev->ml_next = next->ml_next; in memscrub_delete_span()
960 if (next->ml_next != NULL) in memscrub_delete_span()
961 next->ml_next->ml_prev = next->ml_prev; in memscrub_delete_span()
963 kmem_free(next, sizeof (struct memlist)); in memscrub_delete_span()
968 next->ml_address += bytes; in memscrub_delete_span()
969 next->ml_size -= bytes; in memscrub_delete_span()
977 if (address + bytes == next->ml_address + next->ml_size) { in memscrub_delete_span()
981 next->ml_size -= bytes; in memscrub_delete_span()
1006 (next->ml_address + next->ml_size) - dst->ml_address; in memscrub_delete_span()
1007 next->ml_size = address - next->ml_address; in memscrub_delete_span()
1017 dst->ml_next = next->ml_next; in memscrub_delete_span()
1018 dst->ml_prev = next; in memscrub_delete_span()
1020 if (next->ml_next != NULL) in memscrub_delete_span()
1021 next->ml_next->ml_prev = dst; in memscrub_delete_span()
1022 next->ml_next = dst; in memscrub_delete_span()
1261 new_span->next = memscrub_page_retire_span_list; in memscrub_page_retire_span_add()
1275 next_span = memscrub_page_retire_span_list->next; in memscrub_page_retire_span_delete()
1285 prev_span->next = next_span->next; in memscrub_page_retire_span_delete()
1291 next_span = next_span->next; in memscrub_page_retire_span_delete()
1307 next_span = next_span->next; in memscrub_page_retire_span_search()
1319 memscrub_page_retire_span_t *prev, *cur, *next; in memscrub_page_retire_span_list_update() local
1325 next = cur->next; in memscrub_page_retire_span_list_update()
1330 memscrub_page_retire_span_list = next; in memscrub_page_retire_span_list_update()
1335 prev->next = cur->next; in memscrub_page_retire_span_list_update()
1338 cur = next; in memscrub_page_retire_span_list_update()
1342 cur = next; in memscrub_page_retire_span_list_update()
1345 next = cur->next; in memscrub_page_retire_span_list_update()