1. 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
  2. 03 7月, 2019 3 次提交
  3. 27 6月, 2019 1 次提交
  4. 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
  5. 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
  6. 24 4月, 2019 1 次提交
  7. 23 4月, 2019 1 次提交
  8. 05 4月, 2019 2 次提交
  9. 01 4月, 2019 2 次提交
  10. 08 3月, 2019 3 次提交
  11. 09 2月, 2019 1 次提交
  12. 16 1月, 2019 1 次提交
  13. 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
  14. 20 12月, 2018 1 次提交
  15. 04 12月, 2018 1 次提交
  16. 27 11月, 2018 2 次提交
  17. 03 10月, 2018 1 次提交
  18. 08 9月, 2018 1 次提交
  19. 23 7月, 2018 2 次提交
  20. 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
  21. 06 6月, 2018 1 次提交
  22. 18 5月, 2018 1 次提交
  23. 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
  24. 13 5月, 2018 1 次提交
  25. 23 4月, 2018 1 次提交
    • B
      PCI/ACPI: Request LTR control from platform before using it · af8bb9f8
      Bjorn Helgaas 提交于
      Per the PCI Firmware spec r3.2, sec 4.5, an ACPI-based OS should use _OSC
      to request control of Latency Tolerance Reporting (LTR) before using it.
      
      Request control of LTR, and if the platform does not grant control, don't
      use it.
      
      N.B. If the hardware supports LTR and the ASPM L1.2 substate but the BIOS
      doesn't support LTR in _OSC, we previously would enable ASPM L1.2.  This
      patch will prevent us from enabling ASPM L1.2 in that case.  It does not
      prevent us from enabling PCI-PM L1.2, since that doesn't depend on LTR.
      See PCIe r40, sec 5.5.1, for the L1 PM substate entry conditions.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      af8bb9f8
  26. 26 2月, 2018 1 次提交
  27. 12 2月, 2018 2 次提交
  28. 07 2月, 2018 1 次提交
  29. 22 1月, 2018 1 次提交
    • M
      device property: Introduce fwnode_irq_get() · 7c6c57f2
      Marcin Wojtas 提交于
      Until now there were two very similar functions allowing
      to get Linux IRQ number from ACPI handle (acpi_irq_get())
      and OF node (of_irq_get()). The first one appeared to be used
      only as a subroutine of platform_irq_get(), which (in the generic
      code) limited IRQ obtaining from _CRS method only to nodes
      associated to kernel's struct platform_device.
      
      This patch introduces a new helper routine - fwnode_irq_get(),
      which allows to get the IRQ number directly from the fwnode
      to be used as common for OF/ACPI worlds. It is usable not
      only for the parents fwnodes, but also for the child nodes
      comprising their own _CRS methods with interrupts description.
      
      In order to be able o satisfy compilation with !CONFIG_ACPI
      and also simplify the new code, introduce a helper macro
      (ACPI_HANDLE_FWNODE), with which it is possible to reach
      an ACPI handle directly from its fwnode.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c6c57f2
  30. 10 1月, 2018 1 次提交
  31. 13 12月, 2017 1 次提交