public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Martin Waitz <tali@admingilde.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: weird semantics of cpu/*/msr
Date: Thu, 10 Oct 2002 15:55:18 -0700	[thread overview]
Message-ID: <3DA60556.4020707@zytor.com> (raw)
In-Reply-To: 20021010225221.GA1552@admingilde.org

Martin Waitz wrote:
> hi :)
> 
> the i386 msr driver is a bit strange:
> 
> * when reading/writing, it does not update the file position/msr register
> * file position is used directly as msr register
> 
> that is, reads with count>8 do read from the same register multiple
> times, and writes overwrite themselves.
> 
> i would expect the following semantics:
> * file position is (msr register * 8). position%8!=0 is invalid
> * read/write updating file position.
> 
> that would make it possible to write/read multiple MSRs with one
> syscall, which is very handy when initializing P4 performance counters.
> 
> should i implement that behaviour?
> of course it would break binary compatibility with existing
> uses of that drivers.
> perhaps we would need a new location for the new api.
> 

No, you should not.

Simply put, the semantics were chosen for what typically makes sense
w.r.t. MSRs.

	-hpa



      reply	other threads:[~2002-10-10 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 22:52 weird semantics of cpu/*/msr Martin Waitz
2002-10-10 22:55 ` H. Peter Anvin [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=3DA60556.4020707@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tali@admingilde.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