Re: [PATCH] NVMe: Fix compilation on architecturs without readq/writeq

From: H. Peter Anvin
Date: Mon Jan 23 2012 - 18:04:27 EST


On 01/23/2012 08:57 AM, Linus Torvalds wrote:
On Mon, Jan 23, 2012 at 8:05 AM, Hitoshi Mitake<h.mitake@xxxxxxxxx> wrote:

I wrote the patch which adds the new file include/asm-generic/io-nonatomic.h.
io-nonatomic.h provides non-atomic version readq()/writeq().

I do wonder if we should do "little-endian" and "big-endian" variations?

Quoting Willy:

"For this particular hardware, it's defined to work if you read the
low order bits first"

so I think we need make that explicit, and make two include files:

include/asm-generic/io-64b-lo-hi.h
include/asm-generic/io-64b-hi-lo.h

or something like that. And thus indirectly document these kinds of
requirements.


I would concur with this (and I have suggested exactly this in the past.)

-hpa

--
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/