mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge "coresight: tmc: clear has_iommu flag when smmu is bypassed"
This commit is contained in:
commit
084a5df97c
1 changed files with 14 additions and 1 deletions
|
|
@ -824,9 +824,22 @@ static struct etr_buf *tmc_alloc_etr_buf(struct tmc_drvdata *drvdata,
|
|||
bool has_sg, has_catu;
|
||||
struct etr_buf *etr_buf;
|
||||
struct device *dev = &drvdata->csdev->dev;
|
||||
int s1_bypass = 0;
|
||||
struct iommu_domain *domain;
|
||||
|
||||
has_etr_sg = tmc_etr_has_cap(drvdata, TMC_ETR_SG);
|
||||
has_iommu = iommu_get_domain_for_dev(dev->parent);
|
||||
domain = iommu_get_domain_for_dev(dev->parent);
|
||||
if (domain) {
|
||||
iommu_domain_get_attr(domain, DOMAIN_ATTR_S1_BYPASS,
|
||||
&s1_bypass);
|
||||
if (s1_bypass)
|
||||
has_iommu = false;
|
||||
else
|
||||
has_iommu = true;
|
||||
} else {
|
||||
has_iommu = false;
|
||||
}
|
||||
|
||||
has_catu = !!tmc_etr_get_catu_device(drvdata);
|
||||
|
||||
has_sg = has_catu || has_etr_sg;
|
||||
|
|
|
|||
Loading…
Reference in a new issue