Skip to contentSkip to conversation

Improve acpi_dbg_level= documentation

PATCH In review Andi Kleen 5 participants 7 messages Apr 18, 2007 – Apr 19, 2007

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Improve acpi_dbg_level= documentation

First it was documented twice.

Since this is a fairly important option document it properly. I kept myself looking for this information again and again.

In particular the individual bits are fairly important. And add some warnings.

Documentation/kernel-parameters.txt +10 -7
Index: linux/Documentation/kernel-parameters.txt
===================================================================
@@ -187,13 +187,16 @@ and is between 256 and 4096 characters. 
 			1: enable, 0: disable. It is useful for boot time
 			debugging. After system has booted up, it can be set
 			via /proc/acpi/debug_layer.
-
-	acpi_dbg_level=	[HW,ACPI]
-			Format: <int>
-			Each bit of the <int> indicates an ACPI debug level,
-			1: enable, 0: disable. It is useful for boot time
-			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_level.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable debug output
+			for specific parts of the ACPI subsystem:
+			1 utilities 2 hardware 4 events 8 tables 
+			0x10 namespace 0x20 parser 0x40 dispatcher
+			0x80 executer 0x100 resources 0x200 debugger
+			0x400 os services
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of 
+			output and make your system unusable. Be very careful.
 
 	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
 
#1 lore raw
Quoted 2 lines · On Wed, 18 Apr 2007 12:21:37 +0200 Andi Kleen wrote:

First it was documented twice.

acpi_dbg_layer and
acpi_dbg_level are different.

But the added text is Good.

Quoted 26 lines

Since this is a fairly important option document it properly. I kept myself looking for this information again and again.

In particular the individual bits are fairly important. And add some warnings.

Index: linux/Documentation/kernel-parameters.txt
===================================================================

Documentation/kernel-parameters.txt +3 -7
@@ -187,13 +187,16 @@ and is between 256 and 4096 characters. 
 			1: enable, 0: disable. It is useful for boot time
 			debugging. After system has booted up, it can be set
 			via /proc/acpi/debug_layer.
-
-	acpi_dbg_level=	[HW,ACPI]
-			Format: <int>
-			Each bit of the <int> indicates an ACPI debug level,
-			1: enable, 0: disable. It is useful for boot time
-			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_level.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable debug output
+			for specific parts of the ACPI subsystem:

Documentation/kernel-parameters.txt and is between 256 and 4096 characters. · line 202

Quoted 10 lines
Documentation/kernel-parameters.txt +7 -0
+			1 utilities 2 hardware 4 events 8 tables 
+			0x10 namespace 0x20 parser 0x40 dispatcher
+			0x80 executer 0x100 resources 0x200 debugger
+			0x400 os services
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of 
+			output and make your system unusable. Be very careful.
 
 	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
 

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

reviewer
#2 lore raw
Quoted 7 lines · Randy Dunlap
Quoted 2 lines · On Wed, 18 Apr 2007 12:21:37 +0200 Andi Kleen wrote:

First it was documented twice.

acpi_dbg_layer and
acpi_dbg_level are different.

Note that debug_level and debug_layer are available in sysfs and are self_documenting.

(though in looking at it, I think it is incorrect for sysfs to use debug_level and debug_layer instead of acpi_dbg_level and acpi_dbg_layer, which would match the actual name of the kernel boot parameters)

-Len

lenb@nx6325:~> cat /sys/module/acpi/parameters/debug_level

