Date: Wed, 1 May 2013 06:55:14 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250137 - head/sys/mips/mips Message-ID: <201305010655.r416tEAE013136@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305010655.r416tEAE013136>