Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ad0b1ae authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

iommu/arm-smmu: implement DOMAIN_ATTR_PT_BASE_ADDR using ttbr[0]



Some clients need to get the base address of the page table for a given
IOMMU domain.  This functionality is provided by the
DOMAIN_ATTR_PT_BASE_ADDR domain attribute.  Implement it in the ARM SMMU
driver by returning ttbr[0] from the page table config.

Change-Id: Ie9b0241c7c7df18b25761bae79c1be1a283ff3a4
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 728b71eb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1684,6 +1684,10 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
		*((int *)data) = !!(smmu_domain->attributes &
				(1 << DOMAIN_ATTR_COHERENT_HTW_DISABLE));
		return 0;
	case DOMAIN_ATTR_PT_BASE_ADDR:
		*((phys_addr_t *)data) =
			smmu_domain->pgtbl_cfg.arm_lpae_s1_cfg.ttbr[0];
		return 0;
	default:
		return -ENODEV;
	}