linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mark Hatle <fray@mvista.com>
To: frowand@mvista.com
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: program exception emulates mfspr PVR
Date: Thu, 15 Feb 2001 15:41:43 -0800	[thread overview]
Message-ID: <3A8C6937.5AC788EA@mvista.com> (raw)
In-Reply-To: 3A8C5A95.9A94F914@mvista.com


Frank Rowand wrote:
>
> Why did emulate_instruction() get added into traps.c to emulate the
> mfspr PVR instruction?  What user space application is using this
> instruction?
>
> And why add this extra cruft?  The information is already available to
> user applications (one example, /proc/cpuinfo reports the cpu and revision).
>
> Thanks,
>
> Frank
> --
> Frank Rowand <frank_rowand@mvista.com>
> MontaVista Software, Inc
>

The pvr was added so that applications that tune themselves can look at
the pvr information and figure out the processor type.

You can not count on /proc/cpuinfo to exist, or be in the same format
from one kernel version to the next.  The PVR instruction can be counted
on.  (And if someone has a need to emulate a different PVR.)

The idea behind this (originally) was to have glibc tune itself to the
cache-line size, FP ability, and Altivec ability of a CPU, but reading
/proc/cpuinfo wouldn't be acceptible since it may not be mounted, and
the whole open/read/close would have to happen early in glibc's load.
(Not practical)

There was discussion about this and almost everyone agreed it didn't
hurt to have the PVR available in user space as a trapped instruction.

--Mark

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2001-02-15 23:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-15 22:06 calling giveup_altivec on machine with no altivec!? Troy Benjegerdes
2001-02-15 22:20 ` Frank Rowand
2001-02-15 22:33   ` Troy Benjegerdes
2001-02-15 22:47     ` Frank Rowand
2001-02-15 22:39 ` program exception emulates mfspr PVR Frank Rowand
2001-02-15 22:52   ` Dan Malek
2001-02-15 23:41   ` Mark Hatle [this message]
2001-02-15 22:57 ` calling giveup_altivec on machine with no altivec!? Dan Malek
2001-02-18  2:41   ` Troy Benjegerdes

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=3A8C6937.5AC788EA@mvista.com \
    --to=fray@mvista.com \
    --cc=frowand@mvista.com \
    --cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).