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

Commit 9c8e7ed8 authored by Olav Haugan's avatar Olav Haugan Committed by Pavankumar Kondeti
Browse files

qcom: core_ctl_helper: Remove



Remove the core control helper code since this is not needed anymore
with subsequent patches that moves core control into the kernel.

Change-Id: I62acddeb707fc7d5626580166b3466e63f45fd89
Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent aab39b81
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -707,14 +707,6 @@ config ICNSS
	  control messages to FW over QMI channel. It is also responsible for
	  control messages to FW over QMI channel. It is also responsible for
	  handling WLAN PD restart notifications.
	  handling WLAN PD restart notifications.


config MSM_CORE_CTL_HELPER
	tristate "Core control helper functions for dynamically hotplug CPUs"
	help
	  Provide helper functions for core control driver. Core control
	  driver dynamically hotplugs CPUs from kernel based on current
	  system load and state. It also supports limiting min and
	  max online CPUs from userspace.

config MSM_BAM_DMUX
config MSM_BAM_DMUX
	bool "BAM Data Mux Driver"
	bool "BAM Data Mux Driver"
	depends on SPS
	depends on SPS
+0 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,6 @@ obj-$(CONFIG_MSM_TZ_SMMU) += msm_tz_smmu.o
obj-$(CONFIG_MSM_PIL)   +=      peripheral-loader.o
obj-$(CONFIG_MSM_PIL)   +=      peripheral-loader.o
obj-$(CONFIG_MSM_PIL_SSR_GENERIC) += subsys-pil-tz.o
obj-$(CONFIG_MSM_PIL_SSR_GENERIC) += subsys-pil-tz.o
obj-$(CONFIG_MSM_PIL_MSS_QDSP6V5) += pil-q6v5.o pil-msa.o pil-q6v5-mss.o
obj-$(CONFIG_MSM_PIL_MSS_QDSP6V5) += pil-q6v5.o pil-msa.o pil-q6v5-mss.o
obj-$(CONFIG_MSM_CORE_CTL_HELPER) += core_ctl_helper.o
obj-$(CONFIG_MSM_SCM_ERRATA) += scm-errata.o
obj-$(CONFIG_MSM_SCM_ERRATA) += scm-errata.o
obj-$(CONFIG_MSM_PFE_WA) += pfe-wa.o
obj-$(CONFIG_MSM_PFE_WA) += pfe-wa.o
obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o
obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o
+0 −92
Original line number Original line Diff line number Diff line
/*
 * 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
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/cpu.h>
#include <linux/cpufreq.h>
#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/module.h>
#include <linux/init.h>
#include <soc/qcom/core_ctl.h>

void core_ctl_block_hotplug(void)
{
	get_online_cpus();
}
EXPORT_SYMBOL(core_ctl_block_hotplug);

void core_ctl_unblock_hotplug(void)
{
	put_online_cpus();
}
EXPORT_SYMBOL(core_ctl_unblock_hotplug);

s64 core_ctl_get_time(void)
{
	return ktime_to_ms(ktime_get());
}
EXPORT_SYMBOL(core_ctl_get_time);

struct cpufreq_policy *core_ctl_get_policy(int cpu)
{
	return cpufreq_cpu_get(cpu);
}
EXPORT_SYMBOL(core_ctl_get_policy);

void core_ctl_put_policy(struct cpufreq_policy *policy)
{
	cpufreq_cpu_put(policy);
}
EXPORT_SYMBOL(core_ctl_put_policy);

struct device *core_ctl_find_cpu_device(unsigned cpu)
{
	return get_cpu_device(cpu);
}
EXPORT_SYMBOL(core_ctl_find_cpu_device);

int __ref core_ctl_online_core(unsigned int cpu)
{
	int ret;
	struct device *dev;

	lock_device_hotplug();
	dev = get_cpu_device(cpu);
	if (!dev) {
		pr_err("%s: failed to get cpu%d device\n", __func__, cpu);
		ret = -ENODEV;
	} else {
		ret = device_online(dev);
	}
	unlock_device_hotplug();
	return ret;
}
EXPORT_SYMBOL(core_ctl_online_core);

int __ref core_ctl_offline_core(unsigned int cpu)
{
	int ret;
	struct device *dev;

	lock_device_hotplug();
	dev = get_cpu_device(cpu);
	if (!dev) {
		pr_err("%s: failed to get cpu%d device\n", __func__, cpu);
		ret = -ENODEV;
	} else {
		ret = device_offline(dev);
	}
	unlock_device_hotplug();
	return ret;
}
EXPORT_SYMBOL(core_ctl_offline_core);

include/soc/qcom/core_ctl.h

deleted100644 → 0
+0 −26
Original line number Original line Diff line number Diff line
/*
 * Copyright (c) 2014-2015, 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
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __SOC_QCOM_CORE_CTL_H
#define __SOC_QCOM_CORE_CTL_H

extern void core_ctl_block_hotplug(void);
extern void core_ctl_unblock_hotplug(void);
extern s64 core_ctl_get_time(void);
extern struct cpufreq_policy *core_ctl_get_policy(int cpu);
extern void core_ctl_put_policy(struct cpufreq_policy *policy);
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);

#endif