Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2008 04:19:12 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 142091 for review
Message-ID:  <200805230419.m4N4JCoW028244@repoman.freebsd.org>

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

Change 142091 by jb@freebsd3 on 2008/05/23 04:18:51

	IFC

Affected files ...

.. //depot/projects/dtrace/src/sys/amd64/amd64/identcpu.c#12 integrate
.. //depot/projects/dtrace/src/sys/arm/arm/identcpu.c#9 integrate
.. //depot/projects/dtrace/src/sys/conf/Makefile.amd64#7 integrate
.. //depot/projects/dtrace/src/sys/conf/kern.post.mk#13 integrate
.. //depot/projects/dtrace/src/sys/conf/kern.pre.mk#14 integrate
.. //depot/projects/dtrace/src/sys/conf/options.amd64#11 integrate
.. //depot/projects/dtrace/src/sys/i386/i386/identcpu.c#13 integrate
.. //depot/projects/dtrace/src/sys/ia64/ia64/machdep.c#24 integrate
.. //depot/projects/dtrace/src/sys/kern/linker_if.m#9 integrate
.. //depot/projects/dtrace/src/sys/kern/subr_smp.c#14 integrate
.. //depot/projects/dtrace/src/sys/powerpc/aim/machdep.c#11 integrate
.. //depot/projects/dtrace/src/sys/powerpc/booke/machdep.c#4 integrate
.. //depot/projects/dtrace/src/sys/sparc64/sparc64/identcpu.c#6 integrate
.. //depot/projects/dtrace/src/sys/sys/kdb.h#7 integrate
.. //depot/projects/dtrace/src/sys/sys/smp.h#8 integrate

Differences ...

==== //depot/projects/dtrace/src/sys/amd64/amd64/identcpu.c#12 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.158 2008/03/02 07:58:40 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.159 2008/05/23 04:03:52 alc Exp $");
 
 #include "opt_cpu.h"
 
@@ -71,8 +71,6 @@
 
 static void print_AMD_info(void);
 static void print_AMD_assoc(int i);
-void setPQL2(int *const size, int *const ways);
-static void setPQL2_AMD(int *const size, int *const ways);
 
 int	cpu_class;
 char machine[] = "amd64";
@@ -550,30 +548,3 @@
 		print_AMD_l2_assoc((regs[2] >> 12) & 0x0f);	
 	}
 }
-
-static void             
-setPQL2_AMD(int *const size, int *const ways)
-{
-	if (cpu_exthigh >= 0x80000006) {
-		u_int regs[4];
-
-		do_cpuid(0x80000006, regs);
-		*size = regs[2] >> 16;
-		*ways = (regs[2] >> 12) & 0x0f;
-		switch (*ways) {
-		case 0:				/* disabled/not present */
-		case 15:			/* fully associative */
-		default: *ways = 1; break;	/* reserved configuration */
-		case 4: *ways = 4; break;
-		case 6: *ways = 8; break;
-		case 8: *ways = 16; break;
-		}
-	}
-}
-
-void
-setPQL2(int *const size, int *const ways)
-{
-	if (strcmp(cpu_vendor, "AuthenticAMD") == 0)
-		setPQL2_AMD(size, ways);
-}

==== //depot/projects/dtrace/src/sys/arm/arm/identcpu.c#9 (text+ko) ====

@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/identcpu.c,v 1.12 2007/10/18 05:33:05 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/identcpu.c,v 1.13 2008/05/23 04:03:53 alc Exp $");
 #include <sys/systm.h>
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -356,14 +356,6 @@
 	"**unknown 15**",
 };
 
-void setPQL2(int *const size, int *const ways);
-
-void
-setPQL2(int *const size, int *const ways)
-{
-	return;
-}
-
 
 extern int ctrl;
 void

==== //depot/projects/dtrace/src/sys/conf/Makefile.amd64#7 (text+ko) ====

@@ -2,7 +2,7 @@
 # Copyright 1990 W. Jolitz
 #	from: @(#)Makefile.i386	7.1 5/10/91
 #	from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49
-# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.25 2007/12/07 08:20:15 jkoshy Exp $
+# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.26 2008/05/23 03:52:55 jb Exp $
 #
 # Makefile for FreeBSD
 #

==== //depot/projects/dtrace/src/sys/conf/kern.post.mk#13 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.101 2008/02/05 10:46:30 raj Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.102 2008/05/23 03:53:49 jb Exp $
 
 # Part of a unified Makefile for building kernels.  This part includes all
 # the definitions that need to be after all the % directives except %RULES

