lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1420543751-17468-2-git-send-email-vgupta@synopsys.com>
Date:	Tue, 6 Jan 2015 16:59:10 +0530
From:	Vineet Gupta <Vineet.Gupta1@...opsys.com>
To:	<gregkh@...uxfoundation.org>
CC:	<linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<robh@...nel.org>, Peter Hurley <peter@...leysoftware.com>,
	Vineet Gupta <Vineet.Gupta1@...opsys.com>,
	Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH v3 1/2] serial: 8250_early: optimize early 8250 uart

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@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.cz>
Cc: linux-serial@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: Rob Herring <robh@...nel.org>
Cc: Peter Hurley <peter@...leysoftware.com>
Signed-off-by: Vineet Gupta <vgupta@...opsys.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