Lines Matching refs:page
4 * Handling Page Tables through page fragments
21 struct page *page;
23 page = virt_to_page(pte_frag);
26 /* We allow PTE_FRAG_NR fragments from a PTE page */
27 if (atomic_sub_and_test(PTE_FRAG_NR - count, &page->pt_frag_refcount)) {
28 pgtable_pte_page_dtor(page);
29 __free_page(page);
45 * If we have taken up all the fragments mark PTE page NULL
58 struct page *page;
61 page = alloc_page(PGALLOC_GFP | __GFP_ACCOUNT);
62 if (!page)
64 if (!pgtable_pte_page_ctor(page)) {
65 __free_page(page);
69 page = alloc_page(PGALLOC_GFP);
70 if (!page)
74 atomic_set(&page->pt_frag_refcount, 1);
76 ret = page_address(page);
79 * allocated page.
86 * the allocated page with single fragement
90 atomic_set(&page->pt_frag_refcount, PTE_FRAG_NR);
111 struct page *page = virt_to_page(table);
113 if (PageReserved(page))
114 return free_reserved_page(page);
116 BUG_ON(atomic_read(&page->pt_frag_refcount) <= 0);
117 if (atomic_dec_and_test(&page->pt_frag_refcount)) {
119 pgtable_pte_page_dtor(page);
120 __free_page(page);