Subject: Decstation broken Was: CVS [email-masked]: linux

From: Florian Lohoff <[email-masked]>
Date: Thu, 28 Sep 2000 21:40:02 +0200

On Fri, Aug 25, 2000 at 02:31:06PM -0700, Ralf Baechle wrote:
> CVSROOT:	/home/pub/cvs
> Module name:	linux
> Changes by:	[email-masked]	00/08/25 14:30:56
> 
> Modified files:
> 	arch/mips      : Makefile 
> 	arch/mips/dec  : Makefile int-handler.S irq.c setup.c time.c 
> 	include/asm-mips: addrspace.h div64.h 
> 	include/asm-mips/dec: interrupts.h ioasic_addrs.h kn02xa.h 
> 	                      kn03.h 
> Added files:
> 	include/asm-mips/dec: ioasic.h 
> 
> Log message:
> 	NTP fixes from Maciej.

Hi,
since this commit my machines are all broken (5000/260, 5000/150 
and 5000/125) - They all hang in the "Calibrating delay loop ...".

Reverting it let me boot the current kernels ...

Maciej ?

Flo
-- 
Florian Lohoff		[email-masked]		      	+49-5201-669912
      "Write only memory - Oops. Time for my medication again ..."

---

From: Klaus Naumann <[email-masked]>
Date: Thu, 28 Sep 2000 22:00:46 +0200

> Reverting it let me boot the current kernels ...

BTW: What did you actually fix ? ntpdate still doesn't work
while ntpd seems to work ok.
But ntpdate would be a very good idea because ntpd doesn't handle
large offsets ...
And obviously the realtime clock of the Indigo2 doesn't work 
correctly. So I was calling ntpdate at every bootup to get my 
system in a usable state. Maciej, can you take a look at ntpdate 
please ?

	TIA, Klaus

-- 
Full Name   : Klaus Naumann     | (http://www.mgnet.de/) (Germany)
Nickname    : Spock             | Org.: Mad Guys Network
Phone / FAX : ++49/177/7862964  | E-Mail: ([email-masked])
PGP Key     : www.mgnet.de/keys/key_spock.txt

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 29 Sep 2000 01:39:54 +0200

> while ntpd seems to work ok.

The NTP API was outdated.

What is the sympthom you observe with ntpdate?

> system in a usable state. Maciej, can you take a look at ntpdate 

I recently found that the Indigo2 apparently has a different realtime
clock from the Indy.  If that's true it explains your observation and
is unrelated the other problems.

  Ralf

---

From: Klaus Naumann <[email-masked]>
Date: Fri, 29 Sep 2000 07:50:35 +0200

> What is the sympthom you observe with ntpdate?

When I call it it's sleeping for several seconds.
And after that I get

29 Sep 07:49:37 ntpdate[10880]: poll(): nfound = 0, error: Operation not
permitted

which seems to loop then.
If I would have a working strace on my box I could tell you more :/

> is unrelated the other problems.

Yes, it's of course unrelated to the other problem - it's just
an explanation why ntpdate is of real use.

		CU, Klaus

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Fri, 29 Sep 2000 11:36:07 +0200 (MET DST)

> and 5000/125) - They all hang in the "Calibrating delay loop ...".

 Well, I asked for testing before the commit, but nobody bothered to write
anything, so I assumed everything is correct, sigh...

 OK, the /240 is definitely tested (the uptime of my -test7 was three
weeks before I rebooted to test NFS problems) so /260 should work for you. 
But the latter is R4K.  As Ralf already remarked me in a separate mail,
64-bit registers can get corrupted for the 32-bit kernel (but 64-bit code
is used throughout the kernel, strange), so please change the "#if
_MIPS_ISA" at the beginning of include/asm-mips/div64.h into "#if 1" and
tell me if it works for the /260. 

 As for the rest -- /125 is R3K, right?  Chances are I made a stupid
mistake and defined an address macro wrong.  I'll dig through the changes
and see (/150 should be no problem once /125 works, as it's the same issue
as /240 vs /260).  If I can't find anything relevant, please expect
certain debugging patches from me for the /125 path.

 Note that these are hi-res timer changes rather than NTP fixes, BTW -- my
communication channel with Ralf got corrupted somehow at one time. 
Although the code affects the performance of NTP handling, there were
separate NTP changes, as well. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Fri, 29 Sep 2000 11:46:57 +0200 (MET DST)

> If I would have a working strace on my box I could tell you more :/

 But gdb works -- try this one instead.

> an explanation why ntpdate is of real use.

 Well, all programs from the xntp3 distribution do work for me.  This may
also be a glibc issue -- I'm using glibc 2.2 only and this provides a
better API for NTP (clock_settime() and friends).  I'll double-check that
settimeofday() works right, too.

 But note that my patches do really affect only the DEC tree.

  Maciej

