diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-12 21:02:03 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-12 21:02:03 +0300 |
commit | b53966ffd4c0676c02987d4fc33b99bdfc548cf0 (patch) | |
tree | 551926f0b9bfe27ecc4c609d10192e0cf447ace7 /include | |
parent | b01deddb8d3cb779ac250978afd200931fd91dcd (diff) | |
parent | ee32f32335e8c7f6154bf397f4ac9b6175b488a8 (diff) | |
download | linux-b53966ffd4c0676c02987d4fc33b99bdfc548cf0.tar.xz |
Merge tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross:
"A short series fixing a regression introduced in 5.9 for running as
Xen dom0 on a system with NVMe backed storage"
* tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen: don't use page->lru for ZONE_DEVICE memory
xen: add helpers for caching grant mapping pages
Diffstat (limited to 'include')
-rw-r--r-- | include/xen/grant_table.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index 9bc5bc07d4d3..b9c937b3a149 100644 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h @@ -198,6 +198,23 @@ void gnttab_free_auto_xlat_frames(void); int gnttab_alloc_pages(int nr_pages, struct page **pages); void gnttab_free_pages(int nr_pages, struct page **pages); +struct gnttab_page_cache { + spinlock_t lock; +#ifdef CONFIG_XEN_UNPOPULATED_ALLOC + struct page *pages; +#else + struct list_head pages; +#endif + unsigned int num_pages; +}; + +void gnttab_page_cache_init(struct gnttab_page_cache *cache); +int gnttab_page_cache_get(struct gnttab_page_cache *cache, struct page **page); +void gnttab_page_cache_put(struct gnttab_page_cache *cache, struct page **page, + unsigned int num); +void gnttab_page_cache_shrink(struct gnttab_page_cache *cache, + unsigned int num); + #ifdef CONFIG_XEN_GRANT_DMA_ALLOC struct gnttab_dma_alloc_args { /* Device for which DMA memory will be/was allocated. */ |