From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
robh@kernel.org, Peter Hurley <peter@hurleysoftware.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH v3 1/2] serial: 8250_early: optimize early 8250 uart
Date: Tue, 6 Jan 2015 16:59:10 +0530 [thread overview]
Message-ID: <1420543751-17468-2-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1420543751-17468-1-git-send-email-vgupta@synopsys.com>
In early 8250, IER is already zero so no point in writing this - twice
per line
This helped improve the SystemC model based ARC OSCI platform
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
drivers/tty/serial/8250/8250_early.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 4858b8a99d3b..ce2a8abd1f54 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -95,13 +95,16 @@ static void __init early_serial8250_write(struct console *console,
/* Save the IER and disable interrupts */
ier = serial8250_early_in(port, UART_IER);
- serial8250_early_out(port, UART_IER, 0);
+ if (ier)
+ serial8250_early_out(port, UART_IER, 0);
uart_console_write(port, s, count, serial_putc);
/* Wait for transmitter to become empty and restore the IER */
wait_for_xmitr(port);
- serial8250_early_out(port, UART_IER, ier);
+
+ if (ier)
+ serial8250_early_out(port, UART_IER, ier);
}
static unsigned int __init probe_baud(struct uart_port *port)
--
1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-serial@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<robh@kernel.org>, Peter Hurley <peter@hurleysoftware.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH v3 1/2] serial: 8250_early: optimize early 8250 uart
Date: Tue, 6 Jan 2015 16:59:10 +0530 [thread overview]
Message-ID: <1420543751-17468-2-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1420543751-17468-1-git-send-email-vgupta@synopsys.com>
In early 8250, IER is already zero so no point in writing this - twice
per line
This helped improve the SystemC model based ARC OSCI platform
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
drivers/tty/serial/8250/8250_early.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 4858b8a99d3b..ce2a8abd1f54 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -95,13 +95,16 @@ static void __init early_serial8250_write(struct console *console,
/* Save the IER and disable interrupts */
ier = serial8250_early_in(port, UART_IER);
- serial8250_early_out(port, UART_IER, 0);
+ if (ier)
+ serial8250_early_out(port, UART_IER, 0);
uart_console_write(port, s, count, serial_putc);
/* Wait for transmitter to become empty and restore the IER */
wait_for_xmitr(port);
- serial8250_early_out(port, UART_IER, ier);
+
+ if (ier)
+ serial8250_early_out(port, UART_IER, ier);
}
static unsigned int __init probe_baud(struct uart_port *port)
--
1.9.1
next prev parent reply other threads:[~2015-01-06 11:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 11:29 [PATCH v3 0/2] Early 8250 fixlets Vineet Gupta
2015-01-06 11:29 ` Vineet Gupta
2015-01-06 11:29 ` Vineet Gupta [this message]
2015-01-06 11:29 ` [PATCH v3 1/2] serial: 8250_early: optimize early 8250 uart Vineet Gupta
2015-01-06 11:29 ` [PATCH v3 2/2] ARC: Dynamically determine BASE_BAUD from DeviceTree Vineet Gupta
2015-01-06 11:29 ` Vineet Gupta
2015-01-06 12:29 ` Peter Hurley
2015-01-06 13:59 ` [Patch v4] " Vineet Gupta
2015-01-06 13:59 ` Vineet Gupta
2015-01-06 14:02 ` Peter Hurley
2015-01-06 14:37 ` Rob Herring
2015-01-07 6:36 ` Vineet Gupta
2015-01-07 14:15 ` Rob Herring
2015-01-10 11:25 ` [PATCH v5] " Vineet Gupta
2015-01-10 11:25 ` Vineet Gupta
2015-01-15 4:19 ` Vineet Gupta
2015-01-15 4:19 ` Vineet Gupta
2015-01-15 5:05 ` Greg KH
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=1420543751-17468-2-git-send-email-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
/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.