Commit 8af4d378 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-scan', 'acpi-properties' and 'acpi-platform'

* acpi-scan:
  ACPI: scan: Rearrange code related to acpi_get_device_data()
  ACPI: scan: Adjust white space in acpi_device_add()
  ACPI: scan: Rearrange memory allocation in acpi_device_add()

* acpi-properties:
  ACPI: property: Satisfy kernel doc validator (part 2)
  ACPI: property: Satisfy kernel doc validator (part 1)
  ACPI: property: Make acpi_node_prop_read() static
  ACPI: property: Remove dead code
  ACPI: property: Fix fwnode string properties matching

* acpi-platform:
  ACPI: platform-profile: Fix possible deadlock in platform_profile_remove()
  ACPI: platform-profile: Introduce object pointers to callbacks
  ACPI: platform-profile: Drop const qualifier for cur_profile
  ACPI: platform: Add platform profile support
  Documentation: Add documentation for new platform_profile sysfs attribute
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
What:		/sys/firmware/acpi/platform_profile_choices
Date:		October 2020
Contact:	Hans de Goede <hdegoede@redhat.com>
Description:	This file contains a space-separated list of profiles supported for this device.

		Drivers must use the following standard profile-names:

		============	============================================
		low-power	Low power consumption
		cool		Cooler operation
		quiet		Quieter operation
		balanced	Balance between low power consumption and performance
		performance	High performance operation
		============	============================================

		Userspace may expect drivers to offer more than one of these
		standard profile names.

What:		/sys/firmware/acpi/platform_profile
Date:		October 2020
Contact:	Hans de Goede <hdegoede@redhat.com>
Description:	Reading this file gives the current selected profile for this
		device. Writing this file with one of the strings from
		platform_profile_choices changes the profile to the new value.
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ place where this information is gathered.
   ioctl/index
   iommu
   media/index
   sysfs-platform_profile

.. only::  subproject and html

+42 −0
Original line number Diff line number Diff line
=====================================================================
Platform Profile Selection (e.g. /sys/firmware/acpi/platform_profile)
=====================================================================

On modern systems the platform performance, temperature, fan and other
hardware related characteristics are often dynamically configurable. The
platform configuration is often automatically adjusted to the current
conditions by some automatic mechanism (which may very well live outside
the kernel).

These auto platform adjustment mechanisms often can be configured with
one of several platform profiles, with either a bias towards low power
operation or towards performance.

The purpose of the platform_profile attribute is to offer a generic sysfs
API for selecting the platform profile of these automatic mechanisms.

Note that this API is only for selecting the platform profile, it is
NOT a goal of this API to allow monitoring the resulting performance
characteristics. Monitoring performance is best done with device/vendor
specific tools such as e.g. turbostat.

Specifically when selecting a high performance profile the actual achieved
performance may be limited by various factors such as: the heat generated
by other components, room temperature, free air flow at the bottom of a
laptop, etc. It is explicitly NOT a goal of this API to let userspace know
about any sub-optimal conditions which are impeding reaching the requested
performance level.

Since numbers on their own cannot represent the multiple variables that a
profile will adjust (power consumption, heat generation, etc) this API
uses strings to describe the various profiles. To make sure that userspace
gets a consistent experience the sysfs-platform_profile ABI document defines
a fixed set of profile names. Drivers *must* map their internal profile
representation onto this fixed set.

If there is no good match when mapping then a new profile name may be
added. Drivers which wish to introduce new profile names must:

 1. Explain why the existing profile names canot be used.
 2. Add the new profile name, along with a clear description of the
    expected behaviour, to the sysfs-platform_profile ABI documentation.
+17 −0
Original line number Diff line number Diff line
@@ -326,6 +326,23 @@ config ACPI_THERMAL
	  To compile this driver as a module, choose M here:
	  the module will be called thermal.

config ACPI_PLATFORM_PROFILE
	tristate "ACPI Platform Profile Driver"
	default m
	help
	  This driver adds support for platform-profiles on platforms that
	  support it.

	  Platform-profiles can be used to control the platform behaviour. For
	  example whether to operate in a lower power mode, in a higher
	  power performance mode or between the two.

	  This driver provides the sysfs interface and is used as the registration
	  point for platform specific drivers.

	  Which profiles are supported is determined on a per-platform basis and
	  should be obtained from the platform specific driver.

config ACPI_CUSTOM_DSDT_FILE
	string "Custom DSDT Table file to include"
	default ""
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
obj-$(CONFIG_ACPI_PROCESSOR)	+= processor.o
obj-$(CONFIG_ACPI)		+= container.o
obj-$(CONFIG_ACPI_THERMAL)	+= thermal.o
obj-$(CONFIG_ACPI_PLATFORM_PROFILE) 	+= platform_profile.o
obj-$(CONFIG_ACPI_NFIT)		+= nfit/
obj-$(CONFIG_ACPI_NUMA)		+= numa/
obj-$(CONFIG_ACPI)		+= acpi_memhotplug.o
Loading