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

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

Merge "timers, sched/clock: Hook into s2idle freeze path"

parents 1e05a0a0 ea99d5c0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ extern void generic_sched_clock_init(void);

extern void sched_clock_register(u64 (*read)(void), int bits,
				 unsigned long rate);
extern int sched_clock_suspend(void);
extern void sched_clock_resume(void);
#else
static inline void generic_sched_clock_init(void) { }

@@ -20,6 +22,8 @@ static inline void sched_clock_register(u64 (*read)(void), int bits,
					unsigned long rate)
{
}
static inline int sched_clock_suspend(void) { return 0; }
static inline void sched_clock_resume(void) { }
#endif

#endif
+2 −2
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ static u64 notrace suspended_sched_clock_read(void)
	return cd.read_data[seq & 1].epoch_cyc;
}

static int sched_clock_suspend(void)
int sched_clock_suspend(void)
{
	struct clock_read_data *rd = &cd.read_data[0];

@@ -294,7 +294,7 @@ static int sched_clock_suspend(void)
	return 0;
}

static void sched_clock_resume(void)
void sched_clock_resume(void)
{
	struct clock_read_data *rd = &cd.read_data[0];

+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/sched_clock.h>
#include <linux/module.h>
#include <trace/events/power.h>

@@ -491,6 +492,7 @@ void tick_freeze(void)
		trace_suspend_resume(TPS("timekeeping_freeze"),
				     smp_processor_id(), true);
		system_state = SYSTEM_SUSPEND;
		sched_clock_suspend();
		timekeeping_suspend();
	} else {
		tick_suspend_local();
@@ -515,6 +517,7 @@ void tick_unfreeze(void)
	if (tick_freeze_depth == num_online_cpus()) {
		timekeeping_resume();
		system_state = SYSTEM_RUNNING;
		sched_clock_resume();
		trace_suspend_resume(TPS("timekeeping_freeze"),
				     smp_processor_id(), false);
	} else {