Skip to contentSkip to conversation

ACPI: Get rid of ACPICA message printing from core

PATCH In review Rafael J. Wysocki 3 participants 10 messages Feb 22, 2021 – Feb 25, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ACPI: Get rid of ACPICA message printing from core

Hi All,

This series replaces ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() in the ACPI processor driver and sysfs code and drops definitions of related symbols that are not used for anything meaningful any more.

Please refer to the patch changelogs for details.

Thanks!

#1 lore raw

PATCH 1/4 ACPI: processor: Get rid of ACPICA message printing

From: Rafael J. Wysocki <[email protected]>

The ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() macros are used for message printing in the ACPICA code and they should not be used elsewhere. Special configuration (either kernel command line or sysfs-based) is needed to see the messages printed by them and the format of those messages is also special and convoluted.

For this reason, replace all of the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances in the ACPI processor driver with corresponding dev_*(), acpi_handle_*() and pr_*() calls depending on the context in which they appear.

Also drop the ACPI_PROCESSOR_COMPONENT definition that is not going to be necessary any more.

---
 Documentation/firmware-guide/acpi/debug.rst |    1 
 drivers/acpi/acpi_processor.c               |   33 +++-----
 drivers/acpi/processor_driver.c             |    6 -
 drivers/acpi/processor_idle.c               |   34 +++-----
 drivers/acpi/processor_pdc.c                |    7 -
 drivers/acpi/processor_perflib.c            |   41 +++++-----
 drivers/acpi/processor_throttling.c         |  110 ++++++++++++++--------------
 drivers/acpi/sysfs.c                        |    1 
 include/acpi/acpi_drivers.h                 |    1 
 9 files changed, 108 insertions(+), 126 deletions(-)
drivers/acpi/acpi_processor.c +12 -21
Index: linux-pm/drivers/acpi/acpi_processor.c
===================================================================
@@ -22,10 +22,6 @@
 
 #include "internal.h"
 
-#define _COMPONENT	ACPI_PROCESSOR_COMPONENT
-
-ACPI_MODULE_NAME("processor");
-
 DEFINE_PER_CPU(struct acpi_processor *, processors);
 EXPORT_PER_CPU_SYMBOL(processors);
 
@@ -51,19 +47,19 @@ static int acpi_processor_errata_piix4(s
 
 	switch (dev->revision) {
 	case 0:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 A-step\n"));
+		dev_dbg(&dev->dev, "Found PIIX4 A-step\n");
 		break;
 	case 1:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 B-step\n"));
+		dev_dbg(&dev->dev, "Found PIIX4 B-step\n");
 		break;
 	case 2:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4E\n"));
+		dev_dbg(&dev->dev, "Found PIIX4E\n");
 		break;
 	case 3:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4M\n"));
+		dev_dbg(&dev->dev, "Found PIIX4M\n");
 		break;
 	default:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found unknown PIIX4\n"));
+		dev_dbg(&dev->dev, "Found unknown PIIX4\n");
 		break;
 	}
 
@@ -129,11 +125,9 @@ static int acpi_processor_errata_piix4(s
 	}
 
 	if (errata.piix4.bmisx)
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				  "Bus master activity detection (BM-IDE) erratum enabled\n"));
+		dev_dbg(&dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n");
 	if (errata.piix4.fdma)
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				  "Type-F DMA livelock erratum (C3 disabled)\n"));
+		dev_dbg(&dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n");
 
 	return 0;
 }
