Skip to contentSkip to conversation

2.6.18-rc1 fails to boot on Ultra 5

DISCUSSION Mikael Pettersson 3 participants 5 messages Jul 13, 2006

lore
Share & tools
lore
#0 lore raw
Quoted 10 lines · David Miller

From: Mikael Pettersson <[email protected]>
Date: Sun, 9 Jul 2006 12:40:58 +0200 (MEST)

Quoted 6 lines

2.6.17-git16 to 2.6.18-rc1 partially boot but crash and burn in different places depending on kernel configuration: my standard config got alignment exceptions in the floppy driver followed by (sabre?) PCI errors and a hang; a minimal kernel gets further but fails "su" probe and then oopses hard when the /dev/hda partition table is about to be printed.

Quoted 3 lines

Several bugs operating here, all of which should be addressed by this patch below. I was able to bootup my ultra5 fully, use the keyboard to login, etc. etc.

Confirmed. With this patch my Ultra5 boots fine again. Thanks.

(I still need that patch to repair PCI mmap() for X11, but that's a different issue.)

Quoted 1 line

Let me know if you have any remaining problems.

No actual problems, but I noticed some differences in the kernel log:

--- dmesg-2.6.17 2006-07-08 15:14:41.000000000 +0200
+++ dmesg-2.6.18-rc1 2006-07-13 13:30:34.000000000 +0200
...
Kernel command line: ro root=LABEL=/
PID hash table entries: 1024 (order: 10, 8192 bytes)
+start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 262144 bytes)

Something to worry about or not?

...
Console: switching to colour frame buffer device 144x56
atyfb: fb0: ATY Mach64 frame buffer device on PCI
rtc_init: no PC rtc found
-su0 at 0x000001fff13062f8 (irq = 5,7ea) is a 16550A
-su1 at 0x000001fff13083f8 (irq = 9,7e9) is a 16550A
-ttyS0 at MMIO 0x1fff1400000 (irq = 6681504) is a SAB82532 V3.2 -ttyS1 at MMIO 0x1fff1400040 (irq = 6681504) is a SAB82532 V3.2 -isa bounce pool size: 16 pages
+se@14,400000: ttyS1 at MMIO 0x1fff1400000 (irq = 5) is a SAB82532 V3.2
Floppy drive(s): fd0 is 1.44M
FDC 0 is a National Semiconductor PC87306
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

So ttyS0 became ttyS1, and the serial port at 0x1fff1400040 disappeared. OTOH, my Ultra5 only has a single serial port connector so perhaps the old kernel was wrong in reporting two serial ports.

/Mikael

#1 lore raw
Quoted 4 lines · Mikael Pettersson

So ttyS0 became ttyS1, and the serial port at 0x1fff1400040 disappeared. OTOH, my Ultra5 only has a single serial port connector so perhaps the old kernel was wrong in reporting two serial ports.

I don't know about you, but my Ultra 5 has two: the DB25 female connector
on the board ("A"), and the DB9 male connector on a ribbon cable ("B"). This is going off memory, but I'm fairly confident of this.

Jima

#2 lore raw

From: Jima <[email protected]>
Date: Thu, 13 Jul 2006 08:38:28 -0500 (CDT)

Quoted 4 lines

I don't know about you, but my Ultra 5 has two: the DB25 female
connector on the board ("A"), and the DB9 male connector on a ribbon cable ("B"). This is going off memory, but I'm fairly confident of this.

The 'se' device has two ports. It seems one of them is not getting registered properly or something like that. I'll take a look.

The DB9 one is in fact labelled "B" on the back of my ultra5.

#3 lore raw
In reply to Mikael Pettersson

From: Mikael Pettersson <[email protected]>
Date: Thu, 13 Jul 2006 14:18:33 +0200 (MEST)

Quoted 1 line

Confirmed. With this patch my Ultra5 boots fine again. Thanks.

Thanks for testing.

Quoted 2 lines