==== //depot/projects/dtrace/src/sys/conf/kern.pre.mk#14 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.97 2008/02/02 19:55:28 imp Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.98 2008/05/23 03:53:49 jb Exp $
 
 # Part of a unified Makefile for building kernels.  This part contains all
 # of the definitions that need to be before %BEFORE_DEPEND.

==== //depot/projects/dtrace/src/sys/conf/options.amd64#11 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.amd64,v 1.31 2008/03/26 22:11:59 phk Exp $
+# $FreeBSD: src/sys/conf/options.amd64,v 1.32 2008/05/23 03:52:55 jb Exp $
 # Options specific to AMD64 platform kernels
 
 AUTO_EOI_1		opt_auto_eoi.h

==== //depot/projects/dtrace/src/sys/i386/i386/identcpu.c#13 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.184 2008/03/02 07:58:40 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.185 2008/05/23 04:03:53 alc Exp $");
 
 #include "opt_cpu.h"
 
@@ -77,10 +77,6 @@
 
 static void identifycyrix(void);
 static void init_exthigh(void);
-void setPQL2(int *const size, int *const ways);
-static void setPQL2_AMD(int *const size, int *const ways);
-static void setPQL2_INTEL(int *const size, int *const ways);
-static void get_INTEL_TLB(u_int data, int *const size, int *const ways);
 static void print_AMD_info(void);
 static void print_INTEL_info(void);
 static void print_INTEL_TLB(u_int data);
@@ -1462,300 +1458,6 @@
 	}
 }
 
