Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2015 06:07:20 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r281975 - in user/ngie/more-tests: contrib/tcpdump lib/libc/locale lib/libmd sbin/camcontrol sbin/growfs share/mk sys/amd64/amd64 sys/amd64/include sys/conf sys/dev/ipmi sys/dev/vt sys/...
Message-ID:  <201504250607.t3P67KYR094530@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sat Apr 25 06:07:19 2015
New Revision: 281975
URL: https://svnweb.freebsd.org/changeset/base/281975

Log:
  MFhead @ r281974

Added:
  user/ngie/more-tests/sys/x86/x86/mp_x86.c
     - copied unchanged from r281974, head/sys/x86/x86/mp_x86.c
Modified:
  user/ngie/more-tests/contrib/tcpdump/interface.h
  user/ngie/more-tests/contrib/tcpdump/netdissect.h
  user/ngie/more-tests/contrib/tcpdump/print-ip.c
  user/ngie/more-tests/contrib/tcpdump/print-pfsync.c
  user/ngie/more-tests/lib/libc/locale/duplocale.3
  user/ngie/more-tests/lib/libc/locale/freelocale.3
  user/ngie/more-tests/lib/libc/locale/newlocale.3
  user/ngie/more-tests/lib/libc/locale/none.c
  user/ngie/more-tests/lib/libc/locale/querylocale.3
  user/ngie/more-tests/lib/libc/locale/uselocale.3
  user/ngie/more-tests/lib/libmd/mdXhl.c
  user/ngie/more-tests/sbin/camcontrol/camcontrol.8
  user/ngie/more-tests/sbin/growfs/Makefile
  user/ngie/more-tests/sbin/growfs/growfs.c
  user/ngie/more-tests/share/mk/src.opts.mk
  user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c
  user/ngie/more-tests/sys/amd64/include/smp.h
  user/ngie/more-tests/sys/conf/files.amd64
  user/ngie/more-tests/sys/conf/files.i386
  user/ngie/more-tests/sys/conf/files.pc98
  user/ngie/more-tests/sys/dev/ipmi/ipmi.c
  user/ngie/more-tests/sys/dev/ipmi/ipmi_kcs.c
  user/ngie/more-tests/sys/dev/ipmi/ipmi_smic.c
  user/ngie/more-tests/sys/dev/ipmi/ipmivars.h
  user/ngie/more-tests/sys/dev/vt/vt_core.c
  user/ngie/more-tests/sys/fs/nfs/nfsport.h
  user/ngie/more-tests/sys/fs/nfsclient/nfs_clvfsops.c
  user/ngie/more-tests/sys/fs/nfsserver/nfs_nfsdkrpc.c
  user/ngie/more-tests/sys/i386/i386/mp_machdep.c
  user/ngie/more-tests/sys/i386/include/smp.h
  user/ngie/more-tests/sys/i386/xen/mp_machdep.c
  user/ngie/more-tests/sys/kern/uipc_shm.c
  user/ngie/more-tests/sys/kern/vfs_bio.c
  user/ngie/more-tests/sys/modules/oce/Makefile
  user/ngie/more-tests/sys/netinet/tcp_subr.c
  user/ngie/more-tests/sys/sparc64/pci/apb.c
  user/ngie/more-tests/sys/sys/cdefs.h
  user/ngie/more-tests/sys/sys/param.h
  user/ngie/more-tests/sys/ufs/ffs/ffs_alloc.c
  user/ngie/more-tests/sys/ufs/ffs/ffs_vfsops.c
  user/ngie/more-tests/sys/ufs/ufs/inode.h
  user/ngie/more-tests/sys/vm/uma_int.h
  user/ngie/more-tests/usr.bin/kdump/kdump.c
  user/ngie/more-tests/usr.bin/whois/whois.c
  user/ngie/more-tests/usr.sbin/bhyve/pci_emul.c
  user/ngie/more-tests/usr.sbin/iovctl/iovctl.conf.5
  user/ngie/more-tests/usr.sbin/jail/jail.8
Directory Properties:
  user/ngie/more-tests/   (props changed)
  user/ngie/more-tests/contrib/tcpdump/   (props changed)
  user/ngie/more-tests/lib/libc/   (props changed)
  user/ngie/more-tests/sbin/   (props changed)
  user/ngie/more-tests/share/   (props changed)
  user/ngie/more-tests/sys/   (props changed)
  user/ngie/more-tests/sys/conf/   (props changed)
  user/ngie/more-tests/sys/x86/include/acpica_machdep.h   (props changed)
  user/ngie/more-tests/usr.sbin/bhyve/   (props changed)
  user/ngie/more-tests/usr.sbin/jail/   (props changed)

