File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ static void __init check_config(void)
154154 * If we configured ourselves for a TSC, we'd better have one!
155155 */
156156#ifdef CONFIG_X86_TSC
157- if (!cpu_has_tsc && ! tsc_disable )
157+ if (!cpu_has_tsc )
158158 panic ("Kernel compiled for Pentium+, requires TSC feature!" );
159159#endif
160160
Original file line number Diff line number Diff line change @@ -446,10 +446,6 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
446446 * we do "generic changes."
447447 */
448448
449- /* TSC disabled? */
450- if ( tsc_disable )
451- clear_bit (X86_FEATURE_TSC , c -> x86_capability );
452-
453449 /* If the model name is still unset, do table lookup. */
454450 if ( !c -> x86_model_id [0 ] ) {
455451 char * p ;
@@ -650,11 +646,6 @@ void __cpuinit cpu_init(void)
650646
651647 if (cpu_has_vme || cpu_has_tsc || cpu_has_de )
652648 clear_in_cr4 (X86_CR4_VME |X86_CR4_PVI |X86_CR4_TSD |X86_CR4_DE );
653- if (tsc_disable && cpu_has_tsc ) {
654- printk (KERN_NOTICE "Disabling TSC...\n" );
655- /**** FIX-HPA: DOES THIS REALLY BELONG HERE? ****/
656- clear_bit (X86_FEATURE_TSC , boot_cpu_data .x86_capability );
657- }
658649
659650 load_idt (& idt_descr );
660651 switch_to_new_gdt ();
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ static int __init numaq_tsc_disable(void)
8282{
8383 if (num_online_nodes () > 1 ) {
8484 printk (KERN_DEBUG "NUMAQ: disabling TSC\n" );
85- tsc_disable = 1 ;
85+ setup_clear_cpu_cap ( X86_FEATURE_TSC ) ;
8686 }
8787 return 0 ;
8888}
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ static int tsc_enabled;
2424unsigned int tsc_khz ;
2525EXPORT_SYMBOL_GPL (tsc_khz );
2626
27- int tsc_disable ;
28-
2927#ifdef CONFIG_X86_TSC
3028static int __init tsc_setup (char * str )
3129{
@@ -40,8 +38,7 @@ static int __init tsc_setup(char *str)
4038 */
4139static int __init tsc_setup (char * str )
4240{
43- tsc_disable = 1 ;
44-
41+ setup_clear_cpu_cap (X86_FEATURE_TSC );
4542 return 1 ;
4643}
4744#endif
@@ -395,7 +392,7 @@ void __init tsc_init(void)
395392{
396393 int cpu ;
397394
398- if (!cpu_has_tsc || tsc_disable )
395+ if (!cpu_has_tsc )
399396 goto out_no_tsc ;
400397
401398 cpu_khz = calculate_cpu_khz ();
@@ -439,10 +436,5 @@ void __init tsc_init(void)
439436 return ;
440437
441438out_no_tsc :
442- /*
443- * Set the tsc_disable flag if there's no TSC support, this
444- * makes it a fast flag for the kernel to see whether it
445- * should be using the TSC.
446- */
447- tsc_disable = 1 ;
439+ setup_clear_cpu_cap (X86_FEATURE_TSC );
448440}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ void __init pre_setup_arch_hook(void)
3737{
3838 /* Voyagers run their CPUs from independent clocks, so disable
3939 * the TSC code because we can't sync them */
40- tsc_disable = 1 ;
40+ setup_clear_cpu_cap ( X86_FEATURE_TSC ) ;
4141}
4242
4343void __init trap_init_hook (void )
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ __init void xen_time_init(void)
592592 set_normalized_timespec (& wall_to_monotonic ,
593593 - xtime .tv_sec , - xtime .tv_nsec );
594594
595- tsc_disable = 0 ;
595+ setup_force_cpu_cap ( X86_FEATURE_TSC ) ;
596596
597597 xen_setup_timer (cpu );
598598 xen_setup_cpu_clockevents ();
Original file line number Diff line number Diff line change 135135 clear_cpu_cap(&boot_cpu_data, bit); \
136136 set_bit(bit, cleared_cpu_caps); \
137137} while (0)
138+ #define setup_force_cpu_cap (bit ) do { \
139+ set_cpu_cap(&boot_cpu_data, bit); \
140+ clear_bit(bit, cleared_cpu_caps); \
141+ } while (0)
138142
139143#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
140144#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME)
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ typedef unsigned long long cycles_t;
1616
1717extern unsigned int cpu_khz ;
1818extern unsigned int tsc_khz ;
19- /* flag for disabling the tsc */
20- extern int tsc_disable ;
2119
2220extern void disable_TSC (void );
2321
You can’t perform that action at this time.
0 commit comments