From owner-svn-src-head@FreeBSD.ORG Mon Sep 13 05:03:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F1751065675; Mon, 13 Sep 2010 05:03:37 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53B438FC14; Mon, 13 Sep 2010 05:03:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D53bbx062320; Mon, 13 Sep 2010 05:03:37 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D53bxm062316; Mon, 13 Sep 2010 05:03:37 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201009130503.o8D53bxm062316@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 13 Sep 2010 05:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212532 - in head/sys: conf mips/include mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 05:03:37 -0000 Author: jchandra Date: Mon Sep 13 05:03:37 2010 New Revision: 212532 URL: http://svn.freebsd.org/changeset/base/212532 Log: The functions in sys/mips/mips/psraccess.S can be implemented with mips_rd_status/mips_wr_status. Implement them in mips/include/cpufunc.h, and remove psraccess.S. Reviewed by: neel, imp Deleted: head/sys/mips/mips/psraccess.S Modified: head/sys/conf/files.mips head/sys/mips/include/cpufunc.h head/sys/mips/include/md_var.h Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Mon Sep 13 04:23:23 2010 (r212531) +++ head/sys/conf/files.mips Mon Sep 13 05:03:37 2010 (r212532) @@ -22,7 +22,6 @@ mips/mips/machdep.c standard mips/mips/mp_machdep.c optional smp mips/mips/mpboot.S optional smp -mips/mips/psraccess.S standard # ---------------------------------------------------------------------- # Phase 3 # ---------------------------------------------------------------------- Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Mon Sep 13 04:23:23 2010 (r212531) +++ head/sys/mips/include/cpufunc.h Mon Sep 13 05:03:37 2010 (r212532) @@ -266,6 +266,24 @@ intr_restore(register_t ie) } } +static __inline uint32_t +set_intr_mask(uint32_t mask) +{ + uint32_t ostatus; + + ostatus = mips_rd_status(); + mask = (ostatus & ~MIPS_SR_INT_MASK) | (~mask & MIPS_SR_INT_MASK); + mips_wr_status(mask); + return (ostatus); +} + +static __inline uint32_t +get_intr_mask(void) +{ + + return (mips_rd_status() & MIPS_SR_INT_MASK); +} + static __inline void breakpoint(void) { Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Mon Sep 13 04:23:23 2010 (r212531) +++ head/sys/mips/include/md_var.h Mon Sep 13 05:03:37 2010 (r212532) @@ -75,9 +75,5 @@ void mips_postboot_fixup(void); void platform_identify(void); extern int busdma_swi_pending; -void busdma_swi(void); - -u_int32_t set_intr_mask(u_int32_t); -u_int32_t get_intr_mask(void); - +void busdma_swi(void); #endif /* !_MACHINE_MD_VAR_H_ */