iommu/amd: Introduce first_pte_l7() helper
authorAndrei Dulea <adulea@amazon.de>
Fri, 13 Sep 2019 14:42:30 +0000 (16:42 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 24 Sep 2019 09:15:46 +0000 (11:15 +0200)
commit7f1f1683c1e27c280556766cfd2c219957cebe4f
tree946b5da79e9b8ae988fca051d87a8cf47cf61e01
parent6ccb72f8374e17d60b58a7bfd5570496332c54e2
iommu/amd: Introduce first_pte_l7() helper

Given an arbitrary pte that is part of a large mapping, this function
returns the first pte of the series (and optionally the mapped size and
number of PTEs)
It will be re-used in a subsequent patch to replace an existing L7
mapping.

Fixes: 6d568ef9a622 ("iommu/amd: Allow downgrading page-sizes in alloc_pte()")
Signed-off-by: Andrei Dulea <adulea@amazon.de>
drivers/iommu/amd_iommu.c