1. 24 10月, 2013 1 次提交
  2. 12 10月, 2013 1 次提交
  3. 23 8月, 2013 1 次提交
  4. 28 6月, 2013 1 次提交
  5. 22 5月, 2013 1 次提交
    • R
      ACPI / PM: Allow device power states to be used for CONFIG_PM unset · ec4602a9
      Rafael J. Wysocki 提交于
      Currently, drivers/acpi/device_pm.c depends on CONFIG_PM and all of
      the functions defined in there are replaced with static inline stubs
      if that option is unset.  However, CONFIG_PM means, roughly, "runtime
      PM or suspend/hibernation support" and some of those functions are
      useful regardless of that.  For example, they are used by the ACPI
      fan driver for controlling fans and acpi_device_set_power() is called
      during device removal.  Moreover, device initialization may depend on
      setting device power states properly.
      
      For these reasons, make the routines manipulating ACPI device power
      states defined in drivers/acpi/device_pm.c available for CONFIG_PM
      unset too.
      Reported-by: NZhang Rui <rui.zhang@intel.com>
      Reported-and-tested-by: NMichel Lespinasse <walken@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      ec4602a9
  6. 14 5月, 2013 1 次提交
  7. 12 5月, 2013 1 次提交
    • R
      ACPI / processor: Use common hotplug infrastructure · ac212b69
      Rafael J. Wysocki 提交于
      Split the ACPI processor driver into two parts, one that is
      non-modular, resides in the ACPI core and handles the enumeration
      and hotplug of processors and one that implements the rest of the
      existing processor driver functionality.
      
      The non-modular part uses an ACPI scan handler object to enumerate
      processors on the basis of information provided by the ACPI namespace
      and to hook up with the common ACPI hotplug infrastructure.  It also
      populates the ACPI handle of each processor device having a
      corresponding object in the ACPI namespace, which allows the driver
      proper to bind to those devices, and makes the driver bind to them
      if it is readily available (i.e. loaded) when the scan handler's
      .attach() routine is running.
      
      There are a few reasons to make this change.
      
      First, switching the ACPI processor driver to using the common ACPI
      hotplug infrastructure reduces code duplication and size considerably,
      even though a new file is created along with a header comment etc.
      
      Second, since the common hotplug code attempts to offline devices
      before starting the (non-reversible) removal procedure, it will abort
      (and possibly roll back) hot-remove operations involving processors
      if cpu_down() returns an error code for one of them instead of
      continuing them blindly (if /sys/firmware/acpi/hotplug/force_remove
      is unset).  That is a more desirable behavior than what the current
      code does.
      
      Finally, the separation of the scan/hotplug part from the driver
      proper makes it possible to simplify the driver's .remove() routine,
      because it doesn't need to worry about the possible cleanup related
      to processor removal any more (the scan/hotplug part is responsible
      for that now) and can handle device removal and driver removal
      symmetricaly (i.e. as appropriate).
      
      Some user-visible changes in sysfs are made (for example, the
      'sysdev' link from the ACPI device node to the processor device's
      directory is gone and a 'physical_node' link is present instead
      and a corresponding 'firmware_node' is present in the processor
      device's directory, the processor driver is now visible under
      /sys/bus/cpu/drivers/ and bound to the processor device), but
      that shouldn't affect the functionality that users care about
      (frequency scaling, C-states and thermal management).
      
      Tested on my venerable Toshiba Portege R500.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NToshi Kani <toshi.kani@hp.com>
      ac212b69
  8. 22 3月, 2013 1 次提交
    • R
      ACPI / scan: Add special handler for Intel Lynxpoint LPSS devices · f58b082a
      Rafael J. Wysocki 提交于
      Devices on the Intel Lynxpoint Low Power Subsystem (LPSS) have some
      common features that aren't shared with any other platform devices,
      including the clock and LTR (Latency Tolerance Reporting) registers.
      It is better to handle those features in common code than to bother
      device drivers with doing that (I/O functionality-wise the LPSS
      devices are generally compatible with other devices that don't
      have those special registers and may be handled by the same drivers).
      
      The clock registers of the LPSS devices are now taken care of by
      the special clk-x86-lpss driver, but the MMIO mappings used for
      accessing those registers can also be used for accessing the LTR
      registers on those devices (LTR support for the Lynxpoint LPSS is
      going to be added by a subsequent patch).  Thus it is convenient
      to add a special ACPI scan handler for the Lynxpoint LPSS devices
      that will create the MMIO mappings for accessing the clock (and
      LTR in the future) registers and will register the LPSS devices'
      clocks, so the clk-x86-lpss driver will only need to take care of
      the main Lynxpoint LPSS clock.
      
      Introduce a special ACPI scan handler for Intel Lynxpoint LPSS
      devices as described above.  This also reduces overhead related to
      browsing the ACPI namespace in search of the LPSS devices before the
      registration of their clocks, removes some LPSS-specific (and
      somewhat ugly) code from acpi_platform.c and shrinks the overall code
      size slightly.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NMike Turquette <mturquette@linaro.org>
      f58b082a
  9. 20 1月, 2013 1 次提交
    • M
      ACPI: add support for CSRT table · 13176bbf
      Mika Westerberg 提交于
      Core System Resources Table (CSRT) is a proprietary ACPI table that
      contains resources for certain devices that are not found in the DSDT
      table. Typically a shared DMA controller might be found here.
      
      This patch adds support for this table. We go through all entries in the
      table and make platform devices of them. The resources from the table are
      passed with the platform device.
      
      There is one special resource in the table and it is the DMA request line
      base and number of request lines. This information might be needed by the
      DMA controller driver as it needs to map the ACPI DMA request line number
      to the actual request line understood by the hardware. This range is passed
      as IORESOURCE_DMA resource.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      13176bbf
  10. 03 1月, 2013 1 次提交
  11. 23 11月, 2012 1 次提交
  12. 15 11月, 2012 3 次提交
  13. 17 10月, 2012 1 次提交
  14. 30 3月, 2012 1 次提交
  15. 21 1月, 2012 1 次提交
  16. 17 1月, 2012 1 次提交
    • H
      ACPI, Record ACPI NVS regions · b54ac6d2
      Huang Ying 提交于
      Some firmware will access memory in ACPI NVS region via APEI.  That
      is, instructions in APEI ERST/EINJ table will read/write ACPI NVS
      region.  The original resource conflict checking in APEI code will
      check memory/ioport accessed by APEI via general resource management
      mechanism.  But ACPI NVS region is marked as busy already, so that the
      false resource conflict will prevent APEI ERST/EINJ to work.
      
      To fix this, this patch record ACPI NVS regions, so that we can avoid
      request resources for memory region inside it.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b54ac6d2
  17. 29 5月, 2011 1 次提交
  18. 26 5月, 2011 1 次提交
  19. 07 1月, 2011 1 次提交
  20. 14 12月, 2010 1 次提交
    • Z
      IPMI/ACPI: Add the IPMI opregion driver to enable ACPI to access BMC controller · e92b297c
      Zhao Yakui 提交于
      ACPI 4.0 spec adds the ACPI IPMI opregion, which means that the ACPI AML
      code can also communicate with the BMC controller. This is to install
      the ACPI IPMI opregion and enable the ACPI to access the BMC controller
      through the IPMI message.
      
           It will create IPMI user interface for every IPMI device detected
      in ACPI namespace and install the corresponding IPMI opregion space handler.
      Then it can enable ACPI to access the BMC controller through the IPMI
      message.
      
      The following describes how to process the IPMI request in IPMI space handler:
          1. format the IPMI message based on the request in AML code.
          IPMI system address. Now the address type is SYSTEM_INTERFACE_ADDR_TYPE
          IPMI net function & command
          IPMI message payload
          2. send the IPMI message by using the function of ipmi_request_settime
          3. wait for the completion of IPMI message. It can be done in different
      routes: One is in handled in IPMI user recv callback function. Another is
      handled in timeout function.
          4. format the IPMI response and return it to ACPI AML code.
      
      At the same time it also addes the module dependency. The ACPI IPMI opregion
      will depend on the IPMI subsystem.
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e92b297c
  21. 15 8月, 2010 3 次提交
    • Z
      ACPI: remove deprecated ACPI procfs I/F · 47f5c892
      Zhang Rui 提交于
      Rmove deprecated ACPI procfs I/F, including
      /proc/acpi/debug_layer
      /proc/acpi/debug_level
      /proc/acpi/info
      /proc/acpi/dsdt
      /proc/acpi/fadt
      /proc/acpi/sleep
      
      because the sysfs I/F is already available
      and has been working well for years.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      47f5c892
    • Z
      ACPI: introduce drivers/acpi/sysfs.c · 1c8fce27
      Zhang Rui 提交于
      Introduce drivers/acpi/sysfs.c.
      
      code for ACPI sysfs I/F, including
      #ifdef ACPI_DEBUG
      /sys/module/acpi/parameters/debug_layer
      /sys/module/acpi/parameters/debug_level
      /sys/module/acpi/parameters/trace_method_name
      /sys/module/acpi/parameters/trace_debug_layer
      /sys/module/acpi/parameters/trace_debug_level
      /sys/module/acpi/parameters/trace_state
      #endif
      /sys/module/acpi/parameters/acpica_version
      /sys/firmware/acpi/tables/
      /sys/firmware/acpi/interrupts/
      is moved to this file.
      
      No function change in this patch.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1c8fce27
    • Z
      ACPI: introduce drivers/acpi/debugfs.c · a25ee920
      Zhang Rui 提交于
      Introduce drivers/acpi/debugfs.c.
      
      Code for ACPI debugfs I/F,
      i.e. /sys/kernel/debug/acpi/custom_method,
      is moved to this file.
      
      And make ACPI debugfs always built in,
      even if CONFIG_ACPI_DEBUG is cleared.
      
      BTW:this adds about 400bytes code to ACPI, when
      CONFIG_ACPI_DEBUG is cleared.
      
      [uaccess.h build fix from Andrew Morton <akpm@linux-foundation.org>]
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a25ee920
  22. 03 8月, 2010 1 次提交
    • T
      ACPI: Provide /sys/kernel/debug/ec/... · 1195a098
      Thomas Renninger 提交于
      This patch provides the same information through debugfs, which previously was
      provided through /proc/acpi/embedded_controller/*/info
      
      This is the gpe the EC is connected to and whether the global lock
      gets used.
      The io ports used are added to /proc/ioports in another patch.
      Beside the fact that /proc/acpi is deprecated for quite some time,
      this info is not needed for applications and thus can be moved
      to debugfs instead of a public interface like /sys.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      
      CC: Alexey Starikovskiy <astarikovskiy@suse.de>
      CC: Len Brown <lenb@kernel.org>
      CC: linux-kernel@vger.kernel.org
      CC: linux-acpi@vger.kernel.org
      CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
      CC: platform-driver-x86@vger.kernel.org
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      1195a098
  23. 20 5月, 2010 3 次提交
  24. 19 5月, 2010 1 次提交
    • H
      ACPI, IO memory pre-mapping and atomic accessing · 15651291
      Huang Ying 提交于
      Some ACPI IO accessing need to be done in atomic context. For example,
      APEI ERST operations may be used for permanent storage in hardware
      error handler. That is, it may be called in atomic contexts such as
      IRQ or NMI, etc. And, ERST/EINJ implement their operations via IO
      memory/port accessing.  But the IO memory accessing method provided by
      ACPI (acpi_read/acpi_write) maps the IO memory during it is accessed,
      so it can not be used in atomic context. To solve the issue, the IO
      memory should be pre-mapped during EINJ/ERST initializing. A linked
      list is used to record which memory area has been mapped, when memory
      is accessed in hardware error handler, search the linked list for the
      mapped virtual address from the given physical address.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      15651291
  25. 15 3月, 2010 2 次提交
  26. 22 12月, 2009 1 次提交
    • A
      ACPI: processor: call _PDC early · 78f16996
      Alex Chiang 提交于
      We discovered that at least one machine (HP Envy), methods in the DSDT
      attempt to call external methods defined in a dynamically loaded SSDT.
      
      Unfortunately, the DSDT methods we are trying to call are part of the
      EC initialization, which happens very early, and the the dynamic SSDT
      is only loaded when a processor _PDC method runs much later.
      
      This results in namespace lookup errors for the (as of yet) undefined
      methods.
      
      Since Windows doesn't have any issues with this machine, we take it
      as a hint that they must be evaluating _PDC much earlier than we are.
      
      Thus, the proper thing for Linux to do should be to match the Windows
      implementation more closely.
      
      Provide a mechanism to call _PDC before we enable the EC. Doing so loads
      the dynamic tables, and allows the EC to be enabled correctly.
      
      The ACPI processor driver will still evaluate _PDC in its .add() method
      to cover the hotplug case.
      
      Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=14824
      
      Cc: ming.m.lin@intel.com
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      78f16996
  27. 05 11月, 2009 1 次提交
    • M
      PCI: PCIe AER: honor ACPI HEST FIRMWARE FIRST mode · 05843961
      Matt Domsch 提交于
      Feedback from Hidetoshi Seto and Kenji Kaneshige incorporated.  This
      correctly handles PCI-X bridges, PCIe root ports and endpoints, and
      prints debug messages when invalid/reserved types are found in the
      HEST.  PCI devices not in domain/segment 0 are not represented in
      HEST, thus will be ignored.
      
      Today, the PCIe Advanced Error Reporting (AER) driver attaches itself
      to every PCIe root port for which BIOS reports it should, via ACPI
      _OSC.
      
      However, _OSC alone is insufficient for newer BIOSes.  Part of ACPI
      4.0 is the new APEI (ACPI Platform Error Interfaces) which is a way
      for OS and BIOS to handshake over which errors for which components
      each will handle.  One table in ACPI 4.0 is the Hardware Error Source
      Table (HEST), where BIOS can define that errors for certain PCIe
      devices (or all devices), should be handled by BIOS ("Firmware First
      mode"), rather than be handled by the OS.
      
      Dell PowerEdge 11G server BIOS defines Firmware First mode in HEST, so
      that it may manage such errors, log them to the System Event Log, and
      possibly take other actions.  The aer driver should honor this, and
      not attach itself to devices noted as such.
      
      Furthermore, Kenji Kaneshige reminded us to disallow changing the AER
      registers when respecting Firmware First mode.  Platform firmware is
      expected to manage these, and if changes to them are allowed, it could
      break that firmware's behavior.
      
      The HEST parsing code may be replaced in the future by a more
      feature-rich implementation.  This patch provides the minimum needed
      to prevent breakage until that implementation is available.
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Reviewed-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      05843961
  28. 19 9月, 2009 1 次提交
    • D
      hwmon driver for ACPI 4.0 power meters · de584afa
      Darrick J. Wong 提交于
      This driver exposes ACPI 4.0 compliant power meters as hardware monitoring
      devices.  This second revision of the driver also exports the ACPI string
      info as sysfs attributes, a list of the devices that the meter measures,
      and will send ACPI notifications over the ACPI netlink socket.  This
      latest revision only enables the power capping controls if it can be
      confirmed that the power cap can be enforced by the hardware and explains
      how the notification interfaces work.
      
      [akpm@linux-foundation.org: remove default-y]
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      de584afa
  29. 01 8月, 2009 1 次提交
    • S
      ACPI: create Processor Aggregator Device driver · 8e0af514
      Shaohua Li 提交于
      ACPI 4.0 created the logical "processor aggregator device" as
      a mechinism for platforms to ask the OS to force otherwise busy
      processors to enter (power saving) idle.
      
      The intent is to lower power consumption to ride-out
      transient electrical and thermal emergencies,
      rather than powering off the server.
      
      On platforms that can save more power/performance via P-states,
      the platform will first exhaust P-states before forcing idle.
      However, the relative benefit of P-states vs. idle states
      is platform dependent, and thus this driver need not know
      or care about it.
      
      This driver does not use the kernel's CPU hot-plug mechanism
      because after the transient emergency is over, the system must
      be returned to its normal state, and hotplug would permanently
      break both cpusets and binding.
      
      So to force idle, the driver creates a power saving thread.
      The scheduler will migrate the thread to the preferred CPU.
      The thread has max priority and has SCHED_RR policy,
      so it can occupy one CPU.  To save power, the thread will
      invoke the deep C-state entry instructions.
      
      To avoid starvation, the thread will sleep 5% of the time
      time for every second (current RT scheduler has threshold
      to avoid starvation, but if other CPUs are idle,
      the CPU can borrow CPU timer from other,
      which makes the mechanism not work here)
      
      Vaidyanathan Srinivasan has proposed scheduler enhancements
      to allow injecting idle time into the system.  This driver doesn't
      depend on those enhancements, but could cut over to them
      when they are available.
      
      Peter Z. does not favor upstreaming this driver until
      the those scheduler enhancements are in place.  However,
      we favor upstreaming this driver now because it is useful
      now, and can be enhanced over time.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      NACKed-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      8e0af514
  30. 05 4月, 2009 1 次提交
    • A
      ACPI: battery: asynchronous init · 0f66af53
      Arjan van de Ven 提交于
      The battery driver tends to take quite some time to initialize
      (100ms-300ms is quite typical).
      This patch initializes the batter driver asynchronously, so that other
      things in the kernel can initialize in parallel to this 300 msec.
      
      As part of this, the battery driver had to move to the back
      of the ACPI init order (hence the Makefile change).
      Without this move, the next ACPI driver would just block
      on the ACPI/devicee layer semaphores until the battery driver was
      done anyway, not gaining any boot time.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0f66af53
  31. 03 4月, 2009 2 次提交
  32. 28 3月, 2009 1 次提交