Date: Thu, 24 Apr 2003 15:52:35 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 29641 for review Message-ID: <200304242252.h3OMqZdQ024708@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=29641 Change 29641 by peter@peter_daintree on 2003/04/24 15:52:17 kill pcb_gs and references s/pcb_psl/pcb_rflags/i Affected files ... .. //depot/projects/hammer/sys/x86_64/x86_64/genassym.c#19 edit .. //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#76 edit .. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#19 edit .. //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#22 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/x86_64/genassym.c#19 (text+ko) ==== @@ -119,10 +119,8 @@ ASSYM(PCB_RSP, offsetof(struct pcb, pcb_rsp)); ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx)); ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip)); +ASSYM(PCB_RFLAGS, offsetof(struct pcb, pcb_rflags)); -ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs)); -ASSYM(PCB_PSL, offsetof(struct pcb, pcb_psl)); - ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu)); @@ -139,7 +137,6 @@ ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler)); ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc)); ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_rflags)); -ASSYM(UC_GS, offsetof(ucontext_t, uc_mcontext.mc_gs)); ASSYM(ENOENT, ENOENT); ASSYM(EFAULT, EFAULT); ASSYM(ENAMETOOLONG, ENAMETOOLONG); ==== //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#76 (text+ko) ==== @@ -464,14 +464,7 @@ u_long ps_strings; { struct trapframe *regs = td->td_frame; -#if 0 - struct pcb *pcb = td->td_pcb; - /* Reset pc->pcb_gs and %gs before possibly invalidating it. */ - pcb->pcb_gs = _udatasel; - load_gs(_udatasel); -#endif - bzero((char *)regs, sizeof(struct trapframe)); regs->tf_rip = entry; regs->tf_rsp = stack; @@ -1312,7 +1305,6 @@ regs->r_rsp = tp->tf_rsp; regs->r_ss = tp->tf_ss; pcb = td->td_pcb; - regs->r_gs = pcb->pcb_gs; return (0); } @@ -1339,7 +1331,6 @@ tp->tf_rsp = regs->r_rsp; tp->tf_ss = regs->r_ss; pcb = td->td_pcb; - pcb->pcb_gs = regs->r_gs; return (0); } @@ -1426,7 +1417,6 @@ PROC_LOCK(curthread->td_proc); mcp->mc_onstack = sigonstack(tp->tf_rsp); PROC_UNLOCK(curthread->td_proc); - mcp->mc_gs = td->td_pcb->pcb_gs; mcp->mc_rdi = tp->tf_rdi; mcp->mc_rsi = tp->tf_rsi; mcp->mc_rbp = tp->tf_rbp; @@ -1474,7 +1464,6 @@ tp->tf_rflags = rflags; tp->tf_rsp = mcp->mc_rsp; tp->tf_ss = mcp->mc_ss; - td->td_pcb->pcb_gs = mcp->mc_gs; ret = 0; } return (ret); ==== //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#19 (text+ko) ==== @@ -104,7 +104,7 @@ movq %r14,PCB_R14(%rdx) movq %r15,PCB_R15(%rdx) pushfq /* PSL */ - popq PCB_PSL(%rdx) + popq PCB_RFLAGS(%rdx) /* have we used fp, and need a save? */ cmpq %rdi,PCPU(FPCURTHREAD) @@ -162,7 +162,7 @@ movq PCB_R15(%rdx),%r15 movq PCB_RIP(%rdx),%rax movq %rax,(%rsp) - pushq PCB_PSL(%rdx) + pushq PCB_RFLAGS(%rdx) popfq movq %rdx, PCPU(CURPCB) @@ -257,7 +257,7 @@ movq %r14,PCB_R14(%rcx) movq %r15,PCB_R15(%rcx) pushfq - popq PCB_PSL(%rcx) + popq PCB_RFLAGS(%rcx) /* * If fpcurthread == NULL, then the npx h/w state is irrelevant and the ==== //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#22 (text+ko) ==== @@ -100,8 +100,6 @@ return; /* Ensure that p1's pcb is up to date. */ - if (td1 == curthread) - td1->td_pcb->pcb_gs = rgs(); savecrit = intr_disable(); if (PCPU_GET(fpcurthread) == td1) npxsave(&td1->td_pcb->pcb_save); @@ -140,12 +138,11 @@ pcb2->pcb_rsp = (register_t)td2->td_frame - sizeof(void *); pcb2->pcb_rbx = (register_t)td2; /* fork_trampoline argument */ pcb2->pcb_rip = (register_t)fork_trampoline; - pcb2->pcb_psl = td2->td_frame->tf_rflags & ~PSL_I; /* ints disabled */ + pcb2->pcb_rflags = td2->td_frame->tf_rflags & ~PSL_I; /* ints disabled */ /*- * pcb2->pcb_savefpu: cloned above. * pcb2->pcb_flags: cloned above. * pcb2->pcb_onfault: cloned above (always NULL here?). - * pcb2->pcb_gs: cloned above. */ /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304242252.h3OMqZdQ024708>