public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte•hu>
To: Randy Dunlap <randy.dunlap@oracle•com>,
	"H. Peter Anvin" <hpa@zytor•com>,
	Andreas Herrmann <andreas.herrmann3@amd•com>,
	Mark Langsdorf <mark.langsdorf@amd•com>
Cc: Stephen Rothwell <sfr@canb•auug.org.au>,
	linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
	x86@kernel•org
Subject: Re: [PATCH] x86: fix build error when CONFIG_K8_NB=n
Date: Thu, 2 Apr 2009 18:44:39 +0200	[thread overview]
Message-ID: <20090402164439.GA7385@elte.hu> (raw)
In-Reply-To: <49D4D9E5.2060705@oracle.com>


* Randy Dunlap <randy.dunlap@oracle•com> wrote:

> From: Randy Dunlap <randy.dunlap@oracle•com>
> 
> Fix build error when CONFIG_K8_NB=n:
> 
> arch/x86/mm/built-in.o:(.bss+0x5c0): multiple definition of `k8_northbridges'
> arch/x86/kernel/built-in.o:(.bss+0x18c8): first defined here

Thanks for the report, this is a known bug.

> Signed-off-by: Randy Dunlap <randy.dunlap@oracle•com>
> ---
>  arch/x86/include/asm/k8.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-next-20090402.orig/arch/x86/include/asm/k8.h
> +++ linux-next-20090402/arch/x86/include/asm/k8.h
> @@ -9,7 +9,7 @@ extern int early_is_k8_nb(u32 value);
>  #ifdef CONFIG_K8_NB
>  extern struct pci_dev **k8_northbridges;
>  #else
> -struct pci_dev **k8_northbridges;
> +static struct pci_dev **k8_northbridges;

This might fix the build but the change does something rather 
broken: there's now a new 'k8_northbridges' local variable array in 
each file that includes k8.h - that's wrong. We dont put static 
locals into include files that get included into several .c files, 
ever.

The real fix would be to not export k8_northbridges[] from k8.c, but 
to introduce a node_to_k8_northbridge() helper that returns a struct 
pci_dev. In the !CONFIG_K8_NB case this would be an inlne in k8.h 
that always returns NULL.

Anyway - just today i mailed about this this topic to Mark and 
Andreas about this build breakage (i have triggered it too), so 
there should be a resolution soon, either in form of a fix or in 
form of a revert.

Thanks,

	Ingo

      reply	other threads:[~2009-04-02 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02  6:04 linux-next: Tree for April 2 Stephen Rothwell
2009-04-02 15:29 ` [PATCH] x86: fix build error when CONFIG_K8_NB=n Randy Dunlap
2009-04-02 16:44   ` Ingo Molnar [this message]

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=20090402164439.GA7385@elte.hu \
    --to=mingo@elte$(echo .)hu \
    --cc=andreas.herrmann3@amd$(echo .)com \
    --cc=hpa@zytor$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mark.langsdorf@amd$(echo .)com \
    --cc=randy.dunlap@oracle$(echo .)com \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=x86@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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