mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
sched/fair: fix building without CGROUP_SCHEDTUNE
Fixes: e00ebdcb8a ("sched/tune: don't use schedtune before it is ready")
Change-Id: I86312b6d271365cfb94e6ca570771a6bca46e67b
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
This commit is contained in:
parent
793e6e3001
commit
0dc92faf3e
|
|
@ -5597,7 +5597,9 @@ static inline int __energy_diff(struct energy_env *eenv)
|
|||
#ifdef CONFIG_SCHED_TUNE
|
||||
|
||||
struct target_nrg schedtune_target_nrg;
|
||||
#ifdef CONFIG_CGROUP_SCHEDTUNE
|
||||
extern bool schedtune_initialized;
|
||||
#endif
|
||||
/*
|
||||
* System energy normalization
|
||||
* Returns the normalized value, in the range [0..SCHED_CAPACITY_SCALE],
|
||||
|
|
@ -5608,9 +5610,11 @@ normalize_energy(int energy_diff)
|
|||
{
|
||||
u32 normalized_nrg;
|
||||
|
||||
#ifdef CONFIG_CGROUP_SCHEDTUNE
|
||||
/* during early setup, we don't know the extents */
|
||||
if (unlikely(!schedtune_initialized))
|
||||
return energy_diff < 0 ? -1 : 1 ;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCHED_DEBUG
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user