page->freelist is for the use of slab. We already have the ability to free a list of pages in the core mm, but it requires the use of a list_head and for the pages to be chained together through page->lru. Switch the Intel IOMMU and IOVA code over to using free_pages_list().
Showing the changes to include (2 of 5 files). Show all
Unified · Split
| @@ -186,7 +186,7 @@ struct iommu_iotlb_gather { · 185 unmodified lines | ||
| 186 | 186 | unsigned long start; |
| 187 | 187 | unsigned long end; |
| 188 | 188 | size_t pgsize; |
| 189 | − struct page *freelist; | |
| 189 | + struct list_head freelist; | |
| 190 | 190 | bool queued; |
| 191 | 191 | }; |
| 192 | 192 | |
| @@ -399,6 +399,7 @@ static inline void iommu_iotlb_gather_init(struct iommu_iotlb_gather *gather) · 206 unmodified lines | ||
| 399 | 399 | { |
| 400 | 400 | *gather = (struct iommu_iotlb_gather) { |
| 401 | 401 | .start = ULONG_MAX, |
| 402 | + .freelist = LIST_HEAD_INIT(gather->freelist), | |
| 402 | 403 | }; |
| 403 | 404 | } |
| 404 | 405 | |
| @@ -46,7 +46,7 @@ struct iova_rcache { · 45 unmodified lines | ||
| 46 | 46 | struct iova_fq_entry { |
| 47 | 47 | unsigned long iova_pfn; |
| 48 | 48 | unsigned long pages; |
| 49 | − struct page *freelist; | |
| 49 | + struct list_head freelist; | |
| 50 | 50 | u64 counter; /* Flush counter when this entrie was added */ |
| 51 | 51 | }; |
| 52 | 52 | |
| @@ -135,7 +135,7 @@ void free_iova_fast(struct iova_domain *iovad, unsigned long pfn, · 82 unmodified lines | ||
| 135 | 135 | unsigned long size); |
| 136 | 136 | void queue_iova(struct iova_domain *iovad, |
| 137 | 137 | unsigned long pfn, unsigned long pages, |
| 138 | − struct page *freelist); | |
| 138 | + struct list_head *freelist); | |
| 139 | 139 | unsigned long alloc_iova_fast(struct iova_domain *iovad, unsigned long size, |
| 140 | 140 | unsigned long limit_pfn, bool flush_rcache); |
| 141 | 141 | struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo, |