lkml.org 
[lkml]   [2012]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] NVMe: Fix compilation on architecturs without readq/writeq
On Tue, 31 Jan 2012 13:09:22 +0100
Ingo Molnar <mingo@elte.hu> wrote:

>
> * Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> > > u64 val;
> > > val = readl(addr);
> > > val |= readl(addr+4) << 32;
> > >
> > > is well-defined and must read the low word first - both at the C level
> > > *and* at the CPU level. Anything else would be a bug in the
> > > architecture "readl()" implementation or the hardware.
> >
> > That doesn't make the access atomic to hardware however as a true 64bit
> > readq/writeq would be ?
> >
> > It seems to me the two are not quite the same semantically
>
> Correct, and that's what the:
>
> #include <asm/io-inatomic.h>
>
> line in the driver would express.

Why would "inatomic" indicate that - I'm confused. It would imply to me
they were extra specially atomic ?

(atomos if from the Greek so in- as a prefix isn't the same in- as in
many other words, welcome to English hell - who needs perl)

non-atomic.h might be better, or 'un-atomic' or 'multi-read' or
something ?

Alan


\
 
 \ /
  Last update: 2012-01-31 13:19    [W:0.065 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site