Hello. When a system console gets assigned to the UART located on the Toshiba GOKU-S PCI card, the port spinlock is not initialized at all -- uart_add_one_port() thinks it's been initialized by the console setup code which is called too early for being able to do that, before the PCI card is even detected by the driver, and therefore fails. That unitialized spinlock causes 3 BUG messages in the boot log with Ingo Molnar's RT preemption patch as uart_add_one_port() called to register PCI UART with the serial core calls uart_configure_port() which makes use of the port spinlock. WBR, Sergei Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index f10c86d..3f8dc41 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c @@ -1065,6 +1065,14 @@ static int __devinit serial_txx9_registe uart->port.mapbase = port->mapbase; if (port->dev) uart->port.dev = port->dev; + + /* + * If this port is a console, its spinlock couldn't have been + * initialized by serial_txx9_console_setup() and it won't be + * initialized by uart_add_one_port(), so have to do it here... + */ + spin_lock_init(&uart->port.lock); + ret = uart_add_one_port(&serial_txx9_reg, &uart->port); if (ret == 0) ret = uart->port.line;