diff options
author | LCPD Auto Merger <lcpd_integration@list.ti.com> | 2018-09-03 09:08:47 -0500 |
---|---|---|
committer | LCPD Auto Merger <lcpd_integration@list.ti.com> | 2018-09-03 09:08:47 -0500 |
commit | 47383914548a4d219dd0670c756951d11e1f06d2 (patch) | |
tree | fc5b1d076622040f24cae9f5c947c8e303d725e1 | |
parent | cf63b764bdea23417d60e1e8158c6f01e8846014 (diff) | |
parent | a812e2067684fc9808907b634bb300c1d6065c4d (diff) | |
download | omap-omapzoom-47383914548a4d219dd0670c756951d11e1f06d2.tar.gz |
Merge branch 'rpmsg-ti-linux-4.9.y-intg' of git://git.ti.com/rpmsg/rpmsg into ti-linux-4.9.y
TI-Feature: rpmsg
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.9.y-intg
* 'rpmsg-ti-linux-4.9.y-intg' of git://git.ti.com/rpmsg/rpmsg:
remoteproc: fix cleanup on firmware version processing failures
remoteproc: fix kernel crashes for rprocs using HighMem CMA pools
iommu/omap: Fix cache flushes on L2 page table entries
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
-rw-r--r-- | drivers/iommu/omap-iommu.c | 4 | ||||
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index f113a10a888b..914204806fba 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -557,7 +557,7 @@ static u32 *iopte_alloc(struct omap_iommu *obj, u32 *iopgd, pte_ready: iopte = iopte_offset(iopgd, da); - *pt_dma = virt_to_phys(iopte); + *pt_dma = iopgd_page_paddr(iopgd); dev_vdbg(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n", __func__, da, iopgd, *iopgd, iopte, *iopte); @@ -745,7 +745,7 @@ static size_t iopgtable_clear_entry_core(struct omap_iommu *obj, u32 da) } bytes *= nent; memset(iopte, 0, nent * sizeof(*iopte)); - pt_dma = virt_to_phys(iopte); + pt_dma = iopgd_page_paddr(iopgd); flush_iopte_range(obj->dev, pt_dma, pt_offset, nent); /* diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 4e8978dc68f1..99a1a5823294 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1088,6 +1088,7 @@ static void rproc_resource_cleanup(struct rproc *rproc) /* free fw version */ kfree(rproc->fw_version); + rproc->fw_version = NULL; } /* @@ -1160,7 +1161,7 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) if (ret) { dev_err(dev, "Failed to process version info: %d\n", ret); - goto clean_up; + goto clean_up_resources; } } @@ -1194,14 +1195,14 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) if (ret) { dev_err(dev, "Failed to process post-loading resources: %d\n", ret); - goto clean_up; + goto reset_loaded_table; } /* power up the remote processor */ ret = rproc->ops->start(rproc); if (ret) { dev_err(dev, "can't start rproc %s: %d\n", rproc->name, ret); - goto clean_up_resources; + goto reset_loaded_table; } /* probe any subdevices for the remote processor */ @@ -1220,6 +1221,8 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) stop_rproc: rproc->ops->stop(rproc); +reset_loaded_table: + rproc->table_ptr = rproc->cached_table; clean_up_resources: rproc_resource_cleanup(rproc); clean_up: @@ -1469,6 +1472,9 @@ void rproc_shutdown(struct rproc *rproc) goto out; } + /* the installed resource table may no longer be accessible */ + rproc->table_ptr = rproc->cached_table; + /* clean up all acquired resources */ rproc_resource_cleanup(rproc); |