1. 22 10月, 2015 2 次提交
    • L
      ACPI: Enable build of AML interpreter debugger · 4d946f79
      Lv Zheng 提交于
      This patch enables ACPICA debugger files using a configurable
      CONFIG_ACPI_DEBUGGER configuration item. Those debugger related code that
      was originally masked as ACPI_FUTURE_USAGE now gets unmasked.
      
      Necessary OSL stubs are also added in this patch:
      1. acpi_os_readable(): This should be arch specific in Linux, while this
          patch doesn't introduce real implementation and a complex mechanism to
          allow architecture specific acpi_os_readable() to be implemented to
          validate the address. It may be done by future commits.
      2. acpi_os_get_line(): This is used to obtain debugger command input. This
          patch only introduces a simple KDB concept example in it and the
          example should be co-working with the code implemented in
          acpi_os_printf(). Since this KDB example won't be compiled unless
          ENABLE_DEBUGGER is defined and it seems Linux has already stopped to
          use ENABLE_DEBUGGER, thus do not expect it can work properly.
      
      This patch also cleans up all other ACPI_FUTURE_USAGE surroundings
      accordingly.
      1. Since linkage error can be automatically detected, declaration in the
         headers needn't be surrounded by ACPI_FUTURE_USAGE.
         So only the following separate exported fuction bodies are masked by
         this macro (other exported fucntions may have already been masked at
         entire module level via drivers/acpi/acpica/Makefile):
           acpi_install_exception_handler()
           acpi_subsystem_status()
           acpi_get_system_info()
           acpi_get_statistics()
           acpi_install_initialization_handler()
      2. Since strip can automatically zap the no-user functions, functions that
         are not marked with ACPI_EXPORT_SYMBOL() needn't get surrounded by
         ACPI_FUTURE_USAGE.
         So the following function which is not used by Linux kernel now won't
         get surrounded by this macro:
           acpi_ps_get_name()
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4d946f79
    • L
      ACPICA: Debugger: Add thread ID support so that single step mode can only... · f988f24e
      Lv Zheng 提交于
      ACPICA: Debugger: Add thread ID support so that single step mode can only apply to the debugger thread
      
      When the debugger is running in the kernel mode, acpi_db_single_step() may
      also be invoked by the kernel runtime code path but the single stepping
      command prompt may be erronously logged as the kernel logs and runtime code
      path cannot proceed.
      
      This patch fixes this issue by adding acpi_gbl_db_thread_id for the debugger
      thread and preventing acpi_db_single_step() to be invoked from other threads.
      
      It is not suitable to add acpi_thread_id parameter for acpi_os_execute() as
      the function may be implemented as work queue on some hosts. So it is
      better to let the hosts invoke acpi_set_debugger_thread_id(). Currently
      acpiexec is not configured as DEBUGGER_MULTI_THREADED, but we can do this.
      When we do this, it is better to invoke acpi_set_debugger_thread_id() in
      acpi_os_execute() when the execution type is OSL_DEBUGGER_MAIN_THREAD. The
      support should look like:
        create_thread(&tid);
        if (type == OSL_DEBUGGER_MAIN_THREAD)
            acpi_set_debugger_thread_id(tid);
        resume_thread(tid);
      Similarly, semop() may be used for pthread implementation. But this patch
      simply skips debugger thread ID check for application instead of
      introducing such complications as there is no need to skip
      acpi_db_single_step() for an application debugger - acpiexec.
      
      Note that the debugger thread ID can also be used by acpi_os_printf() to
      filter out debugger output. Lv Zheng.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f988f24e
  2. 26 8月, 2015 2 次提交
  3. 24 7月, 2015 3 次提交
  4. 02 7月, 2015 5 次提交
    • B
      ACPICA: Update version to 20150619 · ce55d01e
      Bob Moore 提交于
      ACPICA commit 2fcf4f4c95e6a4875f39a929f8f92ef50cc53bb5
      ACPICA commit d7a940bb308d001b5d2b196174fee36c7daa61d6
      
      Version 20150619.
      
      Link: https://github.com/acpica/acpica/commit/2fcf4f4c
      Link: https://github.com/acpica/acpica/commit/d7a940bbSigned-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>
      ce55d01e
    • B
      ACPICA: Namespace: Change namespace override to avoid node deletion · 8ea98655
      Bob Moore 提交于
      ACPICA commit c0ce529e1fbb8ec47d2522a3aa10f3ab77e16e41
      
      There is no reference counting implemented for struct acpi_namespace_node, so it
      is currently not removable during runtime.
      This patch changes the namespace override code to keep the old
      struct acpi_namespace_node undeleted so that the override mechanism can happen
      during runtime. Bob Moore.
      
      Link: https://github.com/acpica/acpica/commit/c0ce529eSigned-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8ea98655
    • L
      ACPICA: Tables: Enable default 64-bit FADT addresses favor · 0ea61381
      Lv Zheng 提交于
      ACPICA commit 4da56eeae0749dfe8491285c1e1fad48f6efafd8
      
      The following commit temporarily disables correct 64-bit FADT addresses
      favor during the period the root cause of the bug is not fixed:
       Commit: 85dbd580
       ACPICA: Tables: Restore old behavor to favor 32-bit FADT addresses.
      
      With enough protections, this patch re-enables 64-bit FADT addresses by
      default. If regressions are reported against such change, this patch should
      be bisected and reverted.
      Note that 64-bit FACS favor and 64-bit firmware waking vector favor are
      excluded by this commit in order not to break OSPMs. Lv Zheng.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
      Link: https://github.com/acpica/acpica/commit/4da56eea
      Cc: 3.15.1+ <stable@vger.kernel.org> # 3.15.1+
      Reported-and-tested-by: NOswald Buddenhagen <ossi@kde.org>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0ea61381
    • L
      ACPICA: Tables: Enable both 32-bit and 64-bit FACS · c04e1fb4
      Lv Zheng 提交于
      ACPICA commit f7b86f35416e3d1f71c3d816ff5075ddd33ed486
      
      The following commit is reported to have broken s2ram on some platforms:
       Commit: 0249ed24
       ACPICA: Add option to favor 32-bit FADT addresses.
      The platform reports 2 FACS tables (which is not allowed by ACPI
      specification) and the new 32-bit address favor rule forces OSPMs to use
      the FACS table reported via FADT's X_FIRMWARE_CTRL field.
      
      The root cause of the reported bug might be one of the followings:
      1. BIOS may favor the 64-bit firmware waking vector address when the
         version of the FACS is greater than 0 and Linux currently only supports
         resuming from the real mode, so the 64-bit firmware waking vector has
         never been set and might be invalid to BIOS while the commit enables
         higher version FACS.
      2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
         FADT while the commit doesn't set the firmware waking vector address of
         the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
         vector address of the FACS reported by "X_FIRMWARE_CTRL".
      
      This patch excludes the cases that can trigger the bugs caused by the root
      cause 2.
      
      There is no handshaking mechanism can be used by OSPM to tell BIOS which
      FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still
      be used by BIOS and the 0 value of the 32-bit firmware waking vector might
      trigger such failure.
      
      This patch tries to favor 32bit FACS address in another way where both the
      FACS reported by "FIRMWARE_CTRL" and the FACS reported by "X_FIRMWARE_CTRL"
      are loaded so that further commit can set firmware waking vector in the
      both tables to ensure we can exclude the cases that trigger the bugs caused
      by the root cause 2. The exclusion is split into 2 commits as this commit
      is also useful for dumping more ACPI tables, it won't get reverted when
      such exclusion is no longer necessary. Lv Zheng.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
      Link: https://github.com/acpica/acpica/commit/f7b86f35
      Cc: 3.14.1+ <stable@vger.kernel.org> # 3.14.1+
      Reported-and-tested-by: NOswald Buddenhagen <ossi@kde.org>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c04e1fb4
    • L
      ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS · aca2a5d3
      Lv Zheng 提交于
      ACPICA commit 7aa598d711644ab0de5f70ad88f1e2de253115e4
      
      The following commit is reported to have broken s2ram on some platforms:
       Commit: 0249ed24
       ACPICA: Add option to favor 32-bit FADT addresses.
      The platform reports 2 FACS tables (which is not allowed by ACPI
      specification) and the new 32-bit address favor rule forces OSPMs to use
      the FACS table reported via FADT's X_FIRMWARE_CTRL field.
      
      The root cause of the reported bug might be one of the followings:
      1. BIOS may favor the 64-bit firmware waking vector address when the
         version of the FACS is greater than 0 and Linux currently only supports
         resuming from the real mode, so the 64-bit firmware waking vector has
         never been set and might be invalid to BIOS while the commit enables
         higher version FACS.
      2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
         FADT while the commit doesn't set the firmware waking vector address of
         the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
         vector address of the FACS reported by "X_FIRMWARE_CTRL".
      
      This patch excludes the cases that can trigger the bugs caused by the root
      cause 1.
      
      ACPI specification says:
      A. 32-bit FACS address (FIRMWARE_CTRL field in FADT):
         Physical memory address of the FACS, where OSPM and firmware exchange
         control information.
         If the X_FIRMWARE_CTRL field contains a non zero value then this field
         must be zero.
         A zero value indicates that no FACS is specified by this field.
      B. 64-bit FACS address (X_FIRMWARE_CTRL field in FADT):
         64bit physical memory address of the FACS.
         This field is used when the physical address of the FACS is above 4GB.
         If the FIRMWARE_CTRL field contains a non zero value then this field
         must be zero.
         A zero value indicates that no FACS is specified by this field.
      Thus the 32bit and 64bit firmware waking vector should indicate completely
      different resuming environment - real mode (1MB addressable) and non real
      mode (4GB+ addressable) and currently Linux only supports resuming from
      real mode.
      
      This patch enables 64-bit firmware waking vector for selected FACS via new
      acpi_set_firmware_waking_vectors() API so that it's up to OSPMs to
      determine which resuming mode should be used by BIOS and ACPICA changes
      won't trigger the bugs caused by the root cause 1. Lv Zheng.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
      Link: https://github.com/acpica/acpica/commit/7aa598d7Reported-and-tested-by: NOswald Buddenhagen <ossi@kde.org>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      aca2a5d3
  5. 22 5月, 2015 1 次提交
  6. 14 4月, 2015 2 次提交
  7. 05 2月, 2015 3 次提交
    • L
      ACPICA: Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix 2 issues for the current GPE APIs · 0d0988af
      Lv Zheng 提交于
      ACPICA commit 199cad16530a45aea2bec98e528866e20c5927e1
      
      Since whether the GPE should be disabled/enabled/cleared should only be
      determined by the GPE driver's state machine:
      1. GPE should be disabled if the driver wants to switch to the GPE polling
         mode when a GPE storm condition is indicated and should be enabled if
         the driver wants to switch back to the GPE interrupt mode when all of
         the storm conditions are cleared. The conditions should be protected by
         the driver's specific lock.
      2. GPE should be enabled if the driver has accepted more than one request
         and should be disabled if the driver has completed all of the requests.
         The request count should be protected by the driver's specific lock.
      3. GPE should be cleared either when the driver is about to handle an edge
         triggered GPE or when the driver has completed to handle a level
         triggered GPE. The handling code should be protected by the driver's
         specific lock.
      Thus the GPE enabling/disabling/clearing operations are likely to be
      performed with the driver's specific lock held while we currently cannot do
      this. This is because:
      1. We have the acpi_gbl_gpe_lock held before invoking the GPE driver's
         handler. Driver's specific lock is likely to be held inside of the
         handler, thus we can see some dead lock issues due to the reversed
         locking order or recursive locking. In order to solve such dead lock
         issues, we need to unlock the acpi_gbl_gpe_lock before invoking the
         handler. BZ 1100.
      2. Since GPE disabling/enabling/clearing should be determined by the GPE
         driver's state machine, we shouldn't perform such operations inside of
         ACPICA for a GPE handler to mess up the driver's state machine. BZ 1101.
      
      Originally this patch includes a logic to flush GPE handlers, it is dropped
      due to the following reasons:
      1. This is a different issue;
      2. Linux OSL has fixed this by flushing SCI in acpi_os_wait_events_complete().
      We will pick up this topic when the Linux OSL fix turns out to be not
      sufficient.
      
      Note that currently the internal operations and the acpi_gbl_gpe_lock are
      also used by ACPI_GPE_DISPATCH_METHOD and ACPI_GPE_DISPATCH_NOTIFY. In
      order not to introduce regressions, we add one
      ACPI_GPE_DISPATCH_RAW_HANDLER type to be distiguished from
      ACPI_GPE_DISPATCH_HANDLER. For which the acpi_gbl_gpe_lock is unlocked before
      invoking the GPE handler and the internal enabling/disabling operations are
      bypassed to allow drivers to perform them at a proper position using the
      GPE APIs and ACPI_GPE_DISPATCH_RAW_HANDLER users should invoke acpi_set_gpe()
      instead of acpi_enable_gpe()/acpi_disable_gpe() to bypass the internal GPE
      clearing code in acpi_enable_gpe(). Lv Zheng.
      
      Known issues:
      1. Edge-triggered GPE lost for frequent enablings
         On some buggy silicon platforms, GPE enable line may not be directly
         wired to the GPE trigger line. In that case, when GPE enabling is
         frequently performed for edge-triggered GPEs, GPE status may stay set
         without being triggered.
         This patch may maginify this problem as it allows GPE enabling to be
         parallel performed during the process the GPEs are handled.
         This is an existing issue, because:
         1. For task context:
            Current ACPI_GPE_DISPATCH_METHOD practices have proven that this
            isn't a real issue - we can re-enable edge-triggered GPE in a work
            queue where the GPE status bit might already be set.
         2. For IRQ context:
            This can even happen when the GPE enabling occurs before returning
            from the GPE handler and after unlocking the GPE lock.
         Thus currently no code is included to protect this.
      
      Link: https://github.com/acpica/acpica/commit/199cad16Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0d0988af
    • D
      ACPICA: Update version to 20150204 · 121b7d91
      David E. Box 提交于
      ACPICA commit e06b1624b02dc8317d144e9a6fe9d684c5fa2f90
      
      Version 20150204.
      
      Link: https://github.com/acpica/acpica/commit/e06b1624Signed-off-by: NDavid E. Box <david.e.box@linux.intel.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>
      121b7d91
    • D
      ACPICA: Update Copyright headers to 2015 · 82a80941
      David E. Box 提交于
      ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36
      
      Link: https://github.com/acpica/acpica/commit/8990e73aSigned-off-by: NDavid E. Box <david.e.box@linux.intel.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>
      82a80941
  8. 26 1月, 2015 1 次提交
  9. 28 11月, 2014 1 次提交
  10. 21 10月, 2014 1 次提交
  11. 01 10月, 2014 1 次提交
  12. 03 9月, 2014 1 次提交
  13. 31 7月, 2014 1 次提交
  14. 24 7月, 2014 1 次提交
  15. 20 7月, 2014 1 次提交
  16. 08 7月, 2014 2 次提交
  17. 01 6月, 2014 1 次提交
    • L
      ACPICA: Tables: Add mechanism to control early table checksum verification. · 47d68c7f
      Lv Zheng 提交于
      It is reported that Linux x86 kernel cannot map large tables. The following
      large SSDT table on such platform fails to pass checksum verification and
      cannot be installed:
       ACPI: SSDT 0x00000000B9638018 07A0C4 (v02 INTEL  S2600CP  00004000 INTL 20100331)
      
      It sounds strange that in the 64-bit virtual memory address space, we
      cannot map a single ACPI table to do checksum verification. The root cause
      is:
       1. ACPICA doesn't split IO memory mapping and table mapping;
       2. Linux x86 OSL implements acpi_os_map_memory() using a size limited fix-map
          mechanism during early boot stage, which is more suitable for only IO
          mappings.
      
      ACPICA originally only mapped table header for signature validation, and
      this header mapping is required by OSL override mechanism. There was no
      checksum verification because we could not map the whole table using this
      OSL. While the following ACPICA commit enforces checksum verification by
      mapping the whole table during Linux boot stage and it finally triggers
      this issue on some platforms:
       Commit: 86dfc6f3
       Subject: ACPICA: Tables: Fix table checksums verification before installation.
      
      Before doing further cleanups for the OSL table mapping and override
      implementation, this patch introduces an option for such OSPMs to
      temporarily discard the checksum verification feature. It then can be
      re-enabled easily when the ACPICA and the underlying OSL is ready.
      
      This patch also deletes a comment around the limitation of mappings because
      it is not correct. The limitation is not how many times we can map in the
      early stage, but the OSL mapping facility may not be suitable for mapping
      the ACPI tables and thus may complain us the size limitation.
      
      The acpi_tb_verify_table() is renamed to acpi_tb_verify_temp_table() due to the
      work around added, it now only applies to the table descriptor that hasn't
      been installed and cannot be used in other cases. Lv Zheng.
      Tested-by: NYuanhan Liu <yuanhan.liu@linux.intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      47d68c7f
  18. 07 5月, 2014 9 次提交
  19. 21 4月, 2014 2 次提交