Re: PATCH: EDAC atomic scrub operations

From: Alan Cox
Date: Sat Oct 15 2005 - 14:15:57 EST


On Sad, 2005-10-15 at 21:05 +0200, Avi Kivity wrote:
> >+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?


Should be u32 * for the address used. Well spotted.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/