svn commit: r327931 - in projects/clang600-import: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common/safet...

Dimitry Andric dim at FreeBSD.org
Sat Jan 13 17:53:00 UTC 2018


Author: dim
Date: Sat Jan 13 17:52:55 2018
New Revision: 327931
URL: https://svnweb.freebsd.org/changeset/base/327931

Log:
  Merge ^/head r327886 through r327930.

Added:
  projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d
     - copied unchanged from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d
  projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d
     - copied unchanged from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d
  projects/clang600-import/sys/powerpc/mpc85xx/mpc85xx_cache.c
     - copied unchanged from r327930, head/sys/powerpc/mpc85xx/mpc85xx_cache.c
  projects/clang600-import/sys/sys/_domainset.h
     - copied unchanged from r327930, head/sys/sys/_domainset.h
  projects/clang600-import/sys/sys/domainset.h
     - copied unchanged from r327930, head/sys/sys/domainset.h
  projects/clang600-import/sys/vm/vm_domainset.c
     - copied unchanged from r327930, head/sys/vm/vm_domainset.c
  projects/clang600-import/sys/vm/vm_domainset.h
     - copied unchanged from r327930, head/sys/vm/vm_domainset.h
Deleted:
  projects/clang600-import/sys/dev/fdt/fdt_powerpc.c
  projects/clang600-import/sys/kern/kern_numa.c
  projects/clang600-import/sys/sys/_vm_domain.h
  projects/clang600-import/sys/vm/vm_domain.c
  projects/clang600-import/sys/vm/vm_domain.h
Modified:
  projects/clang600-import/Makefile.inc1
  projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
  projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile
  projects/clang600-import/contrib/gcc/unwind-dw2.c
  projects/clang600-import/lib/libc/sys/Symbol.map
  projects/clang600-import/lib/libmemstat/memstat_uma.c
  projects/clang600-import/lib/libpmc/libpmc.c
  projects/clang600-import/share/man/man5/src.conf.5
  projects/clang600-import/share/mk/src.opts.mk
  projects/clang600-import/sys/amd64/amd64/uma_machdep.c
  projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c
  projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c
  projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c
  projects/clang600-import/sys/arm/arm/machdep_ptrace.c
  projects/clang600-import/sys/arm64/arm64/busdma_machdep.c
  projects/clang600-import/sys/arm64/arm64/uma_machdep.c
  projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
  projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
  projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c
  projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h
  projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h
  projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c
  projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c
  projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c
  projects/clang600-import/sys/compat/freebsd32/syscalls.master
  projects/clang600-import/sys/conf/files
  projects/clang600-import/sys/conf/files.powerpc
  projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
  projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c
  projects/clang600-import/sys/ddb/db_run.c
  projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c
  projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
  projects/clang600-import/sys/dev/mmc/host/dwmmc_hisi.c
  projects/clang600-import/sys/dev/mmc/mmc.c
  projects/clang600-import/sys/dev/mmc/mmcsd.c
  projects/clang600-import/sys/dev/ofw/ofw_fdt.c
  projects/clang600-import/sys/dev/sdhci/sdhci.c
  projects/clang600-import/sys/dev/wbwd/wbwd.c
  projects/clang600-import/sys/i386/i386/pmap.c
  projects/clang600-import/sys/kern/init_main.c
  projects/clang600-import/sys/kern/init_sysent.c
  projects/clang600-import/sys/kern/kern_cpuset.c
  projects/clang600-import/sys/kern/kern_exit.c
  projects/clang600-import/sys/kern/kern_fork.c
  projects/clang600-import/sys/kern/kern_malloc.c
  projects/clang600-import/sys/kern/kern_mbuf.c
  projects/clang600-import/sys/kern/kern_rwlock.c
  projects/clang600-import/sys/kern/kern_sx.c
  projects/clang600-import/sys/kern/kern_thr.c
  projects/clang600-import/sys/kern/kern_thread.c
  projects/clang600-import/sys/kern/makesyscalls.sh
  projects/clang600-import/sys/kern/sched_4bsd.c
  projects/clang600-import/sys/kern/sched_ule.c
  projects/clang600-import/sys/kern/subr_busdma_bufalloc.c
  projects/clang600-import/sys/kern/subr_kdb.c
  projects/clang600-import/sys/kern/subr_vmem.c
  projects/clang600-import/sys/kern/syscalls.c
  projects/clang600-import/sys/kern/syscalls.master
  projects/clang600-import/sys/kern/systrace_args.c
  projects/clang600-import/sys/kern/vfs_bio.c
  projects/clang600-import/sys/mips/mips/busdma_machdep.c
  projects/clang600-import/sys/mips/mips/uma_machdep.c
  projects/clang600-import/sys/netinet/libalias/alias_mod.h
  projects/clang600-import/sys/netinet/libalias/alias_sctp.c
  projects/clang600-import/sys/netpfil/ipfw/dn_sched_fq_codel.c
  projects/clang600-import/sys/powerpc/aim/mmu_oea64.c
  projects/clang600-import/sys/powerpc/aim/slb.c
  projects/clang600-import/sys/powerpc/ofw/ofw_machdep.c
  projects/clang600-import/sys/powerpc/powerpc/busdma_machdep.c
  projects/clang600-import/sys/powerpc/powerpc/uma_machdep.c
  projects/clang600-import/sys/riscv/riscv/uma_machdep.c
  projects/clang600-import/sys/sparc64/sparc64/vm_machdep.c
  projects/clang600-import/sys/sys/bus_dma.h
  projects/clang600-import/sys/sys/busdma_bufalloc.h
  projects/clang600-import/sys/sys/cpuset.h
  projects/clang600-import/sys/sys/malloc.h
  projects/clang600-import/sys/sys/proc.h
  projects/clang600-import/sys/sys/syscall.h
  projects/clang600-import/sys/sys/syscall.mk
  projects/clang600-import/sys/sys/syscallsubr.h
  projects/clang600-import/sys/sys/sysproto.h
  projects/clang600-import/sys/vm/uma.h
  projects/clang600-import/sys/vm/uma_core.c
  projects/clang600-import/sys/vm/uma_int.h
  projects/clang600-import/sys/vm/vm_extern.h
  projects/clang600-import/sys/vm/vm_fault.c
  projects/clang600-import/sys/vm/vm_init.c
  projects/clang600-import/sys/vm/vm_kern.c
  projects/clang600-import/sys/vm/vm_object.c
  projects/clang600-import/sys/vm/vm_object.h
  projects/clang600-import/sys/vm/vm_page.c
  projects/clang600-import/sys/vm/vm_page.h
  projects/clang600-import/sys/vm/vm_phys.c
  projects/clang600-import/sys/vm/vm_phys.h
  projects/clang600-import/sys/vm/vm_reserv.c
  projects/clang600-import/sys/x86/acpica/srat.c
  projects/clang600-import/sys/x86/include/busdma_impl.h
  projects/clang600-import/sys/x86/iommu/busdma_dmar.c
  projects/clang600-import/sys/x86/x86/busdma_bounce.c
  projects/clang600-import/sys/x86/x86/busdma_machdep.c
  projects/clang600-import/usr.bin/cpuset/cpuset.c
  projects/clang600-import/usr.bin/numactl/numactl.c
  projects/clang600-import/usr.bin/truss/syscall.h
  projects/clang600-import/usr.bin/truss/syscalls.c
  projects/clang600-import/usr.sbin/bsdinstall/partedit/gpart_ops.c
