summaryrefslogtreecommitdiff
path: root/hwclock/hwclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'hwclock/hwclock.c')
-rw-r--r--hwclock/hwclock.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c
index 571d63fb..f691dfe5 100644
--- a/hwclock/hwclock.c
+++ b/hwclock/hwclock.c
@@ -1107,8 +1107,18 @@ determine_clock_access_method(const bool user_requests_ISA) {
if (!ur)
ur = probe_for_kd_clock();
+ /*
+ * This final clause is a really bad idea on x86/AT PCs. You run the
+ * risk of a race condition with another copy of hwclock
+ * that already has /dev/rtc open. The fallback case on
+ * x86 is to then raise I/O priviledge level and access
+ * the RTC CMOS directly using I/O instructions. Simultaneous
+ * access like that can really hose the RTC.
+ */
+#if !defined(__i386__)
if (!ur && !user_requests_ISA)
ur = probe_for_cmos_clock();
+#endif
if (debug) {
if (ur)