Modified: user/ngie/more-tests/contrib/tcpdump/interface.h
==============================================================================
--- user/ngie/more-tests/contrib/tcpdump/interface.h	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/contrib/tcpdump/interface.h	Sat Apr 25 06:07:19 2015	(r281975)
@@ -148,8 +148,6 @@ extern uint16_t create_osi_cksum(const u
 
 #include <pcap.h>
 
-extern void pfsync_ip_print(const u_char *, u_int);
-
 extern char *q922_string(const u_char *);
 extern char *smb_errstr(int, int);
 extern const char *nt_errstr(uint32_t);

Modified: user/ngie/more-tests/contrib/tcpdump/netdissect.h
==============================================================================
--- user/ngie/more-tests/contrib/tcpdump/netdissect.h	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/contrib/tcpdump/netdissect.h	Sat Apr 25 06:07:19 2015	(r281975)
@@ -540,6 +540,8 @@ extern void timed_print(netdissect_optio
 extern void m3ua_print(netdissect_options *, const u_char *, const u_int);
 extern void aoe_print(netdissect_options *, const u_char *, const u_int);
 
+extern void pfsync_ip_print(netdissect_options *, const u_char *, u_int);
+
 /* stuff that has not yet been rototiled */
 
 #if 0

Modified: user/ngie/more-tests/contrib/tcpdump/print-ip.c
==============================================================================
--- user/ngie/more-tests/contrib/tcpdump/print-ip.c	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/contrib/tcpdump/print-ip.c	Sat Apr 25 06:07:19 2015	(r281975)
@@ -487,7 +487,7 @@ again:
 
 #if defined(HAVE_NET_PFVAR_H)
 	case IPPROTO_PFSYNC:
-		pfsync_ip_print(ipds->cp, ipds->len);
+		pfsync_ip_print(ndo, ipds->cp, ipds->len);
 		break;
 #endif
 

Modified: user/ngie/more-tests/contrib/tcpdump/print-pfsync.c
==============================================================================
--- user/ngie/more-tests/contrib/tcpdump/print-pfsync.c	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/contrib/tcpdump/print-pfsync.c	Sat Apr 25 06:07:19 2015	(r281975)
@@ -47,10 +47,12 @@
 #include "interface.h"
 #include "addrtoname.h"
 
-static void	pfsync_print(struct pfsync_header *, const u_char *, u_int);
-static void	print_src_dst(const struct pfsync_state_peer *,
+static void	pfsync_print(netdissect_options *, struct pfsync_header *,
+		    const u_char *, u_int);
+static void	print_src_dst(netdissect_options *,
+		    const struct pfsync_state_peer *,
 		    const struct pfsync_state_peer *, uint8_t);
-static void	print_state(struct pfsync_state *);
+static void	print_state(netdissect_options *, struct pfsync_state *);
 
 #ifdef notyet
 void
@@ -62,7 +64,7 @@ pfsync_if_print(u_char *user, const stru
 	ts_print(&h->ts);
 
 	if (caplen < PFSYNC_HDRLEN) {
-		printf("[|pfsync]");
+		ND_PRINT((ndo, "[|pfsync]"));
 		goto out;
 	}
 
@@ -73,36 +75,36 @@ out:
 	if (xflag) {
 		default_print((const u_char *)p, caplen);
 	}
-	putchar('\n');
+	safeputchar(ndo, '\n');
 }
 #endif /* notyet */
 
 void
-pfsync_ip_print(const u_char *bp, u_int len)
+pfsync_ip_print(netdissect_options *ndo , const u_char *bp, u_int len)
 {
 	struct pfsync_header *hdr = (struct pfsync_header *)bp;
 
 	if (len < PFSYNC_HDRLEN)
-		printf("[|pfsync]");
+		ND_PRINT((ndo, "[|pfsync]"));
 	else
-		pfsync_print(hdr, bp + sizeof(struct pfsync_header),
+		pfsync_print(ndo, hdr, bp + sizeof(struct pfsync_header),
 		    len - sizeof(struct pfsync_header));
 }
 
 struct pfsync_actions {
 	const char *name;
 	size_t len;
-	void (*print)(const void *);
+	void (*print)(netdissect_options *, const void *);
 };
 
-static void	pfsync_print_clr(const void *);
-static void	pfsync_print_state(const void *);
-static void	pfsync_print_ins_ack(const void *);
-static void	pfsync_print_upd_c(const void *);
-static void	pfsync_print_upd_req(const void *);
-static void	pfsync_print_del_c(const void *);
-static void	pfsync_print_bus(const void *);
-static void	pfsync_print_tdb(const void *);
+static void	pfsync_print_clr(netdissect_options *, const void *);
+static void	pfsync_print_state(netdissect_options *, const void *);
+static void	pfsync_print_ins_ack(netdissect_options *, const void *);
+static void	pfsync_print_upd_c(netdissect_options *, const void *);
+static void	pfsync_print_upd_req(netdissect_options *, const void *);
+static void	pfsync_print_del_c(netdissect_options *, const void *);
+static void	pfsync_print_bus(netdissect_options *, const void *);
+static void	pfsync_print_tdb(netdissect_options *, const void *);
 
 struct pfsync_actions actions[] = {
 	{ "clear all", sizeof(struct pfsync_clr),	pfsync_print_clr },
@@ -125,7 +127,8 @@ struct pfsync_actions actions[] = {
 };
 
 static void
-pfsync_print(struct pfsync_header *hdr, const u_char *bp, u_int len)
+pfsync_print(netdissect_options *ndo, struct pfsync_header *hdr,
+    const u_char *bp, u_int len)
 {
 	struct pfsync_subheader *subh;
 	int count, plen, i;
@@ -133,7 +136,7 @@ pfsync_print(struct pfsync_header *hdr, 
 
 	plen = ntohs(hdr->len);
 
-	printf("PFSYNCv%d len %d", hdr->version, plen);
+	ND_PRINT((ndo, "PFSYNCv%d len %d", hdr->version, plen));
 
 	if (hdr->version != PFSYNC_VERSION)
 		return;
@@ -150,19 +153,22 @@ pfsync_print(struct pfsync_header *hdr, 
 		plen -= sizeof(*subh);
 
 		if (subh->action >= PFSYNC_ACT_MAX) {
-			printf("\n    act UNKNOWN id %d", subh->action);
+			ND_PRINT((ndo, "\n    act UNKNOWN id %d",
+			    subh->action));
 			return;
 		}
 
 		count = ntohs(subh->count);
-		printf("\n    %s count %d", actions[subh->action].name, count);
+		ND_PRINT((ndo, "\n    %s count %d", actions[subh->action].name,
+		    count));
 		alen = actions[subh->action].len;
 
 		if (subh->action == PFSYNC_ACT_EOF)
 			return;
 
 		if (actions[subh->action].print == NULL) {
-			printf("\n    unimplemented action %hhu", subh->action);
+			ND_PRINT((ndo, "\n    unimplemented action %hhu",
+			    subh->action));
 			return;
 		}
 
@@ -173,7 +179,7 @@ pfsync_print(struct pfsync_header *hdr, 
 			}
 
 			if (vflag)
-				actions[subh->action].print(bp);
+				actions[subh->action].print(ndo, bp);
 
 			bp += alen;
 			len -= alen;
@@ -182,78 +188,78 @@ pfsync_print(struct pfsync_header *hdr, 
 	}
 
 	if (plen > 0) {
-		printf("\n    ...");
+		ND_PRINT((ndo, "\n    ..."));
 		return;
 	}
 	if (plen < 0) {
-		printf("\n    invalid header length");
+		ND_PRINT((ndo, "\n    invalid header length"));
 		return;
 	}
 	if (len > 0)
-		printf("\n    invalid packet length");
+		ND_PRINT((ndo, "\n    invalid packet length"));
 }
 
 static void
-pfsync_print_clr(const void *bp)
+pfsync_print_clr(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_clr *clr = bp;
 
-	printf("\n\tcreatorid: %08x", htonl(clr->creatorid));
+	ND_PRINT((ndo, "\n\tcreatorid: %08x", htonl(clr->creatorid)));
 	if (clr->ifname[0] != '\0')
-		printf(" interface: %s", clr->ifname);
+		ND_PRINT((ndo, " interface: %s", clr->ifname));
 }
 
 static void
-pfsync_print_state(const void *bp)
+pfsync_print_state(netdissect_options *ndo, const void *bp)
 {
 	struct pfsync_state *st = (struct pfsync_state *)bp;
 
-	putchar('\n');
-	print_state(st);
+	safeputchar(ndo, '\n');
+	print_state(ndo, st);
 }
 
 static void
-pfsync_print_ins_ack(const void *bp)
+pfsync_print_ins_ack(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_ins_ack *iack = bp;
 
-	printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(iack->id),
-	    ntohl(iack->creatorid));
+	ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x",
+	    (uintmax_t)be64toh(iack->id), ntohl(iack->creatorid)));
 }
 
 static void
-pfsync_print_upd_c(const void *bp)
+pfsync_print_upd_c(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_upd_c *u = bp;
 
-	printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(u->id),
-	    ntohl(u->creatorid));
+	ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x",
+	    (uintmax_t)be64toh(u->id), ntohl(u->creatorid)));
 	if (vflag > 2) {
-		printf("\n\tTCP? :");
-		print_src_dst(&u->src, &u->dst, IPPROTO_TCP);
+		ND_PRINT((ndo, "\n\tTCP? :"));
+		print_src_dst(ndo, &u->src, &u->dst, IPPROTO_TCP);
 	}
 }
 
 static void
-pfsync_print_upd_req(const void *bp)
+pfsync_print_upd_req(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_upd_req *ur = bp;
 
-	printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(ur->id),
-	    ntohl(ur->creatorid));
+	ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x",
+	    (uintmax_t)be64toh(ur->id), ntohl(ur->creatorid)));
 }
 
 static void