Directory Properties:
  projects/clang600-import/   (props changed)
  projects/clang600-import/cddl/   (props changed)
  projects/clang600-import/cddl/contrib/opensolaris/   (props changed)
  projects/clang600-import/contrib/gcc/   (props changed)
  projects/clang600-import/sys/cddl/contrib/opensolaris/   (props changed)
  projects/clang600-import/sys/contrib/ipfilter/   (props changed)

Modified: projects/clang600-import/Makefile.inc1
==============================================================================
--- projects/clang600-import/Makefile.inc1	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/Makefile.inc1	Sat Jan 13 17:52:55 2018	(r327931)
@@ -537,6 +537,7 @@ BSARGS= 	DESTDIR= \
 		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
 		MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
 		MK_LLDB=no MK_TESTS=no \
+		MK_LLD=${MK_LLD_BOOTSTRAP} \
 		MK_INCLUDES=yes
 
 BMAKE=		\

Copied: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d (from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d	Sat Jan 13 17:52:55 2018	(r327931, copy of r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d)
@@ -0,0 +1,44 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2018 Domagoj Stolfa <domagoj.stolfa at cl.cam.ac.uk>.
+ *
+ * This software was developed by BAE Systems, the University of Cambridge
+ * Computer Laboratory, and Memorial University under DARPA/AFRL contract
+ * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
+ * (TC) research program.
+ *
+ */
+
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
+/*
+ * ASSERTION:
+ * 	collect jailname at every fbt probe and at every firing of a
+ *	high-frequency profile probe
+ */
+
+fbt:::
+{
+	@a[jailname] = count();
+}
+
+profile-4999hz
+{
+	@a[jailname] = count();
+}
+
+tick-1sec
+/n++ == 10/
+{
+	exit(0);
+}

Copied: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d (from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d	Sat Jan 13 17:52:55 2018	(r327931, copy of r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d)
@@ -0,0 +1,44 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2018 Domagoj Stolfa <domagoj.stolfa at cl.cam.ac.uk>.
+ *
+ * This software was developed by BAE Systems, the University of Cambridge
+ * Computer Laboratory, and Memorial University under DARPA/AFRL contract
+ * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
+ * (TC) research program.
+ *
+ */
+
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
+/*
+ * ASSERTION:
+ * 	collect jid at every fbt probe and at every firing of a
+ *	high-frequency profile probe
+ */
+
+fbt:::
+{
+	@a[jid] = count();
+}
+
+profile-4999hz
+{
+	@a[jid] = count();
+}
+
+tick-1sec
+/n++ == 10/
+{
+	exit(0);
+}

Modified: projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
==============================================================================
--- projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -313,6 +313,12 @@ static const dt_ident_t _dtrace_globals[] = {
 	DT_VERS_1_5, &dt_idops_func, "string(int, void *)" },
 { "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0,
 	&dt_idops_type, "uint_t" },
+#ifdef __FreeBSD__
+{ "jailname", DT_IDENT_SCALAR, 0, DIF_VAR_JAILNAME,
+	DT_ATTR_STABCMN, DT_VERS_1_13, &dt_idops_type, "string" },
+{ "jid", DT_IDENT_SCALAR, 0, DIF_VAR_JID, DT_ATTR_STABCMN, DT_VERS_1_13,
+	&dt_idops_type, "int" },
+#endif
 { "json", DT_IDENT_FUNC, 0, DIF_SUBR_JSON, DT_ATTR_STABCMN, DT_VERS_1_11,
 	&dt_idops_func, "string(const char *, const char *)" },
 { "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0,
@@ -528,10 +534,8 @@ static const dt_ident_t _dtrace_globals[] = {
 { "walltimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_WALLTIMESTAMP,
 	DT_ATTR_STABCMN, DT_VERS_1_0,
 	&dt_idops_type, "int64_t" },
-#ifdef illumos
 { "zonename", DT_IDENT_SCALAR, 0, DIF_VAR_ZONENAME,
 	DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" },
-#endif
 
 #ifndef illumos
 { "cpu", DT_IDENT_SCALAR, 0, DIF_VAR_CPU,

Modified: projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile
==============================================================================
--- projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile	Sat Jan 13 17:52:55 2018	(r327931)
@@ -19,6 +19,8 @@ ${PACKAGE}FILES= \
      tst.gid.d  \
      tst.hton.d  \
      tst.index.d  \
+     tst.jailname.d  \
+     tst.jid.d  \
      tst.msgdsize.d  \
      tst.msgsize.d  \
      tst.null.d  \

Modified: projects/clang600-import/contrib/gcc/unwind-dw2.c
==============================================================================
--- projects/clang600-import/contrib/gcc/unwind-dw2.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/contrib/gcc/unwind-dw2.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -1393,16 +1393,7 @@ uw_advance_context (struct _Unwind_Context *context, _
 static inline void
 init_dwarf_reg_size_table (void)
 {
-/*
- * ARM64TODO: http://llvm.org/pr22997
- * llvm 3.6 doesn't support __builtin_init_dwarf_reg_size_table on AArch64.
- */
-#ifdef __aarch64__
-  printf("Unimplemented: init_dwarf_reg_size_table\n");
-  abort();
-#else
   __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
-#endif
 }
 
 static void

Modified: projects/clang600-import/lib/libc/sys/Symbol.map
==============================================================================
--- projects/clang600-import/lib/libc/sys/Symbol.map	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/lib/libc/sys/Symbol.map	Sat Jan 13 17:52:55 2018	(r327931)
@@ -398,6 +398,8 @@ FBSD_1.5 {
 	mknodat;
 	stat;
 	statfs;
+	cpuset_getdomain;
+	cpuset_setdomain;
 };
 
 FBSDprivate_1.0 {
@@ -1022,4 +1024,8 @@ FBSDprivate_1.0 {
 	gssd_syscall;
 	__libc_interposing_slot;
 	__libc_sigwait;
+	_cpuset_getdomain;
+	__sys_cpuset_getdomain;
+	_cpuset_setdomain;
+	__sys_cpuset_setdomain;
 };

Modified: projects/clang600-import/lib/libmemstat/memstat_uma.c
==============================================================================
--- projects/clang600-import/lib/libmemstat/memstat_uma.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/lib/libmemstat/memstat_uma.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -55,6 +55,8 @@ static struct nlist namelist[] = {
 	{ .n_name = "_mp_maxid" },
 #define	X_ALL_CPUS	2
 	{ .n_name = "_all_cpus" },
+#define	X_VM_NDOMAINS	3
+	{ .n_name = "_vm_ndomains" },
 	{ .n_name = "" },
 };
 
@@ -297,11 +299,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *k
 {
 	LIST_HEAD(, uma_keg) uma_kegs;
 	struct memory_type *mtp;
+	struct uma_zone_domain uzd;
 	struct uma_bucket *ubp, ub;
 	struct uma_cache *ucp, *ucp_array;
 	struct uma_zone *uzp, uz;
 	struct uma_keg *kzp, kz;
-	int hint_dontsearch, i, mp_maxid, ret;
+	int hint_dontsearch, i, mp_maxid, ndomains, ret;
 	char name[MEMTYPE_MAXNAME];
 	cpuset_t all_cpus;
 	long cpusetsize;
@@ -323,6 +326,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *k
 		list->mtl_error = ret;
 		return (-1);
 	}
+	ret = kread_symbol(kvm, X_VM_NDOMAINS, &ndomains,
+	    sizeof(ndomains), 0);
+	if (ret != 0) {
+		list->mtl_error = ret;
+		return (-1);
+	}
 	ret = kread_symbol(kvm, X_UMA_KEGS, &uma_kegs, sizeof(uma_kegs), 0);
 	if (ret != 0) {
 		list->mtl_error = ret;
@@ -447,10 +456,17 @@ skip_percpu:
 				    kz.uk_ipers;
 			mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size;
 			mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees;
-			for (ubp = LIST_FIRST(&uz.uz_buckets); ubp !=
-			    NULL; ubp = LIST_NEXT(&ub, ub_link)) {
-				ret = kread(kvm, ubp, &ub, sizeof(ub), 0);
-				mtp->mt_zonefree += ub.ub_cnt;
+			for (i = 0; i < ndomains; i++) {
+				ret = kread(kvm, &uz.uz_domain[i], &uzd,
+				   sizeof(uzd), 0);
+				for (ubp =
+				    LIST_FIRST(&uzd.uzd_buckets);
+				    ubp != NULL;
+				    ubp = LIST_NEXT(&ub, ub_link)) {
+					ret = kread(kvm, ubp, &ub,
+					   sizeof(ub), 0);
+					mtp->mt_zonefree += ub.ub_cnt;
+				}
 			}
 			if (!((kz.uk_flags & UMA_ZONE_SECONDARY) &&
 			    LIST_FIRST(&kz.uk_zones) != uzp)) {

Modified: projects/clang600-import/lib/libpmc/libpmc.c
==============================================================================
--- projects/clang600-import/lib/libpmc/libpmc.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/lib/libpmc/libpmc.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -3270,7 +3270,8 @@ pmc_init(void)
 	cpu_info.pm_npmc    = op_cpu_info.pm_npmc;
 	cpu_info.pm_nclass  = op_cpu_info.pm_nclass;
 	for (n = 0; n < cpu_info.pm_nclass; n++)
-		cpu_info.pm_classes[n] = op_cpu_info.pm_classes[n];
+		memcpy(&cpu_info.pm_classes[n], &op_cpu_info.pm_classes[n],
+		    sizeof(cpu_info.pm_classes[n]));
 
 	pmc_class_table = malloc(PMC_CLASS_TABLE_SIZE *
 	    sizeof(struct pmc_class_descr *));

Modified: projects/clang600-import/share/man/man5/src.conf.5
==============================================================================
--- projects/clang600-import/share/man/man5/src.conf.5	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/share/man/man5/src.conf.5	Sat Jan 13 17:52:55 2018	(r327931)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd January 11, 2018
+.Dd January 12, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -970,12 +970,12 @@ To be able to build the system, either Binutils or LLD
 enabled unless an alternate linker is provided via XLD.
 .Pp
 This is a default setting on
-arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
+arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
 .It Va WITH_LLD_BOOTSTRAP
 Set to build the LLD linker during the bootstrap phase of the build.
 .Pp
 This is a default setting on
-amd64/amd64, arm64/aarch64 and i386/i386.
+amd64/amd64 and arm64/aarch64.
 .It Va WITHOUT_LLD_IS_LD
 Set to use GNU binutils ld as the system linker, instead of LLVM's LLD.
 .Pp

Modified: projects/clang600-import/share/mk/src.opts.mk
==============================================================================
--- projects/clang600-import/share/mk/src.opts.mk	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/share/mk/src.opts.mk	Sat Jan 13 17:52:55 2018	(r327931)
@@ -253,7 +253,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND
 .endif
 .if ${__T} == "aarch64"
 __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
-.elif ${__T} == "amd64" || ${__T} == "i386"
+.elif ${__T} == "amd64"
 __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP
 __DEFAULT_NO_OPTIONS+=LLD_IS_LD
 .else

Modified: projects/clang600-import/sys/amd64/amd64/uma_machdep.c
==============================================================================
--- projects/clang600-import/sys/amd64/amd64/uma_machdep.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/amd64/amd64/uma_machdep.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -44,14 +44,15 @@ __FBSDID("$FreeBSD$");
 #include <machine/vmparam.h>
 
 void *
-uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait)
+uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
+    int wait)
 {
 	vm_page_t m;
 	vm_paddr_t pa;
 	void *va;
 
 	*flags = UMA_SLAB_PRIV;
-	m = vm_page_alloc(NULL, 0,
+	m = vm_page_alloc_domain(NULL, 0, domain,
 	    malloc2vm_flags(wait) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED);
 	if (m == NULL)
 		return (NULL);

Modified: projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c
==============================================================================
--- projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -71,24 +71,24 @@ static const struct allwinner_pins a83t_pins[] = {
 	{ "PC17", 2, 17,  { "gpio_in", "gpio_out", "nand" } },
 	{ "PC18", 2, 18,  { "gpio_in", "gpio_out", "nand" } },
 
-	{ "PD2",  3, 2,   { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD3",  3, 3,   { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD4",  3, 4,   { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD5",  3, 5,   { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD6",  3, 6,   { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD7",  3, 7,   { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD10", 3, 10,  { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD11", 3, 11,  { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD12", 3, 12,  { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD13", 3, 13,  { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD14", 3, 14,  { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD15", 3, 15,  { "gpio_in", "gpio_out", "lcd", NULL, "emac" } },
-	{ "PD18", 3, 18,  { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } },
-	{ "PD19", 3, 19,  { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } },
-	{ "PD20", 3, 20,  { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } },
-	{ "PD21", 3, 21,  { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } },
-	{ "PD22", 3, 22,  { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } },
-	{ "PD23", 3, 23,  { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } },
+	{ "PD2",  3, 2,   { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD3",  3, 3,   { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD4",  3, 4,   { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD5",  3, 5,   { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD6",  3, 6,   { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD7",  3, 7,   { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD10", 3, 10,  { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD11", 3, 11,  { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD12", 3, 12,  { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD13", 3, 13,  { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD14", 3, 14,  { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD15", 3, 15,  { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } },
+	{ "PD18", 3, 18,  { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } },
+	{ "PD19", 3, 19,  { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } },
+	{ "PD20", 3, 20,  { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } },
+	{ "PD21", 3, 21,  { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } },
+	{ "PD22", 3, 22,  { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } },
+	{ "PD23", 3, 23,  { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } },
 	{ "PD24", 3, 24,  { "gpio_in", "gpio_out", "lcd", "lvds" } },
 	{ "PD25", 3, 25,  { "gpio_in", "gpio_out", "lcd", "lvds" } },
 	{ "PD26", 3, 26,  { "gpio_in", "gpio_out", "lcd", "lvds" } },

Modified: projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c
==============================================================================
--- projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -500,6 +500,13 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al
 }
 
 int
+bus_dma_tag_set_domain(bus_dma_tag_t dmat, int domain)
+{
+
+	return (0);
+}
+
+int
 bus_dma_tag_destroy(bus_dma_tag_t dmat)
 {
 	bus_dma_tag_t dmat_copy;

Modified: projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -563,6 +563,13 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al
 }
 
 int
+bus_dma_tag_set_domain(bus_dma_tag_t dmat, int domain)
+{
+
+	return (0);
+}
+
+int
 bus_dma_tag_destroy(bus_dma_tag_t dmat)
 {
 	bus_dma_tag_t dmat_copy;

Modified: projects/clang600-import/sys/arm/arm/machdep_ptrace.c
==============================================================================
--- projects/clang600-import/sys/arm/arm/machdep_ptrace.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/arm/arm/machdep_ptrace.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/proc.h>
 #include <sys/ptrace.h>
+#include <sys/lock.h>
 #include <sys/mutex.h>
 
 #include <machine/machdep.h>

Modified: projects/clang600-import/sys/arm64/arm64/busdma_machdep.c
==============================================================================
--- projects/clang600-import/sys/arm64/arm64/busdma_machdep.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/arm64/arm64/busdma_machdep.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -223,3 +223,9 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
 	return (tc->impl->tag_destroy(dmat));
 }
 
+int
+bus_dma_tag_set_domain(bus_dma_tag_t dmat, int domain)
+{
+
+	return (0);
+}

Modified: projects/clang600-import/sys/arm64/arm64/uma_machdep.c
==============================================================================
--- projects/clang600-import/sys/arm64/arm64/uma_machdep.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/arm64/arm64/uma_machdep.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -42,14 +42,15 @@ __FBSDID("$FreeBSD$");
 #include <machine/vmparam.h>
 
 void *
-uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait)
+uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
+    int wait)
 {
 	vm_page_t m;
 	vm_paddr_t pa;
 	void *va;
 
 	*flags = UMA_SLAB_PRIV;
-	m = vm_page_alloc(NULL, 0,
+	m = vm_page_alloc_domain(NULL, 0, domain,
 	    malloc2vm_flags(wait) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED);
 	if (m == NULL)
 		return (NULL);

Modified: projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==============================================================================
--- projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -3654,6 +3654,24 @@ dtrace_dif_variable(dtrace_mstate_t *mstate, dtrace_st
 		return (dtrace_dif_varstr(
 		    (uintptr_t)curthread->t_procp->p_zone->zone_name,
 		    state, mstate));
+#elif defined(__FreeBSD__)
+	/*
+	 * On FreeBSD, we introduce compatibility to zonename by falling through
+	 * into jailname.
+	 */
+	case DIF_VAR_JAILNAME:
+		if (!dtrace_priv_kernel(state))
+			return (0);
+
+		return (dtrace_dif_varstr(
+		    (uintptr_t)curthread->t_procp->p_ucred->cr_prison->pr_name,
+		    state, mstate));
+
+	case DIF_VAR_JID:
+		if (!dtrace_priv_kernel(state))
+			return (0);
+
+		return ((uint64_t)curthread->t_procp->p_ucred->cr_prison->pr_id);
 #else
 		return (0);
 #endif

Modified: projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
==============================================================================
--- projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h	Sat Jan 13 17:52:55 2018	(r327931)
@@ -254,6 +254,8 @@ typedef enum dtrace_probespec {
 #define	DIF_VAR_GID		0x011f	/* process group ID */
 #define	DIF_VAR_ERRNO		0x0120	/* thread errno */
 #define	DIF_VAR_EXECARGS	0x0121	/* process arguments */
+#define	DIF_VAR_JID		0x0122	/* process jail id */
+#define	DIF_VAR_JAILNAME	0x0123	/* process jail name */
 
 #ifndef illumos
 #define	DIF_VAR_CPU		0x0200

Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -3017,6 +3017,24 @@ freebsd32_cpuset_setaffinity(struct thread *td,
 }
 
 int
+freebsd32_cpuset_getdomain(struct thread *td,
+    struct freebsd32_cpuset_getdomain_args *uap)
+{
+
+	return (kern_cpuset_getdomain(td, uap->level, uap->which,
+	    PAIR32TO64(id_t,uap->id), uap->domainsetsize, uap->mask, uap->policy));
+}
+
+int
+freebsd32_cpuset_setdomain(struct thread *td,
+    struct freebsd32_cpuset_setdomain_args *uap)
+{
+
+	return (kern_cpuset_setdomain(td, uap->level, uap->which,
+	    PAIR32TO64(id_t,uap->id), uap->domainsetsize, uap->mask, uap->policy));
+}
+
+int
 freebsd32_nmount(struct thread *td,
     struct freebsd32_nmount_args /* {
     	struct iovec *iovp;

Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h	Sat Jan 13 17:52:55 2018	(r327931)
@@ -11,6 +11,7 @@
 #include <sys/signal.h>
 #include <sys/acl.h>
 #include <sys/cpuset.h>
+#include <sys/domainset.h>
 #include <sys/_ffcounter.h>
 #include <sys/_semaphore.h>
 #include <sys/ucontext.h>
@@ -693,6 +694,24 @@ struct freebsd32_kevent_args {
 	char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)];
 	char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)];
 };
+struct freebsd32_cpuset_getdomain_args {
+	char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
+	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
+	char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)];
+	char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)];
+	char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)];
+	char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)];
+	char policy_l_[PADL_(int *)]; int * policy; char policy_r_[PADR_(int *)];
+};
+struct freebsd32_cpuset_setdomain_args {
+	char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
+	char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
+	char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)];
+	char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)];
+	char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)];
+	char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)];
+	char policy_l_[PADL_(int)]; int policy; char policy_r_[PADR_(int)];
+};
 #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__))
 #define PAD64_REQUIRED
 #endif
@@ -823,6 +842,8 @@ int	freebsd32_fstatat(struct thread *, struct freebsd3
 int	freebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *);
 int	freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *);
 int	freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
+int	freebsd32_cpuset_getdomain(struct thread *, struct freebsd32_cpuset_getdomain_args *);
+int	freebsd32_cpuset_setdomain(struct thread *, struct freebsd32_cpuset_setdomain_args *);
 
 #ifdef COMPAT_43
 
@@ -1370,6 +1391,8 @@ int	freebsd11_freebsd32_mknodat(struct thread *, struc
 #define	FREEBSD32_SYS_AUE_freebsd32_fhstat	AUE_FHSTAT
 #define	FREEBSD32_SYS_AUE_freebsd32_getdirentries	AUE_GETDIRENTRIES
 #define	FREEBSD32_SYS_AUE_freebsd32_kevent	AUE_KEVENT
+#define	FREEBSD32_SYS_AUE_freebsd32_cpuset_getdomain	AUE_NULL
+#define	FREEBSD32_SYS_AUE_freebsd32_cpuset_setdomain	AUE_NULL
 
 #undef PAD_
 #undef PADL_

Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h	Sat Jan 13 17:52:55 2018	(r327931)
@@ -455,8 +455,6 @@
 #define	FREEBSD32_SYS_freebsd32_ppoll	545
 #define	FREEBSD32_SYS_freebsd32_futimens	546
 #define	FREEBSD32_SYS_freebsd32_utimensat	547
-#define	FREEBSD32_SYS_numa_getaffinity	548
-#define	FREEBSD32_SYS_numa_setaffinity	549
 #define	FREEBSD32_SYS_fdatasync	550
 #define	FREEBSD32_SYS_freebsd32_fstat	551
 #define	FREEBSD32_SYS_freebsd32_fstatat	552
@@ -468,4 +466,6 @@
 #define	FREEBSD32_SYS_fhstatfs	558
 #define	FREEBSD32_SYS_mknodat	559
 #define	FREEBSD32_SYS_freebsd32_kevent	560
-#define	FREEBSD32_SYS_MAXSYSCALL	561
+#define	FREEBSD32_SYS_freebsd32_cpuset_getdomain	561
+#define	FREEBSD32_SYS_freebsd32_cpuset_setdomain	562
+#define	FREEBSD32_SYS_MAXSYSCALL	563

Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -580,8 +580,8 @@ const char *freebsd32_syscallnames[] = {
 	"freebsd32_ppoll",			/* 545 = freebsd32_ppoll */
 	"freebsd32_futimens",			/* 546 = freebsd32_futimens */
 	"freebsd32_utimensat",			/* 547 = freebsd32_utimensat */
-	"numa_getaffinity",			/* 548 = numa_getaffinity */
-	"numa_setaffinity",			/* 549 = numa_setaffinity */
+	"#548",			/* 548 = numa_getaffinity */
+	"#549",			/* 549 = numa_setaffinity */
 	"fdatasync",			/* 550 = fdatasync */
 	"freebsd32_fstat",			/* 551 = freebsd32_fstat */
 	"freebsd32_fstatat",			/* 552 = freebsd32_fstatat */
@@ -593,4 +593,6 @@ const char *freebsd32_syscallnames[] = {
 	"fhstatfs",			/* 558 = fhstatfs */
 	"mknodat",			/* 559 = mknodat */
 	"freebsd32_kevent",			/* 560 = freebsd32_kevent */
+	"freebsd32_cpuset_getdomain",			/* 561 = freebsd32_cpuset_getdomain */
+	"freebsd32_cpuset_setdomain",			/* 562 = freebsd32_cpuset_setdomain */
 };

Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -629,8 +629,8 @@ struct sysent freebsd32_sysent[] = {
 	{ AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 545 = freebsd32_ppoll */
 	{ AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 546 = freebsd32_futimens */
 	{ AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 547 = freebsd32_utimensat */
-	{ AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 548 = numa_getaffinity */
-	{ AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 549 = numa_setaffinity */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 548 = numa_getaffinity */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 549 = numa_setaffinity */
 	{ AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC },	/* 550 = fdatasync */
 	{ AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 551 = freebsd32_fstat */
 	{ AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 552 = freebsd32_fstatat */
@@ -642,4 +642,6 @@ struct sysent freebsd32_sysent[] = {
 	{ AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC },	/* 558 = fhstatfs */
 	{ AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 559 = mknodat */
 	{ AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 560 = freebsd32_kevent */
+	{ AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 561 = freebsd32_cpuset_getdomain */
+	{ AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 562 = freebsd32_cpuset_setdomain */
 };

Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -3150,24 +3150,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		*n_args = 4;
 		break;
 	}
-	/* numa_getaffinity */
-	case 548: {
-		struct numa_getaffinity_args *p = params;
-		iarg[0] = p->which; /* cpuwhich_t */
-		iarg[1] = p->id; /* id_t */
-		uarg[2] = (intptr_t) p->policy; /* struct vm_domain_policy * */
-		*n_args = 3;
-		break;
-	}
-	/* numa_setaffinity */
-	case 549: {
-		struct numa_setaffinity_args *p = params;
-		iarg[0] = p->which; /* cpuwhich_t */
-		iarg[1] = p->id; /* id_t */
-		uarg[2] = (intptr_t) p->policy; /* const struct vm_domain_policy * */
-		*n_args = 3;
-		break;
-	}
 	/* fdatasync */
 	case 550: {
 		struct fdatasync_args *p = params;
@@ -3266,6 +3248,32 @@ systrace_args(int sysnum, void *params, uint64_t *uarg
 		*n_args = 6;
 		break;
 	}
+	/* freebsd32_cpuset_getdomain */
+	case 561: {
+		struct freebsd32_cpuset_getdomain_args *p = params;
+		iarg[0] = p->level; /* cpulevel_t */
+		iarg[1] = p->which; /* cpuwhich_t */
+		uarg[2] = p->id1; /* uint32_t */
+		uarg[3] = p->id2; /* uint32_t */
+		uarg[4] = p->domainsetsize; /* size_t */
+		uarg[5] = (intptr_t) p->mask; /* domainset_t * */
+		uarg[6] = (intptr_t) p->policy; /* int * */
+		*n_args = 7;
+		break;
+	}
+	/* freebsd32_cpuset_setdomain */
+	case 562: {
+		struct freebsd32_cpuset_setdomain_args *p = params;
+		iarg[0] = p->level; /* cpulevel_t */
+		iarg[1] = p->which; /* cpuwhich_t */
+		uarg[2] = p->id1; /* uint32_t */
+		uarg[3] = p->id2; /* uint32_t */
+		uarg[4] = p->domainsetsize; /* size_t */
+		uarg[5] = (intptr_t) p->mask; /* domainset_t * */
+		iarg[6] = p->policy; /* int */
+		*n_args = 7;
+		break;
+	}
 	default:
 		*n_args = 0;
 		break;
@@ -8563,38 +8571,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 			break;
 		};
 		break;
-	/* numa_getaffinity */
-	case 548:
-		switch(ndx) {
-		case 0:
-			p = "cpuwhich_t";
-			break;
-		case 1:
-			p = "id_t";
-			break;
-		case 2:
-			p = "userland struct vm_domain_policy *";
-			break;
-		default:
-			break;
-		};
-		break;
-	/* numa_setaffinity */
-	case 549:
-		switch(ndx) {
-		case 0:
-			p = "cpuwhich_t";
-			break;
-		case 1:
-			p = "id_t";
-			break;
-		case 2:
-			p = "userland const struct vm_domain_policy *";
-			break;
-		default:
-			break;
-		};
-		break;
 	/* fdatasync */
 	case 550:
 		switch(ndx) {
@@ -8768,6 +8744,62 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d
 			break;
 		};
 		break;
+	/* freebsd32_cpuset_getdomain */
+	case 561:
+		switch(ndx) {
+		case 0:
+			p = "cpulevel_t";
+			break;
+		case 1:
+			p = "cpuwhich_t";
+			break;
+		case 2:
+			p = "uint32_t";
+			break;
+		case 3:
+			p = "uint32_t";
+			break;
+		case 4:
+			p = "size_t";
+			break;
+		case 5:
+			p = "userland domainset_t *";
+			break;
+		case 6:
+			p = "userland int *";
+			break;
+		default:
+			break;
+		};
+		break;
+	/* freebsd32_cpuset_setdomain */
+	case 562:
+		switch(ndx) {
+		case 0:
+			p = "cpulevel_t";
+			break;
+		case 1:
+			p = "cpuwhich_t";
+			break;
+		case 2:
+			p = "uint32_t";
+			break;
+		case 3:
+			p = "uint32_t";
+			break;
+		case 4:
+			p = "size_t";
+			break;
+		case 5:
+			p = "userland domainset_t *";
+			break;
+		case 6:
+			p = "int";
+			break;
+		default:
+			break;
+		};
+		break;
 	default:
 		break;
 	};
@@ -10554,16 +10586,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;
-	/* numa_getaffinity */
-	case 548:
-		if (ndx == 0 || ndx == 1)
-			p = "int";
-		break;
-	/* numa_setaffinity */
-	case 549:
-		if (ndx == 0 || ndx == 1)
-			p = "int";
-		break;
 	/* fdatasync */
 	case 550:
 		if (ndx == 0 || ndx == 1)
@@ -10616,6 +10638,16 @@ systrace_return_setargdesc(int sysnum, int ndx, char *
 		break;
 	/* freebsd32_kevent */
 	case 560:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
+	/* freebsd32_cpuset_getdomain */
+	case 561:
+		if (ndx == 0 || ndx == 1)
+			p = "int";
+		break;
+	/* freebsd32_cpuset_setdomain */
+	case 562:
 		if (ndx == 0 || ndx == 1)
 			p = "int";
 		break;

Modified: projects/clang600-import/sys/compat/freebsd32/syscalls.master
==============================================================================
--- projects/clang600-import/sys/compat/freebsd32/syscalls.master	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/compat/freebsd32/syscalls.master	Sat Jan 13 17:52:55 2018	(r327931)
@@ -1086,12 +1086,8 @@
 547	AUE_FUTIMESAT	STD	{ int freebsd32_utimensat(int fd, \
 				    char *path, \
 				    struct timespec *times, int flag); }
-548	AUE_NULL	NOPROTO	{ int numa_getaffinity(cpuwhich_t which, \
-				    id_t id, \
-				    struct vm_domain_policy *policy); }
-549	AUE_NULL	NOPROTO	{ int numa_setaffinity(cpuwhich_t which, \
-				    id_t id, \
-				    const struct vm_domain_policy *policy); }
+548	AUE_NULL	UNIMPL	numa_getaffinity
+549	AUE_NULL	UNIMPL	numa_setaffinity
 550	AUE_FSYNC	NOPROTO	{ int fdatasync(int fd); }
 551	AUE_FSTAT	STD	{ int freebsd32_fstat(int fd, \
 				    struct stat32 *ub); }
@@ -1119,4 +1115,13 @@
 				    struct kevent32 *eventlist, \
 				    int nevents, \
 				    const struct timespec32 *timeout); }
+561	AUE_NULL	STD	{ int freebsd32_cpuset_getdomain(cpulevel_t level, \
+				    cpuwhich_t which, uint32_t id1, uint32_t id2, \
+				    size_t domainsetsize, domainset_t *mask, \
+				    int *policy); }
+562	AUE_NULL	STD	{ int freebsd32_cpuset_setdomain(cpulevel_t level, \
+				    cpuwhich_t which, uint32_t id1, uint32_t id2, \
+				    size_t domainsetsize, domainset_t *mask, \
+				    int policy); }
+
 ; vim: syntax=off

Modified: projects/clang600-import/sys/conf/files
==============================================================================
--- projects/clang600-import/sys/conf/files	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/conf/files	Sat Jan 13 17:52:55 2018	(r327931)
@@ -3787,7 +3787,6 @@ kern/kern_module.c		standard
 kern/kern_mtxpool.c		standard
 kern/kern_mutex.c		standard
 kern/kern_ntptime.c		standard
-kern/kern_numa.c		standard
 kern/kern_osd.c			standard
 kern/kern_physio.c		standard
 kern/kern_pmc.c			standard
@@ -4837,7 +4836,7 @@ vm/swap_pager.c			standard
 vm/uma_core.c			standard
 vm/uma_dbg.c			standard
 vm/memguard.c			optional DEBUG_MEMGUARD
-vm/vm_domain.c			standard
+vm/vm_domainset.c		standard
 vm/vm_fault.c			standard
 vm/vm_glue.c			standard
 vm/vm_init.c			standard

Modified: projects/clang600-import/sys/conf/files.powerpc
==============================================================================
--- projects/clang600-import/sys/conf/files.powerpc	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/conf/files.powerpc	Sat Jan 13 17:52:55 2018	(r327931)
@@ -31,7 +31,6 @@ dev/adb/adb_if.m		optional	adb
 dev/adb/adb_buttons.c		optional	adb
 dev/agp/agp_apple.c		optional	agp powermac
 dev/fb/fb.c			optional	sc
-dev/fdt/fdt_powerpc.c		optional	fdt
 # ofwbus depends on simplebus.
 dev/fdt/simplebus.c		optional	aim | fdt
 dev/hwpmc/hwpmc_e500.c		optional	hwpmc
@@ -146,6 +145,7 @@ powerpc/mpc85xx/i2c.c		optional	iicbus fdt
 powerpc/mpc85xx/isa.c		optional	mpc85xx isa
 powerpc/mpc85xx/lbc.c		optional	mpc85xx
 powerpc/mpc85xx/mpc85xx.c	optional	mpc85xx
+powerpc/mpc85xx/mpc85xx_cache.c	optional	mpc85xx
 powerpc/mpc85xx/mpc85xx_gpio.c	optional	mpc85xx gpio
 powerpc/mpc85xx/platform_mpc85xx.c	optional	mpc85xx
 powerpc/mpc85xx/pci_mpc85xx.c	optional	pci mpc85xx

Modified: projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
==============================================================================
--- projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -2136,7 +2136,7 @@ ipf_p_ftp_eprt6(softf, fin, ip, nat, ftp, dlen)
 	SNPRINTF(s, left, "%x:%x", a >> 16, a & 0xffff);
 	left -= strlen(s);
 	s += strlen(s);
-	sprintf(s, "|%d|\r\n", port);
+	SNPRINTF(s, left, "|%d|\r\n", port);
 #else
 	(void) sprintf(s, "EPRT %c2%c", delim, delim);
 	s += strlen(s);

Modified: projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c
==============================================================================
--- projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -103,7 +103,6 @@ buildnodes(addr, mask, nodes)
 	ipf_rdx_node_t nodes[2];
 {
 	u_32_t maskbits;
-	u_32_t lastbits;
 	u_32_t lastmask;
 	u_32_t *last;
 	int masklen;
@@ -117,7 +116,6 @@ buildnodes(addr, mask, nodes)
 		masklen = last - (u_32_t *)mask;
 		lastmask = *last;
 	}
-	lastbits = maskbits & 0x1f;
 
 	bzero(&nodes[0], sizeof(ipf_rdx_node_t) * 2);
 	nodes[0].maskbitcount = maskbits;

Modified: projects/clang600-import/sys/ddb/db_run.c
==============================================================================
--- projects/clang600-import/sys/ddb/db_run.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/ddb/db_run.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/kdb.h>
 #include <sys/proc.h>
+#include <sys/systm.h>
 
 #include <machine/kdb.h>
 #include <machine/pcb.h>

Modified: projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c	Sat Jan 13 17:52:55 2018	(r327931)
@@ -60,6 +60,7 @@ ACPI_MODULE_NAME("PCI_ACPI")
 struct acpi_hpcib_softc {
     device_t		ap_dev;
     ACPI_HANDLE		ap_handle;
+    bus_dma_tag_t	ap_dma_tag;
     int			ap_flags;
     uint32_t		ap_osc_ctl;
 
@@ -108,6 +109,7 @@ static int		acpi_pcib_acpi_release_resource(device_t d
 #endif
 static int		acpi_pcib_request_feature(device_t pcib, device_t dev,
 			    enum pci_feature feature);
+static bus_dma_tag_t	acpi_pcib_get_dma_tag(device_t bus, device_t child);
 
 static device_method_t acpi_pcib_acpi_methods[] = {
     /* Device interface */
@@ -136,6 +138,7 @@ static device_method_t acpi_pcib_acpi_methods[] = {
     DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
     DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
     DEVMETHOD(bus_get_cpus,		acpi_pcib_get_cpus),
+    DEVMETHOD(bus_get_dma_tag,		acpi_pcib_get_dma_tag),
 
     /* pcib interface */
     DEVMETHOD(pcib_maxslots,		pcib_maxslots),
@@ -366,6 +369,7 @@ acpi_pcib_acpi_attach(device_t dev)
     rman_res_t start;
     int rid;
 #endif
+    int error, domain;
     uint8_t busno;
 
     ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -537,15 +541,33 @@ acpi_pcib_acpi_attach(device_t dev)
 
     acpi_pcib_fetch_prt(dev, &sc->ap_prt);
 
+    error = bus_dma_tag_create(bus_get_dma_tag(dev), 1,
+	0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR,
+	NULL, NULL, BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED,
+	BUS_SPACE_MAXSIZE, 0, NULL, NULL, &sc->ap_dma_tag);
+    if (error != 0)
+	goto errout;
+    error = bus_get_domain(dev, &domain);
+    if (error == 0)
+	error = bus_dma_tag_set_domain(sc->ap_dma_tag, domain);
+    /* Don't fail to attach if the domain can't be queried or set. */
+    error = 0;
+
     bus_generic_probe(dev);
     if (device_add_child(dev, "pci", -1) == NULL) {
-	device_printf(device_get_parent(dev), "couldn't attach pci bus\n");
-#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
-	pcib_host_res_free(dev, &sc->ap_host_res);
-#endif
-	return (ENXIO);
+	bus_dma_tag_destroy(sc->ap_dma_tag);
+	sc->ap_dma_tag = NULL;
+	error = ENXIO;
+	goto errout;
     }
     return (bus_generic_attach(dev));
+
+errout:
+    device_printf(device_get_parent(dev), "couldn't attach pci bus\n");
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+    pcib_host_res_free(dev, &sc->ap_host_res);
+#endif
+    return (error);
 }
 
 /*
@@ -752,4 +774,14 @@ acpi_pcib_request_feature(device_t pcib, device_t dev,
 	}
 
 	return (acpi_pcib_osc(sc, osc_ctl));
+}
+
+static bus_dma_tag_t
+acpi_pcib_get_dma_tag(device_t bus, device_t child)
+{
+	struct acpi_hpcib_softc *sc;
+
+	sc = device_get_softc(bus);
+
+	return (sc->ap_dma_tag);
 }

Modified: projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
==============================================================================
--- projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h	Sat Jan 13 17:47:34 2018	(r327930)
+++ projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h	Sat Jan 13 17:52:55 2018	(r327931)
@@ -899,8 +899,6 @@ typedef int (*c4iw_handler_func)(struct c4iw_dev *dev,
 
 int c4iw_ep_redirect(void *ctx, struct dst_entry *old, struct dst_entry *new,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list