]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge commit 'v2.6.26-rc9' into x86/cpu
authorIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 05:47:47 +0000 (07:47 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 05:47:47 +0000 (07:47 +0200)
1  2 
arch/x86/kernel/Makefile
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/pci/pci.h

diff --combined arch/x86/kernel/Makefile
index 4934fec38c42d250bba3e1f733215279f53532e4,77807d4769c99c455237a810fe0edd0f996fb31f..3a2a54c950ffab775424fc554d813ed664c83393
@@@ -25,6 -25,7 +25,6 @@@ obj-$(CONFIG_X86_64)  += syscall_64.o vs
  obj-y                 += bootflag.o e820_$(BITS).o
  obj-y                 += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o
  obj-y                 += alternative.o i8253.o pci-nommu.o
 -obj-$(CONFIG_X86_64)  += bugs_64.o
  obj-y                 += tsc_$(BITS).o io_delay.o rtc.o
  
  obj-$(CONFIG_X86_TRAMPOLINE)  += trampoline.o
@@@ -81,6 -82,7 +81,7 @@@ obj-$(CONFIG_VMI)             += vmi_32.o vmiclock
  obj-$(CONFIG_KVM_GUEST)               += kvm.o
  obj-$(CONFIG_KVM_CLOCK)               += kvmclock.o
  obj-$(CONFIG_PARAVIRT)                += paravirt.o paravirt_patch_$(BITS).o
+ obj-$(CONFIG_PARAVIRT_CLOCK)  += pvclock.o
  
  obj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o
  
index ae4020486a9762d1074221ecc30ad72a78aff43f,e2db9ac5c61c2b6d6de1f0b13f71b6d834eaeca2..c2a11d77b1b5664391b96577d67c698fec5534d3
  
  asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
  
 -static int hlt_counter;
 -
 -unsigned long boot_option_idle_override = 0;
 -EXPORT_SYMBOL(boot_option_idle_override);
 -
  DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
  EXPORT_PER_CPU_SYMBOL(current_task);
  
@@@ -72,6 -77,55 +72,6 @@@ unsigned long thread_saved_pc(struct ta
        return ((unsigned long *)tsk->thread.sp)[3];
  }
  
 -/*
 - * Powermanagement idle function, if any..
 - */
 -void (*pm_idle)(void);
 -EXPORT_SYMBOL(pm_idle);
 -
 -void disable_hlt(void)
 -{
 -      hlt_counter++;
 -}
 -
 -EXPORT_SYMBOL(disable_hlt);
 -
 -void enable_hlt(void)
 -{
 -      hlt_counter--;
 -}
 -
 -EXPORT_SYMBOL(enable_hlt);
 -
 -/*
 - * We use this if we don't have any better
 - * idle routine..
 - */
 -void default_idle(void)
 -{
 -      if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
 -              current_thread_info()->status &= ~TS_POLLING;
 -              /*
 -               * TS_POLLING-cleared state must be visible before we
 -               * test NEED_RESCHED:
 -               */
 -              smp_mb();
 -
 -              if (!need_resched())
 -                      safe_halt();    /* enables interrupts racelessly */
 -              else
 -                      local_irq_enable();
 -              current_thread_info()->status |= TS_POLLING;
 -      } else {
 -              local_irq_enable();
 -              /* loop is done by the caller */
 -              cpu_relax();
 -      }
 -}
 -#ifdef CONFIG_APM_MODULE
 -EXPORT_SYMBOL(default_idle);
 -#endif
 -
  #ifdef CONFIG_HOTPLUG_CPU
  #include <asm/nmi.h>
  /* We don't actually take CPU down, just spin without interrupts. */
@@@ -114,19 -168,24 +114,19 @@@ void cpu_idle(void
        while (1) {
                tick_nohz_stop_sched_tick();
                while (!need_resched()) {
 -                      void (*idle)(void);
  
                        check_pgt_cache();
                        rmb();
 -                      idle = pm_idle;
  
                        if (rcu_pending(cpu))
                                rcu_check_callbacks(cpu, 0);
  
 -                      if (!idle)
 -                              idle = default_idle;
 -
                        if (cpu_is_offline(cpu))
                                play_dead();
  
                        local_irq_disable();
                        __get_cpu_var(irq_stat).idle_timestamp = jiffies;
 -                      idle();
 +                      pm_idle();
                }
                tick_nohz_restart_sched_tick();
                preempt_enable_no_resched();
@@@ -274,6 -333,7 +274,7 @@@ void flush_thread(void
        /*
         * Forget coprocessor state..
         */
+       tsk->fpu_counter = 0;
        clear_fpu(tsk);
        clear_used_math();
  }
@@@ -590,8 -650,11 +591,11 @@@ struct task_struct * __switch_to(struc
        /* If the task has used fpu the last 5 timeslices, just do a full
         * restore of the math state immediately to avoid the trap; the
         * chances of needing FPU soon are obviously high now
+        *
+        * tsk_used_math() checks prevent calling math_state_restore(),
+        * which can sleep in the case of !tsk_used_math()
         */
-       if (next_p->fpu_counter > 5)
+       if (tsk_used_math(next_p) && next_p->fpu_counter > 5)
                math_state_restore();
  
        /*
index 9fb3a6fe863bc81f34c3d36f6e9bb6df92fbd60a,c6eb5c91e5f607f7fb70758ed65eee667c7d1401..290183e9731a2c45e25d0855533d8a7bea69e74c
@@@ -56,6 -56,15 +56,6 @@@ asmlinkage extern void ret_from_fork(vo
  
  unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
  
 -unsigned long boot_option_idle_override = 0;
 -EXPORT_SYMBOL(boot_option_idle_override);
 -
 -/*
 - * Powermanagement idle function, if any..
 - */
 -void (*pm_idle)(void);
 -EXPORT_SYMBOL(pm_idle);
 -
  static ATOMIC_NOTIFIER_HEAD(idle_notifier);
  
  void idle_notifier_register(struct notifier_block *n)
@@@ -85,6 -94,25 +85,6 @@@ void exit_idle(void
        __exit_idle();
  }
  
 -/*
 - * We use this if we don't have any better
 - * idle routine..
 - */
 -void default_idle(void)
 -{
 -      current_thread_info()->status &= ~TS_POLLING;
 -      /*
 -       * TS_POLLING-cleared state must be visible before we
 -       * test NEED_RESCHED:
 -       */
 -      smp_mb();
 -      if (!need_resched())
 -              safe_halt();    /* enables interrupts racelessly */
 -      else
 -              local_irq_enable();
 -      current_thread_info()->status |= TS_POLLING;
 -}
 -
  #ifdef CONFIG_HOTPLUG_CPU
  DECLARE_PER_CPU(int, cpu_state);
  
@@@ -122,9 -150,12 +122,9 @@@ void cpu_idle(void
        while (1) {
                tick_nohz_stop_sched_tick();
                while (!need_resched()) {
 -                      void (*idle)(void);
  
                        rmb();
 -                      idle = pm_idle;
 -                      if (!idle)
 -                              idle = default_idle;
 +
                        if (cpu_is_offline(smp_processor_id()))
                                play_dead();
                        /*
                         */
                        local_irq_disable();
                        enter_idle();
 -                      idle();
 +                      pm_idle();
                        /* In many cases the interrupt that ended idle
                           has already called exit_idle. But some idle
                           loops can be woken up without interrupt. */
@@@ -263,6 -294,7 +263,7 @@@ void flush_thread(void
        /*
         * Forget coprocessor state..
         */
+       tsk->fpu_counter = 0;
        clear_fpu(tsk);
        clear_used_math();
  }
@@@ -627,8 -659,11 +628,11 @@@ __switch_to(struct task_struct *prev_p
        /* If the task has used fpu the last 5 timeslices, just do a full
         * restore of the math state immediately to avoid the trap; the
         * chances of needing FPU soon are obviously high now
+        *
+        * tsk_used_math() checks prevent calling math_state_restore(),
+        * which can sleep in the case of !tsk_used_math()
         */
-       if (next_p->fpu_counter>5)
+       if (tsk_used_math(next_p) && next_p->fpu_counter > 5)
                math_state_restore();
        return prev_p;
  }
diff --combined arch/x86/pci/pci.h
index fd53db50eeeb0f6c1f5af35adf6d0163bbcf8c88,720c4c55453462d78770d03506c26ae45d6d2edd..ba263e626a68762bf4e4c470fe325fa01c4f45ee
@@@ -27,7 -27,6 +27,7 @@@
  #define PCI_CAN_SKIP_ISA_ALIGN        0x8000
  #define PCI_USE__CRS          0x10000
  #define PCI_CHECK_ENABLE_AMD_MMCONF   0x20000
 +#define PCI_HAS_IO_ECS                0x40000
  
  extern unsigned int pci_probe;
  extern unsigned long pirq_table_addr;
@@@ -102,7 -101,7 +102,7 @@@ 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_olpc_init(void);
+ extern int pci_olpc_init(void);
  
  /* pci-mmconfig.c */