qcom: core_ctl_helper: Add wrapper for CPU hotplug
Different kernel version needs to use different kernel APIs for hotplug. Add wrapper for CPU hotplug so that external module can be used across different kernel releases. Use cpu_up/cpu_down() API for CPU hotplug. Change-Id: Ib36a875027f67b96e2d108de8b7d902978e50005 Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
parent
8f5716be95
commit
d6e56a4f37
|
@ -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
|
||||
|
@ -60,3 +60,9 @@ int __ref core_ctl_online_core(unsigned int cpu)
|
|||
return cpu_up(cpu);
|
||||
}
|
||||
EXPORT_SYMBOL(core_ctl_online_core);
|
||||
|
||||
int __ref core_ctl_offline_core(unsigned int cpu)
|
||||
{
|
||||
return cpu_down(cpu);
|
||||
}
|
||||
EXPORT_SYMBOL(core_ctl_offline_core);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue