Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Sep 2009 21:05:47 +0000 (14:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Sep 2009 21:05:47 +0000 (14:05 -0700)
* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (38 commits)
  x86: Move get/set_wallclock to x86_platform_ops
  x86: platform: Fix section annotations
  x86: apic namespace cleanup
  x86: Distangle ioapic and i8259
  x86: Add Moorestown early detection
  x86: Add hardware_subarch ID for Moorestown
  x86: Add early platform detection
  x86: Move tsc_init to late_time_init
  x86: Move tsc_calibration to x86_init_ops
  x86: Replace the now identical time_32/64.c by time.c
  x86: time_32/64.c unify profile_pc
  x86: Move calibrate_cpu to tsc.c
  x86: Make timer setup and global variables the same in time_32/64.c
  x86: Remove mca bus ifdef from timer interrupt
  x86: Simplify timer_ack magic in time_32.c
  x86: Prepare unification of time_32/64.c
  x86: Remove do_timer hook
  x86: Add timer_init to x86_init_ops
  x86: Move percpu clockevents setup to x86_init_ops
  x86: Move xen_post_allocator_init into xen_pagetable_setup_done
  ...

Fix up conflicts in arch/x86/include/asm/io_apic.h

22 files changed:
1  2 
arch/x86/Kconfig
arch/x86/include/asm/apic.h
arch/x86/include/asm/bootparam.h
arch/x86/include/asm/io_apic.h
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/include/asm/pgtable.h
arch/x86/kernel/Makefile
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/e820.c
arch/x86/kernel/head_32.S
arch/x86/kernel/irqinit.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/mpparse.c
arch/x86/kernel/paravirt.c
arch/x86/kernel/rtc.c
arch/x86/kernel/setup.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/traps.c
arch/x86/kernel/tsc.c
arch/x86/xen/enlighten.c

Simple merge
Simple merge
Simple merge
index 85232d32fcb8ae3b8130944848669021f47f9120,e1f89a1a07ef4838b4a1cdeeed09672dc394717e..7c7c16cde1f8f3b5ddcf65f6a2f40d537368ad86
@@@ -176,23 -179,14 +178,26 @@@ extern int setup_ioapic_entry(int apic
                              int polarity, int vector, int pin);
  extern void ioapic_write_entry(int apic, int pin,
                               struct IO_APIC_route_entry e);
+ extern void setup_ioapic_ids_from_mpc(void);
 +
 +struct mp_ioapic_gsi{
 +      int gsi_base;
 +      int gsi_end;
 +};
 +extern struct mp_ioapic_gsi  mp_gsi_routing[];
 +int mp_find_ioapic(int gsi);
 +int mp_find_ioapic_pin(int ioapic, int gsi);
 +void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
 +
  #else  /* !CONFIG_X86_IO_APIC */
++
  #define io_apic_assign_pci_irqs 0
+ #define setup_ioapic_ids_from_mpc x86_init_noop
  static const int timer_through_8259 = 0;
  static inline void ioapic_init_mappings(void) { }
  static inline void ioapic_insert_resources(void) { }
  static inline void probe_nr_irqs_gsi(void)    { }
++
  #endif
  
  #endif /* _ASM_X86_IO_APIC_H */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 3c8f9e75d0383a448f467e4d136d1067ab4c7047,6c961290a5f8a95dd6792ddc69bd90a78183d6c2..809e1cf86d6be50b6d58c87645728f9b757a300f
@@@ -3856,13 -3924,9 +3870,13 @@@ static int __io_apic_set_pci_routing(st
        /*
         * IRQs < 16 are already in the irq_2_pin[] map
         */
-       if (irq >= NR_IRQS_LEGACY) {
+       if (irq >= nr_legacy_irqs) {
                cfg = desc->chip_data;
 -              add_pin_to_irq_node(cfg, node, ioapic, pin);
 +              if (add_pin_to_irq_node_nopanic(cfg, node, ioapic, pin)) {
 +                      printk(KERN_INFO "can not add pin %d for irq %d\n",
 +                              pin, irq);
 +                      return 0;
 +              }
        }
  
        setup_IO_APIC_irq(ioapic, pin, irq, desc, trigger, polarity);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index bf67dcb4a44ce77d02a63eb3c00824f46c0b4a63,b8652f2e6855bd4769faf2173806bb2cd10e9507..1cfbbfc3ae2676d19be1d39ee936bad5b768bb9f
@@@ -183,18 -184,12 +184,13 @@@ void read_persistent_clock(struct times
        unsigned long retval, flags;
  
        spin_lock_irqsave(&rtc_lock, flags);
-       retval = get_wallclock();
+       retval = x86_platform.get_wallclock();
        spin_unlock_irqrestore(&rtc_lock, flags);
  
 -      return retval;
 +      ts->tv_sec = retval;
 +      ts->tv_nsec = 0;
  }
  
- int update_persistent_clock(struct timespec now)
- {
-       return set_rtc_mmss(now.tv_sec);
- }
  unsigned long long native_read_tsc(void)
  {
        return __native_read_tsc();
index 19f15c4076fb6f3f57afa01ddc211dbdce1ae202,fda22ec1a935d9cab7fbc21eb458bb93600d9b9c..a55f6609fe1fae46dcf5e5a9518be0de01681c6f
@@@ -983,13 -955,10 +966,12 @@@ void __init setup_arch(char **cmdline_p
        kvmclock_init();
  #endif
  
-       paravirt_pagetable_setup_start(swapper_pg_dir);
+       x86_init.paging.pagetable_setup_start(swapper_pg_dir);
        paging_init();
-       paravirt_pagetable_setup_done(swapper_pg_dir);
-       paravirt_post_allocator_init();
+       x86_init.paging.pagetable_setup_done(swapper_pg_dir);
  
 +      tboot_probe();
 +
  #ifdef CONFIG_X86_64
        map_vsyscall();
  #endif
Simple merge
Simple merge
Simple merge
index 0dd0c2c6cae0ff1fb8aa1ce563636e7ad38ad880,b5bf8b9119a31ab5614b918df85f76552952f367..544eb7496531b43990d5f89d588832f0c8265814
@@@ -1070,31 -968,28 +1058,43 @@@ asmlinkage void __init xen_start_kernel
        pv_time_ops = xen_time_ops;
        pv_cpu_ops = xen_cpu_ops;
        pv_apic_ops = xen_apic_ops;
-       pv_mmu_ops = xen_mmu_ops;
+       x86_init.resources.memory_setup = xen_memory_setup;
+       x86_init.oem.arch_setup = xen_arch_setup;
+       x86_init.oem.banner = xen_banner;
+       x86_init.timers.timer_init = xen_time_init;
+       x86_init.timers.setup_percpu_clockev = x86_init_noop;
+       x86_cpuinit.setup_percpu_clockev = x86_init_noop;
+       x86_platform.calibrate_tsc = xen_tsc_khz;
+       x86_platform.get_wallclock = xen_get_wallclock;
+       x86_platform.set_wallclock = xen_set_wallclock;
  
 -#ifdef CONFIG_X86_64
        /*
 -       * Setup percpu state.  We only need to do this for 64-bit
 -       * because 32-bit already has %fs set properly.
 +       * Set up some pagetable state before starting to set any ptes.
         */
 -      load_percpu_segment(0);
 -#endif
 +
 +      /* Prevent unwanted bits from being set in PTEs. */
 +      __supported_pte_mask &= ~_PAGE_GLOBAL;
 +      if (!xen_initial_domain())
 +              __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
 +
 +      __supported_pte_mask |= _PAGE_IOMAP;
 +
 +      xen_setup_features();
 +
 +      /* Get mfn list */
 +      if (!xen_feature(XENFEAT_auto_translated_physmap))
 +              xen_build_dynamic_phys_to_machine();
 +
 +      /*
 +       * Set up kernel GDT and segment registers, mainly so that
 +       * -fstack-protector code can be executed.
 +       */
 +      xen_setup_stackprotector();
  
+       xen_init_mmu_ops();
        xen_init_irq_ops();
        xen_init_cpuid_mask();