1. 08 3月, 2019 3 次提交
  2. 09 2月, 2019 1 次提交
  3. 16 1月, 2019 1 次提交
  4. 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
  5. 20 12月, 2018 1 次提交
  6. 04 12月, 2018 1 次提交
  7. 27 11月, 2018 2 次提交
  8. 03 10月, 2018 1 次提交
  9. 08 9月, 2018 1 次提交
  10. 23 7月, 2018 2 次提交
  11. 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
  12. 06 6月, 2018 1 次提交
  13. 18 5月, 2018 1 次提交
  14. 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
  15. 13 5月, 2018 1 次提交
  16. 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
  17. 26 2月, 2018 1 次提交
  18. 12 2月, 2018 2 次提交
  19. 07 2月, 2018 1 次提交
  20. 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
  21. 10 1月, 2018 1 次提交
  22. 13 12月, 2017 1 次提交
  23. 30 11月, 2017 2 次提交
  24. 27 11月, 2017 1 次提交
    • R
      ACPI / PM: Make it possible to ignore the system sleep blacklist · 57044031
      Rafael J. Wysocki 提交于
      The ACPI code supporting system transitions to sleep states uses
      an internal blacklist to apply special handling to some machines
      reported to behave incorrectly in some ways.
      
      However, some entries of that blacklist cover problematic as well as
      non-problematic systems, so give the users of the latter a chance to
      ignore the blacklist and run their systems in the default way by
      adding acpi_sleep=nobl to the kernel command line.
      
      For example, that allows the users of Dell XPS13 9360 systems not
      affected by the issue that caused the blacklist entry for this
      machine to be added by commit 71630b7a (ACPI / PM: Blacklist Low
      Power S0 Idle _DSM for Dell XPS13 9360) to use suspend-to-idle with
      the Low Power S0 Idle _DSM interface which in principle should be
      more energy-efficient than S3 on them.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      57044031
  25. 06 11月, 2017 1 次提交
    • R
      ACPI / PM: Take SMART_SUSPEND driver flag into account · 05087360
      Rafael J. Wysocki 提交于
      Make the ACPI PM domain take DPM_FLAG_SMART_SUSPEND into account in
      its system suspend callbacks.
      
      [Note that the pm_runtime_suspended() check in acpi_dev_needs_resume()
      is an optimization, because if is not passed, all of the subsequent
      checks may be skipped and some of them are much more overhead in
      general.]
      
      Also use the observation that if the device is in runtime suspend
      at the beginning of the "late" phase of a system-wide suspend-like
      transition, its state cannot change going forward (runtime PM is
      disabled for it at that time) until the transition is over and the
      subsequent system-wide PM callbacks should be skipped for it (as
      they generally assume the device to not be suspended), so add
      checks for that in acpi_subsys_suspend_late/noirq() and
      acpi_subsys_freeze_late/noirq().
      
      Moreover, if acpi_subsys_resume_noirq() is called during the
      subsequent system-wide resume transition and if the device was left
      in runtime suspend previously, its runtime PM status needs to be
      changed to "active" as it is going to be put into the full-power
      state going forward, so add a check for that too in there.
      
      In turn, if acpi_subsys_thaw_noirq() runs after the device has been
      left in runtime suspend, the subsequent "thaw" callbacks need
      to be skipped for it (as they may not work correctly with a
      suspended device), so set the power.direct_complete flag for the
      device then to make the PM core skip those callbacks.
      
      On top of the above, make the analogous changes in the acpi_lpss
      driver that uses the ACPI PM domain callbacks.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05087360
  26. 17 10月, 2017 1 次提交
  27. 11 10月, 2017 2 次提交
    • S
      ACPI / LPIT: Add Low Power Idle Table (LPIT) support · eeb2d80d
      Srinivas Pandruvada 提交于
      Add functionality to read LPIT table, which provides:
      
       - Sysfs interface to read residency counters via
         /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
         /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us
      
      Here the count "low_power_idle_cpu_residency_us" shows the time spent
      by CPU package in low power state.  This is read via MSR interface,
      which points to MSR for PKG C10.
      
      Here the count "low_power_idle_system_residency_us" show the count the
      system was in low power state. This is read via MMIO interface. This
      is mapped to SLP_S0 residency on modern Intel systems. This residency
      is achieved only when CPU is in PKG C10 and all functional blocks are
      in low power state.
      
      It is possible that none of the above counters present or anyone of the
      counter present or all counters present.
      
      For example: On my Kabylake system both of the above counters present.
      After suspend to idle these counts updated and prints:
      
       6916179
       6998564
      
      This counter can be read by tools like turbostat to display. Or it can
      be used to debug, if modern systems are reaching desired low power state.
      
       - Provides an interface to read residency counter memory address
      
         This address can be used to get the base address of PMC memory
         mapped IO.  This is utilized by intel_pmc_core driver to print
         more debug information.
      
      In addition, to avoid code duplication to read iomem, removed the read of
      iomem from acpi_os_read_memory() in osl.c and made a common function
      acpi_os_read_iomem(). This new function is used for reading iomem in
      in both osl.c and acpi_lpit.c.
      
      Link: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdfSigned-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      eeb2d80d
    • R
      ACPI / PM: Combine two identical device resume routines · 63705c40
      Rafael J. Wysocki 提交于
      Notice that acpi_dev_runtime_resume() and acpi_dev_resume_early() are
      actually literally identical after some more-or-less recent changes,
      so rename acpi_dev_runtime_resume() to acpi_dev_resume(), use it
      everywhere instead of acpi_dev_resume_early() and drop the latter.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      63705c40
  28. 10 10月, 2017 1 次提交
  29. 29 8月, 2017 1 次提交
  30. 07 8月, 2017 1 次提交
    • L
      ACPI: Introduce DMA ranges parsing · c04ac679
      Lorenzo Pieralisi 提交于
      Some devices have limited addressing capabilities and cannot
      reference the whole memory address space while carrying out DMA
      operations (eg some devices with bus address bits range smaller than
      system bus - which prevents them from using bus addresses that are
      otherwise valid for the system).
      
      The ACPI _DMA object allows bus devices to define the DMA window that is
      actually addressable by devices that sit upstream the bus, therefore
      providing a means to parse and initialize the devices DMA masks and
      addressable DMA range size.
      
      By relying on the generic ACPI kernel layer to retrieve and parse
      resources, introduce ACPI core code to parse the _DMA object.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Tested-by: NNate Watterson <nwatters@codeaurora.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c04ac679
  31. 30 7月, 2017 1 次提交
    • T
      tty: pl011: fix initialization order of QDF2400 E44 · 37ef38f3
      Timur Tabi 提交于
      The work-around for Qualcomm Technologies QDF2400 Erratum 44 hinges on a
      global variable defined in the pl011 driver.  The ACPI SPCR parsing code
      determines whether the work-around is needed, and if so, it changes the
      console name from "pl011" to "qdf2400_e44".  The expectation is that
      the pl011 driver will implement the work-around when it sees the console
      name.  The global variable qdf2400_e44_present is set when that happens.
      
      The problem is that work-around needs to be enabled when the pl011
      driver probes, not when the console name is queried.  However, sbsa_probe()
      is called before pl011_console_match().  The work-around appeared to work
      previously because the default console on QDF2400 platforms was always
      ttyAMA1.  The first time sbsa_probe() is called (for ttyAMA0),
      qdf2400_e44_present is still false.  Then pl011_console_match() is called,
      and it sets qdf2400_e44_present to true.  All subsequent calls to
      sbsa_probe() enable the work-around.
      
      The solution is to move the global variable into spcr.c and let the
      pl011 driver query it during probe time.  This works because all QDF2400
      platforms require SPCR, so parse_spcr() will always be called.
      pl011_console_match still checks for the "qdf2400_e44" console name,
      but it doesn't do anything else special.
      
      Fixes: 5a0722b8 ("tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44")
      Tested-by: NJeffrey Hugo <jhugo@codeaurora.org>
      Signed-off-by: NTimur Tabi <timur@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      37ef38f3
  32. 25 7月, 2017 1 次提交
  33. 22 7月, 2017 1 次提交