mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Keep the cpu_scale calculation in the arch_topology driver the way it is done in mainline. This will require appropriate capacity-dmips-mhz properties in the dt file. Do the energy model setup completely separate in kernel/sched/energy.c. This will allow to adapt the non-mainline energy model code more easily. Change-Id: I51af46e0f588e82512417fd168e25cec90dc9319 Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Git-commit: 70b670cc0c97ff350f260b827ca2e18799a57972 Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Puja Gupta <pujag@codeaurora.org>
41 lines
983 B
C
41 lines
983 B
C
#ifndef _LINUX_SCHED_ENERGY_H
|
|
#define _LINUX_SCHED_ENERGY_H
|
|
|
|
#include <linux/sched.h>
|
|
#include <linux/slab.h>
|
|
|
|
/*
|
|
* There doesn't seem to be an NR_CPUS style max number of sched domain
|
|
* levels so here's an arbitrary constant one for the moment.
|
|
*
|
|
* The levels alluded to here correspond to entries in struct
|
|
* sched_domain_topology_level that are meant to be populated by arch
|
|
* specific code (topology.c).
|
|
*/
|
|
#define NR_SD_LEVELS 8
|
|
|
|
#define SD_LEVEL0 0
|
|
#define SD_LEVEL1 1
|
|
#define SD_LEVEL2 2
|
|
#define SD_LEVEL3 3
|
|
#define SD_LEVEL4 4
|
|
#define SD_LEVEL5 5
|
|
#define SD_LEVEL6 6
|
|
#define SD_LEVEL7 7
|
|
|
|
/*
|
|
* Convenience macro for iterating through said sd levels.
|
|
*/
|
|
#define for_each_possible_sd_level(level) \
|
|
for (level = 0; level < NR_SD_LEVELS; level++)
|
|
|
|
extern struct sched_group_energy *sge_array[NR_CPUS][NR_SD_LEVELS];
|
|
|
|
#ifdef CONFIG_GENERIC_ARCH_TOPOLOGY
|
|
void init_sched_energy_costs(void);
|
|
#else
|
|
void init_sched_energy_costs(void) {}
|
|
#endif
|
|
|
|
#endif
|