Skip to content

Commit

Permalink
x86/tsc: Make CONFIG_X86_TSC=n build work again
Browse files Browse the repository at this point in the history
tsc_async_resets is only available when CONFIG_X86_TSC=y. So a build with
CONFIG_X86_TSC=n breaks:

arch/x86/kernel/tsc.o: In function `tsc_init':
(.init.text+0x87b): undefined reference to `tsc_async_resets'

Add a stub define for the TSC=n case.

Side note: This config switch should simply be removed.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 341102c ("x86/tsc: Add option that TSC on Socket 0 being non-zero is valid")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Travis <mike.travis@hpe.com>
  • Loading branch information
Thomas Gleixner committed Oct 17, 2017
1 parent 97d2100 commit c0fc9b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/include/asm/tsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ extern unsigned long native_calibrate_tsc(void);
extern unsigned long long native_sched_clock_from_tsc(u64 tsc);

extern int tsc_clocksource_reliable;
#ifdef CONFIG_X86_TSC
extern bool tsc_async_resets;
#else
# define tsc_async_resets false
#endif

/*
* Boot-time check whether the TSCs are synchronized across
Expand Down

0 comments on commit c0fc9b1

Please sign in to comment.