1. 01 1月, 2016 8 次提交
  2. 28 12月, 2015 4 次提交
  3. 21 12月, 2015 1 次提交
  4. 15 12月, 2015 5 次提交
    • L
      ACPI / debugger: Add module support for ACPI debugger · 836d0830
      Lv Zheng 提交于
      This patch converts AML debugger into a loadable module.
      
      Note that, it implements driver unloading at the level dependent on the
      module reference count. Which means if ACPI debugger is being used by a
      userspace program, "rmmod acpi_dbg" should result in failure.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      836d0830
    • L
      ACPI / debugger: Add IO interface to access debugger functionalities · 8cfb0cdf
      Lv Zheng 提交于
      This patch adds /sys/kernel/debug/acpi/acpidbg, which can be used by
      userspace programs to access ACPICA debugger functionalities.
      
      Known issue:
      1. IO flush support
         acpi_os_notify_command_complete() and acpi_os_wait_command_ready() can
         be used by acpi_dbg module to implement .flush() filesystem operation.
         While this patch doesn't go that far. It then becomes userspace tool's
         duty now to flush old commands before executing new batch mode commands.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8cfb0cdf
    • L
      ACPICA: Debugger: Fix runtime stub issues of ACPI_DEBUGGER_EXEC using different stub mechanism · 8a2a2501
      Lv Zheng 提交于
      ACPICA commit 11522d6b894054fc4d62dd4f9863ec151296b386
      
      The ACPI_DEBUGGER_EXEC is a problem now when the debugger code is compiled
      but runtime disabled. They actually will get executed in this situation.
      Although such executions are harmless if we can correctly make
      acpi_db_single_step() a runtime stub, users may still do not want to see the
      debugger print messages logged into OSPMs' kernel logs when a debugger
      driver is not loaded to enable the debugger during runtime.
      
      This patch fixes this issue by introducing new stub mechanism instead of
      ACPI_DEBUGGER_EXEC. Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/11522d6bSigned-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8a2a2501
    • L
      ACPICA: Debugger: Convert some mechanisms to OSPM specific · f8d31489
      Lv Zheng 提交于
      The following mechanisms are OSPM specific:
      1. Redirect output destination to console: no file redirection will be
         needed by an in-kernel debugger, there is even no file can be accessed
         when the debugger is running in the kernel mode.
      2. Output command prompts: programs other than acpiexec can have different
         prompt characters and the prompt characters may be implemented as a
         special character sequence to form a char device IO protocol.
      3. Command ready/complete handshake: OSPM debugger may wait more conditions
         to implement OSPM specific semantics (for example, FIFO full/empty
         conditions for O_NONBLOCK or IO open/close conditions).
      Leaving such OSPM specific stuffs in the ACPICA debugger core blocks
      Linux debugger IO driver implementation.
      
      Several new OSL APIs are provided by this patch:
      1. acpi_os_initialize_command_signals: initialize command handshake mechanism
         or any other OSPM specific stuffs.
      2. acpi_os_terminate_command_signals: reversal of
         acpi_os_initialize_command_signals.
      3. acpi_os_wait_command_ready: putting debugger task into wait state when a
         command is not ready. OSPMs can terminate command loop by returning
         AE_CTRL_TERMINATE from this API. Normally, wait_event() or
         wait_for_multiple_object() may be used to implement this API.
      4. acpi_os_notify_command_complete: putting user task into running state when a
         command has been completed. OSPMs can terminate command loop by
         returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or
         set_event() may be used to implement this API.
      This patch also converts current command signaling implementation into a
      generic debugger layer (osgendbg.c) to be used by the existing OSPMs or
      acpiexec, in return, Linux can have chance to implement its own command
      handshake mechanism. This patch also implements acpiexec batch mode in a
      multi-threading mode comaptible style as a demo (this can be confirmed by
      configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode
      is still working). Lv Zheng.
      
      Note that the OSPM specific command handshake mechanism is required by
      Linux kernel because:
      1. Linux kernel trends to use wait queue to synchronize two threads, using
         mutexes to achieve that will cause false "dead lock" warnings.
      2. The command handshake mechanism implemented by ACPICA is implemented in
         this way because of a design issue in debugger IO streaming. Debugger IO
         outputs are simply cached using a giant buffer, this should be tuned by
         Linux in the future.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f8d31489
    • C
      ACPICA: Debugger: Remove unnecessary status check · 96889231
      Colin Ian King 提交于
      ACPICA commit f9d5c6c9a25e9f5ac05458bfcd8b381e21bb2ba5
      
      ACPICA BZ 1205. Colin Ian King.
      
      Link: https://bugs.acpica.org/show_bug.cgi?id=1205
      Link: https://github.com/acpica/acpica/commit/f9d5c6c9Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      96889231
  5. 12 12月, 2015 1 次提交
  6. 02 12月, 2015 1 次提交
  7. 01 12月, 2015 4 次提交
  8. 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
  9. 14 11月, 2015 1 次提交
  10. 07 11月, 2015 2 次提交
  11. 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
  12. 02 11月, 2015 2 次提交
  13. 26 10月, 2015 6 次提交