#include <asm/cputype.h>
#include <asm/topology.h>
-/* sd energy functions */
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;
+ return sge_array[cpu][SD_LEVEL0];
}
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;
+ return sge_array[cpu][SD_LEVEL1];
}
/*
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;
+ return sge_array[cpu][SD_LEVEL0];
}
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;
+ return sge_array[cpu][SD_LEVEL1];
}
static inline
const struct sched_group_energy * const cpu_system_energy(int cpu)
{
- struct sched_group_energy *sge = sge_array[cpu][SD_LEVEL2];
-
- if (!sge) {
- pr_warn("Invalid sched_group_energy for System%d\n", cpu);
- return NULL;
- }
-
- return sge;
+ return sge_array[cpu][SD_LEVEL2];
}
static struct sched_domain_topology_level arm64_topology[] = {