Messages in this thread | | | Subject | Re: PREEMPT for ppc64 | From | Benjamin Herrenschmidt <> | Date | Mon, 07 Jun 2004 10:12:41 -0500 |
| |
> 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/
| |