lkml.org 
[lkml]   [2013]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be)
From
Date
On Tue, 2013-02-12 at 11:11 +0100, Michal Simek wrote:
> For high performance IPs using accessors functions is still
> problematic
> because there will be performance regression it means that
> from my point of view there still should be any option to "setup"
> proper endians for the driver and it can't be setup at run-time.
>
> Sure the question is if drivers like this should be in the mainline.
> But if yes, there should be an option to do it in acceptable way.

No. High performance IP should rely on DMA essentially and be less
affected if not at all. Endianess should affect the control path, not
the data path (unless you got your wiring wrong again :-)

If you want an Kconfig option for an "optimal" version, put the ifdef
trickery in the accessors and make them inline.

We do something like that iirc with OHCI where the type of endianness
needed is a pair of select's and the conditional only happens when both
are set. You can probably do better with feature bits & a mask of
"possible" features relying on the compiler optimisations rather than
the preprocessor.

Cheers,
Ben.




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