• Home
  • Raw
  • Download

Lines Matching refs:pfn

417 		unsigned long pfn = ext->start;  in memory_bm_create()  local
433 bb->start_pfn = pfn; in memory_bm_create()
435 pfn += BM_BITS_PER_BLOCK; in memory_bm_create()
439 pfn += pages; in memory_bm_create()
441 bb->end_pfn = pfn; in memory_bm_create()
478 static int memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, in memory_bm_find_bit() argument
488 if (pfn < bb->start_pfn) in memory_bm_find_bit()
490 if (pfn >= bb->start_pfn) in memory_bm_find_bit()
493 if (pfn >= bb->end_pfn) in memory_bm_find_bit()
495 if (pfn >= bb->start_pfn && pfn < bb->end_pfn) in memory_bm_find_bit()
503 pfn -= bb->start_pfn; in memory_bm_find_bit()
504 bm->cur.bit = pfn + 1; in memory_bm_find_bit()
505 *bit_nr = pfn; in memory_bm_find_bit()
510 static void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn) in memory_bm_set_bit() argument
516 error = memory_bm_find_bit(bm, pfn, &addr, &bit); in memory_bm_set_bit()
521 static int mem_bm_set_bit_check(struct memory_bitmap *bm, unsigned long pfn) in mem_bm_set_bit_check() argument
527 error = memory_bm_find_bit(bm, pfn, &addr, &bit); in mem_bm_set_bit_check()
533 static void memory_bm_clear_bit(struct memory_bitmap *bm, unsigned long pfn) in memory_bm_clear_bit() argument
539 error = memory_bm_find_bit(bm, pfn, &addr, &bit); in memory_bm_clear_bit()
544 static int memory_bm_test_bit(struct memory_bitmap *bm, unsigned long pfn) in memory_bm_test_bit() argument
550 error = memory_bm_find_bit(bm, pfn, &addr, &bit); in memory_bm_test_bit()
555 static bool memory_bm_pfn_present(struct memory_bitmap *bm, unsigned long pfn) in memory_bm_pfn_present() argument
560 return !memory_bm_find_bit(bm, pfn, &addr, &bit); in memory_bm_pfn_present()
712 unsigned long pfn; in mark_nosave_pages() local
719 for (pfn = region->start_pfn; pfn < region->end_pfn; pfn++) in mark_nosave_pages()
720 if (pfn_valid(pfn)) { in mark_nosave_pages()
727 mem_bm_set_bit_check(bm, pfn); in mark_nosave_pages()
846 static struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn) in saveable_highmem_page() argument
850 if (!pfn_valid(pfn)) in saveable_highmem_page()
853 page = pfn_to_page(pfn); in saveable_highmem_page()
880 unsigned long pfn, max_zone_pfn; in count_highmem_pages() local
887 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) in count_highmem_pages()
888 if (saveable_highmem_page(zone, pfn)) in count_highmem_pages()
908 static struct page *saveable_page(struct zone *zone, unsigned long pfn) in saveable_page() argument
912 if (!pfn_valid(pfn)) in saveable_page()
915 page = pfn_to_page(pfn); in saveable_page()
925 && (!kernel_page_present(page) || pfn_is_nosave(pfn))) in saveable_page()
942 unsigned long pfn, max_zone_pfn; in count_data_pages() local
951 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) in count_data_pages()
952 if (saveable_page(zone, pfn)) in count_data_pages()
990 page_is_saveable(struct zone *zone, unsigned long pfn) in page_is_saveable() argument
993 saveable_highmem_page(zone, pfn) : saveable_page(zone, pfn); in page_is_saveable()
1024 #define page_is_saveable(zone, pfn) saveable_page(zone, pfn) argument
1037 unsigned long pfn; in copy_data_pages() local
1044 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) in copy_data_pages()
1045 if (page_is_saveable(zone, pfn)) in copy_data_pages()
1046 memory_bm_set_bit(orig_bm, pfn); in copy_data_pages()
1051 pfn = memory_bm_next_pfn(orig_bm); in copy_data_pages()
1052 if (unlikely(pfn == BM_END_OF_MAP)) in copy_data_pages()
1054 copy_data_page(memory_bm_next_pfn(copy_bm), pfn); in copy_data_pages()
1092 unsigned long pfn, max_zone_pfn; in swsusp_free() local
1096 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) in swsusp_free()
1097 if (pfn_valid(pfn)) { in swsusp_free()
1098 struct page *page = pfn_to_page(pfn); in swsusp_free()
1232 unsigned long pfn = memory_bm_next_pfn(&copy_bm); in free_unnecessary_pages() local
1233 struct page *page = pfn_to_page(pfn); in free_unnecessary_pages()
1246 memory_bm_clear_bit(&copy_bm, pfn); in free_unnecessary_pages()
1753 unsigned long pfn, max_zone_pfn; in mark_unsafe_pages() local
1758 for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) in mark_unsafe_pages()
1759 if (pfn_valid(pfn)) in mark_unsafe_pages()
1760 swsusp_unset_page_free(pfn_to_page(pfn)); in mark_unsafe_pages()
1766 pfn = memory_bm_next_pfn(bm); in mark_unsafe_pages()
1767 if (likely(pfn != BM_END_OF_MAP)) { in mark_unsafe_pages()
1768 if (likely(pfn_valid(pfn))) in mark_unsafe_pages()
1769 swsusp_set_page_free(pfn_to_page(pfn)); in mark_unsafe_pages()
1773 } while (pfn != BM_END_OF_MAP); in mark_unsafe_pages()
1783 unsigned long pfn; in duplicate_memory_bitmap() local
1786 pfn = memory_bm_next_pfn(src); in duplicate_memory_bitmap()
1787 while (pfn != BM_END_OF_MAP) { in duplicate_memory_bitmap()
1788 memory_bm_set_bit(dst, pfn); in duplicate_memory_bitmap()
1789 pfn = memory_bm_next_pfn(src); in duplicate_memory_bitmap()
1880 unsigned long pfn; in count_highmem_image_pages() local
1884 pfn = memory_bm_next_pfn(bm); in count_highmem_image_pages()
1885 while (pfn != BM_END_OF_MAP) { in count_highmem_image_pages()
1886 if (PageHighMem(pfn_to_page(pfn))) in count_highmem_image_pages()
1889 pfn = memory_bm_next_pfn(bm); in count_highmem_image_pages()
2165 unsigned long pfn = memory_bm_next_pfn(bm); in get_buffer() local
2167 if (pfn == BM_END_OF_MAP) in get_buffer()
2170 page = pfn_to_page(pfn); in get_buffer()