kernel/acpi: Improve the disabling of Debug object output.
authorSascha Wildner <saw@online.de>
Tue, 20 May 2014 19:55:52 +0000 (21:55 +0200)
committerSascha Wildner <saw@online.de>
Tue, 20 May 2014 19:55:52 +0000 (21:55 +0200)
commit586fced21e39bbdac0482f742fdb13fdf39506cc
treeff97cc7806837ab07aa733d7c472b1a038e78f02
parentd52c888512ee8471d27c7ec8f9ec4603194a55be
kernel/acpi: Improve the disabling of Debug object output.

It is actually a global in ACPICA (since 20100304) so add a new
sysctl debug.acpi.enable_debug_objects that can be used to toggle
it, with the default being 0.

Unlike the previous attempt (which I had to revert again), this
time also clear ACPI_LV_DEBUG_OBJECT in the AcpiDbgLevel global in
case ACPI_DEBUG is not defined. My assumption that ACPICA would
initialize AcpiDbgLevel to 0 was wrong. It really is initialized
to ACPI_NORMAL_DEFAULT. It is kind of weird that
ACPI_NORMAL_DEFAULT == ACPI_DEBUG_DEFAULT in acoutput.h, but FWIW,
leave the other bits in AcpiDbgLevel set for now.

This commit reverts (again) a previous commit by sephe which solved
it differently (in the ACPICA code).

Taken-from:    FreeBSD (with modification by me)
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2672>
share/man/man4/acpi.4
sys/contrib/dev/acpica/source/include/acoutput.h
sys/dev/acpica/acpi.c