-pfsync_print_del_c(const void *bp)
+pfsync_print_del_c(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_del_c *d = bp;
 
-	printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(d->id),
-	    ntohl(d->creatorid));
+	ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x",
+	    (uintmax_t)be64toh(d->id), ntohl(d->creatorid)));
 }
 
 static void
-pfsync_print_bus(const void *bp)
+pfsync_print_bus(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_bus *b = bp;
 	uint32_t endtime;
@@ -278,95 +284,95 @@ pfsync_print_bus(const void *bp)
 		break;
 	}
 
-	printf("\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s",
-	    htonl(b->creatorid), endtime, min, sec, status);
+	ND_PRINT((ndo, "\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s",
+	    htonl(b->creatorid), endtime, min, sec, status));
 }
 
 static void
-pfsync_print_tdb(const void *bp)
+pfsync_print_tdb(netdissect_options *ndo, const void *bp)
 {
 	const struct pfsync_tdb *t = bp;
 
-	printf("\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju",
+	ND_PRINT((ndo, "\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju",
 	    ntohl(t->spi), (uintmax_t )be64toh(t->rpl),
-	    (uintmax_t )be64toh(t->cur_bytes));
+	    (uintmax_t )be64toh(t->cur_bytes)));
 }
 
 static void
-print_host(struct pf_addr *addr, uint16_t port, sa_family_t af,
-    const char *proto)
+print_host(netdissect_options *ndo, struct pf_addr *addr, uint16_t port,
+    sa_family_t af, const char *proto)
 {
 	char buf[48];
 
 	if (inet_ntop(af, addr, buf, sizeof(buf)) == NULL)
-		printf("?");
+		ND_PRINT((ndo, "?"));
 	else
-		printf("%s", buf);
+		ND_PRINT((ndo, "%s", buf));
 
 	if (port)
-		printf(".%hu", ntohs(port));
+		ND_PRINT((ndo, ".%hu", ntohs(port)));
 }
 
 static void
