public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	the arch/x86 maintainers <x86@kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [x86, patch] turn x86 VISWS into a generic architecture
Date: Fri, 11 Jul 2008 10:39:46 +0200	[thread overview]
Message-ID: <20080711083946.GU7963@erda.amd.com> (raw)
In-Reply-To: <20080710170712.GA14583@elte.hu>

On 10.07.08 19:07:12, Ingo Molnar wrote:

[...]

> diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
> index 99d9f09..e515e8d 100644
> --- a/arch/x86/pci/Makefile
> +++ b/arch/x86/pci/Makefile
> @@ -9,9 +9,7 @@ pci-y				:= fixup.o
>  pci-$(CONFIG_ACPI)		+= acpi.o
>  pci-y				+= legacy.o irq.o
>  
> -# Careful: VISWS overrule the pci-y above. The colons are
> -# therefor correct. This needs a proper fix by distangling the code.
> -pci-$(CONFIG_X86_VISWS)		:= visws.o fixup.o
> +pci-$(CONFIG_X86_VISWS)		+= visws.o

Ingo, if we turn this into generic code, we have to remove the
subsys_initcall for this too. Otherwise subsystem initialization is
running twice, in legacy.c and in visws.c.

>  
>  pci-$(CONFIG_X86_NUMAQ)		+= numa.o
>  
> diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c
> index 16e5206..1a7bed4 100644
> --- a/arch/x86/pci/visws.c
> +++ b/arch/x86/pci/visws.c
> @@ -8,18 +8,19 @@
>  #include <linux/pci.h>
>  #include <linux/init.h>
>  
> -#include "cobalt.h"
> -#include "lithium.h"
> +#include <asm/setup.h>
> +#include <asm/visws/cobalt.h>
> +#include <asm/visws/lithium.h>
>  
>  #include "pci.h"
>  
>  static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
>  static void pci_visws_disable_irq(struct pci_dev *dev) { }
>  
> -int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq;
> -void (*pcibios_disable_irq)(struct pci_dev *dev) = &pci_visws_disable_irq;
> +/* int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq; */
> +/* void (*pcibios_disable_irq)(struct pci_dev *dev) = &pci_visws_disable_irq; */
>  
> -void __init pcibios_penalize_isa_irq(int irq, int active) {}
> +/* void __init pcibios_penalize_isa_irq(int irq, int active) {} */
>  
>  
>  unsigned int pci_bus0, pci_bus1;
> @@ -107,7 +108,15 @@ static int __init pci_visws_init(void)
>  
>  static __init int pci_subsys_init(void)
>  {
> +	if (!is_visws_box())
> +		return -1;
> +
> +	pcibios_enable_irq = &pci_visws_enable_irq;
> +	pcibios_disable_irq = &pci_visws_disable_irq;
> +
>  	pci_visws_init();
>  	pcibios_init();
> +
> +	return 0;
>  }
>  subsys_initcall(pci_subsys_init);

This code should be moved to pci_subsys_init() of legacy.c.

[...]

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


  reply	other threads:[~2008-07-11  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10 17:07 [x86, patch] turn x86 VISWS into a generic architecture Ingo Molnar
2008-07-11  8:39 ` Robert Richter [this message]
2008-07-11  8:54   ` Ingo Molnar
2008-07-11  9:01     ` Yinghai Lu
2008-07-11  9:04       ` Robert Richter
2008-07-11  9:10       ` Ingo Molnar

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=20080711083946.GU7963@erda.amd.com \
    --to=robert.richter@amd.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=x86@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