1. 23 2月, 2010 1 次提交
  2. 16 2月, 2010 1 次提交
    • A
      ACPI: fix High cpu temperature with 2.6.32 · 370d5cd8
      Arjan van de Ven 提交于
      Since the rewrite of the CPU idle governor in 2.6.32, two laptops have
      surfaced where the BIOS advertises a C2 power state, but for some reason
      this state is not functioning (as verified in both cases by powertop
      before the patch in .32).
      
      The old governor had the accidental behavior that if a non-working state
      was chosen too many times, it would end up falling back to C1.  The new
      governor works differently and this accidental behavior is no longer
      there; the result is a high temperature on these two machines.
      
      This patch adds these 2 machines to the DMI table for C state anomalies;
      by just not using C2 both these machines are better off (the TSC can be
      used instead of the pm timer, giving a performance boost for example).
      
      Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14742Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Reported-by: <akwatts@ymail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      370d5cd8
  3. 20 1月, 2010 3 次提交
    • L
      ACPI: delete acpi_processor_power_verify_c2() · d22edd29
      Len Brown 提交于
      no functional change -- cleanup only.
      
      acpi_processor_power_verify_c2() was nearly empty due to a previous patch,
      so expand its remains into its one caller and delete it.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d22edd29
    • L
      ACPI: allow C3 > 1000usec · a6d72c18
      Len Brown 提交于
      Do for C3 what the previous patch did for C2.
      
      The C2 patch was in response to a highly visible
      and multiply reported C-state/turbo failure,
      while this change has no bug report in-hand.
      
      This will enable C3 in Linux on systems where BIOS
      overstates C3 latency in _CST.  It will also enable
      future systems which may actually have C3 > 1000usec.
      
      Linux has always ignored ACPI BIOS C3 with exit latency > 1000 usec,
      and the ACPI spec is clear that is correct FADT-supplied C3.
      
      However, the ACPI spec explicitly states that _CST-supplied C-states
      have no latency limits.
      
      So move the 1000usec C3 test out of the code shared
      by FADT and _CST code-paths, and into the FADT-specific path.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a6d72c18
    • L
      ACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C · 5d76b6f6
      Len Brown 提交于
      Linux has always ignored ACPI BIOS C2 with exit latency > 100 usec,
      and the ACPI spec is clear that is correct FADT-supplied C2.
      
      However, the ACPI spec explicitly states that _CST-supplied C-states
      have no latency limits.
      
      So move the 100usec C2 test out of the code shared
      by FADT and _CST code-paths, and into the FADT-specific path.
      
      This bug has not been visible until Nehalem, which advertises
      a CPU-C2 worst case exit latency on servers of 205usec.
      That (incorrect) figure is being used by BIOS writers
      on mobile Nehalem systems for the AC configuration.
      Thus, Linux ignores C2 leaving just C1, which is
      saves less power, and also impacts performance
      by preventing the use of turbo mode.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=15064Tested-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      5d76b6f6
  4. 16 12月, 2009 1 次提交
    • H
      ACPI: fix for lapic_timer_propagate_broadcast() · 918aae42
      Hidetoshi Seto 提交于
      I got following warning on ia64 box:
        In function 'acpi_processor_power_verify':
        642: warning: passing argument 2 of 'smp_call_function_single' from
        incompatible pointer type
      
      This smp_call_function_single() was introduced by a commit
      f833bab8:
      
       > @@ -162,8 +162,9 @@
       >               pr->power.timer_broadcast_on_state = state;
       >  }
       >
       > -static void lapic_timer_propagate_broadcast(struct acpi_processor *pr)
       > +static void lapic_timer_propagate_broadcast(void *arg)
       >  {
       > +       struct acpi_processor *pr = (struct acpi_processor *) arg;
       >         unsigned long reason;
       >
       >         reason = pr->power.timer_broadcast_on_state < INT_MAX ?
       > @@ -635,7 +636,8 @@
       >                 working++;
       >         }
       >
       > -       lapic_timer_propagate_broadcast(pr);
       > +       smp_call_function_single(pr->id, lapic_timer_propagate_broadcast,
       > +                                pr, 1);
       >
       >         return (working);
       >  }
      
      The problem is that the lapic_timer_propagate_broadcast() has 2 versions:
      One is real code that modified in the above commit, and the other is NOP
      code that used when !ARCH_APICTIMER_STOPS_ON_C3:
      
        static void lapic_timer_propagate_broadcast(struct acpi_processor *pr) { }
      
      So I got warning because of !ARCH_APICTIMER_STOPS_ON_C3.
      
      We really want to do nothing here on !ARCH_APICTIMER_STOPS_ON_C3, so
      modify lapic_timer_propagate_broadcast() of real version to use
      smp_call_function_single() in it.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Acked-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      918aae42
  5. 28 9月, 2009 1 次提交
  6. 27 9月, 2009 1 次提交
  7. 29 8月, 2009 1 次提交
  8. 20 8月, 2009 1 次提交
    • S
      clockevent: Prevent dead lock on clockevents_lock · f833bab8
      Suresh Siddha 提交于
      Currently clockevents_notify() is called with interrupts enabled at
      some places and interrupts disabled at some other places.
      
      This results in a deadlock in this scenario.
      
      cpu A holds clockevents_lock in clockevents_notify() with irqs enabled
      cpu B waits for clockevents_lock in clockevents_notify() with irqs disabled
      cpu C doing set_mtrr() which will try to rendezvous of all the cpus.
      
      This will result in C and A come to the rendezvous point and waiting
      for B. B is stuck forever waiting for the spinlock and thus not
      reaching the rendezvous point.
      
      Fix the clockevents code so that clockevents_lock is taken with
      interrupts disabled and thus avoid the above deadlock.
      
      Also call lapic_timer_propagate_broadcast() on the destination cpu so
      that we avoid calling smp_call_function() in the clockevents notifier
      chain.
      
      This issue left us wondering if we need to change the MTRR rendezvous
      logic to use stop machine logic (instead of smp_call_function) or add
      a check in spinlock debug code to see if there are other spinlocks
      which gets taken under both interrupts enabled/disabled conditions.
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: "Pallipadi Venkatesh" <venkatesh.pallipadi@intel.com>
      Cc: "Brown Len" <len.brown@intel.com>
      LKML-Reference: <1250544899.2709.210.camel@sbs-t61.sc.intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f833bab8
  9. 24 6月, 2009 2 次提交
  10. 18 6月, 2009 1 次提交
    • L
      ACPI: idle: rename lapic timer workaround routines · 7e275cc4
      Len Brown 提交于
      cosmetic only.  The lapic_timer workaround routines
      are specific to the lapic_timer, and are not acpi-generic.
      
      old:
      
      acpi_timer_check_state()
      acpi_propagate_timer_broadcast()
      acpi_state_timer_broadcast()
      
      new:
      
      lapic_timer_check_state()
      lapic_timer_propagate_broadcast()
      lapic_timer_state_broadcast()
      
      also, simplify the code in acpi_processor_power_verify()
      so that lapic_timer_check_state() is simply called
      from one place for all valid C-states, including C1.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7e275cc4
  11. 28 5月, 2009 1 次提交
  12. 27 5月, 2009 2 次提交
  13. 16 5月, 2009 3 次提交
  14. 15 5月, 2009 2 次提交
    • I
      perf_counter: Remove ACPI quirk · 251e8e3c
      Ingo Molnar 提交于
      We had a disable/enable around acpi_idle_do_entry() due to an erratum
      in an early prototype CPU i had access to. That erratum has been fixed
      in the BIOS so remove the quirk.
      
      The quirk also kept us from profiling interrupts that hit the ACPI idle
      instruction - so this is an improvement as well, beyond a cleanup and
      a micro-optimization.
      
      [ Impact: improve profiling scope, cleanup, micro-optimization ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      251e8e3c
    • P
      perf_counter: Rework the perf counter disable/enable · 9e35ad38
      Peter Zijlstra 提交于
      The current disable/enable mechanism is:
      
      	token = hw_perf_save_disable();
      	...
      	/* do bits */
      	...
      	hw_perf_restore(token);
      
      This works well, provided that the use nests properly. Except we don't.
      
      x86 NMI/INT throttling has non-nested use of this, breaking things. Therefore
      provide a reference counter disable/enable interface, where the first disable
      disables the hardware, and the last enable enables the hardware again.
      
      [ Impact: refactor, simplify the PMU disable/enable logic ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9e35ad38
  15. 24 4月, 2009 2 次提交
  16. 23 4月, 2009 2 次提交
  17. 08 4月, 2009 1 次提交
  18. 04 4月, 2009 1 次提交
  19. 27 3月, 2009 2 次提交
  20. 17 3月, 2009 1 次提交
    • A
      acpi: fix of pmtimer overflow that make Cx states time incorrect · ff69f2bb
      alex.shi 提交于
      We found Cx states time abnormal in our some of machines which have 16
      LCPUs, the C0 take too many time while system is really idle when kernel
      enabled tickless and highres.  powertop output is below:
      
           PowerTOP version 1.9       (C) 2007 Intel Corporation
      
      Cn                Avg residency       P-states (frequencies)
      C0 (cpu running)        (40.5%)         2.53 Ghz     0.0%
      C1                0.0ms ( 0.0%)         2.53 Ghz     0.0%
      C2              128.8ms (59.5%)         2.40 Ghz     0.0%
                                              1.60 Ghz   100.0%
      
      Wakeups-from-idle per second :  4.7     interval: 20.0s
      no ACPI power usage estimate available
      
      Top causes for wakeups:
        41.4% ( 24.9)       <interrupt> : extra timer interrupt
        20.2% ( 12.2)     <kernel core> : usb_hcd_poll_rh_status
      (rh_timer_func)
      
      After tacking detailed for this issue, Yakui and I find it is due to 24
      bit PM timer overflows when some of cpu sleep more than 4 seconds.  With
      tickless kernel, the CPU want to sleep as much as possible when system
      idle.  But the Cx sleep time are recorded by pmtimer which length is
      determined by BIOS.  The current Cx time was gotten in the following
      function from driver/acpi/processor_idle.c:
      
      static inline u32 ticks_elapsed(u32 t1, u32 t2)
      {
             if (t2 >= t1)
                     return (t2 - t1);
             else if (!(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER))
                     return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF);
             else
                     return ((0xFFFFFFFF - t1) + t2);
      }
      
      If pmtimer is 24 bits and it take 5 seconds from t1 to t2, in above
      function, just about 1 seconds ticks was recorded.  So the Cx time will be
      reduced about 4 seconds.  and this is why we see above powertop output.
      
      To resolve this problem, Yakui and I use ktime_get() to record the Cx
      states time instead of PM timer as the following patch.  the patch was
      tested with i386/x86_64 modes on several platforms.
      Acked-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Tested-by: NAlex Shi <alex.shi@intel.com>
      Signed-off-by: NAlex Shi <alex.shi@intel.com>
      Signed-off-by: NYakui.zhao <yakui.zhao@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ff69f2bb
  21. 16 2月, 2009 1 次提交
  22. 07 2月, 2009 1 次提交
    • L
      ACPI: delete CPU_IDLE=n code · 9fdd54f2
      Len Brown 提交于
      CPU_IDLE=y has been default for ACPI=y since Nov-2007,
      and has shipped in many distributions since then.
      
      Here we delete the CPU_IDLE=n ACPI idle code, since
      nobody should be using it, and we don't want to
      maintain two versions.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      9fdd54f2
  23. 29 1月, 2009 2 次提交
    • L
      ACPI: remove BM_RLD access from idle entry path · 31878dd8
      Len Brown 提交于
      It is true that BM_RLD needs to be set to enable
      bus master activity to wake an older chipset (eg PIIX4) from C3.
      
      This is contrary to the erroneous wording the ACPI 2.0, 3.0
      specifications that suggests that BM_RLD is an indicator
      rather than a control bit.
      
      ACPI 1.0's correct wording should be restored in ACPI 4.0:
      http://www.acpica.org/bugzilla/show_bug.cgi?id=689
      
      But the kernel should not have to clear BM_RLD
      when entering a non C3-type state just to set
      it again when entering a C3-type C-state.
      
      We should be able to set BM_RLD at boot time
      and leave it alone -- removing the overhead of
      accessing this IO register from the idle entry path.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      31878dd8
    • L
      ACPI: remove locking from PM1x_STS register reads · a2b7b01c
      Len Brown 提交于
      PM1a_STS and PM1b_STS are twins that get OR'd together
      on reads, and all writes are repeated to both.
      
      The fields in PM1x_STS are single bits only,
      there are no multi-bit fields.
      
      So it is not necessary to lock PM1x_STS reads against
      writes because it is impossible to read an intermediate
      value of a single bit.  It will either be 0 or 1,
      even if a write is in progress during the read.
      Reads are asynchronous to writes no matter if a lock
      is used or not.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a2b7b01c
  24. 07 1月, 2009 1 次提交
    • R
      remove linux/hardirq.h from asm-generic/local.h · ba84be23
      Russell King 提交于
      While looking at reducing the amount of architecture namespace pollution
      in the generic kernel, I found that asm/irq.h is included in the vast
      majority of compilations on ARM (around 650 files.)
      
      Since asm/irq.h includes a sub-architecture include file on ARM, this
      causes a negative impact on the ccache's ability to re-use the build
      results from other sub-architectures, so we have a desire to reduce the
      dependencies on asm/irq.h.
      
      It turns out that a major cause of this is the needless include of
      linux/hardirq.h into asm-generic/local.h.  The patch below removes this
      include, resulting in some 250 to 300 files (around half) of the kernel
      then omitting asm/irq.h.
      
      My test builds still succeed, provided two ARM files are fixed
      (arch/arm/kernel/traps.c and arch/arm/mm/fault.c) - so there may be
      negative impacts for this on other architectures.
      
      Note that x86 does not include asm/irq.h nor linux/hardirq.h in its
      asm/local.h, so this patch can be viewed as bringing the generic version
      into line with the x86 version.
      
      [kosaki.motohiro@jp.fujitsu.com: add #include <linux/irqflags.h> to acpi/processor_idle.c]
      [adobriyan@gmail.com: fix sparc64]
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ba84be23
  25. 17 12月, 2008 1 次提交
    • V
      x86: support always running TSC on Intel CPUs · 40fb1715
      Venki Pallipadi 提交于
      Impact: reward non-stop TSCs with good TSC-based clocksources, etc.
      
      Add support for CPUID_0x80000007_Bit8 on Intel CPUs as well. This bit means
      that the TSC is invariant with C/P/T states and always runs at constant
      frequency.
      
      With Intel CPUs, we have 3 classes
      * CPUs where TSC runs at constant rate and does not stop n C-states
      * CPUs where TSC runs at constant rate, but will stop in deep C-states
      * CPUs where TSC rate will vary based on P/T-states and TSC will stop in deep
        C-states.
      
      To cover these 3, one feature bit (CONSTANT_TSC) is not enough. So, add a
      second bit (NONSTOP_TSC). CONSTANT_TSC indicates that the TSC runs at
      constant frequency irrespective of P/T-states, and NONSTOP_TSC indicates
      that TSC does not stop in deep C-states.
      
      CPUID_0x8000000_Bit8 indicates both these feature bit can be set.
      We still have CONSTANT_TSC _set_ and NONSTOP_TSC _not_set_ on some older Intel
      CPUs, based on model checks. We can use TSC on such CPUs for time, as long as
      those CPUs do not support/enter deep C-states.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      40fb1715
  26. 11 12月, 2008 2 次提交
  27. 08 11月, 2008 1 次提交
  28. 17 10月, 2008 1 次提交