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

Commit 61ff0b3a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "lpm_levels_legacy: Rectified compilation errors"

parents 85d22ebd 98e3a5d2
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ enum debug_event {
};

struct lpm_debug {
	cycle_t time;
	u64 time;
	enum debug_event evt;
	int cpu;
	uint32_t arg1;
@@ -409,7 +409,8 @@ static int cpu_power_select(struct cpuidle_device *dev,
	int best_level = 0;
	uint32_t latency_us = pm_qos_request_for_cpu(PM_QOS_CPU_DMA_LATENCY,
							dev->cpu);
	s64 sleep_us = ktime_to_us(tick_nohz_get_sleep_length());
	ktime_t delta_next;
	s64 sleep_us = ktime_to_us(tick_nohz_get_sleep_length(&delta_next));
	uint32_t modified_time_us = 0;
	uint32_t next_event_us = 0;
	int i;
@@ -479,7 +480,7 @@ static uint64_t get_cluster_sleep_time(struct lpm_cluster *cluster,
	ktime_t next_event;
	struct cpumask online_cpus_in_cluster;

	next_event.tv64 = KTIME_MAX;
	next_event = KTIME_MAX;
	if (!from_idle) {
		if (mask)
			cpumask_copy(mask, cpumask_of(raw_smp_processor_id()));
@@ -493,8 +494,8 @@ static uint64_t get_cluster_sleep_time(struct lpm_cluster *cluster,
		ktime_t *next_event_c;

		next_event_c = get_next_event_cpu(cpu);
		if (next_event_c->tv64 < next_event.tv64) {
			next_event.tv64 = next_event_c->tv64;
		if (*next_event_c < next_event) {
			next_event = *next_event_c;
			next_cpu = cpu;
		}
	}
@@ -594,13 +595,13 @@ static unsigned int get_next_online_cpu(bool from_idle)

	if (!from_idle)
		return next_cpu;
	next_event.tv64 = KTIME_MAX;
	next_event = KTIME_MAX;
	for_each_online_cpu(cpu) {
		ktime_t *next_event_c;

		next_event_c = get_next_event_cpu(cpu);
		if (next_event_c->tv64 < next_event.tv64) {
			next_event.tv64 = next_event_c->tv64;
		if (*next_event_c < next_event) {
			next_event = *next_event_c;
			next_cpu = cpu;
		}
	}
@@ -987,7 +988,7 @@ static bool psci_enter_sleep(struct lpm_cluster *cluster,
#endif

static int lpm_cpuidle_select(struct cpuidle_driver *drv,
		struct cpuidle_device *dev)
		struct cpuidle_device *dev, bool *stop_tick)
{
	struct lpm_cluster *cluster = per_cpu(cpu_cluster, dev->cpu);
	int idx;
@@ -1096,7 +1097,6 @@ static struct cpuidle_governor lpm_governor = {
	.name =		"qcom",
	.rating =	30,
	.select =	lpm_cpuidle_select,
	.owner =	THIS_MODULE,
};

static int cluster_cpuidle_register(struct lpm_cluster *cl)
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018, 2020 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -20,7 +20,7 @@ struct system_pm_ops {
	bool (*sleep_allowed)(void);
};

#ifdef CONFIG_MSM_PM
#if defined(CONFIG_MSM_PM) || defined(CONFIG_MSM_PM_LEGACY)
uint32_t register_system_pm_ops(struct system_pm_ops *pm_ops);
#else
static inline uint32_t register_system_pm_ops(struct system_pm_ops *pm_ops)