-print_seq(const struct pfsync_state_peer *p)
+print_seq(netdissect_options *ndo, const struct pfsync_state_peer *p)
 {
 	if (p->seqdiff)
-		printf("[%u + %u](+%u)", ntohl(p->seqlo),
-		    ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff));
+		ND_PRINT((ndo, "[%u + %u](+%u)", ntohl(p->seqlo),
+		    ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff)));
 	else
-		printf("[%u + %u]", ntohl(p->seqlo),
-		    ntohl(p->seqhi) - ntohl(p->seqlo));
+		ND_PRINT((ndo, "[%u + %u]", ntohl(p->seqlo),
+		    ntohl(p->seqhi) - ntohl(p->seqlo)));
 }
 
 static void
-print_src_dst(const struct pfsync_state_peer *src,
+print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src,
     const struct pfsync_state_peer *dst, uint8_t proto)
 {
 
 	if (proto == IPPROTO_TCP) {
 		if (src->state <= TCPS_TIME_WAIT &&
 		    dst->state <= TCPS_TIME_WAIT)
-			printf("   %s:%s", tcpstates[src->state],
-			    tcpstates[dst->state]);
+			ND_PRINT((ndo, "   %s:%s", tcpstates[src->state],
+			    tcpstates[dst->state]));
 		else if (src->state == PF_TCPS_PROXY_SRC ||
 		    dst->state == PF_TCPS_PROXY_SRC)
-			printf("   PROXY:SRC");
+			ND_PRINT((ndo, "   PROXY:SRC"));
 		else if (src->state == PF_TCPS_PROXY_DST ||
 		    dst->state == PF_TCPS_PROXY_DST)
-			printf("   PROXY:DST");
+			ND_PRINT((ndo, "   PROXY:DST"));
 		else
-			printf("   <BAD STATE LEVELS %u:%u>",
-			    src->state, dst->state);
+			ND_PRINT((ndo, "   <BAD STATE LEVELS %u:%u>",
+			    src->state, dst->state));
 		if (vflag > 1) {
-			printf("\n\t");
-			print_seq(src);
+			ND_PRINT((ndo, "\n\t"));
+			print_seq(ndo, src);
 			if (src->wscale && dst->wscale)
-				printf(" wscale %u",
-				    src->wscale & PF_WSCALE_MASK);
-			printf("  ");
-			print_seq(dst);
+				ND_PRINT((ndo, " wscale %u",
+				    src->wscale & PF_WSCALE_MASK));
+			ND_PRINT((ndo, "  "));
+			print_seq(ndo, dst);
 			if (src->wscale && dst->wscale)
-				printf(" wscale %u",
-				    dst->wscale & PF_WSCALE_MASK);
+				ND_PRINT((ndo, " wscale %u",
+				    dst->wscale & PF_WSCALE_MASK));
 		}
 	} else if (proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES &&
 	    dst->state < PFUDPS_NSTATES) {
 		const char *states[] = PFUDPS_NAMES;
 
-		printf("   %s:%s", states[src->state], states[dst->state]);
+		ND_PRINT((ndo, "   %s:%s", states[src->state], states[dst->state]));
 	} else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES &&
 	    dst->state < PFOTHERS_NSTATES) {
 		/* XXX ICMP doesn't really have state levels */
 		const char *states[] = PFOTHERS_NAMES;
 
-		printf("   %s:%s", states[src->state], states[dst->state]);
+		ND_PRINT((ndo, "   %s:%s", states[src->state], states[dst->state]));
 	} else {
-		printf("   %u:%u", src->state, dst->state);
+		ND_PRINT((ndo, "   %u:%u", src->state, dst->state));
 	}
 }
 
 static void
-print_state(struct pfsync_state *s)
+print_state(netdissect_options *ndo, struct pfsync_state *s)
 {
 	struct pfsync_state_peer *src, *dst;
 	struct pfsync_state_key *sk, *nk;
@@ -387,29 +393,29 @@ print_state(struct pfsync_state *s)
 		if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6)
 			sk->port[1] = nk->port[1];
 	}
-	printf("\t%s ", s->ifname);
-	printf("proto %u ", s->proto);
+	ND_PRINT((ndo, "\t%s ", s->ifname));
+	ND_PRINT((ndo, "proto %u ", s->proto));
 
-	print_host(&nk->addr[1], nk->port[1], s->af, NULL);
+	print_host(ndo, &nk->addr[1], nk->port[1], s->af, NULL);
 	if (PF_ANEQ(&nk->addr[1], &sk->addr[1], s->af) ||
 	    nk->port[1] != sk->port[1]) {
-		printf(" (");
-		print_host(&sk->addr[1], sk->port[1], s->af, NULL);
-		printf(")");
+		ND_PRINT((ndo, " ("));
+		print_host(ndo, &sk->addr[1], sk->port[1], s->af, NULL);
+		ND_PRINT((ndo, ")"));
 	}
 	if (s->direction == PF_OUT)
-		printf(" -> ");
+		ND_PRINT((ndo, " -> "));
 	else
