lkml.org 
[lkml]   [2000]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Calling current() from interrupt context
On Sun, Oct 08, 2000 at 05:05:45PM -0600, yodaiken@fsmlabs.com wrote:

> > > BTW: there is an implicit reference to "current" in smp_processor_id.
> >
> > Yes, on architectures that use current->processor that is an exception
> > to the rule. After all, you know for sure that you're still on the
> > same CPU as the task currently running.
>
> This makes sense. And I wish cpu architects would put a cpu-id
> register somewhere
> so that we could have fast computation of cpu-id on smp machines.

For MIPS we use $28 aka $gp which MIPS in it's generosity just doesn't use
for non-GP optimized code to point to current. That actually shaves of a
few kb of the kernel size. From there on it's just one single machine
instruction to get the cpuid which we could probably also hide in some of
the rarely accessed MMU registers.

Ralf
-
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.204 / U:12.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site