Messages in this thread | | | Date | Mon, 9 Oct 2000 03:28:51 +0200 | From | "Andi Kleen" <> | Subject | Re: Calling current() from interrupt context |
| |
On Mon, Oct 09, 2000 at 02:09:49AM +0100, Kenn Humborg wrote: > > 2.4 TCP code relies on current being valid in a softirq. > > > > The m68k port which has a interrupt stack solves the problem by > > loading current into a global register variable on all kernel entries. > > x86-64 will likely do the same. > > How do you tell GCC to stay away from that register when compiling > the kernel without also making it unusable in userland?
info gcc ;)
Declare a global register variable.
register struct task_struct current asm("REGNAME");
This has to be declared in all kernel files, so you may want to use gcc's -include option in CFLAGS.
Another option would be to clean up the current uses and use a special variant of current "interrupt_current". This would save some cycles in the interrupt path.
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |