lkml.org 
[lkml]   [2000]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.159 / U:39.796 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site