lkml.org 
[lkml]   [2013]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] edac, highbank: remove dependency on ARCH_HIGHBANK
On Wed, Nov 06, 2013 at 11:17:41AM -0600, Rob Herring wrote:
> Using some interface which is arch specific and should not be used in a
> driver.

Well, sorry, but this is not something which justifies enabling building
of compilation units on arches for which they don't apply. Rather, this
should be caught during review.

I find it highly unfair to waste cycles building stuff on an arch for
which the drivers aren't meant for. And it doesn't make any sense anyway
- I'd like all*config to get finished at some point soonish and not
build the whole world.

And, btw, highbank triggers the following on AMD64:

CC [M] drivers/edac/edac_pci.o
CC [M] drivers/edac/highbank_mc_edac.o
CC [M] drivers/edac/highbank_l2_edac.o
drivers/edac/highbank_mc_edac.c: In function ‘highbank_mc_probe’:
drivers/edac/highbank_mc_edac.c:210:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
dimm->nr_pages = (~0UL >> PAGE_SHIFT) + 1;
^

which is clearly a bug since ->nr_pages becomes 0.

BUT(!), this bug doesn't make any sense on x86 since highbank won't load
there and yours is a 32-bit arm. (it'll probably make some sense on
arm64 assuming the native long type is 8 bytes there).

And people would start reporting those bugs and we're going to start
asking on which arch are you compiling just to realize that a bug like
that doesn't make any sense on an N/A arch.

Oh, and then other edac drivers would simply fail building:

CC [M] drivers/edac/octeon_edac-pc.o
drivers/edac/octeon_edac-pc.c:21:29: fatal error: asm/octeon/cvmx.h: No such file or directory
#include <asm/octeon/cvmx.h>
^
compilation terminated.
make[1]: *** [drivers/edac/octeon_edac-pc.o] Error 1

simply because x86/include doesn't have that header.

So let's not waste any more time with this topic. I think there are a
numerous other ways for achieving build coverage which make *way* *more*
sense than this.

--
Regards/Gruss,
Boris.
--
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-11-07 14:21    [W:0.051 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site