public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org,
	Rob Herring <rob.herring@calxeda.com>,
	Doug Thompson <dougthompson@xmission.com>,
	Robert Richter <rric@kernel.org>,
	linux-edac@vger.kernel.org
Subject: Re: [PATCH] edac, highbank: remove dependency on ARCH_HIGHBANK
Date: Thu, 07 Nov 2013 07:23:10 -0600	[thread overview]
Message-ID: <527B943E.9050603@gmail.com> (raw)
In-Reply-To: <20131107122716.GC27116@x1.alien8.de>

On 11/07/2013 06:27 AM, Borislav Petkov wrote:
> 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;
>   ^

See, we are benefiting already. I already found this thanks to the 0-day
builder (which doesn't build arm64). This is a 64-bit vs. 32-bit bug and
I need this driver enabled for arm64, so this needs to be fixed.

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

Exactly the mess of arch or mach headers in drivers I referred to.

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




  reply	other threads:[~2013-11-07 13:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06  3:25 [PATCH] edac, highbank: remove dependency on ARCH_HIGHBANK Rob Herring
2013-11-06 14:20 ` Borislav Petkov
2013-11-06 16:15   ` Rob Herring
2013-11-06 16:54     ` Borislav Petkov
2013-11-06 17:17       ` Rob Herring
2013-11-07 12:27         ` Borislav Petkov
2013-11-07 13:23           ` Rob Herring [this message]
2013-11-07 13:33             ` Borislav Petkov
2013-11-08 13:59               ` Robert Richter
2013-11-08 14:47                 ` Borislav Petkov
2013-11-11 10:29                   ` Robert Richter
2013-11-11 10:47                     ` Borislav Petkov
2013-11-11 11:09 ` Robert Richter
2013-11-11 15:06   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527B943E.9050603@gmail.com \
    --to=robherring2@gmail.com \
    --cc=bp@alien8.de \
    --cc=dougthompson@xmission.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rric@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox