From owner-cvs-all@FreeBSD.ORG Sat May 24 14:44:25 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50A8F37B401; Sat, 24 May 2003 14:44:25 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0393843F75; Sat, 24 May 2003 14:44:25 -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 h4OLiO0U006886; Sat, 24 May 2003 14:44:24 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4OLiOwa006885; Sat, 24 May 2003 14:44:24 -0700 (PDT) Message-Id: <200305242144.h4OLiOwa006885@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 24 May 2003 14:44:24 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/ia64/include cpufunc.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 21:44:25 -0000 marcel 2003/05/24 14:44:24 PDT FreeBSD src repository Modified files: sys/ia64/include cpufunc.h Log: Be more careful how we restore interrupts. Don't rewrite most of the PSR only to achieve setting PSR.i back to it's previous value. It makes it impossible to change any of the 30+ other unrelated bits when done between intr_disable() and intr_restore(). That's bad. Instead have intr_disable() return 1 when interrupts were previously enabled and 0 otherwise and only enable interrupts in intr_restore() when given a non-0 value. This change specifically disallows using intr_restore() to disable interrupts. The reason is simple: interrupts only need to be restored after they are being disabled, which means that intr_restore() is called with interrupts disabled and we only need to enable them if they were previously enabled. This change does not fix any bugs, other than that it bugged me... Approved by: re@ (blanket) Revision Changes Path 1.17 +4 -3 src/sys/ia64/include/cpufunc.h