An error occurred fetching the project authors.
  1. 28 Jan, 2013 1 commit
    • Konrad Rzeszutek Wilk's avatar
      ACPI / cpuidle: Fix NULL pointer issues when cpuidle is disabled · a94e7cf8
      Konrad Rzeszutek Wilk authored
      commit b88a634a upstream.
      
      If cpuidle is disabled, that means that:
      
      	per_cpu(acpi_cpuidle_device, pr->id)
      
      is set to NULL as the acpi_processor_power_init ends up failing at
      
      	 retval = cpuidle_register_driver(&acpi_idle_driver)
      
      (in acpi_processor_power_init) and never sets the per_cpu idle
      device.  So when acpi_processor_hotplug on CPU online notification
      tries to reference said device it crashes:
      
      cpu 3 spinlock event irq 62
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
      IP: [<ffffffff81381013>] acpi_processor_setup_cpuidle_cx+0x3f/0x105
      PGD a259b067 PUD ab38b067 PMD 0
      Oops: 0002 [#1] SMP
      odules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c crc32c nouveau mxm_wmi wmi radeon ttm sg sr_mod sd_mod cdrom ata_generic ata_piix libata crc32c_intel scsi_mod atl1c i915 fbcon tileblit font bitblit softcursor drm_kms_helper video xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd mperf
      CPU 1
      Pid: 3047, comm: bash Not tainted 3.8.0-rc3upstream-00250-g165c029 #1 MSI MS-7680/H61M-P23 (MS-7680)
      RIP: e030:[<ffffffff81381013>]  [<ffffffff81381013>] acpi_processor_setup_cpuidle_cx+0x3f/0x105
      RSP: e02b:ffff88001742dca8  EFLAGS: 00010202
      RAX: 0000000000010be9 RBX: ffff8800a0a61800 RCX: ffff880105380000
      RDX: 0000000000000003 RSI: 0000000000000200 RDI: ffff8800a0a61800
      RBP: ffff88001742dce8 R08: ffffffff81812360 R09: 0000000000000200
      R10: aaaaaaaaaaaaaaaa R11: 0000000000000001 R12: ffff8800a0a61800
      R13: 00000000ffffff01 R14: 0000000000000000 R15: ffffffff81a907a0
      FS:  00007fd6942f7700(0000) GS:ffff880105280000(0000) knlGS:0000000000000000
      CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000004 CR3: 00000000a6773000 CR4: 0000000000042660
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process bash (pid: 3047, threadinfo ffff88001742c000, task ffff880017944000)
      Stack:
       0000000000000150 ffff880100f59e00 ffff88001742dcd8 ffff8800a0a61800
       0000000000000000 00000000ffffff01 0000000000000000 ffffffff81a907a0
       ffff88001742dd18 ffffffff813815b1 ffff88001742dd08 ffffffff810ae336
      Call Trace:
       [<ffffffff813815b1>] acpi_processor_hotplug+0x7c/0x9f
       [<ffffffff810ae336>] ? schedule_delayed_work_on+0x16/0x20
       [<ffffffff8137ee8f>] acpi_cpu_soft_notify+0x90/0xca
       [<ffffffff8166023d>] notifier_call_chain+0x4d/0x70
       [<ffffffff810bc369>] __raw_notifier_call_chain+0x9/0x10
       [<ffffffff81094a4b>] __cpu_notify+0x1b/0x30
       [<ffffffff81652cf7>] _cpu_up+0x103/0x14b
       [<ffffffff81652e18>] cpu_up+0xd9/0xec
       [<ffffffff8164a254>] store_online+0x94/0xd0
       [<ffffffff814122fb>] dev_attr_store+0x1b/0x20
       [<ffffffff81216404>] sysfs_write_file+0xf4/0x170
      
      This patch fixes it.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a94e7cf8
  2. 29 May, 2011 1 commit
    • Len Brown's avatar
      x86 idle: clarify AMD erratum 400 workaround · 02c68a02
      Len Brown authored
      The workaround for AMD erratum 400 uses the term "c1e" falsely suggesting:
      1. Intel C1E is somehow involved
      2. All AMD processors with C1E are involved
      
      Use the string "amd_c1e" instead of simply "c1e" to clarify that
      this workaround is specific to AMD's version of C1E.
      Use the string "e400" to clarify that the workaround is specific
      to AMD processors with Erratum 400.
      
      This patch is text-substitution only, with no functional change.
      
      cc: x86@kernel.org
      Acked-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      02c68a02
  3. 12 Jan, 2011 2 commits
    • Len Brown's avatar
      ACPI: processor_idle: delete use of NOP CPUIDLE_FLAGs · 0aae9f92
      Len Brown authored
      CPUIDLE_FLAG_SHALLOW
      CPUIDLE_FLAG_BALANCED
      CPUIDLE_FLAG_DEEP
      CPUIDLE_FLAG_CHECK_BM
      
      were set by acpi_processor_setup_cpuidle(),
      but never used by cpuidle or by acpi_idle.
      So stop setting them.
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      0aae9f92
    • Thomas Renninger's avatar
      ACPI, intel_idle: Cleanup idle= internal variables · d1896049
      Thomas Renninger authored
      Having four variables for the same thing:
        idle_halt, idle_nomwait, force_mwait and boot_option_idle_overrides
      is rather confusing and unnecessary complex.
      
      if idle= boot param is passed, only set up one variable:
      boot_option_idle_overrides
      
      Introduces following functional changes/fixes:
        - intel_idle driver does not register if any idle=xy
          boot param is passed.
        - processor_idle.c will also not register a cpuidle driver
          and get active if idle=halt is passed.
          Before a cpuidle driver with one (C1, halt) state got registered
          Now the default_idle function will be used which finally uses
          the same idle call to enter sleep state (safe_halt()), but
          without registering a whole cpuidle driver.
      
      That means idle= param will always avoid cpuidle drivers to register
      with one exception (same behavior as before):
      idle=nomwait
      may still register acpi_idle cpuidle driver, but C1 will not use
      mwait, but hlt. This can be a workaround for IO based deeper sleep
      states where C1 mwait causes problems.
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      cc: x86@kernel.org
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      d1896049
  4. 17 Dec, 2010 1 commit
    • Christoph Lameter's avatar
      drivers: Replace __get_cpu_var with __this_cpu_read if not used for an address. · 4a6f4fe8
      Christoph Lameter authored
      __get_cpu_var() can be replaced with this_cpu_read and will then use a single
      read instruction with implied address calculation to access the correct per cpu
      instance.
      
      However, the address of a per cpu variable passed to __this_cpu_read() cannot be
      determed (since its an implied address conversion through segment prefixes).
      Therefore apply this only to uses of __get_cpu_var where the addres of the
      variable is not used.
      
      V3->V4:
      	- Move one instance of this_cpu_inc_return to a later patch
      	  so that this one can go in without percpu infrastructrure
      	  changes.
      
      Sedat: fixed compile failure caused by an extra ')'.
      
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Sedat Dilek <sedat.dilek@gmail.com>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      4a6f4fe8
  5. 16 Oct, 2010 1 commit
  6. 01 Oct, 2010 1 commit
  7. 15 Aug, 2010 2 commits
  8. 02 Aug, 2010 1 commit
  9. 27 Jul, 2010 1 commit
  10. 22 Jul, 2010 2 commits
  11. 21 Jul, 2010 1 commit
  12. 04 Jun, 2010 2 commits
  13. 28 May, 2010 2 commits
    • Venkatesh Pallipadi's avatar
      ACPI: Minor cleanup eliminating redundant PMTIMER_TICKS to NS conversion · 2da513f5
      Venkatesh Pallipadi authored
      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: default avatarVenkatesh Pallipadi <venki@google.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      2da513f5
    • Len Brown's avatar
      ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case · 02cf4f98
      Len Brown authored
      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: default avatarLen Brown <len.brown@intel.com>
      Acked-by: default avatarVenkatesh Pallipadi <venki@google.com>
      02cf4f98
  14. 21 May, 2010 1 commit
  15. 10 May, 2010 1 commit
    • Mark Gross's avatar
      PM QOS update · ed77134b
      Mark Gross authored
      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: default avatarmarkgross <mgross@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      ed77134b
  16. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  17. 22 Feb, 2010 1 commit
  18. 16 Feb, 2010 1 commit
    • Arjan van de Ven's avatar
      ACPI: fix High cpu temperature with 2.6.32 · 370d5cd8
      Arjan van de Ven authored
      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: default avatarArjan van de Ven <arjan@linux.intel.com>
      Reported-by: <akwatts@ymail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      370d5cd8
  19. 28 Jan, 2010 1 commit
  20. 20 Jan, 2010 3 commits
    • Len Brown's avatar
      ACPI: delete acpi_processor_power_verify_c2() · d22edd29
      Len Brown authored
      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: default avatarLen Brown <len.brown@intel.com>
      d22edd29
    • Len Brown's avatar
      ACPI: allow C3 > 1000usec · a6d72c18
      Len Brown authored
      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: default avatarLen Brown <len.brown@intel.com>
      a6d72c18
    • Len Brown's avatar
      ACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C · 5d76b6f6
      Len Brown authored
      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: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5d76b6f6
  21. 16 Dec, 2009 1 commit
    • Hidetoshi Seto's avatar
      ACPI: fix for lapic_timer_propagate_broadcast() · 918aae42
      Hidetoshi Seto authored
      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: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      918aae42
  22. 27 Sep, 2009 2 commits
  23. 28 Aug, 2009 1 commit
  24. 19 Aug, 2009 1 commit
    • Suresh Siddha's avatar
      clockevent: Prevent dead lock on clockevents_lock · f833bab8
      Suresh Siddha authored
      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: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: default avatarVenkatesh 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: default avatarThomas Gleixner <tglx@linutronix.de>
      f833bab8
  25. 24 Jun, 2009 2 commits
  26. 18 Jun, 2009 1 commit
    • Len Brown's avatar
      ACPI: idle: rename lapic timer workaround routines · 7e275cc4
      Len Brown authored
      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: default avatarLen Brown <len.brown@intel.com>
      7e275cc4
  27. 28 May, 2009 1 commit
  28. 27 May, 2009 2 commits
  29. 16 May, 2009 2 commits