lkml.org 
[lkml]   [2004]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PREEMPT for ppc64


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.046 / U:1.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site