From: Glauber Costa <gcosta@redhat.com>
To: Max Asbock <masbock@us.ibm.com>
Cc: tglx <tglx@linutronix.de>, mingo <mingo@redhat.com>,
hpa <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] x86: shift bits the right way in native_read_tscp
Date: Wed, 25 Jun 2008 18:51:29 -0300 [thread overview]
Message-ID: <4862BDE1.7000600@redhat.com> (raw)
In-Reply-To: <1214430328.20425.20.camel@w-amax.beaverton.ibm.com>
Max Asbock wrote:
> native_read_tscp shifts the bits in the high order value in the wrong direction,
> the attached patch fixes that.
>
> Signed-off-by: Max Asbock <masbock@linux.vnet.ibm.com>
>
> diff -pburN linux/include/asm-x86/msr.h linux.rdtscp/include/asm-x86/msr.h
> --- linux/include/asm-x86/msr.h 2008-06-20 11:51:17.000000000 -0700
> +++ linux.rdtscp/include/asm-x86/msr.h 2008-06-25 14:26:35.000000000 -0700
> @@ -18,7 +18,7 @@ static inline unsigned long long native_
> unsigned long low, high;
> asm volatile(".byte 0x0f,0x01,0xf9"
> : "=a" (low), "=d" (high), "=c" (*aux));
> - return low | ((u64)high >> 32);
> + return low | ((u64)high << 32);
> }
>
> /*
>
>
> ---
> Max
>
>
uh-oh!
absolutely right
shame on me.
prev parent reply other threads:[~2008-06-25 21:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 21:45 [patch] x86: shift bits the right way in native_read_tscp Max Asbock
2008-06-25 21:51 ` Glauber Costa [this message]
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=4862BDE1.7000600@redhat.com \
--to=gcosta@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masbock@us.ibm.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.