Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Riisisulg <riisisulg@hot.ee>
Cc: linux-mips@linux-mips.org
Subject: Re: atomic_add function on memory allocated with dma_alloc_coherent hangs
Date: Tue, 17 Jan 2006 12:10:18 +0000	[thread overview]
Message-ID: <20060117121018.GA3336@linux-mips.org> (raw)
In-Reply-To: <20060117094053.D0DFBAF060@mh3-4.hot.ee>

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-2.6.14.5-mips-1.patch, 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.

  Ralf

  reply	other threads:[~2006-01-17 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17  9:40 atomic_add function on memory allocated with dma_alloc_coherent hangs Riisisulg
2006-01-17 12:10 ` Ralf Baechle [this message]
2006-01-17 13:08   ` Riisisulg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060117121018.GA3336@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=riisisulg@hot.ee \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox