ACPI: bus: Rework printing debug messages on _OSC errors
Instead of using one function, acpi_print_osc_error(), for printing a
debug message and dumping the _OSC request data in one go, use
acpi_handle_debug() directly for printing messages and a separate
function called acpi_dump_osc_data() for dumping the _OSC request data
before printing one or more of them.
This avoids
* dumping _OSC request data multiple times when there are
multiple error bits set in the return buffer,
* wrapping message lines on terminals with 80 character line width,
* mixing up unrelated messages by printing full lines only,
and generally helps to make the messages easier to parse.
Also, use %pUL for UUID printing instead of printing UUIDs as strings
and include the revision number into the dumped _OSC request data.
This is how the debug printout looks like when the
OSC_REQUEST_ERROR and OSC_INVALID_REVISION_ERROR bits
are set in the return buffer before the change:
ACPI: \_SB_: ACPI: (
0811B06E-4A27-44F9-8D60-
3CBBC22E7B48): _OSC request failed
ACPI: _OSC request data:
ACPI: 1
ACPI: 2e7eff
ACPI:
ACPI: \_SB_: ACPI: (
0811B06E-4A27-44F9-8D60-
3CBBC22E7B48): _OSC invalid revision
ACPI: _OSC request data:
ACPI: 1
ACPI: 2e7eff
ACPI:
and this is how it is going to look like afterward:
ACPI: \_SB_: ACPI: _OSC: UUID:
0811B06E-4A27-44F9-8D60-
3CBBC22E7B48, rev: 1
ACPI: \_SB_: ACPI: _OSC: capabilities DWORD 0: [
00000001]
ACPI: \_SB_: ACPI: _OSC: capabilities DWORD 1: [
002e7eff]
ACPI: \_SB_: ACPI: _OSC: request failed
ACPI: \_SB_: ACPI: _OSC: invalid revision
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/10794028.nUPlyArG6x@rafael.j.wysocki