linux/arch/arm/kernel
Colin Cross 237ec6f2e5 ARM: 7486/1: sched_clock: update epoch_cyc on resume
Many clocks that are used to provide sched_clock will reset during
suspend.  If read_sched_clock returns 0 after suspend, sched_clock will
appear to jump forward.  This patch resets cd.epoch_cyc to the current
value of read_sched_clock during resume, which causes sched_clock() just
after suspend to return the same value as sched_clock() just before
suspend.

In addition, during the window where epoch_ns has been updated before
suspend, but epoch_cyc has not been updated after suspend, it is unknown
whether the clock has reset or not, and sched_clock() could return a
bogus value.  Add a suspended flag, and return the pre-suspend epoch_ns
value during this period.

The new behavior is triggered by calling setup_sched_clock_needs_suspend
instead of setup_sched_clock.

Signed-off-by: Colin Cross <ccross@android.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-11 09:15:58 +01:00
..
.gitignore
arch_timer.c
armksyms.c
arthur.c
asm-offsets.c
atags.c
atags.h
bios32.c
calls.S
compat.c
compat.h
cpuidle.c
crash_dump.c
debug.S
devtree.c
dma-isa.c
dma.c
early_printk.c
elf.c
entry-armv.S
entry-common.S
entry-header.S
etm.c
fiq.c
fiqasm.S
ftrace.c
head-common.S
head-nommu.S
head.S
hw_breakpoint.c
insn.c
insn.h
io.c
irq.c
isa.c
iwmmxt.S
jump_label.c
kgdb.c
kprobes-arm.c
kprobes-common.c
kprobes-test-arm.c
kprobes-test-thumb.c
kprobes-test.c
kprobes-test.h
kprobes-thumb.c
kprobes.c
kprobes.h
leds.c
machine_kexec.c
Makefile
module.c
opcodes.c
patch.c
patch.h
perf_event_v6.c
perf_event_v7.c
perf_event_xscale.c
perf_event.c
pj4-cp0.c
pmu.c
process.c
ptrace.c
relocate_kernel.S
return_address.c
sched_clock.c
setup.c
signal.c
signal.h
sleep.S
smp_scu.c
smp_tlb.c
smp_twd.c
smp.c
stacktrace.c
suspend.c
swp_emulate.c
sys_arm.c
sys_oabi-compat.c
tcm.c
tcm.h
thumbee.c
time.c
topology.c
traps.c
unwind.c
vmlinux.lds.S
xscale-cp0.c