Date: Sun, 30 Mar 2008 00:41:29 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 138952 for review Message-ID: <200803300041.m2U0fTU8001547@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=138952 Change 138952 by jb@jb_freebsd1 on 2008/03/30 00:41:26 More merges caused by the CDDL file move. Grumble. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/kern/opensolaris.c#1 add .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c#1 add .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/sys/cpuvar.h#2 edit .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/sys/cpuvar_defs.h#1 add .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/sys/cyclic_impl.h#1 add .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/sys/feature_tests.h#1 add .. //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/sys/sema.h#1 add .. //depot/projects/dtrace/src/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h#1 add .. //depot/projects/dtrace/src/sys/modules/cyclic_test/Makefile#3 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/dtmalloc/Makefile#2 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#16 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/fasttrap/Makefile#4 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/fbt/Makefile#4 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/lockstat/Makefile#2 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/profile/Makefile#6 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/prototype/Makefile#4 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/sdt/Makefile#5 edit .. //depot/projects/dtrace/src/sys/modules/dtrace/systrace/Makefile#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/compat/opensolaris/sys/cpuvar.h#2 (text+ko) ==== @@ -28,8 +28,30 @@ #define _COMPAT_OPENSOLARIS_SYS_CPUVAR_H #include <sys/mutex.h> +#include <sys/cpuvar_defs.h> #ifdef _KERNEL + +struct cyc_cpu; + +typedef struct { + int cpuid; + struct cyc_cpu *cpu_cyclic; + uint32_t cpu_flags; + uint_t cpu_intr_actv; + uintptr_t cpu_profile_pc; + uintptr_t cpu_profile_upc; + uintptr_t cpu_dtrace_caller; /* DTrace: caller, if any */ + hrtime_t cpu_dtrace_chillmark; /* DTrace: chill mark time */ + hrtime_t cpu_dtrace_chilled; /* DTrace: total chill time */ +} solaris_cpu_t; + +/* Some code may choose to redefine this if pcpu_t would be more useful. */ +#define cpu_t solaris_cpu_t +#define cpu_id cpuid + +extern solaris_cpu_t solaris_cpu[]; + #define CPU_CACHE_COHERENCE_SIZE 64 /* @@ -51,33 +73,50 @@ } cpu_core_t; extern cpu_core_t cpu_core[]; + +extern kmutex_t cpu_lock; #endif /* _KERNEL */ /* - * DTrace flags. + * 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_DTRACE_NOFAULT 0x0001 /* Don't fault */ -#define CPU_DTRACE_DROP 0x0002 /* Drop this ECB */ -#define CPU_DTRACE_BADADDR 0x0004 /* DTrace fault: bad address */ -#define CPU_DTRACE_BADALIGN 0x0008 /* DTrace fault: bad alignment */ -#define CPU_DTRACE_DIVZERO 0x0010 /* DTrace fault: divide by zero */ -#define CPU_DTRACE_ILLOP 0x0020 /* DTrace fault: illegal operation */ -#define CPU_DTRACE_NOSCRATCH 0x0040 /* DTrace fault: out of scratch */ -#define CPU_DTRACE_KPRIV 0x0080 /* DTrace fault: bad kernel access */ -#define CPU_DTRACE_UPRIV 0x0100 /* DTrace fault: bad user access */ -#define CPU_DTRACE_TUPOFLOW 0x0200 /* DTrace fault: tuple stack overflow */ -#if defined(__sparc) -#define CPU_DTRACE_FAKERESTORE 0x0400 /* pid provider hint to getreg */ -#endif -#define CPU_DTRACE_ENTRY 0x0800 /* pid provider hint to ustack() */ -#define CPU_DTRACE_BADSTACK 0x1000 /* DTrace fault: bad stack */ - -#define CPU_DTRACE_FAULT (CPU_DTRACE_BADADDR | CPU_DTRACE_BADALIGN | \ - CPU_DTRACE_DIVZERO | CPU_DTRACE_ILLOP | \ - CPU_DTRACE_NOSCRATCH | CPU_DTRACE_KPRIV | \ - CPU_DTRACE_UPRIV | CPU_DTRACE_TUPOFLOW | \ - CPU_DTRACE_BADSTACK) -#define CPU_DTRACE_ERROR (CPU_DTRACE_FAULT | CPU_DTRACE_DROP) +#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 */ typedef enum { CPU_INIT, ==== //depot/projects/dtrace/src/sys/modules/cyclic_test/Makefile#3 (text+ko) ==== @@ -7,8 +7,8 @@ #SRCS+= bus_if.h device_if.h vnode_if.h -CFLAGS+= -I${.CURDIR}/../../compat/opensolaris \ - -I${.CURDIR}/../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../.. IGNORE_PRAGMA= 1 ==== //depot/projects/dtrace/src/sys/modules/dtrace/dtmalloc/Makefile#2 (text+ko) ==== @@ -6,8 +6,8 @@ SRCS= dtmalloc.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> ==== //depot/projects/dtrace/src/sys/modules/dtrace/dtrace/Makefile#16 (text+ko) ==== @@ -2,7 +2,7 @@ ARCHDIR= ${MACHINE_ARCH} -.PATH: ${.CURDIR}/../../../contrib/opensolaris/uts/common/dtrace +.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace .PATH: ${.CURDIR}/../../../cddl/kern .PATH: ${.CURDIR}/../../../cddl/dev/dtrace .PATH: ${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} @@ -29,10 +29,10 @@ SRCS+= opt_apic.h .endif -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../../cddl/dev/dtrace \ -I${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. -DDIS_MEM CFLAGS+= -DSMP -DDEBUG ==== //depot/projects/dtrace/src/sys/modules/dtrace/fasttrap/Makefile#4 (text+ko) ==== @@ -6,12 +6,12 @@ SRCS= fasttrap.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" -CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/uts/intel +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel .endif CFLAGS+= -DSMP -DDEBUG ==== //depot/projects/dtrace/src/sys/modules/dtrace/fbt/Makefile#4 (text+ko) ==== @@ -6,8 +6,8 @@ SRCS= fbt.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> ==== //depot/projects/dtrace/src/sys/modules/dtrace/lockstat/Makefile#2 (text+ko) ==== @@ -5,8 +5,8 @@ KMOD= lockstat SRCS= lockstat.c -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> ==== //depot/projects/dtrace/src/sys/modules/dtrace/profile/Makefile#6 (text+ko) ==== @@ -6,8 +6,8 @@ SRCS= profile.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> ==== //depot/projects/dtrace/src/sys/modules/dtrace/prototype/Makefile#4 (text+ko) ==== @@ -6,8 +6,8 @@ SRCS= prototype.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> ==== //depot/projects/dtrace/src/sys/modules/dtrace/sdt/Makefile#5 (text+ko) ==== @@ -6,8 +6,8 @@ SRCS= sdt.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> ==== //depot/projects/dtrace/src/sys/modules/dtrace/systrace/Makefile#4 (text+ko) ==== @@ -6,8 +6,8 @@ SRCS= systrace.c SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../compat/opensolaris \ - -I${.CURDIR}/../../../contrib/opensolaris/uts/common \ +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803300041.m2U0fTU8001547>