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: <87mxsejwpo.fsf@macbook.be.48ers.dk>
Date:	Sun, 22 Aug 2010 21:04:03 +0200
From:	Peter Korsgaard <jacmet@...site.dk>
To:	Michal Simek <monstr@...str.eu>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org,
	Jason Wessel <jason.wessel@...driver.com>
Subject: Re: [PATCH] serial: Add CONSOLE_POLL support for uartlite

>>>>> "Michal" == Michal Simek <monstr@...str.eu> writes:

 Michal> CONSOLE_POLL support for uartlite enables
 Michal> KGDB debugging over serial line.

Please CC me on uartlite patches in the future, thanks.

 Michal> Signed-off-by: Michal Simek <monstr@...str.eu>
 Michal> Signed-off-by: Jason Wessel <jason.wessel@...driver.com>
 Michal> ---
 Michal>  drivers/serial/uartlite.c |   26 +++++++++++++++++++++++++-
 Michal>  1 files changed, 25 insertions(+), 1 deletions(-)

 Michal> diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
 Michal> index 9b03d7b..c0fae0d 100644
 Michal> --- a/drivers/serial/uartlite.c
 Michal> +++ b/drivers/serial/uartlite.c
 Michal> @@ -322,6 +322,26 @@ static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)
 Michal>  	return -EINVAL;
 Michal>  }
 
 Michal> +#ifdef CONFIG_CONSOLE_POLL
 Michal> +static int ulite_get_poll_char(struct uart_port *port)
 Michal> +{
 Michal> +	while (!(ioread32be(port->membase + ULITE_STATUS)
 Michal> +						& ULITE_STATUS_RXVALID))
 Michal> +		return NO_POLL_CHAR;
 Michal> +

Using while instead of 'if' is imho pretty obscure here.

 Michal> +	return ioread32be(port->membase + ULITE_RX);
 Michal> +}
 Michal> +
 Michal> +static void ulite_put_poll_char(struct uart_port *port, unsigned char ch)
 Michal> +{
 Michal> +	while (ioread32be(port->membase + ULITE_STATUS) & ULITE_STATUS_TXFULL)
 Michal> +		cpu_relax();


You could reuse ulite_console_wait_tx() like ulite_console_putchar()
does.

Otherwise it looks fine.

Acked-by: Peter Korsgaard <jacmet@...site.dk>

-- 
Bye, Peter Korsgaard
--
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