Alpha Avanti broken by 9ce8654323d69273b4977f76f11c9e2d345ab130

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

The commit 9ce8654323d69273b4977f76f11c9e2d345ab130 breaks the Alpha 
Avanti platform. There is temporary 40-second hang during boot when 
detecting serial ports (although the hang eventually resolves and the 
machine boots) and there's total hang during shutdown when saving the 
hardware clock.

The bug can be fixed with the patch below - apparently, there's something 
in the Alpha Avanti platform code that expects that the barrier should be 
after the I/O write instructions.

Mikulas


Normal boot:
[    0.796875] Console: switching to colour frame buffer device 80x30
[    0.812500] tgafb: DC21030 [TGA] detected, rev=0x02
[    0.820312] tgafb: at PCI bus 0, device 12, function 0
[    0.828125] fb0: Digital ZLXp-E1 frame buffer device at 0x2000000
[    0.835937] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.851562] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.867187] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    0.875000] Uniform Multi-Platform E-IDE driver
[    0.882812] siimage 0000:00:0d.0: IDE controller (0x1095:0x0680 rev 0x02)
[    0.890625] siimage 0000:00:0d.0: BASE CLOCK == 133
[    0.898437] siimage 0000:00:0d.0: 100% native mode on irq 10
[    0.906250]     ide0: MMIO-DMA
[    0.914062]     ide1: MMIO-DMA
[    1.281250] hda: WDC WD400BB-00DEA0, ATA DISK drive
[    2.000000] random: fast init done
[    2.132812] hda: UDMA/100 mode selected
[    2.851562] ide0 at 0xfffffc0301301080-0xfffffc0301301087,0xfffffc030130108a on irq 10
[    2.859375] ide1 at 0xfffffc03013010c0-0xfffffc03013010c7,0xfffffc03013010ca on irq 10
[    2.867187] ide-gd driver 1.18
[    2.875000] hda: max request size: 64KiB
[    2.937500] hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=65535/16/63
[    2.945312] hda: cache flushes not supported
[    2.960937]  hda: hda1 hda2
[    2.976562] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.984375] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.992187] mousedev: PS/2 mouse device common for all mice
[    3.007812] platform rtc-alpha: setting system clock to 2018-08-16 21:51:29 UTC (1534456289)
[    3.031250] atkbd serio0: keyboard reset failed on isa0060/serio0
[    3.132812] atkbd serio1: keyboard reset failed on isa0060/serio1
[    3.476562] VFS: Mounted root (spadfs filesystem) readonly on device 3:1.
[    3.492187] devtmpfs: mounted
[    3.500000] Freeing unused kernel memory: 136K
[    3.507812] This architecture does not have kernel memory protection.



Broken boot:
[    0.789062] Console: switching to colour frame buffer device 80x30
[    0.804687] tgafb: DC21030 [TGA] detected, rev=0x02
[    0.812500] tgafb: at PCI bus 0, device 12, function 0
[    0.820312] fb0: Digital ZLXp-E1 frame buffer device at 0x2000000
[    0.828125] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
==== here it hangs for 40 seconds, although the clock gains only 2.2 
==== seconds; also some of the messages that should be sent to the serial 
==== line are missing
[    3.093750] atkbd serio0: keyboard reset failed on isa0060/serio0
[    3.195312] atkbd serio1: keyboard reset failed on isa0060/serio1
[    3.570312] VFS: Mounted root (spadfs filesystem) readonly on device 3:1.
[    3.585937] devtmpfs: mounted
[    3.593750] Freeing unused kernel memory: 128K
[    3.601562] This architecture does not have kernel memory protection.


Hang on shutdown:
[info] Using makefile-style concurrent boot in runlevel 6.
[....] Stopping IPv6 Recursive DNS Server discovery Daemon: rdnssd[ ok .
[....] Stopping mouse interface server: gpm[ ok .
[....] Stopping automount...[ ok .
[....] Stopping S.M.A.R.T. daemon: smartd[ ok .
[....] Asking all remaining processes to terminate...[ ok done.
[....] All processes ended within 1 seconds...[ ok done.
[....] Stopping enhanced syslogd: rsyslogd[ ok .
[info] Saving the system clock.
[info] Hardware Clock updated to Thu Aug 16 21:48:48 CEST 2018.
==== a total hang on shutdown - the machine must be reset

---
 arch/alpha/kernel/io.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-stable/arch/alpha/kernel/io.c
===================================================================
--- linux-stable.orig/arch/alpha/kernel/io.c	2018-08-16 21:37:25.000000000 +0200
+++ linux-stable/arch/alpha/kernel/io.c	2018-08-16 21:37:25.000000000 +0200
@@ -39,18 +39,21 @@ void iowrite8(u8 b, void __iomem *addr)
 {
 	mb();
 	IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
+	mb();
 }
 
 void iowrite16(u16 b, void __iomem *addr)
 {
 	mb();
 	IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
+	mb();
 }
 
 void iowrite32(u32 b, void __iomem *addr)
 {
 	mb();
 	IO_CONCAT(__IO_PREFIX,iowrite32)(b, addr);
+	mb();
 }
 
 EXPORT_SYMBOL(ioread8);
@@ -178,24 +181,28 @@ void writeb(u8 b, volatile void __iomem
 {
 	mb();
 	__raw_writeb(b, addr);
+	mb();
 }
 
 void writew(u16 b, volatile void __iomem *addr)
 {
 	mb();
 	__raw_writew(b, addr);
+	mb();
 }
 
 void writel(u32 b, volatile void __iomem *addr)
 {
 	mb();
 	__raw_writel(b, addr);
+	mb();
 }
 
 void writeq(u64 b, volatile void __iomem *addr)
 {
 	mb();
 	__raw_writeq(b, addr);
+	mb();
 }
 
 EXPORT_SYMBOL(readb);



[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux