mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Linux kernel <linux-kernel@vger.kernel.org>
Subject: ix86 Atomic ops during DMA...
Date: Mon, 9 Aug 2004 08:22:28 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0408090809520.7612@chaos> (raw)


Hello,

A piece of hardware needs its interrupt status written back
to its status register to "clear" interrupts and thus enable
more.. This is in an uninterruptible ISR. This, of course
can be readily accomplished by using the standard readl() and
writel() macros.........but! If a DMA is in progress, a hardware
debugger shows many milliseconds between the read and the write.

This allows a race condition to exist. So, how do I lock the bus
during the read and write?  A lock on ix86 locks only the
next instruction, not the next plus time for another lock
which appears to be needed.

	I need...

	movl (%ebx), %eax	# Read status from register in ebx
	movl %eax, (%ebx)	# Write it back

..to occur together without the bus being taken away by a DMA
 operation until these two instructions are complete.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
            Note 96.31% of all statistics are fiction.



             reply	other threads:[~2004-08-09 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 12:22 Richard B. Johnson [this message]
2004-08-09 12:31 ` Bart Hartgers
2004-08-09 12:38 ` Brian Gerst

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=Pine.LNX.4.53.0408090809520.7612@chaos \
    --to=root@chaos.analogic.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®