Date: Thu, 6 Jul 2006 11:45:15 GMT From: "Wojciech A. Koszek" <wkoszek@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 100727 for review Message-ID: <200607061145.k66BjFiu067592@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100727 Change 100727 by wkoszek@wkoszek_laptop on 2006/07/06 11:45:11 Steal some of the ARM bits to make this file compile on MIPS. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/cpu.h#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/cpu.h#2 (text+ko) ==== @@ -37,13 +37,6 @@ #define _MACHINE_CPU_H_ /* - * Definitions unique to i386 cpu support. - */ -#include <machine/psl.h> -#include <machine/frame.h> -#include <machine/segments.h> - -/* * definitions of cpu-dependent requirements * referenced in generic code */ @@ -53,7 +46,7 @@ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_rsp) #define cpu_setstack(td, ap) ((td)->td_frame->tf_rsp = (ap)) -#define cpu_spinwait() ia32_pause() +#define cpu_spinwait() /* ia32_pause() */ #define TRAPF_USERMODE(framep) \ (ISPL((framep)->tf_cs) == SEL_UPL) @@ -78,14 +71,15 @@ void swi_vm(void *); /* - * Return contents of in-cpu fast counter as a sort of "bogo-time" - * for random-harvesting purposes. + * XXXMIPS: Taken from src/sys/arm/include/cpu.h. */ static __inline u_int64_t get_cyclecount(void) { + struct bintime bt; - return (rdtsc()); + binuptime(&bt); + return (bt.frac ^ bt.sec); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607061145.k66BjFiu067592>