(I still need that patch to repair PCI mmap() for X11, but that's a different issue.)

Yes, investigating this for real is something I will address soon. Don't worry :)

Quoted 10 lines
dmesg-2.6.18-rc1 renamed from dmesg-2.6.17 +1 -0
...
 Kernel command line: ro root=LABEL=/
 PID hash table entries: 1024 (order: 10, 8192 bytes)
+start_kernel(): bug: interrupts were enabled early
 Console: colour dummy device 80x25
 Dentry cache hash table entries: 32768 (order: 5, 262144 bytes)

Something to worry about or not?

I'll check it out.

Quoted 12 lines

atyfb: fb0: ATY Mach64 frame buffer device on PCI
rtc_init: no PC rtc found

dmesg-2.6.18-rc1 renamed from dmesg-2.6.17 +1 -5
-su0 at 0x000001fff13062f8 (irq = 5,7ea) is a 16550A
-su1 at 0x000001fff13083f8 (irq = 9,7e9) is a 16550A
-ttyS0 at MMIO 0x1fff1400000 (irq = 6681504) is a SAB82532 V3.2
-ttyS1 at MMIO 0x1fff1400040 (irq = 6681504) is a SAB82532 V3.2
-isa bounce pool size: 16 pages
+se@14,400000: ttyS1 at MMIO 0x1fff1400000 (irq = 5) is a SAB82532 V3.2
 Floppy drive(s): fd0 is 1.44M
 FDC 0 is a National Semiconductor PC87306
 RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Quoted 4 lines

So ttyS0 became ttyS1, and the serial port at 0x1fff1400040 disappeared. OTOH, my Ultra5 only has a single serial port connector so perhaps the old kernel was wrong in reporting two serial ports.

Two things are happening here.

1) The su ports are actually for the keyboard and mouse. I don't register them with the serial layer anymore for simplicity, and also because if they are driving the keyboard and mouse we really don't want people openning them as serial devices.

I should probably add a little kernel log message for them, nevertheless. I'll make that change right now.

2) I think the serial layer is confused about that ttyS1 thing.

Take a look under /sys/class/tty/. I bet there is a ttyS0 directory, and underneath the "device" symlink points properly to your SAB82532 device node.

If this is the case, it is using ttyS0 and ttyS1 is just an anomaly in how the serial core layer reports things. I've run into other problems in this area, so I know where to look to try and rectify things.

Thanks for the report!

#4 lore raw
In reply to Mikael Pettersson

From: Mikael Pettersson <[email protected]>
Date: Thu, 13 Jul 2006 14:18:33 +0200 (MEST)

Quoted 2 lines

No actual problems, but I noticed some differences in the kernel log:

This should take care of all 4 issues. The typo in the sunsab driver causing the first port to not show up was good for a laugh. :)

Let me know if it works for you too.

arch/sparc64/kernel/head.S +6 -7
index 75684b5..c8e9dc9 100644
@@ -551,9 +551,10 @@ setup_trap_table:
 	save	%sp, -192, %sp
 
 	/* Force interrupts to be disabled. */
-	rdpr	%pstate, %o1
-	andn	%o1, PSTATE_IE, %o1
+	rdpr	%pstate, %l0
+	andn	%l0, PSTATE_IE, %o1
 	wrpr	%o1, 0x0, %pstate
+	rdpr	%pil, %l1
 	wrpr	%g0, 15, %pil
 
 	/* Make the firmware call to jump over to the Linux trap table.  */
@@ -622,11 +623,9 @@ setup_trap_table:
 	call	init_irqwork_curcpu
 	 nop
 
-	/* Now we can turn interrupts back on. */
-	rdpr	%pstate, %o1
-	or	%o1, PSTATE_IE, %o1
-	wrpr	%o1, 0, %pstate
-	wrpr	%g0, 0x0, %pil
+	/* Now we can restore interrupt state. */
+	wrpr	%l0, 0, %pstate
+	wrpr	%l1, 0x0, %pil
 
 	ret
 	 restore
arch/sparc64/kernel/time.c +0 -2
index b43de64..094d3e3 100644
@@ -928,8 +928,6 @@ static void sparc64_start_timers(void)
 	__asm__ __volatile__("wrpr	%0, 0x0, %%pstate"
 			     : /* no outputs */
 			     : "r" (pstate));
-
-	local_irq_enable();
 }
 
 struct freq_table {
drivers/serial/sunsab.c +1 -1
index 0dbd4df..979497f 100644
@@ -1052,7 +1052,7 @@ static int __devinit sab_probe(struct of
 	if (err)
 		return err;
 
-	err = sunsab_init_one(&up[0], op, 0,
+	err = sunsab_init_one(&up[1], op, 0,
 			      (inst * 2) + 1);
 	if (err) {
 		of_iounmap(up[0].port.membase,
drivers/serial/sunsu.c +5 -0
index 93bdaa3..d3a5aee 100644
@@ -1200,6 +1200,11 @@ static int __init sunsu_kbd_ms_init(stru
 	if (up->port.type == PORT_UNKNOWN)
 		return -ENODEV;
 
+	printk("%s: %s port at %lx, irq %u\n",
+	       to_of_device(up->port.dev)->node->full_name,
+	       (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
+	       up->port.mapbase, up->port.irq);
+
 #ifdef CONFIG_SERIO
 	serio = &up->serio;
 	serio->port_data = up;