From owner-p4-projects@FreeBSD.ORG Fri Apr 21 07:05:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4691E16A40F; Fri, 21 Apr 2006 07:05:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 073B316A401 for ; Fri, 21 Apr 2006 07:05:41 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CE5B43D7D for ; Fri, 21 Apr 2006 07:05:26 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3L75PXB043312 for ; Fri, 21 Apr 2006 07:05:25 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3L75Pbo043308 for perforce@freebsd.org; Fri, 21 Apr 2006 07:05:25 GMT (envelope-from jb@freebsd.org) Date: Fri, 21 Apr 2006 07:05:25 GMT Message-Id: <200604210705.k3L75Pbo043308@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 95764 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 07:05:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=95764 Change 95764 by jb@jb_freebsd2 on 2006/04/21 07:04:52 Add a new system header for CPU variables. This file is named the same way as Sun's file and it has their license. It has to exist as a separate file so that it can retain their license. I don't think it's possible to add CDDL restricted code to BSD licensed files. The array of cpu_core structures is explicitly for DTrace. The entire array must be mapped across all processors so that DTrace running on one processor can trace a process running on a different processor. The array exists as a global variable because that's how Sun's code accesses it. Affected files ... .. //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#2 edit .. //depot/projects/dtrace/src/sys/sys/cpuvar.h#1 add Differences ... ==== //depot/projects/dtrace/src/sys/kern/subr_pcpu.c#2 (text+ko) ==== @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD: src/sys/kern/subr_pcpu.c,v 1.8 2005/11/03 21:06:29 jhb Exp $"); #include "opt_ddb.h" +#include "opt_kdtrace.h" #include #include @@ -59,6 +60,12 @@ static struct pcpu *cpuid_to_pcpu[MAXCPU]; struct cpuhead cpuhead = SLIST_HEAD_INITIALIZER(cpuhead); +#ifdef KDTRACE +#include + +cpu_core_t cpu_core[MAXCPU]; +#endif + /* * Initialize the MI portions of a struct pcpu. */