@@ -244,11 +238,9 @@ static int acpi_processor_get_info(struc
 	 */
 	if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
 		pr->flags.bm_control = 1;
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				  "Bus mastering arbitration control present\n"));
+		dev_dbg(&device->dev, "Bus mastering arbitration control present\n");
 	} else
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				  "No bus mastering arbitration control\n"));
+		dev_dbg(&device->dev, "No bus mastering arbitration control\n");
 
 	if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) {
 		/* Declared with "Processor" statement; match ProcessorID */
@@ -291,7 +283,7 @@ static int acpi_processor_get_info(struc
 	pr->phys_id = acpi_get_phys_id(pr->handle, device_declaration,
 					pr->acpi_id);
 	if (invalid_phys_cpuid(pr->phys_id))
-		acpi_handle_debug(pr->handle, "failed to get CPU physical ID.\n");
+		dev_dbg(&device->dev, "Failed to get CPU physical ID.\n");
 
 	pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id);
 	if (!cpu0_initialized && !acpi_has_cpu_in_madt()) {
@@ -328,11 +320,10 @@ static int acpi_processor_get_info(struc
 	 * CPU+CPU ID.
 	 */
 	sprintf(acpi_device_bid(device), "CPU%X", pr->id);
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
-			  pr->acpi_id));
+	dev_dbg(&device->dev, "Processor [%d:%d]\n", pr->id, pr->acpi_id);
 
 	if (!object.processor.pblk_address)
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
+		dev_dbg(&device->dev, "No PBLK (NULL address)\n");
 	else if (object.processor.pblk_length != 6)
 		dev_err(&device->dev, "Invalid PBLK length [%d]\n",
 			    object.processor.pblk_length);
drivers/acpi/processor_driver.c +1 -5
Index: linux-pm/drivers/acpi/processor_driver.c
===================================================================
@@ -28,9 +28,6 @@
 #define ACPI_PROCESSOR_NOTIFY_POWER	0x81
 #define ACPI_PROCESSOR_NOTIFY_THROTTLING	0x82
 
-#define _COMPONENT		ACPI_PROCESSOR_COMPONENT
-ACPI_MODULE_NAME("processor_driver");
-
 MODULE_AUTHOR("Paul Diefenbaugh");
 MODULE_DESCRIPTION("ACPI Processor Driver");
 MODULE_LICENSE("GPL");
@@ -87,8 +84,7 @@ static void acpi_processor_notify(acpi_h
 						  dev_name(&device->dev), event, 0);
 		break;
 	default:
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				  "Unsupported event [0x%x]\n", event));
+		acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event);
 		break;
 	}
 
drivers/acpi/processor_idle.c +15 -19
Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================
@@ -31,9 +31,6 @@
 #include <asm/apic.h>
 #endif
 
-#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
-ACPI_MODULE_NAME("processor_idle");
-
 #define ACPI_IDLE_STATE_START	(IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX) ? 1 : 0)
 
 static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
@@ -239,8 +236,8 @@ static int acpi_processor_get_power_info
 	 * 100 microseconds.
 	 */
 	if (acpi_gbl_FADT.c2_latency > ACPI_PROCESSOR_MAX_C2_LATENCY) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			"C2 latency too large [%d]\n", acpi_gbl_FADT.c2_latency));
+		acpi_handle_debug(pr->handle, "C2 latency too large [%d]\n",
+				  acpi_gbl_FADT.c2_latency);
 		/* invalidate C2 */
 		pr->power.states[ACPI_STATE_C2].address = 0;
 	}
@@ -250,16 +247,15 @@ static int acpi_processor_get_power_info
 	 * 1000 microseconds.
 	 */
 	if (acpi_gbl_FADT.c3_latency > ACPI_PROCESSOR_MAX_C3_LATENCY) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			"C3 latency too large [%d]\n", acpi_gbl_FADT.c3_latency));
+		acpi_handle_debug(pr->handle, "C3 latency too large [%d]\n",
+				  acpi_gbl_FADT.c3_latency);
 		/* invalidate C3 */
 		pr->power.states[ACPI_STATE_C3].address = 0;
 	}
 
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-			  "lvl2[0x%08x] lvl3[0x%08x]\n",
+	acpi_handle_debug(pr->handle, "lvl2[0x%08x] lvl3[0x%08x]\n",
 			  pr->power.states[ACPI_STATE_C2].address,
-			  pr->power.states[ACPI_STATE_C3].address));
+			  pr->power.states[ACPI_STATE_C3].address);
 
 	snprintf(pr->power.states[ACPI_STATE_C2].desc,
 			 ACPI_CX_DESC_LEN, "ACPI P_LVL2 IOPORT 0x%x",
@@ -324,8 +320,8 @@ static void acpi_processor_power_verify_
 	 * devices thus we take the conservative approach.
 	 */
 	else if (errata.piix4.fdma) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-				  "C3 not supported on PIIX4 with Type-F DMA\n"));
+		acpi_handle_debug(pr->handle,
+				  "C3 not supported on PIIX4 with Type-F DMA\n");
 		return;
 	}
 
