svn commit: r212532 - in head/sys: conf mips/include mips/mips

Jayachandran C. jchandra at FreeBSD.org
Mon Sep 13 05:03:37 UTC 2010


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_ */


More information about the svn-src-head mailing list