Merge branches 'acpi-processor', 'acpi-hotplug', 'acpi-init', 'acpi-pm' and 'acpica'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Jan 2014 10:47:18 +0000 (11:47 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Jan 2014 10:47:18 +0000 (11:47 +0100)
* acpi-processor:
  ACPI / scan: reduce log level of "ACPI: \_PR_.CPU4: failed to get CPU APIC ID"
  ACPI / processor: Return specific error value when mapping lapic id

* acpi-hotplug:
  ACPI / scan: Clear match_driver flag in acpi_bus_trim()

* acpi-init:
  ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API

* acpi-pm:
  ACPI / PM: Use ACPI_COMPANION() to get ACPI companions of devices

* acpica:
  ACPICA: Remove bool usage from ACPICA.

1  2  3  4  5  6 
drivers/acpi/acpi_processor.c
drivers/acpi/bus.c
drivers/acpi/device_pm.c
drivers/acpi/processor_core.c
drivers/acpi/scan.c
drivers/acpi/sysfs.c

@@@@@@@ -258,21 -258,21 -258,18 -258,18 -258,18 -258,18 +258,21 @@@@@@@ static int acpi_processor_get_info(stru
                device_declaration = 1;
                pr->acpi_id = value;
        }
  ----  pr->apic_id = acpi_get_apicid(pr->handle, device_declaration,
  ----                                  pr->acpi_id);
  ----  cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id);
      
  ----  /* Handle UP system running SMP kernel, with no LAPIC in MADT */
  ----  if (!cpu0_initialized && (cpu_index == -1) &&
  ----      (num_online_cpus() == 1)) {
  ----          cpu_index = 0;
  ++++  apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id);
  ++++  if (apic_id < 0) {
-               acpi_handle_err(pr->handle, "failed to get CPU APIC ID.\n");
+ ++++          acpi_handle_debug(pr->handle, "failed to get CPU APIC ID.\n");
  ++++          return -ENODEV;
        }
  ++++  pr->apic_id = apic_id;
      
  ----  cpu0_initialized = 1;
  ----
  ++++  cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id);
  ++++  if (!cpu0_initialized) {
  ++++          cpu0_initialized = 1;
  ++++          /* Handle UP system running SMP kernel, with no LAPIC in MADT */
  ++++          if ((cpu_index == -1) && (num_online_cpus() == 1))
  ++++                  cpu_index = 0;
  ++++  }
        pr->id = cpu_index;
      
        /*
Simple merge
Simple merge
Simple merge
@@@@@@@ -2097,29 -1954,22 -2036,30 -1954,22 -1954,22 -1954,22 +2097,30 @@@@@@@ EXPORT_SYMBOL(acpi_bus_scan)
       *
       * Must be called under acpi_scan_lock.
       */
 - ---void acpi_bus_trim(struct acpi_device *start)
 + +++void acpi_bus_trim(struct acpi_device *adev)
      {
 + +++  struct acpi_scan_handler *handler = adev->handler;
 + +++  struct acpi_device *child;
 + +++
 + +++  list_for_each_entry_reverse(child, &adev->children, node)
 + +++          acpi_bus_trim(child);
 + +++
++ +++  adev->flags.match_driver = false;
 + +++  if (handler) {
 + +++          if (handler->detach)
 + +++                  handler->detach(adev);
 + +++
 + +++          adev->handler = NULL;
 + +++  } else {
 + +++          device_release_driver(&adev->dev);
 + +++  }
        /*
 - ---   * Execute acpi_bus_device_detach() as a post-order callback to detach
 - ---   * all ACPI drivers from the device nodes being removed.
 - ---   */
 - ---  acpi_walk_namespace(ACPI_TYPE_ANY, start->handle, ACPI_UINT32_MAX, NULL,
 - ---                      acpi_bus_device_detach, NULL, NULL);
 - ---  acpi_bus_device_detach(start->handle, 0, NULL, NULL);
 - ---  /*
 - ---   * Execute acpi_bus_remove() as a post-order callback to remove device
 - ---   * nodes in the given namespace scope.
 + +++   * Most likely, the device is going away, so put it into D3cold before
 + +++   * that.
         */
 - ---  acpi_walk_namespace(ACPI_TYPE_ANY, start->handle, ACPI_UINT32_MAX, NULL,
 - ---                      acpi_bus_remove, NULL, NULL);
 - ---  acpi_bus_remove(start->handle, 0, NULL, NULL);
 + +++  acpi_device_set_power(adev, ACPI_STATE_D3_COLD);
 + +++  adev->flags.initialized = false;
 + +++  adev->flags.visited = false;
      }
      EXPORT_SYMBOL_GPL(acpi_bus_trim);
      
Simple merge