]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:26:51 +0000 (08:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:26:51 +0000 (08:26 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci:
  x86: add pci=check_enable_amd_mmconf and dmi check
  x86: work around io allocation overlap of HT links
  acpi: get boot_cpu_id as early for k8_scan_nodes
  x86_64: don't need set default res if only have one root bus
  x86: double check the multi root bus with fam10h mmconf
  x86: multi pci root bus with different io resource range, on 64-bit
  x86: use bus conf in NB conf fun1 to get bus range on, on 64-bit
  x86: get mp_bus_to_node early
  x86 pci: remove checking type for mmconfig probe
  x86: remove unneeded check in mmconf reject
  driver core: try parent numa_node at first before using default
  x86: seperate mmconf for fam10h out from setup_64.c
  x86: if acpi=off, force setting the mmconf for fam10h
  x86_64: check MSR to get MMCONFIG for AMD Family 10h
  x86_64: check and enable MMCONFIG for AMD Family 10h
  x86_64: set cfg_size for AMD Family 10h in case MMCONFIG
  x86: mmconf enable mcfg early
  x86: clear pci_mmcfg_virt when mmcfg get rejected
  x86: validate against acpi motherboard resources

Fixed up fairly trivial conflicts in arch/x86/pci/{init.c,pci.h} due to
OLPC support manually.

1  2 
arch/x86/kernel/Makefile
arch/x86/kernel/setup_64.c
arch/x86/pci/Makefile_32
arch/x86/pci/init.c
arch/x86/pci/pci.h

diff --combined arch/x86/kernel/Makefile
index 350eb1b2a208593f37f1956bfb048d597c241d49,815b650977b4f2d4d687201f2ac3b944de37aa7d..30d54ed27e558cb1d3725f38c411e820b7fe5073
@@@ -80,8 -80,6 +80,8 @@@ obj-$(CONFIG_DEBUG_RODATA_TEST)       += test
  obj-$(CONFIG_DEBUG_NX_TEST)   += test_nx.o
  
  obj-$(CONFIG_VMI)             += vmi_32.o vmiclock_32.o
 +obj-$(CONFIG_KVM_GUEST)               += kvm.o
 +obj-$(CONFIG_KVM_CLOCK)               += kvmclock.o
  obj-$(CONFIG_PARAVIRT)                += paravirt.o paravirt_patch_$(BITS).o
  
  ifdef CONFIG_INPUT_PCSPKR
@@@ -91,8 -89,6 +91,8 @@@ endi
  obj-$(CONFIG_SCx200)          += scx200.o
  scx200-y                      += scx200_32.o
  
 +obj-$(CONFIG_OLPC)            += olpc.o
 +
  ###
  # 64 bit specific files
  ifeq ($(CONFIG_X86_64),y)
          obj-$(CONFIG_GART_IOMMU)      += pci-gart_64.o aperture_64.o
          obj-$(CONFIG_CALGARY_IOMMU)   += pci-calgary_64.o tce_64.o
          obj-$(CONFIG_SWIOTLB)         += pci-swiotlb_64.o
+         obj-$(CONFIG_PCI_MMCONFIG)    += mmconf-fam10h_64.o
  endif
index a94fb959a87a3f35c0eec00bdf696b195b378d30,2f5c488aad0b92192c0a38882e824b3d405e7829..22c14e21c97c435a8d172d8f23159738bf0dbe2f
@@@ -29,6 -29,7 +29,7 @@@
  #include <linux/crash_dump.h>
  #include <linux/root_dev.h>
  #include <linux/pci.h>
+ #include <asm/pci-direct.h>
  #include <linux/efi.h>
  #include <linux/acpi.h>
  #include <linux/kallsyms.h>
  #include <linux/dmi.h>
  #include <linux/dma-mapping.h>
  #include <linux/ctype.h>
+ #include <linux/sort.h>
  #include <linux/uaccess.h>
  #include <linux/init_ohci1394_dma.h>
 +#include <linux/kvm_para.h>
  
  #include <asm/mtrr.h>
  #include <asm/uaccess.h>
@@@ -288,6 -289,18 +290,18 @@@ static void __init parse_setup_data(voi
        }
  }
  
+ #ifdef CONFIG_PCI_MMCONFIG
+ extern void __cpuinit fam10h_check_enable_mmcfg(void);
+ extern void __init check_enable_amd_mmconf_dmi(void);
+ #else
+ void __cpuinit fam10h_check_enable_mmcfg(void)
+ {
+ }
+ void __init check_enable_amd_mmconf_dmi(void)
+ {
+ }
+ #endif
  /*
   * setup_arch - architecture-specific boot-time initializations
   *
@@@ -385,10 -398,6 +399,10 @@@ void __init setup_arch(char **cmdline_p
  
        io_delay_init();
  
 +#ifdef CONFIG_KVM_CLOCK
 +      kvmclock_init();
 +#endif
 +
  #ifdef CONFIG_SMP
        /* setup to use the early static init tables during kernel startup */
        x86_cpu_to_apicid_early_ptr = (void *)x86_cpu_to_apicid_init;
        init_apic_mappings();
        ioapic_init_mappings();
  
 +      kvm_guest_init();
 +
        /*
         * We trust e820 completely. No explicit ROM probing in memory.
         */
        conswitchp = &dummy_con;
  #endif
  #endif
+       /* do this before identify_cpu for boot cpu */
+       check_enable_amd_mmconf_dmi();
  }
  
  static int __cpuinit get_model_name(struct cpuinfo_x86 *c)
@@@ -767,6 -777,9 +784,9 @@@ static void __cpuinit init_amd(struct c
        /* MFENCE stops RDTSC speculation */
        set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
  
+       if (c->x86 == 0x10)
+               fam10h_check_enable_mmcfg();
        if (amd_apic_timer_broken())
                disable_apic_timer = 1;
  
diff --combined arch/x86/pci/Makefile_32
index b859047a6376578f521021cd433ec77eac89cde4,e9c5caf54e59a0e2249fbbe87c7c85fed22b05b3..2a1516efb5426dcb79f6b77283e2aeb813811711
@@@ -3,7 -3,6 +3,7 @@@ obj-y                            := i386.o init.
  obj-$(CONFIG_PCI_BIOS)                += pcbios.o
  obj-$(CONFIG_PCI_MMCONFIG)    += mmconfig_32.o direct.o mmconfig-shared.o
  obj-$(CONFIG_PCI_DIRECT)      += direct.o
 +obj-$(CONFIG_PCI_OLPC)                += olpc.o
  
  pci-y                         := fixup.o
  pci-$(CONFIG_ACPI)            += acpi.o
@@@ -11,5 -10,6 +11,6 @@@ pci-y                         += legacy.o irq.
  
  pci-$(CONFIG_X86_VISWS)               := visws.o fixup.o
  pci-$(CONFIG_X86_NUMAQ)               := numa.o irq.o
+ pci-$(CONFIG_NUMA)            += mp_bus_to_node.o
  
  obj-y                         += $(pci-y) common.o early.o
diff --combined arch/x86/pci/init.c
index 0f5f7dd2a620d5bc188382351391eb8100fd7e24,343c36337e69237dd27d24e14704c6386df7da61..dd30c6076b5d74ff1be2929d7b8f84081c6a8250
@@@ -6,19 -6,13 +6,17 @@@
     in the right sequence from here. */
  static __init int pci_access_init(void)
  {
-       int type __maybe_unused = 0;
  #ifdef CONFIG_PCI_DIRECT
+       int type = 0;
        type = pci_direct_probe();
  #endif
- #ifdef CONFIG_PCI_MMCONFIG
-       pci_mmcfg_init(type);
- #endif
++
+       pci_mmcfg_early_init();
 +#ifdef CONFIG_PCI_OLPC
 +      pci_olpc_init();
 +#endif
-       if (raw_pci_ops)
-               return 0;
  #ifdef CONFIG_PCI_BIOS
        pci_pcbios_init();
  #endif
@@@ -31,7 -25,7 +29,7 @@@
  #ifdef CONFIG_PCI_DIRECT
        pci_direct_init(type);
  #endif
-       if (!raw_pci_ops)
+       if (!raw_pci_ops && !raw_pci_ext_ops)
                printk(KERN_ERR
                "PCI: Fatal: No config space access function found\n");
  
diff --combined arch/x86/pci/pci.h
index 7d84e813e9587b316a230a0563aa1e1d3671c8cd,8ef86b5c37c85b4e50261700b84be10481ab6c29..c58805a92db5788e508482dd1579640c782750d0
@@@ -26,6 -26,7 +26,7 @@@
  #define PCI_ASSIGN_ALL_BUSSES 0x4000
  #define PCI_CAN_SKIP_ISA_ALIGN        0x8000
  #define PCI_USE__CRS          0x10000
+ #define PCI_CHECK_ENABLE_AMD_MMCONF   0x20000
  
  extern unsigned int pci_probe;
  extern unsigned long pirq_table_addr;
@@@ -97,12 -98,11 +98,12 @@@ extern struct pci_raw_ops pci_direct_co
  extern int pci_direct_probe(void);
  extern void pci_direct_init(int type);
  extern void pci_pcbios_init(void);
- extern void pci_mmcfg_init(int type);
 +extern void pci_olpc_init(void);
  
  /* pci-mmconfig.c */
  
  extern int __init pci_mmcfg_arch_init(void);
+ extern void __init pci_mmcfg_arch_free(void);
  
  /*
   * AMD Fam10h CPUs are buggy, and cannot access MMIO config space