Skip to content
  • Toshi Kani's avatar
    ACPI: Add acpi_handle_<level>() interfaces · fbfddae6
    Toshi Kani authored
    This patch introduces acpi_handle_<level>(), where <level> is
    a kernel message level such as err/warn/info, to support improved
    logging messages for ACPI, esp. hot-plug operations.
    acpi_handle_<level>() appends "ACPI" prefix and ACPI object path
    to the messages.  This improves diagnosis of hotplug operations
    since an error message in a log file identifies an object that
    caused an issue.  This interface acquires the global namespace
    mutex to obtain an object path.  In interrupt context, it shows
    the object path as <n/a>.
    
    acpi_handle_<level>() takes acpi_handle as an argument, which is
    passed to ACPI hotplug notify handlers from the ACPICA.  Therefore,
    it is always available unlike other kernel objects, such as device.
    
    For example:
      acpi_handle_err(handle, "Device don't exist, dropping EJECT\n");
    logs an error message like this at KERN_ERR.
      ACPI: \_SB_.SCK4.CPU4: Device don't exist, dropping EJECT
    
    ACPI hot-plug drivers can use acpi_handle_<level>() when they ...
    fbfddae6