From owner-p4-projects@FreeBSD.ORG Thu Mar 13 17:48:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 42F7F1065673; Thu, 13 Mar 2008 17:48:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01562106566B for ; Thu, 13 Mar 2008 17:48:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DEC778FC15 for ; Thu, 13 Mar 2008 17:48:10 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2DHmAUC087876 for ; Thu, 13 Mar 2008 17:48:10 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2DHmA1B087874 for perforce@freebsd.org; Thu, 13 Mar 2008 17:48:10 GMT (envelope-from rrs@cisco.com) Date: Thu, 13 Mar 2008 17:48:10 GMT Message-Id: <200803131748.m2DHmA1B087874@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 137626 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: Thu, 13 Mar 2008 17:48:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=137626 Change 137626 by rrs@rrs-mips2-jnpr on 2008/03/13 17:47:17 Disable interupts right away after DO_AST and then use k1. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#22 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#22 (text+ko) ==== @@ -714,38 +714,29 @@ * k0 or k1 to store the PCB pointer. This is because k0 and k1 * are not preserved across interrupts. */ - GET_CPU_PCPU(a1) - lw a1, PC_CURPCB(a1) - RESTORE_U_PCB_REG(s0, S0, a1) - RESTORE_U_PCB_REG(s1, S1, a1) - RESTORE_U_PCB_REG(s2, S2, a1) - RESTORE_U_PCB_REG(s3, S3, a1) - RESTORE_U_PCB_REG(s4, S4, a1) - RESTORE_U_PCB_REG(s5, S5, a1) - RESTORE_U_PCB_REG(s6, S6, a1) - RESTORE_U_PCB_REG(s7, S7, a1) - RESTORE_U_PCB_REG(s8, S8, a1) - mtc0 zero, COP_0_STATUS_REG ITLBNOPFIX li v0, SR_EXL mtc0 v0, COP_0_STATUS_REG # set exeption level bit. ITLBNOPFIX - RESTORE_U_PCB_REG(t0, MULLO, a1) - RESTORE_U_PCB_REG(t1, MULHI, a1) - RESTORE_U_PCB_REG(t2, PC, a1) + GET_CPU_PCPU(k1) + lw a1, PC_CURPCB(k1) + RESTORE_U_PCB_REG(s0, S0, k1) + RESTORE_U_PCB_REG(s1, S1, k1) + RESTORE_U_PCB_REG(s2, S2, k1) + RESTORE_U_PCB_REG(s3, S3, k1) + RESTORE_U_PCB_REG(s4, S4, k1) + RESTORE_U_PCB_REG(s5, S5, k1) + RESTORE_U_PCB_REG(s6, S6, k1) + RESTORE_U_PCB_REG(s7, S7, k1) + RESTORE_U_PCB_REG(s8, S8, k1) + RESTORE_U_PCB_REG(t0, MULLO, k1) + RESTORE_U_PCB_REG(t1, MULHI, k1) + RESTORE_U_PCB_REG(t2, PC, k1) mtlo t0 mthi t1 _MTC0 t2, COP_0_EXC_PC # set return address - -/* - * The use of k1 to store the PCB pointer must be done only - * after interrupts are disabled. Otherwise it will get overwritten - * by the interrUpt code. - */ - move k1, a1 - RESTORE_U_PCB_REG(v0, V0, k1) RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) @@ -769,7 +760,7 @@ #ifdef TARGET_OCTEON and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) #endif - or k0, k0, (MIPS_SR_INT_IE) + or k0, k0, (MIPS_SR_INT_IE|SR_EXL) .set noat RESTORE_U_PCB_REG(AT, AST, k1)