All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Improve acpi_dbg_level= documentation
@ 2007-04-18 10:21 Andi Kleen
  2007-04-18 15:08 ` Randy Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2007-04-18 10:21 UTC (permalink / raw)
  To: len.brown; +Cc: linux-acpi


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.

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/Documentation/kernel-parameters.txt
===================================================================
--- linux.orig/Documentation/kernel-parameters.txt
+++ 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
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Improve acpi_dbg_level= documentation
  2007-04-18 10:21 [PATCH] Improve acpi_dbg_level= documentation Andi Kleen
@ 2007-04-18 15:08 ` Randy Dunlap
  2007-04-18 20:26   ` Len Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2007-04-18 15:08 UTC (permalink / raw)
  To: Andi Kleen; +Cc: len.brown, linux-acpi

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.

> 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.
> 
> Signed-off-by: Andi Kleen <ak@suse.de>
> 
> Index: linux/Documentation/kernel-parameters.txt
> ===================================================================
> --- linux.orig/Documentation/kernel-parameters.txt
> +++ 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
>  


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Improve acpi_dbg_level= documentation
  2007-04-18 15:08 ` Randy Dunlap
@ 2007-04-18 20:26   ` Len Brown
  2007-04-18 22:35     ` Dave Jones
  2007-04-19  7:38     ` Zhang Rui
  0 siblings, 2 replies; 7+ messages in thread
From: Len Brown @ 2007-04-18 20:26 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Andi Kleen, linux-acpi

On Wednesday 18 April 2007 11:08, Randy Dunlap wrote:
> 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)


> But the added text is Good.
> 
> > 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.
> > 
> > Signed-off-by: Andi Kleen <ak@suse.de>
> > 
> > Index: linux/Documentation/kernel-parameters.txt
> > ===================================================================
> > --- linux.orig/Documentation/kernel-parameters.txt
> > +++ 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
> >  
> 
> 
> ---
> ~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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Improve acpi_dbg_level= documentation
  2007-04-18 20:26   ` Len Brown
@ 2007-04-18 22:35     ` Dave Jones
  2007-04-19 17:35       ` Len Brown
  2007-04-19  7:38     ` Zhang Rui
  1 sibling, 1 reply; 7+ messages in thread
From: Dave Jones @ 2007-04-18 22:35 UTC (permalink / raw)
  To: Len Brown; +Cc: Randy Dunlap, Andi Kleen, linux-acpi

On Wed, Apr 18, 2007 at 04:26:20PM -0400, Len Brown wrote:
 
 > 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)

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

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Improve acpi_dbg_level= documentation
  2007-04-18 20:26   ` Len Brown
  2007-04-18 22:35     ` Dave Jones
@ 2007-04-19  7:38     ` Zhang Rui
  2007-04-19 15:04       ` Randy Dunlap
  1 sibling, 1 reply; 7+ messages in thread
From: Zhang Rui @ 2007-04-19  7:38 UTC (permalink / raw)
  To: Len Brown, Andi Kleen; +Cc: Randy Dunlap, linux-acpi@vger

On Wed, 2007-04-18 at 12:21 +0200, Andi Kleen wrote: 
> 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?

On Wed, 2007-04-18 at 16:26 -0400, Len Brown wrote:
> (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.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 Documentation/kernel-parameters.txt |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

Index: linux-2.6.21-rc7/Documentation/kernel-parameters.txt
===================================================================
--- linux-2.6.21-rc7.orig/Documentation/kernel-parameters.txt	2007-04-18 15:22:49.000000000 +0800
+++ linux-2.6.21-rc7/Documentation/kernel-parameters.txt	2007-04-19 15:21:17.000000000 +0800
@@ -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
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Improve acpi_dbg_level= documentation
  2007-04-19  7:38     ` Zhang Rui
@ 2007-04-19 15:04       ` Randy Dunlap
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2007-04-19 15:04 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Len Brown, Andi Kleen, linux-acpi@vger

Zhang Rui wrote:
> On Wed, 2007-04-18 at 12:21 +0200, Andi Kleen wrote: 
>> 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.

> On Wed, 2007-04-18 at 16:26 -0400, Len Brown wrote:
>> (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.
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  Documentation/kernel-parameters.txt |   30 ++++++++++++++++++++++++++----
>  1 files changed, 26 insertions(+), 4 deletions(-)
> 
> Index: linux-2.6.21-rc7/Documentation/kernel-parameters.txt
> ===================================================================
> --- linux-2.6.21-rc7.orig/Documentation/kernel-parameters.txt	2007-04-18 15:22:49.000000000 +0800
> +++ linux-2.6.21-rc7/Documentation/kernel-parameters.txt	2007-04-19 15:21:17.000000000 +0800
> @@ -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

Add period at end above                                            ^

> +			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

                                                                         different

> +			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.

> +			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 ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Improve acpi_dbg_level= documentation
  2007-04-18 22:35     ` Dave Jones
@ 2007-04-19 17:35       ` Len Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Len Brown @ 2007-04-19 17:35 UTC (permalink / raw)
  To: Dave Jones; +Cc: Randy Dunlap, Andi Kleen, linux-acpi

On Wednesday 18 April 2007 18:35, Dave Jones wrote:
> On Wed, Apr 18, 2007 at 04:26:20PM -0400, Len Brown wrote:
>  
>  > 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)
> 
> 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.

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-04-19 17:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-18 10:21 [PATCH] Improve acpi_dbg_level= documentation Andi Kleen
2007-04-18 15:08 ` Randy Dunlap
2007-04-18 20:26   ` Len Brown
2007-04-18 22:35     ` Dave Jones
2007-04-19 17:35       ` Len Brown
2007-04-19  7:38     ` Zhang Rui
2007-04-19 15:04       ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.