diff options
author | Jon Medhurst <tixy@linaro.org> | 2016-06-02 12:48:25 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2016-06-02 12:48:25 +0100 |
commit | 9390ec67652f5673ae521e45981488d37c4b29c3 (patch) | |
tree | 1587901f09f3c8c65017a42b624a7c4f2261973d /arch/arm64/kernel/topology.c | |
parent | 66ec670fc8bb6bfadfdd3a32abde60d8b14df4c4 (diff) |
Revert "Merge branch 'lsk-3.18-armlt-eas' into lsk-3.18-armlt"
This reverts commit 9bcb72eae20e554f8cd1ee756710a976422c9d74, reversing
changes made to e941cb4956b97f75f617e41fe338104e514e432c.
Diffstat (limited to 'arch/arm64/kernel/topology.c')
-rw-r--r-- | arch/arm64/kernel/topology.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 2f98601318c3..b6ee26b0939a 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -19,30 +19,10 @@ #include <linux/nodemask.h> #include <linux/of.h> #include <linux/sched.h> -#include <linux/sched.h> -#include <linux/sched_energy.h> #include <asm/cputype.h> #include <asm/topology.h> -static DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE; - -unsigned long scale_cpu_capacity(struct sched_domain *sd, int cpu) -{ -#ifdef CONFIG_CPU_FREQ - unsigned long max_freq_scale = cpufreq_scale_max_freq_capacity(cpu); - - return per_cpu(cpu_scale, cpu) * max_freq_scale >> SCHED_CAPACITY_SHIFT; -#else - return per_cpu(cpu_scale, cpu); -#endif -} - -static void set_capacity_scale(unsigned int cpu, unsigned long capacity) -{ - per_cpu(cpu_scale, cpu) = capacity; -} - static int __init get_cpu_for_node(struct device_node *node) { struct device_node *cpu_node; @@ -226,67 +206,11 @@ out: struct cpu_topology cpu_topology[NR_CPUS]; EXPORT_SYMBOL_GPL(cpu_topology); -/* sd energy functions */ -static inline -const struct sched_group_energy * const cpu_cluster_energy(int cpu) -{ - struct sched_group_energy *sge = sge_array[cpu][SD_LEVEL1]; - - if (!sge) { - pr_warn("Invalid sched_group_energy for Cluster%d\n", cpu); - return NULL; - } - - return sge; -} - -static inline -const struct sched_group_energy * const cpu_core_energy(int cpu) -{ - struct sched_group_energy *sge = sge_array[cpu][SD_LEVEL0]; - - if (!sge) { - pr_warn("Invalid sched_group_energy for CPU%d\n", cpu); - return NULL; - } - - return sge; -} - const struct cpumask *cpu_coregroup_mask(int cpu) { return &cpu_topology[cpu].core_sibling; } -static inline int cpu_corepower_flags(void) -{ - return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN | \ - SD_SHARE_CAP_STATES; -} - -static struct sched_domain_topology_level arm64_topology[] = { -#ifdef CONFIG_SCHED_MC - { cpu_coregroup_mask, cpu_corepower_flags, cpu_core_energy, SD_INIT_NAME(MC) }, -#endif - { cpu_cpu_mask, NULL, cpu_cluster_energy, SD_INIT_NAME(DIE) }, - { NULL, }, -}; - -static void update_cpu_capacity(unsigned int cpu) -{ - unsigned long capacity = SCHED_CAPACITY_SCALE; - - if (cpu_core_energy(cpu)) { - int max_cap_idx = cpu_core_energy(cpu)->nr_cap_states - 1; - capacity = cpu_core_energy(cpu)->cap_states[max_cap_idx].cap; - } - - set_capacity_scale(cpu, capacity); - - pr_info("CPU%d: update cpu_capacity %lu\n", - cpu, arch_scale_cpu_capacity(NULL, cpu)); -} - static void update_siblings_masks(unsigned int cpuid) { struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; @@ -345,7 +269,6 @@ void store_cpu_topology(unsigned int cpuid) topology_populated: update_siblings_masks(cpuid); - update_cpu_capacity(cpuid); } static void __init reset_cpu_topology(void) @@ -376,8 +299,4 @@ void __init init_cpu_topology(void) */ if (parse_dt_topology()) reset_cpu_topology(); - else - set_sched_topology(arm64_topology); - - init_sched_energy_costs(); } |