From owner-p4-projects@FreeBSD.ORG Sun Apr 20 22:17:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 918F437B404; Sun, 20 Apr 2003 22:17:03 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48F7A37B401 for ; Sun, 20 Apr 2003 22:17:03 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E411443FAF for ; Sun, 20 Apr 2003 22:17:02 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3L5H20U001211 for ; Sun, 20 Apr 2003 22:17:02 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3L5H20t001205 for perforce@freebsd.org; Sun, 20 Apr 2003 22:17:02 -0700 (PDT) Date: Sun, 20 Apr 2003 22:17:02 -0700 (PDT) Message-Id: <200304210517.h3L5H20t001205@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29331 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2003 05:17:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=29331 Change 29331 by marcel@marcel_nfs on 2003/04/20 22:16:02 Fix braino: the size of the register stack we need to copy is not the same as the size of the register stack we want to discard. We also don't need to handle the break based syscall patch any differently. While here, do some slight retyping to make it look slightly better. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#15 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#15 (text+ko) ==== @@ -1072,11 +1072,11 @@ exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) { struct trapframe *tf; - char *kstack; - uint64_t bspst, ndirty; + uint64_t bspst, kstack, ndirty; + size_t rssz; tf = td->td_frame; - kstack = (char*)td->td_kstack; + kstack = td->td_kstack; /* * RSE magic: We have ndirty registers of the process on the kernel @@ -1094,16 +1094,15 @@ * sure we mask-off the lower 9 bits of the bspstore value just * prior to saving it in ar.k6. */ - if ((tf->tf_flags & FRAME_SYSCALL) == 0) - tf->tf_special.ndirty -= 24; ndirty = tf->tf_special.ndirty & ~0x1ff; if (ndirty > 0) { __asm __volatile("mov ar.rsc=0;;"); __asm __volatile("mov %0=ar.bspstore" : "=r"(bspst)); - bcopy(kstack + ndirty, kstack, ndirty); + rssz = bspst - kstack - ndirty; + bcopy((void*)(kstack + ndirty), (void*)kstack, rssz); bspst -= ndirty; __asm __volatile("mov ar.bspstore=%0;;" :: "r"(bspst)); - __asm __volatile("mov ar.rsc=3;;"); + __asm __volatile("mov ar.rsc=3"); tf->tf_special.ndirty -= ndirty; } ndirty = tf->tf_special.ndirty;