All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: David Daney <ddaney@caviumnetworks.com>,
	Tomaso Paoletti <tpaoletti@caviumnetworks.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linus Torvald
Cc: linux-parisc@vger.kernel.org
Subject: [PATCH] fix early_serial_setup() regression
Date: Tue, 13 Jan 2009 22:51:07 +0100	[thread overview]
Message-ID: <496D0CCB.1020706@gmx.de> (raw)

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 <ddaney@caviumnetworks.com>
CC: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Kyle McMartin <kyle@mcmartin.ca>
CC: linux-parisc@vger.kernel.org

Signed-off-by: Helge Deller <deller@gmx.de>


diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 1889a63..0d934bf 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -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)
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index 1e93c83..4fa3bb2 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -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;


WARNING: multiple messages have this Message-ID (diff)
From: Helge Deller <deller@gmx.de>
To: David Daney <ddaney@caviumnetworks.com>,
	Tomaso Paoletti <tpaoletti@caviumnetworks.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Kyle McMartin <kyle@mcmartin.ca>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>,
	linux-serial@vger.kernel.org, "Rafael J. Wysocky" <rjw@sisk.pl>
Cc: linux-parisc@vger.kernel.org
Subject: [PATCH] fix early_serial_setup() regression
Date: Tue, 13 Jan 2009 22:51:07 +0100	[thread overview]
Message-ID: <496D0CCB.1020706@gmx.de> (raw)

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 <ddaney@caviumnetworks.com>
CC: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Kyle McMartin <kyle@mcmartin.ca>
CC: linux-parisc@vger.kernel.org

Signed-off-by: Helge Deller <deller@gmx.de>


diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 1889a63..0d934bf 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -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)
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index 1e93c83..4fa3bb2 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -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;


             reply	other threads:[~2009-01-13 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 21:51 Helge Deller [this message]
2009-01-13 21:51 ` [PATCH] fix early_serial_setup() regression Helge Deller
2009-01-13 21:55 ` Kyle McMartin
  -- strict thread matches above, loose matches on Subject: below --
2009-01-13 21:51 Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=496D0CCB.1020706@gmx.de \
    --to=deller@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-parisc@vger.kernel.org \
    --cc=tpaoletti@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.