Eliminate code for gs trick to track per-cpu state. We rely on lapiccpunum()

to find a per-cpu id with which we locate a cpu's cpu struct.
This commit is contained in:
Frans Kaashoek 2017-02-01 18:04:13 -05:00
parent fbb4c09444
commit ed396c068b
8 changed files with 33 additions and 67 deletions

9
mmu.h
View file

@ -42,13 +42,12 @@
// various segment selectors.
#define SEG_KCODE 1 // kernel code
#define SEG_KDATA 2 // kernel data+stack
#define SEG_KCPU 3 // kernel per-cpu data
#define SEG_UCODE 4 // user code
#define SEG_UDATA 5 // user data+stack
#define SEG_TSS 6 // this process's task state
#define SEG_UCODE 3 // user code
#define SEG_UDATA 4 // user data+stack
#define SEG_TSS 5 // this process's task state
// cpu->gdt[NSEGS] holds the above segments.
#define NSEGS 7
#define NSEGS 6
//PAGEBREAK!
#ifndef __ASSEMBLER__