Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 1 Feb 2012 15:35:41 -0800 | Subject | Re: [PATCH] NVMe: Fix compilation on architecturs without readq/writeq |
| |
On Tue, Jan 31, 2012 at 4:23 AM, Ingo Molnar <mingo@elte.hu> wrote: > > non-atomic sounds good to me too.
You both apparently missed the related discussion that some devices really do care about order, even if they don't care about atomicity.
So we'd actually have two versions of the header file, one little-endian, and one big-endian. Then the driver that knows it doesn't need the atomic 'readq()' that is always defined, but wants a low-bytes-first version would just do
#include <linux/io64-little-endian.h>
(or "big-endian" if it wants to read/write high bits first). Most drivers probably don't care, but apparently NVMe does.
Linus
| |