diff options
author | kib <kib@FreeBSD.org> | 2015-06-05 08:36:25 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-06-05 08:36:25 +0000 |
commit | 8adebdc1fb2155471d30ae8e1658f04043f30091 (patch) | |
tree | ac0fd4ac26d5483f8db92a69e2f3069d09468c6a /sys/amd64 | |
parent | 0a8cb339c3fc968720a3a61ef4613d05badcabb9 (diff) | |
download | FreeBSD-src-8adebdc1fb2155471d30ae8e1658f04043f30091.zip FreeBSD-src-8adebdc1fb2155471d30ae8e1658f04043f30091.tar.gz |
MFC r283735:
Remove several write-only variables.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 6 | ||||
-rw-r--r-- | sys/amd64/ia32/ia32_reg.c | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 1eceb2d..9e3be79 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4020,7 +4020,6 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, pd_entry_t newpde; pt_entry_t *firstpte, oldpte, pa, *pte; pt_entry_t PG_G, PG_A, PG_M, PG_RW, PG_V; - vm_offset_t oldpteva; vm_page_t mpte; int PG_PTE_CACHE; @@ -4080,10 +4079,9 @@ setpte: if (!atomic_cmpset_long(pte, oldpte, oldpte & ~PG_RW)) goto setpte; oldpte &= ~PG_RW; - oldpteva = (oldpte & PG_FRAME & PDRMASK) | - (va & ~PDRMASK); CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" - " in pmap %p", oldpteva, pmap); + " in pmap %p", (oldpte & PG_FRAME & PDRMASK) | + (va & ~PDRMASK), pmap); } if ((oldpte & PG_PTE_PROMOTE) != (newpde & PG_PTE_PROMOTE)) { atomic_add_long(&pmap_pde_p_failures, 1); diff --git a/sys/amd64/ia32/ia32_reg.c b/sys/amd64/ia32/ia32_reg.c index 5bc18f1..d0e6bfe 100644 --- a/sys/amd64/ia32/ia32_reg.c +++ b/sys/amd64/ia32/ia32_reg.c @@ -79,11 +79,9 @@ __FBSDID("$FreeBSD$"); int fill_regs32(struct thread *td, struct reg32 *regs) { - struct pcb *pcb; struct trapframe *tp; tp = td->td_frame; - pcb = td->td_pcb; if (tp->tf_flags & TF_HASSEGS) { regs->r_gs = tp->tf_gs; regs->r_fs = tp->tf_fs; @@ -113,18 +111,16 @@ fill_regs32(struct thread *td, struct reg32 *regs) int set_regs32(struct thread *td, struct reg32 *regs) { - struct pcb *pcb; struct trapframe *tp; tp = td->td_frame; if (!EFL_SECURE(regs->r_eflags, tp->tf_rflags) || !CS_SECURE(regs->r_cs)) return (EINVAL); - pcb = td->td_pcb; tp->tf_gs = regs->r_gs; tp->tf_fs = regs->r_fs; tp->tf_es = regs->r_es; tp->tf_ds = regs->r_ds; - set_pcb_flags(pcb, PCB_FULL_IRET); + set_pcb_flags(td->td_pcb, PCB_FULL_IRET); tp->tf_flags = TF_HASSEGS; tp->tf_rdi = regs->r_edi; tp->tf_rsi = regs->r_esi; |