From: Linus Torvalds <torvalds@osdl.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc64-dev@lists.linuxppc.org,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
anton@samba.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: PREEMPT for ppc64
Date: Mon, 7 Jun 2004 07:56:48 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0406070737240.1730@ppc970.osdl.org> (raw)
In-Reply-To: <16580.7953.94871.281986@cargo.ozlabs.ibm.com>
On Mon, 7 Jun 2004, Paul Mackerras wrote:
>
> Here is a patch that implements CONFIG_PREEMPT for ppc64. Aside from
> the entry.S changes to check the _TIF_NEED_RESCHED bit when returning
> from an exception, most of the changes are to add preempt/{dis,en}able
> in various places. Undoubtedly I have missed some though.
I would really suggest you push these into the "enable_kernel_fp()" thing,
for example, rather than open-coding them. Also, code like
+ preempt_disable();
if (regs->msr & MSR_VEC)
giveup_altivec(current);
+ preempt_enable();
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()".
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
next prev parent reply other threads:[~2004-06-07 14:57 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 [this message]
2004-06-07 15:12 ` Benjamin Herrenschmidt
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=Pine.LNX.4.58.0406070737240.1730@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
--cc=paulus@samba.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®