diff options
author | imp <imp@FreeBSD.org> | 2013-05-01 06:55:13 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2013-05-01 06:55:13 +0000 |
commit | 272556ac5338f36ef5b8c69bd5ac3ec763e354fa (patch) | |
tree | 15619d4ebc96e66c7f75a9ef62828c761eb46c78 /sys/mips | |
parent | 8648dd7eeadfc53cf79f56537c17665f99c8f44d (diff) | |
download | FreeBSD-src-272556ac5338f36ef5b8c69bd5ac3ec763e354fa.zip FreeBSD-src-272556ac5338f36ef5b8c69bd5ac3ec763e354fa.tar.gz |
Remove asm.h dependency in a hackish way.
Fixed comment.
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/vm_machdep.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index d3b6fd1..4c2460a 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -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, void (*entry)(void *), void *arg, 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; |