History

iommu/vt-d: Use put_pages_list

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().

Matthew Wilcox (Oracle) committed 4 years ago

Commit 87f60cc1 parent ce00eec5 files · +45 −79Browse files

Showing the changes to include (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/iommu.h +2 −1
  2. include/linux/iova.h +2 −2
include/linux/iommu.h+2−1
@@ -186,7 +186,7 @@ struct iommu_iotlb_gather { · 185 unmodified lines
186186 unsigned long start;
187187 unsigned long end;
188188 size_t pgsize;
189− struct page *freelist;
189+ struct list_head freelist;
190190 bool queued;
191191 };
192192
@@ -399,6 +399,7 @@ static inline void iommu_iotlb_gather_init(struct iommu_iotlb_gather *gather) · 206 unmodified lines
399399 {
400400 *gather = (struct iommu_iotlb_gather) {
401401 .start = ULONG_MAX,
402+ .freelist = LIST_HEAD_INIT(gather->freelist),
402403 };
403404 }
404405
include/linux/iova.h+2−2
@@ -46,7 +46,7 @@ struct iova_rcache { · 45 unmodified lines
4646 struct iova_fq_entry {
4747 unsigned long iova_pfn;
4848 unsigned long pages;
49− struct page *freelist;
49+ struct list_head freelist;
5050 u64 counter; /* Flush counter when this entrie was added */
5151 };
5252
@@ -135,7 +135,7 @@ void free_iova_fast(struct iova_domain *iovad, unsigned long pfn, · 82 unmodified lines
135135 unsigned long size);
136136 void queue_iova(struct iova_domain *iovad,
137137 unsigned long pfn, unsigned long pages,
138− struct page *freelist);
138+ struct list_head *freelist);
139139 unsigned long alloc_iova_fast(struct iova_domain *iovad, unsigned long size,
140140 unsigned long limit_pfn, bool flush_rcache);
141141 struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t