Skip to content

Commit 1895425

Browse files
ssuthiku-amdjoergroedel
authored andcommitted
iommu/amd: Move IO page table related functions
Preparing to migrate to use IO page table framework. There is no functional change. Signed-off-by: Suravee Suthikulpanit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent f9b4df7 commit 1895425

File tree

3 files changed

+493
-474
lines changed

3 files changed

+493
-474
lines changed

drivers/iommu/amd/amd_iommu.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,22 @@ void amd_iommu_apply_ivrs_quirks(void);
131131
static inline void amd_iommu_apply_ivrs_quirks(void) { }
132132
#endif
133133

134+
/* TODO: These are temporary and will be removed once fully transition */
135+
extern void free_pagetable(struct domain_pgtable *pgtable);
136+
extern int iommu_map_page(struct protection_domain *dom,
137+
unsigned long bus_addr,
138+
unsigned long phys_addr,
139+
unsigned long page_size,
140+
int prot,
141+
gfp_t gfp);
142+
extern unsigned long iommu_unmap_page(struct protection_domain *dom,
143+
unsigned long bus_addr,
144+
unsigned long page_size);
145+
extern u64 *fetch_pte(struct protection_domain *domain,
146+
unsigned long address,
147+
unsigned long *page_size);
148+
extern void amd_iommu_domain_get_pgtable(struct protection_domain *domain,
149+
struct domain_pgtable *pgtable);
150+
extern void amd_iommu_domain_set_pgtable(struct protection_domain *domain,
151+
u64 *root, int mode);
134152
#endif

0 commit comments

Comments
 (0)