linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "x86/tsc: Consolidate init code"
@ 2018-09-10 12:19 Ville Syrjala
  2018-09-10 12:48 ` Thomas Gleixner
  0 siblings, 1 reply; 16+ messages in thread
From: Ville Syrjala @ 2018-09-10 12:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dou Liyang, Thomas Gleixner, Pavel Tatashin, hpa, Peter Zijlstra,
	Ville Syrjälä

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

This reverts commit 608008a45798fe9e2aee04f99b5270ea57c1376f.

It breaks wifi on my pentium 3 Fujitsu-Siemens Lifebook S6010
laptop. Scanning for APs doesn't seem to work most of the time,
and, even when it manages to find some APs it never manages to
authenticate successfully. dmesg is just littered with:
"wlan0: send auth to ... (try 1/3)
 wlan0: send auth to ... (try 2/3)
 wlan0: send auth to ... (try 3/3)
 wlan0: authentication with ... timed out"

Presumably also USB is broken on account of the following noise
in dmesg:
"usb usb2-port2: Cannot enable. Maybe the USB cable is bad?".

Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 arch/x86/kernel/tsc.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 6490f618e096..203edfabe813 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -182,7 +182,7 @@ static void __init cyc2ns_init_boot_cpu(void)
 }
 
 /*
- * Secondary CPUs do not run through tsc_init(), so set up
+ * Secondary CPUs do not run through cyc2ns_init(), so set up
  * all the scale factors for all CPUs, assuming the same
  * speed as the bootup CPU. (cpufreq notifiers will fix this
  * up if their speed diverges)
@@ -1389,7 +1389,7 @@ static bool __init determine_cpu_tsc_frequencies(bool early)
 	}
 
 	/*
-	 * Trust non-zero tsc_khz as authoritative,
+	 * Trust non-zero tsc_khz as authorative,
 	 * and use it to sanity check cpu_khz,
 	 * which will be off if system timer is off.
 	 */
@@ -1421,14 +1421,6 @@ static unsigned long __init get_loops_per_jiffy(void)
 	return lpj;
 }
 
-static void __init tsc_enable_sched_clock(void)
-{
-	/* Sanitize TSC ADJUST before cyc2ns gets initialized */
-	tsc_store_and_check_tsc_adjust(true);
-	cyc2ns_init_boot_cpu();
-	static_branch_enable(&__use_tsc);
-}
-
 void __init tsc_early_init(void)
 {
 	if (!boot_cpu_has(X86_FEATURE_TSC))
@@ -1437,7 +1429,10 @@ void __init tsc_early_init(void)
 		return;
 	loops_per_jiffy = get_loops_per_jiffy();
 
-	tsc_enable_sched_clock();
+	/* Sanitize TSC ADJUST before cyc2ns gets initialized */
+	tsc_store_and_check_tsc_adjust(true);
+	cyc2ns_init_boot_cpu();
+	static_branch_enable(&__use_tsc);
 }
 
 void __init tsc_init(void)
@@ -1461,10 +1456,13 @@ void __init tsc_init(void)
 			setup_clear_cpu_cap(X86_FEATURE_TSC_DEADLINE_TIMER);
 			return;
 		}
-		tsc_enable_sched_clock();
+		/* Sanitize TSC ADJUST before cyc2ns gets initialized */
+		tsc_store_and_check_tsc_adjust(true);
+		cyc2ns_init_boot_cpu();
 	}
 
 	cyc2ns_init_secondary_cpus();
+	static_branch_enable(&__use_tsc);
 
 	if (!no_sched_irq_time)
 		enable_sched_clock_irqtime();
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-09-11 20:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 12:19 [PATCH] Revert "x86/tsc: Consolidate init code" Ville Syrjala
2018-09-10 12:48 ` Thomas Gleixner
2018-09-10 13:19   ` Pasha Tatashin
2018-09-10 14:07   ` Ville Syrjälä
2018-09-10 14:47     ` Borislav Petkov
2018-09-10 15:09       ` Ville Syrjälä
2018-09-10 15:25         ` Borislav Petkov
2018-09-10 15:51           ` Ville Syrjälä
2018-09-10 16:06             ` Borislav Petkov
2018-09-10 16:23     ` Thomas Gleixner
2018-09-10 16:46       ` Ville Syrjälä
2018-09-10 17:02         ` Thomas Gleixner
2018-09-11 12:16           ` Ville Syrjälä
2018-09-10 16:53     ` Thomas Gleixner
2018-09-11 12:15       ` Ville Syrjälä
2018-09-11 20:56         ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).