1. 25 4月, 2018 1 次提交
    • H
      ACPI / video: Only default only_lcd to true on Win8-ready _desktops_ · 53fa1f6e
      Hans de Goede 提交于
      Commit 5928c281 (ACPI / video: Default lcd_only to true on Win8-ready
      and newer machines) made only_lcd default to true on all machines where
      acpi_osi_is_win8() returns true, including laptops.
      
      The purpose of this is to avoid the bogus / non-working acpi backlight
      interface which many newer BIOS-es define on desktop machines.
      
      But this is causing a regression on some laptops, specifically on the
      Dell XPS 13 2013 model, which does not have the LCD flag set for its
      fully functional ACPI backlight interface.
      
      Rather then DMI quirking our way out of this, this commits changes the
      logic for setting only_lcd to true, to only do this on machines with
      a desktop (or server) dmi chassis-type.
      
      Note that we cannot simply only check the chassis-type and not register
      the backlight interface based on that as there are some laptops and
      tablets which have their chassis-type set to "3" aka desktop. Hopefully
      the combination of checking the LCD flag, but only on devices with
      a desktop(ish) chassis-type will avoid the needs for DMI quirks for this,
      or at least limit the amount of DMI quirks which we need to a minimum.
      
      Fixes: 5928c281 (ACPI / video: Default lcd_only to true on Win8-ready and newer machines)
      Reported-and-tested-by: NJames Hogan <jhogan@kernel.org>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Cc: 4.15+ <stable@vger.kernel.org> # 4.15+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      53fa1f6e
  2. 24 4月, 2018 2 次提交
  3. 23 4月, 2018 2 次提交
  4. 07 4月, 2018 3 次提交
    • D
      nfit, address-range-scrub: add module option to skip initial ars · bca811a7
      Dan Williams 提交于
      After attempting to quickly retrieve known errors the kernel proceeds to
      kick off a long running ARS. Add a module option to disable this
      behavior at initialization time, or at new region discovery time.
      Otherwise, ARS can be started manually regardless of the state of this
      setting.
      Co-developed-by: NDave Jiang <dave.jiang@intel.com>
      Signed-off-by: NDave Jiang <dave.jiang@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bca811a7
    • D
      nfit, address-range-scrub: rework and simplify ARS state machine · bc6ba808
      Dan Williams 提交于
      ARS is an operation that can take 10s to 100s of seconds to find media
      errors that should rarely be present. If the platform crashes due to
      media errors in persistent memory, the expectation is that the BIOS will
      report those known errors in a 'short' ARS request.
      
      A 'short' ARS request asks platform firmware to return an ARS payload
      with all known errors, but without issuing a 'long' scrub. At driver
      init a short request is issued to all PMEM ranges before registering
      regions. Then, in the background, a long ARS is scheduled for each
      region.
      
      The ARS implementation is simplified to centralize ARS completion work
      in the ars_complete() helper. The timeout is removed since there is no
      facility to cancel ARS, and this otherwise arranges for system init to
      never be blocked waiting for a 'long' ARS. The ars_state flags are used
      to coordinate ARS requests from driver init, ARS requests from
      userspace, and ARS requests in response to media error notifications.
      
      Given that there is no notification of ARS completion the implementation
      still needs to poll. It backs off exponentially to a maximum poll period
      of 30 minutes.
      Suggested-by: NToshi Kani <toshi.kani@hpe.com>
      Co-developed-by: NDave Jiang <dave.jiang@intel.com>
      Signed-off-by: NDave Jiang <dave.jiang@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bc6ba808
    • D
      nfit, address-range-scrub: determine one platform max_ars value · 459d0ddb
      Dan Williams 提交于
      acpi_nfit_query_poison() is awkward in that it requires an nfit_spa
      argument in order to determine what max_ars value to use. Instead probe
      for the minimum max_ars across all scrub-capable ranges in the system
      and drop the nfit_spa argument.
      
      This enables a larger rework / simplification of the ARS state machine
      whereby the status can be retrieved once and then iterated over all
      address ranges to reap completions.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      459d0ddb
  5. 06 4月, 2018 1 次提交
  6. 04 4月, 2018 4 次提交
  7. 03 4月, 2018 1 次提交
  8. 31 3月, 2018 2 次提交
    • C
      ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA · 6f1d7c45
      Chris Chiu 提交于
      This issue happens on new ASUS laptop UX331UA which has modern
      standby mode (suspend-to-idle). Pressing keys on the PS2 keyboard
      can't wake up the system from suspend-to-idle which is not expected.
      However, pressing power button can wake up without problem.
      
      Per the engineers of ASUS, the keypress event is routed to Embedded
      Controller (EC) in standby mode. EC then signals the SCI event to
      BIOS so BIOS would Notify() power button to wake up the system. It's
      from BIOS perspective. What we observe here is that kernel receives
      the SCI event from SCI interrupt handler which informs that the GPE
      status bit belongs to EC needs to be handled and then queries the EC
      to find out what event is pending. Then execute the following ACPI
      _QDF method which defined in ACPI DSDT for EC to notify power button.
      
       Method (_QDF, 0, NotSerialized)  // _Qxx: EC Query
              {
                  Notify (PWRB, 0x80) // Status Change
              }
      
      With more debug messages added to analyze this problem, we find that
      the keypress does wake up the system from suspend-to-idle but it's back
      to suspend again almost immediately. As we see in the following messages,
      the acpi_button_notify() is invoked but acpi_pm_wakeup_event() can not
      really wake up the system here because acpi_s2idle_wakeup() is false.
      The acpi_s2idle_wakeup() returnd false because the acpi_s2idle_sync() has
      alrealdy exited.
      
      [   52.987048] s2idle_loop going s2idle
      [   59.713392] acpi_s2idle_wake enter
      [   59.713394] acpi_s2idle_wake exit
      [   59.760888] acpi_ev_gpe_detect enter
      [   59.760893] acpi_s2idle_sync enter
      [   59.760893] acpi_ec_query_flushed ec pending queries 0
      [   59.760953] Read registers for GPE 50-57: Status=01, Enable=01, RunEnable=01, WakeEnable=00
      [   59.760955] ACPI: EC: ===== IRQ (1) =====
      [   59.760972] ACPI: EC: EC_SC(R) = 0x28 SCI_EVT=1 BURST=0 CMD=1 IBF=0 OBF=0
      [   59.760979] ACPI: EC: +++++ Polling enabled +++++
      [   59.760979] ACPI: EC: ##### Command(QR_EC) submitted/blocked #####
      [   59.761003] acpi_s2idle_sync exit
      [   59.769587] ACPI: EC: ##### Query(0xdf) started #####
      [   59.769611] ACPI: EC: ##### Query(0xdf) stopped #####
      [   59.774154] acpi_button_notify button type 1
      [   59.813175] s2idle_loop going s2idle
      
      acpi_s2idle_sync() already makes an effort to flush the EC event
      queue, but in this case, the EC event has yet to be generated when
      the call to acpi_ec_flush_work() is made. The event is generated
      shortly after, through the ongoing handling of the SCI interrupt
      which is happening on another CPU, and we must synchronize that
      to make sure that it has run and completed. Adding another call to
      acpi_os_wait_events_complete() solves this issue, since that
      function synchronizes with SCI interrupt completion.
      Signed-off-by: NChris Chiu <chiu@endlessm.com>
      [ rjw: Subject ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6f1d7c45
    • B
      PCI/portdrv: Simplify PCIe feature permission checking · 02bfeb48
      Bjorn Helgaas 提交于
      Some PCIe features (AER, DPC, hotplug, PME) can be managed by either the
      platform firmware or the OS, so the host bridge driver may have to request
      permission from the platform before using them.  On ACPI systems, this is
      done by negotiate_os_control() in acpi_pci_root_add().
      
      The PCIe port driver later uses pcie_port_platform_notify() and
      pcie_port_acpi_setup() to figure out whether it can use these features.
      But all we need is a single bit for each service, so these interfaces are
      needlessly complicated.
      
      Simplify this by adding bits in the struct pci_host_bridge to show when the
      OS has permission to use each feature:
      
        + unsigned int native_aer:1;       /* OS may use PCIe AER */
        + unsigned int native_hotplug:1;   /* OS may use PCIe hotplug */
        + unsigned int native_pme:1;       /* OS may use PCIe PME */
      
      These are set when we create a host bridge, and the host bridge driver can
      clear the bits corresponding to any feature the platform doesn't want us to
      use.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      02bfeb48
  9. 30 3月, 2018 1 次提交
  10. 29 3月, 2018 1 次提交
    • D
      acpi, nfit: rework NVDIMM leaf method detection · 466d1493
      Dan Williams 提交于
      Some BIOSen do not handle 0-byte transfer lengths for the _LSR and _LSW
      (label storage read/write) methods. This causes Linux to fallback to the
      deprecated _DSM path, or otherwise disable label support.
      
      Introduce acpi_nvdimm_has_method() to detect whether a method is
      available rather than calling the method, require _LSI and _LSR to be
      paired, and require read support before enabling write support.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 4b27db7e ("acpi, nfit: add support for the _LS...")
      Suggested-by: NErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      466d1493
  11. 26 3月, 2018 1 次提交
  12. 22 3月, 2018 2 次提交
    • D
      nfit: skip region registration for incomplete control regions · 0731de47
      Dan Williams 提交于
      Per the ACPI specification the only functional purpose for a DIMM
      Control Region to be mapped into the system physical address space, from
      an OSPM perspective, is to support block-apertures. However, there are
      some BIOSen that publish DIMM Control Region SPA entries for pre-boot
      environment consumption.  Undo the kernel policy of generating disabled
      'ndblk' regions when this configuration is detected.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 1f7df6f8 ("libnvdimm, nfit: regions (block-data-window...)")
      Reviewed-by: NToshi Kani <toshi.kani@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0731de47
    • D
      libnvdimm, nfit: fix persistence domain reporting · fe9a552e
      Dan Williams 提交于
      The persistence domain is a point in the platform where once writes
      reach that destination the platform claims it will make them persistent
      relative to power loss. In the ACPI NFIT this is currently communicated
      as 2 bits in the "NFIT - Platform Capabilities Structure". The bits
      comprise a hierarchy, i.e. bit0 "CPU Cache Flush to NVDIMM Durability on
      Power Loss Capable" implies bit1 "Memory Controller Flush to NVDIMM
      Durability on Power Loss Capable".
      
      Commit 96c3a239 "libnvdimm: expose platform persistence attr..."
      shows the persistence domain as flags, but it's really an enumerated
      hierarchy.
      
      Fix this newly introduced user ABI to show the closest available
      persistence domain before userspace develops dependencies on seeing, or
      needing to develop code to tolerate, the raw NFIT flags communicated
      through the libnvdimm-generic region attribute.
      
      Fixes: 96c3a239 ("libnvdimm: expose platform persistence attr...")
      Reviewed-by: NDave Jiang <dave.jiang@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      fe9a552e
  13. 21 3月, 2018 1 次提交
    • J
      xen/acpi: upload _PSD info for non Dom0 CPUs too · 4d0f1ce6
      Joao Martins 提交于
      All uploaded PM data from non-dom0 CPUs takes the info from vCPU 0 and
      changing only the acpi_id. For processors which P-state coordination type
      is HW_ALL (0xFD) it is OK to upload bogus P-state dependency information
      (_PSD), because Xen will ignore any cpufreq domains created for past CPUs.
      
      Albeit for platforms which expose coordination types as SW_ANY or SW_ALL,
      this will have some unintended side effects. Effectively, it will look at
      the P-state domain existence and *if it already exists* it will skip the
      acpi-cpufreq initialization and thus inherit the policy from the first CPU
      in the cpufreq domain. This will finally lead to the original cpu not
      changing target freq to P0 other than the first in the domain. Which will
      make turbo boost not getting enabled (e.g. for 'performance' governor) for
      all cpus.
      
      This patch fixes that, by also evaluating _PSD when we enumerate all ACPI
      processors and thus always uploading the correct info to Xen. We export
      acpi_processor_get_psd() for that this purpose, but change signature
      to not assume an existent of acpi_processor given that ACPI isn't creating
      an acpi_processor for non-dom0 CPUs.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      4d0f1ce6
  14. 20 3月, 2018 5 次提交
  15. 19 3月, 2018 13 次提交