[PATCH] linux-2.5.63_x86-tsc-cleanup_A0

john stultz (johnstul@us.ibm.com)
24 Feb 2003 21:10:49 -0800


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-11193-1046150225-0001-2
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Linus, All,
As promised, here is a minor cleanup that removes the usage of
CONFIG_X86_TSC in get_cycles(), replacing it with a runtime conditional
of if(cpu_has_tsc).

Andi: I've already posted this a few times without complaint, but since
you didn't like my playing with get_cycles() last time, let me know if
have any issues with this.

thanks
-john

diff -Nru a/include/asm-i386/timex.h b/include/asm-i386/timex.h
--- a/include/asm-i386/timex.h Mon Feb 24 21:09:32 2003
+++ b/include/asm-i386/timex.h Mon Feb 24 21:09:32 2003
@@ -40,14 +40,10 @@
=20
static inline cycles_t get_cycles (void)
{
-#ifndef CONFIG_X86_TSC
- return 0;
-#else
- unsigned long long ret;
-
- rdtscll(ret);
+ unsigned long long ret =3D 0;
+ if(cpu_has_tsc)
+ rdtscll(ret);
return ret;
-#endif
}
=20
extern unsigned long cpu_khz;

--=_courier-11193-1046150225-0001-2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Transfer-Encoding: 7bit
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA+WvrZMDAZ/OmgHwwRAo02AJ9xf14lC8yFkodkAL8J0MiYnQP24QCfbvBk
3pbsQPvVI0EAGG3msULwi44=
=YKuH
-----END PGP SIGNATURE-----

--=_courier-11193-1046150225-0001-2--