mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
cpuidle: Make latency notifier no-op
Change-Id: I5c949e220828cf87c5d6945c70263771f5f3a8f7 Signed-off-by: Alexander Winkowski <dereference23@outlook.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
18c2247b1a
commit
56d86cd07c
@ -37,24 +37,6 @@ static int enabled_devices;
|
||||
static int off __read_mostly;
|
||||
static int initialized __read_mostly;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static atomic_t idled = ATOMIC_INIT(0);
|
||||
|
||||
#if NR_CPUS > 32
|
||||
#error idled CPU mask not big enough for NR_CPUS
|
||||
#endif
|
||||
|
||||
void cpuidle_set_idle_cpu(unsigned int cpu)
|
||||
{
|
||||
atomic_or(BIT(cpu), &idled);
|
||||
}
|
||||
|
||||
void cpuidle_clear_idle_cpu(unsigned int cpu)
|
||||
{
|
||||
atomic_andnot(BIT(cpu), &idled);
|
||||
}
|
||||
#endif
|
||||
|
||||
int cpuidle_disabled(void)
|
||||
{
|
||||
return off;
|
||||
@ -668,13 +650,6 @@ EXPORT_SYMBOL_GPL(cpuidle_register);
|
||||
static int cpuidle_latency_notify(struct notifier_block *b,
|
||||
unsigned long l, void *v)
|
||||
{
|
||||
unsigned long cpus = atomic_read(&idled) & *cpumask_bits(to_cpumask(v));
|
||||
|
||||
/* Use READ_ONCE to get the isolated mask outside cpu_add_remove_lock */
|
||||
cpus &= ~READ_ONCE(*cpumask_bits(cpu_isolated_mask));
|
||||
if (cpus)
|
||||
arch_send_wakeup_ipi_mask(to_cpumask(&cpus));
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
|
@ -499,10 +499,7 @@ static int lpm_cpuidle_select(struct cpuidle_driver *drv,
|
||||
static int lpm_cpuidle_enter(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv, int idx)
|
||||
{
|
||||
cpuidle_set_idle_cpu(dev->cpu);
|
||||
wfi();
|
||||
cpuidle_clear_idle_cpu(dev->cpu);
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
@ -277,12 +277,4 @@ static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
|
||||
__ret ? -1 : idx; \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void cpuidle_set_idle_cpu(unsigned int cpu);
|
||||
void cpuidle_clear_idle_cpu(unsigned int cpu);
|
||||
#else
|
||||
static inline void cpuidle_set_idle_cpu(unsigned int cpu) { }
|
||||
static inline void cpuidle_clear_idle_cpu(unsigned int cpu) { }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_CPUIDLE_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user