Re: [PATCH 2.6.21-rc1] serial: serial_txx9 driver update

From: Ralf Baechle
Date: Wed Feb 21 2007 - 12:00:53 EST


On Wed, Feb 21, 2007 at 04:48:26PM +0000, Alan wrote:

> 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.

Right now we don't have much that we could do in cpu_relax() on MIPS.
The average CPU core makes extensive use of clock gating to the point
where there are few powersaving knobs left in the core. Of course I'm
also ignoring things outside the CPU core and clockscaling for which
cpu_relax() would simply be the wrong place.

Of course this driver in rare instances might run on an x86 CPU ...

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