Skip to contentSkip to conversation

fix early_serial_setup() regression

PATCH In review Helge Deller 2 participants 2 messages Jan 13, 2009

Subsystems (2)
lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 fix early_serial_setup() regression

commit b430428a188e8a434325e251d0704af4b88b4711,

	"8250: Don't clobber spinlocks."

introduced a regression on the parisc architecture, which broke the handover to the serial port at boottime.

early_serial_setup() was changed to only copy a subset of the uart_port fields, and sadly the "type" and "line" fields were forgotten and thus the serial port was not initialized and could not be used for a handover.
This patch fixes this by copying the missing fields.

As this change to early_serial_setup() doesn't need an initialized spinlock in the uart_port struct any longer, we can drop the spinlock initialization in the superio driver.

CC David Daney <[email protected]>
CC Tomaso Paoletti <[email protected]>
CC Andrew Morton <[email protected]>
CC Alan Cox <[email protected]>
CC Linus Torvalds <[email protected]>
CC Kyle McMartin <[email protected]>
drivers/serial/8250.c +2 -0
index 1889a63..0d934bf 100644
@@ -2839,6 +2839,8 @@ int __init early_serial_setup(struct uart_port *port)
 	p->flags        = port->flags;
 	p->mapbase      = port->mapbase;
 	p->private_data = port->private_data;
+	p->type		= port->type;
+	p->line		= port->line;
 
 	set_io_from_upio(p);
 	if (port->serial_in)
drivers/parisc/superio.c +0 -1
index 1e93c83..4fa3bb2 100644
@@ -405,7 +405,6 @@ static void __init superio_serial_init(void)
 	serial_port.type	= PORT_16550A;
 	serial_port.uartclk	= 115200*16;
 	serial_port.fifosize	= 16;
-	spin_lock_init(&serial_port.lock);
 
 	/* serial port #1 */
 	serial_port.iobase	= sio_dev.sp1_base;
Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · Helge Deller

commit b430428a188e8a434325e251d0704af4b88b4711,

	"8250: Don't clobber spinlocks."

introduced a regression on the parisc architecture, which broke the handover to the serial port at boottime.

early_serial_setup() was changed to only copy a subset of the uart_port fields, and sadly the "type" and "line" fields were forgotten and thus the serial port was not initialized and could not be used for a handover.
This patch fixes this by copying the missing fields.

As this change to early_serial_setup() doesn't need an initialized spinlock in the uart_port struct any longer, we can drop the spinlock initialization in the superio driver.

CC David Daney <[email protected]>
CC Tomaso Paoletti <[email protected]>
CC Andrew Morton <[email protected]>
CC Alan Cox <[email protected]>
CC Linus Torvalds <[email protected]>
CC Kyle McMartin <[email protected]>
Quoted 2 lines

Linus, please apply.