]> git.kernelconcepts.de Git - mv-sheeva.git/commitdiff
Merge branch 'x86/cleanups' into x86/trampoline
authorH. Peter Anvin <hpa@linux.intel.com>
Wed, 20 Oct 2010 21:22:45 +0000 (14:22 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 20 Oct 2010 21:22:45 +0000 (14:22 -0700)
1  2 
arch/x86/kernel/Makefile
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/setup.c

diff --combined arch/x86/kernel/Makefile
index d9ce7a926e70804357cd86ec665c6c83800d0d9a,dd9a2e459c784803a4b9446b660f070a9cef62c0..96abc8fa56b1013983181a26a5fb805b51d8e029
@@@ -11,8 -11,6 +11,8 @@@ ifdef CONFIG_FUNCTION_TRACE
  CFLAGS_REMOVE_tsc.o = -pg
  CFLAGS_REMOVE_rtc.o = -pg
  CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 +CFLAGS_REMOVE_pvclock.o = -pg
 +CFLAGS_REMOVE_kvmclock.o = -pg
  CFLAGS_REMOVE_ftrace.o = -pg
  CFLAGS_REMOVE_early_printk.o = -pg
  endif
@@@ -93,6 -91,7 +93,6 @@@ obj-$(CONFIG_K8_NB)           += k8.
  obj-$(CONFIG_DEBUG_RODATA_TEST)       += test_rodata.o
  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
@@@ -121,7 -120,6 +121,6 @@@ obj-$(CONFIG_SWIOTLB)                      += pci-swiotlb.
  # 64 bit specific files
  ifeq ($(CONFIG_X86_64),y)
        obj-$(CONFIG_X86_UV)            += tlb_uv.o bios_uv.o uv_irq.o uv_sysfs.o uv_time.o
-       obj-$(CONFIG_X86_PM_TIMER)      += pmtimer_64.o
        obj-$(CONFIG_AUDIT)             += audit_64.o
  
        obj-$(CONFIG_GART_IOMMU)        += pci-gart_64.o aperture_64.o
index 5c5b8f3dddb58686ba4afc8b314237c0c318370b,8884928d7bc1b052b5f492dc394fabcfc7230dd1..f1e78940d90831627382e0fe5232b3441b9641a4
@@@ -162,7 -162,7 +162,7 @@@ int __init arch_early_irq_init(void
  
        cfg = irq_cfgx;
        count = ARRAY_SIZE(irq_cfgx);
-       node= cpu_to_node(boot_cpu_id);
+       node = cpu_to_node(0);
  
        for (i = 0; i < count; i++) {
                desc = irq_to_desc(i);
@@@ -306,19 -306,14 +306,19 @@@ void arch_init_copy_chip_data(struct ir
  
        old_cfg = old_desc->chip_data;
  
 -      memcpy(cfg, old_cfg, sizeof(struct irq_cfg));
 +      cfg->vector = old_cfg->vector;
 +      cfg->move_in_progress = old_cfg->move_in_progress;
 +      cpumask_copy(cfg->domain, old_cfg->domain);
 +      cpumask_copy(cfg->old_domain, old_cfg->old_domain);
  
        init_copy_irq_2_pin(old_cfg, cfg, node);
  }
  
 -static void free_irq_cfg(struct irq_cfg *old_cfg)
 +static void free_irq_cfg(struct irq_cfg *cfg)
  {
 -      kfree(old_cfg);
 +      free_cpumask_var(cfg->domain);
 +      free_cpumask_var(cfg->old_domain);
 +      kfree(cfg);
  }
  
  void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc)
@@@ -1488,7 -1483,7 +1488,7 @@@ static void __init setup_IO_APIC_irqs(v
        int notcon = 0;
        struct irq_desc *desc;
        struct irq_cfg *cfg;
-       int node = cpu_to_node(boot_cpu_id);
+       int node = cpu_to_node(0);
  
        apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n");
  
  void setup_IO_APIC_irq_extra(u32 gsi)
  {
        int apic_id = 0, pin, idx, irq;
-       int node = cpu_to_node(boot_cpu_id);
+       int node = cpu_to_node(0);
        struct irq_desc *desc;
        struct irq_cfg *cfg;
  
@@@ -1733,8 -1728,6 +1733,8 @@@ __apicdebuginit(void) print_IO_APIC(voi
                struct irq_pin_list *entry;
  
                cfg = desc->chip_data;
 +              if (!cfg)
 +                      continue;
                entry = cfg->irq_2_pin;
                if (!entry)
                        continue;
@@@ -2932,7 -2925,7 +2932,7 @@@ static inline void __init check_timer(v
  {
        struct irq_desc *desc = irq_to_desc(0);
        struct irq_cfg *cfg = desc->chip_data;
-       int node = cpu_to_node(boot_cpu_id);
+       int node = cpu_to_node(0);
        int apic1, pin1, apic2, pin2;
        unsigned long flags;
        int no_pin1 = 0;
@@@ -3286,7 -3279,7 +3286,7 @@@ unsigned int create_irq_nr(unsigned in
  
  int create_irq(void)
  {
-       int node = cpu_to_node(boot_cpu_id);
+       int node = cpu_to_node(0);
        unsigned int irq_want;
        int irq;
  
@@@ -3908,7 -3901,7 +3908,7 @@@ static int __io_apic_set_pci_routing(st
        if (dev)
                node = dev_to_node(dev);
        else
-               node = cpu_to_node(boot_cpu_id);
+               node = cpu_to_node(0);
  
        desc = irq_to_desc_alloc_node(irq, node);
        if (!desc) {
index ba5f62f45f01e136e849894076917684ffcd8c40,3a7c852f021d24bbc7509c54095d8d2295dec3f3..a8b4d91b8394d5cd6d9ebc19106f9fa426330b78
@@@ -148,7 -148,7 +148,7 @@@ static void __cpuinit amd_k7_smp_check(
  {
  #ifdef CONFIG_SMP
        /* calling is from identify_secondary_cpu() ? */
-       if (c->cpu_index == boot_cpu_id)
+       if (!c->cpu_index)
                return;
  
        /*
@@@ -669,7 -669,7 +669,7 @@@ bool cpu_has_amd_erratum(const int *err
        }
  
        /* OSVW unavailable or ID unknown, match family-model-stepping range */
 -      ms = (cpu->x86_model << 8) | cpu->x86_mask;
 +      ms = (cpu->x86_model << 4) | cpu->x86_mask;
        while ((range = *erratum++))
                if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) &&
                    (ms >= AMD_MODEL_RANGE_START(range)) &&
index f2f9ac7da25ccfba6d5ba7ea44b63899ba672e97,787b3c7c6625f108edd8e2d7d90a414f596072cf..15c671385f593b99064c1e98cfdba75e7e4a34fa
@@@ -545,7 -545,7 +545,7 @@@ void __cpuinit cpu_detect(struct cpuinf
        }
  }
  
 -static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
 +void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
  {
        u32 tfms, xlvl;
        u32 ebx;
@@@ -665,7 -665,7 +665,7 @@@ static void __init early_identify_cpu(s
                this_cpu->c_early_init(c);
  
  #ifdef CONFIG_SMP
-       c->cpu_index = boot_cpu_id;
+       c->cpu_index = 0;
  #endif
        filter_cpuid_features(c, false);
  }
index b4389441efbbd8e791289aa936369e5e73917c18,3a683ea5267e8a33df20a78c0ac22351b3915848..695f17731e2382ce63bbbb4a9caaf2ec7e16e29e
@@@ -39,7 -39,6 +39,7 @@@ static void __cpuinit early_init_intel(
                        misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID;
                        wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
                        c->cpuid_level = cpuid_eax(0);
 +                      get_cpu_cap(c);
                }
        }
  
@@@ -170,7 -169,7 +170,7 @@@ static void __cpuinit intel_smp_check(s
  {
  #ifdef CONFIG_SMP
        /* calling is from identify_secondary_cpu() ? */
-       if (c->cpu_index == boot_cpu_id)
+       if (!c->cpu_index)
                return;
  
        /*
index ebdb85cf2686fa36702cd4d50b657f22de85b3bd,e4bd78c160d89761f4ce2457447d7a5ee58789e6..76b8cd953deed9f8a50d572cdc52b5edb68bc3b7
@@@ -18,6 -18,7 +18,6 @@@
  #include <asm/apic.h>
  #include <asm/iommu.h>
  #include <asm/gart.h>
 -#include <asm/hpet.h>
  
  static void __init fix_hypertransport_config(int num, int slot, int func)
  {
@@@ -96,7 -97,6 +96,6 @@@ static void __init nvidia_bugs(int num
  
  }
  
- #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
  #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
  static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
  {
        d &= 0xff;
        return d;
  }
- #endif
  
  static void __init ati_bugs(int num, int slot, int func)
  {
@@@ -191,6 -190,21 +189,6 @@@ static void __init ati_bugs_contd(int n
  }
  #endif
  
 -/*
 - * Force the read back of the CMP register in hpet_next_event()
 - * to work around the problem that the CMP register write seems to be
 - * delayed. See hpet_next_event() for details.
 - *
 - * We do this on all SMBUS incarnations for now until we have more
 - * information about the affected chipsets.
 - */
 -static void __init ati_hpet_bugs(int num, int slot, int func)
 -{
 -#ifdef CONFIG_HPET_TIMER
 -      hpet_readback_cmp = 1;
 -#endif
 -}
 -
  #define QFLAG_APPLY_ONCE      0x1
  #define QFLAG_APPLIED         0x2
  #define QFLAG_DONE            (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@@ -220,6 -234,8 +218,6 @@@ static struct chipset early_qrk[] __ini
          PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
        { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
          PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
 -      { PCI_VENDOR_ID_ATI, PCI_ANY_ID,
 -        PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_hpet_bugs },
        {}
  };
  
diff --combined arch/x86/kernel/setup.c
index feb4c21e499a0aaed5206acbc0dfb7f661b704b7,dede5c4bae4b74d3f61d4d91ad45448e84434e2d..322b24fbeafd9207d9c418906863dfaf8964f385
@@@ -83,6 -83,7 +83,6 @@@
  #include <asm/dmi.h>
  #include <asm/io_apic.h>
  #include <asm/ist.h>
 -#include <asm/vmi.h>
  #include <asm/setup_arch.h>
  #include <asm/bios_ebda.h>
  #include <asm/cacheflush.h>
@@@ -124,7 -125,6 +124,6 @@@ unsigned long max_pfn_mapped
  RESERVE_BRK(dmi_alloc, 65536);
  #endif
  
- unsigned int boot_cpu_id __read_mostly;
  
  static __initdata unsigned long _brk_start = (unsigned long)__brk_base;
  unsigned long _brk_end = (unsigned long)__brk_base;
@@@ -733,10 -733,10 +732,10 @@@ void __init setup_arch(char **cmdline_p
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
  #endif
  
 -      /* VMI may relocate the fixmap; do this before touching ioremap area */
 -      vmi_init();
 -
 -      /* OFW also may relocate the fixmap */
 +      /*
 +       * If we have OLPC OFW, we might end up relocating the fixmap due to
 +       * reserve_top(), so do this before touching the ioremap area.
 +       */
        olpc_ofw_detect();
  
        early_trap_init();
  
        x86_report_nx();
  
 -      /* Must be before kernel pagetables are setup */
 -      vmi_activate();
 -
        /* after early param, so could get panic from serial */
        reserve_early_setup_data();
  
        paging_init();
        x86_init.paging.pagetable_setup_done(swapper_pg_dir);
  
 +      setup_trampoline_page_table();
 +
        tboot_probe();
  
  #ifdef CONFIG_X86_64