X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fjogo.git;a=blobdiff_plain;f=target%2Flinux%2Flayerscape%2Fpatches-4.9%2F810-iommu-support-layerscape.patch;h=d467a913dba70b0291bd3db9b934dba31254ed3b;hp=afd29e4fe2b2a3dea5b6d1b845d0bb1466e7ebbb;hb=3caf940cc6f2fbaf34ab663f7fdd14ca562dd770;hpb=17e90d88e2e1973055f793033753960c9384c17d diff --git a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch index afd29e4fe2..d467a913db 100644 --- a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch @@ -214,7 +214,7 @@ Signed-off-by: Yangbo Lu for (i = 0; i < nent; ++i) { arm_smmu_write_strtab_ent(NULL, -1, strtab, &ste); -@@ -1364,8 +1374,6 @@ static bool arm_smmu_capable(enum iommu_ +@@ -1365,8 +1375,6 @@ static bool arm_smmu_capable(enum iommu_ switch (cap) { case IOMMU_CAP_CACHE_COHERENCY: return true; @@ -223,7 +223,7 @@ Signed-off-by: Yangbo Lu case IOMMU_CAP_NOEXEC: return true; default: -@@ -1377,7 +1385,9 @@ static struct iommu_domain *arm_smmu_dom +@@ -1378,7 +1386,9 @@ static struct iommu_domain *arm_smmu_dom { struct arm_smmu_domain *smmu_domain; @@ -234,7 +234,7 @@ Signed-off-by: Yangbo Lu return NULL; /* -@@ -1508,6 +1518,11 @@ static int arm_smmu_domain_finalise(stru +@@ -1509,6 +1519,11 @@ static int arm_smmu_domain_finalise(stru struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct arm_smmu_device *smmu = smmu_domain->smmu; @@ -246,7 +246,7 @@ Signed-off-by: Yangbo Lu /* Restrict the stage to what we can actually support */ if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S1)) smmu_domain->stage = ARM_SMMU_DOMAIN_S2; -@@ -1580,7 +1595,7 @@ static __le64 *arm_smmu_get_step_for_sid +@@ -1581,7 +1596,7 @@ static __le64 *arm_smmu_get_step_for_sid return step; } @@ -255,7 +255,7 @@ Signed-off-by: Yangbo Lu { int i, j; struct arm_smmu_master_data *master = fwspec->iommu_priv; -@@ -1599,17 +1614,14 @@ static int arm_smmu_install_ste_for_dev( +@@ -1600,17 +1615,14 @@ static int arm_smmu_install_ste_for_dev( arm_smmu_write_strtab_ent(smmu, sid, step, &master->ste); } @@ -275,7 +275,7 @@ Signed-off-by: Yangbo Lu } static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) -@@ -1628,7 +1640,7 @@ static int arm_smmu_attach_dev(struct io +@@ -1629,7 +1641,7 @@ static int arm_smmu_attach_dev(struct io ste = &master->ste; /* Already attached to a different domain? */ @@ -284,7 +284,7 @@ Signed-off-by: Yangbo Lu arm_smmu_detach_dev(dev); mutex_lock(&smmu_domain->init_mutex); -@@ -1649,10 +1661,12 @@ static int arm_smmu_attach_dev(struct io +@@ -1650,10 +1662,12 @@ static int arm_smmu_attach_dev(struct io goto out_unlock; } @@ -300,7 +300,7 @@ Signed-off-by: Yangbo Lu ste->s1_cfg = &smmu_domain->s1_cfg; ste->s2_cfg = NULL; arm_smmu_write_ctx_desc(smmu, ste->s1_cfg); -@@ -1661,10 +1675,7 @@ static int arm_smmu_attach_dev(struct io +@@ -1662,10 +1676,7 @@ static int arm_smmu_attach_dev(struct io ste->s2_cfg = &smmu_domain->s2_cfg; } @@ -312,7 +312,7 @@ Signed-off-by: Yangbo Lu out_unlock: mutex_unlock(&smmu_domain->init_mutex); return ret; -@@ -1695,6 +1706,9 @@ arm_smmu_unmap(struct iommu_domain *doma +@@ -1696,6 +1707,9 @@ arm_smmu_unmap(struct iommu_domain *doma struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct io_pgtable_ops *ops = smmu_domain->pgtbl_ops; @@ -322,7 +322,7 @@ Signed-off-by: Yangbo Lu if (!ops) return 0; -@@ -1810,7 +1824,7 @@ static void arm_smmu_remove_device(struc +@@ -1811,7 +1825,7 @@ static void arm_smmu_remove_device(struc return; master = fwspec->iommu_priv; @@ -331,7 +331,7 @@ Signed-off-by: Yangbo Lu arm_smmu_detach_dev(dev); iommu_group_remove_device(dev); kfree(master); -@@ -1839,6 +1853,9 @@ static int arm_smmu_domain_get_attr(stru +@@ -1840,6 +1854,9 @@ static int arm_smmu_domain_get_attr(stru { struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); @@ -341,7 +341,7 @@ Signed-off-by: Yangbo Lu switch (attr) { case DOMAIN_ATTR_NESTING: *(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED); -@@ -1854,6 +1871,9 @@ static int arm_smmu_domain_set_attr(stru +@@ -1855,6 +1872,9 @@ static int arm_smmu_domain_set_attr(stru int ret = 0; struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); @@ -351,7 +351,7 @@ Signed-off-by: Yangbo Lu mutex_lock(&smmu_domain->init_mutex); switch (attr) { -@@ -1883,6 +1903,31 @@ static int arm_smmu_of_xlate(struct devi +@@ -1884,6 +1904,31 @@ static int arm_smmu_of_xlate(struct devi return iommu_fwspec_add_ids(dev, args->args, 1); } @@ -383,7 +383,7 @@ Signed-off-by: Yangbo Lu static struct iommu_ops arm_smmu_ops = { .capable = arm_smmu_capable, .domain_alloc = arm_smmu_domain_alloc, -@@ -1898,6 +1943,8 @@ static struct iommu_ops arm_smmu_ops = { +@@ -1899,6 +1944,8 @@ static struct iommu_ops arm_smmu_ops = { .domain_get_attr = arm_smmu_domain_get_attr, .domain_set_attr = arm_smmu_domain_set_attr, .of_xlate = arm_smmu_of_xlate,