Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2007 06:57:40 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 131297 for review
Message-ID:  <200712200657.lBK6veTm069815@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131297

Change 131297 by jb@jb_freebsd1 on 2007/12/20 06:57:03

	Suck in a bit more compatibility stuff from the genuine OpenSolaris
	header. The problem with the real one is that it brings in too
	much of the OpenSolaris internals that we don't want to have to deal	
	with.

Affected files ...

.. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cpuvar.h#3 edit

Differences ...

==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cpuvar.h#3 (text+ko) ====

@@ -54,6 +54,47 @@
 #endif /* _KERNEL */
 
 /*
+ * Flags in the CPU structure.
+ *
+ * These are protected by cpu_lock (except during creation).
+ *
+ * Offlined-CPUs have three stages of being offline:
+ *
+ * CPU_ENABLE indicates that the CPU is participating in I/O interrupts
+ * that can be directed at a number of different CPUs.  If CPU_ENABLE
+ * is off, the CPU will not be given interrupts that can be sent elsewhere,
+ * but will still get interrupts from devices associated with that CPU only,
+ * and from other CPUs.
+ *
+ * CPU_OFFLINE indicates that the dispatcher should not allow any threads
+ * other than interrupt threads to run on that CPU.  A CPU will not have
+ * CPU_OFFLINE set if there are any bound threads (besides interrupts).
+ *
+ * CPU_QUIESCED is set if p_offline was able to completely turn idle the
+ * CPU and it will not have to run interrupt threads.  In this case it'll
+ * stay in the idle loop until CPU_QUIESCED is turned off.
+ *
+ * CPU_FROZEN is used only by CPR to mark CPUs that have been successfully
+ * suspended (in the suspend path), or have yet to be resumed (in the resume
+ * case).
+ *
+ * On some platforms CPUs can be individually powered off.
+ * The following flags are set for powered off CPUs: CPU_QUIESCED,
+ * CPU_OFFLINE, and CPU_POWEROFF.  The following flags are cleared:
+ * CPU_RUNNING, CPU_READY, CPU_EXISTS, and CPU_ENABLE.
+ */
+#define	CPU_RUNNING	0x001		/* CPU running */
+#define	CPU_READY	0x002		/* CPU ready for cross-calls */
+#define	CPU_QUIESCED	0x004		/* CPU will stay in idle */
+#define	CPU_EXISTS	0x008		/* CPU is configured */
+#define	CPU_ENABLE	0x010		/* CPU enabled for interrupts */
+#define	CPU_OFFLINE	0x020		/* CPU offline via p_online */
+#define	CPU_POWEROFF	0x040		/* CPU is powered off */
+#define	CPU_FROZEN	0x080		/* CPU is frozen via CPR suspend */
+#define	CPU_SPARE	0x100		/* CPU offline available for use */
+#define	CPU_FAULTED	0x200		/* CPU offline diagnosed faulty */
+
+/*
  * DTrace flags.
  */
 #define	CPU_DTRACE_NOFAULT	0x0001	/* Don't fault */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712200657.lBK6veTm069815>