mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "arm64: defconfig: enable CONFIG_PRINT_SUSPEND_EPOCH_QGKI"
This commit is contained in:
commit
be3525da72
3 changed files with 28 additions and 0 deletions
|
|
@ -253,3 +253,4 @@ CONFIG_QTI_HW_MEMLAT_SCMI_CLIENT=y
|
|||
CONFIG_QTI_HW_MEMLAT_LOG=y
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_PRINT_SUSPEND_EPOCH_QGKI=y
|
||||
|
|
|
|||
|
|
@ -52,6 +52,16 @@ config GENERIC_CLOCKEVENTS_MIN_ADJUST
|
|||
config GENERIC_CMOS_UPDATE
|
||||
bool
|
||||
|
||||
config PRINT_SUSPEND_EPOCH_QGKI
|
||||
bool "Print epoch values in suspend resume cycles"
|
||||
depends on QGKI
|
||||
help
|
||||
Print epoch values when device enter and exit out of suspend
|
||||
and resume. These epoch values are useful to know how long
|
||||
the device is in suspend state. These values can be used to
|
||||
synchronize various subsystem timestamps and have an unique
|
||||
timestamp to correlate between various subsystems.
|
||||
|
||||
if GENERIC_CLOCKEVENTS
|
||||
menu "Timers subsystem"
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,12 @@ struct clock_data {
|
|||
static struct hrtimer sched_clock_timer;
|
||||
static int irqtime = -1;
|
||||
|
||||
#ifdef CONFIG_PRINT_SUSPEND_EPOCH_QGKI
|
||||
static u64 suspend_ns;
|
||||
static u64 suspend_cycles;
|
||||
static u64 resume_cycles;
|
||||
#endif
|
||||
|
||||
core_param(irqtime, irqtime, int, 0400);
|
||||
|
||||
static u64 notrace jiffy_sched_clock_read(void)
|
||||
|
|
@ -280,6 +286,13 @@ int sched_clock_suspend(void)
|
|||
struct clock_read_data *rd = &cd.read_data[0];
|
||||
|
||||
update_sched_clock();
|
||||
|
||||
#ifdef CONFIG_PRINT_SUSPEND_EPOCH_QGKI
|
||||
suspend_ns = rd->epoch_ns;
|
||||
suspend_cycles = rd->epoch_cyc;
|
||||
pr_info("suspend ns:%17llu suspend cycles:%17llu\n",
|
||||
rd->epoch_ns, rd->epoch_cyc);
|
||||
#endif
|
||||
hrtimer_cancel(&sched_clock_timer);
|
||||
rd->read_sched_clock = suspended_sched_clock_read;
|
||||
|
||||
|
|
@ -292,6 +305,10 @@ void sched_clock_resume(void)
|
|||
|
||||
rd->epoch_cyc = cd.actual_read_sched_clock();
|
||||
hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL_HARD);
|
||||
#ifdef CONFIG_PRINT_SUSPEND_EPOCH_QGKI
|
||||
resume_cycles = rd->epoch_cyc;
|
||||
pr_info("resume cycles:%17llu\n", rd->epoch_cyc);
|
||||
#endif
|
||||
rd->read_sched_clock = cd.actual_read_sched_clock;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue