Commit b430428a188e8a434325e251d0704af4b88b4711
Committed by
Linus Torvalds
1 parent
bc3256288b
8250: Don't clobber spinlocks.
In serial8250_isa_init_ports(), the port's lock is initialized. We should not overwrite it. In early_serial_setup(), only copy in the fields we need. Since the early console code only uses a subset of the fields, these are sufficient. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 13 additions and 2 deletions Side-by-side Diff
drivers/serial/8250.c
... | ... | @@ -2752,12 +2752,23 @@ |
2752 | 2752 | */ |
2753 | 2753 | int __init early_serial_setup(struct uart_port *port) |
2754 | 2754 | { |
2755 | + struct uart_port *p; | |
2756 | + | |
2755 | 2757 | if (port->line >= ARRAY_SIZE(serial8250_ports)) |
2756 | 2758 | return -ENODEV; |
2757 | 2759 | |
2758 | 2760 | serial8250_isa_init_ports(); |
2759 | - serial8250_ports[port->line].port = *port; | |
2760 | - serial8250_ports[port->line].port.ops = &serial8250_pops; | |
2761 | + p = &serial8250_ports[port->line].port; | |
2762 | + p->iobase = port->iobase; | |
2763 | + p->membase = port->membase; | |
2764 | + p->irq = port->irq; | |
2765 | + p->uartclk = port->uartclk; | |
2766 | + p->fifosize = port->fifosize; | |
2767 | + p->regshift = port->regshift; | |
2768 | + p->iotype = port->iotype; | |
2769 | + p->flags = port->flags; | |
2770 | + p->mapbase = port->mapbase; | |
2771 | + p->private_data = port->private_data; | |
2761 | 2772 | return 0; |
2762 | 2773 | } |
2763 | 2774 |