lkml.org 
[lkml]   [2008]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] edac x38: new MC driver module
On Sun, Nov 09, 2008 at 11:26:46AM -0800, Andrew Morton wrote:
> (cc linux-arch)
>
> > It seems that architectures that provide readq/writeq are
> > mips, parisc and x86 (and x86_64).
> >
There are more than that, grep arch/*/include also.

In addition to mips, parisc, and x86, there is ia64, alpha, sh, and
sparc.

> #ifdef readq
>
> Is a suitable way of determining whether the architecture implements
> readq and writeq. It isn't pretty, but it will suffice.
>
> A problem with it is that drivers will then do
>
> #ifndef readq
> <provide a local implementation here>
> #endif
>
> which rather sucks - we don't want lots of little private readq/writeq
> implementations all over the tree.
>
> Perhaps it would be better to have a CONFIG_ARCH_HAS_READQ and to then
> disable these drivers on the architectures which don't provide
> readq/writeq support.
>
However this is handled, we don't want a rehash of the read/writes{b,w,l} fiasco.

Allowing drivers to do their own local implementations of these things
has always been a complete disaster. A Kconfig option will at least take
care of having these craptastic ifdef lists for architectures in every
driver that rolls its own implementation.

Even a sub-optimal asm-generic version would be preferable, if the
semantics are well enough defined and consistently adhered to.


\
 
 \ /
  Last update: 2008-11-11 07:15    [W:0.079 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site