Messages in this thread | | | Subject | Re: Using %cr2 to reference "current" | Date | Wed, 07 Nov 2001 15:32:07 +0000 | From | David Howells <> |
| |
Instead of using %cr2, how about giving each CPU it's own GDT (the GDT doesn't need to contain many entries). Have one segment number point to a CPU specific data area that contains things like the current task pointer for that CPU, the CPU number, etc, etc. This same segment number will be used on all CPU's, but will be multiplexed via the per-CPU GDTs instead.
Then you can load up a segment register with this segment on entry to the kernel, and then make CPU data accesses relative to that.
David - 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/
| |