LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-23-2012, 05:52 AM   #1
Speek
Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Slackware
Posts: 124

Rep: Reputation: 41
hwclock --directisa in /etc/rc.d/rc.S


This is from /etc/rc.d/rc.S:
Code:
# Check for a broken motherboard RTC clock (where ioports for rtc are
# unknown) to prevent hwclock causing a hang:
if ! grep -q -w rtc /proc/ioports ; then
  CLOCK_OPT="--directisa"
fi
In my PC the RTC device is named rtc0:
Code:
$ grep rtc /proc/ioports 
  0070-0071 : rtc0
So the --directisa option is passed to hwclock (while it should not).

From reading the hwclock manpage I think the --directisa option is not needed anymore in the current version:
Code:
--directisa
              This option is meaningful only on an ISA machine or an  Alpha  (which  implements
              enough  of  ISA  to be, roughly speaking, an ISA machine for hwclock's purposes).
              For other machines, it has no effect.  This option tells hwclock to use  explicit
              I/O instructions to access the Hardware Clock.  Without this option, hwclock will
              try to use the /dev/rtc device (which it assumes to be driven by the  RTC  device
              driver).   If  it  is  unable  to  open the device (for reading), it will use the
              explicit I/O instructions anyway.
But if you think the test should stay I suggest to change it to something like this:
Code:
grep -qw 'rtc0\?' /proc/ioports
 
Old 07-23-2012, 11:19 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,493

Rep: Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437
I've been burned by removing old workarounds in the past. Looks like this one was added in 2004 by Piter Punk, well past the ISA era, and likely fixed something then. I don't have specific notes about what we were trying to find in /proc/ioports, but rtc0 (or rtc*) could well have been what we were trying to match. The nature of voodoo workarounds (especially for borken hardware) tends to be that something fixes a bug, but does not always make logical sense. As the man page says states that this option "has no effect" on non-ISA machines I'd consider it harmless unless you can tell me that it's causing problems on your system. Removing it now might not be so harmless.

FWIW, my own devel box shows a similar grep hit in /proc/ioports.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
#$%@! hwclock and everyone in it mk27 Linux - General 7 03-18-2009 11:52 PM
regarding hwclock davender84 Linux - General 2 03-14-2009 02:38 PM
hwclock weirdness Peter Aleksic Linux - Software 2 12-13-2005 02:06 PM
hwclock alaios Linux - General 1 11-02-2004 08:40 AM
hwclock - HTS Linux - Software 4 10-28-2004 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration