From 9baf44bc17ddbc01dae4feacda32e04aac73f730 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Wed, 22 Aug 2012 12:30:59 -0700 Subject: [PATCH] Wrap trace_set_debug_header in trace_[get|put]_tcd To properly support CONFIG_PREEMPT enabled kernels, we must refrain from using a CPU index when preemption is enabled. As a result, this change moves the trace_set_debug_header call (which calls smp_processor_id) within trace_get_tcd and trace_put_tcd (which disable and enable preemption respectively). Signed-off-by: Prakash Surya Signed-off-by: Brian Behlendorf Closes #160 --- module/spl/spl-debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index 4bcc34a8e..0dd59db56 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -686,9 +686,8 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, if (strchr(file, '/')) file = strrchr(file, '/') + 1; - trace_set_debug_header(&header, subsys, mask, line, 0); - tcd = trace_get_tcd(); + trace_set_debug_header(&header, subsys, mask, line, 0); if (tcd == NULL) goto console;