Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b9a2749 authored by Prachee Ramsinghani's avatar Prachee Ramsinghani Committed by Tapas Kumar Kundu
Browse files

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: default avatarPrachee Ramsinghani <pracheer@codeaurora.org>
parent 44c8975e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -565,4 +565,14 @@ 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_MSM
+6 −2
Original line number Diff line number Diff line
@@ -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,
};

#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