Lines Matching refs:dest_mapping

55 	void *dest_mapping =  in kernel_support_for_mremap_dontunmap()  local
58 if (dest_mapping == MAP_FAILED) { in kernel_support_for_mremap_dontunmap()
61 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap()
110 void *dest_mapping = in mremap_dontunmap_simple() local
113 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple()
118 (dest_mapping, num_pages * page_size, 'a') != 0, in mremap_dontunmap_simple()
124 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple()
151 void *dest_mapping = in mremap_dontunmap_simple_shmem() local
154 if (dest_mapping == MAP_FAILED && errno == EINVAL) { in mremap_dontunmap_simple_shmem()
161 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple_shmem()
166 (dest_mapping, num_pages * page_size, 'a') != 0, in mremap_dontunmap_simple_shmem()
175 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_shmem()
190 void *dest_mapping = in mremap_dontunmap_simple_fixed() local
193 BUG_ON(dest_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple_fixed()
194 memset(dest_mapping, 'X', num_pages * page_size); in mremap_dontunmap_simple_fixed()
205 dest_mapping); in mremap_dontunmap_simple_fixed()
207 BUG_ON(remapped_mapping != dest_mapping, in mremap_dontunmap_simple_fixed()
213 (dest_mapping, num_pages * page_size, 'a') != 0, in mremap_dontunmap_simple_fixed()
221 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in mremap_dontunmap_simple_fixed()
253 void *dest_mapping = in mremap_dontunmap_partial_mapping() local
257 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_partial_mapping()
268 BUG_ON(check_region_contains_byte(dest_mapping, 5 * page_size, 'a') != in mremap_dontunmap_partial_mapping()
271 BUG_ON(munmap(dest_mapping, 5 * page_size) == -1, in mremap_dontunmap_partial_mapping()
304 void *dest_mapping = in mremap_dontunmap_partial_mapping_overwrite() local
307 BUG_ON(dest_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_partial_mapping_overwrite()
308 memset(dest_mapping, 'X', 10 * page_size); in mremap_dontunmap_partial_mapping_overwrite()
314 MREMAP_DONTUNMAP | MREMAP_MAYMOVE | MREMAP_FIXED, dest_mapping); in mremap_dontunmap_partial_mapping_overwrite()
315 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_partial_mapping_overwrite()
316 BUG_ON(dest_mapping != remapped_mapping, "expected to remap to dest_mapping"); in mremap_dontunmap_partial_mapping_overwrite()
322 BUG_ON(check_region_contains_byte(dest_mapping, 5 * page_size, 'a') != 0, in mremap_dontunmap_partial_mapping_overwrite()
326 BUG_ON(check_region_contains_byte(dest_mapping + (5 * page_size), in mremap_dontunmap_partial_mapping_overwrite()
330 BUG_ON(munmap(dest_mapping, 10 * page_size) == -1, in mremap_dontunmap_partial_mapping_overwrite()