summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorPrachee Ramsinghani <pracheer@codeaurora.org>2015-03-12 18:09:11 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:22:27 -0700
commit010aa5bd7cdeee25c1f2290c7ebb62fe2ab8a16c (patch)
treef2856ca468f1afb2c5b874782458916d4e5473bb /drivers/soc
parentad20b57ffba6c4577b31a94b11ab86ba01bacbe8 (diff)
soc: qcom: msm_perf: Optionally compile out hotplug tunables
If msm_performance module and some other module with the core hotplug capability (like core_ctl) co-exist and both of them try to hotplug the cores system inconsistencies can occur. To avoid such behavior sysfs nodes needed for hotplug support in msm_performance module are compiled out. Change-Id: I25e8404ce0581e718d6b55cd0e1f5c7da8e92db5 Signed-off-by: Prachee Ramsinghani <pracheer@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/Kconfig10
-rw-r--r--drivers/soc/qcom/msm_performance.c8
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 2babb640d38c..dd33016d5c88 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -475,6 +475,16 @@ config MSM_PERFORMANCE
It ensures that no more than a user specified number of CPUs stay
online at any given point in time.
+config MSM_PERFORMANCE_HOTPLUG_ON
+ bool "Hotplug functionality through msm_performance turned on"
+ depends on MSM_PERFORMANCE
+ default y
+ help
+ If some other core-control driver is present turn off the core-control
+ capability of msm_performance driver. Setting this flag to false will
+ compile out the nodes needed for core-control functionality through
+ msm_performance.
+
endif # ARCH_QCOM
config MSM_SUBSYSTEM_RESTART
diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c
index e9d925291956..9d7f16d0a512 100644
--- a/drivers/soc/qcom/msm_performance.c
+++ b/drivers/soc/qcom/msm_performance.c
@@ -204,7 +204,9 @@ static const struct kernel_param_ops param_ops_max_cpus = {
.get = get_max_cpus,
};
+#ifdef CONFIG_MSM_PERFORMANCE_HOTPLUG_ON
device_param_cb(max_cpus, &param_ops_max_cpus, NULL, 0644);
+#endif
static int set_managed_cpus(const char *buf, const struct kernel_param *kp)
{
@@ -287,9 +289,11 @@ static int get_managed_online_cpus(char *buf, const struct kernel_param *kp)
static const struct kernel_param_ops param_ops_managed_online_cpus = {
.get = get_managed_online_cpus,
};
-device_param_cb(managed_online_cpus, &param_ops_managed_online_cpus,
- NULL, 0444);
+#ifdef CONFIG_MSM_PERFORMANCE_HOTPLUG_ON
+device_param_cb(managed_online_cpus, &param_ops_managed_online_cpus,
+ NULL, 0444);
+#endif
/*
* Userspace sends cpu#:min_freq_value to vote for min_freq_value as the new
* scaling_min. To withdraw its vote it needs to enter cpu#:0