[lkml]   [2000]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Calling current() from interrupt context
On Sun, Oct 08, 2000 at 05:05:45PM -0600, 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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