diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-07-15 16:08:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-07-15 16:46:47 -0400 |
commit | 431ceb83f703a343bdd14350480a2224fa4bfedf (patch) | |
tree | 2f4644aec0d326e23327ed2297a4a4f52b1d830e /arch/x86/kernel | |
parent | b9d2252c1e44fa83a4e65fdc9eb93db6297c55af (diff) |
x86: fix TSC build error on 32bit
Dave Hansen reported a build error on 32bit which went unnoticed
as newer gcc versions seem to optimize unused static functions
away before compiling them.
Make vread_tsc() depend on CONFIG_X86_64
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/tsc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 3c36f92160c9..7603c0553909 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -358,6 +358,7 @@ static cycle_t read_tsc(void) | |||
358 | ret : clocksource_tsc.cycle_last; | 358 | ret : clocksource_tsc.cycle_last; |
359 | } | 359 | } |
360 | 360 | ||
361 | #ifdef CONFIG_X86_64 | ||
361 | static cycle_t __vsyscall_fn vread_tsc(void) | 362 | static cycle_t __vsyscall_fn vread_tsc(void) |
362 | { | 363 | { |
363 | cycle_t ret = (cycle_t)vget_cycles(); | 364 | cycle_t ret = (cycle_t)vget_cycles(); |
@@ -365,6 +366,7 @@ static cycle_t __vsyscall_fn vread_tsc(void) | |||
365 | return ret >= __vsyscall_gtod_data.clock.cycle_last ? | 366 | return ret >= __vsyscall_gtod_data.clock.cycle_last ? |
366 | ret : __vsyscall_gtod_data.clock.cycle_last; | 367 | ret : __vsyscall_gtod_data.clock.cycle_last; |
367 | } | 368 | } |
369 | #endif | ||
368 | 370 | ||
369 | static struct clocksource clocksource_tsc = { | 371 | static struct clocksource clocksource_tsc = { |
370 | .name = "tsc", | 372 | .name = "tsc", |