-		printf(" <- ");
-	print_host(&nk->addr[0], nk->port[0], s->af, NULL);
+		ND_PRINT((ndo, " <- "));
+	print_host(ndo, &nk->addr[0], nk->port[0], s->af, NULL);
 	if (PF_ANEQ(&nk->addr[0], &sk->addr[0], s->af) ||
 	    nk->port[0] != sk->port[0]) {
-		printf(" (");
-		print_host(&sk->addr[0], sk->port[0], s->af, NULL);
-		printf(")");
+		ND_PRINT((ndo, " ("));
+		print_host(ndo, &sk->addr[0], sk->port[0], s->af, NULL);
+		ND_PRINT((ndo, ")"));
 	}
 
-	print_src_dst(src, dst, s->proto);
+	print_src_dst(ndo, src, dst, s->proto);
 
 	if (vflag > 1) {
 		uint64_t packets[2];
@@ -421,30 +427,30 @@ print_state(struct pfsync_state *s)
 		creation /= 60;
 		min = creation % 60;
 		creation /= 60;
-		printf("\n\tage %.2u:%.2u:%.2u", creation, min, sec);
+		ND_PRINT((ndo, "\n\tage %.2u:%.2u:%.2u", creation, min, sec));
 		sec = expire % 60;
 		expire /= 60;
 		min = expire % 60;
 		expire /= 60;
-		printf(", expires in %.2u:%.2u:%.2u", expire, min, sec);
+		ND_PRINT((ndo, ", expires in %.2u:%.2u:%.2u", expire, min, sec));
 
 		bcopy(s->packets[0], &packets[0], sizeof(uint64_t));
 		bcopy(s->packets[1], &packets[1], sizeof(uint64_t));
 		bcopy(s->bytes[0], &bytes[0], sizeof(uint64_t));
 		bcopy(s->bytes[1], &bytes[1], sizeof(uint64_t));
-		printf(", %ju:%ju pkts, %ju:%ju bytes",
+		ND_PRINT((ndo, ", %ju:%ju pkts, %ju:%ju bytes",
 		    be64toh(packets[0]), be64toh(packets[1]),
-		    be64toh(bytes[0]), be64toh(bytes[1]));
+		    be64toh(bytes[0]), be64toh(bytes[1])));
 		if (s->anchor != ntohl(-1))
-			printf(", anchor %u", ntohl(s->anchor));
+			ND_PRINT((ndo, ", anchor %u", ntohl(s->anchor)));
 		if (s->rule != ntohl(-1))
-			printf(", rule %u", ntohl(s->rule));
+			ND_PRINT((ndo, ", rule %u", ntohl(s->rule)));
 	}
 	if (vflag > 1) {
 		uint64_t id;
 
 		bcopy(&s->id, &id, sizeof(uint64_t));
-		printf("\n\tid: %016jx creatorid: %08x",
-		    (uintmax_t )be64toh(id), ntohl(s->creatorid));
+		ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x",
+		    (uintmax_t )be64toh(id), ntohl(s->creatorid)));
 	}
 }

Modified: user/ngie/more-tests/lib/libc/locale/duplocale.3
==============================================================================
--- user/ngie/more-tests/lib/libc/locale/duplocale.3	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libc/locale/duplocale.3	Sat Apr 25 06:07:19 2015	(r281975)
@@ -36,7 +36,7 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale.h
+.In locale.h
 .Ft locale_t
 .Fn duplocale "locale_t locale"
 .Sh DESCRIPTION

Modified: user/ngie/more-tests/lib/libc/locale/freelocale.3
==============================================================================
--- user/ngie/more-tests/lib/libc/locale/freelocale.3	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libc/locale/freelocale.3	Sat Apr 25 06:07:19 2015	(r281975)
@@ -38,7 +38,7 @@ or
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale.h
+.In locale.h
 .Ft int
 .Fn freelocale "locale_t locale"
 .Sh DESCRIPTION

Modified: user/ngie/more-tests/lib/libc/locale/newlocale.3
==============================================================================
--- user/ngie/more-tests/lib/libc/locale/newlocale.3	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libc/locale/newlocale.3	Sat Apr 25 06:07:19 2015	(r281975)
@@ -35,7 +35,7 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale
+.In locale.h
 .Ft locale_t
 .Fn newlocale "int mask" "const char * locale" "locale_t base"
 .Sh DESCRIPTION

Modified: user/ngie/more-tests/lib/libc/locale/none.c
==============================================================================
--- user/ngie/more-tests/lib/libc/locale/none.c	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libc/locale/none.c	Sat Apr 25 06:07:19 2015	(r281975)
@@ -209,7 +209,7 @@ struct xlocale_ctype __xlocale_global_ct
 	256 /* __mb_sb_limit */
 };
 
