wlan: Do not invoke smp_processor_id() in preemptible from MC_Thread
Currently wpalTrace() invokes smp_processor_id() in a preemptible
context. On current msm8974 JB MR1 builds the kernel flags this as a
BUG. This makes sense given that if you are in a preemptible context,
the value obtained may immediately be invalid since the thread may be
preempted and resume on a different core. Since this doesn't add any
value, remove the smp_processor_id from the message logs. Note that
this change had previously been made to the VOS trace API.
Change-Id: Ia9a43054d2c52590cdfa86d76adad5d2aa839fce
CR-Fixed: 436352
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c b/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c
index 3ce5833..eba60aa 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c
@@ -276,8 +276,7 @@
va_start(val, strFormat);
// print the prefix string into the string buffer...
- n = snprintf(strBuffer, WPAL_TRACE_BUFFER_SIZE, "wlan: [%d:%d:%2s:%3s] ",
- smp_processor_id(),
+ n = snprintf(strBuffer, WPAL_TRACE_BUFFER_SIZE, "wlan: [%d:%2s:%3s] ",
in_interrupt() ? 0 : current->pid,
(char *) TRACE_LEVEL_STR[ level ],
(char *) gTraceInfo[ module ].moduleNameStr);