soc: qcom: core_ctl: Add a tracing function

The core control module requires tracing capability. Export
a function that will allow new events to be added in an
extensible fashion without a compile-time dependency.

Change-Id: I807d1ec4a104d8289441512b61e5e26df291525b
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
This commit is contained in:
Vikram Mulukutla 2016-03-17 17:25:34 -07:00 committed by David Keitel
parent 6c98c21f9e
commit 0a9cabdc2a
2 changed files with 25 additions and 1 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -17,8 +17,23 @@
#include <linux/hrtimer.h>
#include <linux/module.h>
#include <linux/init.h>
#include <trace/events/power.h>
#include <soc/qcom/core_ctl.h>
void core_ctl_trace(int type, int cpu, int arg1, int arg2, int arg3)
{
switch (type) {
case CORE_CTL_EVAL_NEED:
trace_core_ctl_eval_need(cpu, arg1, arg2, arg3);
break;
case CORE_CTL_SET_BUSY:
trace_core_ctl_set_busy(cpu, arg1, arg2, arg3);
break;
};
}
EXPORT_SYMBOL(core_ctl_trace);
void core_ctl_block_hotplug(void)
{
get_online_cpus();

View file

@ -14,6 +14,12 @@
#ifndef __SOC_QCOM_CORE_CTL_H
#define __SOC_QCOM_CORE_CTL_H
enum {
CORE_CTL_EVAL_NEED,
CORE_CTL_SET_BUSY,
CORE_CTL_N_TRACE_EVENTS,
};
extern void core_ctl_block_hotplug(void);
extern void core_ctl_unblock_hotplug(void);
extern s64 core_ctl_get_time(void);
@ -23,4 +29,7 @@ extern struct device *core_ctl_find_cpu_device(unsigned cpu);
extern int core_ctl_online_core(unsigned int cpu);
extern int core_ctl_offline_core(unsigned int cpu);
#define USE_CORE_CTL_TRACE
extern void core_ctl_trace(int type, int cpu, int arg1, int arg2, int arg3);
#endif