-const struct xlocale_ctype __xlocale_C_ctype = {
+struct xlocale_ctype __xlocale_C_ctype = {
 	{{0}, "C"},
 	(_RuneLocale*)&_DefaultRuneLocale,
 	_none_mbrtowc,

Modified: user/ngie/more-tests/lib/libc/locale/querylocale.3
==============================================================================
--- user/ngie/more-tests/lib/libc/locale/querylocale.3	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libc/locale/querylocale.3	Sat Apr 25 06:07:19 2015	(r281975)
@@ -36,7 +36,7 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale.h
+.In locale.h
 .Ft const char *
 .Fn querylocale "int mask" "locale_t locale"
 .Sh DESCRIPTION

Modified: user/ngie/more-tests/lib/libc/locale/uselocale.3
==============================================================================
--- user/ngie/more-tests/lib/libc/locale/uselocale.3	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libc/locale/uselocale.3	Sat Apr 25 06:07:19 2015	(r281975)
@@ -36,7 +36,7 @@
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
-.In xlocale.h
+.In locale.h
 .Ft locale_t
 .Fn uselocale "locale_t locale"
 .Sh DESCRIPTION

Modified: user/ngie/more-tests/lib/libmd/mdXhl.c
==============================================================================
--- user/ngie/more-tests/lib/libmd/mdXhl.c	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/lib/libmd/mdXhl.c	Sat Apr 25 06:07:19 2015	(r281975)
@@ -74,7 +74,7 @@ MDXFileChunk(const char *filename, char 
 			i = read(f, buffer, sizeof(buffer));
 		else
 			i = read(f, buffer, n);
-		if (i < 0) 
+		if (i <= 0) 
 			break;
 		MDXUpdate(&ctx, buffer, i);
 		n -= i;

Modified: user/ngie/more-tests/sbin/camcontrol/camcontrol.8
==============================================================================
--- user/ngie/more-tests/sbin/camcontrol/camcontrol.8	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/sbin/camcontrol/camcontrol.8	Sat Apr 25 06:07:19 2015	(r281975)
@@ -575,7 +575,6 @@ Most drives support this format.
 Print out the list in extended physical sector format.
 The extended format allows for ranges of blocks to be printed.
 .El
-.Pp
 .It Fl G
 Print out the grown defect list.
 This is a list of bad blocks that have

Modified: user/ngie/more-tests/sbin/growfs/Makefile
==============================================================================
--- user/ngie/more-tests/sbin/growfs/Makefile	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/sbin/growfs/Makefile	Sat Apr 25 06:07:19 2015	(r281975)
@@ -4,8 +4,6 @@
 # $FreeBSD$
 #
 
-#GFSDBG=
-
 .include <src.opts.mk>
 
 .PATH:	${.CURDIR}/../mount
@@ -16,7 +14,9 @@ MAN=	growfs.8
 CFLAGS+=-I${.CURDIR}/../mount
 
 .if defined(GFSDBG)
-SRCS+=  debug.c
+SRCS+=	debug.c
+CFLAGS+= -DFS_DEBUG
+NO_WCAST_ALIGN= yes
 .endif  
 
 LIBADD=	util

Modified: user/ngie/more-tests/sbin/growfs/growfs.c
==============================================================================
--- user/ngie/more-tests/sbin/growfs/growfs.c	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/sbin/growfs/growfs.c	Sat Apr 25 06:07:19 2015	(r281975)
@@ -161,7 +161,7 @@ growfs(int fsi, int fso, unsigned int Nf
 #ifdef FS_DEBUG
 	{
 		struct csum *dbg_csp;
-		int dbg_csc;
+		u_int32_t dbg_csc;
 		char dbg_line[80];
 
 		dbg_csp = fscs;
@@ -242,7 +242,7 @@ growfs(int fsi, int fso, unsigned int Nf
 #ifdef FS_DEBUG
 	{
 		struct csum	*dbg_csp;
-		int	dbg_csc;
+		u_int32_t	dbg_csc;
 		char	dbg_line[80];
 
 		dbg_csp = fscs;

Modified: user/ngie/more-tests/share/mk/src.opts.mk
==============================================================================
--- user/ngie/more-tests/share/mk/src.opts.mk	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/share/mk/src.opts.mk	Sat Apr 25 06:07:19 2015	(r281975)
@@ -235,6 +235,10 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST
 .if ${__T} == "aarch64"
 BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB
 .endif
+# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5
+.if ${__T} == "arm" || ${__T} == "armeb"
+BROKEN_OPTIONS+=LLDB
+.endif
 
 .include <bsd.mkopt.mk>
 

Modified: user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c	Sat Apr 25 05:31:52 2015	(r281974)
+++ user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c	Sat Apr 25 06:07:19 2015	(r281975)
@@ -81,28 +81,11 @@ __FBSDID("$FreeBSD$");
 #define BIOS_RESET		(0x0f)
 #define BIOS_WARM		(0x0a)
 
-/* lock region used by kernel profiling */
-int	mcount_lock;
-
-int	mp_naps;		/* # of Applications processors */
-int	boot_cpu_id = -1;	/* designated BSP */
-
-extern  struct pcpu __pcpu[];
-
-/* AP uses this during bootstrap.  Do not staticize.  */
-char *bootSTK;
-int bootAP;
-
-/* Free these after use */
-void *bootstacks[MAXCPU];
+extern	struct pcpu __pcpu[];
 
 /* Temporary variables for init_secondary()  */
 char *doublefault_stack;
 char *nmi_stack;
-void *dpcpu;
-
-struct pcb stoppcbs[MAXCPU];
-struct susppcb **susppcbs;
 
 /* Variables needed for SMP tlb shootdown. */
 vm_offset_t smp_tlb_addr2;
@@ -112,309 +95,16 @@ uint64_t pcid_cr3;
 pmap_t smp_tlb_pmap;
 extern int invpcid_works;
 
-#ifdef COUNT_IPIS
-/* Interrupt counts. */
-static u_long *ipi_preempt_counts[MAXCPU];
-static u_long *ipi_ast_counts[MAXCPU];
-u_long *ipi_invltlb_counts[MAXCPU];
-u_long *ipi_invlrng_counts[MAXCPU];
-u_long *ipi_invlpg_counts[MAXCPU];
-u_long *ipi_invlcache_counts[MAXCPU];
-u_long *ipi_rendezvous_counts[MAXCPU];
-static u_long *ipi_hardclock_counts[MAXCPU];
-#endif
-
-/* Default cpu_ops implementation. */
-struct cpu_ops cpu_ops;
-
 extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32);
 
-extern int pmap_pcid_enabled;
-
 /*
  * Local data and functions.
  */
 
-static volatile cpuset_t ipi_nmi_pending;
-
-/* used to hold the AP's until we are ready to release them */
-struct mtx ap_boot_mtx;
-
-/* Set to 1 once we're ready to let the APs out of the pen. */
-static volatile int aps_ready = 0;
-
-/*
- * Store data from cpu_add() until later in the boot when we actually setup
- * the APs.
- */
-struct cpu_info {
-	int	cpu_present:1;
-	int	cpu_bsp:1;
-	int	cpu_disabled:1;
-	int	cpu_hyperthread:1;
-} static cpu_info[MAX_APIC_ID + 1];
-int cpu_apic_ids[MAXCPU];
-int apic_cpuids[MAX_APIC_ID + 1];
-
-/* Holds pending bitmap based IPIs per CPU */
-volatile u_int cpu_ipi_pending[MAXCPU];
-
-static u_int boot_address;
-static int cpu_logical;			/* logical cpus per core */
-static int cpu_cores;			/* cores per package */
-
-static void	assign_cpu_ids(void);
-static void	set_interrupt_apic_ids(void);
 static int	start_ap(int apic_id);
-static void	release_aps(void *dummy);
 
-static u_int	hyperthreading_cpus;	/* logical cpus sharing L1 cache */
-static int	hyperthreading_allowed = 1;
 static u_int	bootMP_size;
-
-static void
-mem_range_AP_init(void)
-{
-	if (mem_range_softc.mr_op && mem_range_softc.mr_op->initAP)
-		mem_range_softc.mr_op->initAP(&mem_range_softc);
-}
-
-static void
-topo_probe_amd(void)
-{
-	int core_id_bits;
-	int id;
-
-	/* AMD processors do not support HTT. */
-	cpu_logical = 1;
-
-	if ((amd_feature2 & AMDID2_CMP) == 0) {
-		cpu_cores = 1;
-		return;
-	}
-
-	core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >>
-	    AMDID_COREID_SIZE_SHIFT;
-	if (core_id_bits == 0) {
-		cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1;
-		return;
-	}
-
-	/* Fam 10h and newer should get here. */
-	for (id = 0; id <= MAX_APIC_ID; id++) {
-		/* Check logical CPU availability. */
-		if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled)
-			continue;
-		/* Check if logical CPU has the same package ID. */
-		if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits))
-			continue;
-		cpu_cores++;
-	}
-}
-
-/*
- * Round up to the next power of two, if necessary, and then
- * take log2.
- * Returns -1 if argument is zero.
- */
-static __inline int
-mask_width(u_int x)
-{
-
-	return (fls(x << (1 - powerof2(x))) - 1);
-}
-
-static void
-topo_probe_0x4(void)
-{
-	u_int p[4];
-	int pkg_id_bits;
-	int core_id_bits;
-	int max_cores;
-	int max_logical;
-	int id;
-
-	/* Both zero and one here mean one logical processor per package. */
-	max_logical = (cpu_feature & CPUID_HTT) != 0 ?
-	    (cpu_procinfo & CPUID_HTT_CORES) >> 16 : 1;
-	if (max_logical <= 1)
-		return;
-
-	/*
-	 * Because of uniformity assumption we examine only
-	 * those logical processors that belong to the same
-	 * package as BSP.  Further, we count number of
-	 * logical processors that belong to the same core
-	 * as BSP thus deducing number of threads per core.
-	 */
-	if (cpu_high >= 0x4) {
-		cpuid_count(0x04, 0, p);
-		max_cores = ((p[0] >> 26) & 0x3f) + 1;
-	} else
-		max_cores = 1;
-	core_id_bits = mask_width(max_logical/max_cores);
-	if (core_id_bits < 0)
-		return;
-	pkg_id_bits = core_id_bits + mask_width(max_cores);
-
-	for (id = 0; id <= MAX_APIC_ID; id++) {
-		/* Check logical CPU availability. */
-		if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled)
-			continue;
-		/* Check if logical CPU has the same package ID. */
-		if ((id >> pkg_id_bits) != (boot_cpu_id >> pkg_id_bits))
-			continue;
-		cpu_cores++;
-		/* Check if logical CPU has the same package and core IDs. */
-		if ((id >> core_id_bits) == (boot_cpu_id >> core_id_bits))
-			cpu_logical++;
-	}
-
-	KASSERT(cpu_cores >= 1 && cpu_logical >= 1,
-	    ("topo_probe_0x4 couldn't find BSP"));
-
-	cpu_cores /= cpu_logical;
-	hyperthreading_cpus = cpu_logical;
-}
-
-static void
-topo_probe_0xb(void)
-{
-	u_int p[4];
-	int bits;
-	int cnt;
-	int i;
-	int logical;
-	int type;
-	int x;
-
-	/* We only support three levels for now. */
-	for (i = 0; i < 3; i++) {
-		cpuid_count(0x0b, i, p);
-
-		/* Fall back if CPU leaf 11 doesn't really exist. */
-		if (i == 0 && p[1] == 0) {
-			topo_probe_0x4();
-			return;
-		}
-
-		bits = p[0] & 0x1f;
-		logical = p[1] &= 0xffff;
-		type = (p[2] >> 8) & 0xff;
-		if (type == 0 || logical == 0)
-			break;
-		/*
-		 * Because of uniformity assumption we examine only
-		 * those logical processors that belong to the same
-		 * package as BSP.
-		 */
-		for (cnt = 0, x = 0; x <= MAX_APIC_ID; x++) {
-			if (!cpu_info[x].cpu_present ||
-			    cpu_info[x].cpu_disabled)
-				continue;
-			if (x >> bits == boot_cpu_id >> bits)
-				cnt++;
-		}
-		if (type == CPUID_TYPE_SMT)
-			cpu_logical = cnt;
-		else if (type == CPUID_TYPE_CORE)
-			cpu_cores = cnt;
-	}
-	if (cpu_logical == 0)
-		cpu_logical = 1;
-	cpu_cores /= cpu_logical;
-}
-
-/*
- * Both topology discovery code and code that consumes topology
- * information assume top-down uniformity of the topology.
- * That is, all physical packages must be identical and each
- * core in a package must have the same number of threads.
- * Topology information is queried only on BSP, on which this
- * code runs and for which it can query CPUID information.
- * Then topology is extrapolated on all packages using the
- * uniformity assumption.
- */
-static void
-topo_probe(void)
-{
-	static int cpu_topo_probed = 0;
-
-	if (cpu_topo_probed)
-		return;
-
-	CPU_ZERO(&logical_cpus_mask);
-	if (mp_ncpus <= 1)
-		cpu_cores = cpu_logical = 1;
-	else if (cpu_vendor_id == CPU_VENDOR_AMD)
-		topo_probe_amd();
-	else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
-		/*
-		 * See Intel(R) 64 Architecture Processor
-		 * Topology Enumeration article for details.
-		 *
-		 * Note that 0x1 <= cpu_high < 4 case should be
-		 * compatible with topo_probe_0x4() logic when
-		 * CPUID.1:EBX[23:16] > 0 (cpu_cores will be 1)
-		 * or it should trigger the fallback otherwise.
-		 */
-		if (cpu_high >= 0xb)
-			topo_probe_0xb();
-		else if (cpu_high >= 0x1)
-			topo_probe_0x4();
-	}
-
-	/*
-	 * Fallback: assume each logical CPU is in separate
-	 * physical package.  That is, no multi-core, no SMT.
-	 */
-	if (cpu_cores == 0 || cpu_logical == 0)
-		cpu_cores = cpu_logical = 1;
-	cpu_topo_probed = 1;
-}
-
-struct cpu_group *
-cpu_topo(void)
-{
-	int cg_flags;
-
-	/*
-	 * Determine whether any threading flags are
-	 * necessry.
-	 */
-	topo_probe();
-	if (cpu_logical > 1 && hyperthreading_cpus)
-		cg_flags = CG_FLAG_HTT;
-	else if (cpu_logical > 1)
-		cg_flags = CG_FLAG_SMT;
-	else
-		cg_flags = 0;
-	if (mp_ncpus % (cpu_cores * cpu_logical) != 0) {
-		printf("WARNING: Non-uniform processors.\n");
-		printf("WARNING: Using suboptimal topology.\n");
-		return (smp_topo_none());
-	}
-	/*
-	 * 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_flags));
-	/*
-	 * Only multi-core no HTT.
-	 */
-	if (cpu_cores > 1 && cpu_logical == 1)
-		return (smp_topo_1level(CG_SHARE_L2, cpu_cores, cg_flags));
-	/*
-	 * Both HTT and multi-core.
-	 */
-	return (smp_topo_2level(CG_SHARE_L2, cpu_cores,
-	    CG_SHARE_L1, cpu_logical, cg_flags));
-}
+static u_int	boot_address;
 
 /*
  * Calculate usable address in base memory for AP trampoline code.
@@ -433,85 +123,6 @@ mp_bootaddress(u_int basemem)
 	return mptramp_pagetables;
 }
 
-void
-cpu_add(u_int apic_id, char boot_cpu)
-{
-
-	if (apic_id > MAX_APIC_ID) {
-		panic("SMP: APIC ID %d too high", apic_id);
-		return;
-	}
-	KASSERT(cpu_info[apic_id].cpu_present == 0, ("CPU %d added twice",
-	    apic_id));
-	cpu_info[apic_id].cpu_present = 1;
-	if (boot_cpu) {
-		KASSERT(boot_cpu_id == -1,
-		    ("CPU %d claims to be BSP, but CPU %d already is", apic_id,
-		    boot_cpu_id));
-		boot_cpu_id = apic_id;
-		cpu_info[apic_id].cpu_bsp = 1;
-	}
-	if (mp_ncpus < MAXCPU) {
-		mp_ncpus++;
-		mp_maxid = mp_ncpus - 1;
-	}
-	if (bootverbose)
-		printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" :
-		    "AP");
-}
-
-void
-cpu_mp_setmaxid(void)
-{
-
-	/*

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



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