Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82023bb7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more ACPI and power management updates from Rafael Wysocki:

 - ACPI-based device hotplug fixes for issues introduced recently and a
   fix for an older error code path bug in the ACPI PCI host bridge
   driver

 - Fix for recently broken OMAP cpufreq build from Viresh Kumar

 - Fix for a recent hibernation regression related to s2disk

 - Fix for a locking-related regression in the ACPI EC driver from
   Puneet Kumar

 - System suspend error code path fix related to runtime PM and runtime
   PM documentation update from Ulf Hansson

 - cpufreq's conservative governor fix from Xiaoguang Chen

 - New processor IDs for intel_idle and turbostat and removal of an
   obsolete Kconfig option from Len Brown

 - New device IDs for the ACPI LPSS (Low-Power Subsystem) driver and
   ACPI-based PCI hotplug (ACPIPHP) cleanup from Mika Westerberg

 - Removal of several ACPI video DMI blacklist entries that are not
   necessary any more from Aaron Lu

 - Rework of the ACPI companion representation in struct device and code
   cleanup related to that change from Rafael J Wysocki, Lan Tianyu and
   Jarkko Nikula

 - Fixes for assigning names to ACPI-enumerated I2C and SPI devices from
   Jarkko Nikula

* tag 'pm+acpi-2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits)
  PCI / hotplug / ACPI: Drop unused acpiphp_debug declaration
  ACPI / scan: Set flags.match_driver in acpi_bus_scan_fixed()
  ACPI / PCI root: Clear driver_data before failing enumeration
  ACPI / hotplug: Fix PCI host bridge hot removal
  ACPI / hotplug: Fix acpi_bus_get_device() return value check
  cpufreq: governor: Remove fossil comment in the cpufreq_governor_dbs()
  ACPI / video: clean up DMI table for initial black screen problem
  ACPI / EC: Ensure lock is acquired before accessing ec struct members
  PM / Hibernate: Do not crash kernel in free_basic_memory_bitmaps()
  ACPI / AC: Remove struct acpi_device pointer from struct acpi_ac
  spi: Use stable dev_name for ACPI enumerated SPI slaves
  i2c: Use stable dev_name for ACPI enumerated I2C slaves
  ACPI: Provide acpi_dev_name accessor for struct acpi_device device name
  ACPI / bind: Use (put|get)_device() on ACPI device objects too
  ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro
  ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node
  cpufreq: OMAP: Fix compilation error 'r & ret undeclared'
  PM / Runtime: Fix error path for prepare
  PM / Runtime: Update documentation around probe|remove|suspend
  cpufreq: conservative: set requested_freq to policy max when it is over policy max
  ...
parents e6d69a60 ed6a8254
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -547,13 +547,11 @@ helper functions described in Section 4. In that case, pm_runtime_resume()
should be used.  Of course, for this purpose the device's runtime PM has to be
should be used.  Of course, for this purpose the device's runtime PM has to be
enabled earlier by calling pm_runtime_enable().
enabled earlier by calling pm_runtime_enable().


If the device bus type's or driver's ->probe() callback runs
It may be desirable to suspend the device once ->probe() has finished.
pm_runtime_suspend() or pm_runtime_idle() or their asynchronous counterparts,
Therefore the driver core uses the asyncronous pm_request_idle() to submit a
they will fail returning -EAGAIN, because the device's usage counter is
request to execute the subsystem-level idle callback for the device at that
incremented by the driver core before executing ->probe().  Still, it may be
time.  A driver that makes use of the runtime autosuspend feature, may want to
desirable to suspend the device as soon as ->probe() has finished, so the driver
update the last busy mark before returning from ->probe().
core uses pm_runtime_put_sync() to invoke the subsystem-level idle callback for
the device at that time.


Moreover, the driver core prevents runtime PM callbacks from racing with the bus
Moreover, the driver core prevents runtime PM callbacks from racing with the bus
notifier callback in __device_release_driver(), which is necessary, because the
notifier callback in __device_release_driver(), which is necessary, because the
@@ -656,7 +654,7 @@ out the following operations:
    __pm_runtime_disable() with 'false' as the second argument for every device
    __pm_runtime_disable() with 'false' as the second argument for every device
    right before executing the subsystem-level .suspend_late() callback for it.
    right before executing the subsystem-level .suspend_late() callback for it.


  * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync()
  * During system resume it calls pm_runtime_enable() and pm_runtime_put()
    for every device right after executing the subsystem-level .resume_early()
    for every device right after executing the subsystem-level .resume_early()
    callback and right after executing the subsystem-level .resume() callback
    callback and right after executing the subsystem-level .resume() callback
    for it, respectively.
    for it, respectively.
+1 −1
Original line number Original line Diff line number Diff line
@@ -1992,7 +1992,7 @@ sba_connect_bus(struct pci_bus *bus)
	if (PCI_CONTROLLER(bus)->iommu)
	if (PCI_CONTROLLER(bus)->iommu)
		return;
		return;


	handle = PCI_CONTROLLER(bus)->acpi_handle;
	handle = acpi_device_handle(PCI_CONTROLLER(bus)->companion);
	if (!handle)
	if (!handle)
		return;
		return;


+1 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,7 @@ struct iospace_resource {
};
};


struct pci_controller {
struct pci_controller {
	void *acpi_handle;
	struct acpi_device *companion;
	void *iommu;
	void *iommu;
	int segment;
	int segment;
	int node;		/* nearest node with memory or -1 for global allocation */
	int node;		/* nearest node with memory or -1 for global allocation */
+3 −3
Original line number Original line Diff line number Diff line
@@ -436,9 +436,9 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
	if (!controller)
	if (!controller)
		return NULL;
		return NULL;


	controller->acpi_handle = device->handle;
	controller->companion = device;


	pxm = acpi_get_pxm(controller->acpi_handle);
	pxm = acpi_get_pxm(device->handle);
#ifdef CONFIG_NUMA
#ifdef CONFIG_NUMA
	if (pxm >= 0)
	if (pxm >= 0)
		controller->node = pxm_to_node(pxm);
		controller->node = pxm_to_node(pxm);
@@ -489,7 +489,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
{
{
	struct pci_controller *controller = bridge->bus->sysdata;
	struct pci_controller *controller = bridge->bus->sysdata;


	ACPI_HANDLE_SET(&bridge->dev, controller->acpi_handle);
	ACPI_COMPANION_SET(&bridge->dev, controller->companion);
	return 0;
	return 0;
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus)
	struct acpi_resource_vendor_typed *vendor;
	struct acpi_resource_vendor_typed *vendor;




	handle = PCI_CONTROLLER(bus)->acpi_handle;
	handle = acpi_device_handle(PCI_CONTROLLER(bus)->companion);
	status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
	status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
					  &sn_uuid, &buffer);
					  &sn_uuid, &buffer);
	if (ACPI_FAILURE(status)) {
	if (ACPI_FAILURE(status)) {
@@ -360,7 +360,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
	acpi_status status;
	acpi_status status;
	struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
	struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };


	rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
	rootbus_handle = acpi_device_handle(PCI_CONTROLLER(dev)->companion);
        status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
        status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL,
                                       &segment);
                                       &segment);
        if (ACPI_SUCCESS(status)) {
        if (ACPI_SUCCESS(status)) {
Loading