[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTin+n8KsHz2jTtkbk2MnuiANrxpskThYU9FVu3CE@mail.gmail.com>
Date: Mon, 18 Oct 2010 01:36:32 +0300
From: Felipe Contreras <felipe.contreras@...il.com>
To: Fernando Guzman Lugo <x0095840@...com>
Cc: gregkh@...e.de, felipe.contreras@...ia.com,
ameya.palande@...ia.com, nm@...com, Hiroshi.DOYU@...ia.com,
ohad@...ery.com, linux-kernel@...r.kernel.org,
andy.shevchenko@...il.com, linux-omap@...r.kernel.org
Subject: Re: [PATCHv3 01/11] staging: tidspbridge: replace iommu custom for
opensource implementation
On Tue, Oct 5, 2010 at 11:35 PM, Fernando Guzman Lugo <x0095840@...com> wrote:
> Now the tidspbridge uses the API's from
> iovmm module.
>
> Signed-off-by: Fernando Guzman Lugo <x0095840@...com>
NAK. This patch doesn't work... I guess it's supposed to.
So far I've found these errors, but it still doesn't work, maybe we
should start thinking of reverting the whole iommu stuff:
diff --git a/drivers/staging/tidspbridge/core/io_sm.c
b/drivers/staging/tidspbridge/core/io_sm.c
index 842b8db..16cf246 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ 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)
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c
b/drivers/staging/tidspbridge/core/tiomap3430.c
index c2f5105..92774fc 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ 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)))
break;
--
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists