Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cae5e996 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Alistair Delva
Browse files

Revert "ANDROID: sched/fair: add arch scaling function for max frequency capping"



This reverts commit ff481da6.

We want to back-out the eas-dev merge that happened in the tree after
5.3-rc1 as those patches "should" all be in Linus's tree now.

This is done to handle the merge conflicts with 5.4-rc1.

Cc: Todd Kjos <tkjos@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I0152003c46113569f4e92823254d2f4af8a30a6f
parent 625ebc8a
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -7759,9 +7759,10 @@ static inline void init_sd_lb_stats(struct sd_lb_stats *sds)
	};
}

static unsigned long scale_rt_capacity(int cpu, unsigned long max)
static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu)
{
	struct rq *rq = cpu_rq(cpu);
	unsigned long max = arch_scale_cpu_capacity(cpu);
	unsigned long used, free;
	unsigned long irq;

@@ -7783,15 +7784,10 @@ static unsigned long scale_rt_capacity(int cpu, unsigned long max)

static void update_cpu_capacity(struct sched_domain *sd, int cpu)
{
	unsigned long capacity = arch_scale_cpu_capacity(cpu);
	unsigned long capacity = scale_rt_capacity(sd, cpu);
	struct sched_group *sdg = sd->groups;

	cpu_rq(cpu)->cpu_capacity_orig = capacity;

	capacity *= arch_scale_max_freq_capacity(sd, cpu);
	capacity >>= SCHED_CAPACITY_SHIFT;

	capacity = scale_rt_capacity(cpu, capacity);
	cpu_rq(cpu)->cpu_capacity_orig = arch_scale_cpu_capacity(cpu);

	if (!capacity)
		capacity = 1;
+0 −9
Original line number Diff line number Diff line
@@ -1942,15 +1942,6 @@ unsigned long arch_scale_freq_capacity(int cpu)
}
#endif

#ifndef arch_scale_max_freq_capacity
struct sched_domain;
static __always_inline
unsigned long arch_scale_max_freq_capacity(struct sched_domain *sd, int cpu)
{
	return SCHED_CAPACITY_SCALE;
}
#endif

#ifdef CONFIG_SMP
#ifdef CONFIG_PREEMPT