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: <20070221164826.61d0b5ea@lxorguk.ukuu.org.uk>
Date:	Wed, 21 Feb 2007 16:48:26 +0000
From:	Alan <alan@...rguk.ukuu.org.uk>
To:	Atsushi Nemoto <anemo@....ocn.ne.jp>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	ralf@...ux-mips.org
Subject: Re: [PATCH 2.6.21-rc1] serial: serial_txx9 driver update

> +static void serial_txx9_initialize(struct uart_port *port)
> +{
> +	struct uart_txx9_port *up = (struct uart_txx9_port *)port;
> +
> +	sio_out(up, TXX9_SIFCR, TXX9_SIFCR_SWRST);
> +#ifdef CONFIG_CPU_TX49XX
> +	/* TX4925 BUG WORKAROUND.  Accessing SIOC register
> +	 * immediately after soft reset causes bus error. */
> +	iob();
> +	udelay(1);
> +#endif

Given this costs 1uS in a path that is not performance critical is it
worth putting the #ifdef/#endif in instead of having one set of code that
works for all ?

> +	while (sio_in(up, TXX9_SIFCR) & TXX9_SIFCR_SWRST)
> +		;

Suppose it doesn't clear ? Should also use cpu_relax() in busy loops
so any processor variant with power management can do the right thing.

Neither of course are bugs you have added, just things you have moved that
seem worth asking about.

Acked-by: Alan Cox <alan@...hat.com>

-
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