1. 17 5月, 2007 1 次提交
  2. 10 5月, 2007 7 次提交
    • L
      acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC commands · 00eb43a1
      Lennart Poettering 提交于
      The ACPI EC that is used in MSI laptops knows some non-standard
      commands for changing the screen brighntess and a few other things,
      which are used by the msi-laptop.c driver. Unfortunately for these
      commands no GPE events for IBF and OBF are triggered. Since nowadays
      the EC code uses the ec_intr=1 mode by default, this causes these
      operations to timeout, although they don't fail. In result, all
      operations that you can do with the msi-laptop.c driver take more or
      less 1s to complete, which is awfully slow.
      
      In one of the more recent kernels (2.6.20?) the EC subsystem has been
      revamped. With that change the EC timeout has been increased. before
      that increase the MSI EC accesses were slow -- but not *that* slow,
      hence I took notice of this limitation of the MSI EC hardware only very
      recently.
      
      The standard EC operations on the MSI EC as defined in the ACPI spec
      support GPE events properly.
      
      The following patch adds a new argument "force_poll" to the
      ec_transaction() function (and friends). If set to 1, the function
      will poll for IBF/OBF even if ec_intr=1 is enabled. If set to 0 the
      current behaviour is used. The msi-laptop driver is modified to make
      use of this new flag, so that OBF/IBF is polled for the special MSI EC
      transactions -- but only for them.
      Signed-off-by: NLennart Poettering <mzxreary@0pointer.de>
      Acked-by: NAlexey Starikovskiy <aystarik@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      00eb43a1
    • L
      ACPICA: Lindent · fd350943
      Len Brown 提交于
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fd350943
    • A
      ACPI: created a dedicated workqueue for notify() execution · 88db5e14
      Alexey Starikovskiy 提交于
      HP nx6125/nx6325/... machines have a _GPE handler with an infinite
      loop sending Notify() events to different ACPI subsystems.
      
      Notify handler in ACPI driver is a C-routine, which may call ACPI
      interpreter again to get access to some ACPI variables
      (acpi_evaluate_xxx).
      On these HP machines such an evaluation changes state of some variable
      and lets the loop above break.
      
      In the current ACPI implementation Notify requests are being deferred
      to the same kacpid workqueue on which the above GPE handler with
      infinite loop is executing. Thus we have a deadlock -- loop will
      continue to spin, sending notify events, and at the same time
      preventing these notify events from being run on a workqueue. All
      notify events are deferred, thus we see increase in memory consumption
      noticed by author of the thread. Also as GPE handling is bloked,
      machines overheat. Eventually by external poll of the same
      acpi_evaluate, kacpid is released and all the queued notify events are
      free to run, thus 100% cpu utilization by kacpid for several seconds
      or more.
      
      To prevent all these horrors it's needed to not put notify events to
      kacpid workqueue by either executing them immediately or putting them
      on some other thread. It's dangerous to execute notify events in
      place, as it will put several ACPI interpreter stacks on top of each
      other (at least 4 in case of nx6125), thus causing kernel  stack
      overflow.
      
      First attempt to create a new thread was done by Peter Wainwright
      He created a bunch of threads, which were stealing work from a kacpid
      workqueue.
      This patch appeared in 2.6.15 kernel shipped with Ubuntu 6.06 LTS.
      
      Second attempt was done by me, I created a new thread for each Notify
      event. This worked OK on HP nx machines, but broke Linus' Compaq
      n620c, by producing threads with a speed what they stopped the machine
      completely. Thus this patch was reverted from 18-rc2 as I remember.
      I re-made the patch to create second workqueue just for notify events,
      thus hopping it will not break Linus' machine. Patch was tested on the
      same HP nx machines in #5534 and #7122, but I did not received reply
      from Linus on a test patch sent to him.
      Patch went to 19-rc and was rejected with much fanfare again.
      There was 4th patch, which inserted schedule_timeout(1) into deferred
      execution of kacpid, if we had any notify requests pending, but Linus
      decided that it was too complex (involved either changes to workqueue
      to see if it's empty or atomic inc/dec).
      Now you see last variant which adds yield() to every GPE execution.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=5534
      http://bugzilla.kernel.org/show_bug.cgi?id=8385Signed-off-by: NAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      88db5e14
    • L
      Revert "ACPICA: fix AML mutex re-entrancy" · 262a7a28
      Len Brown 提交于
      This reverts commit c0d127b5.
      
      These changes to AML locking were made to allow
      Notify handlers to be called on the stack
      and not deadlock.  However, that scheme turns
      out to be flawed and was reverted by the previous commit,
      so this commit restores the locking to it previous design.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      262a7a28
    • L
      Revert "Execute AML Notify() requests on stack." · 40d07080
      Len Brown 提交于
      This reverts commit 5f7748cf.
      
      While that change fixed the HP
      http://bugzilla.kernel.org/show_bug.cgi?id=5534
      
      it broke the ACER:
      http://bugzilla.kernel.org/show_bug.cgi?id=8385
      which as AML that caused Linux go recursive
      and stack fault.
      
      So this commit by itself will restore the ACER
      and again break the HP, which we'll fix another way.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      40d07080
    • L
      Revert "ACPICA: revert "acpi_serialize" changes" · 4d2acd9e
      Len Brown 提交于
      This reverts commit a8f4af6d.
      Thus restoring ACPICA's new acpi_serialize code.
      
      This commit by itself may cause a regression, but
      it is reverted in this order so that subsequent
      reverts reverts under this one can be made
      without conflict.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4d2acd9e
    • R
      PM: Separate hibernation code from suspend code · a3d25c27
      Rafael J. Wysocki 提交于
      [ With Johannes Berg <johannes@sipsolutions.net> ]
      
      Separate the hibernation (aka suspend to disk code) from the other suspend
      code.  In particular:
      
       * Remove the definitions related to hibernation from include/linux/pm.h
       * Introduce struct hibernation_ops and a new hibernate() function to hibernate
         the system, defined in include/linux/suspend.h
       * Separate suspend code in kernel/power/main.c from hibernation-related code
         in kernel/power/disk.c and kernel/power/user.c (with the help of
         hibernation_ops)
       * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a3d25c27
  3. 09 5月, 2007 6 次提交
  4. 08 5月, 2007 1 次提交
  5. 03 5月, 2007 1 次提交
    • J
      [PATCH] x86: Log reason why TSC was marked unstable · 5a90cf20
      john stultz 提交于
      Change mark_tsc_unstable() so it takes a string argument, which holds the
      reason the TSC was marked unstable.
      
      This is then displayed the first time mark_tsc_unstable is called.
      
      This should help us better debug why the TSC was marked unstable on certain
      systems and allow us to make sure we're not being overly paranoid when
      throwing out this troublesome clocksource.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      5a90cf20
  6. 01 5月, 2007 3 次提交
    • L
      ACPI: delete un-reliable concept of cooling mode · eaca2d3f
      Len Brown 提交于
      The scheme where the thermal driver displayed the
      cooling mode /proc/acpi/thermal_zone/*/cooling_mode
      was flawed in two ways.
      
      First, the success of _SCP doesn't actually mean
      that the BIOS moved any trip points.
      On many BIOS, _SCP is present, but does nothing.
      So displaying what _SCP executed actually
      was wrong more times than it was right.
      
      Second, examining the relative position of the
      trip points when the thermal_zone is added
      is insufficient -- as the BIOS reserves the right
      to change the trip points at run-time.
      
      The only reliable way for the user to determine if
      the thermal zone is in active, passive, or critical
      mode is to examine the relative position of the trip points.
      The user can do this without the kernel doing it
      for them by looking in /proc/acpi/thermal_zone/*/trip_points
      
      New contents for /proc/acpi/thermal_zone/*/cooling_mode:
      
      If _SCP available:
      "0 - Active; 1 - Passive\n"
      
      If _SCP unavailable:
      "<setting not supported>\n"
      Signed-off-by: NLen Brown <len.brown@intel.com>
      eaca2d3f
    • L
      ACPI: thermal trip points are read-only · 11ccc0f2
      Len Brown 提交于
      /proc/acpi/thermal_zone/*/trip_points displays
      what the kernel reads from the BIOS via ACPI.
      
      If you echo a string of ':' deliminted numbers to this file
      then it will change what it displays.
      
      But it shouldn't, since the kernel has no way to communicate
      these changes to ACPI thermal zones.  ACPI thermal zone
      trip points are read-only.
      
      The kernel does have the opportunity to ask the BIOS to change
      the trip points with _SCP - Set Cooling Policy.
      
      Request Active Cooling Mode:
      # echo 0 > /proc/acpi/thermal_zone/*/cooling_policy
      
      Request Passive Cooling Mode:
      # echo 1 > /proc/acpi/thermal_zone/*/cooling_policy
      
      However, in practice it is quite rare for the BIOS
      to support the optional _SCP, and it is even more rare
      for the BIOS to export an _SCP that actually changes
      the trip points.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      11ccc0f2
    • J
      power management: implement pm_ops.valid for everybody · e8c9c502
      Johannes Berg 提交于
      Almost all users of pm_ops only support mem sleep, don't check in .valid and
      don't reject any others in .prepare so users can be confused if they check
      /sys/power/state, especially when new states are added (these would then
      result in s-t-r although they're supposed to be something different).
      
      This patch implements a generic pm_valid_only_mem function that is then
      exported for users and puts it to use in almost all existing pm_ops.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: David Brownell <david-b@pacbell.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: linux-pm@lists.linux-foundation.org
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8c9c502
  7. 29 4月, 2007 1 次提交
  8. 27 4月, 2007 1 次提交
  9. 26 4月, 2007 5 次提交
  10. 24 4月, 2007 1 次提交
  11. 31 3月, 2007 1 次提交
  12. 29 3月, 2007 1 次提交
  13. 26 3月, 2007 6 次提交
  14. 24 3月, 2007 1 次提交
  15. 23 3月, 2007 1 次提交
  16. 22 3月, 2007 3 次提交