diff options
-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; |