From 221530527fe2428ba7c8171a9ddd0ed6582b7ee8 Mon Sep 17 00:00:00 2001 From: Pierre Peiffer Date: Mon, 19 Dec 2011 18:29:49 +0100 Subject: U8500 CM: Enable logging through ftrace Logging all debug traces through printk is too intrusive to be usable, specialy when using debug level 2 or 3. Enable logging through ftrace by using a cm_use_ftrace flag. ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson ID: 405500 ST-Ericsson Linux next: NA Change-Id: I58cb53fb9801836ca85ee46144b05f39a5ac710e Signed-off-by: Pierre Peiffer Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43145 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: QATEST --- drivers/staging/nmf-cm/osal-kernel.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/staging/nmf-cm/osal-kernel.c b/drivers/staging/nmf-cm/osal-kernel.c index e79e35db106..6e3221130c5 100644 --- a/drivers/staging/nmf-cm/osal-kernel.c +++ b/drivers/staging/nmf-cm/osal-kernel.c @@ -49,6 +49,9 @@ MODULE_PARM_DESC(dspLoadHighThreshold, "Threshold above which 100 APE OPP is req static unsigned int dspLoadLowThreshold = 35; module_param(dspLoadLowThreshold, uint, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(dspLoadLowThreshold, "Threshold below which 100 APE OPP request is removed"); +static bool cm_use_ftrace; +module_param(cm_use_ftrace, bool, S_IWUSR|S_IRUGO); +MODULE_PARM_DESC(cm_use_ftrace, "Whether all CM debug traces goes through ftrace or normal kernel output"); /** \defgroup ENVIRONMENT_INITIALIZATION Environment initialization * Includes functions that initialize the Linux OSAL itself plus functions that @@ -680,7 +683,11 @@ void OSAL_Write64(t_nmf_trace_channel channel, t_uint8 isTimestamped, t_uint64 v */ void OSAL_Log(const char *format, int param1, int param2, int param3, int param4, int param5, int param6) { - printk(format, param1, param2, param3, param4, param5, param6); + if (cm_use_ftrace) + trace_printk(format, + param1, param2, param3, param4, param5, param6); + else + printk(format, param1, param2, param3, param4, param5, param6); } /** -- cgit v1.2.3