From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Paul Mackerras <paulus@samba.org>,
linuxppc64-dev <linuxppc64-dev@lists.linuxppc.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Anton Blanchard <anton@samba.org>, Andrew Morton <akpm@osdl.org>
Subject: Re: PREEMPT for ppc64
Date: Mon, 07 Jun 2004 10:12:41 -0500 [thread overview]
Message-ID: <1086621161.10517.54.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.58.0406070737240.1730@ppc970.osdl.org>
> doesn't seem to make much sense, since "regs->msr" certainly isn't
> changing, so clearly the above is equivalent to just pushing the whole
> preempt disable into "giveup_altivec()".
regs->msr can be changing. If you preempt between those 2 lines,
another process can steal the altivec or FP unit and your "regs"
wille be affected.
> The most _common_ bug (and the one I don't see any code for at all in your
> patch) is stuff that knows which CPU it is on, or that reads actual
> special CPU registers and acts on them. The other thing to look out for is
> anything that gets the CPU number: use "get_cpu() + put_cpu()" rather than
> "smp_processor_id()".
>
> Linus
>
> ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
next prev parent reply other threads:[~2004-06-07 15:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 7:53 Paul Mackerras
2004-06-07 14:56 ` Linus Torvalds
2004-06-07 15:12 ` Benjamin Herrenschmidt [this message]
2004-06-08 10:04 ` Paul Mackerras
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=1086621161.10517.54.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=paulus@samba.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®