PERFORCE change 136676 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Mar 2 17:19:55 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=136676
Change 136676 by marcel at marcel_cluster on 2008/03/02 17:19:15
IFC @136675
Affected files ...
.. //depot/projects/e500/Makefile.inc1#10 integrate
.. //depot/projects/e500/gnu/usr.bin/binutils/ar/Makefile#4 integrate
.. //depot/projects/e500/gnu/usr.bin/binutils/ranlib/Makefile#4 integrate
.. //depot/projects/e500/lib/libc/sys/Symbol.map#6 integrate
.. //depot/projects/e500/lib/libelf/gelf_rel.c#2 integrate
.. //depot/projects/e500/lib/libelf/gelf_rela.c#2 integrate
.. //depot/projects/e500/lib/msun/Makefile#10 integrate
.. //depot/projects/e500/lib/msun/Symbol.map#9 integrate
.. //depot/projects/e500/lib/msun/amd64/Makefile.inc#5 integrate
.. //depot/projects/e500/lib/msun/amd64/e_sqrtl.S#1 branch
.. //depot/projects/e500/lib/msun/i387/Makefile.inc#4 integrate
.. //depot/projects/e500/lib/msun/i387/e_sqrtl.S#1 branch
.. //depot/projects/e500/lib/msun/man/sqrt.3#3 integrate
.. //depot/projects/e500/lib/msun/src/e_sqrt.c#2 integrate
.. //depot/projects/e500/lib/msun/src/e_sqrtl.c#1 branch
.. //depot/projects/e500/lib/msun/src/math.h#6 integrate
.. //depot/projects/e500/sys/amd64/amd64/identcpu.c#5 integrate
.. //depot/projects/e500/sys/amd64/amd64/mp_machdep.c#5 integrate
.. //depot/projects/e500/sys/amd64/include/smp.h#4 integrate
.. //depot/projects/e500/sys/compat/linux/linux_futex.c#3 integrate
.. //depot/projects/e500/sys/conf/NOTES#15 integrate
.. //depot/projects/e500/sys/conf/files#16 integrate
.. //depot/projects/e500/sys/conf/options#12 integrate
.. //depot/projects/e500/sys/geom/part/g_part_vtoc8.c#1 branch
.. //depot/projects/e500/sys/i386/i386/identcpu.c#5 integrate
.. //depot/projects/e500/sys/i386/i386/mp_machdep.c#6 integrate
.. //depot/projects/e500/sys/i386/include/smp.h#4 integrate
.. //depot/projects/e500/sys/ia64/ia64/mp_machdep.c#4 integrate
.. //depot/projects/e500/sys/kern/init_main.c#9 integrate
.. //depot/projects/e500/sys/kern/init_sysent.c#5 integrate
.. //depot/projects/e500/sys/kern/kern_cpuset.c#1 branch
.. //depot/projects/e500/sys/kern/kern_thread.c#11 integrate
.. //depot/projects/e500/sys/kern/sched_4bsd.c#7 integrate
.. //depot/projects/e500/sys/kern/sched_ule.c#9 integrate
.. //depot/projects/e500/sys/kern/subr_smp.c#7 integrate
.. //depot/projects/e500/sys/kern/syscalls.c#5 integrate
.. //depot/projects/e500/sys/kern/syscalls.master#6 integrate
.. //depot/projects/e500/sys/kern/systrace_args.c#5 integrate
.. //depot/projects/e500/sys/modules/geom/Makefile#5 integrate
.. //depot/projects/e500/sys/modules/geom/geom_apple/Makefile#2 delete
.. //depot/projects/e500/sys/modules/geom/geom_gpt/Makefile#2 delete
.. //depot/projects/e500/sys/modules/geom/geom_part/Makefile#1 branch
.. //depot/projects/e500/sys/netinet/tcp_input.c#9 integrate
.. //depot/projects/e500/sys/netipsec/key.c#4 integrate
.. //depot/projects/e500/sys/netipsec/key_debug.c#3 integrate
.. //depot/projects/e500/sys/powerpc/aim/machdep.c#10 integrate
.. //depot/projects/e500/sys/powerpc/aim/swtch.S#5 integrate
.. //depot/projects/e500/sys/powerpc/aim/trap.c#8 integrate
.. //depot/projects/e500/sys/powerpc/aim/trap_subr.S#6 integrate
.. //depot/projects/e500/sys/powerpc/aim/vm_machdep.c#9 integrate
.. //depot/projects/e500/sys/powerpc/include/frame.h#4 integrate
.. //depot/projects/e500/sys/powerpc/include/hid.h#6 integrate
.. //depot/projects/e500/sys/powerpc/include/kdb.h#5 integrate
.. //depot/projects/e500/sys/powerpc/include/pcb.h#5 integrate
.. //depot/projects/e500/sys/powerpc/include/pcpu.h#5 integrate
.. //depot/projects/e500/sys/powerpc/powerpc/db_trace.c#5 integrate
.. //depot/projects/e500/sys/powerpc/powerpc/genassym.c#8 integrate
.. //depot/projects/e500/sys/powerpc/powerpc/mp_machdep.c#2 integrate
.. //depot/projects/e500/sys/sparc64/sparc64/mp_machdep.c#5 integrate
.. //depot/projects/e500/sys/sun4v/sun4v/mp_machdep.c#4 integrate
.. //depot/projects/e500/sys/sys/_types.h#2 integrate
.. //depot/projects/e500/sys/sys/cpuset.h#1 branch
.. //depot/projects/e500/sys/sys/proc.h#11 integrate
.. //depot/projects/e500/sys/sys/sched.h#4 integrate
.. //depot/projects/e500/sys/sys/smp.h#3 integrate
.. //depot/projects/e500/sys/sys/syscall.h#5 integrate
.. //depot/projects/e500/sys/sys/syscall.mk#5 integrate
.. //depot/projects/e500/sys/sys/sysproto.h#5 integrate
.. //depot/projects/e500/sys/sys/types.h#3 integrate
.. //depot/projects/e500/sys/sys/vtoc.h#1 branch
.. //depot/projects/e500/usr.bin/Makefile#7 integrate
.. //depot/projects/e500/usr.bin/ar/write.c#3 integrate
.. //depot/projects/e500/usr.bin/cpuset/Makefile#1 branch
.. //depot/projects/e500/usr.bin/cpuset/cpuset.c#1 branch
Differences ...
==== //depot/projects/e500/Makefile.inc1#10 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/Makefile.inc1,v 1.600 2008/02/25 16:29:54 ru Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.601 2008/03/02 11:10:46 ru Exp $
#
# Make command line options:
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -203,6 +203,9 @@
GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
+.if ${OSRELDATE} < 700044
+CROSSENV+= AR=gnu-ar RANLIB=gnu-ranlib
+.endif
# bootstrap-tools stage
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
@@ -972,10 +975,6 @@
.endif
.endif
-.if make(cross-tools) && ${BOOTSTRAPPING} < 700044
-.MAKEFLAGS+= -D_WITH_GNUAR
-.endif
-
cross-tools:
.for _tool in \
gnu/usr.bin/binutils \
==== //depot/projects/e500/gnu/usr.bin/binutils/ar/Makefile#4 (text+ko) ====
@@ -1,16 +1,14 @@
-# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.17 2008/02/25 16:16:16 ru Exp $
+# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.18 2008/03/02 11:10:46 ru Exp $
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
-.if !defined(_WITH_GNUAR)
PROGNAME= gnu-ar
MAN= gnu-ar.1
gnu-ar.1: ar.1
cat ${.ALLSRC} > ${.TARGET}
CLEANFILES+= gnu-ar.1
-.endif
PROG= ar
SRCS= ar.c not-ranlib.c
==== //depot/projects/e500/gnu/usr.bin/binutils/ranlib/Makefile#4 (text+ko) ====
@@ -1,16 +1,14 @@
-# $FreeBSD: src/gnu/usr.bin/binutils/ranlib/Makefile,v 1.18 2008/02/25 16:16:16 ru Exp $
+# $FreeBSD: src/gnu/usr.bin/binutils/ranlib/Makefile,v 1.19 2008/03/02 11:10:46 ru Exp $
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
-.if !defined(_WITH_GNUAR)
PROGNAME= gnu-ranlib
MAN= gnu-ranlib.1
gnu-ranlib.1: ranlib.1
cat ${.ALLSRC} > ${.TARGET}
CLEANFILES+= gnu-ranlib.1
-.endif
PROG= ranlib
SRCS= ar.c is-ranlib.c
==== //depot/projects/e500/lib/libc/sys/Symbol.map#6 (text) ====
@@ -1,5 +1,5 @@
/*
- * $FreeBSD: src/lib/libc/sys/Symbol.map,v 1.9 2007/08/22 01:56:35 davidxu Exp $
+ * $FreeBSD: src/lib/libc/sys/Symbol.map,v 1.10 2008/03/02 07:39:22 jeff Exp $
*/
/*
@@ -66,6 +66,11 @@
clock_settime;
close;
connect;
+ cpuset;
+ cpuset_getid;
+ cpuset_setid;
+ cpuset_getaffinity;
+ cpuset_setaffinity;
dup;
dup2;
eaccess;
@@ -450,6 +455,16 @@
__sys_close;
_connect;
__sys_connect;
+ __cpuset;
+ __sys_cpuset;
+ __cpuset_getid;
+ __sys_cpuset_getid;
+ __cpuset_setid;
+ __sys_cpuset_setid;
+ __cpuset_getaffinity;
+ __sys_cpuset_getaffinity;
+ __cpuset_setaffinity;
+ __sys_cpuset_setaffinity;
_dup;
__sys_dup;
_dup2;
==== //depot/projects/e500/lib/libelf/gelf_rel.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libelf/gelf_rel.c,v 1.1 2006/11/11 17:16:33 jkoshy Exp $");
+__FBSDID("$FreeBSD: src/lib/libelf/gelf_rel.c,v 1.2 2008/03/02 06:33:10 jkoshy Exp $");
#include <sys/limits.h>
@@ -78,7 +78,9 @@
rel32 = (Elf32_Rel *) d->d_buf + ndx;
dst->r_offset = (Elf64_Addr) rel32->r_offset;
- dst->r_info = (Elf64_Xword) rel32->r_info;
+ dst->r_info = ELF64_R_INFO(
+ (Elf64_Xword) ELF32_R_SYM(rel32->r_info),
+ ELF32_R_TYPE(rel32->r_info));
} else {
@@ -133,7 +135,14 @@
rel32 = (Elf32_Rel *) d->d_buf + ndx;
LIBELF_COPY_U32(rel32, dr, r_offset);
- LIBELF_COPY_U32(rel32, dr, r_info);
+
+ if (ELF64_R_SYM(dr->r_info) > ELF32_R_SYM(~0UL) ||
+ ELF64_R_TYPE(dr->r_info) > ELF32_R_TYPE(~0U)) {
+ LIBELF_SET_ERROR(RANGE, 0);
+ return (0);
+ }
+ rel32->r_info = ELF32_R_INFO(ELF64_R_SYM(dr->r_info),
+ ELF64_R_TYPE(dr->r_info));
} else {
rel64 = (Elf64_Rel *) d->d_buf + ndx;
==== //depot/projects/e500/lib/libelf/gelf_rela.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libelf/gelf_rela.c,v 1.1 2006/11/11 17:16:33 jkoshy Exp $");
+__FBSDID("$FreeBSD: src/lib/libelf/gelf_rela.c,v 1.2 2008/03/02 06:33:10 jkoshy Exp $");
#include <sys/limits.h>
@@ -78,7 +78,9 @@
rela32 = (Elf32_Rela *) d->d_buf + ndx;
dst->r_offset = (Elf64_Addr) rela32->r_offset;
- dst->r_info = (Elf64_Xword) rela32->r_info;
+ dst->r_info = ELF64_R_INFO(
+ (Elf64_Xword) ELF32_R_SYM(rela32->r_info),
+ ELF32_R_TYPE(rela32->r_info));
dst->r_addend = (Elf64_Sxword) rela32->r_addend;
} else {
@@ -134,7 +136,15 @@
rela32 = (Elf32_Rela *) d->d_buf + ndx;
LIBELF_COPY_U32(rela32, dr, r_offset);
- LIBELF_COPY_U32(rela32, dr, r_info);
+
+ if (ELF64_R_SYM(dr->r_info) > ELF32_R_SYM(~0UL) ||
+ ELF64_R_TYPE(dr->r_info) > ELF32_R_TYPE(~0U)) {
+ LIBELF_SET_ERROR(RANGE, 0);
+ return (0);
+ }
+ rela32->r_info = ELF32_R_INFO(ELF64_R_SYM(dr->r_info),
+ ELF64_R_TYPE(dr->r_info));
+
LIBELF_COPY_S32(rela32, dr, r_addend);
} else {
rela64 = (Elf64_Rela *) d->d_buf + ndx;
==== //depot/projects/e500/lib/msun/Makefile#10 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 5.1beta 93/09/24
-# $FreeBSD: src/lib/msun/Makefile,v 1.89 2008/02/18 17:27:11 das Exp $
+# $FreeBSD: src/lib/msun/Makefile,v 1.90 2008/03/02 01:48:17 das Exp $
#
# ====================================================
# Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -79,7 +79,7 @@
COMMON_SRCS+= s_copysignl.c s_fabsl.c s_llrintl.c s_lrintl.c s_modfl.c
.if ${LDBL_PREC} != 53
# If long double != double use these; otherwise, we alias the double versions.
-COMMON_SRCS+= k_cosl.c k_sinl.c k_tanl.c s_ceill.c s_cosl.c \
+COMMON_SRCS+= e_sqrtl.c k_cosl.c k_sinl.c k_tanl.c s_ceill.c s_cosl.c \
s_exp2l.c s_floorl.c s_fmal.c \
s_frexpl.c s_logbl.c s_nanl.c s_nextafterl.c s_nexttoward.c \
s_rintl.c s_scalbnl.c s_sinl.c s_tanl.c s_truncl.c
@@ -171,7 +171,7 @@
MLINKS+=scalbn.3 scalbnf.3 scalbn.3 scalbnl.3
MLINKS+=sin.3 sinf.3 sin.3 sinl.3
MLINKS+=sinh.3 sinhf.3
-MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3
+MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3 sqrt.3 sqrtl.3
MLINKS+=tan.3 tanf.3 tan.3 tanl.3
MLINKS+=tanh.3 tanhf.3
MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3
==== //depot/projects/e500/lib/msun/Symbol.map#9 (text) ====
@@ -1,5 +1,5 @@
/*
- * $FreeBSD: src/lib/msun/Symbol.map,v 1.14 2008/02/18 17:27:11 das Exp $
+ * $FreeBSD: src/lib/msun/Symbol.map,v 1.15 2008/03/02 01:48:17 das Exp $
*/
/* 7.0-CURRENT */
@@ -202,4 +202,5 @@
cosl;
tanl;
tgammaf;
+ sqrtl;
};
==== //depot/projects/e500/lib/msun/amd64/Makefile.inc#5 (text+ko) ====
@@ -1,6 +1,6 @@
-# $FreeBSD: src/lib/msun/amd64/Makefile.inc,v 1.8 2008/02/13 06:01:48 bde Exp $
+# $FreeBSD: src/lib/msun/amd64/Makefile.inc,v 1.9 2008/03/02 01:48:17 das Exp $
-ARCH_SRCS = e_sqrt.S e_sqrtf.S s_llrint.S s_llrintf.S s_llrintl.S \
+ARCH_SRCS = e_sqrt.S e_sqrtf.S e_sqrtl.S s_llrint.S s_llrintf.S s_llrintl.S \
s_logbl.S s_lrint.S s_lrintf.S s_lrintl.S \
e_remainder.S e_remainderf.S s_remquo.S s_remquof.S \
s_rintl.S s_scalbn.S s_scalbnf.S s_scalbnl.S
==== //depot/projects/e500/lib/msun/i387/Makefile.inc#4 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/msun/i387/Makefile.inc,v 1.11 2008/01/14 02:12:07 das Exp $
+# $FreeBSD: src/lib/msun/i387/Makefile.inc,v 1.12 2008/03/02 01:48:17 das Exp $
ARCH_SRCS = e_exp.S e_fmod.S e_log.S e_log10.S \
e_remainder.S e_sqrt.S s_ceil.S s_copysign.S \
@@ -13,7 +13,7 @@
s_remquof.S s_rintf.S s_scalbnf.S s_significandf.S s_truncf.S
# long double counterparts
-ARCH_SRCS+= s_ceill.S s_copysignl.S s_floorl.S s_llrintl.S \
+ARCH_SRCS+= e_sqrtl.S s_ceill.S s_copysignl.S s_floorl.S s_llrintl.S \
s_logbl.S s_lrintl.S s_rintl.S s_scalbnl.S s_truncl.S
LDBL_PREC = 64 # XXX 64-bit format, but truncated to 53 bits
==== //depot/projects/e500/lib/msun/man/sqrt.3#3 (text+ko) ====
@@ -26,16 +26,17 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)sqrt.3 6.4 (Berkeley) 5/6/91
-.\" $FreeBSD: src/lib/msun/man/sqrt.3,v 1.14 2007/12/14 07:53:09 das Exp $
+.\" $FreeBSD: src/lib/msun/man/sqrt.3,v 1.15 2008/03/02 01:48:17 das Exp $
.\"
-.Dd December 14, 2007
+.Dd March 1, 2008
.Dt SQRT 3
.Os
.Sh NAME
.Nm cbrt ,
.Nm cbrtf ,
.Nm sqrt ,
-.Nm sqrtf
+.Nm sqrtf ,
+.Nm sqrtl
.Nd cube root and square root functions
.Sh LIBRARY
.Lb libm
@@ -49,6 +50,8 @@
.Fn sqrt "double x"
.Ft float
.Fn sqrtf "float x"
+.Ft long double
+.Fn sqrtl "long double x"
.Sh DESCRIPTION
The
.Fn cbrt
@@ -59,9 +62,10 @@
.Ar x .
.Pp
The
-.Fn sqrt
-and the
-.Fn sqrtf
+.Fn sqrt ,
+.Fn sqrtf ,
+and
+.Fn sqrtl
functions compute the
non-negative square root of x.
.Sh RETURN VALUES
@@ -71,9 +75,10 @@
.Fn cbrtf
functions return the requested cube root.
The
-.Fn sqrt
-and the
-.Fn sqrtf
+.Fn sqrt ,
+.Fn sqrtf ,
+and
+.Fn sqrtl
functions return the requested square root
unless an error occurs.
An attempt to take the
@@ -90,8 +95,9 @@
.Fn cbrt ,
.Fn cbrtf ,
.Fn sqrt ,
+.Fn sqrtf ,
and
-.Fn sqrtf
+.Fn sqrtl
functions conform to
.St -isoC-99 .
.Sh HISTORY
@@ -99,3 +105,7 @@
.Fn cbrt
function appeared in
.Bx 4.3 .
+The
+.Fn sqrtl
+function appeared in
+.Fx 8.0 .
==== //depot/projects/e500/lib/msun/src/e_sqrt.c#2 (text+ko) ====
@@ -11,9 +11,8 @@
* ====================================================
*/
-#ifndef lint
-static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_sqrt.c,v 1.10 2005/02/04 18:26:06 das Exp $";
-#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/lib/msun/src/e_sqrt.c,v 1.11 2008/03/02 01:47:58 das Exp $");
/* __ieee754_sqrt(x)
* Return correctly rounded sqrt.
@@ -85,6 +84,8 @@
*---------------
*/
+#include <float.h>
+
#include "math.h"
#include "math_private.h"
@@ -187,6 +188,10 @@
return z;
}
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(sqrt, sqrtl);
+#endif
+
/*
Other methods (use floating-point arithmetic)
-------------
==== //depot/projects/e500/lib/msun/src/math.h#6 (text+ko) ====
@@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD: src/lib/msun/src/math.h,v 1.69 2008/02/18 17:27:10 das Exp $
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.70 2008/03/02 01:47:58 das Exp $
*/
#ifndef _MATH_H_
@@ -468,8 +468,8 @@
long double sinhl(long double);
#endif
long double sinl(long double);
+long double sqrtl(long double);
#if 0
-long double sqrtl(long double);
long double tanhl(long double);
#endif
long double tanl(long double);
==== //depot/projects/e500/sys/amd64/amd64/identcpu.c#5 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.157 2008/02/02 23:17:27 das Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.158 2008/03/02 07:58:40 jeff Exp $");
#include "opt_cpu.h"
@@ -97,6 +97,10 @@
{ "Sledgehammer", CPUCLASS_K8 }, /* CPU_SLEDGEHAMMER */
};
+int cpu_cores;
+int cpu_logical;
+
+
extern int pq_l2size;
extern int pq_l2nways;
@@ -360,11 +364,13 @@
if ((regs[0] & 0x1f) != 0)
cmp = ((regs[0] >> 26) & 0x3f) + 1;
}
+ cpu_cores = cmp;
+ cpu_logical = htt / cmp;
if (cmp > 1)
printf("\n Cores per package: %d", cmp);
if ((htt / cmp) > 1)
printf("\n Logical CPUs per core: %d",
- htt / cmp);
+ cpu_logical);
}
}
/* Avoid ugly blank lines: only print newline when we have to. */
==== //depot/projects/e500/sys/amd64/amd64/mp_machdep.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.287 2007/08/02 21:17:58 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.288 2008/03/02 07:58:40 jeff Exp $");
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
@@ -83,12 +83,6 @@
extern struct pcpu __pcpu[];
-/*
- * CPU topology map datastructures for HTT.
- */
-static struct cpu_group mp_groups[MAXCPU];
-static struct cpu_top mp_top;
-
/* AP uses this during bootstrap. Do not staticize. */
char *bootSTK;
static int bootAP;
@@ -182,40 +176,38 @@
mem_range_softc.mr_op->initAP(&mem_range_softc);
}
-void
-mp_topology(void)
+struct cpu_group *
+cpu_topo(void)
{
- struct cpu_group *group;
- int apic_id;
- int groups;
- int cpu;
-
- /* Build the smp_topology map. */
- /* Nothing to do if there is no HTT support. */
- if (hyperthreading_cpus <= 1)
- return;
- group = &mp_groups[0];
- groups = 1;
- for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) {
- if (!cpu_info[apic_id].cpu_present)
- continue;
- /*
- * If the current group has members and we're not a logical
- * cpu, create a new group.
- */
- if (group->cg_count != 0 &&
- (apic_id % hyperthreading_cpus) == 0) {
- group++;
- groups++;
- }
- group->cg_count++;
- group->cg_mask |= 1 << cpu;
- cpu++;
+ if (cpu_cores == 0)
+ cpu_cores = 1;
+ if (cpu_logical == 0)
+ cpu_logical = 1;
+ if (mp_ncpus % (cpu_cores * cpu_logical) != 0) {
+ printf("WARNING: Non-uniform processors.\n");
+ printf("WARNING: Using suboptimal topology.\n");
+ return (smp_topo_none());
}
-
- mp_top.ct_count = groups;
- mp_top.ct_group = mp_groups;
- smp_topology = &mp_top;
+ /*
+ * No multi-core or hyper-threaded.
+ */
+ if (cpu_logical * cpu_cores == 1)
+ return (smp_topo_none());
+ /*
+ * Only HTT no multi-core.
+ */
+ if (cpu_logical > 1 && cpu_cores == 1)
+ return (smp_topo_1level(CG_SHARE_L1, cpu_logical, CG_FLAG_HTT));
+ /*
+ * Only multi-core no HTT.
+ */
+ if (cpu_cores > 1 && cpu_logical == 1)
+ return (smp_topo_1level(CG_SHARE_NONE, cpu_cores, 0));
+ /*
+ * Both HTT and multi-core.
+ */
+ return (smp_topo_2level(CG_SHARE_NONE, cpu_cores,
+ CG_SHARE_L1, cpu_logical, CG_FLAG_HTT));
}
/*
@@ -409,9 +401,6 @@
}
set_interrupt_apic_ids();
-
- /* Last, setup the cpu topology now that we have probed CPUs */
- mp_topology();
}
==== //depot/projects/e500/sys/amd64/include/smp.h#4 (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/amd64/include/smp.h,v 1.91 2007/09/20 20:38:43 attilio Exp $
+ * $FreeBSD: src/sys/amd64/include/smp.h,v 1.92 2008/03/02 07:58:40 jeff Exp $
*
*/
@@ -36,6 +36,10 @@
extern struct pcb stoppcbs[];
extern int cpu_apic_ids[];
+/* global data in identcpu.c */
+extern int cpu_cores;
+extern int cpu_logical;
+
/* IPI handlers */
inthand_t
IDTVEC(invltlb), /* TLB shootdowns - global */
@@ -57,7 +61,6 @@
void ipi_bitmap_handler(struct trapframe frame);
u_int mp_bootaddress(u_int);
int mp_grab_cpu_hlt(void);
-void mp_topology(void);
void smp_cache_flush(void);
void smp_invlpg(vm_offset_t addr);
void smp_masked_invlpg(u_int mask, vm_offset_t addr);
==== //depot/projects/e500/sys/compat/linux/linux_futex.c#3 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.10 2007/05/23 08:33:05 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.11 2008/03/02 14:00:50 kib Exp $");
#if 0
__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $");
#endif
@@ -327,7 +327,7 @@
default:
printf("linux_sys_futex: unknown op %d\n",
args->op);
- break;
+ return (ENOSYS);
}
return (0);
}
==== //depot/projects/e500/sys/conf/NOTES#15 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1471 2008/03/01 01:09:35 jfv Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1472 2008/03/02 06:24:29 marcel Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -149,6 +149,7 @@
options GEOM_PART_BSD # BSD disklabel
options GEOM_PART_GPT # GPT partitioning
options GEOM_PART_MBR # MBR partitioning
+options GEOM_PART_VTOC8 # SMI VTOC8 disk label
options GEOM_PC98 # NEC PC9800 partitioning
options GEOM_RAID3 # RAID3 functionality.
options GEOM_SHSEC # Shared secret.
==== //depot/projects/e500/sys/conf/files#16 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1273 2008/03/01 03:58:49 jfv Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1275 2008/03/02 07:39:21 jeff Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -1328,6 +1328,7 @@
geom/part/g_part_bsd.c optional geom_part_bsd
geom/part/g_part_gpt.c optional geom_part_gpt
geom/part/g_part_mbr.c optional geom_part_mbr
+geom/part/g_part_vtoc8.c optional geom_part_vtoc8
geom/raid3/g_raid3.c optional geom_raid3
geom/raid3/g_raid3_ctl.c optional geom_raid3
geom/shsec/g_shsec.c optional geom_shsec
@@ -1445,6 +1446,7 @@
kern/kern_condvar.c standard
kern/kern_conf.c standard
kern/kern_cpu.c standard
+kern/kern_cpuset.c standard
kern/kern_context.c standard
kern/kern_descrip.c standard
kern/kern_environment.c standard
==== //depot/projects/e500/sys/conf/options#12 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.618 2008/02/20 07:50:13 thompsa Exp $
+# $FreeBSD: src/sys/conf/options,v 1.619 2008/03/02 00:52:49 marcel Exp $
#
# On the handling of kernel options
#
@@ -94,6 +94,7 @@
GEOM_PART_BSD opt_geom.h
GEOM_PART_GPT opt_geom.h
GEOM_PART_MBR opt_geom.h
+GEOM_PART_VTOC8 opt_geom.h
GEOM_PC98 opt_geom.h
GEOM_RAID3 opt_geom.h
GEOM_SHSEC opt_geom.h
==== //depot/projects/e500/sys/i386/i386/identcpu.c#5 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.183 2008/02/29 19:18:09 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.184 2008/03/02 07:58:40 jeff Exp $");
#include "opt_cpu.h"
@@ -142,6 +142,9 @@
{ "Pentium 4", CPUCLASS_686 }, /* CPU_P4 */
};
+int cpu_cores;
+int cpu_logical;
+
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
int has_f00f_bug = 0; /* Initialized so that it can be patched. */
#endif
@@ -857,11 +860,13 @@
if ((regs[0] & 0x1f) != 0)
cmp = ((regs[0] >> 26) & 0x3f) + 1;
}
+ cpu_cores = cmp;
+ cpu_logical = htt / cmp;
if (cmp > 1)
printf("\n Cores per package: %d", cmp);
if ((htt / cmp) > 1)
printf("\n Logical CPUs per core: %d",
- htt / cmp);
+ cpu_logical);
}
} else if (strcmp(cpu_vendor, "CyrixInstead") == 0) {
printf(" DIR=0x%04x", cyrix_did);
==== //depot/projects/e500/sys/i386/i386/mp_machdep.c#6 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.282 2007/11/13 23:00:24 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.283 2008/03/02 07:58:40 jeff Exp $");
#include "opt_apic.h"
#include "opt_cpu.h"
@@ -135,12 +135,6 @@
extern struct pcpu __pcpu[];
-/*
- * CPU topology map datastructures for HTT.
- */
-static struct cpu_group mp_groups[MAXCPU];
-static struct cpu_top mp_top;
-
/* AP uses this during bootstrap. Do not staticize. */
char *bootSTK;
static int bootAP;
@@ -238,40 +232,38 @@
mem_range_softc.mr_op->initAP(&mem_range_softc);
}
-void
-mp_topology(void)
+struct cpu_group *
+cpu_topo(void)
{
- struct cpu_group *group;
- int apic_id;
- int groups;
- int cpu;
-
- /* Build the smp_topology map. */
- /* Nothing to do if there is no HTT support. */
- if (hyperthreading_cpus <= 1)
- return;
- group = &mp_groups[0];
- groups = 1;
- for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) {
- if (!cpu_info[apic_id].cpu_present)
- continue;
- /*
- * If the current group has members and we're not a logical
- * cpu, create a new group.
- */
- if (group->cg_count != 0 &&
- (apic_id % hyperthreading_cpus) == 0) {
- group++;
- groups++;
- }
- group->cg_count++;
- group->cg_mask |= 1 << cpu;
- cpu++;
+ if (cpu_cores == 0)
+ cpu_cores = 1;
+ if (cpu_logical == 0)
+ cpu_logical = 1;
+ if (mp_ncpus % (cpu_cores * cpu_logical) != 0) {
+ printf("WARNING: Non-uniform processors.\n");
+ printf("WARNING: Using suboptimal topology.\n");
+ return (smp_topo_none());
}
-
- mp_top.ct_count = groups;
- mp_top.ct_group = mp_groups;
- smp_topology = &mp_top;
+ /*
+ * No multi-core or hyper-threaded.
+ */
+ if (cpu_logical * cpu_cores == 1)
+ return (smp_topo_none());
+ /*
+ * Only HTT no multi-core.
+ */
+ if (cpu_logical > 1 && cpu_cores == 1)
+ return (smp_topo_1level(CG_SHARE_L1, cpu_logical, CG_FLAG_HTT));
+ /*
+ * Only multi-core no HTT.
+ */
+ if (cpu_cores > 1 && cpu_logical == 1)
+ return (smp_topo_1level(CG_SHARE_NONE, cpu_cores, 0));
+ /*
+ * Both HTT and multi-core.
+ */
+ return (smp_topo_2level(CG_SHARE_NONE, cpu_cores,
+ CG_SHARE_L1, cpu_logical, CG_FLAG_HTT));
}
@@ -459,9 +451,6 @@
}
set_interrupt_apic_ids();
-
- /* Last, setup the cpu topology now that we have probed CPUs */
- mp_topology();
}
==== //depot/projects/e500/sys/i386/include/smp.h#4 (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/i386/include/smp.h,v 1.90 2007/09/20 20:38:43 attilio Exp $
+ * $FreeBSD: src/sys/i386/include/smp.h,v 1.91 2008/03/02 07:58:41 jeff Exp $
*
*/
@@ -45,6 +45,10 @@
extern u_long *ipi_lazypmap_counts[MAXCPU];
#endif
+/* global data in identcpu.c */
+extern int cpu_cores;
+extern int cpu_logical;
+
/* IPI handlers */
inthand_t
IDTVEC(invltlb), /* TLB shootdowns - global */
@@ -67,7 +71,6 @@
void ipi_bitmap_handler(struct trapframe frame);
u_int mp_bootaddress(u_int);
int mp_grab_cpu_hlt(void);
-void mp_topology(void);
void smp_cache_flush(void);
void smp_invlpg(vm_offset_t addr);
void smp_masked_invlpg(u_int mask, vm_offset_t addr);
==== //depot/projects/e500/sys/ia64/ia64/mp_machdep.c#4 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/mp_machdep.c,v 1.67 2007/08/06 05:15:57 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/mp_machdep.c,v 1.68 2008/03/02 07:58:41 jeff Exp $");
#include "opt_kstack_pages.h"
@@ -84,6 +84,13 @@
static void cpu_mp_unleash(void *);
+struct cpu_group *
+cpu_topo(void)
+{
+
+ return smp_topo_none();
+}
+
void
ia64_ap_startup(void)
{
==== //depot/projects/e500/sys/kern/init_main.c#9 (text+ko) ====
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.290 2008/01/10 22:11:20 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.291 2008/03/02 07:39:22 jeff Exp $");
#include "opt_ddb.h"
#include "opt_init_path.h"
@@ -73,6 +73,7 @@
#include <sys/unistd.h>
#include <sys/malloc.h>
#include <sys/conf.h>
+#include <sys/cpuset.h>
#include <machine/cpu.h>
@@ -430,6 +431,7 @@
td->td_base_pri = PUSER;
td->td_oncpu = 0;
td->td_flags = TDF_INMEM|TDP_KTHREAD;
+ td->td_cpuset = cpuset_thread0();
p->p_peers = 0;
p->p_leader = p;
==== //depot/projects/e500/sys/kern/init_sysent.c#5 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/kern/init_sysent.c,v 1.233 2008/02/12 20:11:54 ru Exp $
- * created from FreeBSD: src/sys/kern/syscalls.master,v 1.237 2008/02/12 20:09:04 ru Exp
+ * $FreeBSD: src/sys/kern/init_sysent.c,v 1.234 2008/03/02 07:41:10 jeff Exp $
+ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.238 2008/03/02 07:39:22 jeff Exp
*/
#include "opt_compat.h"
@@ -513,4 +513,9 @@
{ AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */
{ AS(shm_open_args), (sy_call_t *)shm_open, AUE_SHMOPEN, NULL, 0, 0 }, /* 482 = shm_open */
{ AS(shm_unlink_args), (sy_call_t *)shm_unlink, AUE_SHMUNLINK, NULL, 0, 0 }, /* 483 = shm_unlink */
+ { AS(cpuset_args), (sy_call_t *)cpuset, AUE_NULL, NULL, 0, 0 }, /* 484 = cpuset */
+ { AS(cpuset_setid_args), (sy_call_t *)cpuset_setid, AUE_NULL, NULL, 0, 0 }, /* 485 = cpuset_setid */
+ { AS(cpuset_getid_args), (sy_call_t *)cpuset_getid, AUE_NULL, NULL, 0, 0 }, /* 486 = cpuset_getid */
+ { AS(cpuset_getaffinity_args), (sy_call_t *)cpuset_getaffinity, AUE_NULL, NULL, 0, 0 }, /* 487 = cpuset_getaffinity */
+ { AS(cpuset_setaffinity_args), (sy_call_t *)cpuset_setaffinity, AUE_NULL, NULL, 0, 0 }, /* 488 = cpuset_setaffinity */
};
==== //depot/projects/e500/sys/kern/kern_thread.c#11 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.265 2007/12/22 04:56:48 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thread.c,v 1.266 2008/03/02 07:39:22 jeff Exp $");
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list