From: Matthew Wilcox <Matthew.Wilcox@genedata.com>
To: LaMont Jones <lamont@security.hp.com>
Cc: Matthew Wilcox <Matthew.Wilcox@genedata.com>,
parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] xchg implementation
Date: Tue, 2 Nov 1999 09:53:40 +0100 [thread overview]
Message-ID: <19991102095340.D516@mencheca.ch.genedata.com> (raw)
In-Reply-To: <19991101210305.75FA118708@security.hp.com>; from LaMont Jones on Mon, Nov 01, 1999 at 02:03:05PM -0700
On Mon, Nov 01, 1999 at 02:03:05PM -0700, LaMont Jones wrote:
> > This is a uniprocessor optimisation of the xchg() case where it's _not_
> > exchanging with zero. What I need is a spare CR register. As far as I
> > can see from the comments, CR28-30 are currently reserved; leaving CRs
> > 24, 25 and 31 available. Unless someone's using one of them without
> > documenting it somewhere...? That really does need to be written down
> > somewhere.
>
> IIRC, CR24 and 25 are readable from user space (not writable), and can be
> quite useful for thread specific data, thread id, etc... It might do to
> leave them available for such a use.
You're thinking of CR26 and 27 (ref: Kane's PA-RISC 2.0 Architecture,
page 2-17). CR31 _is_ used, I didn't read carefully enough:
$ find arch/parisc/ -name \*.[chS] |xargs grep ctl |grep 31
arch/parisc/kernel/interruption.S: mtctl 29,31
arch/parisc/kernel/interruption.S: mtctl 29,31
arch/parisc/kernel/interruption.S: mtctl 29,31
arch/parisc/kernel/syscall.S: mfctl 31, %r27 ; get the kernel dp
cr26,27 are used, but only in a debug macro in head.S.
--
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson
next prev parent reply other threads:[~1999-11-02 8:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-31 18:37 [parisc-linux] xchg implementation Matthew Wilcox
1999-11-01 21:03 ` LaMont Jones
1999-11-02 8:53 ` Matthew Wilcox [this message]
1999-11-02 14:10 ` LaMont Jones
1999-11-06 19:22 ` Philipp Rumpf
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=19991102095340.D516@mencheca.ch.genedata.com \
--to=matthew.wilcox@genedata.com \
--cc=lamont@security.hp.com \
--cc=parisc-linux@thepuffingroup.com \
/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