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>