summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Peiffer <pierre.peiffer@stericsson.com>2011-12-19 18:29:49 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:07:04 +0200
commit221530527fe2428ba7c8171a9ddd0ed6582b7ee8 (patch)
treeaafc299f039bb5a5c90c541901e472367c58aaba
parent274c285bd7971c6fa76ad896f5275b359b85c323 (diff)
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 <pierre.peiffer@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43145 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: QATEST
-rw-r--r--drivers/staging/nmf-cm/osal-kernel.c9
1 files changed, 8 insertions, 1 deletions
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);
}
/**