b/drivers/staging/tidspbridge/core/io_sm.c
@@ -541,6 +541,14 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
ae_proc[ndx].ul_dsp_va *
hio_mgr->word_size, page_size[i]);
ndx++;
+ } else {
+ u32 tmp_curr;
+ tmp_curr = iommu_kmap(mmu, va_curr, pa_curr, page_size[i],
+ IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_32);
+ if (IS_ERR_VALUE(tmp_curr)) {
+ status = (int)tmp_curr;
+ goto func_end;
+ }
}
pa_curr += page_size[i];
va_curr += page_size[i];
@@ -593,6 +601,15 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
"DSP_VA 0x%x\n", ae_proc[ndx].ul_gpp_pa,
ae_proc[ndx].ul_dsp_va);
ndx++;
+ } else {
+ u32 tmp_curr;
+ tmp_curr = iommu_kmap(mmu,
+ hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt,
+ hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys,
+ 0x100000,
+ IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_32);
+ if (IS_ERR_VALUE(tmp_curr))
+ status = (int)tmp_curr;
}
}
if (status)
b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -1195,7 +1195,7 @@ static int get_io_pages(struct mm_struct *mm,
u32 uva, unsigned pages,
struct page *pg;
for (i = 0; i < pages; i++) {
- pa = user_va2_pa(mm, uva);
+ pa = user_va2_pa(mm, uva + i * PAGE_SIZE);
if (!pfn_valid(__phys_to_pfn(pa)))