@@ -344,13 +340,13 @@ static void acpi_processor_power_verify_
 		if (!pr->flags.bm_control) {
 			if (pr->flags.has_cst != 1) {
 				/* bus mastering control is necessary */
-				ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					"C3 support requires BM control\n"));
+				acpi_handle_debug(pr->handle,
+						  "C3 support requires BM control\n");
 				return;
 			} else {
 				/* Here we enter C3 without bus mastering */
-				ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					"C3 support without BM control\n"));
+				acpi_handle_debug(pr->handle,
+						  "C3 support without BM control\n");
 			}
 		}
 	} else {
@@ -359,9 +355,9 @@ static void acpi_processor_power_verify_
 		 * supported on when bm_check is not required.
 		 */
 		if (!(acpi_gbl_FADT.flags & ACPI_FADT_WBINVD)) {
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+			acpi_handle_debug(pr->handle,
 					  "Cache invalidation should work properly"
-					  " for C3 to be enabled on SMP systems\n"));
+					  " for C3 to be enabled on SMP systems\n");
 			return;
 		}
 	}
@@ -843,7 +839,7 @@ static int acpi_processor_evaluate_lpi(a
 
 	status = acpi_evaluate_object(handle, "_LPI", NULL, &buffer);
 	if (ACPI_FAILURE(status)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _LPI, giving up\n"));
+		acpi_handle_debug(handle, "No _LPI, giving up\n");
 		return -ENODEV;
 	}
 
drivers/acpi/processor_pdc.c +2 -5
Index: linux-pm/drivers/acpi/processor_pdc.c
===================================================================
@@ -16,9 +16,6 @@
 
 #include "internal.h"
 
-#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
-ACPI_MODULE_NAME("processor_pdc");
-
 static bool __init processor_physically_present(acpi_handle handle)
 {
 	int cpuid, type;
@@ -132,8 +129,8 @@ acpi_processor_eval_pdc(acpi_handle hand
 	status = acpi_evaluate_object(handle, "_PDC", pdc_in, NULL);
 
 	if (ACPI_FAILURE(status))
-		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-		    "Could not evaluate _PDC, using legacy perf. control.\n"));
+		acpi_handle_debug(handle,
+		    "Could not evaluate _PDC, using legacy perf control\n");
 
 	return status;
 }
drivers/acpi/processor_perflib.c +21 -20

117 lines not on this page · raw message

drivers/acpi/processor_throttling.c +57 -53

249 lines not on this page · raw message

Documentation/firmware-guide/acpi/debug.rst +0 -1
Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst
===================================================================
@@ -57,7 +57,6 @@ shows the supported mask values, current
     ACPI_CONTAINER_COMPONENT        0x01000000
     ACPI_SYSTEM_COMPONENT           0x02000000
     ACPI_MEMORY_DEVICE_COMPONENT    0x08000000
-    ACPI_PROCESSOR_COMPONENT        0x20000000
 
 debug_level
 ===========
drivers/acpi/sysfs.c +0 -1
Index: linux-pm/drivers/acpi/sysfs.c
===================================================================
@@ -57,7 +57,6 @@ static const struct acpi_dlayer acpi_deb
 	ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT),
 	ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT),
 	ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT),
