diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-25 13:08:16 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-25 13:08:16 +0200 |
commit | 10a010f6953b5a14ba2f0be40a4fce1bea220875 (patch) | |
tree | 19aadf718c796bc7fae0a1a1c970d84d67c541d4 /drivers/s390/net/ctcm_dbug.c | |
parent | 510b37258dfd61693ca6c039865c78bd996e3718 (diff) | |
parent | fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 (diff) |
Merge branch 'linus' into x86/x2apic
Conflicts:
drivers/pci/dmar.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/s390/net/ctcm_dbug.c')
-rw-r--r-- | drivers/s390/net/ctcm_dbug.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/drivers/s390/net/ctcm_dbug.c b/drivers/s390/net/ctcm_dbug.c index 8eb25d00b2e..1ca58f15347 100644 --- a/drivers/s390/net/ctcm_dbug.c +++ b/drivers/s390/net/ctcm_dbug.c @@ -7,6 +7,7 @@ */ #include <linux/stddef.h> +#include <linux/string.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/slab.h> @@ -22,15 +23,13 @@ * Debug Facility Stuff */ -DEFINE_PER_CPU(char[256], ctcm_dbf_txt_buf); - struct ctcm_dbf_info ctcm_dbf[CTCM_DBF_INFOS] = { - [CTCM_DBF_SETUP] = {"ctc_setup", 8, 1, 64, 5, NULL}, - [CTCM_DBF_ERROR] = {"ctc_error", 8, 1, 64, 3, NULL}, - [CTCM_DBF_TRACE] = {"ctc_trace", 8, 1, 64, 3, NULL}, - [CTCM_DBF_MPC_SETUP] = {"mpc_setup", 8, 1, 64, 5, NULL}, - [CTCM_DBF_MPC_ERROR] = {"mpc_error", 8, 1, 64, 3, NULL}, - [CTCM_DBF_MPC_TRACE] = {"mpc_trace", 8, 1, 64, 3, NULL}, + [CTCM_DBF_SETUP] = {"ctc_setup", 8, 1, 64, CTC_DBF_INFO, NULL}, + [CTCM_DBF_ERROR] = {"ctc_error", 8, 1, 64, CTC_DBF_ERROR, NULL}, + [CTCM_DBF_TRACE] = {"ctc_trace", 8, 1, 64, CTC_DBF_ERROR, NULL}, + [CTCM_DBF_MPC_SETUP] = {"mpc_setup", 8, 1, 80, CTC_DBF_INFO, NULL}, + [CTCM_DBF_MPC_ERROR] = {"mpc_error", 8, 1, 80, CTC_DBF_ERROR, NULL}, + [CTCM_DBF_MPC_TRACE] = {"mpc_trace", 8, 1, 80, CTC_DBF_ERROR, NULL}, }; void ctcm_unregister_dbf_views(void) @@ -65,3 +64,17 @@ int ctcm_register_dbf_views(void) return 0; } +void ctcm_dbf_longtext(enum ctcm_dbf_names dbf_nix, int level, char *fmt, ...) +{ + char dbf_txt_buf[64]; + va_list args; + + if (level > (ctcm_dbf[dbf_nix].id)->level) + return; + va_start(args, fmt); + vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); + va_end(args); + + debug_text_event(ctcm_dbf[dbf_nix].id, level, dbf_txt_buf); +} + |