Description                     Hex        SET
ACPI_LV_ERROR                   0x00000001 [*]
ACPI_LV_WARN                    0x00000002 [*]
ACPI_LV_INIT                    0x00000004 [*]
ACPI_LV_DEBUG_OBJECT            0x00000008 [*]
ACPI_LV_INFO                    0x00000010 [ ]
ACPI_LV_INIT_NAMES              0x00000020 [ ]
ACPI_LV_PARSE                   0x00000040 [ ]
ACPI_LV_LOAD                    0x00000080 [ ]
ACPI_LV_DISPATCH                0x00000100 [ ]
ACPI_LV_EXEC                    0x00000200 [ ]
ACPI_LV_NAMES                   0x00000400 [ ]
ACPI_LV_OPREGION                0x00000800 [ ]
ACPI_LV_BFIELD                  0x00001000 [ ]
ACPI_LV_TABLES                  0x00002000 [ ]
ACPI_LV_VALUES                  0x00004000 [ ]
ACPI_LV_OBJECTS                 0x00008000 [ ]
ACPI_LV_RESOURCES               0x00010000 [ ]
ACPI_LV_USER_REQUESTS           0x00020000 [ ]
ACPI_LV_PACKAGE                 0x00040000 [ ]
ACPI_LV_ALLOCATIONS             0x00100000 [ ]
ACPI_LV_FUNCTIONS               0x00200000 [ ]
ACPI_LV_OPTIMIZATIONS           0x00400000 [ ]
ACPI_LV_MUTEX                   0x01000000 [ ]
ACPI_LV_THREADS                 0x02000000 [ ]
ACPI_LV_IO                      0x04000000 [ ]
ACPI_LV_INTERRUPTS              0x08000000 [ ]
ACPI_LV_AML_DISASSEMBLE         0x10000000 [ ]
ACPI_LV_VERBOSE_INFO            0x20000000 [ ]
ACPI_LV_FULL_TABLES             0x40000000 [ ]
ACPI_LV_EVENTS                  0x80000000 [ ]

--
debug_level = 0x0000000F (* = enabled)

lenb@nx6325:~> cat /sys/module/acpi/parameters/debug_layer

Description                     Hex        SET
ACPI_UTILITIES                  0x00000001 [*]
ACPI_HARDWARE                   0x00000002 [*]
ACPI_EVENTS                     0x00000004 [*]
ACPI_TABLES                     0x00000008 [*]
ACPI_NAMESPACE                  0x00000010 [*]
ACPI_PARSER                     0x00000020 [*]
ACPI_DISPATCHER                 0x00000040 [*]
ACPI_EXECUTER                   0x00000080 [*]
ACPI_RESOURCES                  0x00000100 [*]
ACPI_CA_DEBUGGER                0x00000200 [*]
ACPI_OS_SERVICES                0x00000400 [*]
ACPI_CA_DISASSEMBLER            0x00000800 [*]
ACPI_COMPILER                   0x00001000 [*]
ACPI_TOOLS                      0x00002000 [*]
ACPI_ALL_DRIVERS                0xFFFF0000 [*]

--
debug_layer = 0xFFFF3FFF ( * = enabled)

Quoted 48 lines

But the added text is Good.

Quoted 26 lines

Since this is a fairly important option document it properly. I kept myself looking for this information again and again.

In particular the individual bits are fairly important. And add some warnings.

Index: linux/Documentation/kernel-parameters.txt
===================================================================

Documentation/kernel-parameters.txt +3 -7
@@ -187,13 +187,16 @@ and is between 256 and 4096 characters. 
 			1: enable, 0: disable. It is useful for boot time
 			debugging. After system has booted up, it can be set
 			via /proc/acpi/debug_layer.
-
-	acpi_dbg_level=	[HW,ACPI]
-			Format: <int>
-			Each bit of the <int> indicates an ACPI debug level,
-			1: enable, 0: disable. It is useful for boot time
-			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_level.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable debug output
+			for specific parts of the ACPI subsystem:

Documentation/kernel-parameters.txt and is between 256 and 4096 characters. · line 202

Quoted 10 lines
Documentation/kernel-parameters.txt +7 -0
+			1 utilities 2 hardware 4 events 8 tables 
+			0x10 namespace 0x20 parser 0x40 dispatcher
+			0x80 executer 0x100 resources 0x200 debugger
+			0x400 os services
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of 
+			output and make your system unusable. Be very careful.
 
 	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
 

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code *** -
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 32 lines · Len Brown

