PERFORCE change 100727 for review
Wojciech A. Koszek
wkoszek at FreeBSD.org
Thu Jul 6 11:45:16 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100727
Change 100727 by wkoszek at 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
More information about the p4-projects
mailing list