[compiler] Allow for selective disabling of debug levels at runtime
authorMichael Brown <mcb30@etherboot.org>
Wed, 1 Oct 2008 17:58:21 +0000 (18:58 +0100)
committerMichael Brown <mcb30@etherboot.org>
Wed, 1 Oct 2008 18:24:56 +0000 (19:24 +0100)
commitafe1323c76c84c5c5bf50ef8fb7aa593fe2ca2e0
treee9c5b5ed4a8b736f9ff343dcd3f6a235985c4179
parent9b01a9fd9cb149a1cee0d16e59e050131aefdabf
[compiler] Allow for selective disabling of debug levels at runtime

The usefulness of DBGLVL_IO is limited by the fact that many cards
require large numbers of uninteresting I/O reads/writes at device
probe time, typically when driving a bit-bashing I2C/SPI bus to read
the MAC address.

This patch adds the DBG_DISABLE() and DBG_ENABLE() macros, which can
be used to temporarily disable and re-enable selected debug levels.
Note that debug levels must still be enabled in the build in order to
function at all: you can't use DBG_ENABLE(DBGLVL_IO) in an object
built with DEBUG=object:1 and expect it to do anything.
src/include/compiler.h