lenb@nx6325:~> cat /sys/module/acpi/parameters/debug_level

Description                     Hex        SET
ACPI_LV_ERROR                   0x00000001 [*]
ACPI_LV_WARN                    0x00000002 [*]
ACPI_LV_INIT                    0x00000004 [*]
ACPI_LV_DEBUG_OBJECT            0x00000008 [*]
ACPI_LV_INFO                    0x00000010 [ ]
ACPI_LV_INIT_NAMES              0x00000020 [ ]
ACPI_LV_PARSE                   0x00000040 [ ]
ACPI_LV_LOAD                    0x00000080 [ ]
ACPI_LV_DISPATCH                0x00000100 [ ]
ACPI_LV_EXEC                    0x00000200 [ ]
ACPI_LV_NAMES                   0x00000400 [ ]
ACPI_LV_OPREGION                0x00000800 [ ]
ACPI_LV_BFIELD                  0x00001000 [ ]
ACPI_LV_TABLES                  0x00002000 [ ]
ACPI_LV_VALUES                  0x00004000 [ ]
ACPI_LV_OBJECTS                 0x00008000 [ ]
ACPI_LV_RESOURCES               0x00010000 [ ]
ACPI_LV_USER_REQUESTS           0x00020000 [ ]
ACPI_LV_PACKAGE                 0x00040000 [ ]
ACPI_LV_ALLOCATIONS             0x00100000 [ ]
ACPI_LV_FUNCTIONS               0x00200000 [ ]
ACPI_LV_OPTIMIZATIONS           0x00400000 [ ]
ACPI_LV_MUTEX                   0x01000000 [ ]
ACPI_LV_THREADS                 0x02000000 [ ]
ACPI_LV_IO                      0x04000000 [ ]
ACPI_LV_INTERRUPTS              0x08000000 [ ]
ACPI_LV_AML_DISASSEMBLE         0x10000000 [ ]
ACPI_LV_VERBOSE_INFO            0x20000000 [ ]
ACPI_LV_FULL_TABLES             0x40000000 [ ]
ACPI_LV_EVENTS                  0x80000000 [ ]
Quoted 2 lines

--
debug_level = 0x0000000F (* = enabled)

Seems to violate the 'one value per file' rule. ok, it's one value broken down into its component parts, but still, it's a bit ott, and we don't do similar expansion for other bitmasks in sysfs do we?

Dave

Signature · 1 line
http://www.codemonkey.org.uk
reviewer
#4 lore raw
Quoted 37 lines · Dave Jones
Quoted 32 lines · Len Brown

lenb@nx6325:~> cat /sys/module/acpi/parameters/debug_level

Description                     Hex        SET
ACPI_LV_ERROR                   0x00000001 [*]
ACPI_LV_WARN                    0x00000002 [*]
ACPI_LV_INIT                    0x00000004 [*]
ACPI_LV_DEBUG_OBJECT            0x00000008 [*]
ACPI_LV_INFO                    0x00000010 [ ]
ACPI_LV_INIT_NAMES              0x00000020 [ ]
ACPI_LV_PARSE                   0x00000040 [ ]
ACPI_LV_LOAD                    0x00000080 [ ]
ACPI_LV_DISPATCH                0x00000100 [ ]
ACPI_LV_EXEC                    0x00000200 [ ]
ACPI_LV_NAMES                   0x00000400 [ ]
ACPI_LV_OPREGION                0x00000800 [ ]
ACPI_LV_BFIELD                  0x00001000 [ ]
ACPI_LV_TABLES                  0x00002000 [ ]
ACPI_LV_VALUES                  0x00004000 [ ]
ACPI_LV_OBJECTS                 0x00008000 [ ]
ACPI_LV_RESOURCES               0x00010000 [ ]
ACPI_LV_USER_REQUESTS           0x00020000 [ ]
ACPI_LV_PACKAGE                 0x00040000 [ ]
ACPI_LV_ALLOCATIONS             0x00100000 [ ]
ACPI_LV_FUNCTIONS               0x00200000 [ ]
ACPI_LV_OPTIMIZATIONS           0x00400000 [ ]
ACPI_LV_MUTEX                   0x01000000 [ ]
ACPI_LV_THREADS                 0x02000000 [ ]
ACPI_LV_IO                      0x04000000 [ ]
ACPI_LV_INTERRUPTS              0x08000000 [ ]
ACPI_LV_AML_DISASSEMBLE         0x10000000 [ ]
ACPI_LV_VERBOSE_INFO            0x20000000 [ ]
ACPI_LV_FULL_TABLES             0x40000000 [ ]
ACPI_LV_EVENTS                  0x80000000 [ ]
Quoted 2 lines

