svn commit: r250137 - head/sys/mips/mips

Warner Losh imp at FreeBSD.org
Wed May 1 06:55:14 UTC 2013


Author: imp
Date: Wed May  1 06:55:13 2013
New Revision: 250137
URL: http://svnweb.freebsd.org/changeset/base/250137

Log:
  Remove asm.h dependency in a hackish way.
  Fixed comment.

Modified:
  head/sys/mips/mips/vm_machdep.c

Modified: head/sys/mips/mips/vm_machdep.c
==============================================================================
--- head/sys/mips/mips/vm_machdep.c	Wed May  1 06:22:50 2013	(r250136)
+++ head/sys/mips/mips/vm_machdep.c	Wed May  1 06:55:13 2013	(r250137)
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/unistd.h>
 
-#include <machine/asm.h>
 #include <machine/cache.h>
 #include <machine/clock.h>
 #include <machine/cpu.h>
@@ -83,6 +82,18 @@ __FBSDID("$FreeBSD$");
 #define	NSFBUFS		(512 + maxusers * 16)
 #endif
 
+/* Duplicated from asm.h */
+#if defined(__mips_o32)
+#define	SZREG	4
+#else
+#define	SZREG	8
+#endif
+#if defined(__mips_o32) || defined(__mips_o64)
+#define	CALLFRAME_SIZ	(SZREG * (4 + 2))
+#elif defined(__mips_n32) || defined(__mips_n64)
+#define	CALLFRAME_SIZ	(SZREG * 4)
+#endif
+
 #ifndef __mips_n64
 static void	sf_buf_init(void *arg);
 SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL);
@@ -437,10 +448,11 @@ cpu_set_upcall_kse(struct thread *td, vo
 	register_t sp;
 
 	/*
-	* At the point where a function is called, sp must be 8
-	* byte aligned[for compatibility with 64-bit CPUs]
-	* in ``See MIPS Run'' by D. Sweetman, p. 269
-	* align stack */
+	 * At the point where a function is called, sp must be 8
+	 * byte aligned[for compatibility with 64-bit CPUs]
+	 * in ``See MIPS Run'' by D. Sweetman, p. 269
+	 * align stack
+	 */
 	sp = ((register_t)(intptr_t)(stack->ss_sp + stack->ss_size) & ~0x7) -
 	    CALLFRAME_SIZ;
 


More information about the svn-src-all mailing list