diff options
author | jkim <jkim@FreeBSD.org> | 2012-06-13 22:53:56 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-06-13 22:53:56 +0000 |
commit | d0039ee2cf0f8e40d536d4f57fad8d221e152aa8 (patch) | |
tree | f90f07af9dcf9fce8852f9747a65291bae3c4a75 /sys/amd64 | |
parent | 0ca632f7e9e457afd6f19baf33eb7cb22413134d (diff) | |
download | FreeBSD-src-d0039ee2cf0f8e40d536d4f57fad8d221e152aa8.zip FreeBSD-src-d0039ee2cf0f8e40d536d4f57fad8d221e152aa8.tar.gz |
- Remove unused code for CR3 and CR4.
- Fix few style(9) nits while I am here.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/acpica/acpi_wakecode.S | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 3 | ||||
-rw-r--r-- | sys/amd64/include/pcb.h | 2 |
4 files changed, 4 insertions, 11 deletions
diff --git a/sys/amd64/acpica/acpi_wakecode.S b/sys/amd64/acpica/acpi_wakecode.S index a877328..c4b0dcd 100644 --- a/sys/amd64/acpica/acpi_wakecode.S +++ b/sys/amd64/acpica/acpi_wakecode.S @@ -220,7 +220,6 @@ wakeup_64: mov %ax, %ds /* Restore arguments. */ - movq wakeup_cr3 - wakeup_start(%rbx), %rsi movq wakeup_pcb - wakeup_start(%rbx), %rdi movq wakeup_ret - wakeup_start(%rbx), %rax @@ -273,10 +272,6 @@ bootgdtdesc: .long bootgdt - wakeup_start /* Offset plus %ds << 4 */ ALIGN_DATA -wakeup_cr4: /* not used */ - .quad 0 -wakeup_cr3: - .quad 0 wakeup_pcb: .quad 0 wakeup_ret: diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 12542d7..dea3cbe 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -394,12 +394,13 @@ ENTRY(savectx) END(savectx) /* - * resumectx(pcb, cr3) + * resumectx(pcb) * Resuming processor state from pcb. */ ENTRY(resumectx) /* Switch to KPML4phys. */ - movq %rsi,%cr3 + movq KPML4phys,%rax + movq %rax,%cr3 /* Force kernel segment registers. */ movl $KDSEL,%eax diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 2fbd9a4..aa8d217 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1429,9 +1429,6 @@ cpususpend_handler(void) CPU_SET_ATOMIC(cpu, &suspended_cpus); } else { pmap_init_pat(); -#if 0 - load_cr3(susppcbs[cpu]->pcb_cr3); -#endif initializecpu(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h index 35665f1..22cbbe2 100644 --- a/sys/amd64/include/pcb.h +++ b/sys/amd64/include/pcb.h @@ -142,7 +142,7 @@ clear_pcb_flags(struct pcb *pcb, const u_int flags) void makectx(struct trapframe *, struct pcb *); int savectx(struct pcb *) __returns_twice; -void resumectx(struct pcb *, register_t); +void resumectx(struct pcb *); #endif |