summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/qcom/core_ctl_helper.c20
-rw-r--r--include/soc/qcom/core_ctl.h3
2 files changed, 20 insertions, 3 deletions
diff --git a/drivers/soc/qcom/core_ctl_helper.c b/drivers/soc/qcom/core_ctl_helper.c
index 3b25d9811cf7..7f674229f1f8 100644
--- a/drivers/soc/qcom/core_ctl_helper.c
+++ b/drivers/soc/qcom/core_ctl_helper.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * 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
@@ -57,6 +57,22 @@ EXPORT_SYMBOL(core_ctl_find_cpu_device);
int __ref core_ctl_online_core(unsigned int cpu)
{
- return cpu_up(cpu);
+ int ret;
+
+ lock_device_hotplug();
+ ret = device_online(get_cpu_device(cpu));
+ unlock_device_hotplug();
+ return ret;
}
EXPORT_SYMBOL(core_ctl_online_core);
+
+int __ref core_ctl_offline_core(unsigned int cpu)
+{
+ int ret;
+
+ lock_device_hotplug();
+ ret = device_offline(get_cpu_device(cpu));
+ unlock_device_hotplug();
+ return ret;
+}
+EXPORT_SYMBOL(core_ctl_offline_core);
diff --git a/include/soc/qcom/core_ctl.h b/include/soc/qcom/core_ctl.h
index 01f55e53cd47..39bce9fc8fdd 100644
--- a/include/soc/qcom/core_ctl.h
+++ b/include/soc/qcom/core_ctl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * 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
@@ -21,5 +21,6 @@ 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