Messages in this thread | | | Date | Fri, 11 Jul 2008 10:39:46 +0200 | From | Robert Richter <> | Subject | Re: [x86, patch] turn x86 VISWS into a generic architecture |
| |
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
| |