1. 27 12月, 2019 1 次提交
  2. 16 12月, 2019 1 次提交
    • R
      ACPI: processor: Export function to claim _CST control · bc946388
      Rafael J. Wysocki 提交于
      The intel_idle driver will be modified to use ACPI _CST subsequently
      and it will need to notify the platform firmware of that if
      acpi_gbl_FADT.cst_control is set, so add a routine for this purpose,
      acpi_processor_claim_cst_control(), to acpi_processor.c (so that it
      is always present which is required by intel_idle) and export it
      to allow the ACPI processor driver (which is modular) to call it.
      
      No intentional functional impact.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bc946388
  3. 15 10月, 2019 1 次提交
  4. 20 8月, 2019 1 次提交
    • J
      acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down · 41fa1ee9
      Josh Boyer 提交于
      This option allows userspace to pass the RSDP address to the kernel, which
      makes it possible for a user to modify the workings of hardware. Reject
      the option when the kernel is locked down. This requires some reworking
      of the existing RSDP command line logic, since the early boot code also
      makes use of a command-line passed RSDP when locating the SRAT table
      before the lockdown code has been initialised. This is achieved by
      separating the command line RSDP path in the early boot code from the
      generic RSDP path, and then copying the command line RSDP into boot
      params in the kernel proper if lockdown is not enabled. If lockdown is
      enabled and an RSDP is provided on the command line, this will only be
      used when parsing SRAT (which shouldn't permit kernel code execution)
      and will be ignored in the rest of the kernel.
      
      (Modified by Matthew Garrett in order to handle the early boot RSDP
      environment)
      Signed-off-by: NJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NMatthew Garrett <mjg59@google.com>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      cc: Dave Young <dyoung@redhat.com>
      cc: linux-acpi@vger.kernel.org
      Signed-off-by: NJames Morris <jmorris@namei.org>
      41fa1ee9
  5. 12 8月, 2019 1 次提交
  6. 31 7月, 2019 1 次提交
  7. 30 7月, 2019 1 次提交
    • R
      ACPI: PM: Set up EC GPE for system wakeup from drivers that need it · 10a08fd6
      Rafael J. Wysocki 提交于
      The EC GPE needs to be set up for system wakeup only if there is a
      driver depending on it, either intel-hid or intel-vbtn, bound to a
      button device that is expected to wake up the system from sleep (such
      as the power button on some Dell systems, like the XPS13 9360).  It
      doesn't need to be set up for waking up the system from sleep in any
      other cases and whether or not it is expected to wake up the system
      from sleep doesn't depend on whether or not the LPS0 device is
      present in the ACPI namespace.
      
      For this reason, rearrange the ACPI suspend-to-idle code to make the
      drivers depending on the EC GPE wakeup take care of setting it up and
      decouple that from the LPS0 device handling.
      
      While at it, make intel-hid and intel-vbtn prepare for system wakeup
      only if they are allowed to wake up the system from sleep by user
      space (via sysfs).
      
      [Note that acpi_ec_mark_gpe_for_wake() and acpi_ec_set_gpe_wake_mask()
       are there to prevent the EC GPE from being disabled by the
       acpi_enable_all_wakeup_gpes() call in acpi_s2idle_prepare(), so on
       systems with either intel-hid or intel-vbtn this change doesn't
       affect any interactions with the hardware or platform firmware.]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      10a08fd6
  8. 15 7月, 2019 1 次提交
    • A
      ACPI: fix false-positive -Wuninitialized warning · dfd6f9ad
      Arnd Bergmann 提交于
      clang gets confused by an uninitialized variable in what looks
      to it like a never executed code path:
      
      arch/x86/kernel/acpi/boot.c:618:13: error: variable 'polarity' is uninitialized when used here [-Werror,-Wuninitialized]
              polarity = polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
                         ^~~~~~~~
      arch/x86/kernel/acpi/boot.c:606:32: note: initialize the variable 'polarity' to silence this warning
              int rc, irq, trigger, polarity;
                                            ^
                                             = 0
      arch/x86/kernel/acpi/boot.c:617:12: error: variable 'trigger' is uninitialized when used here [-Werror,-Wuninitialized]
              trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE;
                        ^~~~~~~
      arch/x86/kernel/acpi/boot.c:606:22: note: initialize the variable 'trigger' to silence this warning
              int rc, irq, trigger, polarity;
                                  ^
                                   = 0
      
      This is unfortunately a design decision in clang and won't be fixed.
      
      Changing the acpi_get_override_irq() macro to an inline function
      reliably avoids the issue.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dfd6f9ad
  9. 03 7月, 2019 3 次提交
  10. 27 6月, 2019 1 次提交
  11. 17 6月, 2019 1 次提交
    • Y
      platform/x86: wmi: Add function to get _UID of WMI device · e7488e58
      Yurii Pavlovskyi 提交于
      Add a new function to acpi.h / wmi.c that returns _UID of the ACPI WMI
      device. For example, it returns "ATK" for the following declaration in
      DSDT:
      Device (ATKD)
      {
          Name (_HID, "PNP0C14" /* Windows Management Instrumentation Device */)
            // _HID: Hardware ID
          Name (_UID, "ATK")  // _UID: Unique ID
          ..
      
      Generally, it is possible that multiple PNP0C14 ACPI devices are present in
      the system as mentioned in the commit message of commit bff431e4
      ("ACPI: WMI: Add ACPI-WMI mapping driver").
      
      Therefore the _UID is returned for a specific ACPI device that declares the
      given GUID, to which it is also mapped by other methods of wmi module.
      Signed-off-by: NYurii Pavlovskyi <yurii.pavlovskyi@gmail.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      e7488e58
  12. 31 5月, 2019 1 次提交
    • T
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 · c942fddf
      Thomas Gleixner 提交于
      Based on 3 normalized pattern(s):
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it will be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version [author] [kishon] [vijay] [abraham]
        [i] [kishon]@[ti] [com] this program is distributed in the hope that
        it will be useful but without any warranty without even the implied
        warranty of merchantability or fitness for a particular purpose see
        the gnu general public license for more details
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version [author] [graeme] [gregory]
        [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
        [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
        [hk] [hemahk]@[ti] [com] this program is distributed in the hope
        that it will be useful but without any warranty without even the
        implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-or-later
      
      has been chosen to replace the boilerplate/reference in 1105 file(s).
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NAllison Randal <allison@lohutok.net>
      Reviewed-by: NRichard Fontana <rfontana@redhat.com>
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Cc: linux-spdx@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c942fddf
  13. 28 5月, 2019 1 次提交
    • A
      acpi/irq: Implement helper to create hierachical domains · 621dc2fd
      Ard Biesheuvel 提交于
      ACPI permits arbitrary producer->consumer interrupt links to be
      described in AML, which means a topology such as the following
      is perfectly legal:
      
        Device (EXIU) {
          Name (_HID, "SCX0008")
          Name (_UID, Zero)
          Name (_CRS, ResourceTemplate () {
            ...
          })
        }
      
        Device (GPIO) {
          Name (_HID, "SCX0007")
          Name (_UID, Zero)
          Name (_CRS, ResourceTemplate () {
            Memory32Fixed (ReadWrite, SYNQUACER_GPIO_BASE, SYNQUACER_GPIO_SIZE)
            Interrupt (ResourceConsumer, Edge, ActiveHigh, ExclusiveAndWake, 0, "\\_SB.EXIU") {
              7,
            }
          })
          ...
        }
      
      The EXIU in this example is the external interrupt unit as can be found
      on Socionext SynQuacer based platforms, which converts a block of 32 SPIs
      from arbitrary polarity/trigger into level-high, with a separate set
      of config/mask/unmask/clear controls.
      
      The existing DT based driver in drivers/irqchip/irq-sni-exiu.c models
      this as a hierarchical domain stacked on top of the GIC's irqdomain.
      Since the GIC is modeled as a DT node as well, obtaining a reference
      to this irqdomain is easily done by going through the parent link.
      
      On ACPI systems, however, the GIC is not modeled as an object in the
      namespace, and so device objects cannot refer to it directly. So in
      order to obtain the irqdomain reference when driving the EXIU in ACPI
      mode, we need a helper that implicitly grabs the default domain as the
      parent of the hierarchy for interrupts allocated out of the global GSI
      pool.
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      621dc2fd
  14. 24 4月, 2019 1 次提交
  15. 23 4月, 2019 1 次提交
  16. 05 4月, 2019 2 次提交
  17. 01 4月, 2019 2 次提交
  18. 08 3月, 2019 3 次提交
  19. 09 2月, 2019 1 次提交
  20. 16 1月, 2019 1 次提交
  21. 07 1月, 2019 1 次提交
    • D
      acpi/nfit, device-dax: Identify differentiated memory with a unique numa-node · 8fc5c735
      Dan Williams 提交于
      Persistent memory, as described by the ACPI NFIT (NVDIMM Firmware
      Interface Table), is the first known instance of a memory range
      described by a unique "target" proximity domain. Where "initiator" and
      "target" proximity domains is an approach that the ACPI HMAT
      (Heterogeneous Memory Attributes Table) uses to described the unique
      performance properties of a memory range relative to a given initiator
      (e.g. CPU or DMA device).
      
      Currently the numa-node for a /dev/pmemX block-device or /dev/daxX.Y
      char-device follows the traditional notion of 'numa-node' where the
      attribute conveys the closest online numa-node. That numa-node attribute
      is useful for cpu-binding and memory-binding processes *near* the
      device. However, when the memory range backing a 'pmem', or 'dax' device
      is onlined (memory hot-add) the memory-only-numa-node representing that
      address needs to be differentiated from the set of online nodes. In
      other words, the numa-node association of the device depends on whether
      you can bind processes *near* the cpu-numa-node in the offline
      device-case, or bind process *on* the memory-range directly after the
      backing address range is onlined.
      
      Allow for the case that platform firmware describes persistent memory
      with a unique proximity domain, i.e. when it is distinct from the
      proximity of DRAM and CPUs that are on the same socket. Plumb the Linux
      numa-node translation of that proximity through the libnvdimm region
      device to namespaces that are in device-dax mode. With this in place the
      proposed kmem driver [1] can optionally discover a unique numa-node
      number for the address range as it transitions the memory from an
      offline state managed by a device-driver to an online memory range
      managed by the core-mm.
      
      [1]: https://lore.kernel.org/lkml/20181022201317.8558C1D8@viggo.jf.intel.comReported-by: NFan Du <fan.du@intel.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: "Oliver O'Halloran" <oohall@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Reviewed-by: NYang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      8fc5c735
  22. 20 12月, 2018 1 次提交
  23. 04 12月, 2018 1 次提交
  24. 27 11月, 2018 2 次提交
  25. 03 10月, 2018 1 次提交
  26. 08 9月, 2018 1 次提交
  27. 23 7月, 2018 2 次提交
  28. 25 6月, 2018 1 次提交
    • H
      acpi: Add helper for deactivating memory region · d2d2e3c4
      Heikki Krogerus 提交于
      Sometimes memory resource may be overlapping with
      SystemMemory Operation Region by design, for example if the
      memory region is used as a mailbox for communication with a
      firmware in the system. One occasion of such mailboxes is
      USB Type-C Connector System Software Interface (UCSI).
      
      With regions like that, it is important that the driver is
      able to map the memory with the requirements it has. For
      example, the driver should be allowed to map the memory as
      non-cached memory. However, if the operation region has been
      accessed before the driver has mapped the memory, the memory
      has been marked as write-back by the time the driver is
      loaded. That means the driver will fail to map the memory
      if it expects non-cached memory.
      
      To work around the problem, introducing helper that the
      drivers can use to temporarily deactivate (unmap)
      SystemMemory Operation Regions that overlap with their
      IO memory.
      
      Fixes: 8243edf4 ("usb: typec: ucsi: Add ACPI driver")
      Cc: stable@vger.kernel.org
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d2d2e3c4
  29. 06 6月, 2018 1 次提交
  30. 18 5月, 2018 1 次提交
  31. 15 5月, 2018 1 次提交
    • U
      PM / Domains: Allow a better error handling of dev_pm_domain_attach() · 919b7308
      Ulf Hansson 提交于
      The callers of dev_pm_domain_attach() currently checks the returned error
      code for -EPROBE_DEFER and needs to ignore other error codes. This is an
      unnecessary limitation, which also leads to a rather strange behaviour in
      the error path.
      
      Address this limitation, by changing the return codes from
      acpi_dev_pm_attach() and genpd_dev_pm_attach(). More precisely, let them
      return 0, when no PM domain is needed for the device and then return 1, in
      case the device was successfully attached to its PM domain. In this way,
      dev_pm_domain_attach(), gets a better understanding of what happens in the
      attach attempts and also allowing its caller to better act on real errors
      codes.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      919b7308
  32. 13 5月, 2018 1 次提交