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
186 unsigned long start;186 unsigned long start;
187 unsigned long end;187 unsigned long end;
188 size_t pgsize;188 size_t pgsize;
189 struct page *freelist;189 struct list_head freelist;
190 bool queued;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 *gather = (struct iommu_iotlb_gather) {400 *gather = (struct iommu_iotlb_gather) {
401 .start = ULONG_MAX,401 .start = ULONG_MAX,
402 .freelist = LIST_HEAD_INIT(gather->freelist),
402 };403 };
403}404}
404 405
include/linux/iova.h+2−2
@@ -46,7 +46,7 @@ struct iova_rcache { · 45 unmodified lines
46struct iova_fq_entry {46struct iova_fq_entry {
47 unsigned long iova_pfn;47 unsigned long iova_pfn;
48 unsigned long pages;48 unsigned long pages;
49 struct page *freelist;49 struct list_head freelist;
50 u64 counter; /* Flush counter when this entrie was added */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 unsigned long size);135 unsigned long size);
136void queue_iova(struct iova_domain *iovad,136void queue_iova(struct iova_domain *iovad,
137 unsigned long pfn, unsigned long pages,137 unsigned long pfn, unsigned long pages,
138 struct page *freelist);138 struct list_head *freelist);
139unsigned long alloc_iova_fast(struct iova_domain *iovad, unsigned long size,139unsigned long alloc_iova_fast(struct iova_domain *iovad, unsigned long size,
140 unsigned long limit_pfn, bool flush_rcache);140 unsigned long limit_pfn, bool flush_rcache);
141struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo,141struct 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