lkml.org 
[lkml]   [2013]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be)
Date
On Tuesday 12 February 2013, Michal Simek wrote:
> ok but still there should be well defined how to do it. Let's say
> generic Kconfig option.

You cannot solve it in a generic way, since every device has different
needs. In a single SoC, you may have one device that only ever exists
with little-endian I/O, one that is always wired the same way as the
CPU, one that always swaps endianess and one that exists in two
variants but you know which one you have at compile time.

> Or maybe there is also third option to modified code to use proper writes.

You mean run-time code patching? That is seriously wrong here. As Ben
explained, MMIO is slow by definition, so if you add five cycles for
an indirect function call on every MMIO read, that will not even
be noticeable in the 20µs latency that the read has on the bus.

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

\
 
 \ /
  Last update: 2013-02-12 15:21    [W:0.068 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site