Remove asm.h dependency in a hackish way.

Fixed comment.
This commit is contained in:
imp 2013-05-01 06:55:13 +00:00
parent 8648dd7eea
commit 272556ac53

View File

@ -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;