---

From: Florian Lohoff <[email-masked]>
Date: Fri, 29 Sep 2000 22:01:03 +0200

> tell me if it works for the /260. 

Sorry for the confusion - It seems i was inaccurate - I tried on
the /260 and it works ... See attached - Ill retry the /125 in a minute.

Loading R4000 MMU routines.
CPU revision is: 00000440
Primary instruction cache 16kb, linesize 16 bytes.
Primary data cache 16kb, linesize 16 bytes.
Secondary cache sized at 1024K linesize 32 bytes.
Linux version 2.4.0-test8-pre1 ([email-masked]) (gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)) #1 Fri Sep 29 19:45:47 GMT 2000
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS2 root=/dev/sda5
Calibrating delay loop... 59.90 BogoMIPS
Memory: 62736k/65536k available (1204k kernel code, 2800k reserved, 76k data, 56k init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
TURBOchannel rev. 1 at 25.0 MHz (no parity)
    slot 0: DEC      PMAF-AA  T5.2P-  
    slot 1: DEC      PMAZ-AA  V5.3d   
    slot 2: DEC      PMAZ-AA  V5.3d   
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
Starting kswapd v1.7
pty: 256 Unix98 ptys configured
SCSI ID 7 Clk 25MHz CCF=5 TOut 167 NCR53C9x(esp236)
SCSI ID 7 Clk 25MHz CCF=5 TOut 167 NCR53C9x(esp236)
SCSI ID 7 Clk 25MHz CCF=5 TOut 167 NCR53C9x(esp236)
ESP: Total of 3 ESP hosts found, 3 actually in use.
scsi0 : ESP236 (NCR53C9x)
scsi1 : ESP236 (NCR53C9x)
scsi2 : ESP236 (NCR53C9x)
scsi : 3 hosts.
esp0: hoping for msgout
  Vendor: IBM       Model: DGHS18Z           Rev: 03B0
  Type:   Direct-Access                      ANSI SCSI revision: 03
Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
  Vendor: DEC       Model: RZ23L    (C) DEC  Rev: 2528
  Type:   Direct-Access                      ANSI SCSI revision: 01 CCS
Detected scsi disk sdb at scsi0, channel 0, id 3, lun 0
scsi : detected 2 SCSI disks total.
SCSI device sda: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5 GB]
Partition check:
 sda: sda1 < sda5 sda6 sda7 sda8 sda9 >
esp0: target 3 [period 252ns offset 8 3.96MHz synchronous SCSI]
SCSI device sdb: hdwr sector= 512 bytes. Sectors= 237588 [116 MB] [0.1 GB]
 sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8
DECstation Z8530 serial driver version 0.03
tty00 at 0xbf900001 (irq = 4) is a Z85C30 SCC
tty01 at 0xbf900009 (irq = 4) is a Z85C30 SCC
tty02 at 0xbf980001 (irq = 4) is a Z85C30 SCC
tty03 at 0xbf980009 (irq = 4) is a Z85C30 SCC
rtc: Digital DECstation epoch (2000) detected
Real Time Clock Driver v1.10d
declance.c: v0.008 by Linux Mips DECstation task force
eth0: IOASIC onboard LANCE, addr = 08:00:2b:2b:be:bc, irq = 3

---

From: Florian Lohoff <[email-masked]>
Date: Fri, 29 Sep 2000 22:22:27 +0200

>  As for the rest -- /125 is R3K, right?  Chances are I made a stupid

Yep

> certain debugging patches from me for the /125 path.

/125 dies 

>>boot
1532656+0+141200
This DECstation is a DS5000/1xx
Loading R[23]00 MMU routines.
CPU revision is: 00000230
Primary instruction cache 64kb, linesize 4 bytes
Primary data cache 64kb, linesize 4 bytes
Linux version 2.4.0-test8-pre1 ([email-masked]) (gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)) #1 Fri Sep 29 20:09:51 GMT 2000
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS2 root=/dev/sda1
Calibrating delay loop... 

Hang ...

Flo

---

From: Ralf Baechle <[email-masked]>
Date: Sat, 30 Sep 2000 12:18:23 +0200

> anything, so I assumed everything is correct, sigh...

Not sigh ...  The lesson that not speaking up is a also wrong!

> tell me if it works for the /260. 

The ddiv usage outside of do_div / do_div64_32 is actually ok because
interrupts are always disabled.  We don't have the same guarantee for
do_div / do_div64_32 calls.

Hmm...  We got two error scenarios left - bus errors and cache errors.  If
we get one of those doomsday is near anyway ...  Anyway, these are rare,
so we rather make these exception handlers pay the price.

  Ralf