1. 23 7月, 2010 2 次提交
  2. 21 7月, 2010 1 次提交
  3. 05 6月, 2010 2 次提交
  4. 29 5月, 2010 2 次提交
    • V
      ACPI: Minor cleanup eliminating redundant PMTIMER_TICKS to NS conversion · 2da513f5
      Venkatesh Pallipadi 提交于
      acpi_enter_[simple,bm] does
      idle timing in ns, convert it to timeval, then to us, then to
      pmtimer_ticks and then back to ns.
      
      This patch changes things to
      idle timing in ns, convert it to us, and then to pmtimer_ticks.
      
      Just saves an imul along this path, but makes the code cleaner.
      Signed-off-by: NVenkatesh Pallipadi <venki@google.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2da513f5
    • L
      ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case · 02cf4f98
      Len Brown 提交于
      commit d306ebc2
      (ACPI: Be in TS_POLLING state during mwait based C-state entry)
      fixed an important power & performance issue where ACPI c2 and c3 C-states
      were clearing TS_POLLING even when using MWAIT (ACPI_STATE_FFH).
      That bug had been causing us to receive redundant scheduling interrups
      when we had already been woken up by MONITOR/MWAIT.
      
      Following up on that...
      
      In the MWAIT case, we don't have to subsequently
      check need_resched(), as that c heck was there
      for the TS_POLLING-clearing case.
      
      Note that not only does the cpuidle calling function
      already check need_resched() before calling us, the
      low-level entry into monitor/mwait calls it twice --
      guaranteeing that a write to the trigger address
      can not go un-noticed.
      
      Also, in this case, we don't have to set TS_POLLING
      when we wake, because we never cleared it.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Acked-by: NVenkatesh Pallipadi <venki@google.com>
      02cf4f98
  5. 22 5月, 2010 1 次提交
  6. 11 5月, 2010 1 次提交
    • M
      PM QOS update · ed77134b
      Mark Gross 提交于
      This patch changes the string based list management to a handle base
      implementation to help with the hot path use of pm-qos, it also renames
      much of the API to use "request" as opposed to "requirement" that was
      used in the initial implementation.  I did this because request more
      accurately represents what it actually does.
      
      Also, I added a string based ABI for users wanting to use a string
      interface.  So if the user writes 0xDDDDDDDD formatted hex it will be
      accepted by the interface.  (someone asked me for it and I don't think
      it hurts anything.)
      
      This patch updates some documentation input I got from Randy.
      Signed-off-by: Nmarkgross <mgross@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ed77134b
  7. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  8. 23 2月, 2010 1 次提交
  9. 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
  10. 28 1月, 2010 1 次提交
  11. 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
  12. 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
  13. 28 9月, 2009 1 次提交
  14. 27 9月, 2009 1 次提交
  15. 29 8月, 2009 1 次提交
  16. 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
  17. 24 6月, 2009 2 次提交
  18. 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
  19. 28 5月, 2009 1 次提交
  20. 27 5月, 2009 2 次提交
  21. 16 5月, 2009 3 次提交
  22. 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
  23. 24 4月, 2009 2 次提交
  24. 23 4月, 2009 2 次提交
  25. 08 4月, 2009 1 次提交
  26. 04 4月, 2009 1 次提交
  27. 27 3月, 2009 2 次提交