PERFORCE change 30016 for review

Juli Mallett jmallett at FreeBSD.org
Mon Apr 28 18:12:48 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=30016

Change 30016 by jmallett at jmallett_dalek on 2003/04/28 18:12:09

	Real clockframe.

Affected files ...

.. //depot/projects/mips/sys/mips/include/cpu.h#9 edit

Differences ...

==== //depot/projects/mips/sys/mips/include/cpu.h#9 (text+ko) ====

@@ -31,8 +31,26 @@
 
 #include <machine/frame.h>
 
-#define	CLKF_USERMODE(cfp)	(0)
-#define	CLKF_PC(cfp)		(0)
+/*
+ * Arguments to hardclock and gatherstats encapsulate the previous
+ * machine state in an opaque clockframe.
+ */
+struct clockframe {
+	int	pc;	/* program counter at time of interrupt */
+	int	sr;	/* status register at time of interrupt */
+	int	ppl;	/* previous priority level at time of interrupt */
+};
+
+#define	CLKF_USERMODE(framep)	((framep)->sr & MIPS_SR_KSU_USER)
+#define	CLKF_BASEPRI(framep)	\
+	((~(framep)->sr & (MIPS_INT_MASK | MIPS_SR_INT_IE)) == 0)
+
+#ifdef IPL_ICU_MASK
+#define ICU_CLKF_BASEPRI(framep)	((framep)->ppl == 0)
+#endif
+
+#define	CLKF_PC(framep)		((framep)->pc)
+#define	CLKF_INTR(framep)	(0)
 
 #define TRAPF_PC(tframe)	((tframe)->tf_regs[TF_EPC])
 


More information about the p4-projects mailing list