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

Merge branch 'acpi-messages'

* acpi-messages:
  hwmon: acpi_power_meter: Get rid of ACPICA message printing
  IIO: acpi-als: Get rid of ACPICA message printing
  ACPI: utils: Introduce acpi_evaluation_failure_warn()
  ACPI: Drop unused ACPI_*_COMPONENT definitions and update documentation
  ACPI: sysfs: Get rid of ACPICA message printing
parents 25d95763 ebf1bef3
Loading
Loading
Loading
Loading
+12 −18
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

=================
ACPI Debug Output
=================
====================
ACPI CA Debug Output
====================

The ACPI CA, the Linux ACPI core, and some ACPI drivers can generate debug
output.  This document describes how to use this facility.
The ACPI CA can generate debug output.  This document describes how to use this
facility.

Compile-time configuration
==========================

ACPI debug output is globally enabled by CONFIG_ACPI_DEBUG.  If this config
option is turned off, the debug messages are not even built into the
kernel.
The ACPI CA debug output is globally enabled by CONFIG_ACPI_DEBUG.  If this
config option is not set, the debug messages are not even built into the kernel.

Boot- and run-time configuration
================================
@@ -27,16 +26,16 @@ debug_layer (component)
=======================

The "debug_layer" is a mask that selects components of interest, e.g., a
specific driver or part of the ACPI interpreter.  To build the debug_layer
bitmask, look for the "#define _COMPONENT" in an ACPI source file.
specific part of the ACPI interpreter.  To build the debug_layer bitmask, look
for the "#define _COMPONENT" in an ACPI source file.

You can set the debug_layer mask at boot-time using the acpi.debug_layer
command line argument, and you can change it after boot by writing values
to /sys/module/acpi/parameters/debug_layer.

The possible components are defined in include/acpi/acoutput.h and
include/acpi/acpi_drivers.h.  Reading /sys/module/acpi/parameters/debug_layer
shows the supported mask values, currently these::
The possible components are defined in include/acpi/acoutput.h.

Reading /sys/module/acpi/parameters/debug_layer shows the supported mask values::

    ACPI_UTILITIES                  0x00000001
    ACPI_HARDWARE                   0x00000002
@@ -52,11 +51,6 @@ shows the supported mask values, currently these::
    ACPI_CA_DISASSEMBLER            0x00000800
    ACPI_COMPILER                   0x00001000
    ACPI_TOOLS                      0x00002000
    ACPI_SBS_COMPONENT              0x00100000
    ACPI_FAN_COMPONENT              0x00200000
    ACPI_CONTAINER_COMPONENT        0x01000000
    ACPI_SYSTEM_COMPONENT           0x02000000
    ACPI_MEMORY_DEVICE_COMPONENT    0x08000000

debug_level
===========
+2 −4
Original line number Diff line number Diff line
@@ -256,8 +256,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
	status = acpi_walk_resources(handle, METHOD_NAME__CRS,
				     acpi_pci_link_check_current, &irq);
	if (ACPI_FAILURE(status)) {
		acpi_handle_warn(handle, "_CRS evaluation failed: %s\n",
				 acpi_format_exception(status));
		acpi_evaluation_failure_warn(handle, "_CRS", status);
		result = -ENODEV;
		goto end;
	}
@@ -345,8 +344,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)

	/* check for total failure */
	if (ACPI_FAILURE(status)) {
		acpi_handle_warn(handle, "_SRS evaluation failed: %s",
				 acpi_format_exception(status));
		acpi_evaluation_failure_warn(handle, "_SRS", status);
		result = -ENODEV;
		goto end;
	}
+3 −7
Original line number Diff line number Diff line
@@ -67,9 +67,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
		acpi_processor_ppc_in_use = true;

		if (ACPI_FAILURE(status)) {
			acpi_handle_warn(pr->handle,
					 "_PPC evaluation failed: %s\n",
					 acpi_format_exception(status));
			acpi_evaluation_failure_warn(pr->handle, "_PPC", status);
			return -ENODEV;
		}
	}
@@ -199,8 +197,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)

	status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
	if (ACPI_FAILURE(status)) {
		acpi_handle_warn(pr->handle, "_PCT evaluation failed: %s\n",
				 acpi_format_exception(status));
		acpi_evaluation_failure_warn(pr->handle, "_PCT", status);
		return -ENODEV;
	}

@@ -300,8 +297,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)

	status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
	if (ACPI_FAILURE(status)) {
		acpi_handle_warn(pr->handle, "_PSS evaluation failed: %s\n",
				 acpi_format_exception(status));
		acpi_evaluation_failure_warn(pr->handle, "_PSS", status);
		return -ENODEV;
	}

+4 −12
Original line number Diff line number Diff line
@@ -281,9 +281,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
	status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
	if (ACPI_FAILURE(status)) {
		if (status != AE_NOT_FOUND)
			acpi_handle_warn(pr->handle,
					 "_TPC evaluation failed: %s\n",
					 acpi_format_exception(status));
			acpi_evaluation_failure_warn(pr->handle, "_TPC", status);

		return -ENODEV;
	}
@@ -416,9 +414,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
	status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer);
	if (ACPI_FAILURE(status)) {
		if (status != AE_NOT_FOUND)
			acpi_handle_warn(pr->handle,
					 "_PTC evaluation failed: %s\n",
					 acpi_format_exception(status));
			acpi_evaluation_failure_warn(pr->handle, "_PTC", status);

		return -ENODEV;
	}
@@ -503,9 +499,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
	status = acpi_evaluate_object(pr->handle, "_TSS", NULL, &buffer);
	if (ACPI_FAILURE(status)) {
		if (status != AE_NOT_FOUND)
			acpi_handle_warn(pr->handle,
					 "_TSS evaluation failed: %s\n",
					 acpi_format_exception(status));
			acpi_evaluation_failure_warn(pr->handle, "_TSS", status);

		return -ENODEV;
	}
@@ -586,9 +580,7 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
	status = acpi_evaluate_object(pr->handle, "_TSD", NULL, &buffer);
	if (ACPI_FAILURE(status)) {
		if (status != AE_NOT_FOUND)
			acpi_handle_warn(pr->handle,
					 "_TSD evaluation failed: %s\n",
					 acpi_format_exception(status));
			acpi_evaluation_failure_warn(pr->handle, "_TSD", status);

		return -ENODEV;
	}
+1 −11
Original line number Diff line number Diff line
@@ -12,9 +12,6 @@

#include "internal.h"

#define _COMPONENT		ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME("sysfs");

#ifdef CONFIG_ACPI_DEBUG
/*
 * ACPI debug sysfs I/F, including:
@@ -51,12 +48,6 @@ static const struct acpi_dlayer acpi_debug_layers[] = {
	ACPI_DEBUG_INIT(ACPI_CA_DISASSEMBLER),
	ACPI_DEBUG_INIT(ACPI_COMPILER),
	ACPI_DEBUG_INIT(ACPI_TOOLS),

	ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT),
	ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT),
	ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT),
	ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT),
	ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT),
};

static const struct acpi_dlevel acpi_debug_levels[] = {
@@ -650,8 +641,7 @@ static int get_status(u32 index, acpi_event_status *ret,
	if (index < num_gpes) {
		status = acpi_get_gpe_device(index, handle);
		if (ACPI_FAILURE(status)) {
			ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
					"Invalid GPE 0x%x", index));
			pr_warn("Invalid GPE 0x%x", index);
			return -ENXIO;
		}
		status = acpi_get_gpe_status(*handle, index, ret);
Loading