Skip to content

Commit 354440a

Browse files
snitsjoergroedel
authored andcommitted
iommu/amd: Use page mode macros in fetch_pte()
Use the page mode macros instead of magic numbers in fetch_pte. Cc: Robin Murphy <[email protected]> Cc: Will Deacon <[email protected]> Cc: Suravee Suthikulpanit <[email protected]> Cc: Joerg Roedel <[email protected]> Signed-off-by: Jerry Snitselaar <[email protected]> Reviewed-by: Vasant Hegde <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 44c026a commit 354440a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/amd/io_pgtable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ static u64 *fetch_pte(struct amd_io_pgtable *pgtable,
310310
return NULL;
311311

312312
/* Large PTE */
313-
if (PM_PTE_LEVEL(*pte) == 7 ||
314-
PM_PTE_LEVEL(*pte) == 0)
313+
if (PM_PTE_LEVEL(*pte) == PAGE_MODE_7_LEVEL ||
314+
PM_PTE_LEVEL(*pte) == PAGE_MODE_NONE)
315315
break;
316316

317317
/* No level skipping support yet */

0 commit comments

Comments
 (0)