[Top] [All Lists]

Re: atomic_add function on memory allocated with dma_alloc_coherent hang

To: Riisisulg <>
Subject: Re: atomic_add function on memory allocated with dma_alloc_coherent hangs
From: Ralf Baechle <>
Date: Tue, 17 Jan 2006 12:10:18 +0000
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/
On Tue, Jan 17, 2006 at 11:40:53AM +0200, Riisisulg wrote:

> Hello. I'm using AMD Alchemy db1550 with au1550, it has 2.6.15 kernel
> patched with linux-, i have compiled cross compiler
> for the platform (but not checked it for correctness)
> since db1550 does not have USB2.0 but instead has two PCI slots, i
> installed NEC's PCI to USB 2.0 host controller board to it. I was able
> to load ehci-hcd driver with success but after the usb mass storage
> device was inserted the system hanged. 
> After debugging a while i found out that function atomic_add did not
> return. I run few tests where atomic add asm code was alerted and got
> confidence that sc instruction did not never succeed so the cycle was
> repeating forever.

The operation of ll/sc is undefined on uncached memory; non-coherent
MIPS systems - that is most embedded MIPS systems - will return non
cache-coherent memory for dma_alloc_coherent.  Yes, the naming sucks,
dma_alloc_{non}coherent do the opposite of what their name is.


<Prev in Thread] Current Thread [Next in Thread>