1. 21 12月, 2015 1 次提交
  2. 12 12月, 2015 1 次提交
  3. 02 12月, 2015 1 次提交
  4. 01 12月, 2015 4 次提交
  5. 17 11月, 2015 3 次提交
    • M
      ACPI-EC: Drop unnecessary check made before calling acpi_ec_delete_query() · 4981c2b7
      Markus Elfring 提交于
      The acpi_ec_delete_query() function tests whether its argument is NULL
      and then returns immediately. Thus the test around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      [ rjw: Subject ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4981c2b7
    • C
      Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook" · a76032e0
      Chris Bainbridge 提交于
      Revert commit 3349fb64 (ACPI / SBS: Add 5 us delay to fix SBS
      hangs on MacBook), since the delay introduced by it is not necessary
      any more after commit add68d6a (ACPI / SMBus: Fix boot stalls /
      high CPU caused by reentrant code).
      Signed-off-by: NChris Bainbridge <chris.bainbridge@gmail.com>
      [ rjw: Changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a76032e0
    • C
      ACPI / SMBus: Fix boot stalls / high CPU caused by reentrant code · add68d6a
      Chris Bainbridge 提交于
      In the SBS initialisation, a reentrant call to wait_event_timeout()
      causes an intermittent boot stall of several minutes usually following
      the "Switching to clocksource tsc" message. Another symptom of this bug
      is high CPU usage from programs (Firefox, upowerd) querying the battery
      state. This is caused by:
      
       1. drivers/acpi/sbshc.c wait_transaction_complete() calls
          wait_event_timeout():
      
       	if (wait_event_timeout(hc->wait, smb_check_done(hc),
       			       msecs_to_jiffies(timeout)))
      
       2. ___wait_event sets task state to uninterruptible
      
       3. ___wait_event calls the "condition" smb_check_done()
      
       4. smb_check_done (sbshc.c) calls through to ec_read() in
          drivers/acpi/ec.c
      
       5. ec_guard() is reached which calls wait_event_timeout()
      
       	if (wait_event_timeout(ec->wait,
       			       ec_transaction_completed(ec),
       			       guard))
      
          ie. wait_event_timeout() is being called again inside evaluation of
          the previous wait_event_timeout() condition
      
       5. The EC IRQ handler calls wake_up() and wakes up the sleeping task in
          ec_guard()
      
       6. The task is now in state running even though the wait "condition" is
          still being evaluated
      
       7. The "condition" check returns false so ___wait_event calls
          schedule_timeout()
      
       8. Since the task state is running, the scheduler immediately schedules
          it again
      
       9. This loop usually repeats for around 250 seconds even though the
          original wait_event_timeout was only 1000ms.
      
          The timeout is incorrect because each call to schedule_timeout()
          usually returns immediately, taking less than 1ms, so the jiffies
          timeout counter is not decremented. The task is now stuck in a
          running state, and so is highly likely to be immediately
          rescheduled, which takes less than a jiffy. The loop will never exit
          if all schedule_timeout() calls take less than a jiffy.
      
      Fix this by replacing SMBus reads in the wait_event_timeout condition
      with checks of a boolean value that is updated by the EC query handler.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=107191
      Link: https://lkml.org/lkml/2015/11/6/776Signed-off-by: NChris Bainbridge <chris.bainbridge@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      add68d6a
  6. 14 11月, 2015 1 次提交
  7. 07 11月, 2015 2 次提交
  8. 03 11月, 2015 2 次提交
    • V
      acpi: nfit: Add support for hot-add · 20985164
      Vishal Verma 提交于
      Add a .notify callback to the acpi_nfit_driver that gets called on a
      hotplug event. From this, evaluate the _FIT ACPI method which returns
      the updated NFIT with handles for the hot-plugged NVDIMM.
      
      Iterate over the new NFIT, and add any new tables found, and
      register/enable the corresponding regions.
      
      In the nfit test framework, after normal initialization, update the NFIT
      with a new hot-plugged NVDIMM, and directly call into the driver to
      update its view of the available regions.
      
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Cc: Elliott, Robert <elliott@hpe.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: <linux-acpi@vger.kernel.org>
      Cc: <linux-nvdimm@lists.01.org>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      20985164
    • V
      nfit: in acpi_nfit_init, break on a 0-length table · 564d5011
      Vishal Verma 提交于
      If acpi_nfit_init is called (such as from nfit_test), with an nfit table
      that has more memory allocated than it needs (and a similarly large
      'size' field, add_tables would happily keep adding null SPA Range tables
      filling up all available memory.
      
      Make it friendlier by breaking out if a 0-length header is found in any
      of the tables.
      
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: <linux-acpi@vger.kernel.org>
      Cc: <linux-nvdimm@lists.01.org>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      564d5011
  9. 02 11月, 2015 2 次提交
  10. 26 10月, 2015 8 次提交
  11. 22 10月, 2015 14 次提交
  12. 17 10月, 2015 1 次提交