From: Rusty Russell <rusty@rustcorp.com.au>
To: Andi Kleen <ak@muc.de>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH] Turn rdmsr, rdtsc into inline functions, clarify names
Date: Sun, 06 Aug 2006 13:52:01 +1000 [thread overview]
Message-ID: <1154836321.29151.50.camel@localhost.localdomain> (raw)
In-Reply-To: <20060806031643.GA43490@muc.de>
On Sun, 2006-08-06 at 05:16 +0200, Andi Kleen wrote:
> > Please reconsider. This isn't about being pretty, it's about not
> > having hidden side-effects,
>
> I wouldn't call it hidden, it's well defined in the architecture.
Sorry Andi, I'm not talking about the asm, which is fine. I'm talking
about the function-style macro which alters its arguments directly.
It's very bad form.
int a, b;
rdtsc(a, b);
> > and having typechecking.
>
> The existing code will already reject any non integer and I don't
> see a particular need to be more strict than that.
Um?
u64 c;
int a,b;
rdtsc(&a, &b);
rdtscl(c);
These macros are badly named and don't check for bad usage. Sure, less
than 1% of uses is wrong at the moment, but I'm volunteering to fix them
because I think it sets a bad example and sets us up for more bugs.
I feel fairly strongly about this, but I'll drop the x86_64 changes.
Rusty.
--
Help! Save Australia from the worst of the DMCA: http://linux.org.au/law
next prev parent reply other threads:[~2006-08-06 3:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1154771262.28257.38.camel@localhost.localdomain>
2006-08-06 2:38 ` Andi Kleen
2006-08-06 2:56 ` Rusty Russell
2006-08-06 2:58 ` H. Peter Anvin
2006-08-06 3:09 ` Rusty Russell
2006-08-06 3:11 ` H. Peter Anvin
2006-08-06 3:49 ` Rusty Russell
2006-08-06 3:16 ` Andi Kleen
2006-08-06 3:52 ` Rusty Russell [this message]
2006-08-06 14:58 ` Andi Kleen
2006-08-07 2:43 ` Dmitry Torokhov
2006-08-07 8:48 ` Andi Kleen
2006-08-07 11:09 ` Vojtech Pavlik
2006-08-07 12:28 ` Andi Kleen
2006-08-07 12:48 ` Vojtech Pavlik
2006-08-07 12:56 ` Andi Kleen
2006-08-07 13:18 ` Vojtech Pavlik
2006-08-07 13:32 ` Dmitry Torokhov
2006-08-07 15:01 ` Andi Kleen
2006-08-07 15:19 ` Andreas Mohr
2006-08-07 15:57 ` Andi Kleen
2006-08-07 16:04 ` Vojtech Pavlik
2006-08-07 16:12 ` Andi Kleen
2006-08-07 19:22 ` Vojtech Pavlik
2006-08-14 20:13 ` Pavel Machek
2006-08-07 11:07 ` Vojtech Pavlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1154836321.29151.50.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=ak@muc.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome