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

> 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>

-
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: 2005-03-22 14:03    [W:0.031 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site