Messages in this thread | | | From | Andi Kleen <> | Subject | Re: [PATCH RFC 6/6] Implement "current" with the PDA. | Date | Sun, 27 Aug 2006 18:01:16 +0200 |
| |
On Sunday 27 August 2006 10:44, Jeremy Fitzhardinge wrote: > Use the pcurrent field in the PDA to implement the "current" macro. > This ends up compiling down to a single instruction to get the current > task. > > The slightly tricky part about this patch is that cpu_init() uses > current very early, before the PDA has been set up. In this instance, > it uses current_thread_info()->task to get the current task. > > Also, the very early PDA set up for the boot cpu contains the initial > task pointer so current works from a very early stage.
With that you could remove the code in do_IRQ now that setups up a fake thread_info for interrupt stacks.
-Andi - 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/
| |