Lines Matching full:page
15 * All page allocations that should be reported to as "iommu-pagetables" to
17 * page-tables and other per-iommu_domain configuration structures.
24 * __iommu_alloc_account - account for newly allocated page.
25 * @page: head struct page of the page.
26 * @order: order of the page
28 static inline void __iommu_alloc_account(struct page *page, int order) in __iommu_alloc_account() argument
32 mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, pgcnt); in __iommu_alloc_account()
33 mod_lruvec_page_state(page, NR_SECONDARY_PAGETABLE, pgcnt); in __iommu_alloc_account()
37 * __iommu_free_account - account a page that is about to be freed.
38 * @page: head struct page of the page.
39 * @order: order of the page
41 static inline void __iommu_free_account(struct page *page, int order) in __iommu_free_account() argument
45 mod_node_page_state(page_pgdat(page), NR_IOMMU_PAGES, -pgcnt); in __iommu_free_account()
46 mod_lruvec_page_state(page, NR_SECONDARY_PAGETABLE, -pgcnt); in __iommu_free_account()
50 * __iommu_alloc_pages - allocate a zeroed page of a given order.
52 * @order: page order
54 * returns the head struct page of the allocated page.
56 static inline struct page *__iommu_alloc_pages(gfp_t gfp, int order) in __iommu_alloc_pages()
58 struct page *page; in __iommu_alloc_pages() local
60 page = alloc_pages(gfp | __GFP_ZERO, order); in __iommu_alloc_pages()
61 if (unlikely(!page)) in __iommu_alloc_pages()
64 __iommu_alloc_account(page, order); in __iommu_alloc_pages()
66 return page; in __iommu_alloc_pages()
70 * __iommu_free_pages - free page of a given order
71 * @page: head struct page of the page
72 * @order: page order
74 static inline void __iommu_free_pages(struct page *page, int order) in __iommu_free_pages() argument
76 if (!page) in __iommu_free_pages()
79 __iommu_free_account(page, order); in __iommu_free_pages()
80 __free_pages(page, order); in __iommu_free_pages()
84 * iommu_alloc_pages_node - allocate a zeroed page of a given order from
88 * @order: page order
90 * returns the virtual address of the allocated page
94 struct page *page = alloc_pages_node(nid, gfp | __GFP_ZERO, order); in iommu_alloc_pages_node() local
96 if (unlikely(!page)) in iommu_alloc_pages_node()
99 __iommu_alloc_account(page, order); in iommu_alloc_pages_node()
101 return page_address(page); in iommu_alloc_pages_node()
105 * iommu_alloc_pages - allocate a zeroed page of a given order
107 * @order: page order
109 * returns the virtual address of the allocated page
113 struct page *page = __iommu_alloc_pages(gfp, order); in iommu_alloc_pages() local
115 if (unlikely(!page)) in iommu_alloc_pages()
118 return page_address(page); in iommu_alloc_pages()
122 * iommu_alloc_page_node - allocate a zeroed page at specific NUMA node.
126 * returns the virtual address of the allocated page
134 * iommu_alloc_page - allocate a zeroed page
137 * returns the virtual address of the allocated page
145 * iommu_free_pages - free page of a given order
146 * @virt: virtual address of the page to be freed.
147 * @order: page order
158 * iommu_free_page - free page
159 * @virt: virtual address of the page to be freed.
168 * @page: the head of the lru list to be freed.
172 * list once they are removed from the IOMMU page tables. However, they can
175 static inline void iommu_put_pages_list(struct list_head *page) in iommu_put_pages_list() argument
177 while (!list_empty(page)) { in iommu_put_pages_list()
178 struct page *p = list_entry(page->prev, struct page, lru); in iommu_put_pages_list()