iommu/amd: Use page mode macros in fetch_pte()
Use the page mode macros instead of magic numbers in fetch_pte. Cc: Robin Murphy <robin.murphy@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: Joerg Roedel <joro@8bytes.org> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20230420080718.523132-1-jsnitsel@redhat.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
44c026a73b
commit
354440a761
@ -310,8 +310,8 @@ static u64 *fetch_pte(struct amd_io_pgtable *pgtable,
|
||||
return NULL;
|
||||
|
||||
/* Large PTE */
|
||||
if (PM_PTE_LEVEL(*pte) == 7 ||
|
||||
PM_PTE_LEVEL(*pte) == 0)
|
||||
if (PM_PTE_LEVEL(*pte) == PAGE_MODE_7_LEVEL ||
|
||||
PM_PTE_LEVEL(*pte) == PAGE_MODE_NONE)
|
||||
break;
|
||||
|
||||
/* No level skipping support yet */
|
||||
|
Loading…
x
Reference in New Issue
Block a user