Loading arch/arm64/configs/msm-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -510,6 +510,7 @@ CONFIG_CRYPTO_DEV_QCEDEV=y CONFIG_CRYPTO_DEV_OTA_CRYPTO=y CONFIG_CRYPTO_DEV_QCOM_ICE=y CONFIG_QMI_ENCDEC=y CONFIG_MSM_CORE_CTL_HELPER=y CONFIG_DEVFREQ_SPDM=y CONFIG_SPDM_SCM=y CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=4 Loading arch/arm64/configs/msm_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,7 @@ CONFIG_PAGE_OWNER=y CONFIG_HW_RANDOM_MSM_LEGACY=y CONFIG_PAGE_OWNER=y CONFIG_MOBICORE_DRIVER=m CONFIG_MSM_CORE_CTL_HELPER=y CONFIG_DEVFREQ_SPDM=y CONFIG_SPDM_SCM=y CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=4 Loading drivers/soc/qcom/Kconfig +8 −0 Original line number Diff line number Diff line Loading @@ -541,4 +541,12 @@ config ICNSS control messages to FW over QMI channel. It is also responsible for 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. endif # ARCH_MSM drivers/soc/qcom/Makefile +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ obj-$(CONFIG_MSM_TZ_SMMU) += msm_tz_smmu.o obj-$(CONFIG_MSM_PIL) += peripheral-loader.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_CORE_CTL_HELPER) += core_ctl_helper.o ifdef CONFIG_MSM_SUBSYSTEM_RESTART obj-y += subsystem_notif.o obj-y += subsystem_restart.o Loading drivers/soc/qcom/core_ctl_helper.c 0 → 100644 +62 −0 Original line number Diff line number Diff line /* * Copyright (c) 2014, 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) { return cpu_up(cpu); } EXPORT_SYMBOL(core_ctl_online_core); Loading
arch/arm64/configs/msm-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -510,6 +510,7 @@ CONFIG_CRYPTO_DEV_QCEDEV=y CONFIG_CRYPTO_DEV_OTA_CRYPTO=y CONFIG_CRYPTO_DEV_QCOM_ICE=y CONFIG_QMI_ENCDEC=y CONFIG_MSM_CORE_CTL_HELPER=y CONFIG_DEVFREQ_SPDM=y CONFIG_SPDM_SCM=y CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=4 Loading
arch/arm64/configs/msm_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,7 @@ CONFIG_PAGE_OWNER=y CONFIG_HW_RANDOM_MSM_LEGACY=y CONFIG_PAGE_OWNER=y CONFIG_MOBICORE_DRIVER=m CONFIG_MSM_CORE_CTL_HELPER=y CONFIG_DEVFREQ_SPDM=y CONFIG_SPDM_SCM=y CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=4 Loading
drivers/soc/qcom/Kconfig +8 −0 Original line number Diff line number Diff line Loading @@ -541,4 +541,12 @@ config ICNSS control messages to FW over QMI channel. It is also responsible for 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. endif # ARCH_MSM
drivers/soc/qcom/Makefile +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ obj-$(CONFIG_MSM_TZ_SMMU) += msm_tz_smmu.o obj-$(CONFIG_MSM_PIL) += peripheral-loader.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_CORE_CTL_HELPER) += core_ctl_helper.o ifdef CONFIG_MSM_SUBSYSTEM_RESTART obj-y += subsystem_notif.o obj-y += subsystem_restart.o Loading
drivers/soc/qcom/core_ctl_helper.c 0 → 100644 +62 −0 Original line number Diff line number Diff line /* * Copyright (c) 2014, 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) { return cpu_up(cpu); } EXPORT_SYMBOL(core_ctl_online_core);