* fix oops in dma_unmap_page on not coherent mips platforms
@ 2008-11-28 7:52 Jan Nikitenko
2008-12-26 15:07 ` Atsushi Nemoto
2009-03-13 23:00 ` Ralf Baechle
0 siblings, 2 replies; 4+ messages in thread
From: Jan Nikitenko @ 2008-11-28 7:52 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
dma_cache_wback_inv() expects virtual address, but physical was provided
due to translation via plat_dma_addr_to_phys().
If replaced with dma_addr_to_virt(), page fault oops from dma_unmap_page()
is gone on au1550 platform.
Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
---
arch/mips/mm/dma-default.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 5b98d0e..5f336c1 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -222,7 +222,7 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) {
unsigned long addr;
- addr = plat_dma_addr_to_phys(dma_address);
+ addr = dma_addr_to_virt(dma_address);
dma_cache_wback_inv(addr, size);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: fix oops in dma_unmap_page on not coherent mips platforms
2008-11-28 7:52 fix oops in dma_unmap_page on not coherent mips platforms Jan Nikitenko
@ 2008-12-26 15:07 ` Atsushi Nemoto
2009-03-13 23:00 ` Ralf Baechle
1 sibling, 0 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2008-12-26 15:07 UTC (permalink / raw)
To: jan.nikitenko; +Cc: ralf, linux-mips
On Fri, 28 Nov 2008 08:52:58 +0100, Jan Nikitenko <jan.nikitenko@gmail.com> wrote:
> dma_cache_wback_inv() expects virtual address, but physical was provided
> due to translation via plat_dma_addr_to_phys().
> If replaced with dma_addr_to_virt(), page fault oops from dma_unmap_page()
> is gone on au1550 platform.
>
> Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
> ---
> arch/mips/mm/dma-default.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
> index 5b98d0e..5f336c1 100644
> --- a/arch/mips/mm/dma-default.c
> +++ b/arch/mips/mm/dma-default.c
> @@ -222,7 +222,7 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
> if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) {
> unsigned long addr;
>
> - addr = plat_dma_addr_to_phys(dma_address);
> + addr = dma_addr_to_virt(dma_address);
> dma_cache_wback_inv(addr, size);
> }
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
I'm also wondering why dma_map_page and dma_unmap_page are using
dma_cache_wback_inv instead of __dma_sync. They also lack special
r10000 handling. Hmm...
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fix oops in dma_unmap_page on not coherent mips platforms
2008-11-28 7:52 fix oops in dma_unmap_page on not coherent mips platforms Jan Nikitenko
2008-12-26 15:07 ` Atsushi Nemoto
@ 2009-03-13 23:00 ` Ralf Baechle
2009-03-14 16:17 ` Atsushi Nemoto
1 sibling, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2009-03-13 23:00 UTC (permalink / raw)
To: Jan Nikitenko; +Cc: linux-mips, Atsushi Nemoto
> dma_cache_wback_inv() expects virtual address, but physical was provided
> due to translation via plat_dma_addr_to_phys().
> If replaced with dma_addr_to_virt(), page fault oops from dma_unmap_page()
> is gone on au1550 platform.
>
> Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Applied, finally ...
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fix oops in dma_unmap_page on not coherent mips platforms
2009-03-13 23:00 ` Ralf Baechle
@ 2009-03-14 16:17 ` Atsushi Nemoto
0 siblings, 0 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2009-03-14 16:17 UTC (permalink / raw)
To: ralf; +Cc: jan.nikitenko, linux-mips
On Sat, 14 Mar 2009 00:00:49 +0100, Ralf Baechle <ralf@linux-mips.org> wrote:
> > dma_cache_wback_inv() expects virtual address, but physical was provided
> > due to translation via plat_dma_addr_to_phys().
> > If replaced with dma_addr_to_virt(), page fault oops from dma_unmap_page()
> > is gone on au1550 platform.
> >
> > Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
>
> Applied, finally ...
Good news!
And please take a look at this too:
http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=1232638931-6203-1-git-send-email-anemo%40mba.ocn.ne.jp
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-14 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-28 7:52 fix oops in dma_unmap_page on not coherent mips platforms Jan Nikitenko
2008-12-26 15:07 ` Atsushi Nemoto
2009-03-13 23:00 ` Ralf Baechle
2009-03-14 16:17 ` Atsushi Nemoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.