--
debug_level = 0x0000000F (* = enabled)

Quoted 1 line

Seems to violate the 'one value per file' rule.

That isn't a rule, it is a convention, and the convention is violated in other places too -- such as cpufreq stats.

basically, sysfs text files are nice for humans
but parsing text files is a pain for programs. Indeed, one could argue that the /dev ioctl() programming model is superior to sysfs if you care only about programs.

I think the one-value-per-file convention is basically to address the fact that writing programs to parse text files is a PITA.

This file will unlikely ever be read by a program, but will be read by a human.

Quoted 3 lines

ok, it's one value broken down into its component parts, but still, it's a bit ott, and we don't do similar expansion for other bitmasks in sysfs do we?

Life on the cutting edge, it is:-)
If you have a specific suggestion for improvement, just let me know.

-Len

#5 lore raw
In reply to Len Brown
Quoted 8 lines · Andi Kleen

First it was documented twice.

Since this is a fairly important option document it properly. I kept myself looking for this information again and again.

In particular the individual bits are fairly important. And add some warnings.

That's right. Thanks for pointing out.
Does the patch below make sense?

Quoted 4 lines · Len Brown

(though in looking at it, I think it is incorrect for sysfs to use debug_level and debug_layer instead of acpi_dbg_level and acpi_dbg_layer, which would match the actual name of the kernel boot parameters)

Now we use acpi.debug_level and acpi.debug_layer as kernel boot parameters instead of acpi_dbg_level and acpi_dbg_layer. But the document is not updated in time.

This is the patch to update document for ACPI debug option.

---
 Documentation/kernel-parameters.txt |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)
Documentation/kernel-parameters.txt +26 -4
Index: linux-2.6.21-rc7/Documentation/kernel-parameters.txt
===================================================================
@@ -181,19 +181,41 @@ and is between 256 and 4096 characters. 
 			that require a timer override, but don't have
 			HPET
 
-	acpi_dbg_layer=	[HW,ACPI]
+	acpi.dbg_layer=	[HW,ACPI]
 			Format: <int>
 			Each bit of the <int> indicates an ACPI debug layer,
 			1: enable, 0: disable. It is useful for boot time
 			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_layer.
+			via /sys/module/acpi/parameters/debug_layer.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable debug output
+			for specific parts of the ACPI subsystem:
+			0x01 utilities 0x02 hardware 0x04 events 0x08 tables
+			0x10 namespace 0x20 parser 0x40 dispatcher
+			0x80 executer 0x100 resources 0x200 acpica debugger
+			0x400 os services 0x800 acpica disassembler
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of
+			output and make your system unusable. Be very careful.
 
-	acpi_dbg_level=	[HW,ACPI]
+	acpi.dbg_level=	[HW,ACPI]
 			Format: <int>
 			Each bit of the <int> indicates an ACPI debug level,
 			1: enable, 0: disable. It is useful for boot time
 			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_level.
+			via /sys/module/acpi/parameters/debug_level.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable defferent
+			debug output levels of the ACPI subsystem:
+			0x01 error 0x02 warn 0x04 init 0x08 debug object
+			0x10 info 0x20 init names 0x40 parse 0x80 load
+			0x100 dispatch 0x200 execute 0x400 names 0x800 operation region
+			0x1000 bfield 0x2000 tables 0x4000 values 0x8000 objects
+			0x10000 resources 0x20000 user requests 0x40000 package
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of
+			output and make your system unusable. Be very careful.
+
 
 	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
 
