From: Avi Kivity <avi@argo.co.il>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: PATCH: EDAC atomic scrub operations
Date: Sat, 15 Oct 2005 21:05:48 +0200 [thread overview]
Message-ID: <4351530C.3070907@argo.co.il> (raw)
In-Reply-To: <1129402528.17923.9.camel@localhost.localdomain>
Alan Cox wrote:
>linux-2.6.14-rc2-mm1/include/asm-x86_64/atomic.h
>--- linux.vanilla-2.6.14-rc2-mm1/include/asm-x86_64/atomic.h 2005-09-22 15:22:11.000000000 +0100
>+++ linux-2.6.14-rc2-mm1/include/asm-x86_64/atomic.h 2005-10-14 18:29:47.000000000 +0100
>@@ -378,4 +378,16 @@
> #define smp_mb__before_atomic_inc() barrier()
> #define smp_mb__after_atomic_inc() barrier()
>
>+/* ECC atomic, DMA, SMP and interrupt safe scrub function */
>+
>+static __inline__ void atomic_scrub(unsigned long *virt_addr, u32 size)
>+{
>+ u32 i;
>+ for (i = 0; i < size / 4; i++, virt_addr++)
>
>
(size+7) / 8? or increment virt_addr by 0.5? :)
>+ /* Very carefully read and write to memory atomically
>+ * so we are interrupt, DMA and SMP safe.
>+ */
>+ __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr));
>
>
shouldn't that be addq?
>+}
>+
> #endif
>
>
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2005-10-15 19:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-15 18:55 Alan Cox
2005-10-15 19:05 ` Avi Kivity [this message]
2005-10-15 19:44 ` Alan Cox
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=4351530C.3070907@argo.co.il \
--to=avi@argo.co.il \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--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®