]> bbs.cooldavid.org Git - net-next-2.6.git/commit
CRIS: GENERIC_TIME fixes
authorJesper Nilsson <jesper.nilsson@axis.com>
Fri, 30 Jul 2010 15:33:07 +0000 (17:33 +0200)
committerJesper Nilsson <jesper.nilsson@axis.com>
Wed, 4 Aug 2010 10:58:55 +0000 (12:58 +0200)
commit60dbd6633178a8625ed71329da0167c6d50c559c
treebcbc1004dfe356ce7cf30f183725dbbc9dad3e4f
parent26bfeea38a4a5daf52c8f01c986ca8680bf1f6a1
CRIS: GENERIC_TIME fixes

GENERIC_TIME was not functional for CRIS, giving random backward
time jumps.

For CRISv32 implement a new clocksource using the free running counter
and ditch the arch_gettimeoffset.

The random time jumps still existed, but turned out to be the write_seqlock
which was missing around our do_timer() call.

So switch over to GENERIC_TIME using the clocksource for CRISv32.

CRISv10 doesn't have the free running counter needed for the
clocksource trick, but we can still use GENERIC_TIME with
arch_gettimeoffset.

Unfortunately, there were problems in using the prescaler register
to timer0 for the gettimeoffset calculation, so it is now ignored,
making our resolution worse by the tune of 40usec (0.4%) worst case.

At the same time, clean up some formatting and use NSEC_PER_SEC
instead of 1000000000.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
arch/cris/Kconfig
arch/cris/arch-v10/kernel/time.c
arch/cris/arch-v32/kernel/time.c
arch/cris/kernel/time.c