#6 lore raw
Quoted 10 lines · Zhang Rui
Quoted 7 lines · Andi Kleen

First it was documented twice.

Since this is a fairly important option document it properly. I kept myself looking for this information again and again.

In particular the individual bits are fairly important. And add some warnings.

That's right. Thanks for pointing out.
Does the patch below make sense?

Yes, thanks.
A few comments below.

Quoted 30 lines · Len Brown
Quoted 4 lines

(though in looking at it, I think it is incorrect for sysfs to use debug_level and debug_layer instead of acpi_dbg_level and acpi_dbg_layer, which would match the actual name of the kernel boot parameters)

Now we use acpi.debug_level and acpi.debug_layer as kernel boot parameters instead of acpi_dbg_level and acpi_dbg_layer. But the document is not updated in time.

This is the patch to update document for ACPI debug option.

---
 Documentation/kernel-parameters.txt |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

Index: linux-2.6.21-rc7/Documentation/kernel-parameters.txt
===================================================================

Documentation/kernel-parameters.txt +1 -1
@@ -181,19 +181,41 @@ and is between 256 and 4096 characters. 
 			that require a timer override, but don't have
 			HPET
 
-	acpi_dbg_layer=	[HW,ACPI]
+	acpi.dbg_layer=	[HW,ACPI]
 			Format: <int>
 			Each bit of the <int> indicates an ACPI debug layer,
 			1: enable, 0: disable. It is useful for boot time

Documentation/kernel-parameters.txt and is between 256 and 4096 characters. · line 196

Quoted 10 lines
Documentation/kernel-parameters.txt +8 -1
 			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_layer.
+			via /sys/module/acpi/parameters/debug_layer.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable debug output
+			for specific parts of the ACPI subsystem:
+			0x01 utilities 0x02 hardware 0x04 events 0x08 tables
+			0x10 namespace 0x20 parser 0x40 dispatcher
+			0x80 executer 0x100 resources 0x200 acpica debugger
+			0x400 os services 0x800 acpica disassembler

Add period at end above ^

Quoted 4 lines
Documentation/kernel-parameters.txt +3 -0
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of
+			output and make your system unusable. Be very careful.
 

Documentation/kernel-parameters.txt and is between 256 and 4096 characters. · line 208

Quoted 10 lines
Documentation/kernel-parameters.txt +4 -2
-	acpi_dbg_level=	[HW,ACPI]
+	acpi.dbg_level=	[HW,ACPI]
 			Format: <int>
 			Each bit of the <int> indicates an ACPI debug level,
 			1: enable, 0: disable. It is useful for boot time
 			debugging. After system has booted up, it can be set
-			via /proc/acpi/debug_level.
+			via /sys/module/acpi/parameters/debug_level.
+			CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
+			Available bits (add the numbers together) to enable defferent

different

Documentation/kernel-parameters.txt and is between 256 and 4096 characters. · line 214

Quoted 6 lines
Documentation/kernel-parameters.txt +6 -0
+			debug output levels of the ACPI subsystem:
+			0x01 error 0x02 warn 0x04 init 0x08 debug object
+			0x10 info 0x20 init names 0x40 parse 0x80 load
+			0x100 dispatch 0x200 execute 0x400 names 0x800 operation region
+			0x1000 bfield 0x2000 tables 0x4000 values 0x8000 objects
+			0x10000 resources 0x20000 user requests 0x40000 package

Add period at end above.

Quoted 7 lines
Documentation/kernel-parameters.txt +4 -0
+			The number can be in decimal or prefixed with 0x in hex.
+			Warning: Many of these options can produce a lot of
+			output and make your system unusable. Be very careful.
+
 
 	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
 
Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***