-
-static void
-setPQL2_AMD(int *const size, int *const ways)
-{
-	if (cpu_exthigh >= 0x80000006) {
-		u_int regs[4];
-
-		do_cpuid(0x80000006, regs);
-		*size = regs[2] >> 16;
-		*ways = (regs[2] >> 12) & 0x0f;
-	}
-}
-
-
-static void
-setPQL2_INTEL(int *const size, int *const ways)
-{
-	u_int rounds, regnum;
-	u_int regs[4];
-	u_int nwaycode;
-
-	if (cpu_high >= 2) {
-		rounds = 0;
-		do {
-			do_cpuid(0x2, regs);
-			if (rounds == 0 && (rounds = (regs[0] & 0xff)) == 0)
-				break;	/* we have a buggy CPU */
-
-			for (regnum = 0; regnum <= 3; ++regnum) {
-				if (regs[regnum] & (1<<31))
-					continue;
-				if (regnum != 0)
-					get_INTEL_TLB(regs[regnum] & 0xff,
-					    size, ways);
-				get_INTEL_TLB((regs[regnum] >> 8) & 0xff,
-				    size, ways);
-				get_INTEL_TLB((regs[regnum] >> 16) & 0xff,
-				    size, ways);
-				get_INTEL_TLB((regs[regnum] >> 24) & 0xff,
-				    size, ways);
-			}
-		} while (--rounds > 0);
-	}
-
-	if (cpu_exthigh >= 0x80000006) {
-		do_cpuid(0x80000006, regs);
-		if (*size < ((regs[2] >> 16) & 0xffff)) {
-			*size = (regs[2] >> 16) & 0xffff;
-			nwaycode = (regs[2] >> 12) & 0x0f;
-			if (nwaycode >= 0x02 && nwaycode <= 0x08)
-				*ways = 1 << (nwaycode / 2);
-			else
-				*ways = 0;
-		}
-        }
-}
-
-static void
-get_INTEL_TLB(u_int data, int *const size, int *const ways)
-{
-	switch (data) {
-	default:
-		break;
-	case 0x22:
-		/* 3rd-level cache: 512 KB, 4-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 512) {
-			*size = 512;
-			*ways = 4;
-		}
-		break;
-	case 0x23:
-		/* 3rd-level cache: 1 MB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 1024) {
-			*size = 1024;
-			*ways = 8;
-		}
-		break;
-	case 0x25:
-		/* 3rd-level cache: 2 MB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 2048) {
-			*size = 2048;
-			*ways = 8;
-		}
-		break;
-	case 0x29:
-		/* 3rd-level cache: 4 MB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 4096) {
-			*size = 4096;
-			*ways = 8;
-		}
-		break;
-	case 0x39:
-		/* 2nd-level cache: 128 KB, 4-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 128) {
-			*size = 128;
-			*ways = 4;
-		}
-		break;
-	case 0x3b:
-		/* 2nd-level cache: 128 KB, 2-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 128) {
-			*size = 128;
-			*ways = 2;
-		}
-		break;
-	case 0x3c:
-		/* 2nd-level cache: 256 KB, 4-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 256) {
-			*size = 256;
-			*ways = 4;
-		}
-		break;
-	case 0x41:
-		/* 2nd-level cache: 128 KB, 4-way set associative,
-		 * 32 byte line size */
-		if (*size < 128) {
-			*size = 128;
-			*ways = 4;
-		}
-		break;
-	case 0x42:
-		/* 2nd-level cache: 256 KB, 4-way set associative,
-		 * 32 byte line size */
-		if (*size < 256) {
-			*size = 256;
-			*ways = 4;
-		}
-		break;
-	case 0x43:
-		/* 2nd-level cache: 512 KB, 4-way set associative,
-		 * 32 byte line size */
-		if (*size < 512) {
-			*size = 512;
-			*ways = 4;
-		}
-		break;
-	case 0x44:
-		/* 2nd-level cache: 1 MB, 4-way set associative,
-		 * 32 byte line size */
-		if (*size < 1024) {
-			*size = 1024;
-			*ways = 4;
-		}
-		break;
-	case 0x45:
-		/* 2nd-level cache: 2 MB, 4-way set associative,
-		 * 32 byte line size */
-		if (*size < 2048) {
-			*size = 2048;
-			*ways = 4;
-		}
-		break;
-	case 0x46:
-		/* 3rd-level cache: 4 MB, 4-way set associative,
-		 * 64 byte line size */
-		if (*size < 4096) {
-			*size = 4096;
-			*ways = 4;
-		}
-		break;
-	case 0x47:
-		/* 3rd-level cache: 8 MB, 8-way set associative,
-		 * 64 byte line size */
-		if (*size < 8192) {
-			*size = 8192;
-			*ways = 8;
-		}
-		break;
-	case 0x78:
-		/* 2nd-level cache: 1 MB, 4-way set associative,
-		 * 64-byte line size */
-		if (*size < 1024) {
-			*size = 1024;
-			*ways = 4;
-		}
-		break;
-	case 0x79:
-		/* 2nd-level cache: 128 KB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 128) {
-			*size = 128;
-			*ways = 8;
-		}
-		break;
-	case 0x7a:
-		/* 2nd-level cache: 256 KB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 256) {
-			*size = 256;
-			*ways = 8;
-		}
-		break;
-	case 0x7b:
-		/* 2nd-level cache: 512 KB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 512) {
-			*size = 512;
-			*ways = 8;
-		}
-		break;
-	case 0x7c:
-		/* 2nd-level cache: 1 MB, 8-way set associative,
-		 * sectored cache, 64 byte line size */
-		if (*size < 1024) {
-			*size = 1024;
-			*ways = 8;
-		}
-		break;
-	case 0x7d:
-		/* 2nd-level cache: 2 MB, 8-way set associative,
-		 * 64-byte line size */
-		if (*size < 2048) {
-			*size = 2048;
-			*ways = 8;
-		}
-		break;
-	case 0x7f:
-		/* 2nd-level cache: 512 KB, 2-way set associative,
-		 * 64-byte line size */
-		if (*size < 512) {
-			*size = 512;
-			*ways = 2;
-		}
-		break;
-	case 0x82:
-		/* 2nd-level cache: 256 KB, 8-way set associative,
-		 * 32 byte line size */
-		if (*size < 256) {
-			*size = 256;
-			*ways = 8;
-		}
-		break;
-	case 0x83:
-		/* 2nd-level cache: 512 KB, 8-way set associative,
-		 * 32 byte line size */
-		if (*size < 512) {
-			*size = 512;
-			*ways = 8;
-		}
-		break;
-	case 0x84:
-		/* 2nd-level cache: 1 MB, 8-way set associative,
-		 * 32 byte line size */
-		if (*size < 1024) {
-			*size = 1024;
-			*ways = 8;
-		}
-		break;
-	case 0x85:
-		/* 2nd-level cache: 2 MB, 8-way set associative,
-		 * 32 byte line size */
-		if (*size < 2048) {
-			*size = 2048;
-			*ways = 8;
-		}
-		break;
-	case 0x86:
-		/* 2nd-level cache: 512 KB, 4-way set associative,
-		 * 64 byte line size */
-		if (*size < 512) {
-			*size = 512;
-			*ways = 4;
-		}
-		break;
-	case 0x87:
-		/* 2nd-level cache: 1 MB, 8-way set associative,
-		 * 64 byte line size */
-		if (*size < 1024) {
-			*size = 512;
-			*ways = 8;
-		}
-		break;
-	}
-}
-
-void
-setPQL2(int *const size, int *const ways)
-{
-	/* make sure the cpu_exthigh variable is initialized */
-	init_exthigh();
-
-	if (strcmp(cpu_vendor, "AuthenticAMD") == 0)
-		setPQL2_AMD(size, ways);
-	else if (strcmp(cpu_vendor, "GenuineIntel") == 0)
-		setPQL2_INTEL(size, ways);
-}
-
 static void
 print_transmeta_info(void)
 {

==== //depot/projects/dtrace/src/sys/ia64/ia64/machdep.c#24 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.240 2008/05/21 05:15:27 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.241 2008/05/23 04:03:53 alc Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -162,14 +162,6 @@
 #define	Mhz	1000000L
 #define	Ghz	(1000L*Mhz)
 
-void setPQL2(int *const size, int *const ways);
-
-void
-setPQL2(int *const size, int *const ways)
-{
-	return;
-}
-
 static void
 identifycpu(void)
 {

==== //depot/projects/dtrace/src/sys/kern/linker_if.m#9 (text+ko) ====

@@ -23,7 +23,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/sys/kern/linker_if.m,v 1.7 2007/11/18 00:23:31 jb Exp $
+# $FreeBSD: src/sys/kern/linker_if.m,v 1.8 2008/05/23 04:06:49 jb Exp $
 #
 
 #include <sys/linker.h>

==== //depot/projects/dtrace/src/sys/kern/subr_smp.c#14 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_smp.c,v 1.206 2008/03/16 10:58:05 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_smp.c,v 1.207 2008/05/23 04:05:26 jb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/dtrace/src/sys/powerpc/aim/machdep.c#11 (text+ko) ====

@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/powerpc/aim/machdep.c,v 1.115 2008/04/27 22:33:42 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/powerpc/aim/machdep.c,v 1.116 2008/05/23 04:03:53 alc Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -166,14 +166,6 @@
 
 struct kva_md_info kmi;
 
-void setPQL2(int *const size, int *const ways);
-
-void
-setPQL2(int *const size, int *const ways)
-{
-	return;
-}
-
 static void
 powerpc_ofw_shutdown(void *junk, int howto)
 {

==== //depot/projects/dtrace/src/sys/powerpc/booke/machdep.c#4 (text+ko) ====

@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/powerpc/booke/machdep.c,v 1.5 2008/04/25 05:18:49 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/powerpc/booke/machdep.c,v 1.6 2008/05/23 04:03:53 alc Exp $");
 
 #include "opt_compat.h"
 #include "opt_kstack_pages.h"
@@ -186,14 +186,6 @@
 void dump_bootinfo(void);
 void dump_kenv(void);
 void e500_init(u_int32_t, u_int32_t, void *);
-void setPQL2(int *const size, int *const ways);
-
-void
-setPQL2(int *const size, int *const ways)
-{
-
-	return;
-}
 
 static void
 cpu_e500_startup(void *dummy)

==== //depot/projects/dtrace/src/sys/sparc64/sparc64/identcpu.c#6 (text+ko) ====

@@ -8,7 +8,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/identcpu.c,v 1.17 2007/05/20 13:47:36 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/identcpu.c,v 1.18 2008/05/23 04:03:54 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -29,19 +29,6 @@
 
 int cpu_impl;
 
-void setPQL2(int *const size, int *const ways);
-
-void
-setPQL2(int *const size, int *const ways)
-{
-#ifdef SUN4V
-/* XXX hardcoding is lame */
-	*size = 3*1024;
-	*ways = 12;
-#endif
-	return;
-}
-
 void
 cpu_identify(u_long vers, u_int freq, u_int id)
 {

==== //depot/projects/dtrace/src/sys/sys/kdb.h#7 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/kdb.h,v 1.7 2008/05/04 23:29:38 peter Exp $
+ * $FreeBSD: src/sys/sys/kdb.h,v 1.8 2008/05/23 04:00:44 jb Exp $
  */
 
 #ifndef _SYS_KDB_H_

==== //depot/projects/dtrace/src/sys/sys/smp.h#8 (text+ko) ====

@@ -6,7 +6,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  *
- * $FreeBSD: src/sys/sys/smp.h,v 1.87 2008/03/02 07:58:42 jeff Exp $
+ * $FreeBSD: src/sys/sys/smp.h,v 1.88 2008/05/23 04:05:26 jb Exp $
  */
 
 #ifndef _SYS_SMP_H_



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