-	ACPI_DEBUG_INIT(ACPI_PROCESSOR_COMPONENT),
 };
 
 static const struct acpi_dlevel acpi_debug_levels[] = {
include/acpi/acpi_drivers.h +0 -1
Index: linux-pm/include/acpi/acpi_drivers.h
===================================================================
@@ -20,7 +20,6 @@
 #define ACPI_CONTAINER_COMPONENT	0x01000000
 #define ACPI_SYSTEM_COMPONENT		0x02000000
 #define ACPI_MEMORY_DEVICE_COMPONENT	0x08000000
-#define ACPI_PROCESSOR_COMPONENT	0x20000000
 
 /*
  * _HID definitions
#2 lore raw

Re: [PATCH v1 1/4] ACPI: processor: Get rid of ACPICA message printing

drivers/acpi/processor_idle.c

Quoted 4 lines · Rafael J. Wysocki

Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================

drivers/acpi/processor_idle.c +0 -0

In this file, function acpi_processor_cstate_first_run_checks() has a wrong pr_notice():

pr_notice("ACPI: processor limited to max C-state %d\n",

		max_cstate);

Since we have pr_fmt() for this file, "ACPI:" is duplicate, we'd better cleanup this as below:

pr_notice("processor limited to max C-state %d\n", max_cstate);

Thanks
Hanjun

#3 lore raw

Re: [PATCH v1 1/4] ACPI: processor: Get rid of ACPICA message printing

Quoted 10 lines · Hanjun Guo

drivers/acpi/processor_idle.c

Quoted 4 lines · Rafael J. Wysocki

Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================

drivers/acpi/processor_idle.c +0 -0

In this file, function acpi_processor_cstate_first_run_checks() has a wrong pr_notice():

Quoted 7 lines

pr_notice("ACPI: processor limited to max C-state %d\n",

                max_cstate);

Since we have pr_fmt() for this file, "ACPI:" is duplicate, we'd better cleanup this as below:

pr_notice("processor limited to max C-state %d\n", max_cstate);

Thanks for pointing this out, I'll make this change when applying the patch.

#4 lore raw

Re: [PATCH v1 1/4] ACPI: processor: Get rid of ACPICA message printing

Quoted 15 lines · Rafael J. Wysocki
Quoted 13 lines · Hanjun Guo

drivers/acpi/processor_idle.c

Quoted 4 lines · Rafael J. Wysocki

Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================

drivers/acpi/processor_idle.c +0 -0

In this file, function acpi_processor_cstate_first_run_checks() has a wrong pr_notice():

pr_notice("ACPI: processor limited to max C-state %d\n",

                max_cstate);
Quoted 6 lines
Quoted 4 lines

Since we have pr_fmt() for this file, "ACPI:" is duplicate, we'd better cleanup this as below:

pr_notice("processor limited to max C-state %d\n", max_cstate);

Thanks for pointing this out, I'll make this change when applying the patch.

Actually, this issue is not strictly related to the patch here, so I'm going to send a separate patch to fix it.

#5 lore raw

Re: [PATCH v1 1/4] ACPI: processor: Get rid of ACPICA message printing

Quoted 19 lines · Rafael J. Wysocki
Quoted 18 lines · Rafael J. Wysocki
Quoted 16 lines · Hanjun Guo

drivers/acpi/processor_idle.c

Quoted 4 lines · Rafael J. Wysocki

Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================

drivers/acpi/processor_idle.c +0 -0

In this file, function acpi_processor_cstate_first_run_checks() has a wrong pr_notice():

pr_notice("ACPI: processor limited to max C-state %d\n",

                 max_cstate);

Since we have pr_fmt() for this file, "ACPI:" is duplicate, we'd better cleanup this as below:

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

pr_notice("processor limited to max C-state %d\n", max_cstate);

Thanks for pointing this out, I'll make this change when applying the patch.

Actually, this issue is not strictly related to the patch here, so I'm going to send a separate patch to fix it.

Make sense to me as well.

Thanks
Hanjun

#6 lore raw

PATCH 2/4 ACPI: sysfs: Get rid of ACPICA message printing

In reply to Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Replace the only ACPI_EXCEPTION() instance in sysfs.c with a pr_warn() call, drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not used any more and drop the ACPI_SYSTEM_COMPONENT definition that would not be used any more in a meaningful way after the above changes.

---
 Documentation/firmware-guide/acpi/debug.rst |    1 -
 drivers/acpi/sysfs.c                        |    7 +------
 include/acpi/acpi_drivers.h                 |    1 -
 3 files changed, 1 insertion(+), 8 deletions(-)
drivers/acpi/sysfs.c +1 -6
Index: linux-pm/drivers/acpi/sysfs.c
===================================================================
@@ -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:
@@ -55,7 +52,6 @@ static const struct acpi_dlayer acpi_deb
 	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),
 };
 
@@ -650,8 +646,7 @@ static int get_status(u32 index, acpi_ev
 	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);
Documentation/firmware-guide/acpi/debug.rst +0 -1
Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst
===================================================================
@@ -55,7 +55,6 @@ shows the supported mask values, current
     ACPI_SBS_COMPONENT              0x00100000
     ACPI_FAN_COMPONENT              0x00200000
     ACPI_CONTAINER_COMPONENT        0x01000000
-    ACPI_SYSTEM_COMPONENT           0x02000000
     ACPI_MEMORY_DEVICE_COMPONENT    0x08000000
 
 debug_level
include/acpi/acpi_drivers.h +0 -1
Index: linux-pm/include/acpi/acpi_drivers.h
===================================================================
@@ -18,7 +18,6 @@
 #define ACPI_SBS_COMPONENT		0x00100000
 #define ACPI_FAN_COMPONENT		0x00200000
 #define ACPI_CONTAINER_COMPONENT	0x01000000
-#define ACPI_SYSTEM_COMPONENT		0x02000000
 #define ACPI_MEMORY_DEVICE_COMPONENT	0x08000000
 
 /*
#7 lore raw

PATCH 3/4 ACPI: Drop unused ACPI_*_COMPONENT definitions and update documentation

In reply to Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Drop the definitions of the following symbols:

ACPI_SBS_COMPONENT
ACPI_FAN_COMPONENT
ACPI_CONTAINER_COMPONENT
ACPI_MEMORY_DEVICE_COMPONENT

that are not used in a meaningful way any more and update the ACPI debug documentation to avoid confusing users by making the impression that the ACPICA debug can be used for anything other than ACPICA itself, which is incorrect.

No functional impact.

---
 Documentation/firmware-guide/acpi/debug.rst |   29 +++++++++++-----------------
 drivers/acpi/sysfs.c                        |    5 ----
 include/acpi/acpi_drivers.h                 |    9 --------
 3 files changed, 12 insertions(+), 31 deletions(-)
Documentation/firmware-guide/acpi/debug.rst +12 -17
Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst
===================================================================
@@ -1,18 +1,17 @@
 .. 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,10 +51,6 @@ shows the supported mask values, current
     ACPI_CA_DISASSEMBLER            0x00000800
     ACPI_COMPILER                   0x00001000
     ACPI_TOOLS                      0x00002000
-    ACPI_SBS_COMPONENT              0x00100000
-    ACPI_FAN_COMPONENT              0x00200000
-    ACPI_CONTAINER_COMPONENT        0x01000000
-    ACPI_MEMORY_DEVICE_COMPONENT    0x08000000
 
 debug_level
 ===========
drivers/acpi/sysfs.c +0 -5
Index: linux-pm/drivers/acpi/sysfs.c
===================================================================
@@ -48,11 +48,6 @@ static const struct acpi_dlayer acpi_deb
 	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_MEMORY_DEVICE_COMPONENT),
 };
 
 static const struct acpi_dlevel acpi_debug_levels[] = {
include/acpi/acpi_drivers.h +0 -9
Index: linux-pm/include/acpi/acpi_drivers.h
===================================================================
@@ -12,15 +12,6 @@
 #define ACPI_MAX_STRING			80
 
 /*
- * Please update drivers/acpi/debug.c and Documentation/firmware-guide/acpi/debug.rst
- * if you add to this list.
- */
-#define ACPI_SBS_COMPONENT		0x00100000
-#define ACPI_FAN_COMPONENT		0x00200000
-#define ACPI_CONTAINER_COMPONENT	0x01000000
-#define ACPI_MEMORY_DEVICE_COMPONENT	0x08000000
-
-/*
  * _HID definitions
  * HIDs must conform to ACPI spec(6.1.4)
  * Linux specific HIDs do not apply to this and begin with LNX:
#8 lore raw

PATCH 4/4 ACPI: HED: Drop unused ACPI_MODULE_NAME() definition

In reply to Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

ACPI_MODULE_NAME() is only used by ACPICA message printing which in turn is not used by the ACPI HED driver, so drop that definition from there.

No functional impact.

---
 drivers/acpi/hed.c |    1 -
 1 file changed, 1 deletion(-)
drivers/acpi/hed.c +0 -1
Index: linux-pm/drivers/acpi/hed.c
===================================================================
@@ -74,7 +74,6 @@ static struct acpi_driver acpi_hed_drive
 };
 module_acpi_driver(acpi_hed_driver);
 
-ACPI_MODULE_NAME("hed");
 MODULE_AUTHOR("Huang Ying");
 MODULE_DESCRIPTION("ACPI Hardware Error Device Driver");
 MODULE_LICENSE("GPL");
Reviewed-by on the v1 series
#9 lore raw
In reply to Rafael J. Wysocki
Quoted 7 lines · Rafael J. Wysocki

Hi All,

This series replaces ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() in the ACPI processor driver and sysfs code and drops definitions of related symbols that are not used for anything meaningful any more.

Please refer to the patch changelogs for details.

Except patch 1/4, others are looking good to me. some legacy printk(PRIFIX ...) are still there, but we can clean up them later.

Feel feel to add my review tag with minor issue addressed.

Thanks
Hanjun