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

Commit 0fe0de10 authored by Ivaylo Georgiev's avatar Ivaylo Georgiev
Browse files

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



This reverts commit ea99d5c0.

This is a preparation change for merging android-4.19.37 into
msm-4.19 branch.

Functions sched_clock_suspend and sched_clock_resume are defined twice in
different header files by [1] and [2] ([1] is part of upmerge[3]).
When file includes those two header files, a redefinition error occurs.
To prevent this [2] is reverted.

[1] cd37fd46("timers/sched_clock: Prevent generic sched_clock wrap caused
by tick_freeze()")
[2] ea99d5c0("timers, sched/clock: Hook into s2idle freeze path")
[3] Merge android-4.19.37 (9bf59048) into msm-4.19.

Change-Id: I667a23598fd2a3bd2abcddd7286011b5ebc47559
Signed-off-by: default avatarIvaylo Georgiev <irgeorgiev@codeaurora.org>
parent e0379e25
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -13,8 +13,6 @@ extern void generic_sched_clock_init(void);


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


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


#endif
#endif
+2 −2
Original line number Original line 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;
	return cd.read_data[seq & 1].epoch_cyc;
}
}


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


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


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


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


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