From owner-p4-projects@FreeBSD.ORG Sat Jul 15 07:55:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7348E16A4E1; Sat, 15 Jul 2006 07:55:40 +0000 (UTC) X-Original-To: perforce@freebsd.org 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 4DBF616A4DA for ; Sat, 15 Jul 2006 07:55:40 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B7A343D46 for ; Sat, 15 Jul 2006 07:55:40 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6F7tdGq015738 for ; Sat, 15 Jul 2006 07:55:39 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6F7tdpM015735 for perforce@freebsd.org; Sat, 15 Jul 2006 07:55:39 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 15 Jul 2006 07:55:39 GMT Message-Id: <200607150755.k6F7tdpM015735@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 101641 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2006 07:55:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=101641 Change 101641 by kmacy@kmacy_storage:sun4v_work_stable on 2006/07/15 07:54:51 fix handling of alignment faults on user addresses in copyin and umtx Affected files ... .. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/trap.c#3 edit Differences ... ==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/trap.c#3 (text+ko) ==== @@ -380,6 +380,31 @@ printf("trap: %ld=%s: 0x%lx at 0x%lx:0x%lx\n", trapno, trap_msg[trap_conversion[trapno]], data, tf->tf_tpc, tf->tf_tnpc); case T_DATA_ERROR: case T_MEM_ADDRESS_NOT_ALIGNED: + if (tf->tf_asi == ASI_AIUP) { + if (tf->tf_tpc >= (u_long)copy_nofault_begin && + tf->tf_tpc <= (u_long)copy_nofault_end) { + tf->tf_tpc = (u_long)copy_fault; + tf->tf_tnpc = tf->tf_tpc + 4; + error = 0; + break; + } + if (tf->tf_tpc >= (u_long)fs_nofault_begin && + tf->tf_tpc <= (u_long)fs_nofault_end) { + tf->tf_tpc = (u_long)fs_fault; + tf->tf_tnpc = tf->tf_tpc + 4; + error = 0; + break; + } + /* this is really too permissive, but it is needed to cope with umtx's + * casuptr + */ + tf->tf_tpc = (u_long)fs_fault; + tf->tf_tnpc = tf->tf_tpc + 4; + error = 0; + break; + + + } error = 1; break;