diff options
| author | Mostafa Saleh <smostafa@google.com> | 2026-01-20 09:19:25 +0000 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2026-01-21 12:51:48 +0100 |
| commit | d414b83dc5f90a6a9a656cd6fbb9378ddc824032 (patch) | |
| tree | bafa8ac6600f082fd46beff9a54573e4c7ec2ba1 /include | |
| parent | 2e2f6b0ef8551bf3bd8255729d27e3ad9451e562 (diff) | |
mm/page_ext: Add page_ext_get_from_phys()
The IOMMU code operates on physical addresses which can be outside
of system RAM.
Add a new function page_ext_get_from_phys() to abstract the logic of
checking the address and returning the page_ext.
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/page_ext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h index 76c817162d2f..61e876e255e8 100644 --- a/include/linux/page_ext.h +++ b/include/linux/page_ext.h @@ -93,6 +93,7 @@ static inline bool page_ext_iter_next_fast_possible(unsigned long next_pfn) #endif extern struct page_ext *page_ext_get(const struct page *page); +extern struct page_ext *page_ext_from_phys(phys_addr_t phys); extern void page_ext_put(struct page_ext *page_ext); extern struct page_ext *page_ext_lookup(unsigned long pfn); @@ -215,6 +216,11 @@ static inline struct page_ext *page_ext_get(const struct page *page) return NULL; } +static inline struct page_ext *page_ext_from_phys(phys_addr_t phys) +{ + return NULL; +} + static inline void page_ext_put(struct page_ext *page_ext) { } |
