aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-19 11:38:25 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-19 11:38:25 -0700
commitf15f41383d466860f8b22f669da8c841f8d73c3b (patch)
tree527f4d443832deb11e592d6a7f33edd4b726b1ac /include
parentdbe3ed1c078c193be34326728d494c5c4bc115e2 (diff)
parentc27da339698145a9383e052c1070a950d30da478 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix timekeeping on PowerPC 601 [POWERPC] Don't expose clock vDSO functions when CPU has no timebase [POWERPC] spusched: Fix null pointer dereference in find_victim
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/time.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index d7f5ddfbaac..c104c15c662 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -149,6 +149,11 @@ static inline u64 get_tb(void)
}
#endif /* !CONFIG_PPC64 */
+static inline u64 get_tb_or_rtc(void)
+{
+ return __USE_RTC() ? get_rtc() : get_tb();
+}
+
static inline void set_tb(unsigned int upper, unsigned int lower)
{
mtspr(SPRN_TBWL, 0);