From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 02:22:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E75531065674; Sun, 25 Jul 2010 02:22:32 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 049418FC16; Sun, 25 Jul 2010 02:22:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6P2MWEc007560; Sun, 25 Jul 2010 02:22:32 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6P2MWFO007558; Sun, 25 Jul 2010 02:22:32 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201007250222.o6P2MWFO007558@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 25 Jul 2010 02:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210459 - head/sys/boot/pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 02:22:33 -0000 Author: nyan Date: Sun Jul 25 02:22:32 2010 New Revision: 210459 URL: http://svn.freebsd.org/changeset/base/210459 Log: MFi386: revision 210387 Correctly setup LDADD with regards to libstand. Modified: head/sys/boot/pc98/loader/Makefile Modified: head/sys/boot/pc98/loader/Makefile ============================================================================== --- head/sys/boot/pc98/loader/Makefile Sat Jul 24 23:41:09 2010 (r210458) +++ head/sys/boot/pc98/loader/Makefile Sun Jul 25 02:22:32 2010 (r210459) @@ -94,6 +94,6 @@ FILES+= ${.CURDIR}/../../i386/loader/loa OBJS= ${BTXCRT} DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBPC98} -lstand +LDADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} .include From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 04:19:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B794D106566B; Sun, 25 Jul 2010 04:19:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A776C8FC08; Sun, 25 Jul 2010 04:19:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6P4J5ml033285; Sun, 25 Jul 2010 04:19:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6P4J50q033283; Sun, 25 Jul 2010 04:19:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007250419.o6P4J50q033283@svn.freebsd.org> From: Warner Losh Date: Sun, 25 Jul 2010 04:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210460 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 04:19:05 -0000 Author: imp Date: Sun Jul 25 04:19:05 2010 New Revision: 210460 URL: http://svn.freebsd.org/changeset/base/210460 Log: Get N64 building by defining VM_FREELIST_DIRECT to be VM_FREELIST_DEFAULT. I believe this is correct, since KX is set in n64, and thus all RAM can be direct mapped. Modified: head/sys/mips/include/vmparam.h Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Sun Jul 25 02:22:32 2010 (r210459) +++ head/sys/mips/include/vmparam.h Sun Jul 25 04:19:05 2010 (r210460) @@ -184,6 +184,7 @@ #ifdef __mips_n64 #define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 +#define VM_FREELIST_DIRECT VM_FREELIST_DEFAULT #else #define VM_NFREELIST 2 #define VM_FREELIST_DEFAULT 1 From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 04:48:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 837601065676; Sun, 25 Jul 2010 04:48:29 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5D98FC1D; Sun, 25 Jul 2010 04:48:29 +0000 (UTC) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id C11AA2C2AEB; Sat, 24 Jul 2010 23:48:28 -0500 (CDT) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PayAnJW2HKer; Sat, 24 Jul 2010 23:48:21 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id C7E3A2C2A92; Sat, 24 Jul 2010 23:48:20 -0500 (CDT) Message-ID: <4C4BC213.5060001@cs.rice.edu> Date: Sat, 24 Jul 2010 23:48:19 -0500 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100501) MIME-Version: 1.0 To: Warner Losh References: <201007250419.o6P4J50q033283@svn.freebsd.org> In-Reply-To: <201007250419.o6P4J50q033283@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210460 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 04:48:29 -0000 Warner Losh wrote: > Author: imp > Date: Sun Jul 25 04:19:05 2010 > New Revision: 210460 > URL: http://svn.freebsd.org/changeset/base/210460 > > Log: > Get N64 building by defining VM_FREELIST_DIRECT to be > VM_FREELIST_DEFAULT. I believe this is correct, since KX is set in > n64, and thus all RAM can be direct mapped. > Yes, it is. Alan From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 06:18:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59FB21065675; Sun, 25 Jul 2010 06:18:09 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id D6B028FC0A; Sun, 25 Jul 2010 06:18:08 +0000 (UTC) Received: by vws7 with SMTP id 7so1876352vws.13 for ; Sat, 24 Jul 2010 23:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+zdgizGHx9ARTqC9LVWsgM4LmVqK6LzUf1HgL4YJt+s=; b=mKeZ2zQ3Ns629OvPO6+L0fMWX11hdgyRTyOSv0kVeZ18ZTO7FfutPBail1d7QoW0P/ KUcYoh5imqt5NvD3KyZl2i0aymXQ6bM9L1nWVboe+JsGdhKjkIKwo9Ny2EA+sy4hk7mv RD2qH4XIxwH76oUdxzyzorVDKuXDatDYMwKB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mCK1RDKdsRbSoM8JHfUNg8tJDuPGpYrCiI3YPN7bdW6eiJZpemCkFLDYb1T1f/cd6q N72EukhBI6UVa70ln/0fsocGNH1Um6e217gOnNXe5+Xqcao8gO+le1Espz/VuV51xfE0 nnBNkA1cM3akdxFWvrkOUHte5KaJoPhjaTBSE= MIME-Version: 1.0 Received: by 10.220.63.12 with SMTP id z12mr3108258vch.184.1280038687752; Sat, 24 Jul 2010 23:18:07 -0700 (PDT) Received: by 10.220.195.11 with HTTP; Sat, 24 Jul 2010 23:18:07 -0700 (PDT) In-Reply-To: <4C4BC213.5060001@cs.rice.edu> References: <201007250419.o6P4J50q033283@svn.freebsd.org> <4C4BC213.5060001@cs.rice.edu> Date: Sun, 25 Jul 2010 11:48:07 +0530 Message-ID: From: "Jayachandran C." To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Alan Cox Subject: Re: svn commit: r210460 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 06:18:09 -0000 On Sun, Jul 25, 2010 at 10:18 AM, Alan Cox wrote: > Warner Losh wrote: >> >> Author: imp >> Date: Sun Jul 25 04:19:05 2010 >> New Revision: 210460 >> URL: http://svn.freebsd.org/changeset/base/210460 >> >> Log: >> =A0Get N64 building by defining VM_FREELIST_DIRECT to be >> =A0VM_FREELIST_DEFAULT. =A0I believe this is correct, since KX is set in >> =A0n64, and thus all RAM can be direct mapped. Thanks, this is something I missed in my MIPS page table changes. > > Yes, it is. In MIPS 64bit, whole physical memory is direct mapped thru a XKPHYS region. We can use vm_page_alloc() for pmap_alloc_pte_page() and VM_WAIT for pmap_grow_pte_page_cache(), is this something we should consider? Thanks JC. From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 08:42:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18046106567D; Sun, 25 Jul 2010 08:42:19 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 289E08FC0C; Sun, 25 Jul 2010 08:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6P8gISU090612; Sun, 25 Jul 2010 08:42:18 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6P8gI2W090609; Sun, 25 Jul 2010 08:42:18 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007250842.o6P8gI2W090609@svn.freebsd.org> From: Gabor Kovesdan Date: Sun, 25 Jul 2010 08:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210461 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 08:42:19 -0000 Author: gabor Date: Sun Jul 25 08:42:18 2010 New Revision: 210461 URL: http://svn.freebsd.org/changeset/base/210461 Log: - Fix --color behaviour to only output color sequences if stdout is a tty or if forced mode is specified [1] - While here, add some alternative names for the options and make then case-insensitive - Fix -q and -l behaviour [2] - Some small changes to make the code easier to review Submitted by: swell.k@gmail.com [1], dougb [2] Approved by: delphij (mentor) Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Sun Jul 25 04:19:05 2010 (r210460) +++ head/usr.bin/grep/grep.c Sun Jul 25 08:42:18 2010 (r210461) @@ -114,13 +114,13 @@ bool lbflag; /* --line-buffered */ bool nullflag; /* --null */ bool exclflag; /* --exclude */ char *label; /* --label */ -char *color; /* --color */ +const char *color; /* --color */ int grepbehave = GREP_BASIC; /* -EFGP: type of the regex */ int binbehave = BINFILE_BIN; /* -aIU: handling of binary files */ int filebehave = FILE_STDIO; /* -JZ: normal, gzip or bzip2 file */ -int devbehave = DEV_GREP; /* -D: handling of devices */ -int dirbehave = DIR_GREP; /* -dRr: handling of directories */ -int linkbehave = LINK_GREP; /* -OpS: handling of symlinks */ +int devbehave = DEV_READ; /* -D: handling of devices */ +int dirbehave = DIR_READ; /* -dRr: handling of directories */ +int linkbehave = LINK_READ; /* -OpS: handling of symlinks */ enum { BIN_OPT = CHAR_MAX + 1, @@ -136,6 +136,8 @@ enum { R_DINCLUDE_OPT }; +static inline const char *init_color(const char *); + /* Housekeeping */ bool first = true; /* flag whether we are processing the first match */ bool prev; /* flag whether or not the previous line matched */ @@ -279,6 +281,15 @@ read_patterns(const char *fn) fclose(f); } +static inline const char * +init_color(const char *d) +{ + char *c; + + c = getenv("GREP_COLOR"); + return (c != NULL ? c : d); +} + int main(int argc, char *argv[]) { @@ -415,16 +426,24 @@ main(int argc, char *argv[]) cflag = true; break; case 'D': - if (strcmp(optarg, "skip") == 0) + if (strcasecmp(optarg, "skip") == 0) devbehave = DEV_SKIP; + else if (strcasecmp(optarg, "read") == 0) + devbehave = DEV_READ; + else { + errno = EINVAL; + err(2, NULL); + } break; case 'd': - if (strcmp("recurse", optarg) == 0) { + if (strcasecmp("recurse", optarg) == 0) { Hflag = true; dirbehave = DIR_RECURSE; - } else if (strcmp("skip", optarg) == 0) + } else if (strcasecmp("skip", optarg) == 0) dirbehave = DIR_SKIP; - else if (strcmp("read", optarg) != 0) { + else if (strcasecmp("read", optarg) == 0) + dirbehave = DIR_READ; + else { errno = EINVAL; err(2, NULL); } @@ -466,11 +485,11 @@ main(int argc, char *argv[]) break; case 'L': lflag = false; - Lflag = qflag = true; + Lflag = true; break; case 'l': Lflag = false; - lflag = qflag = true; + lflag = true; break; case 'm': mflag = true; @@ -500,7 +519,7 @@ main(int argc, char *argv[]) qflag = true; break; case 'S': - linkbehave = LINK_GREP; + linkbehave = LINK_READ; break; case 'R': case 'r': @@ -533,26 +552,33 @@ main(int argc, char *argv[]) filebehave = FILE_GZIP; break; case BIN_OPT: - if (strcmp("binary", optarg) == 0) + if (strcasecmp("binary", optarg) == 0) binbehave = BINFILE_BIN; - else if (strcmp("without-match", optarg) == 0) + else if (strcasecmp("without-match", optarg) == 0) binbehave = BINFILE_SKIP; - else if (strcmp("text", optarg) == 0) + else if (strcasecmp("text", optarg) == 0) binbehave = BINFILE_TEXT; else errx(2, "%s", getstr(8)); break; case COLOR_OPT: - if (optarg == NULL || strcmp("auto", optarg) == 0 || - strcmp("always", optarg) == 0 ) { - color = getenv("GREP_COLOR"); - if (color == NULL) { - color = grep_malloc(sizeof(char) * 6); - strcpy(color, "01;31"); - } - } else if (strcmp("never", optarg) == 0) - color = NULL; - else + color = NULL; + if (optarg == NULL || strcasecmp("auto", optarg) == 0 || + strcasecmp("tty", optarg) == 0 || + strcasecmp("if-tty", optarg) == 0) { + char *term; + + term = getenv("TERM"); + if (isatty(STDOUT_FILENO) && term != NULL && + strcasecmp(term, "dumb") != 0) + color = init_color("01;31"); + } else if (strcasecmp("always", optarg) == 0 || + strcasecmp("yes", optarg) == 0 || + strcasecmp("force", optarg) == 0) { + color = init_color("01;31"); + } else if (strcasecmp("never", optarg) != 0 && + strcasecmp("none", optarg) != 0 && + strcasecmp("no", optarg) != 0) errx(2, "%s", getstr(3)); break; case LABEL_OPT: Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Sun Jul 25 04:19:05 2010 (r210460) +++ head/usr.bin/grep/grep.h Sun Jul 25 08:42:18 2010 (r210461) @@ -60,14 +60,14 @@ extern const char *errstr[]; #define FILE_GZIP 1 #define FILE_BZIP 2 -#define DIR_GREP 0 +#define DIR_READ 0 #define DIR_SKIP 1 #define DIR_RECURSE 2 -#define DEV_GREP 0 +#define DEV_READ 0 #define DEV_SKIP 1 -#define LINK_GREP 0 +#define LINK_READ 0 #define LINK_EXPLICIT 1 #define LINK_SKIP 2 @@ -120,7 +120,8 @@ extern bool Eflag, Fflag, Gflag, Hflag, qflag, sflag, vflag, wflag, xflag; extern bool exclflag, nullflag; extern unsigned long long Aflag, Bflag, mcount; -extern char *color, *label; +extern char *label; +extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; extern bool first, matchall, notfound, prev; Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sun Jul 25 04:19:05 2010 (r210460) +++ head/usr.bin/grep/util.c Sun Jul 25 08:42:18 2010 (r210461) @@ -226,9 +226,9 @@ procfile(const char *fn) printf("%s:", ln.file); printf("%u\n", c); } - if (lflag && c != 0) + if (lflag && !qflag && c != 0) printf("%s\n", fn); - if (Lflag && c == 0) + if (Lflag && !qflag && c == 0) printf("%s\n", fn); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) @@ -320,7 +320,8 @@ procline(struct str *l, int nottext) if (m < MAX_LINE_MATCHES) matches[m++] = pmatch; /* matches - skip further patterns */ - break; + if ((color != NULL && !oflag) || qflag || lflag) + break; } } @@ -329,7 +330,7 @@ procline(struct str *l, int nottext) break; } /* One pass if we are not recording matches */ - if (!oflag && !color) + if ((color != NULL && !oflag) || qflag || lflag) break; if (st == (size_t)pmatch.rm_so) From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 10:06:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E987106566B; Sun, 25 Jul 2010 10:06:57 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 533BD8FC25; Sun, 25 Jul 2010 10:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PA6vBo008948; Sun, 25 Jul 2010 10:06:57 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PA6vfN008946; Sun, 25 Jul 2010 10:06:57 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201007251006.o6PA6vfN008946@svn.freebsd.org> From: Philip Paeps Date: Sun, 25 Jul 2010 10:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210462 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 10:06:57 -0000 Author: philip Date: Sun Jul 25 10:06:56 2010 New Revision: 210462 URL: http://svn.freebsd.org/changeset/base/210462 Log: Take murray's commit bit into safekeeping per his request. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Jul 25 08:42:18 2010 (r210461) +++ svnadmin/conf/access Sun Jul 25 10:06:56 2010 (r210462) @@ -158,7 +158,6 @@ mp mpp mr mtm -murray mux n_hibma devnull neel From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 11:31:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78102106564A; Sun, 25 Jul 2010 11:31:29 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 927C68FC1E; Sun, 25 Jul 2010 11:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PBVToK032386; Sun, 25 Jul 2010 11:31:29 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PBVTPq032384; Sun, 25 Jul 2010 11:31:29 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007251131.o6PBVTPq032384@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 25 Jul 2010 11:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210463 - head/sbin/newfs_msdos X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 11:31:29 -0000 Author: bcr (doc committer) Date: Sun Jul 25 11:31:29 2010 New Revision: 210463 URL: http://svn.freebsd.org/changeset/base/210463 Log: Clarify that the "number of bytes per sector"-range in the -S option is meant to be "inclusive". The original issue of the PR was already fixed. PR: docs/142418 Submitted by: David Naylor (naylor dot b dot david at gmail dot com) No objection from: kib MFC after: 5 days Modified: head/sbin/newfs_msdos/newfs_msdos.8 Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Sun Jul 25 10:06:56 2010 (r210462) +++ head/sbin/newfs_msdos/newfs_msdos.8 Sun Jul 25 11:31:29 2010 (r210463) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2009 +.Dd July 25, 2010 .Dt NEWFS_MSDOS 8 .Os .Sh NAME @@ -116,7 +116,7 @@ The default is .It Fl S Ar sector-size Number of bytes per sector. Acceptable values are powers of 2 -in the range 512 through 32768. +in the range 512 through 32768, inclusive. .It Fl a Ar FAT-size Number of sectors per FAT. .It Fl b Ar block-size From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 11:43:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 901F31065673; Sun, 25 Jul 2010 11:43:54 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8972F8FC13; Sun, 25 Jul 2010 11:43:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PBhsVP035107; Sun, 25 Jul 2010 11:43:54 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PBhsTT035105; Sun, 25 Jul 2010 11:43:54 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <201007251143.o6PBhsTT035105@svn.freebsd.org> From: Rong-En Fan Date: Sun, 25 Jul 2010 11:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210464 - vendor/ncurses/dist/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 11:43:54 -0000 Author: rafan Date: Sun Jul 25 11:43:54 2010 New Revision: 210464 URL: http://svn.freebsd.org/changeset/base/210464 Log: - Fix wrong manpage title for keybound.3X PR: docs/148864 Obtained from: ncurses-5.7-20081213 snapshot Modified: vendor/ncurses/dist/man/keybound.3x Modified: vendor/ncurses/dist/man/keybound.3x ============================================================================== --- vendor/ncurses/dist/man/keybound.3x Sun Jul 25 11:31:29 2010 (r210463) +++ vendor/ncurses/dist/man/keybound.3x Sun Jul 25 11:43:54 2010 (r210464) @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999-2003,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -28,8 +28,8 @@ .\" .\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: keybound.3x,v 1.6 2006/02/25 21:47:06 tom Exp $ -.TH keyok 3X "" +.\" $Id: keybound.3x,v 1.7 2008/12/13 18:19:07 Frederic.Culot Exp $ +.TH keybound 3X "" .SH NAME \fBkeybound\fP \- return definition of keycode .SH SYNOPSIS From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 11:48:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79A17106566B; Sun, 25 Jul 2010 11:48:27 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FE878FC1A; Sun, 25 Jul 2010 11:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PBmRH5036161; Sun, 25 Jul 2010 11:48:27 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PBmRtC036159; Sun, 25 Jul 2010 11:48:27 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <201007251148.o6PBmRtC036159@svn.freebsd.org> From: Rong-En Fan Date: Sun, 25 Jul 2010 11:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210465 - head/contrib/ncurses/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 11:48:27 -0000 Author: rafan Date: Sun Jul 25 11:48:27 2010 New Revision: 210465 URL: http://svn.freebsd.org/changeset/base/210465 Log: Merge r210464 from vendor/ncurses/dist: - Fix wrong manpage title for keybound.3X PR: docs/148864 Obtained from: ncurses-5.7-20081213 snapshot Modified: head/contrib/ncurses/man/keybound.3x Directory Properties: head/contrib/ncurses/ (props changed) Modified: head/contrib/ncurses/man/keybound.3x ============================================================================== --- head/contrib/ncurses/man/keybound.3x Sun Jul 25 11:43:54 2010 (r210464) +++ head/contrib/ncurses/man/keybound.3x Sun Jul 25 11:48:27 2010 (r210465) @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999-2003,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -28,8 +28,8 @@ .\" .\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: keybound.3x,v 1.6 2006/02/25 21:47:06 tom Exp $ -.TH keyok 3X "" +.\" $Id: keybound.3x,v 1.7 2008/12/13 18:19:07 Frederic.Culot Exp $ +.TH keybound 3X "" .SH NAME \fBkeybound\fP \- return definition of keycode .SH SYNOPSIS From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 11:52:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D845C1065677; Sun, 25 Jul 2010 11:52:09 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E87318FC14; Sun, 25 Jul 2010 11:52:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PBq9Fu037073; Sun, 25 Jul 2010 11:52:09 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PBq9lL037071; Sun, 25 Jul 2010 11:52:09 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <201007251152.o6PBq9lL037071@svn.freebsd.org> From: Rong-En Fan Date: Sun, 25 Jul 2010 11:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210466 - stable/8/contrib/ncurses/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 11:52:10 -0000 Author: rafan Date: Sun Jul 25 11:52:09 2010 New Revision: 210466 URL: http://svn.freebsd.org/changeset/base/210466 Log: MFC r210465 - Fix wrong manpage title for keybound.3X PR: docs/148864 Obtained from: ncurses-5.7-20081213 snapshot Modified: stable/8/contrib/ncurses/man/keybound.3x Directory Properties: stable/8/contrib/ncurses/ (props changed) Modified: stable/8/contrib/ncurses/man/keybound.3x ============================================================================== --- stable/8/contrib/ncurses/man/keybound.3x Sun Jul 25 11:48:27 2010 (r210465) +++ stable/8/contrib/ncurses/man/keybound.3x Sun Jul 25 11:52:09 2010 (r210466) @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999-2003,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -28,8 +28,8 @@ .\" .\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: keybound.3x,v 1.6 2006/02/25 21:47:06 tom Exp $ -.TH keyok 3X "" +.\" $Id: keybound.3x,v 1.7 2008/12/13 18:19:07 Frederic.Culot Exp $ +.TH keybound 3X "" .SH NAME \fBkeybound\fP \- return definition of keycode .SH SYNOPSIS From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 11:53:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3CF2106567A; Sun, 25 Jul 2010 11:53:32 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7E278FC19; Sun, 25 Jul 2010 11:53:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PBrW5S037426; Sun, 25 Jul 2010 11:53:32 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PBrWNK037424; Sun, 25 Jul 2010 11:53:32 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <201007251153.o6PBrWNK037424@svn.freebsd.org> From: Rong-En Fan Date: Sun, 25 Jul 2010 11:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210467 - stable/7/contrib/ncurses/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 11:53:32 -0000 Author: rafan Date: Sun Jul 25 11:53:32 2010 New Revision: 210467 URL: http://svn.freebsd.org/changeset/base/210467 Log: MFC r210465 - Fix wrong manpage title for keybound.3X PR: docs/148864 Obtained from: ncurses-5.7-20081213 snapshot Modified: stable/7/contrib/ncurses/man/keybound.3x Directory Properties: stable/7/contrib/ncurses/ (props changed) Modified: stable/7/contrib/ncurses/man/keybound.3x ============================================================================== --- stable/7/contrib/ncurses/man/keybound.3x Sun Jul 25 11:52:09 2010 (r210466) +++ stable/7/contrib/ncurses/man/keybound.3x Sun Jul 25 11:53:32 2010 (r210467) @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1999-2003,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -28,8 +28,8 @@ .\" .\" Author: Thomas E. Dickey 1999 .\" -.\" $Id: keybound.3x,v 1.6 2006/02/25 21:47:06 tom Exp $ -.TH keyok 3X "" +.\" $Id: keybound.3x,v 1.7 2008/12/13 18:19:07 Frederic.Culot Exp $ +.TH keybound 3X "" .SH NAME \fBkeybound\fP \- return definition of keycode .SH SYNOPSIS From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 13:32:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2172F1065673; Sun, 25 Jul 2010 13:32:20 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0AC8FC18; Sun, 25 Jul 2010 13:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PDWJnQ059454; Sun, 25 Jul 2010 13:32:19 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PDWJfE059451; Sun, 25 Jul 2010 13:32:19 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007251332.o6PDWJfE059451@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 25 Jul 2010 13:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210468 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 13:32:20 -0000 Author: bcr (doc committer) Date: Sun Jul 25 13:32:19 2010 New Revision: 210468 URL: http://svn.freebsd.org/changeset/base/210468 Log: Apply a small grammar fix to {toupper,tolower}(3). PR: docs/140458 Submitted by: Jeremy Huddleston (Jeremyhu at apple dot com) MFC after: 5 days Modified: head/lib/libc/locale/tolower.3 head/lib/libc/locale/toupper.3 Modified: head/lib/libc/locale/tolower.3 ============================================================================== --- head/lib/libc/locale/tolower.3 Sun Jul 25 11:53:32 2010 (r210467) +++ head/lib/libc/locale/tolower.3 Sun Jul 25 13:32:19 2010 (r210468) @@ -32,7 +32,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd July 25, 2010 .Dt TOLOWER 3 .Os .Sh NAME @@ -57,7 +57,7 @@ or the value of If the argument is an upper-case letter, the .Fn tolower function returns the corresponding lower-case letter if there is -one; otherwise the argument is returned unchanged. +one; otherwise, the argument is returned unchanged. .Sh COMPATIBILITY The .Bx 4.4 Modified: head/lib/libc/locale/toupper.3 ============================================================================== --- head/lib/libc/locale/toupper.3 Sun Jul 25 11:53:32 2010 (r210467) +++ head/lib/libc/locale/toupper.3 Sun Jul 25 13:32:19 2010 (r210468) @@ -32,7 +32,7 @@ .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd July 25, 2010 .Dt TOUPPER 3 .Os .Sh NAME @@ -57,7 +57,7 @@ or the value of If the argument is a lower-case letter, the .Fn toupper function returns the corresponding upper-case letter if there is -one; otherwise the argument is returned unchanged. +one; otherwise, the argument is returned unchanged. .Sh COMPATIBILITY The .Bx 4.4 From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 15:14:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E635D1065672; Sun, 25 Jul 2010 15:14:42 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2308FC14; Sun, 25 Jul 2010 15:14:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PFEgVE082009; Sun, 25 Jul 2010 15:14:42 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PFEgnE082006; Sun, 25 Jul 2010 15:14:42 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007251514.o6PFEgnE082006@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 15:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210469 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 15:14:43 -0000 Author: gavin Date: Sun Jul 25 15:14:42 2010 New Revision: 210469 URL: http://svn.freebsd.org/changeset/base/210469 Log: Give a name to the HTC Wizard Smartphone PR: usb/135575 Submitted by: lioux Modified: head/sys/dev/usb/serial/uipaq.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uipaq.c ============================================================================== --- head/sys/dev/usb/serial/uipaq.c Sun Jul 25 13:32:19 2010 (r210468) +++ head/sys/dev/usb/serial/uipaq.c Sun Jul 25 15:14:42 2010 (r210469) @@ -683,14 +683,14 @@ static const struct usb_device_id uipaq_ {USB_VPI(USB_VENDOR_HTC, 0x0a9e, 0)}, /* SmartPhone USB Sync */ {USB_VPI(USB_VENDOR_HTC, 0x0a9f, 0)}, - /* "High Tech Computer Corp" */ - {USB_VPI(USB_VENDOR_HTC, 0x0bce, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_PPC6700MODEM, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_SMARTPHONE, 0)}, /**/ {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE, 0)}, + /* High Tech Computer Wizard Smartphone */ + {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WIZARD, 0)}, /* JVC USB Sync */ {USB_VPI(USB_VENDOR_JVC, 0x3011, 0)}, /* JVC USB Sync */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Jul 25 13:32:19 2010 (r210468) +++ head/sys/dev/usb/usbdevs Sun Jul 25 15:14:42 2010 (r210469) @@ -1687,6 +1687,7 @@ product HP HS2300 0x1e1d hs2300 HSDPA product HTC WINMOBILE 0x00ce HTC USB Sync product HTC PPC6700MODEM 0x00cf PPC6700 Modem product HTC SMARTPHONE 0x0a51 SmartPhone USB Sync +product HTC WIZARD 0x0bce HTC Wizard USB Sync /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 15:17:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E203F1065679; Sun, 25 Jul 2010 15:17:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4978FC1E; Sun, 25 Jul 2010 15:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PFHOkH082657; Sun, 25 Jul 2010 15:17:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PFHOF3082653; Sun, 25 Jul 2010 15:17:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007251517.o6PFHOF3082653@svn.freebsd.org> From: Martin Matuska Date: Sun, 25 Jul 2010 15:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210470 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 15:17:25 -0000 Author: mm Date: Sun Jul 25 15:17:24 2010 New Revision: 210470 URL: http://svn.freebsd.org/changeset/base/210470 Log: Import two changesets from OpenSolaris to make future updates easier. The changes do not affect FreeBSD code because zfs_znode_move(), cleanlocks() and cleanshares() are not used. OpenSolaris onnv changeset: 9788:f660bc44f2e8, 9909:aa280f585a3e Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6843700, 6790232) MFC after: 7 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Jul 25 15:14:42 2010 (r210469) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Jul 25 15:17:24 2010 (r210470) @@ -955,11 +955,22 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t return (0); } +extern krwlock_t zfsvfs_lock; /* in zfs_znode.c */ + void zfsvfs_free(zfsvfs_t *zfsvfs) { int i; + /* + * This is a barrier to prevent the filesystem from going away in + * zfs_znode_move() until we can safely ensure that the filesystem is + * not unmounted. We consider the filesystem valid before the barrier + * and invalid after the barrier. + */ + rw_enter(&zfsvfs_lock, RW_READER); + rw_exit(&zfsvfs_lock); + zfs_fuid_destroy(zfsvfs); mutex_destroy(&zfsvfs->z_znodes_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Jul 25 15:14:42 2010 (r210469) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Jul 25 15:17:24 2010 (r210470) @@ -201,6 +201,12 @@ zfs_close(vnode_t *vp, int flag, int cou znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; + /* + * Clean up any locks held by this process on the vp. + */ + cleanlocks(vp, ddi_get_pid(), 0); + cleanshares(vp, ddi_get_pid()); + ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); @@ -208,12 +214,6 @@ zfs_close(vnode_t *vp, int flag, int cou if ((flag & (FSYNC | FDSYNC)) && (count == 1)) atomic_dec_32(&zp->z_sync_cnt); - /* - * Clean up any locks held by this process on the vp. - */ - cleanlocks(vp, ddi_get_pid(), 0); - cleanshares(vp, ddi_get_pid()); - if (!zfs_has_ctldir(zp) && zp->z_zfsvfs->z_vscan && ZTOV(zp)->v_type == VREG && !(zp->z_phys->zp_flags & ZFS_AV_QUARANTINED) && Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sun Jul 25 15:14:42 2010 (r210469) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sun Jul 25 15:17:24 2010 (r210470) @@ -87,6 +87,12 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, znod * (such as VFS logic) that will not compile easily in userland. */ #ifdef _KERNEL +/* + * Needed to close a small window in zfs_znode_move() that allows the zfsvfs to + * be freed before it can be safely accessed. + */ +krwlock_t zfsvfs_lock; + static kmem_cache_t *znode_cache = NULL; /*ARGSUSED*/ @@ -198,8 +204,9 @@ zfs_znode_cache_destructor(void *buf, vo #ifdef ZNODE_STATS static struct { uint64_t zms_zfsvfs_invalid; + uint64_t zms_zfsvfs_recheck1; uint64_t zms_zfsvfs_unmounted; - uint64_t zms_zfsvfs_recheck_invalid; + uint64_t zms_zfsvfs_recheck2; uint64_t zms_obj_held; uint64_t zms_vnode_locked; uint64_t zms_not_only_dnlc; @@ -274,15 +281,32 @@ zfs_znode_move(void *buf, void *newbuf, } /* - * Ensure that the filesystem is not unmounted during the move. - * This is the equivalent to ZFS_ENTER(). + * Close a small window in which it's possible that the filesystem could + * be unmounted and freed, and zfsvfs, though valid in the previous + * statement, could point to unrelated memory by the time we try to + * prevent the filesystem from being unmounted. + */ + rw_enter(&zfsvfs_lock, RW_WRITER); + if (zfsvfs != ozp->z_zfsvfs) { + rw_exit(&zfsvfs_lock); + ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_recheck1); + return (KMEM_CBRC_DONT_KNOW); + } + + /* + * If the znode is still valid, then so is the file system. We know that + * no valid file system can be freed while we hold zfsvfs_lock, so we + * can safely ensure that the filesystem is not and will not be + * unmounted. The next statement is equivalent to ZFS_ENTER(). */ rrw_enter(&zfsvfs->z_teardown_lock, RW_READER, FTAG); if (zfsvfs->z_unmounted) { ZFS_EXIT(zfsvfs); + rw_exit(&zfsvfs_lock); ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_unmounted); return (KMEM_CBRC_DONT_KNOW); } + rw_exit(&zfsvfs_lock); mutex_enter(&zfsvfs->z_znodes_lock); /* @@ -292,7 +316,7 @@ zfs_znode_move(void *buf, void *newbuf, if (zfsvfs != ozp->z_zfsvfs) { mutex_exit(&zfsvfs->z_znodes_lock); ZFS_EXIT(zfsvfs); - ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_recheck_invalid); + ZNODE_STAT_ADD(znode_move_stats.zms_zfsvfs_recheck2); return (KMEM_CBRC_DONT_KNOW); } @@ -349,6 +373,7 @@ zfs_znode_init(void) /* * Initialize zcache */ + rw_init(&zfsvfs_lock, NULL, RW_DEFAULT, NULL); ASSERT(znode_cache == NULL); znode_cache = kmem_cache_create("zfs_znode_cache", sizeof (znode_t), 0, /* zfs_znode_cache_constructor */ NULL, @@ -367,6 +392,7 @@ zfs_znode_fini(void) if (znode_cache) kmem_cache_destroy(znode_cache); znode_cache = NULL; + rw_destroy(&zfsvfs_lock); } int From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 15:36:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 338851065670; Sun, 25 Jul 2010 15:36:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id C8D9D8FC0C; Sun, 25 Jul 2010 15:36:11 +0000 (UTC) Received: from c122-106-147-41.carlnfd1.nsw.optusnet.com.au (c122-106-147-41.carlnfd1.nsw.optusnet.com.au [122.106.147.41]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6PFa7TC023522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Jul 2010 01:36:08 +1000 Date: Mon, 26 Jul 2010 01:36:07 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Stefan Farfeleder In-Reply-To: <20100724183732.GA1715@mole.fafoe.narf.at> Message-ID: <20100726013202.G11808@delplex.bde.org> References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 15:36:12 -0000 On Sat, 24 Jul 2010, Stefan Farfeleder wrote: > declaring enums like this is not standard C code (seems to be a GCC > extension). I don't think we should use this feature in our headers. This is unfortunate. This is because the size of an enum variable depends on its complete declaration. This is an error unconditionaly with TenDRA. It takes -pedantic to get a warning from gcc. >> Modified: head/sys/sys/imgact.h >> ============================================================================== >> --- head/sys/sys/imgact.h Sat Jul 24 18:05:10 2010 (r210450) >> +++ head/sys/sys/imgact.h Sat Jul 24 18:14:34 2010 (r210451) >> @@ -32,8 +32,6 @@ >> #ifndef _SYS_IMGACT_H_ >> #define _SYS_IMGACT_H_ >> >> -#include >> - The rule that new pollution may not be added to old headers should have prevented the need for this removal. >> #define MAXSHELLCMDLEN PAGE_SIZE >> >> struct image_args { >> @@ -75,6 +73,7 @@ struct image_params { >> #ifdef _KERNEL >> struct sysentvec; >> struct thread; >> +enum uio_seg; >> >> #define IMGACT_CORE_COMPRESS 0x01 Bruce From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 15:43:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B3B51065675; Sun, 25 Jul 2010 15:43:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B56B8FC18; Sun, 25 Jul 2010 15:43:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PFhrYp088518; Sun, 25 Jul 2010 15:43:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PFhrHp088504; Sun, 25 Jul 2010 15:43:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007251543.o6PFhrHp088504@svn.freebsd.org> From: Alexander Motin Date: Sun, 25 Jul 2010 15:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210471 - in head: sbin/camcontrol sys/cam sys/cam/ata sys/cam/scsi sys/dev/ahci sys/dev/ata sys/dev/mvs sys/dev/siis sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 15:43:53 -0000 Author: mav Date: Sun Jul 25 15:43:52 2010 New Revision: 210471 URL: http://svn.freebsd.org/changeset/base/210471 Log: Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers to GEOM. This information needed for proper soft-RAID's on-disk metadata reading and writing. Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_da.c head/sys/cam/cam_ccb.h head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c head/sys/dev/ahci/ahci.c head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-disk.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c head/sys/geom/geom_disk.c head/sys/geom/geom_disk.h Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sbin/camcontrol/camcontrol.c Sun Jul 25 15:43:52 2010 (r210471) @@ -3083,6 +3083,14 @@ cpi_print(struct ccb_pathinq *cpi) cpi->initiator_id); fprintf(stdout, "%s SIM vendor: %s\n", adapter_str, cpi->sim_vid); fprintf(stdout, "%s HBA vendor: %s\n", adapter_str, cpi->hba_vid); + fprintf(stdout, "%s HBA vendor ID: 0x%04x\n", + adapter_str, cpi->hba_vendor); + fprintf(stdout, "%s HBA device ID: 0x%04x\n", + adapter_str, cpi->hba_device); + fprintf(stdout, "%s HBA subvendor ID: 0x%04x\n", + adapter_str, cpi->hba_subvendor); + fprintf(stdout, "%s HBA subdevice ID: 0x%04x\n", + adapter_str, cpi->hba_subdevice); fprintf(stdout, "%s bus ID: %d\n", adapter_str, cpi->bus_id); fprintf(stdout, "%s base transfer speed: ", adapter_str); if (cpi->base_transfer_speed > 1000) @@ -3092,6 +3100,8 @@ cpi_print(struct ccb_pathinq *cpi) else fprintf(stdout, "%dKB/sec\n", (cpi->base_transfer_speed % 1000) * 1000); + fprintf(stdout, "%s maximum transfer size: %u bytes\n", + adapter_str, cpi->maxio); } static int Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/cam/ata/ata_da.c Sun Jul 25 15:43:52 2010 (r210471) @@ -734,6 +734,10 @@ adaregister(struct cam_periph *periph, v softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_ident, cgd->serial_num, MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); + softc->disk->d_hba_vendor = cpi.hba_vendor; + softc->disk->d_hba_device = cpi.hba_device; + softc->disk->d_hba_subvendor = cpi.hba_subvendor; + softc->disk->d_hba_subdevice = cpi.hba_subdevice; softc->disk->d_sectorsize = softc->params.secsize; softc->disk->d_mediasize = (off_t)softc->params.sectors * Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/cam/cam_ccb.h Sun Jul 25 15:43:52 2010 (r210471) @@ -596,6 +596,10 @@ struct ccb_pathinq { char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE]; } xport_specific; u_int maxio; /* Max supported I/O size, in bytes. */ + u_int16_t hba_vendor; /* HBA vendor ID */ + u_int16_t hba_device; /* HBA device ID */ + u_int16_t hba_subvendor; /* HBA subvendor ID */ + u_int16_t hba_subdevice; /* HBA subdevice ID */ }; /* Path Statistics CCB */ Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/cam/scsi/scsi_cd.c Sun Jul 25 15:43:52 2010 (r210471) @@ -733,6 +733,10 @@ cdregister(struct cam_periph *periph, vo else softc->disk->d_maxsize = cpi.maxio; softc->disk->d_flags = 0; + softc->disk->d_hba_vendor = cpi.hba_vendor; + softc->disk->d_hba_device = cpi.hba_device; + softc->disk->d_hba_subvendor = cpi.hba_subvendor; + softc->disk->d_hba_subdevice = cpi.hba_subdevice; disk_create(softc->disk, DISK_VERSION); cam_periph_lock(periph); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/cam/scsi/scsi_da.c Sun Jul 25 15:43:52 2010 (r210471) @@ -1310,6 +1310,10 @@ daregister(struct cam_periph *periph, vo softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; strlcpy(softc->disk->d_ident, cgd->serial_num, MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); + softc->disk->d_hba_vendor = cpi.hba_vendor; + softc->disk->d_hba_device = cpi.hba_device; + softc->disk->d_hba_subvendor = cpi.hba_subvendor; + softc->disk->d_hba_subdevice = cpi.hba_subdevice; disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/dev/ahci/ahci.c Sun Jul 25 15:43:52 2010 (r210471) @@ -2459,7 +2459,7 @@ ahci_check_ids(device_t dev, union ccb * static void ahciaction(struct cam_sim *sim, union ccb *ccb) { - device_t dev; + device_t dev, parent; struct ahci_channel *ch; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahciaction func_code=%x\n", @@ -2599,6 +2599,7 @@ ahciaction(struct cam_sim *sim, union cc { struct ccb_pathinq *cpi = &ccb->cpi; + parent = device_get_parent(dev); cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = PI_SDTR_ABLE; if (ch->caps & AHCI_CAP_SNCQ) @@ -2626,8 +2627,12 @@ ahciaction(struct cam_sim *sim, union cc cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ - if (pci_get_devid(device_get_parent(dev)) == 0x43801002) + if (pci_get_devid(parent) == 0x43801002) cpi->maxio = min(cpi->maxio, 128 * 512); + cpi->hba_vendor = pci_get_vendor(parent); + cpi->hba_device = pci_get_device(parent); + cpi->hba_subvendor = pci_get_subvendor(parent); + cpi->hba_subdevice = pci_get_subdevice(parent); cpi->ccb_h.status = CAM_REQ_CMP; break; } Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/dev/ata/ata-all.c Sun Jul 25 15:43:52 2010 (r210471) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef ATA_CAM @@ -1523,7 +1524,7 @@ ata_check_ids(device_t dev, union ccb *c static void ataaction(struct cam_sim *sim, union ccb *ccb) { - device_t dev; + device_t dev, parent; struct ata_channel *ch; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ataaction func_code=%x\n", @@ -1674,6 +1675,7 @@ ataaction(struct cam_sim *sim, union ccb { struct ccb_pathinq *cpi = &ccb->cpi; + parent = device_get_parent(dev); cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = PI_SDTR_ABLE; cpi->target_sprt = 0; @@ -1702,6 +1704,13 @@ ataaction(struct cam_sim *sim, union ccb cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS; + if (device_get_devclass(device_get_parent(parent)) == + devclass_find("pci")) { + cpi->hba_vendor = pci_get_vendor(parent); + cpi->hba_device = pci_get_device(parent); + cpi->hba_subvendor = pci_get_subvendor(parent); + cpi->hba_subdevice = pci_get_subdevice(parent); + } cpi->ccb_h.status = CAM_REQ_CMP; break; } Modified: head/sys/dev/ata/ata-disk.c ============================================================================== --- head/sys/dev/ata/ata-disk.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/dev/ata/ata-disk.c Sun Jul 25 15:43:52 2010 (r210471) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* prototypes */ @@ -94,6 +95,7 @@ ad_attach(device_t dev) struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); struct ad_softc *adp; + device_t parent; /* check that we have a virgin disk to attach */ if (device_get_ivars(dev)) @@ -143,6 +145,17 @@ ad_attach(device_t dev) adp->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(adp->disk->d_ident, atadev->param.serial, sizeof(adp->disk->d_ident)); + parent = device_get_parent(ch->dev); + if (parent != NULL && device_get_parent(parent) != NULL && + (device_get_devclass(parent) == + devclass_find("atapci") || + device_get_devclass(device_get_parent(parent)) == + devclass_find("pci"))) { + adp->disk->d_hba_vendor = pci_get_vendor(parent); + adp->disk->d_hba_device = pci_get_device(parent); + adp->disk->d_hba_subvendor = pci_get_subvendor(parent); + adp->disk->d_hba_subdevice = pci_get_subdevice(parent); + } ata_disk_firmware_geom_adjust(adp->disk); disk_create(adp->disk, DISK_VERSION); device_add_child(dev, "subdisk", device_get_unit(dev)); Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/dev/mvs/mvs.c Sun Jul 25 15:43:52 2010 (r210471) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "mvs.h" #include @@ -2017,7 +2018,7 @@ mvs_check_ids(device_t dev, union ccb *c static void mvsaction(struct cam_sim *sim, union ccb *ccb) { - device_t dev; + device_t dev, parent; struct mvs_channel *ch; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("mvsaction func_code=%x\n", @@ -2152,6 +2153,7 @@ mvsaction(struct cam_sim *sim, union ccb { struct ccb_pathinq *cpi = &ccb->cpi; + parent = device_get_parent(dev); cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = PI_SDTR_ABLE; if (!(ch->quirks & MVS_Q_GENI)) { @@ -2180,6 +2182,12 @@ mvsaction(struct cam_sim *sim, union ccb cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; + if ((ch->quirks & MVS_Q_SOC) == 0) { + cpi->hba_vendor = pci_get_vendor(parent); + cpi->hba_device = pci_get_device(parent); + cpi->hba_subvendor = pci_get_subvendor(parent); + cpi->hba_subdevice = pci_get_subdevice(parent); + } cpi->ccb_h.status = CAM_REQ_CMP; break; } Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/dev/siis/siis.c Sun Jul 25 15:43:52 2010 (r210471) @@ -1677,7 +1677,7 @@ siis_check_ids(device_t dev, union ccb * static void siisaction(struct cam_sim *sim, union ccb *ccb) { - device_t dev; + device_t dev, parent; struct siis_channel *ch; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("siisaction func_code=%x\n", @@ -1816,6 +1816,7 @@ siisaction(struct cam_sim *sim, union cc { struct ccb_pathinq *cpi = &ccb->cpi; + parent = device_get_parent(dev); cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE; cpi->hba_inquiry |= PI_SATAPM; @@ -1835,8 +1836,12 @@ siisaction(struct cam_sim *sim, union cc cpi->transport_version = XPORT_VERSION_UNSPECIFIED; cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; - cpi->ccb_h.status = CAM_REQ_CMP; cpi->maxio = MAXPHYS; + cpi->hba_vendor = pci_get_vendor(parent); + cpi->hba_device = pci_get_device(parent); + cpi->hba_subvendor = pci_get_subvendor(parent); + cpi->hba_subdevice = pci_get_subdevice(parent); + cpi->ccb_h.status = CAM_REQ_CMP; break; } default: Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/geom/geom_disk.c Sun Jul 25 15:43:52 2010 (r210471) @@ -305,6 +305,18 @@ g_disk_start(struct bio *bp) break; else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident)) break; + else if (g_handleattr(bp, "GEOM::hba_vendor", + &dp->d_hba_vendor, 2)) + break; + else if (g_handleattr(bp, "GEOM::hba_device", + &dp->d_hba_device, 2)) + break; + else if (g_handleattr(bp, "GEOM::hba_subvendor", + &dp->d_hba_subvendor, 2)) + break; + else if (g_handleattr(bp, "GEOM::hba_subdevice", + &dp->d_hba_subdevice, 2)) + break; else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) g_disk_kerneldump(bp, dp); else Modified: head/sys/geom/geom_disk.h ============================================================================== --- head/sys/geom/geom_disk.h Sun Jul 25 15:17:24 2010 (r210470) +++ head/sys/geom/geom_disk.h Sun Jul 25 15:43:52 2010 (r210471) @@ -85,6 +85,10 @@ struct disk { u_int d_stripeoffset; u_int d_stripesize; char d_ident[DISK_IDENT_SIZE]; + uint16_t d_hba_vendor; + uint16_t d_hba_device; + uint16_t d_hba_subvendor; + uint16_t d_hba_subdevice; /* Fields private to the driver */ void *d_drv1; From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 15:53:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A15D106564A; Sun, 25 Jul 2010 15:53:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15EC78FC12; Sun, 25 Jul 2010 15:53:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PFrRE8090635; Sun, 25 Jul 2010 15:53:27 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PFrRQf090633; Sun, 25 Jul 2010 15:53:27 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007251553.o6PFrRQf090633@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 15:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210472 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 15:53:28 -0000 Author: gavin Date: Sun Jul 25 15:53:27 2010 New Revision: 210472 URL: http://svn.freebsd.org/changeset/base/210472 Log: Merge r198005 (originally by markm) from head: We haven't installed usbdevs for many moons now, and it doesn't work any more anyway. Add it to the "obsolete" list. PR: usb/146799 Reported by: Warren Block Modified: stable/8/ObsoleteFiles.inc (contents, props changed) Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Sun Jul 25 15:43:52 2010 (r210471) +++ stable/8/ObsoleteFiles.inc Sun Jul 25 15:53:27 2010 (r210472) @@ -596,6 +596,8 @@ OLD_FILES+=usr/include/dev/usb/usb_quirk OLD_FILES+=usr/include/dev/usb/usbcdc.h OLD_FILES+=usr/include/dev/usb/usbdivar.h OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h +OLD_FILES+=usr/sbin/usbdevs +OLD_FILES+=usr/share/man/man8/usbdevs.8.gz # 20090203: removal of pccard header files OLD_FILES+=usr/include/pccard/cardinfo.h OLD_FILES+=usr/include/pccard/cis.h From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 17:11:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 597811065670; Sun, 25 Jul 2010 17:11:58 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51E4E8FC14; Sun, 25 Jul 2010 17:11:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PHBwCm008070; Sun, 25 Jul 2010 17:11:58 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PHBwSQ008069; Sun, 25 Jul 2010 17:11:58 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007251711.o6PHBwSQ008069@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 17:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210473 - vendor/tnftp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 17:11:58 -0000 Author: gavin Date: Sun Jul 25 17:11:57 2010 New Revision: 210473 URL: http://svn.freebsd.org/changeset/base/210473 Log: Create a vendor area for tnftp(1), the new name for lukemftp. Added: vendor/tnftp/ From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 17:40:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53E801065673; Sun, 25 Jul 2010 17:40:49 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CBB38FC22; Sun, 25 Jul 2010 17:40:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PHenVo014405; Sun, 25 Jul 2010 17:40:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PHengU014403; Sun, 25 Jul 2010 17:40:49 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007251740.o6PHengU014403@svn.freebsd.org> From: Rui Paulo Date: Sun, 25 Jul 2010 17:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210474 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 17:40:49 -0000 Author: rpaulo Date: Sun Jul 25 17:40:48 2010 New Revision: 210474 URL: http://svn.freebsd.org/changeset/base/210474 Log: MFC r209016, r209022: Some odd APs send beacons on the same TX queue as non-beacons. This breaks 802.11 duplicate detection. Upon looking at the standard, we discover that 802.11-2007 says: "A receiving QoS STA is also required to keep only the most recent cache entry per
triple, storing only the most recently received fragment number for that triple. A receiving STA may omit tuples obtained from broadcast/multicast or ATIM frames from the cache." To fix this, we just disable duplicate detection for multicast/broadcast frames. Reviewed by: sam Obtained from: DragonFly Modified: stable/8/sys/net80211/ieee80211_sta.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_sta.c Sun Jul 25 17:11:57 2010 (r210473) +++ stable/8/sys/net80211/ieee80211_sta.c Sun Jul 25 17:40:48 2010 (r210474) @@ -585,7 +585,7 @@ sta_input(struct ieee80211_node *ni, str } IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = nf; - if (HAS_SEQ(type)) { + if (HAS_SEQ(type) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 17:43:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACC9C1065670; Sun, 25 Jul 2010 17:43:38 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCCBC8FC16; Sun, 25 Jul 2010 17:43:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PHhcFQ015069; Sun, 25 Jul 2010 17:43:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PHhcWE015064; Sun, 25 Jul 2010 17:43:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007251743.o6PHhcWE015064@svn.freebsd.org> From: Alan Cox Date: Sun, 25 Jul 2010 17:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210475 - in head/sys: compat/freebsd32 kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 17:43:38 -0000 Author: alc Date: Sun Jul 25 17:43:38 2010 New Revision: 210475 URL: http://svn.freebsd.org/changeset/base/210475 Log: Change the order in which the file name, arguments, environment, and shell command are stored in exec*()'s demand-paged string buffer. For a "buildworld" on an 8GB amd64 multiprocessor, the new order reduces the number of global TLB shootdowns by 31%. It also eliminates about 330k page faults on the kernel address space. Change exec_shell_imgact() to use "args->begin_argv" consistently as the start of the argument and environment strings. Previously, it would sometimes use "args->buf", which is the start of the overall buffer, but no longer the start of the argument and environment strings. While I'm here, eliminate unnecessary passing of "&length" to copystr(), where we don't actually care about the length of the copied string. Clean up the initialization of the exec map. In particular, use the correct size for an entry, and express that size in the same way that is used when an entry is allocated. The old size was one page too large. (This discrepancy originated in 2004 when I rewrote exec_map_first_page() to use sf_buf_alloc() instead of the exec map for mapping the first page of the executable.) Reviewed by: kib Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/imgact_shell.c head/sys/kern/kern_exec.c head/sys/vm/vm_init.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Jul 25 17:40:48 2010 (r210474) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Jul 25 17:43:38 2010 (r210475) @@ -286,22 +286,23 @@ freebsd32_exec_copyin_args(struct image_ PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); if (args->buf == NULL) return (ENOMEM); - args->begin_argv = args->buf; - args->endp = args->begin_argv; - args->stringspace = ARG_MAX; /* * Copy the file name. */ if (fname != NULL) { - args->fname = args->buf + ARG_MAX; + args->fname = args->buf + MAXSHELLCMDLEN; error = (segflg == UIO_SYSSPACE) ? copystr(fname, args->fname, PATH_MAX, &length) : copyinstr(fname, args->fname, PATH_MAX, &length); if (error != 0) goto err_exit; } else - args->fname = NULL; + length = 0; + + args->begin_argv = args->buf + MAXSHELLCMDLEN + length; + args->endp = args->begin_argv; + args->stringspace = ARG_MAX; /* * extract arguments first Modified: head/sys/kern/imgact_shell.c ============================================================================== --- head/sys/kern/imgact_shell.c Sun Jul 25 17:40:48 2010 (r210474) +++ head/sys/kern/imgact_shell.c Sun Jul 25 17:43:38 2010 (r210475) @@ -220,13 +220,13 @@ exec_shell_imgact(imgp) * the interpreter name and options-string. */ length = interpe - interpb; - bcopy(interpb, imgp->args->buf, length); - *(imgp->args->buf + length) = '\0'; + bcopy(interpb, imgp->args->begin_argv, length); + *(imgp->args->begin_argv + length) = '\0'; offset = length + 1; if (opte > optb) { length = opte - optb; - bcopy(optb, imgp->args->buf + offset, length); - *(imgp->args->buf + offset + length) = '\0'; + bcopy(optb, imgp->args->begin_argv + offset, length); + *(imgp->args->begin_argv + offset + length) = '\0'; offset += length + 1; imgp->args->argc++; } @@ -236,12 +236,12 @@ exec_shell_imgact(imgp) * use and copy the interpreter's name to imgp->interpreter_name * for exec to use. */ - error = copystr(fname, imgp->args->buf + offset, imgp->args->stringspace, - &length); + error = copystr(fname, imgp->args->begin_argv + offset, + imgp->args->stringspace, NULL); if (error == 0) error = copystr(imgp->args->begin_argv, imgp->interpreter_name, - MAXSHELLCMDLEN, &length); + MAXSHELLCMDLEN, NULL); if (sname != NULL) sbuf_delete(sname); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sun Jul 25 17:40:48 2010 (r210474) +++ head/sys/kern/kern_exec.c Sun Jul 25 17:43:38 2010 (r210475) @@ -375,7 +375,7 @@ do_execve(td, args, mac_p) imgp->vmspace_destroyed = 0; imgp->interpreted = 0; imgp->opened = 0; - imgp->interpreter_name = args->buf + PATH_MAX + ARG_MAX; + imgp->interpreter_name = args->buf; imgp->auxargs = NULL; imgp->vp = NULL; imgp->object = NULL; @@ -1089,21 +1089,23 @@ exec_copyin_args(struct image_args *args PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); if (args->buf == NULL) return (ENOMEM); - args->begin_argv = args->buf; - args->endp = args->begin_argv; - args->stringspace = ARG_MAX; + /* * Copy the file name. */ if (fname != NULL) { - args->fname = args->buf + ARG_MAX; + args->fname = args->buf + MAXSHELLCMDLEN; error = (segflg == UIO_SYSSPACE) ? copystr(fname, args->fname, PATH_MAX, &length) : copyinstr(fname, args->fname, PATH_MAX, &length); if (error != 0) goto err_exit; } else - args->fname = NULL; + length = 0; + + args->begin_argv = args->buf + MAXSHELLCMDLEN + length; + args->endp = args->begin_argv; + args->stringspace = ARG_MAX; /* * extract arguments first Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Sun Jul 25 17:40:48 2010 (r210474) +++ head/sys/vm/vm_init.c Sun Jul 25 17:43:38 2010 (r210475) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -194,7 +195,8 @@ again: (long)nswbuf * MAXPHYS, FALSE); pager_map->system_map = 1; exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - exec_map_entries * (ARG_MAX + (PAGE_SIZE * 3)), FALSE); + exec_map_entries * round_page(PATH_MAX + ARG_MAX + MAXSHELLCMDLEN), + FALSE); pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, FALSE); From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 17:48:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3062106566B; Sun, 25 Jul 2010 17:48:16 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94EFD8FC17; Sun, 25 Jul 2010 17:48:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PHmGvp016122; Sun, 25 Jul 2010 17:48:16 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PHmG3H016115; Sun, 25 Jul 2010 17:48:16 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007251748.o6PHmG3H016115@svn.freebsd.org> From: Rui Paulo Date: Sun, 25 Jul 2010 17:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210476 - in stable/8: share/man/man4 sys/conf sys/dev/acpi_support sys/i386/conf sys/modules/acpi sys/modules/acpi/aibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 17:48:16 -0000 Author: rpaulo Date: Sun Jul 25 17:48:16 2010 New Revision: 210476 URL: http://svn.freebsd.org/changeset/base/210476 Log: MFC r209523: Import the acpi_aibs(4) driver written by Constantine A. Murenin. It has more features than acpi_aiboost(4) and it will eventually replace acpi_aiboost(4). Submitted by: Constantine A. Murenin Reviewed by: freebsd-acpi, imp Added: stable/8/share/man/man4/aibs.4 - copied unchanged from r209523, head/share/man/man4/aibs.4 stable/8/sys/dev/acpi_support/atk0110.c - copied unchanged from r209523, head/sys/dev/acpi_support/atk0110.c stable/8/sys/modules/acpi/aibs/ - copied from r209523, head/sys/modules/acpi/aibs/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/conf/files stable/8/sys/i386/conf/NOTES stable/8/sys/modules/acpi/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Sun Jul 25 17:43:38 2010 (r210475) +++ stable/8/share/man/man4/Makefile Sun Jul 25 17:48:16 2010 (r210476) @@ -26,6 +26,7 @@ MAN= aac.4 \ ahc.4 \ ahci.4 \ ahd.4 \ + ${_aibs.4} \ aio.4 \ alc.4 \ ale.4 \ @@ -629,6 +630,7 @@ _acpi_panasonic.4=acpi_panasonic.4 _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 +_aibs.4= aibs.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 Copied: stable/8/share/man/man4/aibs.4 (from r209523, head/share/man/man4/aibs.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/aibs.4 Sun Jul 25 17:48:16 2010 (r210476, copy of r209523, head/share/man/man4/aibs.4) @@ -0,0 +1,209 @@ +.\" $FreeBSD$ +.\" $NetBSD: aibs.4,v 1.2 2010/02/09 05:37:25 cnst Exp $ +.\" $OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $ +.\" +.\" Copyright (c) 2009/2010 Constantine A. Murenin +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd April 4, 2010 +.Dt AIBS 4 +.Os +.Sh NAME +.Nm aibs +.Nd "ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi" +.Cd "device aibs" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_load="YES" +aibs_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the voltage, temperature and fan sensors +available through the +.Tn ATK0110 +.Tn ASOC +.Tn ACPI +device +on +.Tn ASUSTeK +motherboards. +The number of sensors of each type, +as well as the description of each sensor, +varies according to the motherboard. +.Pp +The driver supports an arbitrary set of sensors, +provides descriptions regarding what each sensor is used for, +and reports the current values as well as +the supposed range specifications of each sensor's input +as defined by the motherboard manufacturer through +.Tn ACPI . +.Pp +The range specifications are as follows: +.Bl -bullet +.It +Voltage sensors have a lower and an upper range specification. +.It +Temperature sensors have two upper specifications. +.It +Fan sensors may either have only the lower specification, +or, depending on the +.Tn DSDT , +one lower and one upper specification. +.El +.Pp +Sensor readings and the range specifications are made available through the +.Xr sysctl 3 +interface, +and can be monitored with +.Xr sysctl 8 . +For example, on an ASUS V3-P5G965 barebone: +.Bd -literal -offset indent +> sysctl dev.aibs.0.{volt,temp,fan} +dev.aibs.0.volt.0: 1192 850 1600 +dev.aibs.0.volt.1: 3312 2970 3630 +dev.aibs.0.volt.2: 5017 4500 5500 +dev.aibs.0.volt.3: 12302 10200 13800 +dev.aibs.0.temp.0: 28.0C 80.0C 95.0C +dev.aibs.0.temp.1: 55.0C 60.0C 95.0C +dev.aibs.0.fan.0: 878 600 7200 +dev.aibs.0.fan.1: 0 700 7200 +.Pp +> sysctl -d dev.aibs.0.{volt,temp,fan} +dev.aibs.0.volt: +dev.aibs.0.volt.0: Vcore Voltage +dev.aibs.0.volt.1: +3.3 Voltage +dev.aibs.0.volt.2: +5 Voltage +dev.aibs.0.volt.3: +12 Voltage +dev.aibs.0.temp: +dev.aibs.0.temp.0: CPU Temperature +dev.aibs.0.temp.1: MB Temperature +dev.aibs.0.fan: +dev.aibs.0.fan.0: CPU FAN Speed +dev.aibs.0.fan.1: CHASSIS FAN Speed +.Ed +.Pp +Generally, sensors provided by the +.Nm +driver may also be supported by certain other drivers or utilities +that access the +.Tn ISA / +.Tn LPC +or +.Tn I2C / +.Tn SMBus +devices directly. +The precise collection of +.Nm +sensors is comprised of the sensors +specifically utilised in the motherboard +design, which may be supported through +a combination of one or more physical hardware monitoring chips. +.Pp +The +.Nm +driver, however, provides the following advantages +when compared to the native hardware monitoring drivers or other utilities: +.Bl -bullet +.It +Sensor values from +.Nm +are expected to be more reliable. +For example, voltage sensors in many hardware monitoring chips +can only sense voltage from 0 to 2 or 4 volts, and the excessive +voltage is removed by the resistors, which may vary with the motherboard +and with the voltage that is being sensed. +In +.Nm , +the required resistor factors are provided by +the motherboard manufacturer through +.Tn ACPI ; +in the native drivers, the resistor factors +are encoded into the driver based on the chip manufacturer's recommendations. +In essence, sensor values from +.Nm +are very likely to be identical to the readings from the +Hardware Monitor screen in the BIOS. +.It +Sensor descriptions from +.Nm +are more likely to match the markings on the motherboard. +.It +Sensor range specifications are supported by +.Nm . +The range specification is reported +for each individual sensor as suggested by the motherboard manufacturer. +For example, the threshold for the CPU temperature sensor is likely +to be significantly higher than that for the chassis temperature sensor. +.It +Support for newer chips in +.Nm . +Newer chips may miss a native driver, +but should be supported through +.Nm +regardless. +.El +.Sh SEE ALSO +.Xr sysctl 3 , +.Xr acpi 4 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox 4.7 , +.Dx 2.5 , +.Nx 6.0 +and +.Fx 9.0 . +.Pp +An earlier version of the driver, +.Nm acpi_aiboost , +first appeared in +.Fx 7.0 +and +.Nx 5.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written for +.Ox , +.Dx , +.Nx +and +.Fx +by +.An Constantine A. Murenin Aq cnst@FreeBSD.org , +Raouf Boutaba Research Group, +David R. Cheriton School of Computer Science, +University of Waterloo. +.Pp +An earlier version of the driver, named +.Nm acpi_aiboost , +was written for +.Fx +by +.An Takanori Watanabe . Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Jul 25 17:43:38 2010 (r210475) +++ stable/8/sys/conf/files Sun Jul 25 17:48:16 2010 (r210476) @@ -416,6 +416,7 @@ dev/acpi_support/acpi_ibm.c optional acp dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi +dev/acpi_support/atk0110.c optional aibs acpi dev/acpica/Osd/OsdDebug.c optional acpi dev/acpica/Osd/OsdHardware.c optional acpi dev/acpica/Osd/OsdInterrupt.c optional acpi Copied: stable/8/sys/dev/acpi_support/atk0110.c (from r209523, head/sys/dev/acpi_support/atk0110.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/dev/acpi_support/atk0110.c Sun Jul 25 17:48:16 2010 (r210476, copy of r209523, head/sys/dev/acpi_support/atk0110.c) @@ -0,0 +1,358 @@ +/* $NetBSD: atk0110.c,v 1.4 2010/02/11 06:54:57 cnst Exp $ */ +/* $OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $ */ + +/* + * Copyright (c) 2009, 2010 Constantine A. Murenin + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* + * ASUSTeK AI Booster (ACPI ASOC ATK0110). + * + * This code was originally written for OpenBSD after the techniques + * described in the Linux's asus_atk0110.c and FreeBSD's Takanori Watanabe's + * acpi_aiboost.c were verified to be accurate on the actual hardware kindly + * provided by Sam Fourman Jr. It was subsequently ported from OpenBSD to + * DragonFly BSD, to NetBSD's sysmon_envsys(9) and to FreeBSD's sysctl(9). + * + * -- Constantine A. Murenin + */ + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("aibs"); +ACPI_SERIAL_DECL(aibs, "aibs"); + +#define AIBS_MORE_SENSORS +#define AIBS_VERBOSE + +enum aibs_type { + AIBS_VOLT, + AIBS_TEMP, + AIBS_FAN +}; + +struct aibs_sensor { + ACPI_INTEGER v; + ACPI_INTEGER i; + ACPI_INTEGER l; + ACPI_INTEGER h; + enum aibs_type t; +}; + +struct aibs_softc { + struct device *sc_dev; + ACPI_HANDLE sc_ah; + + struct aibs_sensor *sc_asens_volt; + struct aibs_sensor *sc_asens_temp; + struct aibs_sensor *sc_asens_fan; +}; + +static int aibs_probe(device_t); +static int aibs_attach(device_t); +static int aibs_detach(device_t); +static int aibs_sysctl(SYSCTL_HANDLER_ARGS); + +static void aibs_attach_sif(struct aibs_softc *, enum aibs_type); + +static device_method_t aibs_methods[] = { + DEVMETHOD(device_probe, aibs_probe), + DEVMETHOD(device_attach, aibs_attach), + DEVMETHOD(device_detach, aibs_detach), + { NULL, NULL } +}; + +static driver_t aibs_driver = { + "aibs", + aibs_methods, + sizeof(struct aibs_softc) +}; + +static devclass_t aibs_devclass; + +DRIVER_MODULE(aibs, acpi, aibs_driver, aibs_devclass, NULL, NULL); + + +static char* aibs_hids[] = { + "ATK0110", + NULL +}; + +static int +aibs_probe(device_t dev) +{ + if (acpi_disabled("aibs") || + ACPI_ID_PROBE(device_get_parent(dev), dev, aibs_hids) == NULL) + return ENXIO; + + device_set_desc(dev, "ASUSTeK AI Booster (ACPI ASOC ATK0110)"); + return 0; +} + +static int +aibs_attach(device_t dev) +{ + struct aibs_softc *sc = device_get_softc(dev); + + sc->sc_dev = dev; + sc->sc_ah = acpi_get_handle(dev); + + aibs_attach_sif(sc, AIBS_VOLT); + aibs_attach_sif(sc, AIBS_TEMP); + aibs_attach_sif(sc, AIBS_FAN); + + return 0; +} + +static void +aibs_attach_sif(struct aibs_softc *sc, enum aibs_type st) +{ + ACPI_STATUS s; + ACPI_BUFFER b; + ACPI_OBJECT *bp, *o; + int i, n; + const char *node; + char name[] = "?SIF"; + struct aibs_sensor *as; + struct sysctl_oid *so; + + switch (st) { + case AIBS_VOLT: + node = "volt"; + name[0] = 'V'; + break; + case AIBS_TEMP: + node = "temp"; + name[0] = 'T'; + break; + case AIBS_FAN: + node = "fan"; + name[0] = 'F'; + break; + default: + return; + } + + b.Length = ACPI_ALLOCATE_BUFFER; + s = AcpiEvaluateObjectTyped(sc->sc_ah, name, NULL, &b, + ACPI_TYPE_PACKAGE); + if (ACPI_FAILURE(s)) { + device_printf(sc->sc_dev, "%s not found\n", name); + return; + } + + bp = b.Pointer; + o = bp->Package.Elements; + if (o[0].Type != ACPI_TYPE_INTEGER) { + device_printf(sc->sc_dev, "%s[0]: invalid type\n", name); + AcpiOsFree(b.Pointer); + return; + } + + n = o[0].Integer.Value; + if (bp->Package.Count - 1 < n) { + device_printf(sc->sc_dev, "%s: invalid package\n", name); + AcpiOsFree(b.Pointer); + return; + } else if (bp->Package.Count - 1 > n) { + int on = n; + +#ifdef AIBS_MORE_SENSORS + n = bp->Package.Count - 1; +#endif + device_printf(sc->sc_dev, "%s: malformed package: %i/%i" + ", assume %i\n", name, on, bp->Package.Count - 1, n); + } + if (n < 1) { + device_printf(sc->sc_dev, "%s: no members in the package\n", + name); + AcpiOsFree(b.Pointer); + return; + } + + as = malloc(sizeof(*as) * n, M_DEVBUF, M_NOWAIT | M_ZERO); + if (as == NULL) { + device_printf(sc->sc_dev, "%s: malloc fail\n", name); + AcpiOsFree(b.Pointer); + return; + } + switch (st) { + case AIBS_VOLT: + sc->sc_asens_volt = as; + break; + case AIBS_TEMP: + sc->sc_asens_temp = as; + break; + case AIBS_FAN: + sc->sc_asens_fan = as; + break; + } + + /* sysctl subtree for sensors of this type */ + so = SYSCTL_ADD_NODE(device_get_sysctl_ctx(sc->sc_dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)), st, + node, CTLFLAG_RD, NULL, NULL); + + for (i = 0, o++; i < n; i++, o++) { + ACPI_OBJECT *oi; + char si[3]; + const char *desc; + + /* acpica5 automatically evaluates the referenced package */ + if (o[0].Type != ACPI_TYPE_PACKAGE) { + device_printf(sc->sc_dev, + "%s: %i: not a package: %i type\n", + name, i, o[0].Type); + continue; + } + oi = o[0].Package.Elements; + if (o[0].Package.Count != 5 || + oi[0].Type != ACPI_TYPE_INTEGER || + oi[1].Type != ACPI_TYPE_STRING || + oi[2].Type != ACPI_TYPE_INTEGER || + oi[3].Type != ACPI_TYPE_INTEGER || + oi[4].Type != ACPI_TYPE_INTEGER) { + device_printf(sc->sc_dev, + "%s: %i: invalid package\n", + name, i); + continue; + } + as[i].i = oi[0].Integer.Value; + desc = oi[1].String.Pointer; + as[i].l = oi[2].Integer.Value; + as[i].h = oi[3].Integer.Value; + as[i].t = st; +#ifdef AIBS_VERBOSE + device_printf(sc->sc_dev, "%c%i: " + "0x%08"PRIx64" %20s %5"PRIi64" / %5"PRIi64" " + "0x%"PRIx64"\n", + name[0], i, + as[i].i, desc, (int64_t)as[i].l, (int64_t)as[i].h, + oi[4].Integer.Value); +#endif + snprintf(si, sizeof(si), "%i", i); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->sc_dev), + SYSCTL_CHILDREN(so), i, si, CTLTYPE_OPAQUE | CTLFLAG_RD, + sc, st, aibs_sysctl, st == AIBS_TEMP ? "IK" : "I", desc); + } + + AcpiOsFree(b.Pointer); +} + +static int +aibs_detach(device_t dev) +{ + struct aibs_softc *sc = device_get_softc(dev); + + if (sc->sc_asens_volt != NULL) + free(sc->sc_asens_volt, M_DEVBUF); + if (sc->sc_asens_temp != NULL) + free(sc->sc_asens_temp, M_DEVBUF); + if (sc->sc_asens_fan != NULL) + free(sc->sc_asens_fan, M_DEVBUF); + return 0; +} + +#ifdef AIBS_VERBOSE +#define ddevice_printf(x...) device_printf(x) +#else +#define ddevice_printf(x...) +#endif + +static int +aibs_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct aibs_softc *sc = arg1; + enum aibs_type st = arg2; + int i = oidp->oid_number; + ACPI_STATUS rs; + ACPI_OBJECT p, *bp; + ACPI_OBJECT_LIST mp; + ACPI_BUFFER b; + char *name; + struct aibs_sensor *as; + ACPI_INTEGER v, l, h; + int so[3]; + + switch (st) { + case AIBS_VOLT: + name = "RVLT"; + as = sc->sc_asens_volt; + break; + case AIBS_TEMP: + name = "RTMP"; + as = sc->sc_asens_temp; + break; + case AIBS_FAN: + name = "RFAN"; + as = sc->sc_asens_fan; + break; + default: + return ENOENT; + } + if (as == NULL) + return ENOENT; + l = as[i].l; + h = as[i].h; + p.Type = ACPI_TYPE_INTEGER; + p.Integer.Value = as[i].i; + mp.Count = 1; + mp.Pointer = &p; + b.Length = ACPI_ALLOCATE_BUFFER; + ACPI_SERIAL_BEGIN(aibs); + rs = AcpiEvaluateObjectTyped(sc->sc_ah, name, &mp, &b, + ACPI_TYPE_INTEGER); + if (ACPI_FAILURE(rs)) { + ddevice_printf(sc->sc_dev, + "%s: %i: evaluation failed\n", + name, i); + ACPI_SERIAL_END(aibs); + return EIO; + } + bp = b.Pointer; + v = bp->Integer.Value; + AcpiOsFree(b.Pointer); + ACPI_SERIAL_END(aibs); + + switch (st) { + case AIBS_VOLT: + break; + case AIBS_TEMP: + v += 2732; + l += 2732; + h += 2732; + break; + case AIBS_FAN: + break; + } + so[0] = v; + so[1] = l; + so[2] = h; + return sysctl_handle_opaque(oidp, &so, sizeof(so), req); +} Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Sun Jul 25 17:43:38 2010 (r210475) +++ stable/8/sys/i386/conf/NOTES Sun Jul 25 17:48:16 2010 (r210476) @@ -506,6 +506,9 @@ device acpi_video # ACPI Docking Station device acpi_dock +# ACPI ASOC ATK0110 ASUSTeK AI Booster (voltage, temperature and fan sensors) +device aibs + # The cpufreq(4) driver provides support for non-ACPI CPU frequency control device cpufreq Modified: stable/8/sys/modules/acpi/Makefile ============================================================================== --- stable/8/sys/modules/acpi/Makefile Sun Jul 25 17:43:38 2010 (r210475) +++ stable/8/sys/modules/acpi/Makefile Sun Jul 25 17:48:16 2010 (r210476) @@ -6,6 +6,6 @@ SUBDIR= acpi SUBDIR+= acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm \ acpi_panasonic acpi_sony acpi_toshiba acpi_video \ - acpi_dock acpi_wmi + acpi_dock acpi_wmi aibs .include From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 17:55:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 757161065670; Sun, 25 Jul 2010 17:55:58 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 631CD8FC14; Sun, 25 Jul 2010 17:55:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PHtwQR017888; Sun, 25 Jul 2010 17:55:58 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PHtwgm017883; Sun, 25 Jul 2010 17:55:58 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007251755.o6PHtwgm017883@svn.freebsd.org> From: Rui Paulo Date: Sun, 25 Jul 2010 17:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210477 - in head: share/man/man4 sys/conf sys/dev/acpi_support sys/i386/conf sys/modules/acpi sys/modules/acpi/acpi_aiboost X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 17:55:58 -0000 Author: rpaulo Date: Sun Jul 25 17:55:57 2010 New Revision: 210477 URL: http://svn.freebsd.org/changeset/base/210477 Log: Remove the acpi_aiboost driver. It has been replaced by aibs(4). Deleted: head/share/man/man4/acpi_aiboost.4 head/sys/dev/acpi_support/acpi_aiboost.c head/sys/modules/acpi/acpi_aiboost/ Modified: head/share/man/man4/Makefile head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/acpi/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Jul 25 17:48:16 2010 (r210476) +++ head/share/man/man4/Makefile Sun Jul 25 17:55:57 2010 (r210477) @@ -3,7 +3,6 @@ MAN= aac.4 \ acpi.4 \ - ${_acpi_aiboost.4} \ ${_acpi_asus.4} \ ${_acpi_dock.4} \ ${_acpi_fujitsu.4} \ @@ -629,7 +628,6 @@ MLINKS+=xl.4 if_xl.4 MLINKS+=zyd.4 if_zyd.4 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" -_acpi_aiboost.4=acpi_aiboost.4 _acpi_asus.4= acpi_asus.4 _acpi_dock.4= acpi_dock.4 _acpi_fujitsu.4=acpi_fujitsu.4 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jul 25 17:48:16 2010 (r210476) +++ head/sys/conf/files Sun Jul 25 17:55:57 2010 (r210477) @@ -428,7 +428,6 @@ dev/aac/aac_disk.c optional aac dev/aac/aac_linux.c optional aac compat_linux dev/aac/aac_pci.c optional aac pci dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi -dev/acpi_support/acpi_aiboost.c optional acpi_aiboost acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi dev/acpi_support/acpi_hp.c optional acpi_hp acpi Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Sun Jul 25 17:48:16 2010 (r210476) +++ head/sys/i386/conf/NOTES Sun Jul 25 17:55:57 2010 (r210477) @@ -482,9 +482,6 @@ options ACPI_DEBUG # ACPI WMI Mapping driver device acpi_wmi -# ACPI Asus Desktop Extras. (voltage, temp, fan) -device acpi_aiboost - # ACPI Asus Extras (LCD backlight/brightness, video output, etc.) device acpi_asus Modified: head/sys/modules/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/Makefile Sun Jul 25 17:48:16 2010 (r210476) +++ head/sys/modules/acpi/Makefile Sun Jul 25 17:55:57 2010 (r210477) @@ -4,7 +4,7 @@ SUBDIR= acpi .endif -SUBDIR+= acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm \ +SUBDIR+= acpi_asus acpi_fujitsu acpi_hp acpi_ibm \ acpi_panasonic acpi_sony acpi_toshiba acpi_video \ acpi_dock acpi_wmi aibs From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 18:13:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E5C106566C; Sun, 25 Jul 2010 18:13:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5CA188FC18; Sun, 25 Jul 2010 18:12:59 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6PICu3p013423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Jul 2010 21:12:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6PICu9Q023130; Sun, 25 Jul 2010 21:12:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6PICtKK023129; Sun, 25 Jul 2010 21:12:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 25 Jul 2010 21:12:55 +0300 From: Kostik Belousov To: Bruce Evans Message-ID: <20100725181255.GB22295@deviant.kiev.zoral.com.ua> References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> <20100726013202.G11808@delplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cvVnyQ+4j833TQvp" Content-Disposition: inline In-Reply-To: <20100726013202.G11808@delplex.bde.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder , src-committers@freebsd.org Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 18:13:00 -0000 --cvVnyQ+4j833TQvp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 26, 2010 at 01:36:07AM +1000, Bruce Evans wrote: > On Sat, 24 Jul 2010, Stefan Farfeleder wrote: >=20 > >declaring enums like this is not standard C code (seems to be a GCC > >extension). I don't think we should use this feature in our headers. >=20 > This is unfortunate. This is because the size of an enum variable > depends on its complete declaration. This is an error unconditionaly > with TenDRA. It takes -pedantic to get a warning from gcc. I looked at the C99, and indeed, there is an explicit sentence "A type specifier of the form enum identifier without an enumerator list shall only appear after the type it specifies is complete." I fully agree with Bruce that this is unfortunate, or rather, makes enum tag declaration completely unuseful. gcc extension greatly simplifies dealing with the headers pollution. On the other hand, I disagree with the statement that the size of the enum variable depends on the full declaration. It seems that C99 defines values of the enum to by of type int, and both i386 and amd64 ABIs define enums as represented by 4-byte integers. Yes, I am aware that C++ allows the enum to be assigned the the shortest arithmetic type that can represent all enum values. Overall, I will revert both this revision and similar part of the=20 r210431, using #include :(. >=20 > >>Modified: head/sys/sys/imgact.h > >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >>--- head/sys/sys/imgact.h Sat Jul 24 18:05:10 2010 (r210450) > >>+++ head/sys/sys/imgact.h Sat Jul 24 18:14:34 2010 (r210451) > >>@@ -32,8 +32,6 @@ > >> #ifndef _SYS_IMGACT_H_ > >> #define _SYS_IMGACT_H_ > >> > >>-#include > >>- >=20 > The rule that new pollution may not be added to old headers should have > prevented the need for this removal. >=20 > >> #define MAXSHELLCMDLEN PAGE_SIZE > >> > >> struct image_args { > >>@@ -75,6 +73,7 @@ struct image_params { > >> #ifdef _KERNEL > >> struct sysentvec; > >> struct thread; > >>+enum uio_seg; > >> > >> #define IMGACT_CORE_COMPRESS 0x01 >=20 > Bruce --cvVnyQ+4j833TQvp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxMfqYACgkQC3+MBN1Mb4hKDgCgjhvBlfuYNbDo/597UOX+J8yh 8dYAoJ+fCbbGoHB5ASB4iKLLAbDijsg2 =7AJN -----END PGP SIGNATURE----- --cvVnyQ+4j833TQvp-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 18:32:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76B4C106566C; Sun, 25 Jul 2010 18:32:59 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1698FC1D; Sun, 25 Jul 2010 18:32:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PIWxqv025996; Sun, 25 Jul 2010 18:32:59 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PIWx2C025994; Sun, 25 Jul 2010 18:32:59 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007251832.o6PIWx2C025994@svn.freebsd.org> From: Rui Paulo Date: Sun, 25 Jul 2010 18:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210478 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 18:32:59 -0000 Author: rpaulo Date: Sun Jul 25 18:32:59 2010 New Revision: 210478 URL: http://svn.freebsd.org/changeset/base/210478 Log: Mention the removal of acpi_aiboost. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jul 25 17:55:57 2010 (r210477) +++ head/UPDATING Sun Jul 25 18:32:59 2010 (r210478) @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100725: + The acpi_aiboost(4) driver has been removed in favor of the new + aibs(4) driver. You should update your kernel configuration file. + 20100722: BSD grep has been imported to the base system and it is built by default. It is completely BSD licensed, highly GNU-compatible, uses From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 18:57:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1915D1065674; Sun, 25 Jul 2010 18:57:49 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32A7F8FC0C; Sun, 25 Jul 2010 18:57:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PIvmXf031486; Sun, 25 Jul 2010 18:57:48 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PIvmoS031484; Sun, 25 Jul 2010 18:57:48 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007251857.o6PIvmoS031484@svn.freebsd.org> From: Gabor Kovesdan Date: Sun, 25 Jul 2010 18:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210479 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 18:57:49 -0000 Author: gabor Date: Sun Jul 25 18:57:48 2010 New Revision: 210479 URL: http://svn.freebsd.org/changeset/base/210479 Log: - Fix -l and -L by really surpressing output and just showing filenames Submitted by: swell.k@gmail.com Approved by: delphij (mentor) Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Sun Jul 25 18:32:59 2010 (r210478) +++ head/usr.bin/grep/util.c Sun Jul 25 18:57:48 2010 (r210479) @@ -343,7 +343,7 @@ procline(struct str *l, int nottext) return (c); /* Binary file */ /* Dealing with the context */ - if ((tail || c) && !cflag && !qflag) { + if ((tail || c) && !cflag && !qflag && !lflag && !Lflag) { if (c) { if (!first && !prev && !tail && Aflag) printf("--\n"); From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 19:08:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9A531065677; Sun, 25 Jul 2010 19:08:33 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD9D8FC08; Sun, 25 Jul 2010 19:08:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:7c3d:1bf0:778d:8b44] (unknown [IPv6:2001:7b8:3a7:0:7c3d:1bf0:778d:8b44]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 971B75C59; Sun, 25 Jul 2010 21:08:32 +0200 (CEST) Message-ID: <4C4C8BB0.7020701@andric.com> Date: Sun, 25 Jul 2010 21:08:32 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.9pre) Gecko/20100723 Lanikai/3.1.2pre MIME-Version: 1.0 To: Kostik Belousov References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> <20100726013202.G11808@delplex.bde.org> <20100725181255.GB22295@deviant.kiev.zoral.com.ua> In-Reply-To: <20100725181255.GB22295@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder , src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 19:08:33 -0000 On 2010-07-25 20:12, Kostik Belousov wrote: > I looked at the C99, and indeed, there is an explicit sentence > "A type specifier of the form enum identifier without an enumerator list > shall only appear after the type it specifies is complete." Later in the same section it even has: 6. A declaration of the form struct-or-union identifier ; specifies a structure or union type and declares the identifier as a tag of that type. 111) with note 111 explicitly saying: "A similar construction with enum does not exist." > I fully agree with Bruce that this is unfortunate, or rather, makes > enum tag declaration completely unuseful. gcc extension greatly simplifies > dealing with the headers pollution. However, if you wanted to call exec_copyin_args(), you would now be forced to remember to hand-include sys/uio.h before this header, or the compiler would not know the enum values themselves. You only gain something when not using that specific function (and thus the enum) at all. Maybe you could move just this function and the enum declaration to another header, but that is probably overkill... :) From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 19:26:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BC731065674; Sun, 25 Jul 2010 19:26:01 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id A2A098FC0C; Sun, 25 Jul 2010 19:26:00 +0000 (UTC) Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.4/8.14.4) with ESMTP id o6PJPsLh023220; Sun, 25 Jul 2010 13:25:54 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <201007251543.o6PFhrHp088504@svn.freebsd.org> Date: Sun, 25 Jul 2010 13:25:54 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <79B77F13-9802-4007-A565-28B76A0AAA88@samsco.org> References: <201007251543.o6PFhrHp088504@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1078) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210471 - in head: sbin/camcontrol sys/cam sys/cam/ata sys/cam/scsi sys/dev/ahci sys/dev/ata sys/dev/mvs sys/dev/siis sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 19:26:01 -0000 I'm tired of CCB structure sizes changing willie nillie, whether in a = CURRENT branch or not. This should have been a new CCB, not a add-on to = an existing CCB. All your patch does it break binary compatibility. Scott On Jul 25, 2010, at 9:43 AM, Alexander Motin wrote: > Author: mav > Date: Sun Jul 25 15:43:52 2010 > New Revision: 210471 > URL: http://svn.freebsd.org/changeset/base/210471 >=20 > Log: > Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers = to > GEOM. This information needed for proper soft-RAID's on-disk metadata > reading and writing. >=20 > Modified: > head/sbin/camcontrol/camcontrol.c > head/sys/cam/ata/ata_da.c > head/sys/cam/cam_ccb.h > head/sys/cam/scsi/scsi_cd.c > head/sys/cam/scsi/scsi_da.c > head/sys/dev/ahci/ahci.c > head/sys/dev/ata/ata-all.c > head/sys/dev/ata/ata-disk.c > head/sys/dev/mvs/mvs.c > head/sys/dev/siis/siis.c > head/sys/geom/geom_disk.c > head/sys/geom/geom_disk.h >=20 > Modified: head/sbin/camcontrol/camcontrol.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sbin/camcontrol/camcontrol.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sbin/camcontrol/camcontrol.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -3083,6 +3083,14 @@ cpi_print(struct ccb_pathinq *cpi) > cpi->initiator_id); > fprintf(stdout, "%s SIM vendor: %s\n", adapter_str, = cpi->sim_vid); > fprintf(stdout, "%s HBA vendor: %s\n", adapter_str, = cpi->hba_vid); > + fprintf(stdout, "%s HBA vendor ID: 0x%04x\n", > + adapter_str, cpi->hba_vendor); > + fprintf(stdout, "%s HBA device ID: 0x%04x\n", > + adapter_str, cpi->hba_device); > + fprintf(stdout, "%s HBA subvendor ID: 0x%04x\n", > + adapter_str, cpi->hba_subvendor); > + fprintf(stdout, "%s HBA subdevice ID: 0x%04x\n", > + adapter_str, cpi->hba_subdevice); > fprintf(stdout, "%s bus ID: %d\n", adapter_str, cpi->bus_id); > fprintf(stdout, "%s base transfer speed: ", adapter_str); > if (cpi->base_transfer_speed > 1000) > @@ -3092,6 +3100,8 @@ cpi_print(struct ccb_pathinq *cpi) > else > fprintf(stdout, "%dKB/sec\n", > (cpi->base_transfer_speed % 1000) * 1000); > + fprintf(stdout, "%s maximum transfer size: %u bytes\n", > + adapter_str, cpi->maxio); > } >=20 > static int >=20 > Modified: head/sys/cam/ata/ata_da.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/ata/ata_da.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/cam/ata/ata_da.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -734,6 +734,10 @@ adaregister(struct cam_periph *periph, v > softc->disk->d_flags |=3D DISKFLAG_CANDELETE; > strlcpy(softc->disk->d_ident, cgd->serial_num, > MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); > + softc->disk->d_hba_vendor =3D cpi.hba_vendor; > + softc->disk->d_hba_device =3D cpi.hba_device; > + softc->disk->d_hba_subvendor =3D cpi.hba_subvendor; > + softc->disk->d_hba_subdevice =3D cpi.hba_subdevice; >=20 > softc->disk->d_sectorsize =3D softc->params.secsize; > softc->disk->d_mediasize =3D (off_t)softc->params.sectors * >=20 > Modified: head/sys/cam/cam_ccb.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/cam_ccb.h Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/cam/cam_ccb.h Sun Jul 25 15:43:52 2010 = (r210471) > @@ -596,6 +596,10 @@ struct ccb_pathinq { > char ccb_pathinq_settings_opaque[PATHINQ_SETTINGS_SIZE]; > } xport_specific; > u_int maxio; /* Max supported I/O size, in = bytes. */ > + u_int16_t hba_vendor; /* HBA vendor ID */ > + u_int16_t hba_device; /* HBA device ID */ > + u_int16_t hba_subvendor; /* HBA subvendor ID */ > + u_int16_t hba_subdevice; /* HBA subdevice ID */ > }; >=20 > /* Path Statistics CCB */ >=20 > Modified: head/sys/cam/scsi/scsi_cd.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/scsi/scsi_cd.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/cam/scsi/scsi_cd.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -733,6 +733,10 @@ cdregister(struct cam_periph *periph, vo > else > softc->disk->d_maxsize =3D cpi.maxio; > softc->disk->d_flags =3D 0; > + softc->disk->d_hba_vendor =3D cpi.hba_vendor; > + softc->disk->d_hba_device =3D cpi.hba_device; > + softc->disk->d_hba_subvendor =3D cpi.hba_subvendor; > + softc->disk->d_hba_subdevice =3D cpi.hba_subdevice; > disk_create(softc->disk, DISK_VERSION); > cam_periph_lock(periph); >=20 >=20 > Modified: head/sys/cam/scsi/scsi_da.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cam/scsi/scsi_da.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/cam/scsi/scsi_da.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -1310,6 +1310,10 @@ daregister(struct cam_periph *periph, vo > softc->disk->d_flags |=3D DISKFLAG_CANFLUSHCACHE; > strlcpy(softc->disk->d_ident, cgd->serial_num, > MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1)); > + softc->disk->d_hba_vendor =3D cpi.hba_vendor; > + softc->disk->d_hba_device =3D cpi.hba_device; > + softc->disk->d_hba_subvendor =3D cpi.hba_subvendor; > + softc->disk->d_hba_subdevice =3D cpi.hba_subdevice; > disk_create(softc->disk, DISK_VERSION); > mtx_lock(periph->sim->mtx); >=20 >=20 > Modified: head/sys/dev/ahci/ahci.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ahci/ahci.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/dev/ahci/ahci.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -2459,7 +2459,7 @@ ahci_check_ids(device_t dev, union ccb * > static void > ahciaction(struct cam_sim *sim, union ccb *ccb) > { > - device_t dev; > + device_t dev, parent; > struct ahci_channel *ch; >=20 > CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahciaction = func_code=3D%x\n", > @@ -2599,6 +2599,7 @@ ahciaction(struct cam_sim *sim, union cc > { > struct ccb_pathinq *cpi =3D &ccb->cpi; >=20 > + parent =3D device_get_parent(dev); > cpi->version_num =3D 1; /* XXX??? */ > cpi->hba_inquiry =3D PI_SDTR_ABLE; > if (ch->caps & AHCI_CAP_SNCQ) > @@ -2626,8 +2627,12 @@ ahciaction(struct cam_sim *sim, union cc > cpi->protocol_version =3D PROTO_VERSION_UNSPECIFIED; > cpi->maxio =3D MAXPHYS; > /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). = */ > - if (pci_get_devid(device_get_parent(dev)) =3D=3D = 0x43801002) > + if (pci_get_devid(parent) =3D=3D 0x43801002) > cpi->maxio =3D min(cpi->maxio, 128 * 512); > + cpi->hba_vendor =3D pci_get_vendor(parent); > + cpi->hba_device =3D pci_get_device(parent); > + cpi->hba_subvendor =3D pci_get_subvendor(parent); > + cpi->hba_subdevice =3D pci_get_subdevice(parent); > cpi->ccb_h.status =3D CAM_REQ_CMP; > break; > } >=20 > Modified: head/sys/dev/ata/ata-all.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ata/ata-all.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/dev/ata/ata-all.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include >=20 > #ifdef ATA_CAM > @@ -1523,7 +1524,7 @@ ata_check_ids(device_t dev, union ccb *c > static void > ataaction(struct cam_sim *sim, union ccb *ccb) > { > - device_t dev; > + device_t dev, parent; > struct ata_channel *ch; >=20 > CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ataaction = func_code=3D%x\n", > @@ -1674,6 +1675,7 @@ ataaction(struct cam_sim *sim, union ccb > { > struct ccb_pathinq *cpi =3D &ccb->cpi; >=20 > + parent =3D device_get_parent(dev); > cpi->version_num =3D 1; /* XXX??? */ > cpi->hba_inquiry =3D PI_SDTR_ABLE; > cpi->target_sprt =3D 0; > @@ -1702,6 +1704,13 @@ ataaction(struct cam_sim *sim, union ccb > cpi->protocol =3D PROTO_ATA; > cpi->protocol_version =3D PROTO_VERSION_UNSPECIFIED; > cpi->maxio =3D ch->dma.max_iosize ? ch->dma.max_iosize : = DFLTPHYS; > + if (device_get_devclass(device_get_parent(parent)) =3D=3D > + devclass_find("pci")) { > + cpi->hba_vendor =3D pci_get_vendor(parent); > + cpi->hba_device =3D pci_get_device(parent); > + cpi->hba_subvendor =3D = pci_get_subvendor(parent); > + cpi->hba_subdevice =3D = pci_get_subdevice(parent); > + } > cpi->ccb_h.status =3D CAM_REQ_CMP; > break; > } >=20 > Modified: head/sys/dev/ata/ata-disk.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/ata/ata-disk.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/dev/ata/ata-disk.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include >=20 > /* prototypes */ > @@ -94,6 +95,7 @@ ad_attach(device_t dev) > struct ata_channel *ch =3D = device_get_softc(device_get_parent(dev)); > struct ata_device *atadev =3D device_get_softc(dev); > struct ad_softc *adp; > + device_t parent; >=20 > /* check that we have a virgin disk to attach */ > if (device_get_ivars(dev)) > @@ -143,6 +145,17 @@ ad_attach(device_t dev) > adp->disk->d_flags |=3D DISKFLAG_CANDELETE; > strlcpy(adp->disk->d_ident, atadev->param.serial, > sizeof(adp->disk->d_ident)); > + parent =3D device_get_parent(ch->dev); > + if (parent !=3D NULL && device_get_parent(parent) !=3D NULL && > + (device_get_devclass(parent) =3D=3D > + devclass_find("atapci") || > + device_get_devclass(device_get_parent(parent)) =3D=3D > + devclass_find("pci"))) { > + adp->disk->d_hba_vendor =3D pci_get_vendor(parent); > + adp->disk->d_hba_device =3D pci_get_device(parent); > + adp->disk->d_hba_subvendor =3D pci_get_subvendor(parent); > + adp->disk->d_hba_subdevice =3D pci_get_subdevice(parent); > + } > ata_disk_firmware_geom_adjust(adp->disk); > disk_create(adp->disk, DISK_VERSION); > device_add_child(dev, "subdisk", device_get_unit(dev)); >=20 > Modified: head/sys/dev/mvs/mvs.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/mvs/mvs.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/dev/mvs/mvs.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include "mvs.h" >=20 > #include > @@ -2017,7 +2018,7 @@ mvs_check_ids(device_t dev, union ccb *c > static void > mvsaction(struct cam_sim *sim, union ccb *ccb) > { > - device_t dev; > + device_t dev, parent; > struct mvs_channel *ch; >=20 > CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("mvsaction = func_code=3D%x\n", > @@ -2152,6 +2153,7 @@ mvsaction(struct cam_sim *sim, union ccb > { > struct ccb_pathinq *cpi =3D &ccb->cpi; >=20 > + parent =3D device_get_parent(dev); > cpi->version_num =3D 1; /* XXX??? */ > cpi->hba_inquiry =3D PI_SDTR_ABLE; > if (!(ch->quirks & MVS_Q_GENI)) { > @@ -2180,6 +2182,12 @@ mvsaction(struct cam_sim *sim, union ccb > cpi->protocol =3D PROTO_ATA; > cpi->protocol_version =3D PROTO_VERSION_UNSPECIFIED; > cpi->maxio =3D MAXPHYS; > + if ((ch->quirks & MVS_Q_SOC) =3D=3D 0) { > + cpi->hba_vendor =3D pci_get_vendor(parent); > + cpi->hba_device =3D pci_get_device(parent); > + cpi->hba_subvendor =3D = pci_get_subvendor(parent); > + cpi->hba_subdevice =3D = pci_get_subdevice(parent); > + } > cpi->ccb_h.status =3D CAM_REQ_CMP; > break; > } >=20 > Modified: head/sys/dev/siis/siis.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/siis/siis.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/dev/siis/siis.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -1677,7 +1677,7 @@ siis_check_ids(device_t dev, union ccb * > static void > siisaction(struct cam_sim *sim, union ccb *ccb) > { > - device_t dev; > + device_t dev, parent; > struct siis_channel *ch; >=20 > CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("siisaction = func_code=3D%x\n", > @@ -1816,6 +1816,7 @@ siisaction(struct cam_sim *sim, union cc > { > struct ccb_pathinq *cpi =3D &ccb->cpi; >=20 > + parent =3D device_get_parent(dev); > cpi->version_num =3D 1; /* XXX??? */ > cpi->hba_inquiry =3D PI_SDTR_ABLE | PI_TAG_ABLE; > cpi->hba_inquiry |=3D PI_SATAPM; > @@ -1835,8 +1836,12 @@ siisaction(struct cam_sim *sim, union cc > cpi->transport_version =3D XPORT_VERSION_UNSPECIFIED; > cpi->protocol =3D PROTO_ATA; > cpi->protocol_version =3D PROTO_VERSION_UNSPECIFIED; > - cpi->ccb_h.status =3D CAM_REQ_CMP; > cpi->maxio =3D MAXPHYS; > + cpi->hba_vendor =3D pci_get_vendor(parent); > + cpi->hba_device =3D pci_get_device(parent); > + cpi->hba_subvendor =3D pci_get_subvendor(parent); > + cpi->hba_subdevice =3D pci_get_subdevice(parent); > + cpi->ccb_h.status =3D CAM_REQ_CMP; > break; > } > default: >=20 > Modified: head/sys/geom/geom_disk.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/geom/geom_disk.c Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/geom/geom_disk.c Sun Jul 25 15:43:52 2010 = (r210471) > @@ -305,6 +305,18 @@ g_disk_start(struct bio *bp) > break; > else if (g_handleattr_str(bp, "GEOM::ident", = dp->d_ident)) > break; > + else if (g_handleattr(bp, "GEOM::hba_vendor", > + &dp->d_hba_vendor, 2)) > + break; > + else if (g_handleattr(bp, "GEOM::hba_device", > + &dp->d_hba_device, 2)) > + break; > + else if (g_handleattr(bp, "GEOM::hba_subvendor", > + &dp->d_hba_subvendor, 2)) > + break; > + else if (g_handleattr(bp, "GEOM::hba_subdevice", > + &dp->d_hba_subdevice, 2)) > + break; > else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) > g_disk_kerneldump(bp, dp); > else=20 >=20 > Modified: head/sys/geom/geom_disk.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/geom/geom_disk.h Sun Jul 25 15:17:24 2010 = (r210470) > +++ head/sys/geom/geom_disk.h Sun Jul 25 15:43:52 2010 = (r210471) > @@ -85,6 +85,10 @@ struct disk { > u_int d_stripeoffset; > u_int d_stripesize; > char d_ident[DISK_IDENT_SIZE]; > + uint16_t d_hba_vendor; > + uint16_t d_hba_device; > + uint16_t d_hba_subvendor; > + uint16_t d_hba_subdevice; >=20 > /* Fields private to the driver */ > void *d_drv1; From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 19:55:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32B38106564A; Sun, 25 Jul 2010 19:55:15 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 0BAC88FC14; Sun, 25 Jul 2010 19:55:14 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id D126B582C5; Sun, 25 Jul 2010 14:55:13 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id ll-lyXMvDQur; Sun, 25 Jul 2010 14:55:13 -0500 (CDT) Received: from wanderer.tachypleus.net (ASt-Lambert-154-1-36-154.w90-61.abo.wanadoo.fr [90.61.171.154]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 70EC1582C3; Sun, 25 Jul 2010 14:55:12 -0500 (CDT) Message-ID: <4C4C969E.1060602@freebsd.org> Date: Sun, 25 Jul 2010 21:55:10 +0200 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100627 Thunderbird/3.0.5 MIME-Version: 1.0 To: Kostik Belousov References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> <20100726013202.G11808@delplex.bde.org> <20100725181255.GB22295@deviant.kiev.zoral.com.ua> In-Reply-To: <20100725181255.GB22295@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder , src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 19:55:15 -0000 On 07/25/10 20:12, Kostik Belousov wrote: > On Mon, Jul 26, 2010 at 01:36:07AM +1000, Bruce Evans wrote: > >> On Sat, 24 Jul 2010, Stefan Farfeleder wrote: >> >> >>> declaring enums like this is not standard C code (seems to be a GCC >>> extension). I don't think we should use this feature in our headers. >>> >> This is unfortunate. This is because the size of an enum variable >> depends on its complete declaration. This is an error unconditionaly >> with TenDRA. It takes -pedantic to get a warning from gcc. >> > I looked at the C99, and indeed, there is an explicit sentence > "A type specifier of the form enum identifier without an enumerator list > shall only appear after the type it specifies is complete." > > I fully agree with Bruce that this is unfortunate, or rather, makes > enum tag declaration completely unuseful. gcc extension greatly simplifies > dealing with the headers pollution. > > On the other hand, I disagree with the statement that the size of the > enum variable depends on the full declaration. It seems that C99 > defines values of the enum to by of type int, and both i386 and > amd64 ABIs define enums as represented by 4-byte integers. > Yes, I am aware that C++ allows the enum to be assigned the > the shortest arithmetic type that can represent all enum values. > This is not actually true. Try adding a value that requires a 64-bit int to your enum -- it will become 8 bytes. Also, the signedness of the type depends on the values in the enumeration. -Nathan From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 19:59:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 897FA106564A; Sun, 25 Jul 2010 19:59:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB7C8FC18; Sun, 25 Jul 2010 19:59:29 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6PJxQJH030268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Jul 2010 22:59:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6PJxQIe024183; Sun, 25 Jul 2010 22:59:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6PJxQaj024182; Sun, 25 Jul 2010 22:59:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 25 Jul 2010 22:59:26 +0300 From: Kostik Belousov To: Nathan Whitehorn Message-ID: <20100725195926.GE22295@deviant.kiev.zoral.com.ua> References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> <20100726013202.G11808@delplex.bde.org> <20100725181255.GB22295@deviant.kiev.zoral.com.ua> <4C4C969E.1060602@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C94crkcyjafcjHxo" Content-Disposition: inline In-Reply-To: <4C4C969E.1060602@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder , src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 19:59:30 -0000 --C94crkcyjafcjHxo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 25, 2010 at 09:55:10PM +0200, Nathan Whitehorn wrote: > On 07/25/10 20:12, Kostik Belousov wrote: > >On Mon, Jul 26, 2010 at 01:36:07AM +1000, Bruce Evans wrote: > > =20 > >>On Sat, 24 Jul 2010, Stefan Farfeleder wrote: > >> > >> =20 > >>>declaring enums like this is not standard C code (seems to be a GCC > >>>extension). I don't think we should use this feature in our headers. > >>> =20 > >>This is unfortunate. This is because the size of an enum variable > >>depends on its complete declaration. This is an error unconditionaly > >>with TenDRA. It takes -pedantic to get a warning from gcc. > >> =20 > >I looked at the C99, and indeed, there is an explicit sentence > >"A type specifier of the form enum identifier without an enumerator list > >shall only appear after the type it specifies is complete." > > > >I fully agree with Bruce that this is unfortunate, or rather, makes > >enum tag declaration completely unuseful. gcc extension greatly simplifi= es > >dealing with the headers pollution. > > > >On the other hand, I disagree with the statement that the size of the > >enum variable depends on the full declaration. It seems that C99 > >defines values of the enum to by of type int, and both i386 and > >amd64 ABIs define enums as represented by 4-byte integers. > >Yes, I am aware that C++ allows the enum to be assigned the > >the shortest arithmetic type that can represent all enum values. > > =20 >=20 > This is not actually true. Try adding a value that requires a 64-bit int= =20 > to your enum -- it will become 8 bytes. Also, the signedness of the type= =20 > depends on the values in the enumeration. Well, the amd64 ABI has a note "C++ and some implementations of C permit enums larger than an int. The underlying type is bumped to an unsigned int, long int or unsigned long int, in that order." The gcc extension is consistent in this regard, since it only allows to use pointers to enum without complete definition. Did I already said that I miss it ? Sorry. --C94crkcyjafcjHxo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxMl50ACgkQC3+MBN1Mb4gZ7QCdHgEdoqp3/irdX1eUoa9KKh9A n6IAoJooacY2/tJpsToEiTBe0g19q9H4 =1Y9C -----END PGP SIGNATURE----- --C94crkcyjafcjHxo-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 20:00:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 808C3106566B; Sun, 25 Jul 2010 20:00:15 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 843A28FC16; Sun, 25 Jul 2010 20:00:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PK0FKT045198; Sun, 25 Jul 2010 20:00:15 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PK0FBg045196; Sun, 25 Jul 2010 20:00:15 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007252000.o6PK0FBg045196@svn.freebsd.org> From: Christian Brueffer Date: Sun, 25 Jul 2010 20:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210480 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 20:00:15 -0000 Author: brueffer Date: Sun Jul 25 20:00:15 2010 New Revision: 210480 URL: http://svn.freebsd.org/changeset/base/210480 Log: MFC: r207829 Various wording, spelling and markup fixes. Modified: stable/8/share/man/man4/iscsi_initiator.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/iscsi_initiator.4 ============================================================================== --- stable/8/share/man/man4/iscsi_initiator.4 Sun Jul 25 18:57:48 2010 (r210479) +++ stable/8/share/man/man4/iscsi_initiator.4 Sun Jul 25 20:00:15 2010 (r210480) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2007 +.Dd May 9, 2010 .Os .Dt ISCSI_INITIATOR 4 .Sh NAME @@ -48,34 +48,39 @@ iscsi_initiator_load="YES" The .Nm implements the kernel side of the Internet SCSI (iSCSI) network -protocol standard, the user land companion is +protocol standard. +The userland companion is .Xr iscontrol 8 , and permits access to remote .Em virtual SCSI devices via .Xr cam 4 . .Sh SYSCTL VARIABLES -.Bl -tag -width ".Va net.iscsi.n.targeaddress" +.Bl -tag -width "net.iscsi.n.targedaddress" .It Va debug.iscsi_initiator set the debug-level, 0 means no debugging, 9 for maximum. .It Va net.iscsi.isid the initiator part of the Session Identifier. -.It "the following are informative only:" +.El +.Pp +The following are informative only: +.Pp +.Bl -tag -width "net.iscsi.n.targedaddress" .It Va net.iscsi.driver_version the current version of the driver. .It Va net.iscsi.sessions the number of current active sessions. .It Va net.iscsi.n.targetname -is the targe name of session +the target name of session .Em n . -.It Va net.iscsi.n.targeaddress -is the IP address of the target of session +.It Va net.iscsi.n.targedaddress +the IP address of the target of session .Em n . .It Va net.iscsi.n.stats -are some statistics for session +statistics for session .EM n .It Va net.iscsi.n.pid -is the +the .Em "process id" of the userland side of session .Em n , From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 20:08:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52C71065673; Sun, 25 Jul 2010 20:08:07 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDA188FC1A; Sun, 25 Jul 2010 20:08:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PK87tM046995; Sun, 25 Jul 2010 20:08:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PK87K0046993; Sun, 25 Jul 2010 20:08:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201007252008.o6PK87K0046993@svn.freebsd.org> From: Christian Brueffer Date: Sun, 25 Jul 2010 20:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210481 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 20:08:08 -0000 Author: brueffer Date: Sun Jul 25 20:08:07 2010 New Revision: 210481 URL: http://svn.freebsd.org/changeset/base/210481 Log: MFC: r145251 Various wording, spelling and markup fixes. Modified: stable/7/share/man/man4/iscsi_initiator.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/iscsi_initiator.4 ============================================================================== --- stable/7/share/man/man4/iscsi_initiator.4 Sun Jul 25 20:00:15 2010 (r210480) +++ stable/7/share/man/man4/iscsi_initiator.4 Sun Jul 25 20:08:07 2010 (r210481) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2007 +.Dd May 9, 2010 .Os .Dt ISCSI_INITIATOR 4 .Sh NAME @@ -48,34 +48,39 @@ iscsi_initiator_load="YES" The .Nm implements the kernel side of the Internet SCSI (iSCSI) network -protocol standard, the user land companion is +protocol standard. +The userland companion is .Xr iscontrol 8 , and permits access to remote .Em virtual SCSI devices via .Xr cam 4 . .Sh SYSCTL VARIABLES -.Bl -tag -width ".Va net.iscsi.n.targeaddress" +.Bl -tag -width "net.iscsi.n.targedaddress" .It Va debug.iscsi_initiator set the debug-level, 0 means no debugging, 9 for maximum. .It Va net.iscsi.isid the initiator part of the Session Identifier. -.It "the following are informative only:" +.El +.Pp +The following are informative only: +.Pp +.Bl -tag -width "net.iscsi.n.targedaddress" .It Va net.iscsi.driver_version the current version of the driver. .It Va net.iscsi.sessions the number of current active sessions. .It Va net.iscsi.n.targetname -is the targe name of session +the target name of session .Em n . -.It Va net.iscsi.n.targeaddress -is the IP address of the target of session +.It Va net.iscsi.n.targedaddress +the IP address of the target of session .Em n . .It Va net.iscsi.n.stats -are some statistics for session +statistics for session .EM n .It Va net.iscsi.n.pid -is the +the .Em "process id" of the userland side of session .Em n , From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 20:17:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FB291065672 for ; Sun, 25 Jul 2010 20:17:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E52598FC1B for ; Sun, 25 Jul 2010 20:17:24 +0000 (UTC) Received: (qmail 19507 invoked by uid 399); 25 Jul 2010 20:17:23 -0000 Received: from localhost (HELO laptop.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 25 Jul 2010 20:17:23 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Sun, 25 Jul 2010 13:17:22 -0700 (PDT) From: Doug Barton To: Gabor Kovesdan In-Reply-To: <201007251857.o6PIvmoS031484@svn.freebsd.org> Message-ID: References: <201007251857.o6PIvmoS031484@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! OpenPGP: id=1A1ABC84 Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, delphij@freebsd.org Subject: Re: svn commit: r210479 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 20:17:25 -0000 On Sun, 25 Jul 2010, Gabor Kovesdan wrote: > Author: gabor > Date: Sun Jul 25 18:57:48 2010 > New Revision: 210479 > URL: http://svn.freebsd.org/changeset/base/210479 > > Log: > - Fix -l and -L by really surpressing output and just showing filenames > > Submitted by: swell.k@gmail.com .... and dougb. :) (It was part of the patch I sent on Friday.) And not to pile on, but regression testing should have caught this. First by you, and if all else fails, by your mentor. At very least the thought process could have gone something like: "Let's see, the patch that I/Gabor generated to fix this problem is different than the one Doug generated. Now Doug is not a _complete_ moron, so let's take a careful look at this change and see if it really does what we think it should do." Aside from the fact that despite its innocuous appearance grep really is an important tool; I've expressed frustration in the past that mentors are not in place to simply rubber stamp things. Mentors serve at least 2 critical functions; to introduce mentees to "The FreeBSD Culture," and to sanity-check changes. No matter how technically competent the mentee is (and obviously Gabor is a sharp guy) both of these functions are critical to their successful introduction into the wonderful world of DougBS^W I mean, uh, FreeBSD. :) Doug > Approved by: delphij (mentor) > > Modified: > head/usr.bin/grep/util.c > > Modified: head/usr.bin/grep/util.c > ============================================================================== > --- head/usr.bin/grep/util.c Sun Jul 25 18:32:59 2010 (r210478) > +++ head/usr.bin/grep/util.c Sun Jul 25 18:57:48 2010 (r210479) > @@ -343,7 +343,7 @@ procline(struct str *l, int nottext) > return (c); /* Binary file */ > > /* Dealing with the context */ > - if ((tail || c) && !cflag && !qflag) { > + if ((tail || c) && !cflag && !qflag && !lflag && !Lflag) { > if (c) { > if (!first && !prev && !tail && Aflag) > printf("--\n"); > > -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 20:19:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A7741065673; Sun, 25 Jul 2010 20:19:35 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 856478FC18; Sun, 25 Jul 2010 20:19:34 +0000 (UTC) Received: by fxm13 with SMTP id 13so6319726fxm.13 for ; Sun, 25 Jul 2010 13:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=4/xxEcb7ELmonPD+ek1aoSr6cGjHvijbymJykpQn/MI=; b=gBYbZqzpDqdXqtXFtuf8pMiFNYEKuaDUi14QpmK1gczeUJTiiJA/StZhG4rMpksdy4 XotW2xPq4j9SqtqiZjyuYy34tiZhYTfg38kqLz1rbwpGqImZfbOomIJVdHj6WUVSX41e 7yZGqxiz+t/Y9a21iAz7Hox36pwcBw1PmTMBM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=jEKVaHBqTxR98zgn2Bq6m7QZC6gkuQJHFXmg+mMBCIHIcqB55sCQ786041DKCNoq52 lZy8IvS/80yB2mi7STmfwB71wwzr+5/OCdD5IZedehJzJha4pfHFQ/CuJv917iXHfm9e IL2goQgjJo50aBuIE/kBMnkctexfjQ18Ki+YM= Received: by 10.223.122.195 with SMTP id m3mr5483212far.86.1280089173333; Sun, 25 Jul 2010 13:19:33 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id a9sm1069133faa.3.2010.07.25.13.19.32 (version=SSLv3 cipher=RC4-MD5); Sun, 25 Jul 2010 13:19:32 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4C9C0A.2030703@FreeBSD.org> Date: Sun, 25 Jul 2010 23:18:18 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Scott Long References: <201007251543.o6PFhrHp088504@svn.freebsd.org> <79B77F13-9802-4007-A565-28B76A0AAA88@samsco.org> In-Reply-To: <79B77F13-9802-4007-A565-28B76A0AAA88@samsco.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210471 - in head: sbin/camcontrol sys/cam sys/cam/ata sys/cam/scsi sys/dev/ahci sys/dev/ata sys/dev/mvs sys/dev/siis sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 20:19:35 -0000 Hi. Scott Long wrote: > I'm tired of CCB structure sizes changing willie nillie, whether in a CURRENT branch or not. This should have been a new CCB, not a add-on to an existing CCB. All your patch does it break binary compatibility. This only changes size of "struct ccb_pathinq", other structures are not affected, so driver ABI breakage is minimal. We did the same when adding maxio field. Do you think I should remake this? PS: Actually it was your words: "I think that there are reasonable ways to address this though, by having CAM SIMs provide a bit more information in their PATH_INQ response." > On Jul 25, 2010, at 9:43 AM, Alexander Motin wrote: >> Author: mav >> Date: Sun Jul 25 15:43:52 2010 >> New Revision: 210471 >> URL: http://svn.freebsd.org/changeset/base/210471 >> >> Log: >> Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers to >> GEOM. This information needed for proper soft-RAID's on-disk metadata >> reading and writing. >> >> Modified: >> head/sbin/camcontrol/camcontrol.c >> head/sys/cam/ata/ata_da.c >> head/sys/cam/cam_ccb.h >> head/sys/cam/scsi/scsi_cd.c >> head/sys/cam/scsi/scsi_da.c >> head/sys/dev/ahci/ahci.c >> head/sys/dev/ata/ata-all.c >> head/sys/dev/ata/ata-disk.c >> head/sys/dev/mvs/mvs.c >> head/sys/dev/siis/siis.c >> head/sys/geom/geom_disk.c >> head/sys/geom/geom_disk.h -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 20:21:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E771E106566B; Sun, 25 Jul 2010 20:21:32 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03BEF8FC19; Sun, 25 Jul 2010 20:21:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PKLWFK050012; Sun, 25 Jul 2010 20:21:32 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PKLWvw050010; Sun, 25 Jul 2010 20:21:32 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007252021.o6PKLWvw050010@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 25 Jul 2010 20:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210482 - head/share/examples/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 20:21:33 -0000 Author: bcr (doc committer) Date: Sun Jul 25 20:21:32 2010 New Revision: 210482 URL: http://svn.freebsd.org/changeset/base/210482 Log: Add an example to encourage people to have a look at either make(1) or /usr/ports/ports-mgmt/portconf for port-specific variables/options to compile a port. PR: docs/145655 Submitted by: Armin Pirkovitsch (armin at frozen dash zone dot org) Discussed with: dougb MFC after: 7 days Modified: head/share/examples/etc/make.conf Modified: head/share/examples/etc/make.conf ============================================================================== --- head/share/examples/etc/make.conf Sun Jul 25 20:08:07 2010 (r210481) +++ head/share/examples/etc/make.conf Sun Jul 25 20:21:32 2010 (r210482) @@ -269,3 +269,14 @@ # /etc/mail/Makefile. Defaults to 0640. # #SENDMAIL_MAP_PERMS= +# +# +# It is also possible to set variables in make.conf which will only be +# used when compiling a specific port. For more details see make(1). +# +#.if ${.CURDIR:M*/irc/irssi-devel*} +#WITH_DEBUG=YES +#.endif +# +# Another approach is to use /usr/ports/ports-mgmt/portconf which has +# its own config file for port specific options. From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 20:40:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8367B106566B; Sun, 25 Jul 2010 20:40:34 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 1CAB28FC16; Sun, 25 Jul 2010 20:40:33 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 96E4514DC2E1; Sun, 25 Jul 2010 22:40:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id czZ6QDTnucSm; Sun, 25 Jul 2010 22:40:30 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id C1A2D14DC212; Sun, 25 Jul 2010 22:40:29 +0200 (CEST) Message-ID: <4C4CA13C.1090502@FreeBSD.org> Date: Sun, 25 Jul 2010 22:40:28 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Doug Barton References: <201007251857.o6PIvmoS031484@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, delphij@freebsd.org Subject: Re: svn commit: r210479 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 20:40:34 -0000 Em 2010.07.25. 22:17, Doug Barton escreveu: > On Sun, 25 Jul 2010, Gabor Kovesdan wrote: > >> Author: gabor >> Date: Sun Jul 25 18:57:48 2010 >> New Revision: 210479 >> URL: http://svn.freebsd.org/changeset/base/210479 >> >> Log: >> - Fix -l and -L by really surpressing output and just showing filenames >> >> Submitted by: swell.k@gmail.com > > .... and dougb. :) (It was part of the patch I sent on Friday.) I had to merge your patch with another one that I had in my working copy and I didn't catch this part. Sorry for that, it was my mistake. > > And not to pile on, but regression testing should have caught this. > First by you, and if all else fails, by your mentor. At very least the > thought process could have gone something like: "Let's see, the patch > that I/Gabor generated to fix this problem is different than the one > Doug generated. Now Doug is not a _complete_ moron, so let's take a > careful look at this change and see if it really does what we think it > should do." Nobody told that you were a moron and I did run regression testing, the test suite that GNU grep has. It passes a good number of them and some only fail because of their non-standard regexes and GNU-specific idiotism, like whether gnu --help contains the "Report bugs to ." . Even the GNU version that we have in base fails on 6 tests of latest GNU grep's test suite. Regression testing is good but sometimes real users are necessary to axe out bugs and I think we are going into the right direction and I still don't consider importing BSD grep a mistake. Bugs might appear but as you can see I'm trying to fix them asap and grep is improving in this way. Although grep seems to be a little silly utility on the top of the regex library, it's quite complex and it involves a lot of things, like the GNU regex syntax. That's why it took so long to get it to base. There were 4 exp-runs and varios CFTs but these bugs haven't been found so far so I think this broader exposure was quite a good decision. > > Aside from the fact that despite its innocuous appearance grep really > is an important tool; I've expressed frustration in the past that > mentors are not in place to simply rubber stamp things. Mentors serve > at least 2 critical functions; to introduce mentees to "The FreeBSD > Culture," and to sanity-check changes. No matter how technically > competent the mentee is (and obviously Gabor is a sharp guy) both of > these functions are critical to their successful introduction into the > wonderful world of DougBS^W I mean, uh, FreeBSD. :) My mentor really helped a lot and made lots of suggestions to improve the code but he's also a human being, he can't see everything either. :) These bugs survived lots of testing and review so it's not a surprise that he didn't found them either. Let's not flame about it any more just concentrate on bugfixing. Please send me more reports if you find anything. Gabor From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 21:19:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B271065679 for ; Sun, 25 Jul 2010 21:19:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8DF578FC20 for ; Sun, 25 Jul 2010 21:19:41 +0000 (UTC) Received: (qmail 2748 invoked by uid 399); 25 Jul 2010 21:19:40 -0000 Received: from localhost (HELO laptop.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 25 Jul 2010 21:19:40 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Sun, 25 Jul 2010 14:19:38 -0700 (PDT) From: Doug Barton To: Gabor Kovesdan In-Reply-To: <4C4CA13C.1090502@FreeBSD.org> Message-ID: References: <201007251857.o6PIvmoS031484@svn.freebsd.org> <4C4CA13C.1090502@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! OpenPGP: id=1A1ABC84 Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, delphij@freebsd.org Subject: Re: svn commit: r210479 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 21:19:41 -0000 On Sun, 25 Jul 2010, Gabor Kovesdan wrote: > Em 2010.07.25. 22:17, Doug Barton escreveu: >> On Sun, 25 Jul 2010, Gabor Kovesdan wrote: >> >>> Author: gabor >>> Date: Sun Jul 25 18:57:48 2010 >>> New Revision: 210479 >>> URL: http://svn.freebsd.org/changeset/base/210479 >>> >>> Log: >>> - Fix -l and -L by really surpressing output and just showing filenames >>> >>> Submitted by: swell.k@gmail.com >> >> .... and dougb. :) (It was part of the patch I sent on Friday.) > I had to merge your patch with another one that I had in my working copy and > I didn't catch this part. Sorry for that, it was my mistake. Everyone makes mistakes, sure. My argument here is that A) grep is too important a utility for mistakes like this to be acceptable, and B) your mentor should have caught this. >> And not to pile on, but regression testing should have caught this. First >> by you, and if all else fails, by your mentor. At very least the thought >> process could have gone something like: "Let's see, the patch that I/Gabor >> generated to fix this problem is different than the one Doug generated. Now >> Doug is not a _complete_ moron, so let's take a careful look at this change >> and see if it really does what we think it should do." > > Nobody told that you were a moron YOU didn't, nor did your mentor, however your statement is not literally correct. :) Seriously though, that was just a bit of humor. > and I did run regression testing, the test suite that GNU grep has. I think it's great that you did that, however given that you were changing the behavior of the -q and -l options you should ALSO have set up a simple test file and done: grep blah testfile grep -l blah testfile grep -q blah testfile ; echo $? grep -ql blah testfile ; echo $? grep -qL blah testfile ; echo $? and made sure that everything worked as expected ... and so should your mentor. > Regression testing is good but sometimes real users are necessary to > axe out bugs I already both conceded, and offered you my sympathy on this point. :) > and I think we are going into the right direction and I still don't > consider importing BSD grep a mistake. I never said that importing it was a mistake. I said making it the default before it had wider testing was a mistake, but that we have yet to see whether it was a mistake that needs to be corrected or not. And just to be clear, the reason I'm speaking up about this is that there is a risk that the NEXT project that comes along and gets put into HEAD as the default right away actually DOES break a whole lot of stuff. It may very well be that making bsdgrep the default from the start was acceptable. But nothing would have been seriously harmed if the typical procedure were followed, and the bugs that were found would only have impacted those who chose to opt in. > Bugs might appear but as you can see I'm trying to fix them asap Yes, I think you've done a good job of being accessible and responsive, thanks for that. > and grep is improving in this way. Although grep seems to be a little > silly utility on the top of the regex library, it's quite complex and > it involves a lot of things, As I've said before, I actually agree with you on this point. It's also one of those things that you don't realize how important it is until it's not working quite right. :) You've got nerves of steel for taking this project on in the first place. > Let's not flame about it any more just concentrate on bugfixing. Just to be clear here, I'm not flaming at all. I'm not calling you names, or insulting your parentage. I'm expressing what I think are legitimate concerns that apply not only to this project, but to the paradigm of introducing similar projects down the road. And to be even more clear, I think that introducing more bsd-licensed utilities is a great thing, and I'm very excited to see that there are more such projects in the works. That makes it even MORE important to make sure that we all understand the importance of introducing them into the base in a manner that is minimally disruptive. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 21:32:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7F37106566B; Sun, 25 Jul 2010 21:32:46 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89C668FC0A; Sun, 25 Jul 2010 21:32:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PLWkWj065816; Sun, 25 Jul 2010 21:32:46 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PLWkbf065813; Sun, 25 Jul 2010 21:32:46 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007252132.o6PLWkbf065813@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 21:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210483 - in stable/8/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 21:32:46 -0000 Author: gavin Date: Sun Jul 25 21:32:46 2010 New Revision: 210483 URL: http://svn.freebsd.org/changeset/base/210483 Log: Merge r209445 from head (original commit by thompsa): Add a mass storage quirk. PR: usb/147196 Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Jul 25 20:21:32 2010 (r210482) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Sun Jul 25 21:32:46 2010 (r210483) @@ -450,6 +450,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ASUS, GMSC, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(UNKNOWN4, USBMEMSTICK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(UNKNOWN5, USB2IDEBRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), }; #undef USB_QUIRK_VP #undef USB_QUIRK Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jul 25 20:21:32 2010 (r210482) +++ stable/8/sys/dev/usb/usbdevs Sun Jul 25 21:32:46 2010 (r210483) @@ -407,6 +407,7 @@ vendor ARASAN 0x07da Arasan Chip System vendor ALLIEDCABLE 0x07e6 Allied Cable vendor STSN 0x07ef STSN vendor CENTURY 0x07f7 Century Corp +vendor UNKNOWN5 0x07ff Unknown vendor ZOOM 0x0803 Zoom Telephonics vendor PCS 0x0810 Personal Communication Systems vendor ALPHASMART 0x081e AlphaSmart, Inc. @@ -3052,6 +3053,9 @@ product UNIACCESS PANACHE 0x0101 Panache /* Unknown vendors */ product UNKNOWN4 USBMEMSTICK 0x6025 Flash Disk CBM +/* Unknown vendors */ +product UNKNOWN5 USB2IDEBRIDGE 0x00ff USB 2.0 ATA/SATA Bridge + /* U.S. Robotics products */ product USR USR5423 0x0121 USR5423 WLAN From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 21:35:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7E7B106564A; Sun, 25 Jul 2010 21:35:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4898FC23; Sun, 25 Jul 2010 21:35:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PLZwPW066567; Sun, 25 Jul 2010 21:35:58 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PLZuQo066565; Sun, 25 Jul 2010 21:35:56 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201007252135.o6PLZuQo066565@svn.freebsd.org> From: Doug Barton Date: Sun, 25 Jul 2010 21:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210484 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 21:35:58 -0000 Author: dougb Date: Sun Jul 25 21:35:56 2010 New Revision: 210484 URL: http://svn.freebsd.org/changeset/base/210484 Log: Correct a Cecil Beaton quote PR: docs/148916 Submitted by: Rob Farmer Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Sun Jul 25 21:32:46 2010 (r210483) +++ head/games/fortune/datfiles/fortunes Sun Jul 25 21:35:56 2010 (r210484) @@ -37880,7 +37880,7 @@ behave very differently from those who n order to get power we would have to become very much like them. (Lenin's fatal mistake, both in theory and in practice.) % -Perhaps the world's second words crime is boredom. The first is +Perhaps the world's second-worst crime is boredom. The first is being a bore. -- Cecil Beaton % From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 21:38:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 079DB106566C; Sun, 25 Jul 2010 21:38:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE7C8FC12; Sun, 25 Jul 2010 21:38:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PLcMDo067126; Sun, 25 Jul 2010 21:38:22 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PLcMa4067123; Sun, 25 Jul 2010 21:38:22 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007252138.o6PLcMa4067123@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 21:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210485 - in stable/8/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 21:38:23 -0000 Author: gavin Date: Sun Jul 25 21:38:22 2010 New Revision: 210485 URL: http://svn.freebsd.org/changeset/base/210485 Log: Merge r209447 (by thompsa) from head: Add new device id. PR: usb/147190 Modified: stable/8/sys/dev/usb/usbdevs stable/8/sys/dev/usb/wlan/if_upgt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Jul 25 21:35:56 2010 (r210484) +++ stable/8/sys/dev/usb/usbdevs Sun Jul 25 21:38:22 2010 (r210485) @@ -3057,6 +3057,7 @@ product UNKNOWN4 USBMEMSTICK 0x6025 Flas product UNKNOWN5 USB2IDEBRIDGE 0x00ff USB 2.0 ATA/SATA Bridge /* U.S. Robotics products */ +product USR USR5422 0x0118 USR5422 WLAN product USR USR5423 0x0121 USR5423 WLAN /* VIA Technologies products */ Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Sun Jul 25 21:35:56 2010 (r210484) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Sun Jul 25 21:38:22 2010 (r210485) @@ -184,6 +184,7 @@ static const struct usb_device_id upgt_d UPGT_DEV(GLOBESPAN, PRISM_GT_2), UPGT_DEV(INTERSIL, PRISM_GT), UPGT_DEV(SMC, 2862WG), + UPGT_DEV(USR, USR5422), UPGT_DEV(WISTRONNEWEB, UR045G), UPGT_DEV(XYRATEX, PRISM_GT_1), UPGT_DEV(XYRATEX, PRISM_GT_2), From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 21:56:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C355106566C; Sun, 25 Jul 2010 21:56:35 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 498018FC0A; Sun, 25 Jul 2010 21:56:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PLuZUX071123; Sun, 25 Jul 2010 21:56:35 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PLuZlf071119; Sun, 25 Jul 2010 21:56:35 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007252156.o6PLuZlf071119@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 21:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210486 - in vendor/tnftp/dist: . buildaux libedit libedit/readline libnetbsd src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 21:56:35 -0000 Author: gavin Date: Sun Jul 25 21:56:34 2010 New Revision: 210486 URL: http://svn.freebsd.org/changeset/base/210486 Log: Vendor import of tnftp-20100108. Added: vendor/tnftp/dist/ vendor/tnftp/dist/COPYING (contents, props changed) vendor/tnftp/dist/ChangeLog (contents, props changed) vendor/tnftp/dist/INSTALL (contents, props changed) vendor/tnftp/dist/Makefile.am (contents, props changed) vendor/tnftp/dist/Makefile.in (contents, props changed) vendor/tnftp/dist/NEWS (contents, props changed) vendor/tnftp/dist/README (contents, props changed) vendor/tnftp/dist/THANKS (contents, props changed) vendor/tnftp/dist/aclocal.m4 (contents, props changed) vendor/tnftp/dist/buildaux/ vendor/tnftp/dist/buildaux/config.guess (contents, props changed) vendor/tnftp/dist/buildaux/config.sub (contents, props changed) vendor/tnftp/dist/buildaux/depcomp (contents, props changed) vendor/tnftp/dist/buildaux/install-sh (contents, props changed) vendor/tnftp/dist/buildaux/ltmain.sh (contents, props changed) vendor/tnftp/dist/buildaux/missing (contents, props changed) vendor/tnftp/dist/configure (contents, props changed) vendor/tnftp/dist/configure.ac (contents, props changed) vendor/tnftp/dist/libedit/ vendor/tnftp/dist/libedit/Makefile.am (contents, props changed) vendor/tnftp/dist/libedit/Makefile.in (contents, props changed) vendor/tnftp/dist/libedit/chared.c (contents, props changed) vendor/tnftp/dist/libedit/chared.h (contents, props changed) vendor/tnftp/dist/libedit/common.c (contents, props changed) vendor/tnftp/dist/libedit/editline.3 (contents, props changed) vendor/tnftp/dist/libedit/editrc.5 (contents, props changed) vendor/tnftp/dist/libedit/el.c (contents, props changed) vendor/tnftp/dist/libedit/el.h (contents, props changed) vendor/tnftp/dist/libedit/emacs.c (contents, props changed) vendor/tnftp/dist/libedit/filecomplete.c (contents, props changed) vendor/tnftp/dist/libedit/filecomplete.h (contents, props changed) vendor/tnftp/dist/libedit/hist.c (contents, props changed) vendor/tnftp/dist/libedit/hist.h (contents, props changed) vendor/tnftp/dist/libedit/histedit.h (contents, props changed) vendor/tnftp/dist/libedit/history.c (contents, props changed) vendor/tnftp/dist/libedit/key.c (contents, props changed) vendor/tnftp/dist/libedit/key.h (contents, props changed) vendor/tnftp/dist/libedit/makelist.in (contents, props changed) vendor/tnftp/dist/libedit/map.c (contents, props changed) vendor/tnftp/dist/libedit/map.h (contents, props changed) vendor/tnftp/dist/libedit/parse.c (contents, props changed) vendor/tnftp/dist/libedit/parse.h (contents, props changed) vendor/tnftp/dist/libedit/prompt.c (contents, props changed) vendor/tnftp/dist/libedit/prompt.h (contents, props changed) vendor/tnftp/dist/libedit/read.c (contents, props changed) vendor/tnftp/dist/libedit/read.h (contents, props changed) vendor/tnftp/dist/libedit/readline/ vendor/tnftp/dist/libedit/readline.c (contents, props changed) vendor/tnftp/dist/libedit/readline/readline.h (contents, props changed) vendor/tnftp/dist/libedit/refresh.c (contents, props changed) vendor/tnftp/dist/libedit/refresh.h (contents, props changed) vendor/tnftp/dist/libedit/search.c (contents, props changed) vendor/tnftp/dist/libedit/search.h (contents, props changed) vendor/tnftp/dist/libedit/sig.c (contents, props changed) vendor/tnftp/dist/libedit/sig.h (contents, props changed) vendor/tnftp/dist/libedit/sys.h (contents, props changed) vendor/tnftp/dist/libedit/term.c (contents, props changed) vendor/tnftp/dist/libedit/term.h (contents, props changed) vendor/tnftp/dist/libedit/tokenizer.c (contents, props changed) vendor/tnftp/dist/libedit/tty.c (contents, props changed) vendor/tnftp/dist/libedit/tty.h (contents, props changed) vendor/tnftp/dist/libedit/vi.c (contents, props changed) vendor/tnftp/dist/libnetbsd/ vendor/tnftp/dist/libnetbsd/Makefile.am (contents, props changed) vendor/tnftp/dist/libnetbsd/Makefile.in (contents, props changed) vendor/tnftp/dist/libnetbsd/dirname.c (contents, props changed) vendor/tnftp/dist/libnetbsd/err.c (contents, props changed) vendor/tnftp/dist/libnetbsd/fgetln.c (contents, props changed) vendor/tnftp/dist/libnetbsd/fseeko.c (contents, props changed) vendor/tnftp/dist/libnetbsd/ftpglob.h (contents, props changed) vendor/tnftp/dist/libnetbsd/ftpvis.h (contents, props changed) vendor/tnftp/dist/libnetbsd/getaddrinfo.c (contents, props changed) vendor/tnftp/dist/libnetbsd/getnameinfo.c (contents, props changed) vendor/tnftp/dist/libnetbsd/glob.c (contents, props changed) vendor/tnftp/dist/libnetbsd/inet_ntop.c (contents, props changed) vendor/tnftp/dist/libnetbsd/inet_pton.c (contents, props changed) vendor/tnftp/dist/libnetbsd/mkstemp.c (contents, props changed) vendor/tnftp/dist/libnetbsd/setprogname.c (contents, props changed) vendor/tnftp/dist/libnetbsd/sl_init.c (contents, props changed) vendor/tnftp/dist/libnetbsd/snprintf.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strdup.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strerror.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strlcat.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strlcpy.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strptime.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strsep.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strtoll.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strunvis.c (contents, props changed) vendor/tnftp/dist/libnetbsd/strvis.c (contents, props changed) vendor/tnftp/dist/libnetbsd/timegm.c (contents, props changed) vendor/tnftp/dist/libnetbsd/usleep.c (contents, props changed) vendor/tnftp/dist/libnetbsd/utimes.c (contents, props changed) vendor/tnftp/dist/src/ vendor/tnftp/dist/src/Makefile.am (contents, props changed) vendor/tnftp/dist/src/Makefile.in (contents, props changed) vendor/tnftp/dist/src/cmds.c (contents, props changed) vendor/tnftp/dist/src/cmdtab.c (contents, props changed) vendor/tnftp/dist/src/complete.c (contents, props changed) vendor/tnftp/dist/src/domacro.c (contents, props changed) vendor/tnftp/dist/src/extern.h (contents, props changed) vendor/tnftp/dist/src/fetch.c (contents, props changed) vendor/tnftp/dist/src/ftp.1 (contents, props changed) vendor/tnftp/dist/src/ftp.c (contents, props changed) vendor/tnftp/dist/src/ftp_var.h (contents, props changed) vendor/tnftp/dist/src/main.c (contents, props changed) vendor/tnftp/dist/src/progressbar.c (contents, props changed) vendor/tnftp/dist/src/progressbar.h (contents, props changed) vendor/tnftp/dist/src/ruserpass.c (contents, props changed) vendor/tnftp/dist/src/util.c (contents, props changed) vendor/tnftp/dist/src/version.h (contents, props changed) vendor/tnftp/dist/tnftp.h (contents, props changed) vendor/tnftp/dist/tnftp_config.h.in (contents, props changed) vendor/tnftp/dist/todo (contents, props changed) Added: vendor/tnftp/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tnftp/dist/COPYING Sun Jul 25 21:56:34 2010 (r210486) @@ -0,0 +1,59 @@ +$NetBSD: COPYING,v 1.7 2010/01/12 07:01:01 lukem Exp $ + +Copyright (c) 2001-2010 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Simon Burge, Luke Mewburn, and Christos Zoulas. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the NetBSD + Foundation, Inc. and its contributors. +4. Neither the name of The NetBSD Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +This product also contains software developed by other people, and you +are advised to read the various source files to read the full details +of the other licenses. Those licenses also require the following +acknowledgements: + + This product includes software developed by the NetBSD Foundation, + Inc. and its contributors. Those contributors include: + - Simon Burge + - Jaromir Dolecek + - Klaus Klein + - Luke Mewburn + - Jason R. Thorpe of the Numerical Aerospace Simulation + Facility, NASA Ames Research Center. + - Christos Zoulas + + This product includes software developed by the University of + California, Berkeley and its contributors. Those contributors include: + - Christos Zoulas of Cornell University. + - Guido van Rossum. + + This product includes software developed by Christos Zoulas. + Added: vendor/tnftp/dist/ChangeLog ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tnftp/dist/ChangeLog Sun Jul 25 21:56:34 2010 (r210486) @@ -0,0 +1,1794 @@ +$NetBSD: ChangeLog,v 1.58 2010/01/12 06:58:57 lukem Exp $ + +Tue Jan 12 06:58:15 UTC 2010 lukem + + * Release as "tnftp 20100108" + + * Rename onoff() argument "bool" to "val". + +Tue Jan 5 09:12:01 UTC 2010 lukem + + * If ARG_MAX isn't defined, use the result from sysconf(_SC_ARG_MAX). + Fixes build when using newer glibc. + + * Add libnetbsd.la to the LIBADD for libedit. + Fix provided by Adam Sampson. + +Mon Jan 4 06:28:07 UTC 2010 lukem + + * Distribute various files not shipped by default automake rules, + to use 'make dist' instead of 'cvs export'. + +Wed Dec 30 00:12:47 UTC 2009 lukem + + * Release as "tnftp 20091122" + +Sun Nov 15 10:14:44 UTC 2009 lukem + + * Merge NetBSD ftp from 20090520 to 20090915. Change: + - Rename internal getline() to get_line() to avoid + conflict with libc with former. + - Avoid a NULL dereference in an error message. + +Sat Nov 14 09:21:19 UTC 2009 lukem + + * Convert to automake & libtool. + +Sat Jun 6 07:17:38 UTC 2009 lukem + + * Release as "tnftp 20090606" + +Fri May 22 01:11:15 UTC 2009 lukem + + * configure fixes: + - Add the time.h headers to accheck_includes, for the strptime check. + - Remove the check for el_init in libedit; we're always replacing + the library and the presence of strvis() in some versions + confuses other checks. + +Wed May 20 13:47:43 UTC 2009 lukem + + * Release as "tnftp 20090520" + + * Merge NetBSD ftp from 20070722 to 20090520. Changes: + - Only attempt to el_parse() a command unknown by the default + parser if editing is enabled. + Fixes PR 38589. + - Turn off the alarmtimer before resetting the SIGALRM handler + back to SIG_DFL. + Fixes PR 35630. + - Add epsv6 and epsv to disable extended passive mode for ipv6 or + both ipv4 and ipv6 respectively. This hack is due to our + friends a Juniper Networks who break epsv in ipv6. + Should be fixed in ScreenOS 6.2.X. + - Improve parsing of chunked transfer chunks per RFC2616: + - more stringent chunk-size parsing + - ignore optional trailing ';chunk-ext' stuff, instead of barfing + - detect EOF before final \r\n. + - Use the service name to getaddrinfo() (along with the host + name), so that features such as DNS Service Discovery have a + better chance of working. + Display the service name in various status & error messages. + - Don't getservbyname() the :port component of a URL; RFC 3986 + says it's just an unsigned number, not a service name. + - Fix numerous WARNS=4 issues (-Wcast-qual -Wsign-compare). + - Fix -Wshadow issues + - Update copyrights + - Remove clause 3 and 4 from TNF licenses + - Rename HAVE_STRUCT_SOCKADDR_SA_LEN to + HAVE_STRUCT_SOCKADDR_IN_SIN_LEN to accurately reflect the + structure member being used. + - Use AF_INET instead of AF_UNSPEC as the default family if + !defined(INET6). + + * configure improvements: + - Style tweaks. + - Use AC_LANG_PROGRAM() instead of AC_LANG_SOURCE() + - Add a check for strptime() requiring separators between + conversions, and use our replacement one if it does. + +Sat Dec 20 15:28:24 UTC 2008 lukem + + * configure improvements: + - Move IPv6 check from tnftp.h to configure.ac (as per tnftpd). + - Rework option descriptions. + - Highlight when tests are for a specific option. + - Move configuration results to the end of the file. + - Display $prefix in configure results. + +Fri Aug 15 03:03:36 UTC 2008 lukem + + * Add a "Configuration results" display at the end of configure. + Cosmetic tweaks. + +Fri Feb 29 09:45:56 UTC 2008 lukem + + * Support @EXEEXT@ for Cygwin (etc). + +Mon Aug 6 04:55:19 UTC 2007 lukem + + * Release as "tnftp 20070806" + + * Add a NEWS file. + + * Reduce differences between NetBSD-ftp and local copy. + + * Merge NetBSD ftp from 20070605 to 20070722. + Changes: + - Document about:ftp and about:version. + + * Add autoconf check for (Dante) SOCKS5. + (Needs run-time testing and more portability testing.) + +Mon Jul 23 11:44:42 UTC 2007 lukem + + * Don't use non-standard: u_char u_short u_int. + Use uint32_t instead of u_int32_t. + + * Consistently use AS_CASE() and AS_IF() in configure.ac. + + * Don't use defined() with HAVE_DECL_xxx. + Use `LL' instead of `L' suffix for fallback + defines of LLONG_MIN and LLONG_MAX. + +Sun Jul 22 12:00:17 UTC 2007 lukem + + * Include if available, and provide fallback #defines. + + * Sync with lib/libc/inet/inet_pton.c 1.3: + * Sync to bind 9.3.x version + * Update ISC copyright + * Fix some lint + + * Sync with lib/libc/inet/inet_ntop.c 1.3: + * Sync to bind 9.3.x version + * Update ISC copyright + * Use socklen_t instead of size_t + * Use snprintf() instead of SPRINTF() + * Improve detection of various boundary conditions + + * Sync to NetBSD glob.h 1.21, glob.c 1.16: + * Standards compliance fix + * De-lint + * Don't overflow when DEBUG is defined. + + * Sync fgetln.c to tools/compat/fgetln.c 1.7: + * Clause 3 removal. + + * Sync to config.guess 2007-07-22, config.sub 2007-06-28. + + * Consistency tweaks in configure help strings. + + * Add check for struct sockaddr.sa_len. + Change tests for HAVE_foo to defined(HAVE_foo). + Replace HAVE_SOCKADDR_SA_LEN with HAVE_STRUCT_SOCKADDR_SA_LEN. + + * Remove pretence of supporting SOCKS for now; + no test system is available, and the old + autoconf 2.13 support wasn't upgraded to 2.61. + + * configure.ac style consistency tweaks. + Move autoconf aux files from ./ to build-aux/ + + * Remove duplicate HAVE_STRERROR replacement in tnftp.h. + +Thu Jun 7 04:47:47 UTC 2007 lukem + + * Merge NetBSD ftp from 20070510 to 20070605. Changes: + - Enforce restriction that (http) proxied URL fetchs don't + support being restarted at this time. + Addresses NetBSD Problem Report 28697. + - Display times in RFC2822 form rather than using ctime(3), + since the former is more explicit about the timezone offset. + - main: call tzset() to ensure TZ is setup for other + functions. + - remotemodtime(): use strptime() to parse the reply. + - fetch_url(): ensure struct tm is zeroed before calling + strptime(). + - Modify parse_url() to consistently strip the leading `/' + off ftp URLs. + Fixes NetBSD Problem Report 17617. + - Use 'RFCnnnn' (with leading 0) instead of 'RFC nnnn', to be + consistent with the style in the RFC index. + - Refer to RFC3916 instead of 1738 or 2732. + - Expand the list of supported RFCs in ftp(1) to contain the + document name as well. + +Fri May 11 04:39:55 UTC 2007 lukem + + * Update INSTALL and COPYING. + + * Rename HAVE_QUAD_SUPPORT to HAVE_PRINTF_LONG_LONG, and only + require support for 'long long' in that check rather than + needing sizeof(off_t)>=8, as some systems have a separate + off64_t when Large File Support is enabled. + + * config.guess: treat 'i86xen:SunOS:5.*' as 'i86pc:SunOS:5.*' + +Thu May 10 15:23:33 UTC 2007 lukem + + * Remove checks for util.h and libutil.h, and replacement for + fparseln(), since fparseln() isn't used any more. + + * Merge NetBSD ftp from 20070418 to 20070510. Changes: + - Switch from fparseln() to the internal getline() when + parsing HTTP headers. Makes ftp a bit more portable + (not needing fparseln()) at the expense of not supporting + arbitrary long header lines, which I'm not concerned about + because we don't support header line continuation either... + - Replace references from draft-ietf-ftpext-mlst-NN to RFC 3659. + - Fix misplaced const. + - Implement copy_bytes() to copy bytes from one fd to another + via the provided buffer, with optional rate-limiting and + hash-mark printing, using one loop and handle short writes. + Refactor sendrequest() and recvrequest() to use copy_data(). + Addresses NetBSD Problem Report 15943. + +Wed May 9 05:24:55 UTC 2007 lukem + + * Fix typo in poll()-based implementation of usleep() replacement. + +Wed May 9 04:58:50 UTC 2007 lukem + + * Rename configure.in to configure.ac, as the latter is the + preferred name in autoconf 2.61. + + * Convert from autoconf 2.13 to 2.61: + * Use a consistent quoting mechanism. + * Use modern autoconf macros, #define names, etc. + * Search for more header files, and only #include if found. + * Remove old-style config.h.in generation. + This may fix various tests on platforms such as FreeBSD and OS X. + + * Add -Wl,-search_paths_first to LDFLAGS on OS X (Darwin) if the + linker supports it. This is needed so we use our libedit + rather than the system one. + + XXX: SOCKS support is currently disabled until I update the + autoconf support. + +Mon Apr 23 06:04:26 UTC 2007 lukem + + * Merge NetBSD ftp from 20050610 to 20070418. Changes: + - Add '-s srcaddr'. + - Use IEC 60027-2 2^N based "KiB", "MiB" (etc) instead of + 10^n "KB", "MB", ... + - Recognize 307 redirect code. + - Suppress printing non-COMPLETE reply strings when EPSV/EPRT + fails and we fall-back to PASV/PORT. Should fix a problem + with the emacs ftp wrapper. + - Fix display of 'Continue with ' messages. + - Prevent segfaults in .netrc parsing. + - Flush stdout before each command; ftp as slave process on + a pipe should work. + - getpass() can return NULL in some implementations; cope. + - Support '-q quittime' when waiting for server replies. + - Various spelling & grammatical fixes in the manual. + - Plug some memory leaks. + - If a file upload (via -u) fails, return an non-zero exit + value based on the index of the file that caused the + problem (a la auto-fetch retrieval). + - Coverity fixes for CIDs: 873 874 875 1447 1448 2194 2195 3610 + - Don't remove trailing character during auth_url() + - Fix progressbar display on narrow terminals (<43 columns) + +Fri Mar 16 06:00:14 UTC 2007 lukem + + * Change the return value of the replacement gai_strerror() + from "char *" to "const char *", to match the current + standards. + Problem noted by Thomas Klausner. + +Thu Oct 26 07:24:22 UTC 2006 lukem + + * Correctly parse "AM" and "PM" in the replacement strptime(). + Problem noted by Kathryn Hogg. + +Sat Jun 25 06:27:00 UTC 2005 lukem + + * Release as "tnftp 20050625" + + * Simplify the detection & replacement of dirname() and fparseln() + and just use AC_REPLACE_FUNCS. + (We don't care if the vendor has a working version in -lgen or -lutil + instead of -lc; they'll get our replacement version in that case). + Fixes build issue on older Darwin where the previous autoconf check + wouldn't find dirname() in the default system libraries. + + * Only provide a prototype for dirname() if we can't find one in + + + * Search for NS_IN6ADDRSZ instead of IN6ADDRSZ, since we use the + former and not the latter and older Darwin has the former. + (This allows INET6 support to be enabled on Darwin 7.9.0) + +Mon Jun 13 09:22:13 UTC 2005 lukem + + * Tweak SOCKS5 support: + acconfig.h: + - fix a comment + - ensure close() is replaced + - list entries in the same order as aclocal.m4 + (and the SOCKS5 FAQ) + aclocal.m4: + - ensure getpeername() is replaced + - don't replace listen() twice + +Fri Jun 10 04:39:33 UTC 2005 lukem + + * Release as "tnftp 20050610" + + * Add dependencies on ${srcdir}/../tnftp.h and ../config.h + + * Merge NetBSD ftp from 20050609 to 20050610. Changes: + - Implement getline() to read a line into a buffer. + - Convert to use getline() instead of fgets() whenever reading + user input to ensure that an overly long input line doesn't + leave excess characters for the next input operation to + accidentally use as input. + - Zero out the password & account after we've finished with it. + - Consistently use getpass(3) (i.e, character echo suppressed) + when reading the account data. For some reason, historically + the "login" code suppressed echo for Account: yet the "user" + command did not! + - Display the hostname in the "getaddrinfo failed" warning. + - Appease some -Wcast-qual warnings. Fixing all of these + requires significant code refactoring. (mmm, legacy code). + +Thu Jun 9 16:49:05 UTC 2005 lukem + + * src, libnetbsd: Excise RCSID block, rather than using + #if 0 ... #endif. The point was to minimise RCSID + conflicts, and the latter isn't helping there. + + * Merge NetBSD ftp from 20050531 to 20050609. Changes: + - Only print the "Trying
..." message if verbose + and there's more than one struct addrinfo in the + getaddrinfo() result. + - Don't use non-standard "u_int". + +Wed Jun 1 15:08:01 UTC 2005 lukem + + * Look for dirname(3), which may be in -lgen on IRIX, and + replace it if not found.. + +Wed Jun 1 11:48:58 UTC 2005 lukem + + * libnetbsd: + - Don't use non-standard: u_char u_short u_int. + - Use uint32_t instead of u_int32_t. + - Don't use register. + + * libedit: Don't use non-standard uint or u_int. + +Tue May 31 02:23:08 UTC 2005 lukem + + * tnftp.h: need for dirname(3) + + * Merge ftp from 20050513 to 20050531. Changes: + - Helps if the definition of xconnect() matches its + declaration.... + - Fix some cast issues highlighted by Scott Reynolds using + gcc 4 on OSX.4 + - Use size_t instead of int where appropriate. + - Make this compile on sparc64 (size_t != int). + - Printf field widths and size_t don't always mix well, so + cast to int. Fixes build problem for alpha. + - Some const cleanups. + - tab cleanup + - Improve method used in fileindir() to determine if `file' + is in or under `dir': realpath(3) on non-NetBSD systems may + fail if the target filename doesn't exist, so instead use + realpath(3) on the parent directory of `file'. + Per discussion with Todd Eigenschink. + - formatbuf(): fix %m and %M to use the hostname, not the + username. + - fetch_ftp(): preserve 'anonftp' across a disconnect() so + that multiple ftp auto-fetches on the same command line + login automatically. + - auto_fetch(): use an initialized volatile int to appease + IRIX cc. + + * Merge libedit from NetBSD 20050105 to 20050531. Changes include: + - Rui Paulo: Incorrect tok_line and tok_str declarations. + - Remove clause 3 from the UCB license. + - Luke Mewburn: Don't abuse unconstify'ing a string + and writing to it, because you'll core dump. Also remove + extra const that gives pain to the irix compiler. + - Make sure we flush after we prepare when we are unbuffered + otherwise the prompt will not appear immediately. + - Terminate the arglist with a NULL instead of 0. + (Shuts up gcc4.x) + +Sat May 28 13:19:38 UTC 2005 lukem + + * libnetbsd/strvis.c: + - Sync to NetBSD's vis.c 1.33: + Use malloc(3) instead of alloca(3). + - Remove extraenous #endif + +Fri May 27 05:46:58 UTC 2005 lukem + + * libnetbsd/strvis.c: Sync to NetBSD's vis.c 1.30: + Use a more standard TNF license. + + * libedit/sig.c: Include "src/progressbar.h" for xsignal_restart() + prototype. + + * Ensure that fallback #define of __attribute__ is available. + Fixes build problem on HP-UX with cc. + +Thu May 26 14:21:08 UTC 2005 lukem + + * Extend xpoll()'s HAVE_SELECT implementation to support POLLRDNORM, + POLLWRNORM, and POLLRDBAND - the latter using exceptfds. + Per discussion with Christos Zoulas. + +Mon May 16 13:33:27 UTC 2005 lukem + + * Pull in or if they exist even if we're + not using poll, as struct pollfd might exist in those. + Fixes build problem on OSX.3. + + * Separate CPPFLAGS from CFLAGS. + + * Sync various files in libnetbsd with the original versions + in NetBSD. Notable changes + - Convert 4 clause UCB license to 3 clause. + - Use strlcpy instead of strcpy. + - Update ISC copyright. + - Use NS_INADDRSZ, NS_IN6ADDRSZ and NS_INT16SZ instead of + equivalents without NS_ prefix. + - Use socklen_t instead of size_t where appropriate. + - Improve bounds checking. + - Don't update the size of allocated storage until + realloc succeeds. + - Fix comment about return value. + - Reverse the order of two loop invariant to make + 'strlcat(0, "foo", 0)' not get a SEGV. + - Use Todd C. Miller's latest copyright notice (more loose). + - Use "long long" instead of "quad" in various + comments & constants. + - Support VIS_HTTPSTYLE. + - Implement svis(), strsvis(), strsvisx(), strunvisx(). + + * Prefer poll over select when implementing replacement usleep(). + +Sat May 14 04:44:35 UTC 2005 lukem + + * Release "tnftp 20050514" + + * Fail if we can't find a library with tgetent (needed for libedit). + NetBSD PR pkg/28925. + * Improve quoting when using various autoconf macros. + + * Merge NetBSD-ftp 20050513: + - Correct the "optlen" argument passed to getsockopt(3) and + setsockopt(3) in various places. Fixes a problem noted by + Allen Briggs. + - Improve warning printed when connect(2) for the data + channel fails. + +Wed May 11 04:19:43 UTC 2005 lukem + + * Release "tnftp 20050511" + +Wed May 11 04:10:01 UTC 2005 lukem + + * Update the THANKS file. + + * Only use poll() to implement xpoll() if it's available, + otherwise attempt to use select() if that's available, + otherwise #error. + + * Detect if struct pollfd is available in or . + Improve consistency in use of autoconf macros. + +Wed May 11 02:42:08 UTC 2005 lukem + + * Merge NetBSD-ftp 20050511: + - Use socklen_t instead of int as the 5th argument to + getsockopt(). Improve invocation of setsockopt() and + associated failure messages. + +Wed May 11 01:46:29 UTC 2005 lukem + + * Clean up RCSID usage in vendor-derived code, restoring original + IDs where possible. + +Wed May 11 00:08:16 UTC 2005 lukem + + * Merge NetBSD-ftp 20050510: + - Prevent an overly-long input line causing a core dump when + editing is enabled. + Issue noted by Ryoji Kanai in FreeBSD Problem Report # 77158. + - Implement a timeout on the accept(2) in dataconn() and the + connect(2) in xconnect() by temporarily setting O_NONBLOCK + on the socket and using xpoll() to wait for the operation + to succeed. The timeout used is the '-q quittime' argument + (defaults to 60s for accept(2), and the system default for + connect(2)). Idea inspired by discussion with Chuck Cranor. + This may (indirectly) fix various problems with timeouts in + active mode through broken firewalls. + - Implement xpoll() as a wrapper around poll(2), to make it + easier to replace on systems without a functional poll(2). + Unconditionally use xpoll() instead of conditionally using + select(2) or poll(2). + - In fetch_url(), don't call freeaddrinfo(res0) too early, as + we use pointers to its contents later in the function. + Problem found by Onno van der Linden. + - Fix ftp url reget when globs are being used. + Provided by Mathieu Arnold . + - Factor out common string processing code eliminating static + buffers, making functions that should be static be static, + and cleaning up const usage. Added a guard against buffer + overflow, but the domap function is a bit too complicated + to tackle right now. + - Clean up whitespace. + - Expand description of http_proxy by suggesting the use of + RFC 1738 '%xx' encoding for "unsafe URL" characters in + usernames and passwords. + +Wed Jan 5 05:53:59 UTC 2005 lukem + + * For now, assume libedit is not up-to-date and use our own version. + + * Merge libedit from NetBSD 20020605 to 20050105. Changes include: + - Improve vi-mode. + - Delete-previous-char and delete-next-char without an + argument are not supposed to modify the yank buffer in + emacs-mode. + - Improve incremental searching. + - Improve memory allocation & usage. + - Move UCB-licensed code from 4-clause to 3-clause. + - Make the tokenization functions publically available. + - Various tty access bug-fixes. + - Improve readline emulation. + +Tue Jan 4 13:33:40 UTC 2005 lukem + + * Unixware 7.1.1 implements RFC 2133 (Basic Socket Interface + Extensions for IPv6) but not the successor RFC 2553. The configure + script detects this and decides that tnftp needs to compile its own + version of getaddrinfo(). This produces the error message + /usr/include/netdb.h:248: `getaddrinfo' previously defined here + because Unixware provides an implementation of getaddrinfo() in + netdb.h instead of a prototype declaration :-/. Since netdb.h + cannot be omitted, we will always get this definition and tnftp's + version of getaddrinfo will always create a conflict. This ugly + preprocessor hack works around the problem. Hints for a better + solution welcome. Fix from pkgsrc/net/tnftp. + + * Workaround poll() being a compatibility function on Darwin 7 + (MacOSX 10.3) by adding a custom test for _POLL_EMUL_H_ which + is defined in poll.h on some MacOSX 10.3 systems. Not all 10.3 + systems have poll.h, so only do the poll() test if at least one + of the header files is found. Fix from pkgsrc/net/tnftp. + + * Add a utimes() replacement (using utime()) for Interix. + From pkgsrc/net/tnftp. + +Mon Jan 3 10:21:57 UTC 2005 lukem + + * Release "tnftp 20050103" + + * Merge NetBSD-ftp 20050103: + - Forbid filenames returned from mget that aren't in (or below) + the current directory. The previous behaviour (of trusting + the remote server's response when retrieving the list of + files to mget with prompting disabled) has been in ftp + ~forever, and has been a "known issue" for a long time. + Recently an advisory was published by D.J. Bernstein on + behalf of Yosef Klein warning of the problems with the + previous behaviour, so to alleviate concern I've fixed + this with a sledgehammer. + - Remember the local cwd after any operation which may + change it. + - Use "remotecwd" instead of "remotepwd". + - Add (unsigned char) cast to ctype functions + - Ensure that "mname" is set in ls() and mls() so that an + aborted confirm() prints the correct name. + Problem highlighted & suggested fix from PR [bin/17766] + by Steve McClellan. + - If an ftp auto-fetch transfer is interrupted by SIGINT + (usually ^C), exit with 130 instead of 1 (or rarely, 0). + This allows an ftp auto-fetch in a shell loop to correctly + terminate the loop. + Should fix PR [pkg/26351], and possibly others. + - Save approximately 8K by not including http authentication, + extended status messages and help strings when the + appropriate options are set. + - Move UCB-licensed code from 4-clause to 3-clause licence. + Patches provided by Joel Baker in PR 22365, verified by + Alistair Crooks. + - Always decode %xx in a url's user & pass components. + - Only remember {WWW,Proxy}-Authenticate "Basic" challenges; no + point in tracking any others since ftp doesn't support them. + - Improve the parsing of HTTP responses. + - Don't base64 encode the trailing NUL in the HTTP basic auth + response. Problem noted by Eric Haszlakiewicz. + - Improve parsing of HTTP response headers to be more RFC2616 + compliant, and skip LWS (linear white space; CR, LF, space, + tab) and the end of lines and between the field name and + the field value. This still isn't 100% compliant, since we + don't support "multi line" responses at this time. + This should fix PR [bin/22611] from TAMURA Kent (although I + can't easily find a http server to reproduce the problem + against.) + - Fix a minor memory leak when parsing HTTP response headers. + - Don't unnecessarily display a 401/407 error when running + with -V. Fix from PR [bin/18535] by Jeremy Reed. + - Don't warn about "ignored setsockopt" failures unless + debugging is enabled. Suggested by Todd Vierling. + - Allow empty passwords in ftp://user:@host/file auto-fetch + URLs, per RFC 1738. Requested by Simon Poole. + - correct URL syntax in comment + - Note potentially surprising file-saving behaviour in case + of HTTP redirects + - -n is ignored for auto-fetch transfers + - If connect(2) in xconnect() fails with EINTR, call select(2) + on the socket until it's writable or it fails with something + other than EINTR. This matches the behaviour in SUSv3, and + prevents the problem when pressing ^T (SIGINFO, which is + marked as restartable) during connection setup would cause + ftp to fail with EADDRINUSE or EALREADY when the second + connect(2) was attempted on the same socket. Problem found + and solution provided by Maxime Henrion . + - Add -q to usage. From Kouichirou Hiratsuka in PR 26199. + - PR/25566: Anders Magnusson: ftp(1) do not like large TCP + windows. Limit it to 8M. + +Mon Oct 6 01:23:03 UTC 2003 lukem + + * configure.in improvements: + - When testing for IN6ADDRSZ in , pull in + first. From Stoned Elipot + - Whitespace cleanup + +Mon Aug 25 11:45:45 UTC 2003 lukem + + * Release "tnftp 20030825" + + * Add autoconf test for ; Cygwin needs it for ARG_MAX. + Per discussion with Eugene Kotlyarov . + +Thu Jul 31 07:30:00 UTC 2003 lukem + + * release "tnftp 20030731" + + * merge ftp from NetBSD 20030731 to 20030731b: + - Work around broken ftp servers (notably ProFTPd) that can't + even follow RFC 2389, and skip any amount of whitespace + before a FEATure response. The RFC says 'single space' yet + ProFTPd puts two. Noted by DervishD . + - Improve formatting of features[] debug dump. + - Invalidate remote directory completion cache if any command + which may change the remote contents completes successfully, + including: del, mdel, ren, mkdir, rmdir, quote, and all + upload commands. Patch from Yar Tikhiy . + + * merge ftp from NetBSD 20030228 to 20030731: + - $FTPUSERAGENT overrides the HTTP User-Agent header. + Based on patch from Douwe Kiela . + - Add about:tnftp + - Fix URL in about:netbsd + - netbsd.org->NetBSD.org + - strlcpy fix in fetch.c + - Uppercase "URL" + - fix a bogus error message when given a HTTP URL with a + trailing slash + - groff fixes in man page + - tweak progressbar.c copyright; the stuff jason did in util.c + wasn't migrated to this file + - Don't coredump when printing '%n' in the prompt if there's + no username yet. + Fix from Maxim Konovalov + + * Add test for HAVE_IN6ADDRSZ (which older Darwin is lacking), + and only enable INET6 if it exists. + Patch from Amitai Schlair . + + * Improve ipv6 check for older linux systems that don't provide + sin6_scope_id. + Patch from YAMANO Yuji . + +Fri Feb 28 10:57:30 UTC 2003 lukem + + * tagged as "tnftp 2.0 beta1" + +Fri Feb 28 10:07:07 UTC 2003 lukem + + * renamed to `tnftp' (from `lukemftp') + + * renamed `libukem' to `libnetbsd' + + +Mon Jun 17 06:50:13 UTC 2002 lukem + + * #if USE_GLOB_H, use instead of "ftpglob.h". + Requested by Mike Heffner + +Mon Jun 10 08:12:35 UTC 2002 lukem + + * crank FTP_VERSION from 1.6-beta1 to 1.6-beta2 + + * replace missing fseeko(), with a wrapper to fseek() which + checks that the offset isn't > LONG_MAX + + * #include #if HAVE_REGEX_H + +Mon Jun 10 01:27:46 UTC 2002 lukem + + * check for and replace sa_family_t definition + + * don't bother checking for issetugid(); it was only used in the + internal libedit to prevent $HOME/.editrc from being used if + running set-id, and the newer libedit code wouldn't even read + $HOME/.editrc if issetugid() wasn't available. as many target + operating systems don't have issetugid(), and lukemftp isn't + likely to be run set-id (and $HOME/.netrc is used in any case), + the issetugid() check has been disabled in libedit. + + * add back cpp code which #defines REGEX #if HAVE_REGEX_H + +Wed Jun 5 14:39:11 UTC 2002 lukem + + * crank FTP_VERSION from 1.6alpha1 to 1.6-beta1 + + * implement replacement setprogname() + + * use getprogname() instead of __progname + + * convert to christos' replacement fgetln(), as it's better than mine + + * merge ftp from NetBSD 20020605 to 20020606: + - use setprogname() + - only support -6 if INET6 is defined + +Wed Jun 5 13:08:25 UTC 2002 lukem + + * don't bother checking if is usable (see below). + + * always compile in local glob; it's the best way to ensure that + various security issues are fixed + + * update libukem/glob.c from NetBSD's __glob13.c rev 1.22 and rev 1.23 + + * merge libedit from NetBSD 20010413 to 20020606: + - constify; passes all gcc and lint strict checks. + - add config.h [Jason Evans], to create a portable version of + libedit that can be easily compiled on other OS's. + - PR/12963:Jason Waterman: Fix signed cast problems. + - Fixed an __P remnant + - Close quoting. + - Generate <>& symbolically. + - Punctuation and whitespace nits, fix a typo. + - PR/14188: Anthony Mallet: Provide an opaque data + pointer to client programs. + - a couple of minor fixes. originally by Ruslan Ermilov + , highlighted to me by way of Mike Barcroft + (thanks!) + - PR/14067: Anthony Mallet: Provide a programmatic way + to set the read_char function via a new el_set() operation. + Thanks, nicely done :-) + - `existent', not `existant' + - Don't use HAVE_ yet. + - Fix a warning. + - Remove an unused variable. + - If term_init() fails, cleanup and return NULL. This + avoids other lossage. Pointed by charles. + - va_{start,end} audit: Make sure that each va_start has one + and only one matching va_end, especially in error cases. + If the va_list is used multiple times, do multiple + va_starts/va_ends. If a function gets va_list as argument, + don't let it use va_end (since it's the callers + responsibility). Improved by comments from enami and + christos -- thanks! + - history_def_enter: fix off-by-one mistake in delete + condition (the behaviour to keep at least one entry on the + history list is retained). This fixes lib/9704 by Phil Nelson. + + * merge ftp from NetBSD 20020524 to 20020605: + - when showing the final progress bar, replace "00:00 ETA" + with the elapsed time. (suggested by simonb) + - actually display transfer stats after a URL fetch. + (bug introduced a *long* time ago) + - update copyright & version + + * merge ftp from NetBSD 20001127 to 20020524: + - Use "r+" instead of "r+w", since the latter is not standard. + Noted by in private email. + - Only send port number in HTTP/1.1 Host: request if port != + 80. Fixes [bin/15415] from Takahiro Kambe + + - Fix bad mode passed by mls() to recvrequest(). Fixes + [bin/16642] from + - update copyrights + - minor knf + - invoke cmdtab.c_handler()s with argv[0] == c_name instead + of the supplied name. that way the full (unambiguous) name + is displayed in error messages and usage strings. + - line2 may overrun if line is too long (> 200). be more + careful on strcpy. + - Handle URLs without files correctly (e.g, when using '-o -'). + Fix from Anders Dinsen in [bin/13768] + - portnum is unsigned, use %u instead of %d + - Add -4 to force IPv4 and -6 to force IPv6 address usage. + From Hajimu UMEMOTO, via Mike Heffner of FreeBSD. + - use u_char instead of char in base64_encode(). + problem noticed by Jorgen Lundman in private mail. + - don't make broken file with -R option. + - handle "*" in Content-Range properly. + - If no_proxy condition is true && urltype == FTP_URL_T, + use fetch_ftp to retrieve + - convert to use getprogname() + - Fix description for "form", "mode", and "struct" commands. + Inspired by [bin/16736] from Steve McClellan + + - Generate <>& symbolically. I'm avoiding .../dist/... + directories for now. + - Punctuation nits. + - Whitespace cleanup. + - put "site" in alphabetical order. noted by Mike Barcroft + in private email + - avoid buffer overrun on PASV from malicious server. + - Large file ASCII mode support by using fseeko() + instead of fseek(). From Andrey A. Chernov of FreeBSD, + via Mike Heffner. + - Deal with const'ification if el_parse(). + - call setlocale() on startup + - display a limited progress bar (containing bytes xferred + and xfer rate) when the file size is unknown + - disable progress bar during remglob() + +Thu Mar 14 05:41:49 UTC 2002 lukem + + * ensure all AF_INET6 use is protected with #ifdef INET6 + + * remove unnecessary __attribute__ goop + + * libukem/snprintf.c: fix compile errors with gcc 3.x + +Tue Apr 17 08:07:29 UTC 2001 lukem + + * autoconf check for %q long long support in *printf() + (instead of %ll), define and use HAVE_PRINTF_QD if so + + * ipv6 isn't compatible with socks, so disable the former + + * look for (instead of ) and + + * don't check for fparseln() twice + + * fix getaddrinfo() checks + + * crank FTP_VERSION from 1.5 to 1.6alpha1 + + * always ensure _PATH_BSHELL and _PATH_TMP are defined + + * prototype inet_pton() if its missing + + * don't bother trying to use if_indextoname() in ip6_sa2str() + (fixes problems on MacOS X) + + * in inet_pton(), pull in for IN6ADDRSZ and INT16SZ, + and define if missing + +Fri Apr 13 15:24:44 UTC 2001 lukem + + * only include if we have it + + * update glob(3) to netbsd-current (20010329), adding support + for GLOB_LIMIT and fixing various buffer overflows. + + * update editline from NetBSD 20000915 -> NetBSD 20010413 + - Enlarge editline buffers as needed to support arbitrary + length lines. This also addresses lib/9712 by Phil Nelson. + - consistently check for allocation failures and return -1, + if we could not get more memory. + - add support for home and end keys. + - improve debugging support + - el_line_t: make 'limit' const + +Mon Nov 27 23:23:40 EST 2000 lukem + + * merge ftp from NetBSD-current (20001127): + - implement "mreget"; as per "mget" but uses "reget" instead + of "get" + - add -N netrc and $NETRC, as methods to select an alternative + .netrc file + - cache local user name and home directory for further use + - in mget(), use docase() instead of a local version to do + the case conversion. + - format string cleanups + - be more explicit that $ftp_proxy and $http_proxy are not + supported for interactive sessions + - cope with 2553bis getnameinfo (always attach scope id) + getnameinfo error check. + - use NI_MAXHOST with getnameinfo. we can assume presence of + getnameinfo. + +Tue Nov 7 00:16:23 EST 2000 lukem + + * libukem/snprintf.c had a non-functional `%s' due to a + function declaration mismatch. problem found and fixed + by Hubert Feyrer + +Wed Oct 11 14:06:19 EST 2000 lukem + + * released version 1.5 + +Tue Oct 3 10:22:36 EST 2000 lukem + + * crank to version 1.5 beta6 + + * merge ftp from NetBSD-current (20001003) + - explicitly use SOCK_STREAM with socket() instead of + res->ai_socktype, because it appears that linux with glibc + doesn't set the latter correctly after one of getaddrinfo() + or getnameinfo(). + - clarify that $ftp_proxy only works for full URLs and can't + be used for interactive connections. + +Mon Sep 25 21:52:12 EST 2000 lukem + + * crank to version 1.5 beta5 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 21:59:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77611106564A; Sun, 25 Jul 2010 21:59:12 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 500C18FC1D; Sun, 25 Jul 2010 21:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PLxCeA071748; Sun, 25 Jul 2010 21:59:12 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PLxCb7071747; Sun, 25 Jul 2010 21:59:12 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007252159.o6PLxCb7071747@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 25 Jul 2010 21:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210487 - vendor/tnftp/20100108 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 21:59:12 -0000 Author: gavin Date: Sun Jul 25 21:59:12 2010 New Revision: 210487 URL: http://svn.freebsd.org/changeset/base/210487 Log: Tag for tnftp-20100108 Added: vendor/tnftp/20100108/ - copied from r210486, vendor/tnftp/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Jul 25 22:25:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F2541065672; Sun, 25 Jul 2010 22:25:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9BE78FC16; Sun, 25 Jul 2010 22:25:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6PMPqv5077594; Sun, 25 Jul 2010 22:25:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6PMPqLD077591; Sun, 25 Jul 2010 22:25:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007252225.o6PMPqLD077591@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Jul 2010 22:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210488 - in head: bin/sh tools/regression/bin/sh/parser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 22:25:53 -0000 Author: jilles Date: Sun Jul 25 22:25:52 2010 New Revision: 210488 URL: http://svn.freebsd.org/changeset/base/210488 Log: sh: Fix crash due to uninitialized here-document. If an ; or & token was followed by an EOF token, pending here-documents were left uninitialized. Execution would crash, either in the main shell process for literal here-documents or in a child process for expanded here-documents. In the latter case the problem is hard to detect apart from the core dumps and log messages. Side effect: slightly different retries on inputs where EOF is not persistent. Note that tools/regression/bin/sh/parser/heredoc6.0 still causes a similar crash in a child process. The text passed to eval is malformed and should be rejected. Added: head/tools/regression/bin/sh/parser/heredoc7.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun Jul 25 21:59:12 2010 (r210487) +++ head/bin/sh/parser.c Sun Jul 25 22:25:52 2010 (r210488) @@ -269,6 +269,9 @@ list(int nlflag) parseheredoc(); if (nlflag) return n1; + } else if (tok == TEOF && nlflag) { + parseheredoc(); + return n1; } else { tokpushback++; } Added: head/tools/regression/bin/sh/parser/heredoc7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/heredoc7.0 Sun Jul 25 22:25:52 2010 (r210488) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# Some of these created malformed parse trees with null pointers for here +# documents, causing the here document writing process to segfault. +eval ': < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F951065675; Mon, 26 Jul 2010 01:28:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A71B8FC0C; Mon, 26 Jul 2010 01:28:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q1SYMU017974; Mon, 26 Jul 2010 01:28:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q1SYJL017973; Mon, 26 Jul 2010 01:28:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201007260128.o6Q1SYJL017973@svn.freebsd.org> From: Doug Barton Date: Mon, 26 Jul 2010 01:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210489 - in stable/8/games/fortune: . datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 01:28:34 -0000 Author: dougb Date: Mon Jul 26 01:28:34 2010 New Revision: 210489 URL: http://svn.freebsd.org/changeset/base/210489 Log: Pull spurious mergeinfo from datfiles up to src/games/fortune Modified: Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 01:31:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40254106564A; Mon, 26 Jul 2010 01:31:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D34F8FC0C; Mon, 26 Jul 2010 01:31:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q1VnEn018764; Mon, 26 Jul 2010 01:31:49 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q1VlHp018730; Mon, 26 Jul 2010 01:31:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201007260131.o6Q1VlHp018730@svn.freebsd.org> From: Doug Barton Date: Mon, 26 Jul 2010 01:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210490 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 01:31:49 -0000 Author: dougb Date: Mon Jul 26 01:31:47 2010 New Revision: 210490 URL: http://svn.freebsd.org/changeset/base/210490 Log: MFC 209531: Taken from actual police videos ... MFC 210484: Correct a Cecil Beaton quote Modified: stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/fortunes-o.real Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Mon Jul 26 01:28:34 2010 (r210489) +++ stable/8/games/fortune/datfiles/fortunes Mon Jul 26 01:31:47 2010 (r210490) @@ -37880,7 +37880,7 @@ behave very differently from those who n order to get power we would have to become very much like them. (Lenin's fatal mistake, both in theory and in practice.) % -Perhaps the world's second words crime is boredom. The first is +Perhaps the world's second-worst crime is boredom. The first is being a bore. -- Cecil Beaton % Modified: stable/8/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/8/games/fortune/datfiles/fortunes-o.real Mon Jul 26 01:28:34 2010 (r210489) +++ stable/8/games/fortune/datfiles/fortunes-o.real Mon Jul 26 01:31:47 2010 (r210490) @@ -12433,6 +12433,39 @@ And sure enough she'll take you home and (chorus) -- Crosby, Stills, Nash, "Fair Game" % +Taken from actual police car videos: + +(15) Relax! The handcuffs are tight because they're new. They'll + stretch out after you wear them awhile. +(14) Take your hands off the car and I'll make your birth certificate + a worthless document. +(13) If you run you'll only go to jail tired. +(12) Can you run faster than 1200 feet per second? In case you didn't + know that's the average speed of a 9 mm bullet fired from my gun. +(11) So you don't know how fast you were going. I guess that means I + can write anything I want on the ticket, huh? +(10) Yes, sir, you can talk to the shift supervisor, but I don't think + it will help. Oh, did I mention that I AM the shift supervisor? +(9) Warning? You want a warning? OK, I'm warning you not to do that + again or I'll give you another ticket. +(8) The answer to this last question will determine whether you are + drunk or not. Is Mickey Mouse a cat or a dog? +% +Taken from actual police car videos: + +(7) Fair? You want me to be fair? Listen, fair is a place where you + go to ride on rides, eat cotton candy, and step in monkey poop. +(6) Yeah, we have a quota. Two more tickets and my wife gets a toaster + oven. +(5) No, sir, we don't have quotas anymore. We used to have quotas but + now we're allowed to write as many tickets as we want. +(4) Just how big were those two beers? +(3) In God we trust, all others we run through CPIC/NCIC. +(2) I'm glad to hear the Chief of Police is a good personal friend of + yours. At least you know someone who can post your bail. +(1) You didn't think we gave pretty women tickets? + You're right, we don't -- sign here. +% Taoism: Shit Happens. Confucianism: Confucius say, "Shit Happens". Buddhism: If shit happens, it isn't really shit. From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 02:02:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 872911065675; Mon, 26 Jul 2010 02:02:45 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 655818FC19; Mon, 26 Jul 2010 02:02:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q22jBR026046; Mon, 26 Jul 2010 02:02:45 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q22jXQ026045; Mon, 26 Jul 2010 02:02:45 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201007260202.o6Q22jXQ026045@svn.freebsd.org> From: Doug Barton Date: Mon, 26 Jul 2010 02:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210491 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 02:02:45 -0000 Author: dougb Date: Mon Jul 26 02:02:45 2010 New Revision: 210491 URL: http://svn.freebsd.org/changeset/base/210491 Log: Pull mergeinfo up into the parent Modified: Directory Properties: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 02:05:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E02BE106566C; Mon, 26 Jul 2010 02:05:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D48B68FC12; Mon, 26 Jul 2010 02:05:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q25cYK026732; Mon, 26 Jul 2010 02:05:38 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q25bID026729; Mon, 26 Jul 2010 02:05:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201007260205.o6Q25bID026729@svn.freebsd.org> From: Doug Barton Date: Mon, 26 Jul 2010 02:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210492 - stable/7/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 02:05:39 -0000 Author: dougb Date: Mon Jul 26 02:05:36 2010 New Revision: 210492 URL: http://svn.freebsd.org/changeset/base/210492 Log: MFC 209531: Taken from actual police videos ... MFC 210484: Correct a Cecil Beaton quote Modified: stable/7/games/fortune/datfiles/fortunes stable/7/games/fortune/datfiles/fortunes-o.real Directory Properties: stable/7/games/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Mon Jul 26 02:02:45 2010 (r210491) +++ stable/7/games/fortune/datfiles/fortunes Mon Jul 26 02:05:36 2010 (r210492) @@ -37880,7 +37880,7 @@ behave very differently from those who n order to get power we would have to become very much like them. (Lenin's fatal mistake, both in theory and in practice.) % -Perhaps the world's second words crime is boredom. The first is +Perhaps the world's second-worst crime is boredom. The first is being a bore. -- Cecil Beaton % Modified: stable/7/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/7/games/fortune/datfiles/fortunes-o.real Mon Jul 26 02:02:45 2010 (r210491) +++ stable/7/games/fortune/datfiles/fortunes-o.real Mon Jul 26 02:05:36 2010 (r210492) @@ -12433,6 +12433,39 @@ And sure enough she'll take you home and (chorus) -- Crosby, Stills, Nash, "Fair Game" % +Taken from actual police car videos: + +(15) Relax! The handcuffs are tight because they're new. They'll + stretch out after you wear them awhile. +(14) Take your hands off the car and I'll make your birth certificate + a worthless document. +(13) If you run you'll only go to jail tired. +(12) Can you run faster than 1200 feet per second? In case you didn't + know that's the average speed of a 9 mm bullet fired from my gun. +(11) So you don't know how fast you were going. I guess that means I + can write anything I want on the ticket, huh? +(10) Yes, sir, you can talk to the shift supervisor, but I don't think + it will help. Oh, did I mention that I AM the shift supervisor? +(9) Warning? You want a warning? OK, I'm warning you not to do that + again or I'll give you another ticket. +(8) The answer to this last question will determine whether you are + drunk or not. Is Mickey Mouse a cat or a dog? +% +Taken from actual police car videos: + +(7) Fair? You want me to be fair? Listen, fair is a place where you + go to ride on rides, eat cotton candy, and step in monkey poop. +(6) Yeah, we have a quota. Two more tickets and my wife gets a toaster + oven. +(5) No, sir, we don't have quotas anymore. We used to have quotas but + now we're allowed to write as many tickets as we want. +(4) Just how big were those two beers? +(3) In God we trust, all others we run through CPIC/NCIC. +(2) I'm glad to hear the Chief of Police is a good personal friend of + yours. At least you know someone who can post your bail. +(1) You didn't think we gave pretty women tickets? + You're right, we don't -- sign here. +% Taoism: Shit Happens. Confucianism: Confucius say, "Shit Happens". Buddhism: If shit happens, it isn't really shit. From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 07:06:02 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41D961065672; Mon, 26 Jul 2010 07:06:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id CC5238FC25; Mon, 26 Jul 2010 07:06:01 +0000 (UTC) Received: from c122-106-147-41.carlnfd1.nsw.optusnet.com.au (c122-106-147-41.carlnfd1.nsw.optusnet.com.au [122.106.147.41]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6Q75uc5022602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Jul 2010 17:05:57 +1000 Date: Mon, 26 Jul 2010 17:05:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Kostik Belousov In-Reply-To: <20100725195926.GE22295@deviant.kiev.zoral.com.ua> Message-ID: <20100726153325.M12476@delplex.bde.org> References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> <20100726013202.G11808@delplex.bde.org> <20100725181255.GB22295@deviant.kiev.zoral.com.ua> <4C4C969E.1060602@freebsd.org> <20100725195926.GE22295@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Stefan Farfeleder , Nathan Whitehorn , Bruce Evans , svn-src-head@FreeBSD.org Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 07:06:02 -0000 On Sun, 25 Jul 2010, Kostik Belousov wrote: > On Sun, Jul 25, 2010 at 09:55:10PM +0200, Nathan Whitehorn wrote: >> On 07/25/10 20:12, Kostik Belousov wrote: >>> On Mon, Jul 26, 2010 at 01:36:07AM +1000, Bruce Evans wrote: >>> >>>> On Sat, 24 Jul 2010, Stefan Farfeleder wrote: >>>> >>>> >>>>> declaring enums like this is not standard C code (seems to be a GCC >>>>> extension). I don't think we should use this feature in our headers. Please fix your mail program to not add extra empty lines when quoting. (I didn't write the 2 empty lines in the above, but only 1.) >>>> This is unfortunate. This is because the size of an enum variable >>>> depends on its complete declaration. This is an error unconditionaly >>>> with TenDRA. It takes -pedantic to get a warning from gcc. >>>> >>> I looked at the C99, and indeed, there is an explicit sentence >>> "A type specifier of the form enum identifier without an enumerator list >>> shall only appear after the type it specifies is complete." In C90, even this is not allowed (with an empty enumerator list) according to TenDRA (2004 version). This seems to be a bug in TenDRA: - gcc -std=c89 -pedantic allows it - the grammar for enums and enum type specifiers is the same in C99 as in C90, except C99 allows a trailing comma in enumerator lists. TenDRA gives a reference to C90 6.5.2.3 to justify this, but that (at least in the old draft n869.txt) only has a footnote saying that a bare enum tag is unnecessary due to the requirement for a complete type that we're talking about (footnote 62). The key part of the grammar that allows the bare enum tag is C90 6.5 (C99 6.7): declaration: declaration-specifiers int-declarator-list-opt ; Constraints: A declaration shall declare at least a declarator, a tag, or the members of an enumeration. The constraint is satisfied by a bare enum tag being a tag (C90 6.5.2.3). >>> I fully agree with Bruce that this is unfortunate, or rather, makes >>> enum tag declaration completely unuseful. gcc extension greatly simplifies >>> dealing with the headers pollution. But there is nothing similar for typedefs (except to not use them for structs). The problem with typedefs is partly handled by putting too many of them in and/or and either polluting eveything with these or requiring everything to include them. I normally avoid using enums since they provide few advantages except for debuggers. >>> On the other hand, I disagree with the statement that the size of the >>> enum variable depends on the full declaration. It seems that C99 >>> defines values of the enum to by of type int, and both i386 and >>> amd64 ABIs define enums as represented by 4-byte integers. >>> Yes, I am aware that C++ allows the enum to be assigned the >>> the shortest arithmetic type that can represent all enum values. >>> >> Now the broken quoting gives different indentations. Normally I don't want to know the quoting level for blank lines, but I hope my mail program preserves the brokennes by adding precisely 1 level to the above :-). >> This is not actually true. Try adding a value that requires a 64-bit int >> to your enum -- it will become 8 bytes. Also, the signedness of the type >> depends on the values in the enumeration. Such values are not allowed in C unless ints are 64 bits. (C99 6.4.4.3 [#2].) Hmm, can an enum type be unsigned? I can't find any constraint except C99 6.7.2.2 [#4] which says that the type shall be compatible with an integer type capable of representing all the enum values. Only the C "value-preserving" promotion bug gives a chance of avoiding lots of sign extension bugs if an enum type is unsigned. E.g.: (1) enum foo { UCM = UCHAR_MAX, }; The enum type for this can be u_char provided UCHAR_MAX <= INT_MAX, which is true except on exotic machines (e.g., ones with 32-bit u_chars and 32- bit ints), and machines where this allowed are the same ones that the default promotion of u_char is int, so comparison of an an enum foo with an int will not give sign extension bugs. (2) enum silly { IM = INT_MAX, }; Now the enum type should be int. u_int is also capable of representing all the enum values, but using it would mainy give sign extension bugs and should not be allowed. (3) enum sillier { ONE = 1, }; Like (2) except u_int is even less needed to represent the enum value 1. (4) enum envalid { UIM = UINT_MAX, }; This could be represented by a u_int, but is not permitted by C99 6.4.4.3 [#2] (see also C99 6.7.2.2 [#2] -- this says that although the type of an expression for an enum constant can be any integer type, the value of the expression must be representable as an int (so that it can actually be repesented by the enum constant). (4) enum valid { UIM_O2_M1 = UINT_MAX / 2 - 1, }; Example for previous paragraph, assuming normal 2's complement ints and u_ints. > Well, the amd64 ABI has a note > "C++ and some implementations of C permit enums larger than an int. The > underlying type is bumped to an unsigned int, long int or unsigned long > int, in that order." The C standard allows emums to be gratuitously large or small, but only a recalcitrant implementation would use anything except a plain signed int or a signed or unsigned integer type smaller than an int. The smaller types are allowed for optimizations, but on amd64 and i386 it is a pessimization (except for space) to use the sub-integer possibilities, so the sub-integer types are gratuitously small and it is good for the ABI to not allow them. The C standard doesn't permit enum vales that need the underlying type to be bumped to be representable. Unfortunately, portable code can't depend on the ABI, and handling the problem with unsigned types that I just noticed is onerous. E.g., what is the result of this code?: enum one { ONE = 1, } one; assert(one > -1); If the enum type is gratuitously unsigned and no smaller than int, u_int say, then the result of this is assertion failure, and portable code must write the assertion as: assert((int)one > -1); to ensure getting the normal result. OTOH, `ONE' has type int, so there is no problem with assert(ONE > -1); > The gcc extension is consistent in this regard, since it only allows > to use pointers to enum without complete definition. Allowing pointers to incomplete enum types might work even if the size of the enum type depends on the enum. The corresponding thing for structs depends on all struct pointers having the same representation. This might be implementable for enum pointers too, even if all pointers to integer types don't have the same representation. At worse, the pointers could be given the representation of 'void *'. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 09:20:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 072A81065675; Mon, 26 Jul 2010 09:20:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBDE78FC14; Mon, 26 Jul 2010 09:20:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q9Kt5j022877; Mon, 26 Jul 2010 09:20:55 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q9KtAx022875; Mon, 26 Jul 2010 09:20:55 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201007260920.o6Q9KtAx022875@svn.freebsd.org> From: Randall Stewart Date: Mon, 26 Jul 2010 09:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210493 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 09:20:56 -0000 Author: rrs Date: Mon Jul 26 09:20:55 2010 New Revision: 210493 URL: http://svn.freebsd.org/changeset/base/210493 Log: When counting the number of chunks in the retransmission queue to validate the retran count, we need to include the chunks in the control send queue too. Otherwise the count will not match and you will get the invarient warning if invarients are on. MFC after: 2 weeks Modified: head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Mon Jul 26 02:05:36 2010 (r210492) +++ head/sys/netinet/sctp_timer.c Mon Jul 26 09:20:55 2010 (r210493) @@ -870,6 +870,26 @@ start_again: } #endif *num_marked = num_mk; + /* + * Now check for a ECN Echo that may be stranded And include the + * cnt_mk'd to have all resends in the control queue. + */ + TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) { + if (chk->sent == SCTP_DATAGRAM_RESEND) { + cnt_mk++; + } + if ((chk->whoTo == net) && + (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) { + sctp_free_remote_addr(chk->whoTo); + chk->whoTo = alt; + if (chk->sent != SCTP_DATAGRAM_RESEND) { + chk->sent = SCTP_DATAGRAM_RESEND; + sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); + cnt_mk++; + } + atomic_add_int(&alt->ref_count, 1); + } + } if ((stcb->asoc.sent_queue_retran_cnt == 0) && (could_be_sent)) { /* fix it so we retransmit the highest acked anyway */ sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); @@ -885,19 +905,6 @@ start_again: stcb->asoc.sent_queue_retran_cnt = cnt_mk; #endif } - /* Now check for a ECN Echo that may be stranded */ - TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) { - if ((chk->whoTo == net) && - (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) { - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = alt; - if (chk->sent != SCTP_DATAGRAM_RESEND) { - chk->sent = SCTP_DATAGRAM_RESEND; - sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); - } - atomic_add_int(&alt->ref_count, 1); - } - } if (audit_tf) { SCTPDBG(SCTP_DEBUG_TIMER4, "Audit total flight due to negative value net:%p\n", From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 09:22:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49AF110657C3; Mon, 26 Jul 2010 09:22:53 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29FA78FC1C; Mon, 26 Jul 2010 09:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q9Mr5C023362; Mon, 26 Jul 2010 09:22:53 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q9Mqcf023360; Mon, 26 Jul 2010 09:22:52 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201007260922.o6Q9Mqcf023360@svn.freebsd.org> From: Randall Stewart Date: Mon, 26 Jul 2010 09:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210494 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 09:22:53 -0000 Author: rrs Date: Mon Jul 26 09:22:52 2010 New Revision: 210494 URL: http://svn.freebsd.org/changeset/base/210494 Log: Make sure that we report chunks if a socket still exists that were not sent. In either case carefully remove the data if it does not get taken by the reporting routines. MFC after: 2 weeks Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Jul 26 09:20:55 2010 (r210493) +++ head/sys/netinet/sctp_pcb.c Mon Jul 26 09:22:52 2010 (r210494) @@ -4830,9 +4830,17 @@ sctp_free_assoc(struct sctp_inpcb *inp, while (sp) { TAILQ_REMOVE(&outs->outqueue, sp, next); if (sp->data) { - sctp_m_freem(sp->data); - sp->data = NULL; - sp->tail_mbuf = NULL; + if (so) { + /* Still an open socket - report */ + sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_UNSENT, + (void *)sp, 0); + } + if (sp->data) { + sctp_m_freem(sp->data); + sp->data = NULL; + sp->tail_mbuf = NULL; + } } sctp_free_remote_addr(sp->net); sctp_free_spbufspace(stcb, asoc, sp); @@ -4892,8 +4900,15 @@ sctp_free_assoc(struct sctp_inpcb *inp, while (chk) { TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); if (chk->data) { - sctp_m_freem(chk->data); - chk->data = NULL; + if (so) { + /* Still a socket? */ + sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_UNSENT, chk, 0); + } + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } if (chk->holds_key_ref) sctp_auth_key_release(stcb, chk->auth_keyid); @@ -4917,8 +4932,15 @@ sctp_free_assoc(struct sctp_inpcb *inp, while (chk) { TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); if (chk->data) { - sctp_m_freem(chk->data); - chk->data = NULL; + if (so) { + /* Still a socket? */ + sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_SENT, chk, 0); + } + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } if (chk->holds_key_ref) sctp_auth_key_release(stcb, chk->auth_keyid); From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 09:26:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E93841065674; Mon, 26 Jul 2010 09:26:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3B948FC23; Mon, 26 Jul 2010 09:26:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6Q9Qt3Z024295; Mon, 26 Jul 2010 09:26:55 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6Q9Qtsv024293; Mon, 26 Jul 2010 09:26:55 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201007260926.o6Q9Qtsv024293@svn.freebsd.org> From: Michael Tuexen Date: Mon, 26 Jul 2010 09:26:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210495 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 09:26:56 -0000 Author: tuexen Date: Mon Jul 26 09:26:55 2010 New Revision: 210495 URL: http://svn.freebsd.org/changeset/base/210495 Log: Fix a bug where the length of a FORWARD-TSN chunk was set incorrectly in the chunk. This resulted in malformed frames. Remove a duplicate assignment. MFC after: 2 weeks Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jul 26 09:22:52 2010 (r210494) +++ head/sys/netinet/sctp_output.c Mon Jul 26 09:26:55 2010 (r210495) @@ -2271,7 +2271,6 @@ sctp_is_ifa_addr_acceptable(struct sctp_ { uint8_t dest_is_global = 0; - /* * Here we determine if its a acceptable address. A acceptable * address means it is the same scope or higher scope but we can @@ -9800,7 +9799,8 @@ sctp_fill_in_rest: * peer ack point */ advance_peer_ack_point = last->rec.data.TSN_seq; - space_needed -= (cnt_of_skipped * sizeof(struct sctp_strseq)); + space_needed = sizeof(struct sctp_forward_tsn_chunk) + + cnt_of_skipped * sizeof(struct sctp_strseq); } chk->send_size = space_needed; /* Setup the chunk */ @@ -9809,8 +9809,6 @@ sctp_fill_in_rest: fwdtsn->ch.chunk_flags = 0; fwdtsn->ch.chunk_type = SCTP_FORWARD_CUM_TSN; fwdtsn->new_cumulative_tsn = htonl(advance_peer_ack_point); - chk->send_size = (sizeof(struct sctp_forward_tsn_chunk) + - (cnt_of_skipped * sizeof(struct sctp_strseq))); SCTP_BUF_LEN(chk->data) = chk->send_size; fwdtsn++; /*- From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 09:51:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 631711065679; Mon, 26 Jul 2010 09:51:00 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 222338FC17; Mon, 26 Jul 2010 09:50:58 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 626CF1FFC33; Mon, 26 Jul 2010 09:50:56 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 3AA31844EC; Mon, 26 Jul 2010 11:50:56 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gabor Kovesdan References: <201007251857.o6PIvmoS031484@svn.freebsd.org> <4C4CA13C.1090502@FreeBSD.org> Date: Mon, 26 Jul 2010 11:50:55 +0200 In-Reply-To: <4C4CA13C.1090502@FreeBSD.org> (Gabor Kovesdan's message of "Sun, 25 Jul 2010 22:40:28 +0200") Message-ID: <86ocduy3k0.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, delphij@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r210479 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 09:51:00 -0000 Gabor Kovesdan writes: > I did run regression testing, the test suite that GNU grep has. Does that test suite include a test for the bug you fixed? If not, running it before committing this particular patch was close to useless. By definition, a regression test is designed to trigger a specific bug so the developer(s) can make sure it is not reintroduced at some later point once it's been fixed. Standard procedure is for the developer to write a regression test *before* fixing the bug, and verifying that the test fails when run against the unpatched code and succeeds when run against the patched code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 10:37:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C94A1065673; Mon, 26 Jul 2010 10:37:15 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 392B18FC19; Mon, 26 Jul 2010 10:37:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QAbFsd044916; Mon, 26 Jul 2010 10:37:15 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QAbFuP044914; Mon, 26 Jul 2010 10:37:15 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201007261037.o6QAbFuP044914@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 26 Jul 2010 10:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210496 - head/sys/dev/md X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 10:37:15 -0000 Author: jh Date: Mon Jul 26 10:37:14 2010 New Revision: 210496 URL: http://svn.freebsd.org/changeset/base/210496 Log: - Remove some extra white space. - Wrap g_md_dumpconf() prototype to 80 columns. Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Mon Jul 26 09:26:55 2010 (r210495) +++ head/sys/dev/md/md.c Mon Jul 26 10:37:14 2010 (r210496) @@ -124,10 +124,10 @@ static g_init_t g_md_init; static g_fini_t g_md_fini; static g_start_t g_md_start; static g_access_t g_md_access; -static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp); +static void g_md_dumpconf(struct sbuf *sb, const char *indent, + struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp); -static int mdunits; +static int mdunits; static struct cdev *status_dev = 0; static struct sx md_sx; static struct unrhdr *md_uh; @@ -675,7 +675,7 @@ mdstart_swap(struct md_s *sc, struct bio #if 0 if (bootverbose || bp->bio_offset / PAGE_SIZE < 17) printf("wire_count %d busy %d flags %x hold_count %d act_count %d queue %d valid %d dirty %d @ %d\n", - m->wire_count, m->busy, + m->wire_count, m->busy, m->flags, m->hold_count, m->act_count, m->queue, m->valid, m->dirty, i); #endif } @@ -784,7 +784,6 @@ mdnew(int unit, int *errp, enum md_types static void mdinit(struct md_s *sc) { - struct g_geom *gp; struct g_provider *pp; @@ -931,7 +930,7 @@ mdcreate_vnode(struct md_s *sc, struct m if (nd.ni_vp->v_type != VREG) { error = EINVAL; goto bad; - } + } error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); if (error != 0) goto bad; @@ -1186,7 +1185,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd static int mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { - int error; + int error; sx_xlock(&md_sx); error = xmdctlioctl(dev, cmd, addr, flags, td); @@ -1218,7 +1217,6 @@ md_preloaded(u_char *image, size_t lengt static void g_md_init(struct g_class *mp __unused) { - caddr_t mod; caddr_t c; u_char *ptr, *name, *type; @@ -1264,7 +1262,7 @@ g_md_init(struct g_class *mp __unused) } static void -g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, +g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp) { struct md_s *mp; From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 12:47:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF6591065675; Mon, 26 Jul 2010 12:47:39 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E281A8FC18; Mon, 26 Jul 2010 12:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QCldKf073616; Mon, 26 Jul 2010 12:47:39 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QClddw073614; Mon, 26 Jul 2010 12:47:39 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007261247.o6QClddw073614@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 26 Jul 2010 12:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210497 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 12:47:40 -0000 Author: gavin Date: Mon Jul 26 12:47:39 2010 New Revision: 210497 URL: http://svn.freebsd.org/changeset/base/210497 Log: Merge r209444 (by thompsa) from head: Add new device ID. PR: usb/146907 Submitted by: Modified: stable/8/sys/dev/usb/net/if_rue.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_rue.c Mon Jul 26 10:37:14 2010 (r210496) +++ stable/8/sys/dev/usb/net/if_rue.c Mon Jul 26 12:47:39 2010 (r210497) @@ -112,6 +112,7 @@ SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, static const struct usb_device_id rue_devs[] = { {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUAKTX, 0)}, {USB_VPI(USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_USBKR100, 0)}, + {USB_VPI(USB_VENDOR_OQO, USB_PRODUCT_OQO_ETHER01, 0)}, }; /* prototypes */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 12:52:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3491065670; Mon, 26 Jul 2010 12:52:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0738FC12; Mon, 26 Jul 2010 12:52:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QCqjhN074778; Mon, 26 Jul 2010 12:52:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QCqjfd074775; Mon, 26 Jul 2010 12:52:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007261252.o6QCqjfd074775@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 26 Jul 2010 12:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210498 - in head/sys: compat/freebsd32 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 12:52:45 -0000 Author: kib Date: Mon Jul 26 12:52:44 2010 New Revision: 210498 URL: http://svn.freebsd.org/changeset/base/210498 Log: Revert r210451, and the similar part of the r210431. The forward-declaration for the enum tag when enum definition is not complete is not allowed by C99, and is gcc extension. Requested by: stefanf MFC after: 28 days Modified: head/sys/compat/freebsd32/freebsd32_util.h head/sys/sys/imgact.h Modified: head/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_util.h Mon Jul 26 12:47:39 2010 (r210497) +++ head/sys/compat/freebsd32/freebsd32_util.h Mon Jul 26 12:52:44 2010 (r210498) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -101,7 +102,6 @@ int freebsd32_copyiniov(struct iovec32 * struct iovec **iov, int error); void freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32); -enum uio_seg; struct image_args; int freebsd32_exec_copyin_args(struct image_args *args, char *fname, enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv); Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Mon Jul 26 12:47:39 2010 (r210497) +++ head/sys/sys/imgact.h Mon Jul 26 12:52:44 2010 (r210498) @@ -32,6 +32,8 @@ #ifndef _SYS_IMGACT_H_ #define _SYS_IMGACT_H_ +#include + #define MAXSHELLCMDLEN PAGE_SIZE struct image_args { @@ -73,7 +75,6 @@ struct image_params { #ifdef _KERNEL struct sysentvec; struct thread; -enum uio_seg; #define IMGACT_CORE_COMPRESS 0x01 From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 12:57:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA10A1065674; Mon, 26 Jul 2010 12:57:09 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep13.mx.upcmail.net (fep13.mx.upcmail.net [62.179.121.33]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7168FC1D; Mon, 26 Jul 2010 12:57:07 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep13-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100726125705.IGZN23743.viefep13-int.chello.at@edge03.upcmail.net>; Mon, 26 Jul 2010 14:57:05 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge03.upcmail.net with edge id mcx41e03A0a5KZh03cx5ma; Mon, 26 Jul 2010 14:57:05 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 3ECD86D438; Mon, 26 Jul 2010 14:57:04 +0200 (CEST) Date: Mon, 26 Jul 2010 14:57:04 +0200 From: Stefan Farfeleder To: Konstantin Belousov Message-ID: <20100726125703.GF1732@mole.fafoe.narf.at> References: <201007261252.o6QCqjfd074775@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007261252.o6QCqjfd074775@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Cloudmark-Analysis: v=1.1 cv=LDjS4OUiOlTC72n1a9cQM4olW91MdL4bu39eiUxSmiw= c=1 sm=0 a=xKwWdGI5KT0A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=FSBq1GWijnuGHDeOzKAA:9 a=iuilgpe4wu__BB00nAMzi6uPVmgA:4 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210498 - in head/sys: compat/freebsd32 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 12:57:09 -0000 On Mon, Jul 26, 2010 at 12:52:45PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Jul 26 12:52:44 2010 > New Revision: 210498 > URL: http://svn.freebsd.org/changeset/base/210498 > > Log: > Revert r210451, and the similar part of the r210431. The forward-declaration > for the enum tag when enum definition is not complete is not allowed by > C99, and is gcc extension. > > Requested by: stefanf > MFC after: 28 days Thank you. From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 12:58:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AC21065673; Mon, 26 Jul 2010 12:58:20 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74D4E8FC24; Mon, 26 Jul 2010 12:58:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QCwKFM076093; Mon, 26 Jul 2010 12:58:20 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QCwKQu076091; Mon, 26 Jul 2010 12:58:20 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007261258.o6QCwKQu076091@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 26 Jul 2010 12:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210499 - stable/7/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 12:58:20 -0000 Author: gavin Date: Mon Jul 26 12:58:20 2010 New Revision: 210499 URL: http://svn.freebsd.org/changeset/base/210499 Log: Support the Novatel U760 dongle (Verizon and Bell Canada) Note that this is a direct commit to stable/7 due to differences in the code in head. No mergeinfo as the commit that added this in head made many other changes at the same time. PR: usb/138138 Submitted by: mike tancsa Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Mon Jul 26 12:52:44 2010 (r210498) +++ stable/7/sys/dev/usb/u3g.c Mon Jul 26 12:58:20 2010 (r210499) @@ -149,6 +149,7 @@ static const struct u3g_dev_type_s u3g_d {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U727 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740 }, U3GSP_HSDPA, U3GINIT_EJECT }, {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740_2 }, U3GSP_HSDPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U760 }, U3GSP_CDMA, U3GINIT_EJECT }, {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U870 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V620 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V640 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 13:48:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E98A1065674; Mon, 26 Jul 2010 13:48:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01B948FC14; Mon, 26 Jul 2010 13:48:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QDmZKg087429; Mon, 26 Jul 2010 13:48:35 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QDmZiU087427; Mon, 26 Jul 2010 13:48:35 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007261348.o6QDmZiU087427@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 26 Jul 2010 13:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210500 - head/sys/netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 13:48:36 -0000 Author: glebius Date: Mon Jul 26 13:48:35 2010 New Revision: 210500 URL: http://svn.freebsd.org/changeset/base/210500 Log: Zero padding fields of netflow records. This helps to reduce size of compressed export logs. Requested by: Alexey Illarionov Modified: head/sys/netgraph/netflow/netflow.c Modified: head/sys/netgraph/netflow/netflow.c ============================================================================== --- head/sys/netgraph/netflow/netflow.c Mon Jul 26 12:58:20 2010 (r210499) +++ head/sys/netgraph/netflow/netflow.c Mon Jul 26 13:48:35 2010 (r210500) @@ -167,6 +167,7 @@ get_export_dgram(priv_p priv) dgram = mtod(m, struct netflow_v5_export_dgram *); dgram->header.count = 0; dgram->header.version = htons(NETFLOW_V5); + dgram->header.pad = 0; } @@ -644,6 +645,8 @@ export_add(item_p item, struct flow_entr rec->tos = fle->f.r.r_tos; rec->dst_mask = fle->f.dst_mask; rec->src_mask = fle->f.src_mask; + rec->pad1 = 0; + rec->pad2 = 0; /* Not supported fields. */ rec->src_as = rec->dst_as = 0; From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 14:38:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CCE01065670; Mon, 26 Jul 2010 14:38:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8AB8FC16; Mon, 26 Jul 2010 14:38:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QEcpuB098817; Mon, 26 Jul 2010 14:38:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QEcpcr098815; Mon, 26 Jul 2010 14:38:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007261438.o6QEcpcr098815@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 26 Jul 2010 14:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210501 - head/sys/amd64/linux32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 14:38:51 -0000 Author: kib Date: Mon Jul 26 14:38:51 2010 New Revision: 210501 URL: http://svn.freebsd.org/changeset/base/210501 Log: Remove unneeded includes. Submitted by: alc MFC after: 1 week Modified: head/sys/amd64/linux32/linux32_machdep.c Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Mon Jul 26 13:48:35 2010 (r210500) +++ head/sys/amd64/linux32/linux32_machdep.c Mon Jul 26 14:38:51 2010 (r210501) @@ -60,8 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 16:16:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B514F1065672; Mon, 26 Jul 2010 16:16:39 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4FFB8FC0A; Mon, 26 Jul 2010 16:16:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QGGdlC020511; Mon, 26 Jul 2010 16:16:39 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QGGdZN020510; Mon, 26 Jul 2010 16:16:39 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201007261616.o6QGGdZN020510@svn.freebsd.org> From: Shteryana Shopova Date: Mon, 26 Jul 2010 16:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210502 - head/usr.sbin/bsnmpd/modules/snmp_wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 16:16:39 -0000 Author: syrinx Date: Mon Jul 26 16:16:39 2010 New Revision: 210502 URL: http://svn.freebsd.org/changeset/base/210502 Log: Bring in a SNMP module to support monitoring cloned wireless interfaces via bsnmpd(1). The module implements a private BEGEMOT-WIRELESS-MIB. Sponsored by: The FreeBSD Foundation Reviewed by: philip@ Approved by: philip@ Added: head/usr.sbin/bsnmpd/modules/snmp_wlan/ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.c (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def (contents, props changed) Added: head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt Mon Jul 26 16:16:39 2010 (r210502) @@ -0,0 +1,3898 @@ +-- +-- Copyright (C) 2010 The FreeBSD Foundation +-- All rights reserved. +-- +-- This documentation was written by Shteryana Sotirova Shopova under +-- sponsorship from the FreeBSD Foundation. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- 1. Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- 2. Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in the +-- documentation and/or other materials provided with the distribution. +-- +-- THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +-- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +-- ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +-- SUCH DAMAGE. +-- +-- $FreeBSD$ +-- + +BEGEMOT-WIRELESS-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, + Counter32, Integer32, TimeTicks, Unsigned32, mib-2 + FROM SNMPv2-SMI + TEXTUAL-CONVENTION, MacAddress, TruthValue, RowStatus, + DisplayString + FROM SNMPv2-TC + InterfaceIndex, ifIndex FROM IF-MIB + begemot + FROM BEGEMOT-MIB; + +begemotWlan MODULE-IDENTITY + LAST-UPDATED "201005170000Z" + ORGANIZATION "The FreeBSD Foundation" + CONTACT-INFO + " Shteryana Shopova + + Postal: 12 Andrey Lyapchev Blvd. + block 2, ap.19 + 1797 Sofia + Bulgaria + + Fax: N/A + + E-Mail: syrinx@FreeBSD.org" + DESCRIPTION + "The Begemot MIB for managing IEEE802.11 interfaces." + REVISION "201005170000Z" + DESCRIPTION + "Initial revision." + ::= { begemot 210 } + +-- ---------------------------------------------------------- -- +-- Textual conventions +-- ---------------------------------------------------------- -- +WlanMgmtReasonCode ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Enumeration of reason and codes used in IEEE802.11 + management frames to indicate why an action took place." + SYNTAX INTEGER { + unspecified(1), + authenticationExpire(2), + authenticationLeave(3), + associationExpire(4), + associationTooMany(5), + notAuthenticated(6), + notAssociated(7), + associationLeave(8), + associationNotAuthenticated(9), +-- XXX: TODO - FIXME + dissasocPwrcapBad(10), + dissasocSuperchanBad(11), + ieInvalid(13), + micFailure(14), + fourWayHandshakeTimeout(15), + groupKeyUpdateTimeout(16), + ieIn4FourWayDiffers(17), + groupCipherInvalid(18), + pairwiseCiherInvalid(19), + akmpInvalid(20), + unsupportedRsnIeVersion(21), + invalidRsnIeCap(22), + dot1xAuthFailed(23), + cipherSuiteRejected(24), + unspeciffiedQos(32), + insufficientBw(33), + tooManyFrames(34), + outsideTxOp(35), + leavingQbss(36), + badMechanism(37), + setupNeeded(38), + timeout(39) + } + +WlanMgmtMeshReasonCode ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Enumeration of reason and codes used in IEEE802.11 + mesh routing management frames to indicate why an + action took place." + SYNTAX INTEGER { +-- XXX: TODO - FIXME + peerLinkCancelled(2), + maxPeers(3), + cpViolation(4), + closeRcvd(5), + maxRetries(6), + confirmTimeout(7), + invalidGtk(8), + inconsistentParams(9), + invalidSecurity(10), + perrUnspecified(11), + perrNoFI(12), + perrDestUnreach(13) + } + +WlanMgmtStatusCode ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Enumeration of reason and codes used in IEEE802.11 + management frames to indicate what the result of an + operation is." + SYNTAX INTEGER { +-- XXX: TODO - FIXME + success(0), + unspecified(1), + capabilitiesInfo(10), + notAssociated(11), + other(12), + algorithm(13), + sequence(14), + challenge(15), + timeout(16), + tooMany(17), + basicRate(18), + spRequired(19), + pbccRequired(20), + caRequired(21), + specMgmtRequired(22), + pwrcapRequire(23), + superchanRequired(24), + shortSlotRequired(25), + dssofdmRequired(26), + missingHTCaps(27), + invalidIE(40), + groupCipherInvalid(41), + pairwiseCipherInvalid(42), + akmpInvalid(43), + unsupportedRsnIEVersion(44), + invalidRsnIECap(45), + cipherSuiteRejected(46) + } + +WlanRegDomainCode ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Enumeration of regdomain codes." + SYNTAX INTEGER { + fcc(1), + ca(2), + etsi(3), + etsi2(4), + etsi3(5), + fcc3(6), + japan(7), + korea(8), + apac(9), + apac2(10), + apac3(11), + row(12), + none(13), + debug(14), + sr9(15), + xr9(16), + gz901(17) + } + +WlanIfaceDot11nPduType ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Enumeration of values for PDU transmit/receive enabled." + SYNTAX INTEGER { + disabled(0), + rxOnly(1), + txOnly(2), + txAndRx(3) + } + +WlanPeerCapabilityFlags ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "A list of capability bits that may be advertised by a peer." + SYNTAX BITS { + ess(1), + ibss(2), + cfPollable(3), + cfPollRequest(4), + privacy(5), + shortPreamble(6), + pbcc(7), + channelAgility(8), + shortSlotTime(9), + rsn(10), + dsssofdm(11) + } + +WlanIfPhyMode ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "A list of wireless PHY operating modes." + SYNTAX INTEGER { + auto(1), + dot11a(2), + dot11b(3), + dot11g(4), + fh(5), + turboA(6), + turboG(7), + sturboA(8), + dot11na(9), + dot11ng(10), + ofdmHalf(11), + ofdmQuarter(12) + } + +-- ---------------------------------------------------------- -- +-- Subtrees in the Begemot Wireless MIB +-- ---------------------------------------------------------- -- +begemotWlanNotifications OBJECT IDENTIFIER ::= { begemotWlan 0 } + +begemotWlanInterface OBJECT IDENTIFIER ::= { begemotWlan 1 } + +begemotWlanScanning OBJECT IDENTIFIER ::= { begemotWlan 2 } + +begemotWlanStatistics OBJECT IDENTIFIER ::= { begemotWlan 3 } + +begemotWlanWep OBJECT IDENTIFIER ::= { begemotWlan 4 } + +begemotWlanMACAccessControl OBJECT IDENTIFIER ::= { begemotWlan 5 } + +begemotWlanMeshRouting OBJECT IDENTIFIER ::= { begemotWlan 6 } + +-- ---------------------------------------------------------- -- +-- begemotWlanMultimedia OBJECT IDENTIFIER ::= { begemotWlan 7 } +-- ---------------------------------------------------------- -- + +-- ---------------------------------------------------------- -- +-- Cloned wireless interfaces' database +-- ---------------------------------------------------------- -- +wlanInterfaceTable OBJECT-TYPE + SYNTAX SEQUENCE OF WlanInterfaceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A table that contains the list of cloned wireless + interfaces created on the system." + ::= { begemotWlanInterface 1 } + +wlanInterfaceEntry OBJECT-TYPE + SYNTAX WlanInterfaceEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information for a cloned wireless interface." + INDEX { wlanIfaceName } + ::= { wlanInterfaceTable 1 } + +WlanInterfaceEntry ::= SEQUENCE { + wlanIfaceIndex InterfaceIndex, + wlanIfaceName DisplayString, + wlanParentIfName DisplayString, + wlanIfaceOperatingMode INTEGER, + wlanIfaceFlags BITS, + wlanIfaceBssid MacAddress, + wlanIfaceLocalAddress MacAddress, + wlanIfaceStatus RowStatus, + wlanIfaceState INTEGER +} + +wlanIfaceIndex OBJECT-TYPE + SYNTAX InterfaceIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The ifIndex of this cloned wireless interface." + ::= { wlanInterfaceEntry 1 } + +wlanIfaceName OBJECT-TYPE + SYNTAX DisplayString (SIZE(1..32)) + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The name of this cloned wireless interface." + ::= { wlanInterfaceEntry 2 } + +wlanParentIfName OBJECT-TYPE + SYNTAX DisplayString (SIZE(1..32)) + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The name of this cloned wireless interface's parent hardware + interface." + ::= { wlanInterfaceEntry 3 } + +wlanIfaceOperatingMode OBJECT-TYPE + SYNTAX INTEGER { + ibss(0), + station(1), + wds(2), + adhocDemo(3), + hostAp(4), + monitor(5), + meshPoint(6), + tdma(7) + } + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The desired operating mode of the cloned wireless interface." + DEFVAL { station } + ::= { wlanInterfaceEntry 4 } + +wlanIfaceFlags OBJECT-TYPE + SYNTAX BITS { + uniqueBssid(1), + noBeacons(2), + wdsLegacy(3) + } + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "Flags per cloned wireless interface used during creation." + ::= { wlanInterfaceEntry 5 } + +wlanIfaceBssid OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The BSSID assigned to a cloned wireless interface operating in + WDS mode." + ::= { wlanInterfaceEntry 6 } + +wlanIfaceLocalAddress OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The unique local MAC address assigned to the cloned wireless + interface during creation." + ::= { wlanInterfaceEntry 7 } + +wlanIfaceStatus OBJECT-TYPE + SYNTAX RowStatus + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "This column allows creation or deletion of cloned wireless + interfaces." + ::= { wlanInterfaceEntry 8 } + +wlanIfaceState OBJECT-TYPE + SYNTAX INTEGER { + up(1), + down(2) + } + MAX-ACCESS read-create + STATUS current + DESCRIPTION + "The operating state of the interface." + ::= { wlanInterfaceEntry 9 } + +wlanIfParentTable OBJECT-TYPE + SYNTAX SEQUENCE OF WlanIfParentEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A table that contains information about the parent hardware + interface of every cloned wireless interface in the system." + ::= { begemotWlanInterface 2 } + +wlanIfParentEntry OBJECT-TYPE + SYNTAX WlanIfParentEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information for the parent hardware interface of a cloned + wireless interface." + AUGMENTS { wlanInterfaceEntry } + ::= { wlanIfParentTable 1 } + +WlanIfParentEntry ::= SEQUENCE { + wlanIfParentDriverCapabilities BITS, + wlanIfParentCryptoCapabilities BITS, + wlanIfParentHTCapabilities BITS +} + +wlanIfParentDriverCapabilities OBJECT-TYPE + SYNTAX BITS { + station(1), + ieee8023encap(2), + athFastFrames(3), + athTurbo(4), + ibss(5), + pmgt(6), + hostAp(7), + ahDemo(8), + swRetry(9), + txPmgt(10), + shortSlot(11), + shortPreamble(12), + monitor(13), + dfs(14), + mbss(15), + wpa1(16), + wpa2(17), + burst(18), + wme(19), + wds(20), + bgScan(21), + txFrag(22), + tdma(23) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The driver capabilities of this cloned interface's parent." + ::= { wlanIfParentEntry 1 } + +wlanIfParentCryptoCapabilities OBJECT-TYPE + SYNTAX BITS { + wep(1), + tkip(2), + aes(3), + aesCcm(4), + tkipMic(5), + ckip(6) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The hardware cryptographic capabilities of this cloned + interface's parent." + ::= { wlanIfParentEntry 2 } + +wlanIfParentHTCapabilities OBJECT-TYPE + SYNTAX BITS { + ldpc(1), + chwidth40(2), + greenField(3), + shortGi20(4), + shortGi40(5), + txStbc(6), + delba(7), + amsdu7935(8), + dssscck40(9), + psmp(10), + fortyMHzIntolerant(11), + lsigTxOpProt(12), + htcAmpdu(13), + htcAmsdu(14), + htcHt(15), + htcSmps(16), + htcRifs(17) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The hardware High Throughput capabilities of this cloned + interface's parent." + ::= { wlanIfParentEntry 3 } + +wlanIfaceConfigTable OBJECT-TYPE + SYNTAX SEQUENCE OF WlanIfaceConfigEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A table that contains a list of configuration parameters per + cloned wireless interface. Some of the parameters may not be + applicable depending on the underlying device's hardware + capabilities and operating mode of the virtual interface." + ::= { begemotWlanInterface 3 } + +wlanIfaceConfigEntry OBJECT-TYPE + SYNTAX WlanIfaceConfigEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A list of configuration parameters for a cloned wireless interface." + AUGMENTS { wlanInterfaceEntry } + ::= { wlanIfaceConfigTable 1 } + +WlanIfaceConfigEntry ::= SEQUENCE { + wlanIfacePacketBurst TruthValue, + wlanIfaceCountryCode OCTET STRING, + wlanIfaceRegDomain INTEGER, + wlanIfaceDesiredSsid OCTET STRING, + wlanIfaceDesiredChannel INTEGER, + wlanIfaceDynamicFreqSelection TruthValue, + wlanIfaceFastFrames TruthValue, + wlanIfaceDturbo TruthValue, + wlanIfaceTxPower INTEGER, + wlanIfaceFragmentThreshold INTEGER, + wlanIfaceRTSThreshold INTEGER, + wlanIfaceWlanPrivacySubscribe TruthValue, +-- Parameters for station mode + wlanIfaceBgScan TruthValue, + wlanIfaceBgScanIdle INTEGER, + wlanIfaceBgScanInterval INTEGER, + wlanIfaceBeaconMissedThreshold INTEGER, + wlanIfaceDesiredBssid MacAddress, + wlanIfaceRoamingMode INTEGER, +-- Additional parameters when operating in host-ap/ad-hoc mode + wlanIfaceDot11d TruthValue, + wlanIfaceDot11h TruthValue, + wlanIfaceDynamicWds TruthValue, + wlanIfacePowerSave TruthValue, + wlanIfaceApBridge TruthValue, + wlanIfaceBeaconInterval INTEGER, + wlanIfaceDtimPeriod INTEGER, + wlanIfaceHideSsid TruthValue, + wlanIfaceInactivityProccess TruthValue, + wlanIfaceDot11gProtMode INTEGER, + wlanIfaceDot11gPureMode TruthValue, + wlanIfaceDot11nPureMode TruthValue, + wlanIfaceDot11nAmpdu INTEGER, + wlanIfaceDot11nAmpduDensity INTEGER, + wlanIfaceDot11nAmpduLimit INTEGER, + wlanIfaceDot11nAmsdu INTEGER, + wlanIfaceDot11nAmsduLimit INTEGER, + wlanIfaceDot11nHighThroughput TruthValue, + wlanIfaceDot11nHTCompatible TruthValue, + wlanIfaceDot11nHTProtMode INTEGER, + wlanIfaceDot11nRIFS TruthValue, + wlanIfaceDot11nShortGI TruthValue, + wlanIfaceDot11nSMPSMode INTEGER, +-- Parameters when operating in tdma mode + wlanIfaceTdmaSlot INTEGER, + wlanIfaceTdmaSlotCount INTEGER, + wlanIfaceTdmaSlotLength INTEGER, + wlanIfaceTdmaBeaconInterval INTEGER +} + +wlanIfacePacketBurst OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls whether packet bursting is + enabled on the interface." + ::= { wlanIfaceConfigEntry 1 } + +wlanIfaceCountryCode OBJECT-TYPE + SYNTAX OCTET STRING (SIZE(3)) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls the country regulatory + constraints for operation of this wireless interface. The first + two octets of this string is the two character country code as + described in ISO/IEC 3166-1. The third octet shall contain one + of the following: + + 1. an ASCII space character, if the regulations under which the + interface is operating include all environments in the specified + country. + + 2. an ASCII 'O' character, if the country's regulastions are for + Outdoor environment only. + + 3. an ASCII 'I' character, if the country's regulastions are for + Indoor environment only." + ::= { wlanIfaceConfigEntry 2 } + +wlanIfaceRegDomain OBJECT-TYPE + SYNTAX WlanRegDomainCode + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "This object specifies the regulatory domain to use when calculating + the regulatory constraints for operation of the interface." + ::= { wlanIfaceConfigEntry 3 } + +wlanIfaceDesiredSsid OBJECT-TYPE + SYNTAX OCTET STRING (SIZE(0..32)) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The desired SSID for the interface as an ASCII string. + Specifying an empty string shall remove the current configured + SSID." + ::= { wlanIfaceConfigEntry 4 } + +wlanIfaceDesiredChannel OBJECT-TYPE + SYNTAX INTEGER + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The desired operating channel for this interface. The value of this + column is the channel index (wlanIfaceChannelId) of the corresponding + entry from the wlanIfaceChannelTable. The interface status must be + down so that the current operating channel may be set properly." + ::= { wlanIfaceConfigEntry 5 } + +wlanIfaceDynamicFreqSelection OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether Dynamic Frequency + Selection (DFS) as specified in 802.11h is enabled on an + interface that supports 802.11h and DFS." + DEFVAL { false } + ::= { wlanIfaceConfigEntry 6 } + +wlanIfaceFastFrames OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls whether use of Atheros Fast + Frames is enabled when when communicating with another Fast + Frames-capable station. The value is only meaningfull for + interfaces that support Atheros Fast Frames." + ::= { wlanIfaceConfigEntry 7 } + +wlanIfaceDturbo OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls whether use of Atheros Dynamic + Turbo mode is enabled when when communicating with another Dynamic + Turbo-capable station. The value is only meaningfull for interfaces + that support Atheros Dynamic Turbo mode." + ::= { wlanIfaceConfigEntry 8 } + +wlanIfaceTxPower OBJECT-TYPE + SYNTAX INTEGER + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls the power used to transmit + frames. Accepted values are in units of one tenths of a dBm in + steps of .5 dBm, e.g setting the value of this object to 155 + results in 15.5 dBm transmit power configured on the interface." + ::= { wlanIfaceConfigEntry 9 } + +wlanIfaceFragmentThreshold OBJECT-TYPE + SYNTAX INTEGER (256..2346) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls the threshold for which + transmitted frames are broken into fragments. Setting the value + of this object to 2346 will disable transmit fragmentation." + DEFVAL { 2346 } + ::= { wlanIfaceConfigEntry 10 } + +wlanIfaceRTSThreshold OBJECT-TYPE + SYNTAX INTEGER (1..2346) + UNITS "bytes" + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object controls the threshold for which + transmitted frames are preceded by transmission of an RTS + control frame. Setting the value of this object to 2346 will + disable transmission of RTS frames." + DEFVAL { 2346 } + ::= { wlanIfaceConfigEntry 11 } + +wlanIfaceWlanPrivacySubscribe OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether Wireless Privacy + Subscriber support is enabled on the interface." + ::= { wlanIfaceConfigEntry 12 } + +wlanIfaceBgScan OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether background scanning + is enabled for an interface operating in station mode." + ::= { wlanIfaceConfigEntry 13 } + +wlanIfaceBgScanIdle OBJECT-TYPE + SYNTAX INTEGER + UNITS "milliseconds" + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the minimum time a station must + be idle before a background scan is initiated on an interface + operating in station mode." + DEFVAL { 250 } + ::= { wlanIfaceConfigEntry 14 } + +wlanIfaceBgScanInterval OBJECT-TYPE + SYNTAX INTEGER + UNITS "seconds" + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the interval at which background + scanning is attempted when operating in station mode." + DEFVAL { 300 } + ::= { wlanIfaceConfigEntry 15 } + +wlanIfaceBeaconMissedThreshold OBJECT-TYPE + SYNTAX INTEGER (1..255) + UNITS "frames" + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the number of consequtive missed + beacons before an interface operating in station mode will attempt + to search for a new access point." + DEFVAL { 7 } + ::= { wlanIfaceConfigEntry 16 } + +wlanIfaceDesiredBssid OBJECT-TYPE + SYNTAX MacAddress + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the MAC address of the desired + access point to use when an interface is operating as a station." + ::= { wlanIfaceConfigEntry 17 } + +wlanIfaceRoamingMode OBJECT-TYPE + SYNTAX INTEGER { + device(1), + auto(2), + manual(3) + } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the desired system behavior + when the interface is operating as a station and the communication + with the current access point is broken." + DEFVAL { auto } + ::= { wlanIfaceConfigEntry 18 } + +wlanIfaceDot11d OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether 802.11d specification + support is enabled." + DEFVAL { false } + ::= { wlanIfaceConfigEntry 19 } + +wlanIfaceDot11h OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether 802.11h support + including spectrum management is enabled. The value is only + meaningfull for interfaces that support 802.11h specification." + DEFVAL { false } + ::= { wlanIfaceConfigEntry 20 } + +wlanIfaceDynamicWds OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether Dynamic WDS (DWDS) + support is enabled. The value is only meaningfull for interfaces + that support Dynamic WDS." + ::= { wlanIfaceConfigEntry 21 } + +wlanIfacePowerSave OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether powersave operation + is enabled. The value is only meaningfull for interfaces that + support powersave operation." + ::= { wlanIfaceConfigEntry 22 } + +wlanIfaceApBridge OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether packets between + wireless clients will be passed directly by an interface + operating in host ap mode. Disabling it may be usefull in + situations when traffic between wireless clients needs to be + processed with packet filtering." + DEFVAL { true } + ::= { wlanIfaceConfigEntry 23 } + +wlanIfaceBeaconInterval OBJECT-TYPE + SYNTAX INTEGER (25..1000) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the interval at with beacon + frames are sent when an interface is operating in ad-hoc or ap + mode. The beacon interval is specified in TU's (1024 usecs)." + DEFVAL { 100 } + ::= { wlanIfaceConfigEntry 24 } + +wlanIfaceDtimPeriod OBJECT-TYPE + SYNTAX INTEGER (1..15) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the DTIM period at which + buffered multicast data frames are transmitted by an interface + operating in host ap mode. Its value indicates the number of + beacon intervals between DTIM." + DEFVAL { 1 } + ::= { wlanIfaceConfigEntry 25 } + +wlanIfaceHideSsid OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether broadcasting of the + SSID in beacon frames and responding to undirected probe request + frames is enabled for an interface operating in ap mode." + DEFVAL { false } + ::= { wlanIfaceConfigEntry 26 } + +wlanIfaceInactivityProccess OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether inactivity processing + for associated station on an interface operating in ap mode is + enabled." + DEFVAL { true } + ::= { wlanIfaceConfigEntry 27 } + +wlanIfaceDot11gProtMode OBJECT-TYPE + SYNTAX INTEGER { + off(1), + cts(2), + rtscts(3) + } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the technique used for + protecting OFDM frames in a mixed 11b/11g network." + ::= { wlanIfaceConfigEntry 28 } + +wlanIfaceDot11gPureMode OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether only 802.11g-capable + stations will be allowed to associate to an interface operating + as access point in 802.11g mode." + ::= { wlanIfaceConfigEntry 29 } + +wlanIfaceDot11nPureMode OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether only HT-capable + stations will be allowed to associate to an interface operating + as access point in 802.11n mode." + ::= { wlanIfaceConfigEntry 30 } + +wlanIfaceDot11nAmpdu OBJECT-TYPE + SYNTAX WlanIfaceDot11nPduType + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether sending and + receiving of AMPDU frames is enabled on an interface + operating in 802.11n mode." + DEFVAL { txAndRx } + ::= { wlanIfaceConfigEntry 31 } + +wlanIfaceDot11nAmpduDensity OBJECT-TYPE + SYNTAX INTEGER (0|25|50|100|200|400|800|1600) + UNITS "1/100ths-of-microsecond" + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the AMPDU density parameter + for an interface operating in 802.11n mode." + ::= { wlanIfaceConfigEntry 32 } + +wlanIfaceDot11nAmpduLimit OBJECT-TYPE + SYNTAX INTEGER (8192|16384|32768|65536) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies a limit on the AMPDU packet + size for receiving AMPDU frames for an interface operating in + 802.11n mode." + ::= { wlanIfaceConfigEntry 33 } + +wlanIfaceDot11nAmsdu OBJECT-TYPE + SYNTAX WlanIfaceDot11nPduType + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether sending and receiving + of AMSDU frames is enabled on an interface operating in 802.11n + mode." + DEFVAL { rxOnly } + ::= { wlanIfaceConfigEntry 34 } + +wlanIfaceDot11nAmsduLimit OBJECT-TYPE + SYNTAX INTEGER (3839|7935) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies a limit on the AMSDU packet + size when sending and receiving AMSDU frames for an interface + operating in 802.11n mode." + ::= { wlanIfaceConfigEntry 35 } + +wlanIfaceDot11nHighThroughput OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether use of High Throughput + (HT) is enabled for an interface operating in 802.11n mode." + DEFVAL { true } + ::= { wlanIfaceConfigEntry 36 } + +wlanIfaceDot11nHTCompatible OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether use of compatibility + support for pre-802.11n devices is enabled for an interface + operating in 802.11n mode." + DEFVAL { true } + ::= { wlanIfaceConfigEntry 37 } + +wlanIfaceDot11nHTProtMode OBJECT-TYPE + SYNTAX INTEGER { + off(1), + rts(2) + } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies the technique used for + protecting HT frames in a mixed legacy/HT network for interfaces + operating in 802.11n mode." + DEFVAL { rts } + ::= { wlanIfaceConfigEntry 38 } + +wlanIfaceDot11nRIFS OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The value of this object specifies whether Reduced InterFrame + Spacing (RIFS) is enabled for an interface operating in 802.11n + mode on an HT channel." + ::= { wlanIfaceConfigEntry 39 } + +wlanIfaceDot11nShortGI OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 16:20:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32C2F106566B; Mon, 26 Jul 2010 16:20:53 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 245DE8FC18; Mon, 26 Jul 2010 16:20:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QGKra8021496; Mon, 26 Jul 2010 16:20:53 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QGKrYs021494; Mon, 26 Jul 2010 16:20:53 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201007261620.o6QGKrYs021494@svn.freebsd.org> From: Shteryana Shopova Date: Mon, 26 Jul 2010 16:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210503 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 16:20:53 -0000 Author: syrinx Date: Mon Jul 26 16:20:52 2010 New Revision: 210503 URL: http://svn.freebsd.org/changeset/base/210503 Log: Add a (disabled) configuration line to enable the snmp_wlan(3) module. Sponsored by: The FreeBSD Foundation Modified: head/etc/snmpd.config Modified: head/etc/snmpd.config ============================================================================== --- head/etc/snmpd.config Mon Jul 26 16:16:39 2010 (r210502) +++ head/etc/snmpd.config Mon Jul 26 16:20:52 2010 (r210503) @@ -95,3 +95,9 @@ begemotSnmpdModulePath."mibII" = "/usr/l # This requires the mibII module. # #begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" + +# +# Wireless module +# This requires the mibII module. +# +#begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so" From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 16:26:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26791106564A; Mon, 26 Jul 2010 16:26:27 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D530E8FC1D; Mon, 26 Jul 2010 16:26:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QGQQds022775; Mon, 26 Jul 2010 16:26:26 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QGQQ7R022773; Mon, 26 Jul 2010 16:26:26 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201007261626.o6QGQQ7R022773@svn.freebsd.org> From: Shteryana Shopova Date: Mon, 26 Jul 2010 16:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210504 - head/usr.sbin/bsnmpd/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 16:26:27 -0000 Author: syrinx Date: Mon Jul 26 16:26:26 2010 New Revision: 210504 URL: http://svn.freebsd.org/changeset/base/210504 Log: Connect the snmp_wlan(3) module to the build. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/bsnmpd/modules/Makefile Modified: head/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/Makefile Mon Jul 26 16:20:52 2010 (r210503) +++ head/usr.sbin/bsnmpd/modules/Makefile Mon Jul 26 16:26:26 2010 (r210504) @@ -12,7 +12,8 @@ SUBDIR= ${_snmp_atm} \ snmp_bridge \ snmp_hostres \ snmp_mibII \ - snmp_pf + snmp_pf \ + snmp_wlan .if ${MK_NETGRAPH_SUPPORT} != "no" SUBDIR+=snmp_netgraph From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 17:31:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6A3C1065670; Mon, 26 Jul 2010 17:31:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6E478FC0A; Mon, 26 Jul 2010 17:31:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QHVFxW037058; Mon, 26 Jul 2010 17:31:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QHVFUt037056; Mon, 26 Jul 2010 17:31:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261731.o6QHVFUt037056@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 17:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210505 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 17:31:15 -0000 Author: jhb Date: Mon Jul 26 17:31:15 2010 New Revision: 210505 URL: http://svn.freebsd.org/changeset/base/210505 Log: - Change the warning about PCI-e links narrower than x8 to only apply to 10G cards. 1G cards are x4 only. - Use constants from pcireg.h for reading the current link width. - Use pci_set_max_read_req() rather than implementing it by hand. Reviewed by: np MFC after: 1 week Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Mon Jul 26 16:26:26 2010 (r210504) +++ head/sys/dev/cxgb/cxgb_main.c Mon Jul 26 17:31:15 2010 (r210505) @@ -459,20 +459,18 @@ cxgb_controller_attach(device_t dev) /* find the PCIe link width and set max read request to 4KB*/ if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { - uint16_t lnk, pectl; - lnk = pci_read_config(dev, reg + 0x12, 2); - sc->link_width = (lnk >> 4) & 0x3f; - - pectl = pci_read_config(dev, reg + 0x8, 2); - pectl = (pectl & ~0x7000) | (5 << 12); - pci_write_config(dev, reg + 0x8, pectl, 2); - } + uint16_t lnk; + + lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2); + sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4; + if (sc->link_width < 8 && + (ai->caps & SUPPORTED_10000baseT_Full)) { + device_printf(sc->dev, + "PCIe x%d Link, expect reduced performance\n", + sc->link_width); + } - if (sc->link_width != 0 && sc->link_width <= 4 && - (ai->nports0 + ai->nports1) <= 2) { - device_printf(sc->dev, - "PCIe x%d Link, expect reduced performance\n", - sc->link_width); + pci_set_max_read_req(dev, 4096); } touch_bars(dev); From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 17:38:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67680106566C; Mon, 26 Jul 2010 17:38:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 572018FC15; Mon, 26 Jul 2010 17:38:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QHcuEv038818; Mon, 26 Jul 2010 17:38:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QHcuos038816; Mon, 26 Jul 2010 17:38:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261738.o6QHcuos038816@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 17:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210506 - stable/8/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 17:38:56 -0000 Author: jhb Date: Mon Jul 26 17:38:56 2010 New Revision: 210506 URL: http://svn.freebsd.org/changeset/base/210506 Log: MFC 208633 (Missed in earlier CMCI MFC): Defer initializing machine checks for the boot CPU until the local APIC is fully configured. Modified: stable/8/sys/pc98/pc98/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Mon Jul 26 17:31:15 2010 (r210505) +++ stable/8/sys/pc98/pc98/machdep.c Mon Jul 26 17:38:56 2010 (r210506) @@ -257,8 +257,6 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); - - mca_init(); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 17:39:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABDA71065672; Mon, 26 Jul 2010 17:39:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B7998FC19; Mon, 26 Jul 2010 17:39:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QHdBDZ038923; Mon, 26 Jul 2010 17:39:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QHdBZO038921; Mon, 26 Jul 2010 17:39:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261739.o6QHdBZO038921@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 17:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210507 - stable/7/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 17:39:11 -0000 Author: jhb Date: Mon Jul 26 17:39:11 2010 New Revision: 210507 URL: http://svn.freebsd.org/changeset/base/210507 Log: MFC 208633 (Missed in earlier CMCI MFC): Defer initializing machine checks for the boot CPU until the local APIC is fully configured. Modified: stable/7/sys/pc98/pc98/machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/pc98/pc98/machdep.c ============================================================================== --- stable/7/sys/pc98/pc98/machdep.c Mon Jul 26 17:38:56 2010 (r210506) +++ stable/7/sys/pc98/pc98/machdep.c Mon Jul 26 17:39:11 2010 (r210507) @@ -258,8 +258,6 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); - - mca_init(); } /* From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 18:07:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D321065670; Mon, 26 Jul 2010 18:07:45 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E6E8FC1A; Mon, 26 Jul 2010 18:07:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QI7jK1045334; Mon, 26 Jul 2010 18:07:45 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QI7jBq045332; Mon, 26 Jul 2010 18:07:45 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007261807.o6QI7jBq045332@svn.freebsd.org> From: Rui Paulo Date: Mon, 26 Jul 2010 18:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210508 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 18:07:45 -0000 Author: rpaulo Date: Mon Jul 26 18:07:43 2010 New Revision: 210508 URL: http://svn.freebsd.org/changeset/base/210508 Log: Note that I'm replacing Ed now as rdivacky's mentor. Approved by: core Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Jul 26 17:39:11 2010 (r210507) +++ svnadmin/conf/mentors Mon Jul 26 18:07:43 2010 (r210508) @@ -23,7 +23,7 @@ mdf zml mm delphij nork imp randi cperciva -rdivacky ed +rdivacky rpaulo rstone emaste Co-mentor: jkoshy sbruno scottl snb dwmalone From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 18:22:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E5C11065676; Mon, 26 Jul 2010 18:22:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B68F8FC14; Mon, 26 Jul 2010 18:22:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QIMkuB048695; Mon, 26 Jul 2010 18:22:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QIMkjv048687; Mon, 26 Jul 2010 18:22:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261822.o6QIMkjv048687@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 18:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210509 - in stable/8/sys: amd64/acpica amd64/amd64 amd64/include i386/acpica i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 18:22:46 -0000 Author: jhb Date: Mon Jul 26 18:22:46 2010 New Revision: 210509 URL: http://svn.freebsd.org/changeset/base/210509 Log: MFC 209212: Restore the machine check register banks on resume. For banks being monitored via CMCI, reset the interrupt threshold to 1 on resume. Modified: stable/8/sys/amd64/acpica/acpi_wakeup.c stable/8/sys/amd64/amd64/mca.c stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/amd64/include/mca.h stable/8/sys/i386/acpica/acpi_wakeup.c stable/8/sys/i386/i386/mca.c stable/8/sys/i386/include/mca.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakeup.c Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/amd64/acpica/acpi_wakeup.c Mon Jul 26 18:22:46 2010 (r210509) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -306,6 +307,7 @@ out: #endif load_cr3(cr3); + mca_resume(); intr_resume(); intr_restore(rf); Modified: stable/8/sys/amd64/amd64/mca.c ============================================================================== --- stable/8/sys/amd64/amd64/mca.c Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/amd64/amd64/mca.c Mon Jul 26 18:22:46 2010 (r210509) @@ -642,6 +642,15 @@ static void mca_setup(uint64_t mcg_cap) { + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); TASK_INIT(&mca_task, 0x8000, mca_scan_cpus, NULL); @@ -708,36 +717,54 @@ cmci_monitor(int i) PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); } -/* Must be executed on each CPU. */ -void -mca_init(void) +/* + * For resume, reset the threshold for any banks we monitor back to + * one and throw away the timestamp of the last interrupt. + */ +static void +cmci_resume(int i) +{ + struct cmc_state *cc; + uint64_t ctl; + + KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + + /* Ignore banks not monitored by this CPU. */ + if (!(PCPU_GET(cmci_mask) & 1 << i)) + return; + + cc = &cmc_state[PCPU_GET(cpuid)][i]; + cc->last_intr = -ticks; + ctl = rdmsr(MSR_MC_CTL2(i)); + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= MC_CTL2_CMCI_EN | 1; + wrmsr(MSR_MC_CTL2(i), ctl); +} + +/* + * Initializes per-CPU machine check registers and enables corrected + * machine check interrupts. + */ +static void +_mca_init(int boot) { uint64_t mcg_cap; uint64_t ctl, mask; - int skip; - int i; + int i, skip; /* MCE is required. */ if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; - /* - * On AMD Family 10h processors, unless logging of level one TLB - * parity (L1TP) errors is disabled, enable the recommended workaround - * for Erratum 383. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) - workaround_erratum383 = 1; - if (cpu_feature & CPUID_MCA) { - PCPU_SET(cmci_mask, 0); + if (boot) + PCPU_SET(cmci_mask, 0); mcg_cap = rdmsr(MSR_MCG_CAP); if (mcg_cap & MCG_CAP_CTL_P) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); - if (PCPU_GET(cpuid) == 0) + if (PCPU_GET(cpuid) == 0 && boot) mca_setup(mcg_cap); /* @@ -775,20 +802,40 @@ mca_init(void) if (!skip) wrmsr(MSR_MC_CTL(i), ctl); - if (mcg_cap & MCG_CAP_CMCI_P) - cmci_monitor(i); + if (mcg_cap & MCG_CAP_CMCI_P) { + if (boot) + cmci_monitor(i); + else + cmci_resume(i); + } /* Clear all errors. */ wrmsr(MSR_MC_STATUS(i), 0); } - if (PCPU_GET(cmci_mask) != 0) + if (PCPU_GET(cmci_mask) != 0 && boot) lapic_enable_cmc(); } load_cr4(rcr4() | CR4_MCE); } +/* Must be executed on each CPU during boot. */ +void +mca_init(void) +{ + + _mca_init(1); +} + +/* Must be executed on each CPU during resume. */ +void +mca_resume(void) +{ + + _mca_init(0); +} + /* * The machine check registers for the BSP cannot be initialized until * the local APIC is initialized. This happens at SI_SUB_CPU, Modified: stable/8/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/mp_machdep.c Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/amd64/amd64/mp_machdep.c Mon Jul 26 18:22:46 2010 (r210509) @@ -1273,6 +1273,7 @@ cpususpend_handler(void) /* Restore CR3 and enable interrupts */ load_cr3(cr3); + mca_resume(); lapic_setup(0); intr_restore(rf); } Modified: stable/8/sys/amd64/include/mca.h ============================================================================== --- stable/8/sys/amd64/include/mca.h Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/amd64/include/mca.h Mon Jul 26 18:22:46 2010 (r210509) @@ -49,6 +49,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); int mca_intr(void); +void mca_resume(void); #endif Modified: stable/8/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- stable/8/sys/i386/acpica/acpi_wakeup.c Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/i386/acpica/acpi_wakeup.c Mon Jul 26 18:22:46 2010 (r210509) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -272,6 +273,7 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ; } else { /* Execute Wakeup */ + mca_resume(); intr_resume(); if (bootverbose) { Modified: stable/8/sys/i386/i386/mca.c ============================================================================== --- stable/8/sys/i386/i386/mca.c Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/i386/i386/mca.c Mon Jul 26 18:22:46 2010 (r210509) @@ -657,6 +657,15 @@ static void mca_setup(uint64_t mcg_cap) { + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); TASK_INIT(&mca_task, 0x8000, mca_scan_cpus, NULL); @@ -725,38 +734,56 @@ cmci_monitor(int i) /* Mark this bank as monitored. */ PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); } + +/* + * For resume, reset the threshold for any banks we monitor back to + * one and throw away the timestamp of the last interrupt. + */ +static void +cmci_resume(int i) +{ + struct cmc_state *cc; + uint64_t ctl; + + KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + + /* Ignore banks not monitored by this CPU. */ + if (!(PCPU_GET(cmci_mask) & 1 << i)) + return; + + cc = &cmc_state[PCPU_GET(cpuid)][i]; + cc->last_intr = -ticks; + ctl = rdmsr(MSR_MC_CTL2(i)); + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= MC_CTL2_CMCI_EN | 1; + wrmsr(MSR_MC_CTL2(i), ctl); +} #endif -/* Must be executed on each CPU. */ -void -mca_init(void) +/* + * Initializes per-CPU machine check registers and enables corrected + * machine check interrupts. + */ +static void +_mca_init(int boot) { uint64_t mcg_cap; uint64_t ctl, mask; - int skip; - int i; + int i, skip; /* MCE is required. */ if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; - /* - * On AMD Family 10h processors, unless logging of level one TLB - * parity (L1TP) errors is disabled, enable the recommended workaround - * for Erratum 383. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) - workaround_erratum383 = 1; - if (cpu_feature & CPUID_MCA) { - PCPU_SET(cmci_mask, 0); + if (boot) + PCPU_SET(cmci_mask, 0); mcg_cap = rdmsr(MSR_MCG_CAP); if (mcg_cap & MCG_CAP_CTL_P) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); - if (PCPU_GET(cpuid) == 0) + if (PCPU_GET(cpuid) == 0 && boot) mca_setup(mcg_cap); /* @@ -795,8 +822,12 @@ mca_init(void) wrmsr(MSR_MC_CTL(i), ctl); #ifdef DEV_APIC - if (mcg_cap & MCG_CAP_CMCI_P) - cmci_monitor(i); + if (mcg_cap & MCG_CAP_CMCI_P) { + if (boot) + cmci_monitor(i); + else + cmci_resume(i); + } #endif /* Clear all errors. */ @@ -804,7 +835,7 @@ mca_init(void) } #ifdef DEV_APIC - if (PCPU_GET(cmci_mask) != 0) + if (PCPU_GET(cmci_mask) != 0 && boot) lapic_enable_cmc(); #endif } @@ -812,6 +843,22 @@ mca_init(void) load_cr4(rcr4() | CR4_MCE); } +/* Must be executed on each CPU during boot. */ +void +mca_init(void) +{ + + _mca_init(1); +} + +/* Must be executed on each CPU during resume. */ +void +mca_resume(void) +{ + + _mca_init(0); +} + /* * The machine check registers for the BSP cannot be initialized until * the local APIC is initialized. This happens at SI_SUB_CPU, Modified: stable/8/sys/i386/include/mca.h ============================================================================== --- stable/8/sys/i386/include/mca.h Mon Jul 26 18:07:43 2010 (r210508) +++ stable/8/sys/i386/include/mca.h Mon Jul 26 18:22:46 2010 (r210509) @@ -49,6 +49,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); int mca_intr(void); +void mca_resume(void); #endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 18:23:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A35D1065677; Mon, 26 Jul 2010 18:23:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37B108FC0A; Mon, 26 Jul 2010 18:23:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QIN6El048806; Mon, 26 Jul 2010 18:23:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QIN6I9048800; Mon, 26 Jul 2010 18:23:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261823.o6QIN6I9048800@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 18:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210510 - in stable/7/sys: amd64/amd64 amd64/include i386/acpica i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 18:23:06 -0000 Author: jhb Date: Mon Jul 26 18:23:05 2010 New Revision: 210510 URL: http://svn.freebsd.org/changeset/base/210510 Log: MFC 209212: Restore the machine check register banks on resume. For banks being monitored via CMCI, reset the interrupt threshold to 1 on resume. Modified: stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/include/mca.h stable/7/sys/i386/acpica/acpi_wakeup.c stable/7/sys/i386/i386/mca.c stable/7/sys/i386/include/mca.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/mca.c ============================================================================== --- stable/7/sys/amd64/amd64/mca.c Mon Jul 26 18:22:46 2010 (r210509) +++ stable/7/sys/amd64/amd64/mca.c Mon Jul 26 18:23:05 2010 (r210510) @@ -642,6 +642,15 @@ static void mca_setup(uint64_t mcg_cap) { + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); TASK_INIT(&mca_task, 0x8000, mca_scan_cpus, NULL); @@ -708,36 +717,54 @@ cmci_monitor(int i) PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); } -/* Must be executed on each CPU. */ -void -mca_init(void) +/* + * For resume, reset the threshold for any banks we monitor back to + * one and throw away the timestamp of the last interrupt. + */ +static void +cmci_resume(int i) +{ + struct cmc_state *cc; + uint64_t ctl; + + KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + + /* Ignore banks not monitored by this CPU. */ + if (!(PCPU_GET(cmci_mask) & 1 << i)) + return; + + cc = &cmc_state[PCPU_GET(cpuid)][i]; + cc->last_intr = -ticks; + ctl = rdmsr(MSR_MC_CTL2(i)); + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= MC_CTL2_CMCI_EN | 1; + wrmsr(MSR_MC_CTL2(i), ctl); +} + +/* + * Initializes per-CPU machine check registers and enables corrected + * machine check interrupts. + */ +static void +_mca_init(int boot) { uint64_t mcg_cap; uint64_t ctl, mask; - int skip; - int i; + int i, skip; /* MCE is required. */ if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; - /* - * On AMD Family 10h processors, unless logging of level one TLB - * parity (L1TP) errors is disabled, enable the recommended workaround - * for Erratum 383. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) - workaround_erratum383 = 1; - if (cpu_feature & CPUID_MCA) { - PCPU_SET(cmci_mask, 0); + if (boot) + PCPU_SET(cmci_mask, 0); mcg_cap = rdmsr(MSR_MCG_CAP); if (mcg_cap & MCG_CAP_CTL_P) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); - if (PCPU_GET(cpuid) == 0) + if (PCPU_GET(cpuid) == 0 && boot) mca_setup(mcg_cap); /* @@ -775,20 +802,40 @@ mca_init(void) if (!skip) wrmsr(MSR_MC_CTL(i), ctl); - if (mcg_cap & MCG_CAP_CMCI_P) - cmci_monitor(i); + if (mcg_cap & MCG_CAP_CMCI_P) { + if (boot) + cmci_monitor(i); + else + cmci_resume(i); + } /* Clear all errors. */ wrmsr(MSR_MC_STATUS(i), 0); } - if (PCPU_GET(cmci_mask) != 0) + if (PCPU_GET(cmci_mask) != 0 && boot) lapic_enable_cmc(); } load_cr4(rcr4() | CR4_MCE); } +/* Must be executed on each CPU during boot. */ +void +mca_init(void) +{ + + _mca_init(1); +} + +/* Must be executed on each CPU during resume. */ +void +mca_resume(void) +{ + + _mca_init(0); +} + /* * The machine check registers for the BSP cannot be initialized until * the local APIC is initialized. This happens at SI_SUB_CPU, Modified: stable/7/sys/amd64/include/mca.h ============================================================================== --- stable/7/sys/amd64/include/mca.h Mon Jul 26 18:22:46 2010 (r210509) +++ stable/7/sys/amd64/include/mca.h Mon Jul 26 18:23:05 2010 (r210510) @@ -49,6 +49,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); int mca_intr(void); +void mca_resume(void); #endif Modified: stable/7/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- stable/7/sys/i386/acpica/acpi_wakeup.c Mon Jul 26 18:22:46 2010 (r210509) +++ stable/7/sys/i386/acpica/acpi_wakeup.c Mon Jul 26 18:23:05 2010 (r210510) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -270,6 +271,7 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ; } else { /* Execute Wakeup */ + mca_resume(); intr_resume(); if (bootverbose) { Modified: stable/7/sys/i386/i386/mca.c ============================================================================== --- stable/7/sys/i386/i386/mca.c Mon Jul 26 18:22:46 2010 (r210509) +++ stable/7/sys/i386/i386/mca.c Mon Jul 26 18:23:05 2010 (r210510) @@ -657,6 +657,15 @@ static void mca_setup(uint64_t mcg_cap) { + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + mtx_init(&mca_lock, "mca", NULL, MTX_SPIN); STAILQ_INIT(&mca_records); TASK_INIT(&mca_task, 0x8000, mca_scan_cpus, NULL); @@ -725,38 +734,56 @@ cmci_monitor(int i) /* Mark this bank as monitored. */ PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); } + +/* + * For resume, reset the threshold for any banks we monitor back to + * one and throw away the timestamp of the last interrupt. + */ +static void +cmci_resume(int i) +{ + struct cmc_state *cc; + uint64_t ctl; + + KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + + /* Ignore banks not monitored by this CPU. */ + if (!(PCPU_GET(cmci_mask) & 1 << i)) + return; + + cc = &cmc_state[PCPU_GET(cpuid)][i]; + cc->last_intr = -ticks; + ctl = rdmsr(MSR_MC_CTL2(i)); + ctl &= ~MC_CTL2_THRESHOLD; + ctl |= MC_CTL2_CMCI_EN | 1; + wrmsr(MSR_MC_CTL2(i), ctl); +} #endif -/* Must be executed on each CPU. */ -void -mca_init(void) +/* + * Initializes per-CPU machine check registers and enables corrected + * machine check interrupts. + */ +static void +_mca_init(int boot) { uint64_t mcg_cap; uint64_t ctl, mask; - int skip; - int i; + int i, skip; /* MCE is required. */ if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; - /* - * On AMD Family 10h processors, unless logging of level one TLB - * parity (L1TP) errors is disabled, enable the recommended workaround - * for Erratum 383. - */ - if (cpu_vendor_id == CPU_VENDOR_AMD && - CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) - workaround_erratum383 = 1; - if (cpu_feature & CPUID_MCA) { - PCPU_SET(cmci_mask, 0); + if (boot) + PCPU_SET(cmci_mask, 0); mcg_cap = rdmsr(MSR_MCG_CAP); if (mcg_cap & MCG_CAP_CTL_P) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); - if (PCPU_GET(cpuid) == 0) + if (PCPU_GET(cpuid) == 0 && boot) mca_setup(mcg_cap); /* @@ -795,8 +822,12 @@ mca_init(void) wrmsr(MSR_MC_CTL(i), ctl); #ifdef DEV_APIC - if (mcg_cap & MCG_CAP_CMCI_P) - cmci_monitor(i); + if (mcg_cap & MCG_CAP_CMCI_P) { + if (boot) + cmci_monitor(i); + else + cmci_resume(i); + } #endif /* Clear all errors. */ @@ -804,7 +835,7 @@ mca_init(void) } #ifdef DEV_APIC - if (PCPU_GET(cmci_mask) != 0) + if (PCPU_GET(cmci_mask) != 0 && boot) lapic_enable_cmc(); #endif } @@ -812,6 +843,22 @@ mca_init(void) load_cr4(rcr4() | CR4_MCE); } +/* Must be executed on each CPU during boot. */ +void +mca_init(void) +{ + + _mca_init(1); +} + +/* Must be executed on each CPU during resume. */ +void +mca_resume(void) +{ + + _mca_init(0); +} + /* * The machine check registers for the BSP cannot be initialized until * the local APIC is initialized. This happens at SI_SUB_CPU, Modified: stable/7/sys/i386/include/mca.h ============================================================================== --- stable/7/sys/i386/include/mca.h Mon Jul 26 18:22:46 2010 (r210509) +++ stable/7/sys/i386/include/mca.h Mon Jul 26 18:23:05 2010 (r210510) @@ -49,6 +49,7 @@ struct mca_record { void cmc_intr(void); void mca_init(void); int mca_intr(void); +void mca_resume(void); #endif From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 18:33:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59151106566C; Mon, 26 Jul 2010 18:33:34 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 476028FC14; Mon, 26 Jul 2010 18:33:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QIXYcc051351; Mon, 26 Jul 2010 18:33:34 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QIXYkL051350; Mon, 26 Jul 2010 18:33:34 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007261833.o6QIXYkL051350@svn.freebsd.org> From: Benedict Reuschling Date: Mon, 26 Jul 2010 18:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210511 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 18:33:34 -0000 Author: bcr (doc committer) Date: Mon Jul 26 18:33:33 2010 New Revision: 210511 URL: http://svn.freebsd.org/changeset/base/210511 Log: Use "printf" instead of "echo -n" in an example because it should be more compatible for most shells that are out there. I contacted Philip Guenther at OpenBSD about this PR and he corrected the issue in their tree pretty fast. PR: docs/142243 Submitted by: Yasir (yasir27 at mail dot ru) Obtained from: OpenBSD Discussed with: delphij MFC after: 7 days Modified: head/contrib/netcat/nc.1 Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Mon Jul 26 18:23:05 2010 (r210510) +++ head/contrib/netcat/nc.1 Mon Jul 26 18:33:33 2010 (r210511) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 15, 2010 +.Dd July 3, 2010 .Dt NC 1 .Os .Sh NAME @@ -340,7 +340,7 @@ when it might be necessary to verify wha in response to commands issued by the client. For example, to retrieve the home page of a web site: .Bd -literal -offset indent -$ echo -n "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80 +$ printf "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80 .Ed .Pp Note that this also displays the headers sent by the web server. From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 18:54:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F19F1065670; Mon, 26 Jul 2010 18:54:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7EFE8FC16; Mon, 26 Jul 2010 18:54:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QIsuLh056197; Mon, 26 Jul 2010 18:54:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QIsuFs056195; Mon, 26 Jul 2010 18:54:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261854.o6QIsuFs056195@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 18:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210512 - stable/8/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 18:54:57 -0000 Author: jhb Date: Mon Jul 26 18:54:56 2010 New Revision: 210512 URL: http://svn.freebsd.org/changeset/base/210512 Log: MFC 209948: A previous change moved the GETATTR RPC for open() calls that hit in the name cache up into nfs_lookup() instead of nfs_open(). Continue this trend by flushing the attribute cache for leaf nodes in nfs_lookup() during an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP as the attributes are flushed before fetching the post-op attributes from the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op attributes should populate the cache. Now all NFS open() calls will always clear the cached attributes during the nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC. As a result, we can remove the conditional flushing of the attribute cache from nfs_open(). Modified: stable/8/sys/nfsclient/nfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Mon Jul 26 18:33:33 2010 (r210511) +++ stable/8/sys/nfsclient/nfs_vnops.c Mon Jul 26 18:54:56 2010 (r210512) @@ -538,15 +538,6 @@ nfs_open(struct vop_open_args *ap) np->n_mtime = vattr.va_mtime; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - - if (np->n_ac_ts_syscalls != td->td_syscalls || - np->n_ac_ts_tid != td->td_tid || - td->td_proc == NULL || - np->n_ac_ts_pid != td->td_proc->p_pid) { - np->n_attrstamp = 0; - KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); - } mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) @@ -1123,6 +1114,20 @@ nfs_lookup(struct vop_lookup_args *ap) return (error); } newvp = NFSTOV(np); + + /* + * Flush the attribute cache when opening a leaf node + * to ensure that fresh attributes are fetched in + * nfs_open() if we are unable to fetch attributes + * from the LOOKUP reply. + */ + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(np->n_flag & NMODIFIED)) { + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); + mtx_unlock(&np->n_mtx); + } } if (v3) { nfsm_postop_attr(newvp, attrflag); From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 18:55:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0484A1065690; Mon, 26 Jul 2010 18:55:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD7A98FC13; Mon, 26 Jul 2010 18:55:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QItISb056352; Mon, 26 Jul 2010 18:55:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QItIBc056350; Mon, 26 Jul 2010 18:55:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007261855.o6QItIBc056350@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Jul 2010 18:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210513 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 18:55:19 -0000 Author: jhb Date: Mon Jul 26 18:55:18 2010 New Revision: 210513 URL: http://svn.freebsd.org/changeset/base/210513 Log: MFC 209948: A previous change moved the GETATTR RPC for open() calls that hit in the name cache up into nfs_lookup() instead of nfs_open(). Continue this trend by flushing the attribute cache for leaf nodes in nfs_lookup() during an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP as the attributes are flushed before fetching the post-op attributes from the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op attributes should populate the cache. Now all NFS open() calls will always clear the cached attributes during the nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC. As a result, we can remove the conditional flushing of the attribute cache from nfs_open(). Modified: stable/7/sys/nfsclient/nfs_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vnops.c Mon Jul 26 18:54:56 2010 (r210512) +++ stable/7/sys/nfsclient/nfs_vnops.c Mon Jul 26 18:55:18 2010 (r210513) @@ -488,14 +488,6 @@ nfs_open(struct vop_open_args *ap) np->n_mtime = vattr.va_mtime; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - - if (np->n_ac_ts_syscalls != td->td_syscalls || - np->n_ac_ts_tid != td->td_tid || - td->td_proc == NULL || - np->n_ac_ts_pid != td->td_proc->p_pid) { - np->n_attrstamp = 0; - } mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td); if (error) @@ -1031,6 +1023,19 @@ nfs_lookup(struct vop_lookup_args *ap) return (error); } newvp = NFSTOV(np); + + /* + * Flush the attribute cache when opening a leaf node + * to ensure that fresh attributes are fetched in + * nfs_open() if we are unable to fetch attributes + * from the LOOKUP reply. + */ + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(np->n_flag & NMODIFIED)) { + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); + } } if (v3) { nfsm_postop_attr(newvp, attrflag); From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 19:53:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4980F1065673; Mon, 26 Jul 2010 19:53:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37EC58FC22; Mon, 26 Jul 2010 19:53:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QJrA9B069194; Mon, 26 Jul 2010 19:53:10 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QJrAFd069188; Mon, 26 Jul 2010 19:53:10 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007261953.o6QJrAFd069188@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 19:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210514 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 19:53:10 -0000 Author: jkim Date: Mon Jul 26 19:53:09 2010 New Revision: 210514 URL: http://svn.freebsd.org/changeset/base/210514 Log: Re-implement FPU suspend/resume for amd64. This removes superfluous uses of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs(). Also, we do not touch PCB flags any more. MFC after: 1 month Modified: head/sys/amd64/acpica/acpi_switch.S head/sys/amd64/acpica/acpi_wakeup.c head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/acpica/acpi_switch.S ============================================================================== --- head/sys/amd64/acpica/acpi_switch.S Mon Jul 26 18:55:18 2010 (r210513) +++ head/sys/amd64/acpica/acpi_switch.S Mon Jul 26 19:53:09 2010 (r210514) @@ -102,9 +102,12 @@ ENTRY(acpi_restorecpu) movl WAKEUP_CTX(sfmask), %eax wrmsr - /* Restore CR0, CR2 and CR4. */ + /* Restore CR0 except for FPU mode. */ movq WAKEUP_XPCB(CR0), %rax + andq $~(CR0_EM | CR0_TS), %rax movq %rax, %cr0 + + /* Restore CR2 and CR4. */ movq WAKEUP_XPCB(CR2), %rax movq %rax, %cr2 movq WAKEUP_XPCB(CR4), %rax @@ -149,6 +152,17 @@ ENTRY(acpi_restorecpu) movq WAKEUP_PCB(DR7), %rax movq %rax, %dr7 + /* Restore FPU state. */ + movq PCPU(FPCURTHREAD), %rax + testq %rax, %rax + je 1f + fxrstor WAKEUP_PCB(USER_FPU) +1: + + /* Restore CR0 with FPU mode. */ + movq WAKEUP_XPCB(CR0), %rax + movq %rax, %cr0 + /* Restore return address. */ movq WAKEUP_PCB(RIP), %rax movq %rax, (%rsp) Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Mon Jul 26 18:55:18 2010 (r210513) +++ head/sys/amd64/acpica/acpi_wakeup.c Mon Jul 26 19:53:09 2010 (r210514) @@ -216,7 +216,6 @@ acpi_wakeup_cpus(struct acpi_softc *sc, int acpi_sleep_machdep(struct acpi_softc *sc, int state) { - struct savefpu *stopfpu; #ifdef SMP cpumask_t wakeup_cpus; #endif @@ -246,10 +245,7 @@ acpi_sleep_machdep(struct acpi_softc *sc cr3 = rcr3(); load_cr3(KPML4phys); - stopfpu = &stopxpcbs[0]->xpcb_pcb.pcb_user_save; if (acpi_savecpu(stopxpcbs[0])) { - fpugetregs(curthread, stopfpu); - #ifdef SMP if (wakeup_cpus != 0 && suspend_cpus(wakeup_cpus) == 0) { device_printf(sc->acpi_dev, @@ -285,7 +281,6 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ia32_pause(); } else { - fpusetregs(curthread, stopfpu); #ifdef SMP if (wakeup_cpus != 0) acpi_wakeup_cpus(sc, wakeup_cpus); Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Mon Jul 26 18:55:18 2010 (r210513) +++ head/sys/amd64/amd64/cpu_switch.S Mon Jul 26 19:53:09 2010 (r210514) @@ -417,6 +417,13 @@ ENTRY(savectx2) leaq (%rax,%rdx),%rax movq %rax,XPCB_KGSBASE(%r8) + movq PCPU(FPCURTHREAD),%rax + testq %rax,%rax + je 1f + clts + fxsave PCB_USER_FPU(%r8) +1: + movl $1, %eax ret END(savectx2) Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Mon Jul 26 18:55:18 2010 (r210513) +++ head/sys/amd64/amd64/genassym.c Mon Jul 26 19:53:09 2010 (r210514) @@ -140,6 +140,7 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_ ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); +ASSYM(PCB_USER_FPU, offsetof(struct pcb, pcb_user_save)); ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp)); ASSYM(PCB_FULL_IRET, offsetof(struct pcb, pcb_full_iret)); ASSYM(PCB_DBREGS, PCB_DBREGS); Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Jul 26 18:55:18 2010 (r210513) +++ head/sys/amd64/amd64/mp_machdep.c Mon Jul 26 19:53:09 2010 (r210514) @@ -1329,20 +1329,17 @@ cpustop_handler(void) void cpususpend_handler(void) { - struct savefpu *stopfpu; register_t cr3, rf; int cpu = PCPU_GET(cpuid); int cpumask = PCPU_GET(cpumask); rf = intr_disable(); cr3 = rcr3(); - stopfpu = &stopxpcbs[cpu]->xpcb_pcb.pcb_user_save; + if (savectx2(stopxpcbs[cpu])) { - fpugetregs(curthread, stopfpu); wbinvd(); atomic_set_int(&stopped_cpus, cpumask); - } else - fpusetregs(curthread, stopfpu); + } /* Wait for resume */ while (!(started_cpus & cpumask)) From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 20:44:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F0DA106566C; Mon, 26 Jul 2010 20:44:30 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6357F8FC15; Mon, 26 Jul 2010 20:44:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QKiUlj080621; Mon, 26 Jul 2010 20:44:30 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QKiUdL080620; Mon, 26 Jul 2010 20:44:30 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007262044.o6QKiUdL080620@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 26 Jul 2010 20:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210515 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 20:44:30 -0000 Author: gavin Date: Mon Jul 26 20:44:29 2010 New Revision: 210515 URL: http://svn.freebsd.org/changeset/base/210515 Log: Prevent ukbd(4) and uhid(4) from attaching when a WiSPY DBx Spectrum Analyzer is attached. PR: usb/134631 Submitted by: Jesse Kempf MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Mon Jul 26 19:53:09 2010 (r210514) +++ head/sys/dev/usb/quirk/usb_quirk.c Mon Jul 26 20:44:29 2010 (r210515) @@ -121,10 +121,11 @@ static struct usb_quirk_entry usb_quirks /* Devices which should be ignored by both ukbd and uhid */ USB_QUIRK(CYPRESS, WISPY1A, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE), USB_QUIRK(METAGEEK, WISPY1B, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE), + USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE), + USB_QUIRK(METAGEEK2, WISPYDBX, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE), USB_QUIRK(TENX, UAUDIO0, 0x0101, 0x0101, UQ_AUDIO_SWAP_LR), /* MS keyboards do weird things */ USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), - USB_QUIRK(METAGEEK, WISPY24X, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Jul 26 19:53:09 2010 (r210514) +++ head/sys/dev/usb/usbdevs Mon Jul 26 20:44:29 2010 (r210515) @@ -646,6 +646,7 @@ vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik vendor PEGATRON 0x1d4d Pegatron vendor QISDA 0x1da5 Qisda +vendor METAGEEK2 0x1dd5 MetaGeek vendor ALINK 0x1e0e Alink vendor AIRTIES 0x1eda AirTies vendor DLINK 0x2001 D-Link @@ -2021,6 +2022,7 @@ product MERLIN V620 0x1110 /* MetaGeek products */ product METAGEEK WISPY1B 0x083e MetaGeek Wi-Spy product METAGEEK WISPY24X 0x083f MetaGeek Wi-Spy 2.4x +product METAGEEK2 WISPYDBX 0x5000 MetaGeek Wi-Spy DBx /* Metricom products */ product METRICOM RICOCHET_GS 0x0001 Ricochet GS From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 21:22:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D334E1065677; Mon, 26 Jul 2010 21:22:57 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1EED8FC19; Mon, 26 Jul 2010 21:22:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QLMvBZ089184; Mon, 26 Jul 2010 21:22:57 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QLMvtN089181; Mon, 26 Jul 2010 21:22:57 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007262122.o6QLMvtN089181@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 26 Jul 2010 21:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210516 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 21:22:57 -0000 Author: gavin Date: Mon Jul 26 21:22:57 2010 New Revision: 210516 URL: http://svn.freebsd.org/changeset/base/210516 Log: Prevent uhid(4) from attaching to the Gembird Silver Shield remote power plug. Note that the Vendor ID 0x04b4 is officially assigned to Cypress, so use that instead of adding a second vendor with an identical ID, in the same way other similar cases are treated in usb/usbdevs. PR: usb/132785 Submitted by: Dirk-Willem van Gulik MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Mon Jul 26 20:44:29 2010 (r210515) +++ head/sys/dev/usb/quirk/usb_quirk.c Mon Jul 26 21:22:57 2010 (r210516) @@ -111,6 +111,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(APC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(BELKIN, F6C550AVR, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Jul 26 20:44:29 2010 (r210515) +++ head/sys/dev/usb/usbdevs Mon Jul 26 21:22:57 2010 (r210516) @@ -1268,6 +1268,7 @@ product CYPRESS IKARILASER 0x121f Ikari product CYPRESS USBRS232 0x5500 USB-RS232 Interface product CYPRESS SLIM_HUB 0x6560 Slim Hub product CYPRESS XX6830XX 0x6830 PATA Storage Device +product CYPRESS SILVERSHIELD 0xfd13 Gembird Silver Shield PM /* Daisy Technology products */ product DAISY DMC 0x6901 USB MultiMedia Reader From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 21:24:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D909106564A; Mon, 26 Jul 2010 21:24:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6768FC18; Mon, 26 Jul 2010 21:24:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QLOqVf089649; Mon, 26 Jul 2010 21:24:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QLOqOP089646; Mon, 26 Jul 2010 21:24:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262124.o6QLOqOP089646@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 21:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210517 - in head/sys: amd64/amd64 i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 21:24:52 -0000 Author: jkim Date: Mon Jul 26 21:24:52 2010 New Revision: 210517 URL: http://svn.freebsd.org/changeset/base/210517 Log: FNSTSW instruction can use AX register as an operand. Obtained from: fenv.h Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/isa/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Mon Jul 26 21:22:57 2010 (r210516) +++ head/sys/amd64/amd64/fpu.c Mon Jul 26 21:24:52 2010 (r210517) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #define fnclex() __asm("fnclex") #define fninit() __asm("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) -#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr))) +#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) #define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Jul 26 21:22:57 2010 (r210516) +++ head/sys/i386/isa/npx.c Mon Jul 26 21:24:52 2010 (r210517) @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); #define fninit() __asm("fninit") #define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) -#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr))) +#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) #define fp_divide_by_0() __asm("fldz; fld1; fdiv %st,%st(1); fnop") #define frstor(addr) __asm("frstor %0" : : "m" (*(addr))) #ifdef CPU_ENABLE_SSE From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 22:16:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 031691065678; Mon, 26 Jul 2010 22:16:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E61AF8FC15; Mon, 26 Jul 2010 22:16:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QMGa2Z001177; Mon, 26 Jul 2010 22:16:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QMGaUq001174; Mon, 26 Jul 2010 22:16:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262216.o6QMGaUq001174@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 22:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210518 - in head/sys: amd64/amd64 i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 22:16:37 -0000 Author: jkim Date: Mon Jul 26 22:16:36 2010 New Revision: 210518 URL: http://svn.freebsd.org/changeset/base/210518 Log: Reduce diff against fenv.h: Mark all inline asms as volatile for safety. No object file change after this commit (verified with md5). Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/isa/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Mon Jul 26 21:24:52 2010 (r210517) +++ head/sys/amd64/amd64/fpu.c Mon Jul 26 22:16:36 2010 (r210518) @@ -65,17 +65,18 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) -#define fnclex() __asm("fnclex") -#define fninit() __asm("fninit") +#define fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr))) +#define fnclex() __asm __volatile("fnclex") +#define fninit() __asm __volatile("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) #define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) -#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr))) +#define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) #define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) -#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm("clts") +#define start_emulating() __asm __volatile( \ + "smsw %%ax; orb %0,%%al; lmsw %%ax" \ + : : "n" (CR0_TS) : "ax") +#define stop_emulating() __asm __volatile("clts") #else /* !(__GNUCLIKE_ASM && !lint) */ Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Jul 26 21:24:52 2010 (r210517) +++ head/sys/i386/isa/npx.c Mon Jul 26 22:16:36 2010 (r210518) @@ -87,26 +87,28 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) -#define fnclex() __asm("fnclex") -#define fninit() __asm("fninit") +#define fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr))) +#define fnclex() __asm __volatile("fnclex") +#define fninit() __asm __volatile("fninit") #define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) #define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) -#define fp_divide_by_0() __asm("fldz; fld1; fdiv %st,%st(1); fnop") -#define frstor(addr) __asm("frstor %0" : : "m" (*(addr))) +#define fp_divide_by_0() __asm __volatile( \ + "fldz; fld1; fdiv %st,%st(1); fnop") +#define frstor(addr) __asm __volatile("frstor %0" : : "m" (*(addr))) #ifdef CPU_ENABLE_SSE -#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr))) +#define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) -#define ldmxcsr(__csr) __asm __volatile("ldmxcsr %0" : : "m" (__csr)) +#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) #endif #ifdef XEN -#define start_emulating() (HYPERVISOR_fpu_taskswitch(1)) -#define stop_emulating() (HYPERVISOR_fpu_taskswitch(0)) +#define start_emulating() (HYPERVISOR_fpu_taskswitch(1)) +#define stop_emulating() (HYPERVISOR_fpu_taskswitch(0)) #else -#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm("clts") +#define start_emulating() __asm __volatile( \ + "smsw %%ax; orb %0,%%al; lmsw %%ax" \ + : : "n" (CR0_TS) : "ax") +#define stop_emulating() __asm __volatile("clts") #endif #else /* !(__GNUCLIKE_ASM && !lint) */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 22:55:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E361F1065676; Mon, 26 Jul 2010 22:55:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2E578FC1D; Mon, 26 Jul 2010 22:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QMtEN2009729; Mon, 26 Jul 2010 22:55:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QMtEgw009727; Mon, 26 Jul 2010 22:55:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262255.o6QMtEgw009727@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 22:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210519 - head/sys/i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 22:55:15 -0000 Author: jkim Date: Mon Jul 26 22:55:14 2010 New Revision: 210519 URL: http://svn.freebsd.org/changeset/base/210519 Log: Remove an unused macro since r189418. Modified: head/sys/i386/isa/npx.c Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Jul 26 22:16:36 2010 (r210518) +++ head/sys/i386/isa/npx.c Mon Jul 26 22:55:14 2010 (r210519) @@ -99,7 +99,6 @@ __FBSDID("$FreeBSD$"); #ifdef CPU_ENABLE_SSE #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) -#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) #endif #ifdef XEN #define start_emulating() (HYPERVISOR_fpu_taskswitch(1)) From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 23:02:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08CAE106564A; Mon, 26 Jul 2010 23:02:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC72A8FC08; Mon, 26 Jul 2010 23:02:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QN2Ipr011315; Mon, 26 Jul 2010 23:02:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QN2IG2011313; Mon, 26 Jul 2010 23:02:18 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262302.o6QN2IG2011313@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 23:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210520 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 23:02:19 -0000 Author: jkim Date: Mon Jul 26 23:02:18 2010 New Revision: 210520 URL: http://svn.freebsd.org/changeset/base/210520 Log: Add missing ldmxcsr() prototype for lint case. Modified: head/sys/amd64/amd64/fpu.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Mon Jul 26 22:55:14 2010 (r210519) +++ head/sys/amd64/amd64/fpu.c Mon Jul 26 23:02:18 2010 (r210520) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) #define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) -#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) +#define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) #define start_emulating() __asm __volatile( \ "smsw %%ax; orb %0,%%al; lmsw %%ax" \ : : "n" (CR0_TS) : "ax") @@ -87,6 +87,7 @@ void fnstcw(caddr_t addr); void fnstsw(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); +void ldmxcsr(u_int csr); void start_emulating(void); void stop_emulating(void); From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 23:20:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 689861065670; Mon, 26 Jul 2010 23:20:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8C28FC1A; Mon, 26 Jul 2010 23:20:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QNKtog015383; Mon, 26 Jul 2010 23:20:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QNKtDM015380; Mon, 26 Jul 2010 23:20:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262320.o6QNKtDM015380@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 23:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210521 - in head/sys: amd64/amd64 i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 23:20:55 -0000 Author: jkim Date: Mon Jul 26 23:20:55 2010 New Revision: 210521 URL: http://svn.freebsd.org/changeset/base/210521 Log: Simplify fldcw() macro. There is no reason to use pointer here. No object file change after this commit (verified with md5). Modified: head/sys/amd64/amd64/fpu.c head/sys/i386/isa/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Mon Jul 26 23:02:18 2010 (r210520) +++ head/sys/amd64/amd64/fpu.c Mon Jul 26 23:20:55 2010 (r210521) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr))) +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) #define fnclex() __asm __volatile("fnclex") #define fninit() __asm __volatile("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnstcw(caddr_t addr); @@ -124,7 +124,7 @@ fpuinit(void) stop_emulating(); fninit(); control = __INITIAL_FPUCW__; - fldcw(&control); + fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); if (PCPU_GET(cpuid) == 0) { @@ -425,7 +425,7 @@ fpudna(void) */ fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(&pcb->pcb_initial_fpucw); + fldcw(pcb->pcb_initial_fpucw); pcb->pcb_flags |= PCB_FPUINITDONE; if (PCB_USER_FPU(pcb)) pcb->pcb_flags |= PCB_USERFPUINITDONE; Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Jul 26 23:02:18 2010 (r210520) +++ head/sys/i386/isa/npx.c Mon Jul 26 23:20:55 2010 (r210521) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm __volatile("fldcw %0" : : "m" (*(addr))) +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) #define fnclex() __asm __volatile("fnclex") #define fninit() __asm __volatile("fninit") #define fnsave(addr) __asm __volatile("fnsave %0" : "=m" (*(addr))) @@ -111,7 +111,7 @@ __FBSDID("$FreeBSD$"); #endif #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnsave(caddr_t addr); @@ -266,7 +266,7 @@ npx_probe(device_t dev) * 16 works. */ control &= ~(1 << 2); /* enable divide by 0 trap */ - fldcw(&control); + fldcw(control); #ifdef FPU_ERROR_BROKEN /* * FPU error signal doesn't work on some CPU @@ -364,7 +364,7 @@ npxinit(void) fninit(); #endif control = __INITIAL_NPXCW__; - fldcw(&control); + fldcw(control); start_emulating(); intr_restore(savecrit); } @@ -683,7 +683,7 @@ npxdna(void) */ fpurstor(&npx_initialstate); if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__) - fldcw(&pcb->pcb_initial_npxcw); + fldcw(pcb->pcb_initial_npxcw); pcb->pcb_flags |= PCB_NPXINITDONE; if (PCB_USER_FPU(pcb)) pcb->pcb_flags |= PCB_NPXUSERINITDONE; From owner-svn-src-all@FreeBSD.ORG Mon Jul 26 23:24:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A333106567A; Mon, 26 Jul 2010 23:24:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C6A8FC0C; Mon, 26 Jul 2010 23:24:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6QNOgAg016248; Mon, 26 Jul 2010 23:24:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6QNOggG016246; Mon, 26 Jul 2010 23:24:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007262324.o6QNOggG016246@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 26 Jul 2010 23:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210522 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2010 23:24:43 -0000 Author: jkim Date: Mon Jul 26 23:24:42 2010 New Revision: 210522 URL: http://svn.freebsd.org/changeset/base/210522 Log: Fix an apparent typo. Found by: clang Reviewed by: davidch, yongari Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 26 23:20:55 2010 (r210521) +++ head/sys/dev/bce/if_bce.c Mon Jul 26 23:24:42 2010 (r210522) @@ -5404,7 +5404,7 @@ bce_init_rx_context(struct bce_softc *sc (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { u32 lo_water, hi_water; - if (sc->bce_flags && BCE_USING_TX_FLOW_CONTROL) { + if (sc->bce_flags & BCE_USING_TX_FLOW_CONTROL) { lo_water = BCE_L2CTX_RX_LO_WATER_MARK_DEFAULT; } else { lo_water = 0; From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 07:19:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032DF1065672; Tue, 27 Jul 2010 07:19:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7AAB8FC3C; Tue, 27 Jul 2010 07:19:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6R7JH09020792; Tue, 27 Jul 2010 07:19:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6R7JHn1020791; Tue, 27 Jul 2010 07:19:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007270719.o6R7JHn1020791@svn.freebsd.org> From: Alexander Motin Date: Tue, 27 Jul 2010 07:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210523 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 07:19:18 -0000 Author: mav Date: Tue Jul 27 07:19:17 2010 New Revision: 210523 URL: http://svn.freebsd.org/changeset/base/210523 Log: MFC r210443: Remove extra commas from KTR_EVENT4() macro to match number of CTR6() args. Comparing to other macros there should be strings concatenation, not a separate arguments. Modified: stable/8/sys/sys/ktr.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/ktr.h ============================================================================== --- stable/8/sys/sys/ktr.h Mon Jul 26 23:24:42 2010 (r210522) +++ stable/8/sys/sys/ktr.h Tue Jul 27 07:19:17 2010 (r210523) @@ -201,7 +201,7 @@ void ktr_tracepoint(u_int mask, const ch ident, edat, (v0), (v1), (v2)) #define KTR_EVENT4(m, egroup, ident, etype, edat, \ a0, v0, a1, v1, a2, v2, a3, v3) \ - CTR6(m,KTR_EFMT(egroup, ident, etype) a0 ", " a1 ", " a2, ", ", a3,\ + CTR6(m,KTR_EFMT(egroup, ident, etype) a0 ", " a1 ", " a2 ", " a3,\ ident, edat, (v0), (v1), (v2), (v3)) /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 07:57:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 616351065674; Tue, 27 Jul 2010 07:57:35 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51E478FC17; Tue, 27 Jul 2010 07:57:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6R7vZsi029203; Tue, 27 Jul 2010 07:57:35 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6R7vZTN029200; Tue, 27 Jul 2010 07:57:35 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007270757.o6R7vZTN029200@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 27 Jul 2010 07:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210524 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 07:57:35 -0000 Author: gavin Date: Tue Jul 27 07:57:35 2010 New Revision: 210524 URL: http://svn.freebsd.org/changeset/base/210524 Log: - Support two devices made by West Mountain Radio in uslcom(4) [1] - Bring in several other devices from OpenBSD while here. Use the official manufacturer name over the OpenBSD name in the case of GEMALTO. Reorder list slightly to aid future syncing. - Remove duplicate SILABS CP2102 define from usbdevs PR: usb/131912 [1] Submitted by: Jack Twilley [1] MFC after: 1 week Modified: head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Tue Jul 27 07:19:17 2010 (r210523) +++ head/sys/dev/usb/serial/uslcom.c Tue Jul 27 07:57:35 2010 (r210524) @@ -177,22 +177,35 @@ static struct ucom_callback uslcom_callb static const struct usb_device_id uslcom_devs[] = { #define USLCOM_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } USLCOM_DEV(BALTECH, CARDREADER), + USLCOM_DEV(CLIPSAL, 5500PCU), USLCOM_DEV(DYNASTREAM, ANTDEVBOARD), + USLCOM_DEV(DYNASTREAM, ANT2USB), + USLCOM_DEV(GEMALTO, PROXPU), USLCOM_DEV(JABLOTRON, PC60B), + USLCOM_DEV(SILABS, AEROCOMM), USLCOM_DEV(SILABS, ARGUSISP), + USLCOM_DEV(SILABS, BSM7DUSB), + USLCOM_DEV(SILABS, BURNSIDE), + USLCOM_DEV(SILABS, CP2102), + USLCOM_DEV(SILABS, CP210X_2), USLCOM_DEV(SILABS, CRUMB128), USLCOM_DEV(SILABS, DEGREE), - USLCOM_DEV(SILABS, BURNSIDE), USLCOM_DEV(SILABS, HELICOM), USLCOM_DEV(SILABS, LIPOWSKY_HARP), USLCOM_DEV(SILABS, LIPOWSKY_JTAG), USLCOM_DEV(SILABS, LIPOWSKY_LIN), + USLCOM_DEV(SILABS, MC35PU), USLCOM_DEV(SILABS, POLOLU), - USLCOM_DEV(SILABS, CP2102), - USLCOM_DEV(SILABS, CP210X_2), + USLCOM_DEV(SILABS, RIGBLASTER), + USLCOM_DEV(SILABS, RIGTALK), USLCOM_DEV(SILABS, SUUNTO), + USLCOM_DEV(SILABS, TRACIENT), USLCOM_DEV(SILABS, TRAQMATE), + USLCOM_DEV(SILABS, USBCOUNT50), + USLCOM_DEV(SILABS, USBPULSE100), + USLCOM_DEV(SILABS, USBWAVE12), USLCOM_DEV(SILABS2, DCU11CLONE), + USLCOM_DEV(SILABS3, GPRS_MODEM), USLCOM_DEV(USI, MC60), #undef USLCOM_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 27 07:19:17 2010 (r210523) +++ head/sys/dev/usb/usbdevs Tue Jul 27 07:57:35 2010 (r210524) @@ -430,6 +430,7 @@ vendor 2WIRE 0x08c8 2Wire vendor AIPTEK 0x08ca AIPTEK International vendor SMARTBRIDGES 0x08d1 SmartBridges vendor BILLIONTON 0x08dd Billionton Systems +vendor GEMALTO 0x08e6 Gemalto SA vendor EXTENDED 0x08e9 Extended Systems vendor MSYSTEMS 0x08ec M-Systems vendor AUTHENTEC 0x08ff AuthenTec @@ -554,6 +555,7 @@ vendor USI 0x10ab USI vendor PLX 0x10b5 PLX vendor ASANTE 0x10bd Asante vendor SILABS 0x10c4 Silicon Labs +vendor SILABS3 0x10c5 Silicon Labs vendor ACTIONS 0x10d6 Actions vendor AIRPLUS 0x1011 Airplus vendor ANALOG 0x1110 Analog Devices @@ -620,6 +622,7 @@ vendor AMOI 0x1614 Amoi Electronics vendor GOODWAY 0x1631 Good Way Technology vendor ENTREGA 0x1645 Entrega vendor ACTIONTEC 0x1668 Actiontec Electronics +vendor CLIPSAL 0x166a Clipsal vendor CISCOLINKSYS2 0x167b Cisco-Linksys vendor ATHEROS 0x168c Atheros Communications vendor GIGASET 0x1690 Gigaset @@ -1171,6 +1174,9 @@ product CISCOLINKSYS WUSBF54G 0x0024 WUS product CISCOLINKSYS2 RT3070 0x4001 RT3070 product CISCOLINKSYS3 RT3070 0x0101 RT3070 +/* Clipsal products */ +product CLIPSAL 5500PCU 0x0303 5500PCU C-Bus + /* CMOTECH products */ product CMOTECH CNU510 0x5141 CDMA Technologies USB modem product CMOTECH CNU550 0x5543 CDMA 2000 1xRTT/1xEVDO USB modem @@ -1374,6 +1380,7 @@ product DRESDENELEKTRONIK WIRELESSHANDHE /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board +product DYNASTREAM ANT2USB 0x1004 ANT2USB /* Edimax products */ product EDIMAX EW7318USG 0x7318 USB Wireless dongle @@ -1540,6 +1547,9 @@ product FUJITSU AH_F401U 0x105b AH-F401U /* Garmin products */ product GARMIN IQUE_3600 0x0004 iQue 3600 +/* Gemalto products */ +product GEMALTO PROXPU 0x5501 Prox-PU/CU + /* General Instruments (Motorola) products */ product GENERALINSTMNTS SB5100 0x5100 SURFboard SB5100 Cable modem @@ -2767,22 +2777,32 @@ product SILICOM U2E 0x0001 U2E product SILICOM GPE 0x0002 Psion Gold Port Ethernet /* SI Labs */ +product SILABS BSM7DUSB 0x800a BSM7-D-USB product SILABS POLOLU 0x803b Pololu Serial product SILABS SAEL 0x8053 SA-EL USB product SILABS ARGUSISP 0x8066 Argussoft ISP product SILABS CRUMB128 0x807a Crumb128 board product SILABS DEGREE 0x80ca Degree Controls Inc +product SILABS TRACIENT 0x80dd Tracient RFID product SILABS TRAQMATE 0x80ed Track Systems Traqmate product SILABS SUUNTO 0x80f6 Suunto Sports Instrument product SILABS BURNSIDE 0x813d Burnside Telecon Deskmobile +product SILABS RIGBLASTER 0x814a WMR RIGblaster Plug&Play +product SILABS RIGTALK 0x814b WMR RIGtalk RT1 product SILABS HELICOM 0x815e Helicomm IP-Link 1220-DVM -product SILABS CP2102 0xea60 SILABS USB UART product SILABS LIPOWSKY_JTAG 0x81c8 Lipowsky Baby-JTAG product SILABS LIPOWSKY_LIN 0x81e2 Lipowsky Baby-LIN +product SILABS AEROCOMM 0x81e7 Aerocomm Radio product SILABS LIPOWSKY_HARP 0x8218 Lipowsky HARP-1 -product SILABS CP2102 0xea60 SILABS USB UARTa +product SILABS MC35PU 0x8341 MC35pu +product SILABS CP2102 0xea60 SILABS USB UART product SILABS CP210X_2 0xea61 CP210x Serial +product SILABS USBSCOPE50 0xf001 USBscope50 +product SILABS USBWAVE12 0xf002 USBwave12 +product SILABS USBPULSE100 0xf003 USBpulse100 +product SILABS USBCOUNT50 0xf004 USBcount50 product SILABS2 DCU11CLONE 0xaa26 DCU-11 clone +product SILABS3 GPRS_MODEM 0xea61 GPRS Modem /* Silicon Portals Inc. */ product SILICONPORTALS YAPPH_NF 0x0200 YAP Phone (no firmware) From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 08:45:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A8DD1065670; Tue, 27 Jul 2010 08:45:30 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BA558FC08; Tue, 27 Jul 2010 08:45:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6R8jTaQ039798; Tue, 27 Jul 2010 08:45:29 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6R8jTcX039797; Tue, 27 Jul 2010 08:45:29 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007270845.o6R8jTcX039797@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 27 Jul 2010 08:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210525 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 08:45:30 -0000 Author: simon Date: Tue Jul 27 08:45:29 2010 New Revision: 210525 URL: http://svn.freebsd.org/changeset/base/210525 Log: Missing IFCAP_* macro descriptions in ifnet(9). PR: docs/148952 Submitted by: Lars Hartmann MFC after: 2 weeks Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Jul 27 07:57:35 2010 (r210524) +++ head/share/man/man9/ifnet.9 Tue Jul 27 08:45:29 2010 (r210525) @@ -588,6 +588,31 @@ longer than permitted by the Ethernet sp .It Dv IFCAP_JUMBO_MTU This Ethernet interface can transmit and receive frames up to 9000 bytes long. +.It Dv IFCAP_TSO4 +This Ethernet interface supports TCP Segmentation offloading. +.It Dv IFCAP_TSO6 +This Ethernet interface supports TCP6 Segmentation offloading. +.It Dv IFCAP_TSO +A shorthand for +.Pq Dv IFCAP_TSO4 | IFCAP_TSO6 . +.It Dv IFCAP_TOE4 +This Ethernet interface supports TCP offloading. +.It Dv IFCAP_TOE6 +This Ethernet interface supports TCP6 offloading. +.It Dv ICAP_TOE +A Shorthand for +.Pq Dv IFCAP_TOE4 | IFCAP_TOE6 . +.It Dv IFCAP_WOL_UCAST +This Ethernet interface supports waking up on any Unicast packet. +.It Dv IFCAP_WOL_MCAST +This Ethernet interface supports waking up on any Multicast packet. +.It Dv IFCAP_WOL_MAGIC +This Ethernet interface supports waking up on any Magic packet such +as those sent by +.Xr wake 8 . +.It Dv IFCAP_WOL +A shorthand for +.Pq Dv IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC . .El .Pp The ability of advanced network interfaces to offload certain From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 09:01:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F241065672; Tue, 27 Jul 2010 09:01:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33B648FC08; Tue, 27 Jul 2010 09:01:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6R914Kp043337; Tue, 27 Jul 2010 09:01:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6R914Fv043335; Tue, 27 Jul 2010 09:01:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007270901.o6R914Fv043335@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 27 Jul 2010 09:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210526 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 09:01:04 -0000 Author: kib Date: Tue Jul 27 09:01:03 2010 New Revision: 210526 URL: http://svn.freebsd.org/changeset/base/210526 Log: MFC r210446: Reword the comment, fixing typo. Modified: stable/8/sys/sys/imgact_elf.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/imgact_elf.h ============================================================================== --- stable/8/sys/sys/imgact_elf.h Tue Jul 27 08:45:29 2010 (r210525) +++ stable/8/sys/sys/imgact_elf.h Tue Jul 27 09:01:03 2010 (r210526) @@ -60,8 +60,8 @@ typedef struct { int flags; boolean_t (*trans_osrel)(const Elf_Note *, int32_t *); #define BN_CAN_FETCH_OSREL 0x0001 /* Deprecated. */ -#define BN_TRANSLATE_OSREL 0x0002 /* Use trans_osrel fetch osrel after */ - /* checking ABI contraint if needed. */ +#define BN_TRANSLATE_OSREL 0x0002 /* Use trans_osrel to fetch osrel */ + /* after checking the image ABI specification, if needed. */ } Elf_Brandnote; typedef struct { From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 09:12:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36B01106566B; Tue, 27 Jul 2010 09:12:12 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 273E28FC15; Tue, 27 Jul 2010 09:12:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6R9CCNx045877; Tue, 27 Jul 2010 09:12:12 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6R9CCaM045874; Tue, 27 Jul 2010 09:12:12 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201007270912.o6R9CCaM045874@svn.freebsd.org> From: Ollivier Robert Date: Tue, 27 Jul 2010 09:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210527 - stable/8/share/timedef X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 09:12:12 -0000 Author: roberto Date: Tue Jul 27 09:12:11 2010 New Revision: 210527 URL: http://svn.freebsd.org/changeset/base/210527 Log: MFC r210296: Week days are all lowercase in French. cf. http://www.academie-francaise.fr/langue/questions.html#jourdelasemaine (FR) PR: misc/148792 Submitted by: Mathieu Modified: stable/8/share/timedef/fr_FR.ISO8859-1.src stable/8/share/timedef/fr_FR.UTF-8.src Directory Properties: stable/8/share/timedef/ (props changed) Modified: stable/8/share/timedef/fr_FR.ISO8859-1.src ============================================================================== --- stable/8/share/timedef/fr_FR.ISO8859-1.src Tue Jul 27 09:01:03 2010 (r210526) +++ stable/8/share/timedef/fr_FR.ISO8859-1.src Tue Jul 27 09:12:11 2010 (r210527) @@ -35,23 +35,23 @@ décembre # # Short weekday names # -Dim -Lun -Mar -Mer -Jeu -Ven -Sam +dim +lun +mar +mer +jeu +ven +sam # # Long weekday names # -Dimanche -Lundi -Mardi -Mercredi -Jeudi -Vendredi -Samedi +dimanche +lundi +mardi +mercredi +jeudi +vendredi +samedi # # X_fmt # Modified: stable/8/share/timedef/fr_FR.UTF-8.src ============================================================================== --- stable/8/share/timedef/fr_FR.UTF-8.src Tue Jul 27 09:01:03 2010 (r210526) +++ stable/8/share/timedef/fr_FR.UTF-8.src Tue Jul 27 09:12:11 2010 (r210527) @@ -35,23 +35,23 @@ décembre # # Short weekday names # -Dim -Lun -Mar -Mer -Jeu -Ven -Sam +dim +lun +mar +mer +jeu +ven +sam # # Long weekday names # -Dimanche -Lundi -Mardi -Mercredi -Jeudi -Vendredi -Samedi +dimanche +lundi +mardi +mercredi +jeudi +vendredi +samedi # # X_fmt # From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 09:22:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2E15106567A; Tue, 27 Jul 2010 09:22:41 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92F378FC14; Tue, 27 Jul 2010 09:22:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6R9Mfpm048227; Tue, 27 Jul 2010 09:22:41 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6R9Mfso048222; Tue, 27 Jul 2010 09:22:41 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007270922.o6R9Mfso048222@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 27 Jul 2010 09:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210528 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 09:22:41 -0000 Author: jchandra Date: Tue Jul 27 09:22:41 2010 New Revision: 210528 URL: http://svn.freebsd.org/changeset/base/210528 Log: Fixup mips/rmi for the new mips timer code(r210403). This will get XLR booting again. The code is a copy of the mips/mips/tick.c with minor modifications for XLR interrupt handling. Disable mips/rmi/clock.c for now, the PIC based timer code will be added later. Modified: head/sys/mips/rmi/files.xlr head/sys/mips/rmi/intr_machdep.c head/sys/mips/rmi/tick.c head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/files.xlr ============================================================================== --- head/sys/mips/rmi/files.xlr Tue Jul 27 09:12:11 2010 (r210527) +++ head/sys/mips/rmi/files.xlr Tue Jul 27 09:22:41 2010 (r210528) @@ -1,7 +1,7 @@ # $FreeBSD$ #mips/rmi/xlr_boot1_console.c standard mips/rmi/xlr_machdep.c standard -mips/rmi/clock.c standard +#mips/rmi/clock.c standard mips/rmi/tick.c standard mips/rmi/iodi.c standard mips/rmi/msgring.c standard Modified: head/sys/mips/rmi/intr_machdep.c ============================================================================== --- head/sys/mips/rmi/intr_machdep.c Tue Jul 27 09:12:11 2010 (r210527) +++ head/sys/mips/rmi/intr_machdep.c Tue Jul 27 09:22:41 2010 (r210528) @@ -144,11 +144,11 @@ cpu_intr(struct trapframe *tf) return; } /* - * No need to clear the EIRR here. the handler is gonna write to - * compare which clears eirr also + * No need to clear the EIRR here as the handler writes to + * compare which ACKs the interrupt. */ if (eirr & (1 << IRQ_TIMER)) { - count_compare_clockhandler(tf); + intr_event_handle(mips_intr_events[IRQ_TIMER], tf); critical_exit(); return; } Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Tue Jul 27 09:12:11 2010 (r210527) +++ head/sys/mips/rmi/tick.c Tue Jul 27 09:22:41 2010 (r210528) @@ -1,16 +1,16 @@ /*- - * Copyright (c) 2006-2009 RMI Corporation - * Copyright (c) 2006 Bruce M. Simpson + * Copyright (c) 2006-2007 Bruce M. Simpson. + * Copyright (c) 2003-2004 Juli Mallett. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -28,48 +28,121 @@ /* * Simple driver for the 32-bit interval counter built in to all * MIPS32 CPUs. - * XXX: For calibration this either needs an external clock, or - * to be explicitly told what the frequency is. */ #include __FBSDID("$FreeBSD$"); +#include "opt_cputype.h" + #include #include #include -#include -#include +#include #include +#include +#include #include #include +#include +#include +#include + +#include #include #include #include -#include +#include +#include + +uint64_t counter_freq; + +struct timecounter *platform_timecounter; +static DPCPU_DEFINE(uint32_t, cycles_per_tick); +static uint32_t cycles_per_usec; -struct timecounter counter_timecounter = { - platform_get_timecount, /* get_timecount */ - 0, /* no poll_pps */ - ~0u, /* counter_mask */ - 0, /* frequency */ - "MIPS32", /* name */ - 800, /* quality (adjusted in code) */ +static u_int32_t counter_upper = 0; +static u_int32_t counter_lower_last = 0; + +static DPCPU_DEFINE(uint32_t, compare_ticks); +static DPCPU_DEFINE(uint32_t, lost_ticks); + +struct clock_softc { + int intr_rid; + struct resource *intr_res; + void *intr_handler; + struct timecounter tc; + struct eventtimer et; }; +static struct clock_softc *softc; -void tick_init(void); +/* + * Device methods + */ +static int clock_probe(device_t); +static void clock_identify(driver_t *, device_t); +static int clock_attach(device_t); +static unsigned counter_get_timecount(struct timecounter *tc); +void +mips_timer_early_init(uint64_t clock_hz) +{ + /* Initialize clock early so that we can use DELAY sooner */ + counter_freq = clock_hz; + cycles_per_usec = (clock_hz / (1000 * 1000)); +} void -tick_init(void) +platform_initclocks(void) +{ + + if (platform_timecounter != NULL) + tc_init(platform_timecounter); +} + +static uint64_t +tick_ticker(void) { - counter_freq = platform_get_frequency(); - if (bootverbose) - printf("MIPS32 clock: %u MHz", cpu_clock); + uint64_t ret; + uint32_t ticktock; + + /* + * XXX: MIPS64 platforms can read 64-bits of counter directly. + * Also: the tc code is supposed to cope with things wrapping + * from the time counter, so I'm not sure why all these hoops + * are even necessary. + */ + ticktock = mips_rd_count(); + critical_enter(); + if (ticktock < counter_lower_last) + counter_upper++; + counter_lower_last = ticktock; + critical_exit(); - counter_timecounter.tc_frequency = counter_freq; - tc_init(&counter_timecounter); + ret = ((uint64_t) counter_upper << 32) | counter_lower_last; + return (ret); +} + +void +mips_timer_init_params(uint64_t platform_counter_freq, int double_count) +{ + + /* + * XXX: Do not use printf here: uart code 8250 may use DELAY so this + * function should be called before cninit. + */ + counter_freq = platform_counter_freq; + /* + * XXX: Some MIPS32 cores update the Count register only every two + * pipeline cycles. + * We know this because of status registers in CP0, make it automatic. + */ + if (double_count != 0) + counter_freq /= 2; + + cycles_per_usec = counter_freq / (1 * 1000 * 1000); + set_cputicker(tick_ticker, counter_freq, 1); } static int @@ -78,22 +151,225 @@ sysctl_machdep_counter_freq(SYSCTL_HANDL int error; uint64_t freq; - /* - * RRS wonders if this will really work. You don't change the req of - * the system here, it would require changes to the RMI PIC in order - * to get the TC to run at a differrent frequency. - */ - - if (counter_timecounter.tc_frequency == 0) + if (softc == NULL) return (EOPNOTSUPP); freq = counter_freq; error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); if (error == 0 && req->newptr != NULL) { counter_freq = freq; - counter_timecounter.tc_frequency = counter_freq; + softc->et.et_frequency = counter_freq; + softc->tc.tc_frequency = counter_freq; } return (error); } SYSCTL_PROC(_machdep, OID_AUTO, counter_freq, CTLTYPE_QUAD | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_counter_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_counter_freq, "IU", + "Timecounter frequency in Hz"); + +static unsigned +counter_get_timecount(struct timecounter *tc) +{ + + return (mips_rd_count()); +} + +/* + * Wait for about n microseconds (at least!). + */ +void +DELAY(int n) +{ + uint32_t cur, last, delta, usecs; + + /* + * This works by polling the timer and counting the number of + * microseconds that go by. + */ + last = mips_rd_count(); + delta = usecs = 0; + + while (n > usecs) { + cur = mips_rd_count(); + + /* Check to see if the timer has wrapped around. */ + if (cur < last) + delta += cur + (0xffffffff - last) + 1; + else + delta += cur - last; + + last = cur; + + if (delta >= cycles_per_usec) { + usecs += delta / cycles_per_usec; + delta %= cycles_per_usec; + } + } +} + +static int +clock_start(struct eventtimer *et, + struct bintime *first, struct bintime *period) +{ + uint32_t fdiv, div, next; + + if (period != NULL) { + div = (et->et_frequency * (period->frac >> 32)) >> 32; + if (period->sec != 0) + div += et->et_frequency * period->sec; + } else + div = 0; + if (first != NULL) { + fdiv = (et->et_frequency * (first->frac >> 32)) >> 32; + if (first->sec != 0) + fdiv += et->et_frequency * first->sec; + } else + fdiv = div; + DPCPU_SET(cycles_per_tick, div); + next = mips_rd_count() + fdiv; + DPCPU_SET(compare_ticks, next); + mips_wr_compare(next); + return (0); +} + +static int +clock_stop(struct eventtimer *et) +{ + + DPCPU_SET(cycles_per_tick, 0); + mips_wr_compare(0xffffffff); + return (0); +} + +/* + * Device section of file below + */ +static int +clock_intr(void *arg) +{ + struct clock_softc *sc = (struct clock_softc *)arg; + uint32_t cycles_per_tick; + uint32_t count, compare_last, compare_next, lost_ticks; + + cycles_per_tick = DPCPU_GET(cycles_per_tick); + /* + * Set next clock edge. + */ + count = mips_rd_count(); + compare_last = DPCPU_GET(compare_ticks); + if (cycles_per_tick > 0) { + compare_next = count + cycles_per_tick; + DPCPU_SET(compare_ticks, compare_next); + mips_wr_compare(compare_next); + } else /* In one-shot mode timer should be stopped after the event. */ + mips_wr_compare(0xffffffff); + + critical_enter(); + if (count < counter_lower_last) { + counter_upper++; + counter_lower_last = count; + } + + if (cycles_per_tick > 0) { + + /* + * Account for the "lost time" between when the timer interrupt + * fired and when 'clock_intr' actually started executing. + */ + lost_ticks = DPCPU_GET(lost_ticks); + lost_ticks += count - compare_last; + + /* + * If the COUNT and COMPARE registers are no longer in sync + * then make up some reasonable value for the 'lost_ticks'. + * + * This could happen, for e.g., after we resume normal + * operations after exiting the debugger. + */ + if (lost_ticks > 2 * cycles_per_tick) + lost_ticks = cycles_per_tick; + + while (lost_ticks >= cycles_per_tick) { + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + lost_ticks -= cycles_per_tick; + } + DPCPU_SET(lost_ticks, lost_ticks); + } + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + critical_exit(); + return (FILTER_HANDLED); +} + +static int +clock_probe(device_t dev) +{ + + if (device_get_unit(dev) != 0) + panic("can't attach more clocks"); + + device_set_desc(dev, "Generic MIPS32 ticker"); + return (0); +} + +static void +clock_identify(driver_t * drv, device_t parent) +{ + + BUS_ADD_CHILD(parent, 0, "clock", 0); +} + +static int +clock_attach(device_t dev) +{ + struct clock_softc *sc; + + softc = sc = device_get_softc(dev); + cpu_establish_hardintr("compare", clock_intr, NULL, + sc, IRQ_TIMER, INTR_TYPE_CLK, &sc->intr_handler); + + sc->tc.tc_get_timecount = counter_get_timecount; + sc->tc.tc_counter_mask = 0xffffffff; + sc->tc.tc_frequency = counter_freq; + sc->tc.tc_name = "MIPS32"; + sc->tc.tc_quality = 800; + sc->tc.tc_priv = sc; + tc_init(&sc->tc); + sc->et.et_name = "MIPS32"; + sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | + ET_FLAGS_PERCPU; + sc->et.et_quality = 800; + sc->et.et_frequency = counter_freq; + sc->et.et_min_period.sec = 0; + sc->et.et_min_period.frac = 0x00004000LLU << 32; /* To be safe. */ + sc->et.et_max_period.sec = 0xfffffffeU / sc->et.et_frequency; + sc->et.et_max_period.frac = + ((0xfffffffeLLU << 32) / sc->et.et_frequency) << 32; + sc->et.et_start = clock_start; + sc->et.et_stop = clock_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + return (0); +} + +static device_method_t clock_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, clock_probe), + DEVMETHOD(device_identify, clock_identify), + DEVMETHOD(device_attach, clock_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + {0, 0} +}; + +static driver_t clock_driver = { + "clock", + clock_methods, + sizeof(struct clock_softc), +}; + +static devclass_t clock_devclass; + +DRIVER_MODULE(clock, nexus, clock_driver, clock_devclass, 0, 0); Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Tue Jul 27 09:12:11 2010 (r210527) +++ head/sys/mips/rmi/xlr_machdep.c Tue Jul 27 09:22:41 2010 (r210528) @@ -322,11 +322,8 @@ platform_start(__register_t a0 __unused, * platform_get_frequency(). Thus we do not use * xlr_boot1_info.cpu_frequency here. */ - mips_timer_early_init(platform_get_frequency()); + mips_timer_early_init(xlr_boot1_info.cpu_frequency); - /* Init the time counter in the PIC and local putc routine*/ - rmi_early_counter_init(); - /* Init console please */ cninit(); init_static_kenv(boot1_env, sizeof(boot1_env)); @@ -445,7 +442,7 @@ platform_start(__register_t a0 __unused, */ rmi_spin_mutex_safe = 1; on_chip_init(); - mips_timer_init_params(platform_get_frequency(), 0); + mips_timer_init_params(xlr_boot1_info.cpu_frequency, 0); printf("Platform specific startup now completes\n"); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 10:05:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2DA31065675; Tue, 27 Jul 2010 10:05:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E466C8FC23; Tue, 27 Jul 2010 10:05:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RA5RfX057696; Tue, 27 Jul 2010 10:05:27 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RA5R3O057694; Tue, 27 Jul 2010 10:05:27 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007271005.o6RA5R3O057694@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 27 Jul 2010 10:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210529 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 10:05:28 -0000 Author: glebius Date: Tue Jul 27 10:05:27 2010 New Revision: 210529 URL: http://svn.freebsd.org/changeset/base/210529 Log: When installing a new ARP entry via 'arp -S', lla_lookup() will either find an existing entry, or allocate a new one. In the latter case an entry would have flags, that were supplied as argument to lla_lookup(). In case of an existing entry, flags aren't modified. This lead to losing LLE_PUB and/or LLE_PROXY flags. We should apply these flags either in lla_rt_output() or in the in.c:in_lltable_lookup(). It seems to me that lla_rt_output() is a more correct choice. PR: kern/148784, kern/146539 Silence from: qingli, 5 days Modified: head/sys/net/if_llatbl.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Tue Jul 27 09:22:41 2010 (r210528) +++ head/sys/net/if_llatbl.c Tue Jul 27 10:05:27 2010 (r210529) @@ -337,6 +337,7 @@ lla_rt_output(struct rt_msghdr *rtm, str * LLE_DELETED flag, and reset the expiration timer */ bcopy(LLADDR(dl), &lle->ll_addr, ifp->if_addrlen); + lle->la_flags |= (flags & (LLE_PUB | LLE_PROXY)); lle->la_flags |= LLE_VALID; lle->la_flags &= ~LLE_DELETED; #ifdef INET6 From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 11:54:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15B72106564A; Tue, 27 Jul 2010 11:54:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07A548FC22; Tue, 27 Jul 2010 11:54:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RBs104084407; Tue, 27 Jul 2010 11:54:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RBs11i084405; Tue, 27 Jul 2010 11:54:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201007271154.o6RBs11i084405@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 27 Jul 2010 11:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210532 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 11:54:02 -0000 Author: bz Date: Tue Jul 27 11:54:01 2010 New Revision: 210532 URL: http://svn.freebsd.org/changeset/base/210532 Log: Return NULL rather than 0 for a pointer. MFC after: 3 days Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Jul 27 11:50:53 2010 (r210531) +++ head/sys/net/if.c Tue Jul 27 11:54:01 2010 (r210532) @@ -1728,7 +1728,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, u_int af = addr->sa_family; if (af >= AF_MAX) - return (0); + return (NULL); IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != af) From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 11:56:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F241106564A; Tue, 27 Jul 2010 11:56:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30C248FC20; Tue, 27 Jul 2010 11:56:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RBuoOO085101; Tue, 27 Jul 2010 11:56:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RBuoHt085099; Tue, 27 Jul 2010 11:56:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007271156.o6RBuoHt085099@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 27 Jul 2010 11:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210533 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 11:56:50 -0000 Author: glebius Date: Tue Jul 27 11:56:49 2010 New Revision: 210533 URL: http://svn.freebsd.org/changeset/base/210533 Log: Don't check malloc(M_WAITOK) result. Modified: head/sys/net/if_llatbl.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Tue Jul 27 11:54:01 2010 (r210532) +++ head/sys/net/if_llatbl.c Tue Jul 27 11:56:49 2010 (r210533) @@ -234,8 +234,6 @@ lltable_init(struct ifnet *ifp, int af) register int i; llt = malloc(sizeof(struct lltable), M_LLTABLE, M_WAITOK); - if (llt == NULL) - return (NULL); llt->llt_af = af; llt->llt_ifp = ifp; From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 12:29:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20A60106567A; Tue, 27 Jul 2010 12:29:46 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C5A98FC1F; Tue, 27 Jul 2010 12:29:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RCTjIU092478; Tue, 27 Jul 2010 12:29:45 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RCTjUk092475; Tue, 27 Jul 2010 12:29:45 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007271229.o6RCTjUk092475@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 27 Jul 2010 12:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210534 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 12:29:46 -0000 Author: gavin Date: Tue Jul 27 12:29:45 2010 New Revision: 210534 URL: http://svn.freebsd.org/changeset/base/210534 Log: Add support for the Longcheer WM66 USB HSDPA Modem to u3g(4) This patch is different to that provided in the PR, due to the changes in this driver since 7.x. PR: usb/129945 Submitted by: Antonio Hilario MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Tue Jul 27 11:56:49 2010 (r210533) +++ head/sys/dev/usb/serial/u3g.c Tue Jul 27 12:29:45 2010 (r210534) @@ -285,6 +285,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), + U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), U3G_DEV(MERLIN, V620, 0), U3G_DEV(NOVATEL, E725, 0), U3G_DEV(NOVATEL, ES620, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 27 11:56:49 2010 (r210533) +++ head/sys/dev/usb/usbdevs Tue Jul 27 12:29:45 2010 (r210534) @@ -645,6 +645,7 @@ vendor STELERA 0x1a8d Stelera Wireless vendor OVISLINK 0x1b75 OvisLink vendor TCTMOBILE 0x1bbb TCT Mobile vendor TELIT 0x1bc7 Telit +vendor LONGCHEER 0x1c9e Longcheer Holdings, Ltd. vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik vendor PEGATRON 0x1d4d Pegatron @@ -1984,6 +1985,9 @@ product LOGITEC RT2870_1 0x0162 RT2870 product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 +/* Longcheer Holdings, Ltd. products */ +product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA USB modem + /* Lucent products */ product LUCENT EVALKIT 0x1001 USS-720 evaluation kit From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 12:53:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 439EB106564A; Tue, 27 Jul 2010 12:53:54 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 338F18FC15; Tue, 27 Jul 2010 12:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RCrsxV097942; Tue, 27 Jul 2010 12:53:54 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RCrs8M097940; Tue, 27 Jul 2010 12:53:54 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007271253.o6RCrs8M097940@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 27 Jul 2010 12:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210535 - stable/7/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 12:53:54 -0000 Author: gavin Date: Tue Jul 27 12:53:53 2010 New Revision: 210535 URL: http://svn.freebsd.org/changeset/base/210535 Log: Support the ZTE AC8700 EVDO modem in u3g(4) No mergeinfo due to vastly differing stacks in head vs stable/7. PR: usb/129522 Submitted by: Sergej Kandyla Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Tue Jul 27 12:29:45 2010 (r210534) +++ stable/7/sys/dev/usb/u3g.c Tue Jul 27 12:53:53 2010 (r210535) @@ -138,6 +138,7 @@ static const struct u3g_dev_type_s u3g_d {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR }, U3GSP_CDMA, U3GINIT_ZTESTOR }, {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM }, U3GSP_CDMA, U3GINIT_EJECT }, {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_MSM }, U3GSP_CDMA, U3GINIT_NONE }, + {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_AC8700 }, U3GSP_CDMA, U3GINIT_NONE }, /* OEM: Huawei */ {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE }, U3GSP_HSDPA, U3GINIT_HUAWEI }, {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, U3GSP_HSPA, U3GINIT_HUAWEI }, From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 13:06:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10643106566C; Tue, 27 Jul 2010 13:06:19 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9A5F8FC17; Tue, 27 Jul 2010 13:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RD6IUH000895; Tue, 27 Jul 2010 13:06:18 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RD6I9q000892; Tue, 27 Jul 2010 13:06:18 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201007271306.o6RD6I9q000892@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 27 Jul 2010 13:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210536 - in stable/8/sys: i386/i386 pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 13:06:19 -0000 Author: tijl Date: Tue Jul 27 13:06:18 2010 New Revision: 210536 URL: http://svn.freebsd.org/changeset/base/210536 Log: MFC r210294: Store fsbase and gsbase in the right fields of the mcontext. They were switched. PR: i386/148344 Approved by: kib (mentor) Modified: stable/8/sys/i386/i386/machdep.c stable/8/sys/pc98/pc98/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Tue Jul 27 12:53:53 2010 (r210535) +++ stable/8/sys/i386/i386/machdep.c Tue Jul 27 13:06:18 2010 (r210536) @@ -644,10 +644,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* * Unconditionally fill the fsbase and gsbase into the mcontext. */ - sdp = &td->td_pcb->pcb_gsd; + sdp = &td->td_pcb->pcb_fsd; sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sdp = &td->td_pcb->pcb_fsd; + sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; @@ -3255,9 +3255,9 @@ get_mcontext(struct thread *td, mcontext * mcontext after mc_fpstate. */ get_fpcontext(td, mcp); - sdp = &td->td_pcb->pcb_gsd; - mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_fsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; return (0); Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Tue Jul 27 12:53:53 2010 (r210535) +++ stable/8/sys/pc98/pc98/machdep.c Tue Jul 27 13:06:18 2010 (r210536) @@ -566,10 +566,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* * Unconditionally fill the fsbase and gsbase into the mcontext. */ - sdp = &td->td_pcb->pcb_gsd; + sdp = &td->td_pcb->pcb_fsd; sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sdp = &td->td_pcb->pcb_fsd; + sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; @@ -2454,9 +2454,9 @@ get_mcontext(struct thread *td, mcontext mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); - sdp = &td->td_pcb->pcb_gsd; - mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_fsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; return (0); From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 14:26:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EE21106566B; Tue, 27 Jul 2010 14:26:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1418FC21; Tue, 27 Jul 2010 14:26:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6REQZEg018988; Tue, 27 Jul 2010 14:26:35 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6REQYZ9018985; Tue, 27 Jul 2010 14:26:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007271426.o6REQYZ9018985@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 27 Jul 2010 14:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210537 - in head/sys: netgraph netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 14:26:35 -0000 Author: glebius Date: Tue Jul 27 14:26:34 2010 New Revision: 210537 URL: http://svn.freebsd.org/changeset/base/210537 Log: Fix operation of "netgraph" action in conjunction with the net.inet.ip.fw.one_pass sysctl. The "ngtee" action is still broken. PR: kern/148885 Submitted by: Nickolay Dudorov Modified: head/sys/netgraph/ng_ipfw.c head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Tue Jul 27 13:06:18 2010 (r210536) +++ head/sys/netgraph/ng_ipfw.c Tue Jul 27 14:26:34 2010 (r210537) @@ -287,7 +287,8 @@ ng_ipfw_input(struct mbuf **m0, int dir, } r = (struct ipfw_rule_ref *)(tag + 1); *r = fwa->rule; - r->info = dir ? IPFW_INFO_IN : IPFW_INFO_OUT; + r->info &= IPFW_ONEPASS; /* keep this info */ + r->info |= dir ? IPFW_INFO_IN : IPFW_INFO_OUT; m_tag_prepend(m, tag); } else Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Tue Jul 27 13:06:18 2010 (r210536) +++ head/sys/netinet/ipfw/ip_fw2.c Tue Jul 27 14:26:34 2010 (r210537) @@ -2084,6 +2084,8 @@ do { \ set_match(args, f_pos, chain); args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; + if (V_fw_one_pass) + args->rule.info |= IPFW_ONEPASS; retval = (cmd->opcode == O_NETGRAPH) ? IP_FW_NETGRAPH : IP_FW_NGTEE; l = 0; /* exit inner loop */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 14:26:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A407106566C; Tue, 27 Jul 2010 14:26:38 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89FF18FC1B; Tue, 27 Jul 2010 14:26:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6REQcEI019024; Tue, 27 Jul 2010 14:26:38 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6REQcKM019022; Tue, 27 Jul 2010 14:26:38 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007271426.o6REQcKM019022@svn.freebsd.org> From: Rui Paulo Date: Tue, 27 Jul 2010 14:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210538 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 14:26:38 -0000 Author: rpaulo Date: Tue Jul 27 14:26:38 2010 New Revision: 210538 URL: http://svn.freebsd.org/changeset/base/210538 Log: Add an entry to remove the acpi_boost(4) man page. Submitted by: pluknet Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 27 14:26:34 2010 (r210537) +++ head/ObsoleteFiles.inc Tue Jul 27 14:26:38 2010 (r210538) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100725: acpi_aiboost(4) removal. +OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz # 20100720: new clang import which bumps version from 2.0 to 2.8 OLD_FILES+=usr/include/clang/2.0/emmintrin.h OLD_FILES+=usr/include/clang/2.0/mm_malloc.h From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 14:31:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83ED71065672; Tue, 27 Jul 2010 14:31:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 733A18FC08; Tue, 27 Jul 2010 14:31:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6REVdsl020231; Tue, 27 Jul 2010 14:31:39 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6REVdWq020229; Tue, 27 Jul 2010 14:31:39 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201007271431.o6REVdWq020229@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 27 Jul 2010 14:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210539 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 14:31:39 -0000 Author: glebius Date: Tue Jul 27 14:31:39 2010 New Revision: 210539 URL: http://svn.freebsd.org/changeset/base/210539 Log: Document that the "ngtee" action no longer accepts packet, and thus don't depend on one_pass flag anymore. This is a POLA violation, but it is quite difficult to restore the old behavior with new code. Also, the new behavior matches behavior of the older "tee" action, and this is more intuitive. Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Tue Jul 27 14:26:38 2010 (r210538) +++ head/sbin/ipfw/ipfw.8 Tue Jul 27 14:31:39 2010 (r210539) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2010 +.Dd July 27, 2010 .Dt IPFW 8 .Os .Sh NAME @@ -859,9 +859,7 @@ accepted or continues with the next rule sysctl variable. .It Cm ngtee Ar cookie A copy of packet is diverted into netgraph, original -packet is either accepted or continues with the next rule, depending on -.Va net.inet.ip.fw.one_pass -sysctl variable. +packet continues with the next rule. See .Xr ng_ipfw 4 for more information on From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 14:32:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B89A1065674; Tue, 27 Jul 2010 14:32:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEC608FC1D; Tue, 27 Jul 2010 14:32:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6REWpMH020549; Tue, 27 Jul 2010 14:32:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6REWpbW020547; Tue, 27 Jul 2010 14:32:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007271432.o6REWpbW020547@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 27 Jul 2010 14:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210540 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 14:32:52 -0000 Author: jkim Date: Tue Jul 27 14:32:51 2010 New Revision: 210540 URL: http://svn.freebsd.org/changeset/base/210540 Log: MFC: r210383 Fix an obvious typo. We were acquiring an exclusive writer lock regardless of the given flags. Modified: stable/8/sys/net/if_llatbl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if_llatbl.c ============================================================================== --- stable/8/sys/net/if_llatbl.c Tue Jul 27 14:31:39 2010 (r210539) +++ stable/8/sys/net/if_llatbl.c Tue Jul 27 14:32:51 2010 (r210540) @@ -323,7 +323,7 @@ lla_rt_output(struct rt_msghdr *rtm, str LLTABLE_RUNLOCK(); KASSERT(llt != NULL, ("Yep, ugly hacks are bad\n")); - if (flags && LLE_CREATE) + if (flags & LLE_CREATE) flags |= LLE_EXCLUSIVE; IF_AFDATA_LOCK(ifp); From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 14:35:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBDAC1065670; Tue, 27 Jul 2010 14:35:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA3BA8FC25; Tue, 27 Jul 2010 14:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6REZHSm021171; Tue, 27 Jul 2010 14:35:17 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6REZHH9021169; Tue, 27 Jul 2010 14:35:17 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007271435.o6REZHH9021169@svn.freebsd.org> From: Martin Matuska Date: Tue, 27 Jul 2010 14:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210541 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 14:35:17 -0000 Author: mm Date: Tue Jul 27 14:35:17 2010 New Revision: 210541 URL: http://svn.freebsd.org/changeset/base/210541 Log: MFC r210282: To improve latency, lower default vfs.zfs.vdev.max_pending from 35 to 10 OpenSolaris onnv changeset (partial): 10801:e0bf032e8673 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6891731) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jul 27 14:32:51 2010 (r210540) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jul 27 14:35:17 2010 (r210541) @@ -38,7 +38,7 @@ * of i/os pending to each device (before it starts ramping up to * max_pending). */ -int zfs_vdev_max_pending = 35; +int zfs_vdev_max_pending = 10; int zfs_vdev_min_pending = 4; /* deadline = pri + (LBOLT >> time_shift) */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 14:49:44 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 978BF1065676; Tue, 27 Jul 2010 14:49:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id 298A98FC19; Tue, 27 Jul 2010 14:49:43 +0000 (UTC) Received: from mail-gw6.york.ac.uk (mail-gw6.york.ac.uk [144.32.129.26]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id o6REnf3Y011589; Tue, 27 Jul 2010 15:49:41 +0100 (BST) Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw6.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1OdlTR-0007UW-8z; Tue, 27 Jul 2010 15:49:41 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id o6REnfPF080508; Tue, 27 Jul 2010 15:49:41 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id o6REneR2080507; Tue, 27 Jul 2010 15:49:40 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Jung-uk Kim In-Reply-To: <201007261953.o6QJrAFd069188@svn.freebsd.org> References: <201007261953.o6QJrAFd069188@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Tue, 27 Jul 2010 15:49:40 +0100 Message-ID: <1280242180.78791.33.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210514 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 14:49:44 -0000 On Mon, 2010-07-26 at 19:53 +0000, Jung-uk Kim wrote: > Author: jkim > Date: Mon Jul 26 19:53:09 2010 > New Revision: 210514 > URL: http://svn.freebsd.org/changeset/base/210514 >=20 > Log: > Re-implement FPU suspend/resume for amd64. This removes superfluous us= es > of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetreg= s(). > Also, we do not touch PCB flags any more. Hi, Is this likely to make suspend.resume more reliable? Or is it basically more of a tidy up of the existing code? My laptop hangs on resume maybe 1 in 5 times, but will also hang 100% of the time if I've been running virtualbox - and as a result I'm assuming it's somethign to do with some register saving/restoring that needs to happen but isn't at the moment. I have no idea how to debug the problem further though. Thanks, Gavin --=20 Gavin Atkinson FreeBSD committer and bugmeister From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 15:10:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB761065672; Tue, 27 Jul 2010 15:10:05 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507988FC13; Tue, 27 Jul 2010 15:10:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RFA53w029090; Tue, 27 Jul 2010 15:10:05 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RFA5Wf029088; Tue, 27 Jul 2010 15:10:05 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007271510.o6RFA5Wf029088@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 27 Jul 2010 15:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210542 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 15:10:05 -0000 Author: jchandra Date: Tue Jul 27 15:10:05 2010 New Revision: 210542 URL: http://svn.freebsd.org/changeset/base/210542 Log: The count/compare values have to be tracked per CPU. Reviewed by: mav Modified: head/sys/mips/rmi/tick.c Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Tue Jul 27 14:35:17 2010 (r210541) +++ head/sys/mips/rmi/tick.c Tue Jul 27 15:10:05 2010 (r210542) @@ -62,9 +62,8 @@ struct timecounter *platform_timecounter static DPCPU_DEFINE(uint32_t, cycles_per_tick); static uint32_t cycles_per_usec; -static u_int32_t counter_upper = 0; -static u_int32_t counter_lower_last = 0; - +static DPCPU_DEFINE(uint32_t, counter_upper); +static DPCPU_DEFINE(uint32_t, counter_lower_last); static DPCPU_DEFINE(uint32_t, compare_ticks); static DPCPU_DEFINE(uint32_t, lost_ticks); @@ -106,6 +105,7 @@ tick_ticker(void) { uint64_t ret; uint32_t ticktock; + uint32_t t_lower_last, t_upper; /* * XXX: MIPS64 platforms can read 64-bits of counter directly. @@ -115,12 +115,16 @@ tick_ticker(void) */ ticktock = mips_rd_count(); critical_enter(); - if (ticktock < counter_lower_last) - counter_upper++; - counter_lower_last = ticktock; + t_lower_last = DPCPU_GET(counter_lower_last); + t_upper = DPCPU_GET(counter_upper); + if (ticktock < t_lower_last) + t_upper++; + t_lower_last = ticktock; critical_exit(); - ret = ((uint64_t) counter_upper << 32) | counter_lower_last; + DPCPU_SET(counter_upper, t_upper); + DPCPU_SET(counter_lower_last, t_lower_last); + ret = ((uint64_t)t_upper << 32) | t_lower_last; return (ret); } @@ -265,9 +269,9 @@ clock_intr(void *arg) mips_wr_compare(0xffffffff); critical_enter(); - if (count < counter_lower_last) { - counter_upper++; - counter_lower_last = count; + if (count < DPCPU_GET(counter_lower_last)) { + DPCPU_SET(counter_upper, DPCPU_GET(counter_upper) + 1); + DPCPU_SET(counter_lower_last, count); } if (cycles_per_tick > 0) { From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 16:15:34 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id AF4751065674; Tue, 27 Jul 2010 16:15:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Gavin Atkinson Date: Tue, 27 Jul 2010 12:15:06 -0400 User-Agent: KMail/1.6.2 References: <201007261953.o6QJrAFd069188@svn.freebsd.org> <1280242180.78791.33.camel@buffy.york.ac.uk> In-Reply-To: <1280242180.78791.33.camel@buffy.york.ac.uk> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007271215.26238.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210514 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 16:15:34 -0000 On Tuesday 27 July 2010 10:49 am, Gavin Atkinson wrote: > On Mon, 2010-07-26 at 19:53 +0000, Jung-uk Kim wrote: > > Author: jkim > > Date: Mon Jul 26 19:53:09 2010 > > New Revision: 210514 > > URL: http://svn.freebsd.org/changeset/base/210514 > > > > Log: > > Re-implement FPU suspend/resume for amd64. This removes > > superfluous uses of critical_enter(9) and critical_exit(9) by > > fpugetregs() and fpusetregs(). Also, we do not touch PCB flags > > any more. > > Hi, > > Is this likely to make suspend.resume more reliable? Or is it > basically more of a tidy up of the existing code? The latter. > My laptop hangs on resume maybe 1 in 5 times, but will also hang > 100% of the time if I've been running virtualbox - and as a result > I'm assuming it's somethign to do with some register > saving/restoring that needs to happen but isn't at the moment. The biggest problem with suspend/resume is there are too many drivers (from base and ports) do not save/restore/reinitialize firmware, registers or device memory properly. I haven't looked at the source but I guess vbox host driver may be one of them. > I have no idea how to debug the problem further though. The simplest thing to try is: sysctl debug.bootverbose=1 sysctl debug.acpi.suspend_bounce=1 acpiconf -s 3 This test emulates suspend/resume cycle of all device drivers without actually going into S3 state. In some cases, you can easily catch problems with this method (e.g., losing firmware state, device watchdog time out, and retrying forever). Note that the system does not really enter S3 state, which means devices may not lose power at all. It also means some devices will just work fine even if suspend/resume methods are totally missing unlike real S3 state. Harder cases require additional hardware, i.e., serial port/cable for serial console or Firewire port/cable for dcons(4), and usual kernel debugging skills. When you find the culprit, try S3 again *without* the driver. Then, the next and the next until everything is working properly. In fact, I had to buy a "port 80h card" when I encountered a complicated hard hang. :-/ Don't forget to file PR if you find an offending driver. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 16:55:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 606C51065675; Tue, 27 Jul 2010 16:55:52 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id BA6B78FC0C; Tue, 27 Jul 2010 16:55:51 +0000 (UTC) Received: by gyg4 with SMTP id 4so1649753gyg.13 for ; Tue, 27 Jul 2010 09:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=/mt0nog/geJl0woNUWxBo1ajEFws6AKxhTVZxF4EC7o=; b=iRWSA/++YmCZIylUa3V+qu1Ysfv1rpEg5C7qsjt7RQkBAZ89bBR5krhkWF8wtm2kWZ V92MLYios/Zh2L/bt3fd6MhLhxHofIwf+JpD3UNeoNmdQrTtvA4WfGjmvLm6MxDLngB6 NCHK6UQyOOdqCvrmoCY/4fUBCSqYIZW8BsXbg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=XWnJf+/fTLF5Oe7Dm/8NgViejmI3KN/CV8ecz/xgtnnQbwaRTpvTaB/ZPF0G0y6mfS bhxXnyfI1NM1FwcHpHu2slVedx2f81JHtEkHfv2XPrR1b3p6abdZenu8OzwKJ67FwS+o BRtvSYj986qMRD1GMfibaUno2vTItSP0+U2uo= Received: by 10.150.7.3 with SMTP id 3mr8240337ybg.407.1280249751035; Tue, 27 Jul 2010 09:55:51 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 36sm5105813ybr.20.2010.07.27.09.55.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Jul 2010 09:55:49 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 27 Jul 2010 09:55:04 -0700 From: Pyun YongHyeon Date: Tue, 27 Jul 2010 09:55:04 -0700 To: Jung-uk Kim Message-ID: <20100727165504.GA3100@michelle.cdnetworks.com> References: <201007261953.o6QJrAFd069188@svn.freebsd.org> <1280242180.78791.33.camel@buffy.york.ac.uk> <201007271215.26238.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007271215.26238.jkim@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gavin Atkinson , src-committers@freebsd.org Subject: Re: svn commit: r210514 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 16:55:52 -0000 On Tue, Jul 27, 2010 at 12:15:06PM -0400, Jung-uk Kim wrote: > On Tuesday 27 July 2010 10:49 am, Gavin Atkinson wrote: > > On Mon, 2010-07-26 at 19:53 +0000, Jung-uk Kim wrote: > > > Author: jkim > > > Date: Mon Jul 26 19:53:09 2010 > > > New Revision: 210514 > > > URL: http://svn.freebsd.org/changeset/base/210514 > > > > > > Log: > > > Re-implement FPU suspend/resume for amd64. This removes > > > superfluous uses of critical_enter(9) and critical_exit(9) by > > > fpugetregs() and fpusetregs(). Also, we do not touch PCB flags > > > any more. > > > > Hi, > > > > Is this likely to make suspend.resume more reliable? Or is it > > basically more of a tidy up of the existing code? > > The latter. > > > My laptop hangs on resume maybe 1 in 5 times, but will also hang > > 100% of the time if I've been running virtualbox - and as a result > > I'm assuming it's somethign to do with some register > > saving/restoring that needs to happen but isn't at the moment. > > The biggest problem with suspend/resume is there are too many drivers > (from base and ports) do not save/restore/reinitialize firmware, > registers or device memory properly. I haven't looked at the source > but I guess vbox host driver may be one of them. > To me, it was always USB stack that completely hangs the box. I tried to fix that but I'm still seeing big wall of new USB stack and lock complexity. Maybe this would be one of reason why I can't wake up my box via USB ethernet controller with magic packet. It seems that suspend/resume KOBJ method is not even invoked for USB devices. > > I have no idea how to debug the problem further though. > > The simplest thing to try is: > > sysctl debug.bootverbose=1 > sysctl debug.acpi.suspend_bounce=1 > acpiconf -s 3 > > This test emulates suspend/resume cycle of all device drivers without > actually going into S3 state. In some cases, you can easily catch > problems with this method (e.g., losing firmware state, device > watchdog time out, and retrying forever). Note that the system does > not really enter S3 state, which means devices may not lose power at > all. It also means some devices will just work fine even if > suspend/resume methods are totally missing unlike real S3 state. > > Harder cases require additional hardware, i.e., serial port/cable for > serial console or Firewire port/cable for dcons(4), and usual kernel > debugging skills. When you find the culprit, try S3 again *without* > the driver. Then, the next and the next until everything is working > properly. In fact, I had to buy a "port 80h card" when I encountered > a complicated hard hang. :-/ > > Don't forget to file PR if you find an offending driver. > > Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 17:07:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630371065677; Tue, 27 Jul 2010 17:07:17 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 378678FC27; Tue, 27 Jul 2010 17:07:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RH7HA3055621; Tue, 27 Jul 2010 17:07:17 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RH7HQV055618; Tue, 27 Jul 2010 17:07:17 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007271707.o6RH7HQV055618@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 27 Jul 2010 17:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210543 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 17:07:17 -0000 Author: gavin Date: Tue Jul 27 17:07:16 2010 New Revision: 210543 URL: http://svn.freebsd.org/changeset/base/210543 Log: Prevent uhid(4) from attaching to the Liebert PowerSure Personal XT UPS. PR: usb/129251 Submitted by: Andrew D Wiles MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Tue Jul 27 15:10:05 2010 (r210542) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Jul 27 17:07:16 2010 (r210543) @@ -115,6 +115,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 27 15:10:05 2010 (r210542) +++ head/sys/dev/usb/usbdevs Tue Jul 27 17:07:16 2010 (r210543) @@ -346,6 +346,7 @@ vendor ASIAMD 0x06be Asia Microelectron vendor BIZLINK 0x06c4 Bizlink International vendor KEYSPAN 0x06cd Keyspan / InnoSys Inc. vendor AASHIMA 0x06d6 Aashima Technology +vendor LIEBERT 0x06da Liebert vendor MULTITECH 0x06e0 MultiTech vendor ADS 0x06e1 ADS Technologies vendor ALCATELM 0x06e4 Alcatel Microelectronics @@ -1934,6 +1935,9 @@ product LEXAR CF_READER 0xb002 USB CF R /* Lexmark products */ product LEXMARK S2450 0x0009 Optra S 2450 +/* Liebert products */ +product LIEBERT POWERSURE_PXT 0xffff PowerSure Personal XT + /* Linksys products */ product LINKSYS MAUSB2 0x0105 Camedia MAUSB-2 product LINKSYS USB10TX1 0x200c USB10TX From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 17:23:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 799DB1065670; Tue, 27 Jul 2010 17:23:40 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68E0C8FC1C; Tue, 27 Jul 2010 17:23:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RHNeQF059340; Tue, 27 Jul 2010 17:23:40 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RHNeUQ059338; Tue, 27 Jul 2010 17:23:40 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007271723.o6RHNeUQ059338@svn.freebsd.org> From: Benedict Reuschling Date: Tue, 27 Jul 2010 17:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210544 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 17:23:40 -0000 Author: bcr (doc committer) Date: Tue Jul 27 17:23:40 2010 New Revision: 210544 URL: http://svn.freebsd.org/changeset/base/210544 Log: Small typo fix: s/ommited/omitted PR: docs/148977 Submitted by: Warren Block (wblock at wonkity dot com) MFC after: 4 days Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue Jul 27 17:07:16 2010 (r210543) +++ head/sbin/geom/class/part/gpart.8 Tue Jul 27 17:23:40 2010 (r210544) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2010 +.Dd July 27, 2010 .Dt GPART 8 .Os .Sh NAME @@ -363,7 +363,7 @@ numbers and can be given by the option. If .Fl s -option is ommited then new size is automatically calculated +option is omitted then new size is automatically calculated to maximum available from given geom .Ar geom . .Pp From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 17:31:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D15AD106566B; Tue, 27 Jul 2010 17:31:03 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFAAA8FC0C; Tue, 27 Jul 2010 17:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RHV3LV061031; Tue, 27 Jul 2010 17:31:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RHV34O061025; Tue, 27 Jul 2010 17:31:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007271731.o6RHV34O061025@svn.freebsd.org> From: Alan Cox Date: Tue, 27 Jul 2010 17:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210545 - in head/sys: compat/freebsd32 kern sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 17:31:03 -0000 Author: alc Date: Tue Jul 27 17:31:03 2010 New Revision: 210545 URL: http://svn.freebsd.org/changeset/base/210545 Log: Introduce exec_alloc_args(). The objective being to encapsulate the details of the string buffer allocation in one place. Eliminate the portion of the string buffer that was dedicated to storing the interpreter name. The pointer to the interpreter name can simply be made to point to the appropriate argument string. Reviewed by: kib Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/imgact_shell.c head/sys/kern/kern_exec.c head/sys/sys/imgact.h head/sys/vm/vm_init.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Jul 27 17:23:40 2010 (r210544) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Jul 27 17:31:03 2010 (r210545) @@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$"); #endif #include -#include #include #include #include @@ -279,19 +278,18 @@ freebsd32_exec_copyin_args(struct image_ return (EFAULT); /* - * Allocate temporary demand zeroed space for argument and - * environment strings + * Allocate demand-paged memory for the file name, argument, and + * environment strings. */ - args->buf = (char *) kmem_alloc_wait(exec_map, - PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); - if (args->buf == NULL) - return (ENOMEM); + error = exec_alloc_args(args); + if (error != 0) + return (error); /* * Copy the file name. */ if (fname != NULL) { - args->fname = args->buf + MAXSHELLCMDLEN; + args->fname = args->buf; error = (segflg == UIO_SYSSPACE) ? copystr(fname, args->fname, PATH_MAX, &length) : copyinstr(fname, args->fname, PATH_MAX, &length); @@ -300,7 +298,7 @@ freebsd32_exec_copyin_args(struct image_ } else length = 0; - args->begin_argv = args->buf + MAXSHELLCMDLEN + length; + args->begin_argv = args->buf + length; args->endp = args->begin_argv; args->stringspace = ARG_MAX; Modified: head/sys/kern/imgact_shell.c ============================================================================== --- head/sys/kern/imgact_shell.c Tue Jul 27 17:23:40 2010 (r210544) +++ head/sys/kern/imgact_shell.c Tue Jul 27 17:31:03 2010 (r210545) @@ -240,8 +240,7 @@ exec_shell_imgact(imgp) imgp->args->stringspace, NULL); if (error == 0) - error = copystr(imgp->args->begin_argv, imgp->interpreter_name, - MAXSHELLCMDLEN, NULL); + imgp->interpreter_name = imgp->args->begin_argv; if (sname != NULL) sbuf_delete(sname); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Tue Jul 27 17:23:40 2010 (r210544) +++ head/sys/kern/kern_exec.c Tue Jul 27 17:31:03 2010 (r210545) @@ -375,7 +375,7 @@ do_execve(td, args, mac_p) imgp->vmspace_destroyed = 0; imgp->interpreted = 0; imgp->opened = 0; - imgp->interpreter_name = args->buf; + imgp->interpreter_name = NULL; imgp->auxargs = NULL; imgp->vp = NULL; imgp->object = NULL; @@ -1078,23 +1078,20 @@ exec_copyin_args(struct image_args *args bzero(args, sizeof(*args)); if (argv == NULL) return (EFAULT); + /* - * Allocate temporary demand zeroed space for argument and - * environment strings: - * - * o ARG_MAX for argument and environment; - * o MAXSHELLCMDLEN for the name of interpreters. + * Allocate demand-paged memory for the file name, argument, and + * environment strings. */ - args->buf = (char *) kmem_alloc_wait(exec_map, - PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); - if (args->buf == NULL) - return (ENOMEM); + error = exec_alloc_args(args); + if (error != 0) + return (error); /* * Copy the file name. */ if (fname != NULL) { - args->fname = args->buf + MAXSHELLCMDLEN; + args->fname = args->buf; error = (segflg == UIO_SYSSPACE) ? copystr(fname, args->fname, PATH_MAX, &length) : copyinstr(fname, args->fname, PATH_MAX, &length); @@ -1103,7 +1100,7 @@ exec_copyin_args(struct image_args *args } else length = 0; - args->begin_argv = args->buf + MAXSHELLCMDLEN + length; + args->begin_argv = args->buf + length; args->endp = args->begin_argv; args->stringspace = ARG_MAX; @@ -1156,13 +1153,26 @@ err_exit: return (error); } +/* + * Allocate temporary demand-paged, zero-filled memory for the file name, + * argument, and environment strings. Returns zero if the allocation succeeds + * and ENOMEM otherwise. + */ +int +exec_alloc_args(struct image_args *args) +{ + + args->buf = (char *)kmem_alloc_wait(exec_map, PATH_MAX + ARG_MAX); + return (args->buf != NULL ? 0 : ENOMEM); +} + void exec_free_args(struct image_args *args) { if (args->buf != NULL) { kmem_free_wakeup(exec_map, (vm_offset_t)args->buf, - PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); + PATH_MAX + ARG_MAX); args->buf = NULL; } } Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Tue Jul 27 17:23:40 2010 (r210544) +++ head/sys/sys/imgact.h Tue Jul 27 17:31:03 2010 (r210545) @@ -78,6 +78,7 @@ struct thread; #define IMGACT_CORE_COMPRESS 0x01 +int exec_alloc_args(struct image_args *); int exec_check_permissions(struct image_params *); register_t *exec_copyout_strings(struct image_params *); void exec_free_args(struct image_args *); Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Tue Jul 27 17:23:40 2010 (r210544) +++ head/sys/vm/vm_init.c Tue Jul 27 17:31:03 2010 (r210545) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -195,8 +194,7 @@ again: (long)nswbuf * MAXPHYS, FALSE); pager_map->system_map = 1; exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, - exec_map_entries * round_page(PATH_MAX + ARG_MAX + MAXSHELLCMDLEN), - FALSE); + exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE); pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva, FALSE); From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 17:33:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A87B106564A; Tue, 27 Jul 2010 17:33:03 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59D7E8FC1E; Tue, 27 Jul 2010 17:33:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RHX2wU061525; Tue, 27 Jul 2010 17:33:02 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RHX2wf061523; Tue, 27 Jul 2010 17:33:02 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007271733.o6RHX2wf061523@svn.freebsd.org> From: Benedict Reuschling Date: Tue, 27 Jul 2010 17:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210546 - head/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 17:33:03 -0000 Author: bcr (doc committer) Date: Tue Jul 27 17:33:02 2010 New Revision: 210546 URL: http://svn.freebsd.org/changeset/base/210546 Log: Typo fix: s/ommited/omitted MFC after: 4 days Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 ============================================================================== --- head/bin/setfacl/setfacl.1 Tue Jul 27 17:31:03 2010 (r210545) +++ head/bin/setfacl/setfacl.1 Tue Jul 27 17:33:02 2010 (r210546) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2010 +.Dd July 27, 2010 .Dt SETFACL 1 .Os .Sh NAME @@ -299,7 +299,7 @@ one of .Dq Li group@ , or .Dq Li everyone@ , -this field is ommited altogether, including the trailing comma. +this field is omitted altogether, including the trailing comma. .It Ar "access permissions" Access permissions may be specified in either short or long form. Short and long forms may not be mixed. From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 17:33:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 879AA106567B; Tue, 27 Jul 2010 17:33:51 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76EBD8FC2A; Tue, 27 Jul 2010 17:33:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RHXpZ9061724; Tue, 27 Jul 2010 17:33:51 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RHXpWu061722; Tue, 27 Jul 2010 17:33:51 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007271733.o6RHXpWu061722@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 27 Jul 2010 17:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210547 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 17:33:51 -0000 Author: jchandra Date: Tue Jul 27 17:33:51 2010 New Revision: 210547 URL: http://svn.freebsd.org/changeset/base/210547 Log: The changes in r210542 moved setting counter_upper and counter_lower_last outside the critical section - fix that. Reported by: mav Modified: head/sys/mips/rmi/tick.c Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Tue Jul 27 17:33:02 2010 (r210546) +++ head/sys/mips/rmi/tick.c Tue Jul 27 17:33:51 2010 (r210547) @@ -120,10 +120,10 @@ tick_ticker(void) if (ticktock < t_lower_last) t_upper++; t_lower_last = ticktock; - critical_exit(); - DPCPU_SET(counter_upper, t_upper); DPCPU_SET(counter_lower_last, t_lower_last); + critical_exit(); + ret = ((uint64_t)t_upper << 32) | t_lower_last; return (ret); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 17:36:32 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 7F6B91065677; Tue, 27 Jul 2010 17:36:32 +0000 (UTC) Date: Tue, 27 Jul 2010 17:36:32 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Message-ID: <20100727173632.GA61992@FreeBSD.org> References: <201007261953.o6QJrAFd069188@svn.freebsd.org> <1280242180.78791.33.camel@buffy.york.ac.uk> <201007271215.26238.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201007271215.26238.jkim@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gavin Atkinson , src-committers@FreeBSD.org Subject: Re: svn commit: r210514 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 17:36:32 -0000 On Tue, Jul 27, 2010 at 12:15:06PM -0400, Jung-uk Kim wrote: > The simplest thing to try is: > > sysctl debug.bootverbose=1 > sysctl debug.acpi.suspend_bounce=1 > acpiconf -s 3 > > This test emulates suspend/resume cycle of all device drivers without > actually going into S3 state. In some cases, you can easily catch > problems with this method (e.g., losing firmware state, device > watchdog time out, and retrying forever). Note that the system does > not really enter S3 state, which means devices may not lose power at > all. It also means some devices will just work fine even if > suspend/resume methods are totally missing unlike real S3 state. This is really nice piece of advice. Is any one interested (maybe even the author) in converting it do docbook format and adding to acpi-debug handbook chapter? I can do it if no one else steps before me. ./danfe From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 18:22:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4B3D21065670; Tue, 27 Jul 2010 18:22:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: pyunyh@gmail.com Date: Tue, 27 Jul 2010 14:22:41 -0400 User-Agent: KMail/1.6.2 References: <201007261953.o6QJrAFd069188@svn.freebsd.org> <201007271215.26238.jkim@FreeBSD.org> <20100727165504.GA3100@michelle.cdnetworks.com> In-Reply-To: <20100727165504.GA3100@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007271422.43503.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gavin Atkinson , src-committers@freebsd.org Subject: Re: svn commit: r210514 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 18:22:51 -0000 On Tuesday 27 July 2010 12:55 pm, Pyun YongHyeon wrote: > On Tue, Jul 27, 2010 at 12:15:06PM -0400, Jung-uk Kim wrote: > > On Tuesday 27 July 2010 10:49 am, Gavin Atkinson wrote: > > > On Mon, 2010-07-26 at 19:53 +0000, Jung-uk Kim wrote: > > > > Author: jkim > > > > Date: Mon Jul 26 19:53:09 2010 > > > > New Revision: 210514 > > > > URL: http://svn.freebsd.org/changeset/base/210514 > > > > > > > > Log: > > > > Re-implement FPU suspend/resume for amd64. This removes > > > > superfluous uses of critical_enter(9) and critical_exit(9) by > > > > fpugetregs() and fpusetregs(). Also, we do not touch PCB > > > > flags any more. > > > > > > Hi, > > > > > > Is this likely to make suspend.resume more reliable? Or is it > > > basically more of a tidy up of the existing code? > > > > The latter. > > > > > My laptop hangs on resume maybe 1 in 5 times, but will also > > > hang 100% of the time if I've been running virtualbox - and as > > > a result I'm assuming it's somethign to do with some register > > > saving/restoring that needs to happen but isn't at the moment. > > > > The biggest problem with suspend/resume is there are too many > > drivers (from base and ports) do not save/restore/reinitialize > > firmware, registers or device memory properly. I haven't looked > > at the source but I guess vbox host driver may be one of them. > > To me, it was always USB stack that completely hangs the box. I > tried to fix that but I'm still seeing big wall of new USB stack > and lock complexity. Maybe this would be one of reason why I can't > wake up my box via USB ethernet controller with magic packet. > It seems that suspend/resume KOBJ method is not even invoked for > USB devices. I have a box with a wireless USB keyboard/mouse receiver at home. It does not hang but these devices just disappear and it does not respond to any usbconfig(8) command after S3. Only workaround I found is reloading whole USB stack again. I think it's a chipset-specific (AMD RS780) quirk for ohci(4) or ehci(4). Unfortunately the new USB stack is a big wall for me, too. :-( Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 19:26:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD0891065672; Tue, 27 Jul 2010 19:26:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C1798FC1B; Tue, 27 Jul 2010 19:26:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RJQIDO087027; Tue, 27 Jul 2010 19:26:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RJQIbc087025; Tue, 27 Jul 2010 19:26:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007271926.o6RJQIbc087025@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 27 Jul 2010 19:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210548 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 19:26:18 -0000 Author: trasz Date: Tue Jul 27 19:26:18 2010 New Revision: 210548 URL: http://svn.freebsd.org/changeset/base/210548 Log: Fix commented out resource limit check in mlockall(2). It's still racy, but at least less misleading. Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Tue Jul 27 17:33:51 2010 (r210547) +++ head/sys/vm/vm_mmap.c Tue Jul 27 19:26:18 2010 (r210548) @@ -1082,8 +1082,7 @@ mlockall(td, uap) * a hard resource limit, return ENOMEM. */ PROC_LOCK(td->td_proc); - if (map->size - ptoa(pmap_wired_count(vm_map_pmap(map)) > - lim_cur(td->td_proc, RLIMIT_MEMLOCK))) { + if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(td->td_proc); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 19:31:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9863F1065680; Tue, 27 Jul 2010 19:31:10 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 878058FC0A; Tue, 27 Jul 2010 19:31:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RJVAZ4088155; Tue, 27 Jul 2010 19:31:10 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RJVA6Z088153; Tue, 27 Jul 2010 19:31:10 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007271931.o6RJVA6Z088153@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 27 Jul 2010 19:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210549 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 19:31:10 -0000 Author: jchandra Date: Tue Jul 27 19:31:10 2010 New Revision: 210549 URL: http://svn.freebsd.org/changeset/base/210549 Log: mips/rmi/bus_space_rmi_pci.c is needed even when PCI is disabled. This file really provides a bus that does byteswapping, and can be used by non-PCI components too. Modified: head/sys/mips/rmi/files.xlr Modified: head/sys/mips/rmi/files.xlr ============================================================================== --- head/sys/mips/rmi/files.xlr Tue Jul 27 19:26:18 2010 (r210548) +++ head/sys/mips/rmi/files.xlr Tue Jul 27 19:31:10 2010 (r210549) @@ -18,7 +18,7 @@ mips/rmi/perfmon_percpu.c optional xlr mips/rmi/xlr_pci.c optional pci mips/rmi/xls_ehci.c optional usb ehci mips/rmi/bus_space_rmi.c standard -mips/rmi/bus_space_rmi_pci.c optional pci +mips/rmi/bus_space_rmi_pci.c standard mips/rmi/dev/sec/rmisec.c optional rmisec mips/rmi/dev/sec/rmilib.c optional rmisec mips/rmi/dev/xlr/rge.c optional rge From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 20:33:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 726731065678; Tue, 27 Jul 2010 20:33:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC718FC13; Tue, 27 Jul 2010 20:33:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RKXojp002112; Tue, 27 Jul 2010 20:33:50 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RKXoF4002100; Tue, 27 Jul 2010 20:33:50 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007272033.o6RKXoF4002100@svn.freebsd.org> From: John Baldwin Date: Tue, 27 Jul 2010 20:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210550 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/include sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 20:33:50 -0000 Author: jhb Date: Tue Jul 27 20:33:50 2010 New Revision: 210550 URL: http://svn.freebsd.org/changeset/base/210550 Log: Very rough first cut at NUMA support for the physical page allocator. For now it uses a very dumb first-touch allocation policy. This will change in the future. - Each architecture indicates the maximum number of supported memory domains via a new VM_NDOMAIN parameter in . - Each cpu now has a PCPU_GET(domain) member to indicate the memory domain a CPU belongs to. Domain values are dense and numbered from 0. - When a platform supports multiple domains, the default freelist (VM_FREELIST_DEFAULT) is split up into N freelists, one for each domain. The MD code is required to populate an array of mem_affinity structures. Each entry in the array defines a range of memory (start and end) and a domain for the range. Multiple entries may be present for a single domain. The list is terminated by an entry where all fields are zero. This array of structures is used to split up phys_avail[] regions that fall in VM_FREELIST_DEFAULT into per-domain freelists. - Each memory domain has a separate lookup-array of freelists that is used when fulfulling a physical memory allocation. Right now the per-domain freelists are listed in a round-robin order for each domain. In the future a table such as the ACPI SLIT table may be used to order the per-domain lookup lists based on the penalty for each memory domain relative to a specific domain. The lookup lists may be examined via a new vm.phys.lookup_lists sysctl. - The first-touch policy is implemented by using PCPU_GET(domain) to pick a lookup list when allocating memory. Reviewed by: alc Modified: head/sys/amd64/include/vmparam.h head/sys/arm/include/vmparam.h head/sys/i386/include/vmparam.h head/sys/ia64/include/vmparam.h head/sys/mips/include/vmparam.h head/sys/powerpc/include/vmparam.h head/sys/sparc64/include/vmparam.h head/sys/sun4v/include/vmparam.h head/sys/sys/pcpu.h head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/amd64/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -132,6 +132,13 @@ #define VM_NFREEORDER 13 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Enable superpage reservations: 1 level. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/arm/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -86,6 +86,13 @@ #define VM_NFREEORDER 9 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/i386/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -119,6 +119,13 @@ #endif /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Enable superpage reservations: 1 level. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/ia64/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -120,6 +120,13 @@ #define VM_NFREEORDER 16 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/mips/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -118,6 +118,13 @@ #endif /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. (not sure if this is right * I copied it from ARM) */ Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/powerpc/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -167,6 +167,13 @@ struct pmap_physseg { #define VM_NFREEORDER 11 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/sparc64/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -121,6 +121,13 @@ #define VM_NFREEORDER 12 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/sun4v/include/vmparam.h ============================================================================== --- head/sys/sun4v/include/vmparam.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/sun4v/include/vmparam.h Tue Jul 27 20:33:50 2010 (r210550) @@ -121,6 +121,13 @@ #define VM_NFREEORDER 12 /* + * Only one memory domain. + */ +#ifndef VM_NDOMAIN +#define VM_NDOMAIN 1 +#endif + +/* * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/sys/pcpu.h Tue Jul 27 20:33:50 2010 (r210550) @@ -179,6 +179,7 @@ struct pcpu { struct device *pc_device; void *pc_netisr; /* netisr SWI cookie */ int pc_dnweight; /* vm_page_dontneed() */ + int pc_domain; /* Memory domain. */ /* * Stuff for read mostly lock Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/vm/vm_phys.c Tue Jul 27 20:33:50 2010 (r210550) @@ -56,6 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * VM_FREELIST_DEFAULT is split into VM_NDOMAIN lists, one for each + * domain. These extra lists are stored at the end of the regular + * free lists starting with VM_NFREELIST. + */ +#define VM_RAW_NFREELIST (VM_NFREELIST + VM_NDOMAIN - 1) + struct vm_freelist { struct pglist pl; int lcnt; @@ -65,15 +72,20 @@ struct vm_phys_seg { vm_paddr_t start; vm_paddr_t end; vm_page_t first_page; + int domain; struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER]; }; +struct mem_affinity *mem_affinity; + static struct vm_phys_seg vm_phys_segs[VM_PHYSSEG_MAX]; static int vm_phys_nsegs; static struct vm_freelist - vm_phys_free_queues[VM_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; + vm_phys_free_queues[VM_RAW_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; +static struct vm_freelist +(*vm_phys_lookup_lists[VM_NDOMAIN][VM_RAW_NFREELIST])[VM_NFREEPOOL][VM_NFREEORDER]; static int vm_nfreelists = VM_FREELIST_DEFAULT + 1; @@ -89,6 +101,14 @@ static int sysctl_vm_phys_segs(SYSCTL_HA SYSCTL_OID(_vm, OID_AUTO, phys_segs, CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, sysctl_vm_phys_segs, "A", "Phys Seg Info"); +#if VM_NDOMAIN > 1 +static int sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS); +SYSCTL_OID(_vm, OID_AUTO, phys_lookup_lists, CTLTYPE_STRING | CTLFLAG_RD, + NULL, 0, sysctl_vm_phys_lookup_lists, "A", "Phys Lookup Lists"); +#endif + +static void _vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind, + int domain); static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind); static int vm_phys_paddr_to_segind(vm_paddr_t pa); static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, @@ -157,6 +177,7 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) (uintmax_t)seg->start); sbuf_printf(&sbuf, "end: %#jx\n", (uintmax_t)seg->end); + sbuf_printf(&sbuf, "domain: %d\n", seg->domain); sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues); } sbuf_finish(&sbuf); @@ -166,11 +187,40 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) return (error); } +#if VM_NDOMAIN > 1 +/* + * Outputs the set of free list lookup lists. + */ +static int +sysctl_vm_phys_lookup_lists(SYSCTL_HANDLER_ARGS) +{ + struct sbuf sbuf; + char *cbuf; + const int cbufsize = (vm_nfreelists + 1) * VM_NDOMAIN * 81; + int domain, error, flind, ndomains; + + ndomains = vm_nfreelists - VM_NFREELIST + 1; + cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO); + sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN); + for (domain = 0; domain < ndomains; domain++) { + sbuf_printf(&sbuf, "\nDOMAIN %d:\n\n", domain); + for (flind = 0; flind < vm_nfreelists; flind++) + sbuf_printf(&sbuf, " [%d]:\t%p\n", flind, + vm_phys_lookup_lists[domain][flind]); + } + sbuf_finish(&sbuf); + error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf)); + sbuf_delete(&sbuf); + free(cbuf, M_TEMP); + return (error); +} +#endif + /* * Create a physical memory segment. */ static void -vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind) +_vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind, int domain) { struct vm_phys_seg *seg; #ifdef VM_PHYSSEG_SPARSE @@ -188,14 +238,51 @@ vm_phys_create_seg(vm_paddr_t start, vm_ seg = &vm_phys_segs[vm_phys_nsegs++]; seg->start = start; seg->end = end; + seg->domain = domain; #ifdef VM_PHYSSEG_SPARSE seg->first_page = &vm_page_array[pages]; #else seg->first_page = PHYS_TO_VM_PAGE(start); #endif +#if VM_NDOMAIN > 1 + if (flind == VM_FREELIST_DEFAULT && domain != 0) { + flind = VM_NFREELIST + (domain - 1); + if (flind >= vm_nfreelists) + vm_nfreelists = flind + 1; + } +#endif seg->free_queues = &vm_phys_free_queues[flind]; } +static void +vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind) +{ + int i; + + if (mem_affinity == NULL) { + _vm_phys_create_seg(start, end, flind, 0); + return; + } + + for (i = 0;; i++) { + if (mem_affinity[i].end == 0) + panic("Reached end of affinity info"); + if (mem_affinity[i].end <= start) + continue; + if (mem_affinity[i].start > start) + panic("No affinity info for start %jx", + (uintmax_t)start); + if (mem_affinity[i].end >= end) { + _vm_phys_create_seg(start, end, flind, + mem_affinity[i].domain); + break; + } + _vm_phys_create_seg(start, mem_affinity[i].end, flind, + mem_affinity[i].domain); + start = mem_affinity[i].end; + } +} + /* * Initialize the physical memory allocator. */ @@ -204,6 +291,9 @@ vm_phys_init(void) { struct vm_freelist *fl; int flind, i, oind, pind; +#if VM_NDOMAIN > 1 + int ndomains, j; +#endif for (i = 0; phys_avail[i + 1] != 0; i += 2) { #ifdef VM_FREELIST_ISADMA @@ -246,6 +336,37 @@ vm_phys_init(void) TAILQ_INIT(&fl[oind].pl); } } +#if VM_NDOMAIN > 1 + /* + * Build a free list lookup list for each domain. All of the + * memory domain lists are inserted at the VM_FREELIST_DEFAULT + * index in a round-robin order starting with the current + * domain. + */ + ndomains = vm_nfreelists - VM_NFREELIST + 1; + for (flind = 0; flind < VM_FREELIST_DEFAULT; flind++) + for (i = 0; i < ndomains; i++) + vm_phys_lookup_lists[i][flind] = + &vm_phys_free_queues[flind]; + for (i = 0; i < ndomains; i++) + for (j = 0; j < ndomains; j++) { + flind = (i + j) % ndomains; + if (flind == 0) + flind = VM_FREELIST_DEFAULT; + else + flind += VM_NFREELIST - 1; + vm_phys_lookup_lists[i][VM_FREELIST_DEFAULT + j] = + &vm_phys_free_queues[flind]; + } + for (flind = VM_FREELIST_DEFAULT + 1; flind < VM_NFREELIST; + flind++) + for (i = 0; i < ndomains; i++) + vm_phys_lookup_lists[i][flind + ndomains - 1] = + &vm_phys_free_queues[flind]; +#else + for (flind = 0; flind < vm_nfreelists; flind++) + vm_phys_lookup_lists[0][flind] = &vm_phys_free_queues[flind]; +#endif } /* @@ -321,7 +442,7 @@ vm_phys_alloc_freelist_pages(int flind, { struct vm_freelist *fl; struct vm_freelist *alt; - int oind, pind; + int domain, oind, pind; vm_page_t m; KASSERT(flind < VM_NFREELIST, @@ -330,8 +451,14 @@ vm_phys_alloc_freelist_pages(int flind, ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool)); KASSERT(order < VM_NFREEORDER, ("vm_phys_alloc_freelist_pages: order %d is out of range", order)); + +#if VM_NDOMAIN > 1 + domain = PCPU_GET(domain); +#else + domain = 0; +#endif mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - fl = vm_phys_free_queues[flind][pool]; + fl = (*vm_phys_lookup_lists[domain][flind])[pool]; for (oind = order; oind < VM_NFREEORDER; oind++) { m = TAILQ_FIRST(&fl[oind].pl); if (m != NULL) { @@ -351,7 +478,7 @@ vm_phys_alloc_freelist_pages(int flind, */ for (oind = VM_NFREEORDER - 1; oind >= order; oind--) { for (pind = 0; pind < VM_NFREEPOOL; pind++) { - alt = vm_phys_free_queues[flind][pind]; + alt = (*vm_phys_lookup_lists[domain][flind])[pind]; m = TAILQ_FIRST(&alt[oind].pl); if (m != NULL) { TAILQ_REMOVE(&alt[oind].pl, m, pageq); @@ -613,8 +740,13 @@ vm_phys_alloc_contig(unsigned long npage struct vnode *vp; vm_paddr_t pa, pa_last, size; vm_page_t deferred_vdrop_list, m, m_ret; - int flind, i, oind, order, pind; + int domain, flind, i, oind, order, pind; +#if VM_NDOMAIN > 1 + domain = PCPU_GET(domain); +#else + domain = 0; +#endif size = npages << PAGE_SHIFT; KASSERT(size != 0, ("vm_phys_alloc_contig: size must not be 0")); @@ -632,7 +764,8 @@ retry: for (flind = 0; flind < vm_nfreelists; flind++) { for (oind = min(order, VM_NFREEORDER - 1); oind < VM_NFREEORDER; oind++) { for (pind = 0; pind < VM_NFREEPOOL; pind++) { - fl = vm_phys_free_queues[flind][pind]; + fl = (*vm_phys_lookup_lists[domain][flind]) + [pind]; TAILQ_FOREACH(m_ret, &fl[oind].pl, pageq) { /* * A free list may contain physical pages Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Tue Jul 27 19:31:10 2010 (r210549) +++ head/sys/vm/vm_phys.h Tue Jul 27 20:33:50 2010 (r210550) @@ -40,6 +40,15 @@ #ifdef _KERNEL +/* Domains must be dense (non-sparse) and zero-based. */ +struct mem_affinity { + vm_paddr_t start; + vm_paddr_t end; + int domain; +}; + +extern struct mem_affinity *mem_affinity; + void vm_phys_add_page(vm_paddr_t pa); vm_page_t vm_phys_alloc_contig(unsigned long npages, vm_paddr_t low, vm_paddr_t high, From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 20:34:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD0C106566C; Tue, 27 Jul 2010 20:34:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BC9A8FC1B; Tue, 27 Jul 2010 20:34:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RKYcut002348; Tue, 27 Jul 2010 20:34:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RKYbht002345; Tue, 27 Jul 2010 20:34:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007272034.o6RKYbht002345@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 27 Jul 2010 20:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210551 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 20:34:38 -0000 Author: trasz Date: Tue Jul 27 20:34:37 2010 New Revision: 210551 URL: http://svn.freebsd.org/changeset/base/210551 Log: Update mlockall(2) to mention that it's superuser-only syscall, just like the mlock(2) manual page says. Update mlock(2) to say that hitting RLIMIT_MEMLOCK results in ENOMEM, not EAGAIN. MFC after: 1 month Modified: head/lib/libc/sys/mlock.2 head/lib/libc/sys/mlockall.2 Modified: head/lib/libc/sys/mlock.2 ============================================================================== --- head/lib/libc/sys/mlock.2 Tue Jul 27 20:33:50 2010 (r210550) +++ head/lib/libc/sys/mlock.2 Tue Jul 27 20:34:37 2010 (r210551) @@ -28,7 +28,7 @@ .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd August 10, 2004 +.Dd July 27, 2010 .Dt MLOCK 2 .Os .Sh NAME @@ -116,11 +116,12 @@ The caller is not the super-user. .It Bq Er EINVAL The address given is not page aligned or the length is negative. .It Bq Er EAGAIN -Locking the indicated range would exceed either the system or per-process -limit for locked memory. +Locking the indicated range would exceed the system limit for locked memory. .It Bq Er ENOMEM Some portion of the indicated address range is not allocated. There was an error faulting/mapping a page. +Locking the indicated range would exceed the per-process limit for locked +memory. .El The .Fn munlock Modified: head/lib/libc/sys/mlockall.2 ============================================================================== --- head/lib/libc/sys/mlockall.2 Tue Jul 27 20:33:50 2010 (r210550) +++ head/lib/libc/sys/mlockall.2 Tue Jul 27 20:34:37 2010 (r210551) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 1999 +.Dd July 27, 2010 .Dt MLOCKALL 2 .Os .Sh NAME @@ -72,6 +72,8 @@ limit and the per-process .Dv RLIMIT_MEMLOCK resource limit. .Pp +These calls are only available to the super-user. +.Pp The .Fn munlockall call unlocks any locked memory regions in the process address space. From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 20:40:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 992B8106567A; Tue, 27 Jul 2010 20:40:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 870F48FC1A; Tue, 27 Jul 2010 20:40:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RKekUx003764; Tue, 27 Jul 2010 20:40:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RKek4o003760; Tue, 27 Jul 2010 20:40:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007272040.o6RKek4o003760@svn.freebsd.org> From: John Baldwin Date: Tue, 27 Jul 2010 20:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210552 - in head/sys: conf x86/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 20:40:46 -0000 Author: jhb Date: Tue Jul 27 20:40:46 2010 New Revision: 210552 URL: http://svn.freebsd.org/changeset/base/210552 Log: Add a parser for the ACPI SRAT table for amd64 and i386. It sets PCPU(domain) for each CPU and populates a mem_affinity array suitable for the NUMA support in the physical memory allocator. Reviewed by: alc Added: head/sys/x86/acpica/ head/sys/x86/acpica/srat.c (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Jul 27 20:34:37 2010 (r210551) +++ head/sys/conf/files.amd64 Tue Jul 27 20:40:46 2010 (r210552) @@ -302,6 +302,7 @@ contrib/x86emu/x86emu.c optional x86bio # # x86 shared code between IA32, AMD64 and PC98 architectures # +x86/acpica/srat.c optional acpi x86/bios/smbios.c optional smbios x86/bios/vpd.c optional vpd x86/cpufreq/powernow.c optional cpufreq @@ -320,4 +321,3 @@ x86/x86/io_apic.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard x86/x86/msi.c optional pci - Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Jul 27 20:34:37 2010 (r210551) +++ head/sys/conf/files.i386 Tue Jul 27 20:40:46 2010 (r210552) @@ -376,6 +376,7 @@ contrib/x86emu/x86emu.c optional x86bio # # x86 shared code between IA32, AMD64 and PC98 architectures # +x86/acpica/srat.c optional acpi x86/bios/smbios.c optional smbios x86/bios/vpd.c optional vpd x86/cpufreq/est.c optional cpufreq Added: head/sys/x86/acpica/srat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/acpica/srat.c Tue Jul 27 20:40:46 2010 (r210552) @@ -0,0 +1,329 @@ +/*- + * Copyright (c) 2010 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +struct cpu_info { + int enabled:1; + int has_memory:1; + int domain; +} cpus[MAX_APIC_ID + 1]; + +struct mem_affinity mem_info[VM_PHYSSEG_MAX + 1]; +int num_mem; + +static ACPI_TABLE_SRAT *srat; +static vm_paddr_t srat_physaddr; + +static void srat_walk_table(acpi_subtable_handler *handler, void *arg); + +static void +srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *arg) +{ + ACPI_SRAT_CPU_AFFINITY *cpu; + ACPI_SRAT_X2APIC_CPU_AFFINITY *x2apic; + ACPI_SRAT_MEM_AFFINITY *mem; + int domain, i, slot; + + switch (entry->Type) { + case ACPI_SRAT_TYPE_CPU_AFFINITY: + cpu = (ACPI_SRAT_CPU_AFFINITY *)entry; + domain = cpu->ProximityDomainLo | + cpu->ProximityDomainHi[0] << 8 | + cpu->ProximityDomainHi[1] << 16 | + cpu->ProximityDomainHi[2] << 24; + if (bootverbose) + printf("SRAT: Found CPU APIC ID %u domain %d: %s\n", + cpu->ApicId, domain, + (cpu->Flags & ACPI_SRAT_CPU_ENABLED) ? + "enabled" : "disabled"); + if (!(cpu->Flags & ACPI_SRAT_CPU_ENABLED)) + break; + KASSERT(!cpus[cpu->ApicId].enabled, + ("Duplicate local APIC ID %u", cpu->ApicId)); + cpus[cpu->ApicId].domain = domain; + cpus[cpu->ApicId].enabled = 1; + break; + case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: + x2apic = (ACPI_SRAT_X2APIC_CPU_AFFINITY *)entry; + if (bootverbose) + printf("SRAT: Found CPU APIC ID %u domain %d: %s\n", + x2apic->ApicId, x2apic->ProximityDomain, + (x2apic->Flags & ACPI_SRAT_CPU_ENABLED) ? + "enabled" : "disabled"); + if (!(x2apic->Flags & ACPI_SRAT_CPU_ENABLED)) + break; + KASSERT(!cpus[x2apic->ApicId].enabled, + ("Duplicate local APIC ID %u", x2apic->ApicId)); + cpus[x2apic->ApicId].domain = x2apic->ProximityDomain; + cpus[x2apic->ApicId].enabled = 1; + break; + case ACPI_SRAT_TYPE_MEMORY_AFFINITY: + mem = (ACPI_SRAT_MEM_AFFINITY *)entry; + if (bootverbose) + printf( + "SRAT: Found memory domain %d addr %jx len %jx: %s\n", + mem->ProximityDomain, (uintmax_t)mem->BaseAddress, + (uintmax_t)mem->Length, + (mem->Flags & ACPI_SRAT_MEM_ENABLED) ? + "enabled" : "disabled"); + if (!(mem->Flags & ACPI_SRAT_MEM_ENABLED)) + break; + if (num_mem == VM_PHYSSEG_MAX) { + printf("SRAT: Too many memory regions\n"); + *(int *)arg = ENXIO; + break; + } + slot = num_mem; + for (i = 0; i < num_mem; i++) { + if (mem_info[i].end <= mem->BaseAddress) + continue; + if (mem_info[i].start < + (mem->BaseAddress + mem->Length)) { + printf("SRAT: Overlapping memory entries\n"); + *(int *)arg = ENXIO; + return; + } + slot = i; + } + for (i = num_mem; i > slot; i--) + mem_info[i] = mem_info[i - 1]; + mem_info[slot].start = mem->BaseAddress; + mem_info[slot].end = mem->BaseAddress + mem->Length; + mem_info[slot].domain = mem->ProximityDomain; + num_mem++; + break; + } +} + +/* + * Ensure each memory domain has at least one CPU and that each CPU + * has at least one memory domain. + */ +static int +check_domains(void) +{ + int found, i, j; + + for (i = 0; i < num_mem; i++) { + found = 0; + for (j = 0; j <= MAX_APIC_ID; j++) + if (cpus[j].domain == mem_info[i].domain) { + cpus[j].has_memory = 1; + found++; + } + if (!found) { + printf("SRAT: No CPU found for memory domain %d\n", + mem_info[i].domain); + return (ENXIO); + } + } + for (i = 0; i <= MAX_APIC_ID; i++) + if (cpus[i].enabled && !cpus[i].has_memory) { + printf("SRAT: No memory found for CPU %d\n", i); + return (ENXIO); + } + return (0); +} + +/* + * Check that the SRAT memory regions cover all of the regions in + * phys_avail[]. + */ +static int +check_phys_avail(void) +{ + vm_paddr_t address; + int i, j; + + /* j is the current offset into phys_avail[]. */ + address = phys_avail[0]; + j = 0; + for (i = 0; i < num_mem; i++) { + /* + * Consume as many phys_avail[] entries as fit in this + * region. + */ + while (address >= mem_info[i].start && + address <= mem_info[i].end) { + /* + * If we cover the rest of this phys_avail[] entry, + * advance to the next entry. + */ + if (phys_avail[j + 1] <= mem_info[i].end) { + j += 2; + if (phys_avail[j] == 0 && + phys_avail[j + 1] == 0) { + return (0); + } + address = phys_avail[j]; + } else + address = mem_info[i].end + 1; + } + } + printf("SRAT: No memory region found for %jx - %jx\n", + (uintmax_t)phys_avail[j], (uintmax_t)phys_avail[j + 1]); + return (ENXIO); +} + +/* + * Renumber the memory domains to be compact and zero-based if not + * already. + */ +static void +renumber_domains(void) +{ + int domains[VM_PHYSSEG_MAX]; + int ndomain, i, j, slot; + + /* Enumerate all the domains. */ + ndomain = 0; + for (i = 0; i < num_mem; i++) { + /* See if this domain is already known. */ + for (j = 0; j < ndomain; j++) { + if (domains[j] >= mem_info[i].domain) + break; + } + if (j < ndomain && domains[j] == mem_info[i].domain) + continue; + + /* Insert the new domain at slot 'j'. */ + slot = j; + for (j = ndomain; j > slot; j--) + domains[j] = domains[j - 1]; + domains[slot] = mem_info[i].domain; + } + + /* Renumber each domain to its index in the sorted 'domains' list. */ + for (i = 0; i < ndomain; i++) { + /* + * If the domain is already the right value, no need + * to renumber. + */ + if (domains[i] == i) + continue; + + /* Walk the cpu[] and mem_info[] arrays to renumber. */ + for (j = 0; j < num_mem; j++) + if (mem_info[j].domain == domains[i]) + mem_info[j].domain = i; + for (j = 0; j <= MAX_APIC_ID; j++) + if (cpus[j].enabled && cpus[j].domain == domains[i]) + cpus[j].domain = i; + } +} + +/* + * Look for an ACPI System Resource Affinity Table ("SRAT") + */ +static void +parse_srat(void *dummy) +{ + int error; + + if (resource_disabled("srat", 0)) + return; + + srat_physaddr = acpi_find_table(ACPI_SIG_SRAT); + if (srat_physaddr == 0) + return; + + /* + * Make a pass over the table to populate the cpus[] and + * mem_info[] tables. + */ + srat = acpi_map_table(srat_physaddr, ACPI_SIG_SRAT); + error = 0; + srat_walk_table(srat_parse_entry, &error); + acpi_unmap_table(srat); + srat = NULL; + if (error || check_domains() != 0 || check_phys_avail() != 0) { + srat_physaddr = 0; + return; + } + + renumber_domains(); + + /* Point vm_phys at our memory affinity table. */ + mem_affinity = mem_info; +} +SYSINIT(parse_srat, SI_SUB_VM - 1, SI_ORDER_FIRST, parse_srat, NULL); + +static void +srat_walk_table(acpi_subtable_handler *handler, void *arg) +{ + + acpi_walk_subtables(srat + 1, (char *)srat + srat->Header.Length, + handler, arg); +} + +/* + * Setup per-CPU ACPI IDs. + */ +static void +srat_set_cpus(void *dummy) +{ + struct cpu_info *cpu; + struct pcpu *pc; + u_int i; + + if (srat_physaddr == 0) + return; + for (i = 0; i < MAXCPU; i++) { + if (CPU_ABSENT(i)) + continue; + pc = pcpu_find(i); + KASSERT(pc != NULL, ("no pcpu data for CPU %u", i)); + cpu = &cpus[pc->pc_apic_id]; + if (!cpu->enabled) + panic("SRAT: CPU with APIC ID %u is not known", + pc->pc_apic_id); + pc->pc_domain = cpu->domain; + if (bootverbose) + printf("SRAT: CPU %u has memory domain %d\n", i, + cpu->domain); + } +} +SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL); From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 21:01:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67970106567F; Tue, 27 Jul 2010 21:01:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3825F8FC17; Tue, 27 Jul 2010 21:01:56 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 95DFE46B4C; Tue, 27 Jul 2010 17:01:55 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B7E038A04E; Tue, 27 Jul 2010 17:01:54 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 27 Jul 2010 16:44:38 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007272040.o6RKek4o003760@svn.freebsd.org> In-Reply-To: <201007272040.o6RKek4o003760@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007271644.38244.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 27 Jul 2010 17:01:54 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r210552 - in head/sys: conf x86/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 21:01:56 -0000 On Tuesday, July 27, 2010 4:40:46 pm John Baldwin wrote: > Author: jhb > Date: Tue Jul 27 20:40:46 2010 > New Revision: 210552 > URL: http://svn.freebsd.org/changeset/base/210552 > > Log: > Add a parser for the ACPI SRAT table for amd64 and i386. It sets > PCPU(domain) for each CPU and populates a mem_affinity array suitable > for the NUMA support in the physical memory allocator. This is purposefully not enabled for the acpi.ko module build as modules are enabled too late in the SYSINIT tree for this to work. You will have to build 'device acpi' into your kernel to use this, but GENERIC on i386 does this in 8.0 and later and amd64 has always mandated this. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 21:01:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B87491065676; Tue, 27 Jul 2010 21:01:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 87C338FC21; Tue, 27 Jul 2010 21:01:57 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id F330146B0C; Tue, 27 Jul 2010 17:01:56 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 11C9B8A04F; Tue, 27 Jul 2010 17:01:56 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 27 Jul 2010 16:55:03 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007272033.o6RKXoF4002100@svn.freebsd.org> In-Reply-To: <201007272033.o6RKXoF4002100@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007271655.04019.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 27 Jul 2010 17:01:56 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r210550 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/include sys vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 21:01:57 -0000 On Tuesday, July 27, 2010 4:33:50 pm John Baldwin wrote: > Author: jhb > Date: Tue Jul 27 20:33:50 2010 > New Revision: 210550 > URL: http://svn.freebsd.org/changeset/base/210550 > > Log: > Very rough first cut at NUMA support for the physical page allocator. For > now it uses a very dumb first-touch allocation policy. This will change in > the future. A couple of notes: 1) This is not enabled by default. If you want to try it out on x86, you will need the subsequent commit to add the SRAT parser. You will then need to edit and change VM_NDOMAIN to some value > 1. I have been using 4 in my testing. I've only tested it on amd64, but I have tested it both with dual-socket Opteron and i7 systems. The reason this is not enabled by default is that first-touch is a horrible default policy for all but a few very specific workloads. :) 2) There is much more work to be done here to have truly useful NUMA support. The main reason for committing this now is that several folks have started looking at NUMA and it's easier to work on the various different projects with the baseline in the tree. I'm hoping we can at least commit a tweak to use a saner default policy for allocations rather than first-touch relatively soon. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 27 22:55:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E78D1065676; Tue, 27 Jul 2010 22:55:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1F3A8FC18; Tue, 27 Jul 2010 22:55:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6RMtOk1033552; Tue, 27 Jul 2010 22:55:24 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6RMtOG7033550; Tue, 27 Jul 2010 22:55:24 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007272255.o6RMtOG7033550@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jul 2010 22:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210553 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 22:55:26 -0000 Author: thompsa Date: Tue Jul 27 22:55:24 2010 New Revision: 210553 URL: http://svn.freebsd.org/changeset/base/210553 Log: Fix the entry for the Option ICON452 where an underscore was used instead of whitespace. Submitted by: Lucius Windschuh Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 27 20:40:46 2010 (r210552) +++ head/sys/dev/usb/usbdevs Tue Jul 27 22:55:24 2010 (r210553) @@ -2323,7 +2323,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 -product OPTION_ICON452 0x7901 Globetrotter iCON 452 +product OPTION ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 04:47:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EE641065676; Wed, 28 Jul 2010 04:47:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF388FC08; Wed, 28 Jul 2010 04:47:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6S4le1U011674; Wed, 28 Jul 2010 04:47:40 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6S4leTn011670; Wed, 28 Jul 2010 04:47:40 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007280447.o6S4leTn011670@svn.freebsd.org> From: Alan Cox Date: Wed, 28 Jul 2010 04:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210555 - in head/sys: amd64/linux32 i386/linux kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 04:47:41 -0000 Author: alc Date: Wed Jul 28 04:47:40 2010 New Revision: 210555 URL: http://svn.freebsd.org/changeset/base/210555 Log: The interpreter name should no longer be treated as a buffer that can be overwritten. (This change should have been included in r210545.) Submitted by: kib Modified: head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c head/sys/kern/kern_exec.c head/sys/sys/imgact.h Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Tue Jul 27 23:03:50 2010 (r210554) +++ head/sys/amd64/linux32/linux32_sysvec.c Wed Jul 28 04:47:40 2010 (r210555) @@ -804,7 +804,7 @@ exec_linux_imgact_try(struct image_param { const char *head = (const char *)imgp->image_header; char *rpath; - int error = -1, len; + int error = -1; /* * The interpreter for shell scripts run from a linux binary needs @@ -821,18 +821,12 @@ exec_linux_imgact_try(struct image_param linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD); - if (rpath != NULL) { - len = strlen(rpath) + 1; - - if (len <= MAXSHELLCMDLEN) { - memcpy(imgp->interpreter_name, rpath, - len); - } - free(rpath, M_TEMP); - } + if (rpath != NULL) + imgp->args->fname_buf = + imgp->interpreter_name = rpath; } } - return(error); + return (error); } /* Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Tue Jul 27 23:03:50 2010 (r210554) +++ head/sys/i386/linux/linux_sysvec.c Wed Jul 28 04:47:40 2010 (r210555) @@ -904,7 +904,7 @@ exec_linux_imgact_try(struct image_param { const char *head = (const char *)imgp->image_header; char *rpath; - int error = -1, len; + int error = -1; /* * The interpreter for shell scripts run from a linux binary needs @@ -920,17 +920,12 @@ exec_linux_imgact_try(struct image_param if ((error = exec_shell_imgact(imgp)) == 0) { linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD); - if (rpath != NULL) { - len = strlen(rpath) + 1; - - if (len <= MAXSHELLCMDLEN) { - memcpy(imgp->interpreter_name, rpath, len); - } - free(rpath, M_TEMP); - } + if (rpath != NULL) + imgp->args->fname_buf = + imgp->interpreter_name = rpath; } } - return(error); + return (error); } /* Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Tue Jul 27 23:03:50 2010 (r210554) +++ head/sys/kern/kern_exec.c Wed Jul 28 04:47:40 2010 (r210555) @@ -1175,6 +1175,10 @@ exec_free_args(struct image_args *args) PATH_MAX + ARG_MAX); args->buf = NULL; } + if (args->fname_buf != NULL) { + free(args->fname_buf, M_TEMP); + args->fname_buf = NULL; + } } /* Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Tue Jul 27 23:03:50 2010 (r210554) +++ head/sys/sys/imgact.h Wed Jul 28 04:47:40 2010 (r210555) @@ -42,6 +42,7 @@ struct image_args { char *begin_envv; /* beginning of envv in buf */ char *endp; /* current `end' pointer of arg & env strings */ char *fname; /* pointer to filename of executable (system space) */ + char *fname_buf; /* pointer to optional malloc(M_TEMP) buffer */ int stringspace; /* space left in arg & env buffer */ int argc; /* count of argument strings */ int envc; /* count of environment strings */ From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 08:48:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 741F91065673; Wed, 28 Jul 2010 08:48:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0D18FC1C; Wed, 28 Jul 2010 08:48:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6S8mZUv064980; Wed, 28 Jul 2010 08:48:35 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6S8mZo6064977; Wed, 28 Jul 2010 08:48:35 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007280848.o6S8mZo6064977@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Jul 2010 08:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210556 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 08:48:36 -0000 Author: gavin Date: Wed Jul 28 08:48:35 2010 New Revision: 210556 URL: http://svn.freebsd.org/changeset/base/210556 Log: Support the Pyramid KBS USB LCD under uftdi(4) PR: usb/129758 Submitted by: joao lima MFC after: 1 week Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Wed Jul 28 04:47:40 2010 (r210555) +++ head/sys/dev/usb/serial/uftdi.c Wed Jul 28 08:48:35 2010 (r210556) @@ -226,6 +226,7 @@ static struct usb_device_id uftdi_devs[] UFTDI_DEV(FTDI, CFA_634, 8U232AM), UFTDI_DEV(FTDI, CFA_635, 8U232AM), UFTDI_DEV(FTDI, USBSERIAL, 8U232AM), + UFTDI_DEV(FTDI, KBS, 8U232AM), UFTDI_DEV(FTDI, MX2_3, 8U232AM), UFTDI_DEV(FTDI, MX4_5, 8U232AM), UFTDI_DEV(FTDI, LK202, 8U232AM), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jul 28 04:47:40 2010 (r210555) +++ head/sys/dev/usb/usbdevs Wed Jul 28 08:48:35 2010 (r210556) @@ -1519,6 +1519,7 @@ product FTDI TACTRIX_OPENPORT_13M 0xcc48 product FTDI TACTRIX_OPENPORT_13S 0xcc49 OpenPort 1.3 Subaru product FTDI TACTRIX_OPENPORT_13U 0xcc4a OpenPort 1.3 Universal product FTDI GAMMASCOUT 0xd678 Gamma-Scout +product FTDI KBS 0xe6c8 Pyramid KBS USB LCD product FTDI EISCOU 0xe888 Expert ISDN Control USB product FTDI UOPTBR 0xe889 USB-RS232 OptoBridge product FTDI EMCU2D 0xe88a Expert mouseCLOCK USB II From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 09:12:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D985106564A; Wed, 28 Jul 2010 09:12:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BA168FC1E; Wed, 28 Jul 2010 09:12:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6S9CKYH070400; Wed, 28 Jul 2010 09:12:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6S9CK3k070397; Wed, 28 Jul 2010 09:12:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201007280912.o6S9CK3k070397@svn.freebsd.org> From: Andriy Gapon Date: Wed, 28 Jul 2010 09:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210557 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 09:12:20 -0000 Author: avg Date: Wed Jul 28 09:12:20 2010 New Revision: 210557 URL: http://svn.freebsd.org/changeset/base/210557 Log: MFC r199969: add amdsbwd.4 This part of r199969 was left during original MFC, only merge to sys was done at that time. Reported by: hrs Pointyhat to: avg Added: stable/8/share/man/man4/amdsbwd.4 - copied unchanged from r199969, head/share/man/man4/amdsbwd.4 Modified: stable/8/share/man/man4/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Wed Jul 28 08:48:35 2010 (r210556) +++ stable/8/share/man/man4/Makefile Wed Jul 28 09:12:20 2010 (r210557) @@ -34,6 +34,7 @@ MAN= aac.4 \ altq.4 \ amd.4 \ amdpm.4 \ + ${_amdsbwd.4} \ ${_amdsmb.4} \ ${_amdtemp.4} \ amr.4 \ @@ -631,6 +632,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aibs.4= aibs.4 +_amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 Copied: stable/8/share/man/man4/amdsbwd.4 (from r199969, head/share/man/man4/amdsbwd.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/amdsbwd.4 Wed Jul 28 09:12:20 2010 (r210557, copy of r199969, head/share/man/man4/amdsbwd.4) @@ -0,0 +1,72 @@ +.\"- +.\" Copyright (c) 2009 Andriy Gapon +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 30, 2009 +.Dt AMDSBWD 4 +.Os +.Sh NAME +.Nm amdsbwd +.Nd device driver for the AMD SB600/SB700/SB710/SB750 watchdog timer +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device amdsbwd" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +amdsbwd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr watchdog 4 +support for the watchdog timers present on +AMD SB600 and SB7xx south bridge chips. +.Sh SEE ALSO +.Xr watchdog 4 , +.Xr watchdog 8 , +.Xr watchdogd 8 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Andiry Gapon Aq avg@FreeBSD.org . +This manual page was written by +.An Andiry Gapon Aq avg@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 09:17:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30EB31065670; Wed, 28 Jul 2010 09:17:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0858FC1B; Wed, 28 Jul 2010 09:17:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6S9Hh7W071612; Wed, 28 Jul 2010 09:17:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6S9HgZY071609; Wed, 28 Jul 2010 09:17:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201007280917.o6S9HgZY071609@svn.freebsd.org> From: Andriy Gapon Date: Wed, 28 Jul 2010 09:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210558 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 09:17:43 -0000 Author: avg Date: Wed Jul 28 09:17:42 2010 New Revision: 210558 URL: http://svn.freebsd.org/changeset/base/210558 Log: MFC r199969: add amdsbwd.4 This part of r199969 was left during original MFC, only merge to sys was done at that time. Reported by: hrs Pointyhat to: avg Added: stable/7/share/man/man4/amdsbwd.4 - copied unchanged from r199969, head/share/man/man4/amdsbwd.4 Modified: stable/7/share/man/man4/Makefile Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Wed Jul 28 09:12:20 2010 (r210557) +++ stable/7/share/man/man4/Makefile Wed Jul 28 09:17:42 2010 (r210558) @@ -20,6 +20,7 @@ MAN= aac.4 \ ale.4 \ altq.4 \ amd.4 \ + ${_amdsbwd.4} \ ${_amdtemp.4} \ ${_amdsmb.4} \ amr.4 \ @@ -562,6 +563,7 @@ MLINKS+=xl.4 if_xl.4 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _acpi_dock.4= acpi_dock.4 +_amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _coretemp.4= coretemp.4 Copied: stable/7/share/man/man4/amdsbwd.4 (from r199969, head/share/man/man4/amdsbwd.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/amdsbwd.4 Wed Jul 28 09:17:42 2010 (r210558, copy of r199969, head/share/man/man4/amdsbwd.4) @@ -0,0 +1,72 @@ +.\"- +.\" Copyright (c) 2009 Andriy Gapon +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 30, 2009 +.Dt AMDSBWD 4 +.Os +.Sh NAME +.Nm amdsbwd +.Nd device driver for the AMD SB600/SB700/SB710/SB750 watchdog timer +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device amdsbwd" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +amdsbwd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr watchdog 4 +support for the watchdog timers present on +AMD SB600 and SB7xx south bridge chips. +.Sh SEE ALSO +.Xr watchdog 4 , +.Xr watchdog 8 , +.Xr watchdogd 8 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Andiry Gapon Aq avg@FreeBSD.org . +This manual page was written by +.An Andiry Gapon Aq avg@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 11:01:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEA6E106566B; Wed, 28 Jul 2010 11:01:07 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE0DF8FC1F; Wed, 28 Jul 2010 11:01:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SB17Ng096557; Wed, 28 Jul 2010 11:01:07 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SB1771096555; Wed, 28 Jul 2010 11:01:07 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007281101.o6SB1771096555@svn.freebsd.org> From: Kai Wang Date: Wed, 28 Jul 2010 11:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210559 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 11:01:08 -0000 Author: kaiw Date: Wed Jul 28 11:01:07 2010 New Revision: 210559 URL: http://svn.freebsd.org/changeset/base/210559 Log: Protect GNUHASH translation functions with #ifdef; unbreak cross toolchain build. Reported by: jchandra MFC after: 1 month Modified: head/lib/libelf/libelf_convert.m4 Modified: head/lib/libelf/libelf_convert.m4 ============================================================================== --- head/lib/libelf/libelf_convert.m4 Wed Jul 28 09:17:42 2010 (r210558) +++ head/lib/libelf/libelf_convert.m4 Wed Jul 28 11:01:07 2010 (r210559) @@ -507,6 +507,7 @@ libelf_cvt_BYTE_tox(char *dst, size_t ds MAKE_TYPE_CONVERTERS(ELF_TYPE_LIST) +#if __FreeBSD_version >= 800062 /* * Sections of type ELF_T_GNUHASH start with a header containing 4 32-bit * words. Bloom filter data comes next, followed by hash buckets and the @@ -700,6 +701,7 @@ libelf_cvt64_GNUHASH_tof(char *dst, size return (1); } +#endif /* * Elf_Note structures comprise a fixed size header followed by variable @@ -873,12 +875,14 @@ CONVERTER_NAMES(ELF_TYPE_LIST) .tom64 = libelf_cvt_BYTE_tox }, +#if __FreeBSD_version >= 800062 [ELF_T_GNUHASH] = { .tof32 = libelf_cvt32_GNUHASH_tof, .tom32 = libelf_cvt32_GNUHASH_tom, .tof64 = libelf_cvt64_GNUHASH_tof, .tom64 = libelf_cvt64_GNUHASH_tom }, +#endif [ELF_T_NOTE] = { .tof32 = libelf_cvt_NOTE_tof, From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 15:29:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DD79106566C; Wed, 28 Jul 2010 15:29:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DC108FC08; Wed, 28 Jul 2010 15:29:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SFTJqx056287; Wed, 28 Jul 2010 15:29:19 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SFTJtZ056277; Wed, 28 Jul 2010 15:29:19 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201007281529.o6SFTJtZ056277@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 28 Jul 2010 15:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210563 - head/lib/libfetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 15:29:19 -0000 Author: des Date: Wed Jul 28 15:29:18 2010 New Revision: 210563 URL: http://svn.freebsd.org/changeset/base/210563 Log: Fix a couple of embarrassing mistakes in the previous commit. Submitted by: Dimitry Andric Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Wed Jul 28 15:22:52 2010 (r210562) +++ head/lib/libfetch/http.c Wed Jul 28 15:29:18 2010 (r210563) @@ -1786,13 +1786,13 @@ http_request(struct url *URL, const char case hdr_www_authenticate: if (conn->err != HTTP_NEED_AUTH) break; - if (http_parse_authenticate(p, &server_challenges)) + if (http_parse_authenticate(p, &server_challenges) == 0) ++n; break; case hdr_proxy_authenticate: if (conn->err != HTTP_NEED_PROXY_AUTH) break; - if (http_parse_authenticate(p, &proxy_challenges) == 0); + if (http_parse_authenticate(p, &proxy_challenges) == 0) ++n; break; case hdr_end: From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 15:36:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4178F106567F; Wed, 28 Jul 2010 15:36:14 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0A78FC13; Wed, 28 Jul 2010 15:36:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SFaEMG057871; Wed, 28 Jul 2010 15:36:14 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SFaEIX057859; Wed, 28 Jul 2010 15:36:14 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201007281536.o6SFaEIX057859@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 28 Jul 2010 15:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210564 - in head/sys: amd64/conf conf i386/conf ia64/conf kern pc98/conf powerpc/conf sparc64/conf sun4v/conf sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 15:36:14 -0000 Author: mdf Date: Wed Jul 28 15:36:12 2010 New Revision: 210564 URL: http://svn.freebsd.org/changeset/base/210564 Log: Add MALLOC_DEBUG_MAXZONES debug malloc(9) option to use multiple uma zones for each malloc bucket size. The purpose is to isolate different malloc types into hash classes, so that any buffer overruns or use-after-free will usually only affect memory from malloc types in that hash class. This is purely a debugging tool; by varying the hash function and tracking which hash class was corrupted, the intersection of the hash classes from each instance will point to a single malloc type that is being misused. At this point inspection or memguard(9) can be used to catch the offending code. Add MALLOC_DEBUG_MAXZONES=8 to -current GENERIC configuration files. The suggestion to have this on by default came from Kostik Belousov on -arch. This code is based on work by Ron Steinke at Isilon Systems. Reviewed by: -arch (mostly silence) Reviewed by: zml Approved by: zml (mentor) Modified: head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/kern/kern_malloc.c head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC head/sys/sun4v/conf/GENERIC head/sys/sys/malloc.h Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/amd64/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -76,6 +76,7 @@ options INVARIANTS # Enable calls of e options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/conf/NOTES Wed Jul 28 15:36:12 2010 (r210564) @@ -385,6 +385,20 @@ options SYSCTL_DEBUG options NO_SYSCTL_DESCR # +# MALLOC_DEBUG_MAXZONES enables multiple uma zones for malloc(9) +# allocations that are smaller than a page. The purpose is to isolate +# different malloc types into hash classes, so that any buffer +# overruns or use-after-free will usually only affect memory from +# malloc types in that hash class. This is purely a debugging tool; +# by varying the hash function and tracking which hash class was +# corrupted, the intersection of the hash classes from each instance +# will point to a single malloc type that is being misused. At this +# point inspection or memguard(9) can be used to catch the offending +# code. +# +options MALLOC_DEBUG_MAXZONES=8 + +# # DEBUG_MEMGUARD builds and enables memguard(9), a replacement allocator # for the kernel used to detect modify-after-free scenarios. See the # memguard(9) man page for more information on usage. Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/conf/options Wed Jul 28 15:36:12 2010 (r210564) @@ -586,6 +586,7 @@ VM_LEVEL_0_ORDER opt_vm.h NO_SWAPPING opt_vm.h MALLOC_MAKE_FAILURES opt_vm.h MALLOC_PROFILE opt_vm.h +MALLOC_DEBUG_MAXZONES opt_vm.h # The MemGuard replacement allocator used for tamper-after-free detection DEBUG_MEMGUARD opt_vm.h Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/i386/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -76,6 +76,7 @@ options INVARIANTS # Enable calls of e options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/ia64/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -68,6 +68,7 @@ options UFS_GJOURNAL # Enable gjournal- options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # Various "busses" device firewire # FireWire bus code Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/kern/kern_malloc.c Wed Jul 28 15:36:12 2010 (r210564) @@ -131,6 +131,11 @@ static int kmemcount; #define KMEM_ZSIZE (KMEM_ZMAX >> KMEM_ZSHIFT) static uint8_t kmemsize[KMEM_ZSIZE + 1]; +#ifndef MALLOC_DEBUG_MAXZONES +#define MALLOC_DEBUG_MAXZONES 1 +#endif +static int numzones = MALLOC_DEBUG_MAXZONES; + /* * Small malloc(9) memory allocations are allocated from a set of UMA buckets * of various sizes. @@ -142,25 +147,25 @@ static uint8_t kmemsize[KMEM_ZSIZE + 1]; struct { int kz_size; char *kz_name; - uma_zone_t kz_zone; + uma_zone_t kz_zone[MALLOC_DEBUG_MAXZONES]; } kmemzones[] = { - {16, "16", NULL}, - {32, "32", NULL}, - {64, "64", NULL}, - {128, "128", NULL}, - {256, "256", NULL}, - {512, "512", NULL}, - {1024, "1024", NULL}, - {2048, "2048", NULL}, - {4096, "4096", NULL}, + {16, "16", }, + {32, "32", }, + {64, "64", }, + {128, "128", }, + {256, "256", }, + {512, "512", }, + {1024, "1024", }, + {2048, "2048", }, + {4096, "4096", }, #if PAGE_SIZE > 4096 - {8192, "8192", NULL}, + {8192, "8192", }, #if PAGE_SIZE > 8192 - {16384, "16384", NULL}, + {16384, "16384", }, #if PAGE_SIZE > 16384 - {32768, "32768", NULL}, + {32768, "32768", }, #if PAGE_SIZE > 32768 - {65536, "65536", NULL}, + {65536, "65536", }, #if PAGE_SIZE > 65536 #error "Unsupported PAGE_SIZE" #endif /* 65536 */ @@ -215,14 +220,16 @@ static int sysctl_kern_malloc_stats(SYSC */ static time_t t_malloc_fail; +#if defined(MALLOC_MAKE_FAILURES) || (MALLOC_DEBUG_MAXZONES > 1) +SYSCTL_NODE(_debug, OID_AUTO, malloc, CTLFLAG_RD, 0, + "Kernel malloc debugging options"); +#endif + /* * malloc(9) fault injection -- cause malloc failures every (n) mallocs when * the caller specifies M_NOWAIT. If set to 0, no failures are caused. */ #ifdef MALLOC_MAKE_FAILURES -SYSCTL_NODE(_debug, OID_AUTO, malloc, CTLFLAG_RD, 0, - "Kernel malloc debugging options"); - static int malloc_failure_rate; static int malloc_nowait_count; static int malloc_failure_count; @@ -233,6 +240,60 @@ SYSCTL_INT(_debug_malloc, OID_AUTO, fail &malloc_failure_count, 0, "Number of imposed M_NOWAIT malloc failures"); #endif +/* + * malloc(9) uma zone separation -- sub-page buffer overruns in one + * malloc type will affect only a subset of other malloc types. + */ +#if MALLOC_DEBUG_MAXZONES > 1 +static void +tunable_set_numzones(void) +{ + + TUNABLE_INT_FETCH("debug.malloc.numzones", + &numzones); + + /* Sanity check the number of malloc uma zones. */ + if (numzones <= 0) + numzones = 1; + if (numzones > MALLOC_DEBUG_MAXZONES) + numzones = MALLOC_DEBUG_MAXZONES; +} +SYSINIT(numzones, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_set_numzones, NULL); +SYSCTL_INT(_debug_malloc, OID_AUTO, numzones, CTLFLAG_RDTUN, + &numzones, 0, "Number of malloc uma subzones"); + +/* + * Any number that changes regularly is an okay choice for the + * offset. Build numbers are pretty good of you have them. + */ +static u_int zone_offset = __FreeBSD_version; +TUNABLE_INT("debug.malloc.zone_offset", &zone_offset); +SYSCTL_UINT(_debug_malloc, OID_AUTO, zone_offset, CTLFLAG_RDTUN, + &zone_offset, 0, "Separate malloc types by examining the " + "Nth character in the malloc type short description."); + +static u_int +mtp_get_subzone(const char *desc) +{ + size_t len; + u_int val; + + if (desc == NULL || (len = strlen(desc)) == 0) + return (0); + val = desc[zone_offset % len]; + return (val % numzones); +} +#elif MALLOC_DEBUG_MAXZONES == 0 +#error "MALLOC_DEBUG_MAXZONES must be positive." +#else +static inline u_int +mtp_get_subzone(const char *desc) +{ + + return (0); +} +#endif /* MALLOC_DEBUG_MAXZONES > 1 */ + int malloc_last_fail(void) { @@ -327,6 +388,7 @@ void * malloc(unsigned long size, struct malloc_type *mtp, int flags) { int indx; + struct malloc_type_internal *mtip; caddr_t va; uma_zone_t zone; #if defined(DIAGNOSTIC) || defined(DEBUG_REDZONE) @@ -374,10 +436,14 @@ malloc(unsigned long size, struct malloc #endif if (size <= KMEM_ZMAX) { + mtip = mtp->ks_handle; if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT]; - zone = kmemzones[indx].kz_zone; + KASSERT(mtip->mti_zone < numzones, + ("mti_zone %u out of range %d", + mtip->mti_zone, numzones)); + zone = kmemzones[indx].kz_zone[mtip->mti_zone]; #ifdef MALLOC_PROFILE krequests[size >> KMEM_ZSHIFT]++; #endif @@ -651,15 +717,18 @@ kmeminit(void *dummy) for (i = 0, indx = 0; kmemzones[indx].kz_size != 0; indx++) { int size = kmemzones[indx].kz_size; char *name = kmemzones[indx].kz_name; + int subzone; - kmemzones[indx].kz_zone = uma_zcreate(name, size, + for (subzone = 0; subzone < numzones; subzone++) { + kmemzones[indx].kz_zone[subzone] = + uma_zcreate(name, size, #ifdef INVARIANTS - mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini, + mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini, #else - NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, #endif - UMA_ALIGN_PTR, UMA_ZONE_MALLOC); - + UMA_ALIGN_PTR, UMA_ZONE_MALLOC); + } for (;i <= size; i+= KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; @@ -680,6 +749,7 @@ malloc_init(void *data) mtip = uma_zalloc(mt_zone, M_WAITOK | M_ZERO); mtp->ks_handle = mtip; + mtip->mti_zone = mtp_get_subzone(mtp->ks_shortdesc); mtx_lock(&malloc_mtx); mtp->ks_next = kmemstatistics; @@ -902,7 +972,37 @@ DB_SHOW_COMMAND(malloc, db_show_malloc) (alloced - freed + 1023) / 1024, allocs); } } -#endif + +#if MALLOC_DEBUG_MAXZONES > 1 +DB_SHOW_COMMAND(multizone_matches, db_show_multizone_matches) +{ + struct malloc_type_internal *mtip; + struct malloc_type *mtp; + u_int subzone; + + if (!have_addr) { + db_printf("Usage: show multizone_matches \n"); + return; + } + mtp = (void *)addr; + if (mtp->ks_magic != M_MAGIC) { + db_printf("Magic %lx does not match expected %x\n", + mtp->ks_magic, M_MAGIC); + return; + } + + mtip = mtp->ks_handle; + subzone = mtip->mti_zone; + + for (mtp = kmemstatistics; mtp != NULL; mtp = mtp->ks_next) { + mtip = mtp->ks_handle; + if (mtip->mti_zone != subzone) + continue; + db_printf("%s\n", mtp->ks_shortdesc); + } +} +#endif /* MALLOC_DEBUG_MAXZONES > 1 */ +#endif /* DDB */ #ifdef MALLOC_PROFILE Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/pc98/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -76,6 +76,7 @@ options INVARIANTS # Enable calls of e options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # To make an SMP kernel, the next two lines are needed #options SMP # Symmetric MultiProcessor Kernel Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/powerpc/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -74,6 +74,7 @@ options INVARIANTS #Enable calls of ex options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS options WITNESS #Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # To make an SMP kernel, the next line is needed #options SMP # Symmetric MultiProcessor Kernel Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/sparc64/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -73,6 +73,7 @@ options INVARIANTS # Enable calls of e options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/sun4v/conf/GENERIC Wed Jul 28 15:36:12 2010 (r210564) @@ -79,6 +79,7 @@ options DDB # Support DDB. #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones #options DEBUG_LOCKS #options DEBUG_VFS_LOCKS Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Wed Jul 28 15:29:18 2010 (r210563) +++ head/sys/sys/malloc.h Wed Jul 28 15:36:12 2010 (r210564) @@ -90,6 +90,7 @@ struct malloc_type_stats { struct malloc_type_internal { uint32_t mti_probes[DTMALLOC_PROBE_MAX]; /* DTrace probe ID array. */ + u_char mti_zone; struct malloc_type_stats mti_stats[MAXCPU]; }; From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 15:47:07 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 25DC11065675; Wed, 28 Jul 2010 15:47:07 +0000 (UTC) Date: Wed, 28 Jul 2010 15:47:07 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Message-ID: <20100728154707.GA89549@FreeBSD.org> References: <201007261953.o6QJrAFd069188@svn.freebsd.org> <1280242180.78791.33.camel@buffy.york.ac.uk> <201007271215.26238.jkim@FreeBSD.org> <20100727173632.GA61992@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <20100727173632.GA61992@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gavin Atkinson , doc@FreeBSD.org, src-committers@FreeBSD.org Subject: [patch] Add some ACPI debugging advice to the Handbook X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 15:47:07 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Tue, Jul 27, 2010 at 05:36:32PM +0000, Alexey Dokuchaev wrote: > On Tue, Jul 27, 2010 at 12:15:06PM -0400, Jung-uk Kim wrote: > > The simplest thing to try is: > > > > sysctl debug.bootverbose=1 > > sysctl debug.acpi.suspend_bounce=1 > > acpiconf -s 3 > > > > This test emulates suspend/resume cycle of all device drivers without > > actually going into S3 state. In some cases, you can easily catch > > problems with this method (e.g., losing firmware state, device > > watchdog time out, and retrying forever). Note that the system does > > not really enter S3 state, which means devices may not lose power at > > all. It also means some devices will just work fine even if > > suspend/resume methods are totally missing unlike real S3 state. > > This is really nice piece of advice. Is any one interested (maybe even > the author) in converting it do docbook format and adding to acpi-debug > handbook chapter? I can do it if no one else steps before me. Could you please review attached diff, and I would appreciate if someone on the doc@ team can correct my markup (I haven't done documentation for a while) and commit it to HB? I can sumbmit PR is that's preferred. Thanks. ./danfe --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="acpi-debug.diff" Index: chapter.sgml =================================================================== RCS file: /home/danfe/fbsd/FreeBSD-CVS/doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml,v retrieving revision 1.239 diff -u -r1.239 chapter.sgml --- chapter.sgml 25 Oct 2009 21:21:54 -0000 1.239 +++ chapter.sgml 28 Jul 2010 15:33:16 -0000 @@ -2807,6 +2807,32 @@ do not expect the problem to be resolved since there are a lot of drivers/hardware that need more testing and work. + One of the biggest problems with suspend/resume is that too + many drivers exist that do not save, restore, or reinitialize + their firmware, registers, or device memory properly. To make + these kind of problems easier to debug, the simplest thing to try + is: + + &prompt.root; sysctl + debug.bootverbose=1 + &prompt.root; sysctl + debug.acpi.suspend_bounce=1 + &prompt.root; acpiconf -s 3 + + This test emulates suspend/resume cycle of all device drivers + without actually going into S3 state. In some + cases, you can easily catch problems with this method (e.g., + losing firmware state, device watchdog time out, and retrying + forever). Note that the system will not really enter + S3 state, which means devices may not lose + power at all. It also means some devices will just work fine + even if suspend/resume methods are totally missing unlike real + S3 state. + + Harder cases require additional hardware, i.e., serial + port/cable for serial console or Firewire port/cable for + &man.dcons.4;, and usual kernel debugging skills. + To help isolate the problem, remove as many drivers from your kernel as possible. If it works, you can narrow down which driver is the problem by loading drivers until it fails --cWoXeonUoKmBZSoM-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 15:47:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5992106567D; Wed, 28 Jul 2010 15:47:32 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5ADF8FC27; Wed, 28 Jul 2010 15:47:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SFlWgk060439; Wed, 28 Jul 2010 15:47:32 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SFlWJ5060437; Wed, 28 Jul 2010 15:47:32 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201007281547.o6SFlWJ5060437@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 28 Jul 2010 15:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210565 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 15:47:32 -0000 Author: mdf Date: Wed Jul 28 15:47:32 2010 New Revision: 210565 URL: http://svn.freebsd.org/changeset/base/210565 Log: Bump __FreeBSD_version for multizone malloc(9). Approved by: zml (mentor) Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jul 28 15:36:12 2010 (r210564) +++ head/sys/sys/param.h Wed Jul 28 15:47:32 2010 (r210565) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900015 /* Master, propagated to newvers */ +#define __FreeBSD_version 900016 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 15:55:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DB49106564A; Wed, 28 Jul 2010 15:55:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5256A8FC12; Wed, 28 Jul 2010 15:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SFtEr9062227; Wed, 28 Jul 2010 15:55:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SFtEPH062224; Wed, 28 Jul 2010 15:55:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007281555.o6SFtEPH062224@svn.freebsd.org> From: Attilio Rao Date: Wed, 28 Jul 2010 15:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210566 - stable/8/usr.bin/uname X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 15:55:14 -0000 Author: attilio Date: Wed Jul 28 15:55:14 2010 New Revision: 210566 URL: http://svn.freebsd.org/changeset/base/210566 Log: MFC r203042, r203735: Allow -o as a synonym for -s, for compatibility with other systems. Sponsored by: Sandvine Incorporated Modified: stable/8/usr.bin/uname/uname.1 stable/8/usr.bin/uname/uname.c Directory Properties: stable/8/usr.bin/uname/ (props changed) Modified: stable/8/usr.bin/uname/uname.1 ============================================================================== --- stable/8/usr.bin/uname/uname.1 Wed Jul 28 15:47:32 2010 (r210565) +++ stable/8/usr.bin/uname/uname.1 Wed Jul 28 15:55:14 2010 (r210566) @@ -32,7 +32,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd April 2, 2003 +.Dd January 26, 2010 .Dt UNAME 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnprsv +.Op Fl aimnoprsv .Sh DESCRIPTION The .Nm @@ -63,6 +63,10 @@ Write the kernel ident to standard outpu Write the type of the current hardware platform to standard output. .It Fl n Write the name of the system to standard output. +.It Fl o +This is a synonym for the +.Fl s +option, for compatibility with other systems. .It Fl p Write the type of the machine processor architecture to standard output. .It Fl r Modified: stable/8/usr.bin/uname/uname.c ============================================================================== --- stable/8/usr.bin/uname/uname.c Wed Jul 28 15:47:32 2010 (r210565) +++ stable/8/usr.bin/uname/uname.c Wed Jul 28 15:55:14 2010 (r210566) @@ -88,7 +88,7 @@ main(int argc, char *argv[]) setup_get(); flags = 0; - while ((ch = getopt(argc, argv, "aimnprsv")) != -1) + while ((ch = getopt(argc, argv, "aimnoprsv")) != -1) switch(ch) { case 'a': flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); @@ -109,6 +109,7 @@ main(int argc, char *argv[]) flags |= RFLAG; break; case 's': + case 'o': flags |= SFLAG; break; case 'v': @@ -244,6 +245,6 @@ NATIVE_SYSCTLNAME_GET(ident, "kern.ident void usage(void) { - fprintf(stderr, "usage: uname [-aimnprsv]\n"); + fprintf(stderr, "usage: uname [-aimnoprsv]\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:10:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0EFC1065696; Wed, 28 Jul 2010 16:10:21 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F90A8FC08; Wed, 28 Jul 2010 16:10:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGALH3065746; Wed, 28 Jul 2010 16:10:21 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGALBp065741; Wed, 28 Jul 2010 16:10:21 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007281610.o6SGALBp065741@svn.freebsd.org> From: Attilio Rao Date: Wed, 28 Jul 2010 16:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210567 - stable/8/usr.bin/gcore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:10:21 -0000 Author: attilio Date: Wed Jul 28 16:10:21 2010 New Revision: 210567 URL: http://svn.freebsd.org/changeset/base/210567 Log: MFC r210063, r210065: Fix the way the segments are included in the gcore outputs (with the default invokation): - Right now if segments are not writable are not included. Remove this. - Right now if a segment is mapped with NOCORE the check is not honoured. Change this by checking the newly added flag, from libutil, KVME_FLAG_NOCOREDUMP. Besides that, add a new flag (-f) that forces a 'full' dump of all the segments excluding just the malformed ones. Sponsored by: Sandvine Incorporated Modified: stable/8/usr.bin/gcore/elfcore.c stable/8/usr.bin/gcore/extern.h stable/8/usr.bin/gcore/gcore.1 stable/8/usr.bin/gcore/gcore.c Directory Properties: stable/8/usr.bin/gcore/ (props changed) Modified: stable/8/usr.bin/gcore/elfcore.c ============================================================================== --- stable/8/usr.bin/gcore/elfcore.c Wed Jul 28 15:55:14 2010 (r210566) +++ stable/8/usr.bin/gcore/elfcore.c Wed Jul 28 16:10:21 2010 (r210567) @@ -488,12 +488,17 @@ readmap(pid_t pid) kve = &vmentl[i]; /* - * Ignore segments of the wrong kind and ones which are not - * readable and writable. + * Ignore 'malformed' segments or ones representing memory + * mapping with MAP_NOCORE on. + * If the 'full' support is disabled, just dump the most + * meaningful data segments. */ - if ((kve->kve_protection & KVME_PROT_WRITE) == 0 || - (kve->kve_protection & KVME_PROT_READ) == 0 || - (kve->kve_type != KVME_TYPE_DEFAULT && + if ((kve->kve_protection & KVME_PROT_READ) == 0 || + (kve->kve_flags & KVME_FLAG_NOCOREDUMP) != 0 || + kve->kve_type == KVME_TYPE_DEAD || + kve->kve_type == KVME_TYPE_UNKNOWN || + ((pflags & PFLAGS_FULL) == 0 && + kve->kve_type != KVME_TYPE_DEFAULT && kve->kve_type != KVME_TYPE_VNODE && kve->kve_type != KVME_TYPE_SWAP)) continue; Modified: stable/8/usr.bin/gcore/extern.h ============================================================================== --- stable/8/usr.bin/gcore/extern.h Wed Jul 28 15:55:14 2010 (r210566) +++ stable/8/usr.bin/gcore/extern.h Wed Jul 28 16:10:21 2010 (r210567) @@ -34,7 +34,11 @@ * $FreeBSD$ */ +#define PFLAGS_FULL 0x01 +#define PFLAGS_RESUME 0x02 + struct dumpers { int (*ident)(int efd, pid_t pid, char *binfile); void (*dump)(int efd, int fd, pid_t pid); }; +extern int pflags; Modified: stable/8/usr.bin/gcore/gcore.1 ============================================================================== --- stable/8/usr.bin/gcore/gcore.1 Wed Jul 28 15:55:14 2010 (r210566) +++ stable/8/usr.bin/gcore/gcore.1 Wed Jul 28 16:10:21 2010 (r210567) @@ -32,7 +32,7 @@ .\" @(#)gcore.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd November 18, 2009 +.Dd July 14, 2010 .Dt GCORE 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Nd get core images of running process .Sh SYNOPSIS .Nm +.Op Fl f .Op Fl s .Op Fl c Ar core .Op Ar executable @@ -61,6 +62,13 @@ The following options are available: .It Fl c Write the core file to the specified file instead of .Dq Pa core. . +.It Fl f +Dumps all the available segments, excluding only the malformed ones and +un-dumpable ones. Unlike the default invocation, it also dumps +device- and sglist-mapped areas that may invalidate the state of +some transactions. This flag must be used very carefully, when the +behavior of the application is fully understood and the fallouts can +be easily controlled. .It Fl s Stop the process while gathering the core image, and resume it when done. Modified: stable/8/usr.bin/gcore/gcore.c ============================================================================== --- stable/8/usr.bin/gcore/gcore.c Wed Jul 28 15:55:14 2010 (r210566) +++ stable/8/usr.bin/gcore/gcore.c Wed Jul 28 16:10:21 2010 (r210567) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include "extern.h" +int pflags; static void killed(int); static void restart_target(void); @@ -84,21 +85,24 @@ SET_DECLARE(dumpset, struct dumpers); int main(int argc, char *argv[]) { - int ch, efd, fd, name[4], sflag; + int ch, efd, fd, name[4]; char *binfile, *corefile; char passpath[MAXPATHLEN], fname[MAXPATHLEN]; struct dumpers **d, *dumper; size_t len; - sflag = 0; + pflags = 0; corefile = NULL; - while ((ch = getopt(argc, argv, "c:s")) != -1) { + while ((ch = getopt(argc, argv, "c:fs")) != -1) { switch (ch) { case 'c': corefile = optarg; break; + case 'f': + pflags |= PFLAGS_FULL; + break; case 's': - sflag = 1; + pflags |= PFLAGS_RESUME; break; default: usage(); @@ -148,7 +152,7 @@ main(int argc, char *argv[]) fd = open(corefile, O_RDWR|O_CREAT|O_TRUNC, DEFFILEMODE); if (fd < 0) err(1, "%s", corefile); - if (sflag) { + if ((pflags & PFLAGS_RESUME) != 0) { signal(SIGHUP, killed); signal(SIGINT, killed); signal(SIGTERM, killed); From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:11:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D4D81065674; Wed, 28 Jul 2010 16:11:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CE198FC1C; Wed, 28 Jul 2010 16:11:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGBMou066030; Wed, 28 Jul 2010 16:11:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGBMJX066028; Wed, 28 Jul 2010 16:11:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201007281611.o6SGBMJX066028@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 28 Jul 2010 16:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210568 - head/lib/libfetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:11:23 -0000 Author: des Date: Wed Jul 28 16:11:22 2010 New Revision: 210568 URL: http://svn.freebsd.org/changeset/base/210568 Log: Redo fetch_read() using non-blocking sockets. This is necessary to avoid a hang in the SSL case if the server sends a close notification before we are done reading. In the non-SSL case, it can provide a minor (but probably not noticeable) performance improvement for small transfers. MFC after: 3 weeks Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Wed Jul 28 16:10:21 2010 (r210567) +++ head/lib/libfetch/common.c Wed Jul 28 16:11:22 2010 (r210568) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -295,7 +296,8 @@ fetch_connect(const char *host, int port close(sd); continue; } - if (connect(sd, res->ai_addr, res->ai_addrlen) == 0) + if (connect(sd, res->ai_addr, res->ai_addrlen) == 0 && + fcntl(sd, F_SETFL, O_NONBLOCK) == 0) break; close(sd); } @@ -319,6 +321,7 @@ fetch_connect(const char *host, int port int fetch_ssl(conn_t *conn, int verbose) { + int ret, ssl_err; #ifdef WITH_SSL /* Init the SSL library and context */ @@ -339,9 +342,13 @@ fetch_ssl(conn_t *conn, int verbose) return (-1); } SSL_set_fd(conn->ssl, conn->sd); - if (SSL_connect(conn->ssl) == -1){ - ERR_print_errors_fp(stderr); - return (-1); + while ((ret = SSL_connect(conn->ssl)) == -1) { + ssl_err = SSL_get_error(conn->ssl, ret); + if (ssl_err != SSL_ERROR_WANT_READ && + ssl_err != SSL_ERROR_WANT_WRITE) { + ERR_print_errors_fp(stderr); + return (-1); + } } if (verbose) { @@ -370,6 +377,46 @@ fetch_ssl(conn_t *conn, int verbose) #endif } +#define FETCH_READ_WAIT -2 +#define FETCH_READ_ERROR -1 +#define FETCH_READ_DONE 0 + +#ifdef WITH_SSL +static ssize_t +fetch_ssl_read(SSL *ssl, char *buf, size_t len) +{ + ssize_t rlen; + int ssl_err; + + rlen = SSL_read(ssl, buf, len); + if (rlen < 0) { + ssl_err = SSL_get_error(ssl, rlen); + if (ssl_err == SSL_ERROR_WANT_READ || + ssl_err == SSL_ERROR_WANT_WRITE) { + return (FETCH_READ_WAIT); + } else { + ERR_print_errors_fp(stderr); + return (FETCH_READ_ERROR); + } + } + return (rlen); +} +#endif + +static ssize_t +fetch_socket_read(int sd, char *buf, size_t len) +{ + ssize_t rlen; + + rlen = read(sd, buf, len); + if (rlen < 0) { + if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) + return (FETCH_READ_WAIT); + else + return (FETCH_READ_ERROR); + } + return (rlen); +} /* * Read a character from a connection w/ timeout @@ -390,6 +437,43 @@ fetch_read(conn_t *conn, char *buf, size total = 0; while (len > 0) { + /* + * The socket is non-blocking. Instead of the canonical + * select() -> read(), we do the following: + * + * 1) call read() or SSL_read(). + * 2) if an error occurred, return -1. + * 3) if we received data but we still expect more, + * update our counters and loop. + * 4) if read() or SSL_read() signaled EOF, return. + * 5) if we did not receive any data but we're not at EOF, + * call select(). + * + * In the SSL case, this is necessary because if we + * receive a close notification, we have to call + * SSL_read() one additional time after we've read + * everything we received. + * + * In the non-SSL case, it may improve performance (very + * slightly) when reading small amounts of data. + */ +#ifdef WITH_SSL + if (conn->ssl != NULL) + rlen = fetch_ssl_read(conn->ssl, buf, len); + else +#endif + rlen = fetch_socket_read(conn->sd, buf, len); + if (rlen == 0) { + break; + } else if (rlen > 0) { + len -= rlen; + buf += rlen; + total += rlen; + continue; + } else if (rlen == FETCH_READ_ERROR) { + return (-1); + } + // assert(rlen == FETCH_READ_WAIT); while (fetchTimeout && !FD_ISSET(conn->sd, &readfds)) { FD_SET(conn->sd, &readfds); gettimeofday(&now, NULL); @@ -413,22 +497,6 @@ fetch_read(conn_t *conn, char *buf, size return (-1); } } -#ifdef WITH_SSL - if (conn->ssl != NULL) - rlen = SSL_read(conn->ssl, buf, len); - else -#endif - rlen = read(conn->sd, buf, len); - if (rlen == 0) - break; - if (rlen < 0) { - if (errno == EINTR && fetchRestartCalls) - continue; - return (-1); - } - len -= rlen; - buf += rlen; - total += rlen; } return (total); } @@ -548,6 +616,7 @@ fetch_writev(conn_t *conn, struct iovec wlen = writev(conn->sd, iov, iovcnt); if (wlen == 0) { /* we consider a short write a failure */ + /* XXX perhaps we shouldn't in the SSL case */ errno = EPIPE; fetch_syserr(); return (-1); From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:24:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA046106564A; Wed, 28 Jul 2010 16:24:06 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9F118FC17; Wed, 28 Jul 2010 16:24:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGO67n068883; Wed, 28 Jul 2010 16:24:06 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGO6Pa068882; Wed, 28 Jul 2010 16:24:06 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201007281624.o6SGO6Pa068882@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 28 Jul 2010 16:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210569 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:24:06 -0000 Author: mdf Date: Wed Jul 28 16:24:06 2010 New Revision: 210569 URL: http://svn.freebsd.org/changeset/base/210569 Log: Fix clang warning on empty statement. Reviewed by: rdivacky, zml Approved by: zml (mentor) Modified: head/sys/dev/e1000/e1000_osdep.h Modified: head/sys/dev/e1000/e1000_osdep.h ============================================================================== --- head/sys/dev/e1000/e1000_osdep.h Wed Jul 28 16:11:22 2010 (r210568) +++ head/sys/dev/e1000/e1000_osdep.h Wed Jul 28 16:24:06 2010 (r210569) @@ -65,11 +65,11 @@ #define MSGOUT(S, A, B) printf(S "\n", A, B) #define DEBUGFUNC(F) DEBUGOUT(F); - #define DEBUGOUT(S) - #define DEBUGOUT1(S,A) - #define DEBUGOUT2(S,A,B) - #define DEBUGOUT3(S,A,B,C) - #define DEBUGOUT7(S,A,B,C,D,E,F,G) +#define DEBUGOUT(S) do {} while (0) +#define DEBUGOUT1(S,A) do {} while (0) +#define DEBUGOUT2(S,A,B) do {} while (0) +#define DEBUGOUT3(S,A,B,C) do {} while (0) +#define DEBUGOUT7(S,A,B,C,D,E,F,G) do {} while (0) #define STATIC static #define FALSE 0 From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:24:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D2610656B9; Wed, 28 Jul 2010 16:24:12 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F38CB8FC21; Wed, 28 Jul 2010 16:24:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGOB6s068925; Wed, 28 Jul 2010 16:24:11 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGOB6C068923; Wed, 28 Jul 2010 16:24:11 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201007281624.o6SGOB6C068923@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 28 Jul 2010 16:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210570 - head/sys/dev/amr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:24:12 -0000 Author: mdf Date: Wed Jul 28 16:24:11 2010 New Revision: 210570 URL: http://svn.freebsd.org/changeset/base/210570 Log: Fix clang warning on empty statement. Reviewed by: rdivacky, zml Approved by: zml (mentor) Modified: head/sys/dev/amr/amrvar.h Modified: head/sys/dev/amr/amrvar.h ============================================================================== --- head/sys/dev/amr/amrvar.h Wed Jul 28 16:24:06 2010 (r210569) +++ head/sys/dev/amr/amrvar.h Wed Jul 28 16:24:11 2010 (r210570) @@ -66,8 +66,8 @@ # define debug(level, fmt, args...) do {if (level <= AMR_DEBUG) printf("%s: " fmt "\n", __func__ , ##args);} while(0) # define debug_called(level) do {if (level <= AMR_DEBUG) printf("%s: called\n", __func__);} while(0) #else -# define debug(level, fmt, args...) -# define debug_called(level) +# define debug(level, fmt, args...) do {} while (0) +# define debug_called(level) do {} while (0) #endif #define xdebug(fmt, args...) printf("%s: " fmt "\n", __func__ , ##args) From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:29:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DD31065679; Wed, 28 Jul 2010 16:29:11 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34BEC8FC20; Wed, 28 Jul 2010 16:29:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGTB0x070065; Wed, 28 Jul 2010 16:29:11 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGTBHb070062; Wed, 28 Jul 2010 16:29:11 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007281629.o6SGTBHb070062@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Jul 2010 16:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210571 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:29:11 -0000 Author: gavin Date: Wed Jul 28 16:29:10 2010 New Revision: 210571 URL: http://svn.freebsd.org/changeset/base/210571 Log: Add support for the Corega CG-USBRS232R to uplcom(4) PR: usb/129173 Submitted by: SHIMAOKA Shunsuke MFC after: 1 week Modified: head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Wed Jul 28 16:24:11 2010 (r210570) +++ head/sys/dev/usb/serial/uplcom.c Wed Jul 28 16:29:10 2010 (r210571) @@ -294,6 +294,8 @@ static const struct usb_device_id uplcom UPLCOM_DEV(PROLIFIC2, WSIM, 0, 0xFFFF, PL2303X), /* Mobile Action MA-620 Infrared Adapter */ UPLCOM_DEV(MOBILEACTION, MA620, 0, 0xFFFF, PL2303X), + /* Corega CG-USBRS232R */ + UPLCOM_DEV(COREGA, CGUSBRS232R, 0, 0xFFFF, PL2303X), }; #undef UPLCOM_DEV Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jul 28 16:24:11 2010 (r210570) +++ head/sys/dev/usb/usbdevs Wed Jul 28 16:29:10 2010 (r210571) @@ -1227,6 +1227,7 @@ product COREGA FETHER_USB_TXS 0x000d FEt product COREGA WLANUSB 0x0012 Wireless LAN Stick-11 product COREGA FETHER_USB2_TX 0x0017 FEther USB2-TX product COREGA WLUSB_11_KEY 0x001a ULUSB-11 Key +product COREGA CGUSBRS232R 0x002a CG-USBRS232R product COREGA CGWLUSB2GL 0x002d CG-WLUSB2GL product COREGA CGWLUSB2GPX 0x002e CG-WLUSB2GPX product COREGA RT2870_1 0x002f RT2870 From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:32:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 288091065676; Wed, 28 Jul 2010 16:32:31 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1ED58FC08; Wed, 28 Jul 2010 16:32:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGWUJu070854; Wed, 28 Jul 2010 16:32:30 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGWUGf070851; Wed, 28 Jul 2010 16:32:30 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007281632.o6SGWUGf070851@svn.freebsd.org> From: Attilio Rao Date: Wed, 28 Jul 2010 16:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210572 - stable/7/usr.bin/uname X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:32:31 -0000 Author: attilio Date: Wed Jul 28 16:32:30 2010 New Revision: 210572 URL: http://svn.freebsd.org/changeset/base/210572 Log: MFC r203042, r203735: Allow -o as a synonym for -s, for compatibility with other systems. Modified: stable/7/usr.bin/uname/uname.1 stable/7/usr.bin/uname/uname.c Directory Properties: stable/7/usr.bin/uname/ (props changed) Modified: stable/7/usr.bin/uname/uname.1 ============================================================================== --- stable/7/usr.bin/uname/uname.1 Wed Jul 28 16:29:10 2010 (r210571) +++ stable/7/usr.bin/uname/uname.1 Wed Jul 28 16:32:30 2010 (r210572) @@ -32,7 +32,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd April 2, 2003 +.Dd January 26, 2010 .Dt UNAME 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnprsv +.Op Fl aimnoprsv .Sh DESCRIPTION The .Nm @@ -63,6 +63,10 @@ Write the kernel ident to standard outpu Write the type of the current hardware platform to standard output. .It Fl n Write the name of the system to standard output. +.It Fl o +This is a synonym for the +.Fl s +option, for compatibility with other systems. .It Fl p Write the type of the machine processor architecture to standard output. .It Fl r Modified: stable/7/usr.bin/uname/uname.c ============================================================================== --- stable/7/usr.bin/uname/uname.c Wed Jul 28 16:29:10 2010 (r210571) +++ stable/7/usr.bin/uname/uname.c Wed Jul 28 16:32:30 2010 (r210572) @@ -88,7 +88,7 @@ main(int argc, char *argv[]) setup_get(); flags = 0; - while ((ch = getopt(argc, argv, "aimnprsv")) != -1) + while ((ch = getopt(argc, argv, "aimnoprsv")) != -1) switch(ch) { case 'a': flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); @@ -109,6 +109,7 @@ main(int argc, char *argv[]) flags |= RFLAG; break; case 's': + case 'o': flags |= SFLAG; break; case 'v': @@ -244,6 +245,6 @@ NATIVE_SYSCTLNAME_GET(ident, "kern.ident void usage(void) { - fprintf(stderr, "usage: uname [-aimnprsv]\n"); + fprintf(stderr, "usage: uname [-aimnoprsv]\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:38:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ACAA106566C; Wed, 28 Jul 2010 16:38:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1068FC0A; Wed, 28 Jul 2010 16:38:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGcbEH072262; Wed, 28 Jul 2010 16:38:37 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGcbSJ072259; Wed, 28 Jul 2010 16:38:37 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201007281638.o6SGcbSJ072259@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 28 Jul 2010 16:38:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210573 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:38:38 -0000 Author: bapt (ports committer) Date: Wed Jul 28 16:38:37 2010 New Revision: 210573 URL: http://svn.freebsd.org/changeset/base/210573 Log: Add myself as a ports committer Approved by: tabthorpe@ (co-mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Jul 28 16:32:30 2010 (r210572) +++ head/share/misc/committers-ports.dot Wed Jul 28 16:38:37 2010 (r210573) @@ -55,6 +55,7 @@ ashish [label="Ashish SHUKLA\nashish@Fre avilla [label="Alberto Villa\navilla@FreeBSD.org\n2010/01/24"] avl [label="Alexander Logvinov\navl@FreeBSD.org\n2009/05/27"] az [label="Andrej Zverev\naz@FreeBSD.org\n2005/10/03"] +bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2010/07/27"] beat [label="Beat Gaetzi\nbeat@FreeBSD.org\n2009/01/28"] beech [label="Beech Rintoul\nbeech@FreeBSD.org\n2007/05/30"] bland [label="Alexander Nedotsukov\nbland@FreeBSD.org\n2003/08/14"] Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Wed Jul 28 16:32:30 2010 (r210572) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed Jul 28 16:38:37 2010 (r210573) @@ -72,6 +72,7 @@ 03/03 Doug White born in Eugene, Oregon, United States, 1977 03/03 Gordon Tetlow born in Reno, Nevada, United States, 1978 03/04 Oleksandr Tymoshenko born in Chernihiv, Ukraine, 1980 +03/05 Baptiste Daroussin born in Beauvais, France, 1980 03/05 Philip Paeps born in Leuven, Belgium, 1983 03/05 Ulf Lilleengen born in Hamar, Norway, 1985 03/06 Christopher Piazza born in Kamloops, British Columbia, Canada, 1981 From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 16:58:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8C4A1065687; Wed, 28 Jul 2010 16:58:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 974938FC1E; Wed, 28 Jul 2010 16:58:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SGwajL076717; Wed, 28 Jul 2010 16:58:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SGwatp076713; Wed, 28 Jul 2010 16:58:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007281658.o6SGwatp076713@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Jul 2010 16:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210574 - in stable/7: share/man/man4 sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 16:58:36 -0000 Author: gavin Date: Wed Jul 28 16:58:36 2010 New Revision: 210574 URL: http://svn.freebsd.org/changeset/base/210574 Log: - Support the Epson RX620 and HP ScanJet 3570C scanners in uscanner(4). Direct commit to stable/7 as the uscanner driver no longer exists in head. PR: usb/121426, usb/122025 Submitted by: Greg Mars Submitted by: Bjorn Konig Modified: stable/7/share/man/man4/uscanner.4 stable/7/sys/dev/usb/usbdevs stable/7/sys/dev/usb/uscanner.c Modified: stable/7/share/man/man4/uscanner.4 ============================================================================== --- stable/7/share/man/man4/uscanner.4 Wed Jul 28 16:38:37 2010 (r210573) +++ stable/7/share/man/man4/uscanner.4 Wed Jul 28 16:58:36 2010 (r210574) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2007 +.Dd July 28, 2010 .Dt USCANNER 4 .Os .Sh NAME @@ -103,13 +103,13 @@ Epson Perfection: 610, 636U / 636Photo, .It Epson: GT-8400UF, GT-9300UF, GT-9700F; .It -Epson Stylus: Photo RX425, CX3650, DX-5000, DX-5050, DX-6000, DX-6050 +Epson Stylus: Photo RX425, RX620, CX3650, DX-5000, DX-5050, DX-6000, DX-6050 (and possibly more in the CX-5000 and DX-3800..DX-7000 family); .It Hewlett Packard: Photosmart S20 .It Hewlett Packard Scanjet: 2200C, -3300C, 3400CSE, +3300C, 3400CSE, 3570C, 4100C, 4200C, 4300C, 5200C, 5300C, 5400C, 6200C, 6300C, Modified: stable/7/sys/dev/usb/usbdevs ============================================================================== --- stable/7/sys/dev/usb/usbdevs Wed Jul 28 16:38:37 2010 (r210573) +++ stable/7/sys/dev/usb/usbdevs Wed Jul 28 16:58:36 2010 (r210574) @@ -1255,6 +1255,7 @@ product EPSON STYLUS_895 0x0602 Stylus P product EPSON CX5400 0x0808 CX5400 scanner product EPSON 3500 0x080e CX-3500/3600/3650 MFP product EPSON RX425 0x080f Stylus Photo RX425 scanner +product EPSON RX620 0x0811 Stylus Photo RX620 scanner product EPSON DX3800 0x0818 CX3700/CX3800/DX38x0 MFP scanner product EPSON 4800 0x0819 CX4700/CX4800/DX48x0 MFP scanner product EPSON 4200 0x0820 CX4100/CX4200/DX4200 MFP scanner @@ -1451,6 +1452,7 @@ product HP 930C 0x1204 DeskJet 930c product HP P2000U 0x1801 Inkjet P-2000U product HP HS2300 0x1e1d HS2300 HSDPA (aka MC8775) product HP 640C 0x2004 DeskJet 640c +product HP 3570C 0x2005 ScanJet 3570C product HP 4670V 0x3005 ScanJet 4670v product HP P1100 0x3102 Photosmart P1100 product HP OJ4215 0x3d11 OfficeJet 4215 Modified: stable/7/sys/dev/usb/uscanner.c ============================================================================== --- stable/7/sys/dev/usb/uscanner.c Wed Jul 28 16:38:37 2010 (r210573) +++ stable/7/sys/dev/usb/uscanner.c Wed Jul 28 16:58:36 2010 (r210574) @@ -129,6 +129,7 @@ static const struct uscan_info uscanner_ {{ USB_VENDOR_HP, USB_PRODUCT_HP_2200C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_3300C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_3400CSE }, 0 }, + {{ USB_VENDOR_HP, USB_PRODUCT_HP_3570C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4100C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4200C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4300C }, 0 }, @@ -202,6 +203,7 @@ static const struct uscan_info uscanner_ {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_1260 }, 0 }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_1270 }, 0 }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_RX425 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_RX620 }, 0 }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_3200 }, USC_KEEP_OPEN }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9700F }, USC_KEEP_OPEN }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9300UF }, 0 }, From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 17:38:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7024C1065679; Wed, 28 Jul 2010 17:38:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45DDC8FC14; Wed, 28 Jul 2010 17:38:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SHcit6085680; Wed, 28 Jul 2010 17:38:44 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SHcigH085678; Wed, 28 Jul 2010 17:38:44 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201007281738.o6SHcigH085678@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Jul 2010 17:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210575 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 17:38:44 -0000 Author: gavin Date: Wed Jul 28 17:38:43 2010 New Revision: 210575 URL: http://svn.freebsd.org/changeset/base/210575 Log: Provide descriptions for three vendors and four devices in usbdevs. Use the official vendor listed for 0x076b, rather than Omnikey, as in the PR. PR: usb/123351 Submitted by: Marcin Cieslak MFC after: 1 week Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jul 28 16:58:36 2010 (r210574) +++ head/sys/dev/usb/usbdevs Wed Jul 28 17:38:43 2010 (r210575) @@ -366,6 +366,7 @@ vendor AUREAL 0x0755 Aureal Semiconduct vendor MIDIMAN 0x0763 Midiman vendor CYBERPOWER 0x0764 Cyber Power Systems, Inc. vendor SURECOM 0x0769 Surecom Technology +vendor HIDGLOBAL 0x076b HID Global vendor LINKSYS2 0x077b Linksys vendor GRIFFIN 0x077d Griffin Technology vendor SANDISK 0x0781 SanDisk @@ -430,6 +431,7 @@ vendor BURRBROWN 0x08bb Burr-Brown Japan vendor 2WIRE 0x08c8 2Wire vendor AIPTEK 0x08ca AIPTEK International vendor SMARTBRIDGES 0x08d1 SmartBridges +vendor FUJITSUSIEMENS 0x08d4 Fujitsu-Siemens vendor BILLIONTON 0x08dd Billionton Systems vendor GEMALTO 0x08e6 Gemalto SA vendor EXTENDED 0x08e9 Extended Systems @@ -506,6 +508,7 @@ vendor FSC 0x0bf8 Fujitsu Siemens Compu vendor AGATE 0x0c08 Agate Technologies vendor DMI 0x0c0b DMI vendor CHICONY2 0x0c45 Chicony +vendor REINERSCT 0x0c4b Reiner-SCT vendor SEALEVEL 0x0c52 Sealevel System vendor LUWEN 0x0c76 Luwen vendor KYOCERA2 0x0c88 Kyocera Wireless Corp. @@ -1548,6 +1551,9 @@ product FUJIPHOTO MASS0100 0x0100 Mass S /* Fujitsu protducts */ product FUJITSU AH_F401U 0x105b AH-F401U Air H device +/* Fujitsu-Siemens protducts */ +product FUJITSUSIEMENS SCR 0x0009 Fujitsu-Siemens SCR USB Reader + /* Garmin products */ product GARMIN IQUE_3600 0x0004 iQue 3600 @@ -1645,6 +1651,10 @@ product HAWKING HWUN2 0x0009 HWUN2 product HAWKING RT3070 0x000b RT3070 product HAWKING UF100 0x400c 10/100 USB Ethernet +/* HID Global GmbH products */ +product HIDGLOBAL CM2020 0x0596 Omnikey Cardman 2020 +product HIDGLOBAL CM6020 0x1784 Omnikey Cardman 6020 + /* Hitachi, Ltd. products */ product HITACHI DVDCAM_DZ_MV100A 0x0004 DVD-CAM DZ-MV100A Camcorder product HITACHI DVDCAM_USB 0x001e DVDCAM USB HS Interface @@ -2609,6 +2619,9 @@ product RICOH VGPVCC2_3 0x1834 VGP-VCC2 product RICOH VGPVCC7 0x183a VGP-VCC7 Camera product RICOH VGPVCC8 0x183b VGP-VCC8 Camera +/* Reiner-SCT products */ +product REINERSCT CYBERJACK_ECOM 0x0100 e-com cyberJack + /* Roland products */ product ROLAND UM1 0x0009 UM-1 MIDI I/F product ROLAND UM880N 0x0014 EDIROL UM-880 MIDI I/F (native) From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 18:56:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B74D1065673; Wed, 28 Jul 2010 18:56:02 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12B528FC15; Wed, 28 Jul 2010 18:56:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SIu1Rg003055; Wed, 28 Jul 2010 18:56:01 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SIu1eI003052; Wed, 28 Jul 2010 18:56:01 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201007281856.o6SIu1eI003052@svn.freebsd.org> From: Tijl Coosemans Date: Wed, 28 Jul 2010 18:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210576 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 18:56:02 -0000 Author: tijl Date: Wed Jul 28 18:56:01 2010 New Revision: 210576 URL: http://svn.freebsd.org/changeset/base/210576 Log: Add quirk for Apacer HT202 USB 2.0 Flash Drive. PR: usb/107243 Approved by: kib (mentor) MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Jul 28 17:38:43 2010 (r210575) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Jul 28 18:56:01 2010 (r210576) @@ -161,6 +161,8 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), + USB_QUIRK(APACER, HT202, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ASAHIOPTICAL, OPTIO230, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(ASAHIOPTICAL, OPTIO330, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jul 28 17:38:43 2010 (r210575) +++ head/sys/dev/usb/usbdevs Wed Jul 28 18:56:01 2010 (r210576) @@ -929,6 +929,9 @@ product APC UPS 0x0002 Uninterruptible product AMBIT WLAN 0x0302 WLAN product AMBIT NTL_250 0x6098 NTL 250 cable modem +/* Apacer products */ +product APACER HT202 0xb113 USB 2.0 Flash Drive + /* American Power Conversion products */ product APC UPS 0x0002 Uninterruptible Power Supply From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 19:52:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29DF1106564A; Wed, 28 Jul 2010 19:52:01 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 02BF68FC20; Wed, 28 Jul 2010 19:51:59 +0000 (UTC) Received: by fxm13 with SMTP id 13so1515183fxm.13 for ; Wed, 28 Jul 2010 12:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=Q91vjzv4cAw4eNjuO8N+NFs7app5RZfxpUimXysNwKg=; b=sTuWQcvVvvII5h8m/L6zT01DSc1SVshj9DwPQIMR0cbKMiQEWU3eJCNoOVEdfvx6J7 ALan5V8UFof8DXbaNzGlE76AtOtiAs1lzo/j7rx8SMCBo0EG/LA0a2kkrMi7HiWoDFHl Pf0/THnB78Xx/feH6iA6TpLC6Ubzdd++QuLkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=QrWdevFpk04/cKTddjc5Htn885sxZt265wQeN9YAVGgkyWkgUU1dFQFlLIVty51rXN I4G2C51DOS0k6Mmk2vpsuLZQK89Tscg7qSJFlVyH1akQ4hayrT2iL8tzqAQ32wGABrG0 owj0ZJoO4nvEXVZJk/qrWgUZx1m0lkMkrbBeU= MIME-Version: 1.0 Received: by 10.223.113.5 with SMTP id y5mr10473573fap.93.1280345239946; Wed, 28 Jul 2010 12:27:19 -0700 (PDT) Sender: pali.gabor@googlemail.com Received: by 10.223.111.210 with HTTP; Wed, 28 Jul 2010 12:27:19 -0700 (PDT) In-Reply-To: <20100728154707.GA89549@FreeBSD.org> References: <201007261953.o6QJrAFd069188@svn.freebsd.org> <1280242180.78791.33.camel@buffy.york.ac.uk> <201007271215.26238.jkim@FreeBSD.org> <20100727173632.GA61992@FreeBSD.org> <20100728154707.GA89549@FreeBSD.org> Date: Wed, 28 Jul 2010 21:27:19 +0200 X-Google-Sender-Auth: 50M6O711HgTNWr4saVYKVTd8iuI Message-ID: From: Gabor PALI To: Alexey Dokuchaev Content-Type: multipart/mixed; boundary=0016e6db7bc0378943048c779b59 Cc: src-committers@freebsd.org, doc@freebsd.org, svn-src-all@freebsd.org, Gavin Atkinson , svn-src-head@freebsd.org, Jung-uk Kim Subject: Re: [patch] Add some ACPI debugging advice to the Handbook X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 19:52:01 -0000 --0016e6db7bc0378943048c779b59 Content-Type: text/plain; charset=ISO-8859-1 2010/7/28 Alexey Dokuchaev : > Could you please review attached diff, and I would appreciate if someone > on the doc@ team can correct my markup (I haven't done documentation > for a while) and commit it to HB? I have fixed up the markups a bit, otherwise it looks fine to me, see attached. > I can sumbmit PR is that's preferred. I can commit it directly, if there are no more comments. :g --0016e6db7bc0378943048c779b59 Content-Type: text/x-diff; charset=US-ASCII; name="acpi-debug.0.diff" Content-Disposition: attachment; filename="acpi-debug.0.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gc6kf6eu1 SW5kZXg6IGNoYXB0ZXIuc2dtbAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvaG9tZS9kYW5mZS9mYnNk L0ZyZWVCU0QtQ1ZTL2RvYy9lbl9VUy5JU084ODU5LTEvYm9va3MvaGFuZGJvb2svY29uZmlnL2No YXB0ZXIuc2dtbCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4yMzkKZGlmZiAtdSAtcjEuMjM5IGNo YXB0ZXIuc2dtbAotLS0gY2hhcHRlci5zZ21sCTI1IE9jdCAyMDA5IDIxOjIxOjU0IC0wMDAwCTEu MjM5CisrKyBjaGFwdGVyLnNnbWwJMjggSnVsIDIwMTAgMTU6MzM6MTYgLTAwMDAKQEAgLTI4MDcs NiArMjgwNywzMCBAQAogCSAgZG8gbm90IGV4cGVjdCB0aGUgcHJvYmxlbSB0byBiZSByZXNvbHZl ZCBzaW5jZSB0aGVyZSBhcmUgYSBsb3QKIAkgIG9mIGRyaXZlcnMvaGFyZHdhcmUgdGhhdCBuZWVk IG1vcmUgdGVzdGluZyBhbmQgd29yay48L3BhcmE+CiAKKwk8cGFyYT5PbmUgb2YgdGhlIGJpZ2dl c3QgcHJvYmxlbXMgd2l0aCBzdXNwZW5kL3Jlc3VtZSBpcyB0aGF0IHRvbworCSAgbWFueSBkcml2 ZXJzIGV4aXN0IHRoYXQgZG8gbm90IHNhdmUsIHJlc3RvcmUsIG9yIHJlaW5pdGlhbGl6ZQorCSAg dGhlaXIgZmlybXdhcmUsIHJlZ2lzdGVycywgb3IgZGV2aWNlIG1lbW9yeSBwcm9wZXJseS4gIFRv IG1ha2UKKwkgIHRoZXNlIGtpbmQgb2YgcHJvYmxlbXMgZWFzaWVyIHRvIGRlYnVnLCB0aGUgc2lt cGxlc3QgdGhpbmcgdG8gdHJ5CisJICBpczo8L3BhcmE+CisKKwk8c2NyZWVuPiZwcm9tcHQucm9v dDsgPHVzZXJpbnB1dD5zeXNjdGwgZGVidWcuYm9vdHZlcmJvc2U9MTwvdXNlcmlucHV0PgorJnBy b21wdC5yb290OyA8dXNlcmlucHV0PnN5c2N0bCBkZWJ1Zy5hY3BpLnN1c3BlbmRfYm91bmNlPTE8 L3VzZXJpbnB1dD4KKyZwcm9tcHQucm9vdDsgPHVzZXJpbnB1dD5hY3BpY29uZiAtcyAzPC91c2Vy aW5wdXQ+PC9zY3JlZW4+CisKKwk8cGFyYT5UaGlzIHRlc3QgZW11bGF0ZXMgc3VzcGVuZC9yZXN1 bWUgY3ljbGUgb2YgYWxsIGRldmljZSBkcml2ZXJzCisJICB3aXRob3V0IGFjdHVhbGx5IGdvaW5n IGludG8gPGxpdGVyYWw+UzM8L2xpdGVyYWw+IHN0YXRlLiAgSW4gc29tZQorCSAgY2FzZXMsIHlv dSBjYW4gZWFzaWx5IGNhdGNoIHByb2JsZW1zIHdpdGggdGhpcyBtZXRob2QgKGUuZy4sCisJICBs b3NpbmcgZmlybXdhcmUgc3RhdGUsIGRldmljZSB3YXRjaGRvZyB0aW1lIG91dCwgYW5kIHJldHJ5 aW5nCisJICBmb3JldmVyKS4gIE5vdGUgdGhhdCB0aGUgc3lzdGVtIHdpbGwgbm90IHJlYWxseSBl bnRlcgorCSAgPGxpdGVyYWw+UzM8L2xpdGVyYWw+IHN0YXRlLCB3aGljaCBtZWFucyBkZXZpY2Vz IG1heSBub3QgbG9zZQorCSAgcG93ZXIgYXQgYWxsLiAgSXQgYWxzbyBtZWFucyBzb21lIGRldmlj ZXMgd2lsbCBqdXN0IHdvcmsgZmluZQorCSAgZXZlbiBpZiBzdXNwZW5kL3Jlc3VtZSBtZXRob2Rz IGFyZSB0b3RhbGx5IG1pc3NpbmcgdW5saWtlIHJlYWwKKwkgIDxsaXRlcmFsPlMzPC9saXRlcmFs PiBzdGF0ZS48L3BhcmE+CisKKwk8cGFyYT5IYXJkZXIgY2FzZXMgcmVxdWlyZSBhZGRpdGlvbmFs IGhhcmR3YXJlLCBpLmUuLCBzZXJpYWwKKwkgIHBvcnQvY2FibGUgZm9yIHNlcmlhbCBjb25zb2xl IG9yIEZpcmV3aXJlIHBvcnQvY2FibGUgZm9yCisJICAmbWFuLmRjb25zLjQ7LCBhbmQgdXN1YWwg a2VybmVsIGRlYnVnZ2luZyBza2lsbHMuPC9wYXJhPgorCiAJPHBhcmE+VG8gaGVscCBpc29sYXRl IHRoZSBwcm9ibGVtLCByZW1vdmUgYXMgbWFueSBkcml2ZXJzIGZyb20KIAkgIHlvdXIga2VybmVs IGFzIHBvc3NpYmxlLiAgSWYgaXQgd29ya3MsIHlvdSBjYW4gbmFycm93IGRvd24KIAkgIHdoaWNo IGRyaXZlciBpcyB0aGUgcHJvYmxlbSBieSBsb2FkaW5nIGRyaXZlcnMgdW50aWwgaXQgZmFpbHMK --0016e6db7bc0378943048c779b59-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 28 21:52:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFC111065674; Wed, 28 Jul 2010 21:52:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B40A68FC13; Wed, 28 Jul 2010 21:52:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SLq9KP041930; Wed, 28 Jul 2010 21:52:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6SLq9Ws041926; Wed, 28 Jul 2010 21:52:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007282152.o6SLq9Ws041926@svn.freebsd.org> From: John Baldwin Date: Wed, 28 Jul 2010 21:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210577 - in head/sys: amd64/include i386/include x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 21:52:10 -0000 Author: jhb Date: Wed Jul 28 21:52:09 2010 New Revision: 210577 URL: http://svn.freebsd.org/changeset/base/210577 Log: The corrected error count field is dependent on CMCI, not TES. MFC after: 1 week Modified: head/sys/amd64/include/specialreg.h head/sys/i386/include/specialreg.h head/sys/x86/x86/mca.c Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Wed Jul 28 18:56:01 2010 (r210576) +++ head/sys/amd64/include/specialreg.h Wed Jul 28 21:52:09 2010 (r210577) @@ -372,10 +372,10 @@ #define MC_STATUS_MCA_ERROR 0x000000000000ffff #define MC_STATUS_MODEL_ERROR 0x00000000ffff0000 #define MC_STATUS_OTHER_INFO 0x01ffffff00000000 -#define MC_STATUS_COR_COUNT 0x001fffc000000000 /* If MCG_CAP_TES_P */ +#define MC_STATUS_COR_COUNT 0x001fffc000000000 /* If MCG_CAP_CMCI_P */ #define MC_STATUS_TES_STATUS 0x0060000000000000 /* If MCG_CAP_TES_P */ -#define MC_STATUS_AR 0x0080000000000000 /* If MCG_CAP_CMCI_P */ -#define MC_STATUS_S 0x0100000000000000 /* If MCG_CAP_CMCI_P */ +#define MC_STATUS_AR 0x0080000000000000 /* If MCG_CAP_TES_P */ +#define MC_STATUS_S 0x0100000000000000 /* If MCG_CAP_TES_P */ #define MC_STATUS_PCC 0x0200000000000000 #define MC_STATUS_ADDRV 0x0400000000000000 #define MC_STATUS_MISCV 0x0800000000000000 Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Wed Jul 28 18:56:01 2010 (r210576) +++ head/sys/i386/include/specialreg.h Wed Jul 28 21:52:09 2010 (r210577) @@ -441,10 +441,10 @@ #define MC_STATUS_MCA_ERROR 0x000000000000ffff #define MC_STATUS_MODEL_ERROR 0x00000000ffff0000 #define MC_STATUS_OTHER_INFO 0x01ffffff00000000 -#define MC_STATUS_COR_COUNT 0x001fffc000000000 /* If MCG_CAP_TES_P */ +#define MC_STATUS_COR_COUNT 0x001fffc000000000 /* If MCG_CAP_CMCI_P */ #define MC_STATUS_TES_STATUS 0x0060000000000000 /* If MCG_CAP_TES_P */ -#define MC_STATUS_AR 0x0080000000000000 /* If MCG_CAP_CMCI_P */ -#define MC_STATUS_S 0x0100000000000000 /* If MCG_CAP_CMCI_P */ +#define MC_STATUS_AR 0x0080000000000000 /* If MCG_CAP_TES_P */ +#define MC_STATUS_S 0x0100000000000000 /* If MCG_CAP_TES_P */ #define MC_STATUS_PCC 0x0200000000000000 #define MC_STATUS_ADDRV 0x0400000000000000 #define MC_STATUS_MISCV 0x0800000000000000 Modified: head/sys/x86/x86/mca.c ============================================================================== --- head/sys/x86/x86/mca.c Wed Jul 28 18:56:01 2010 (r210576) +++ head/sys/x86/x86/mca.c Wed Jul 28 21:52:09 2010 (r210577) @@ -256,7 +256,7 @@ mca_log(const struct mca_record *rec) printf("UNCOR "); else { printf("COR "); - if (rec->mr_mcg_cap & MCG_CAP_TES_P) + if (rec->mr_mcg_cap & MCG_CAP_CMCI_P) printf("(%lld) ", ((long long)rec->mr_status & MC_STATUS_COR_COUNT) >> 38); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 00:11:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 175BD106566B; Thu, 29 Jul 2010 00:11:15 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 047F88FC12; Thu, 29 Jul 2010 00:11:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T0BEev072523; Thu, 29 Jul 2010 00:11:14 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T0BE0l072516; Thu, 29 Jul 2010 00:11:14 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007290011.o6T0BE0l072516@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 29 Jul 2010 00:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 00:11:15 -0000 Author: gabor Date: Thu Jul 29 00:11:14 2010 New Revision: 210578 URL: http://svn.freebsd.org/changeset/base/210578 Log: - Use the traditional behaviour for filename and directory name inclusion and exclusion patterns [1] - Some improvements on the exiting code, like replacing memcpy with strlcpy/strcpy Approved by: delphij (mentor) Pointed out by: bf [1], des [1] Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/grep.1 head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c ============================================================================== --- head/usr.bin/grep/fastgrep.c Wed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/fastgrep.c Thu Jul 29 00:11:14 2010 (r210578) @@ -119,8 +119,7 @@ fastcomp(fastgrep_t *fg, const char *pat * string respectively. */ fg->pattern = grep_malloc(fg->len + 1); - memcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len); - fg->pattern[fg->len] = '\0'; + strlcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len + 1); /* Look for ways to cheat...er...avoid the full regex engine. */ for (i = 0; i < fg->len; i++) { Modified: head/usr.bin/grep/grep.1 ============================================================================== --- head/usr.bin/grep/grep.1 Wed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/grep.1 Thu Jul 29 00:11:14 2010 (r210578) @@ -29,7 +29,7 @@ .\" .\" @(#)grep.1 8.3 (Berkeley) 4/18/94 .\" -.Dd September 19, 2009 +.Dd July 28, 2010 .Dt GREP 1 .Os .Sh NAME @@ -186,15 +186,31 @@ options are used to specify multiple pat or when a pattern begins with a dash .Pq Sq - . .It Fl Fl exclude -If -.Fl R -is specified, it excludes files matching the given -filename pattern. +If specified, it excludes files matching the given +filename pattern from the search. +Note that +.Fl Fl exclude +patterns take priority over +.Fl Fl include +patterns, and if no +.Fl Fl include +pattern is specified, all files are searched that are +not excluded. +Patterns are matched to the full path specified, +not only to the filename component. .It Fl Fl exclude-dir If .Fl R is specified, it excludes directories matching the -given filename pattern. +given filename pattern from the search. +Note that +.Fl Fl exclude-dir +patterns take priority over +.Fl Fl include-dir +patterns, and if no +.Fl Fl include-dir +pattern is specified, all directories are searched that are +not excluded. .It Fl F , Fl Fl fixed-strings Interpret .Ar pattern @@ -238,15 +254,25 @@ By default, .Nm grep is case sensitive. .It Fl Fl include -If -.Fl R -is specified, it includes the files matching the -given filename pattern. +If specified, only files matching the +given filename pattern are searched. +Note that +.Fl Fl exclude +patterns take priority over +.Fl Fl include +patterns. +Patterns are matched to the full path specified, +not only to the filename component. .It Fl Fl include-dir If .Fl R -is specified, it includes the directories matching the -given filename pattern. +is specified, only directories matching the +given filename pattern are searched. +Note that +.Fl Fl exclude-dir +patterns take priority over +.Fl Fl include-dir +patterns. .It Fl J, Fl Fl bz2decompress Decompress the .Xr bzip2 1 Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Wed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/grep.c Thu Jul 29 00:11:14 2010 (r210578) @@ -85,8 +85,9 @@ regex_t *r_pattern; fastgrep_t *fg_pattern; /* Filename exclusion/inclusion patterns */ -unsigned int epatterns, epattern_sz; -struct epat *epattern; +unsigned int fpatterns, fpattern_sz; +unsigned int dpatterns, dpattern_sz; +struct epat *dpattern, *fpattern; /* For regex errors */ char re_error[RE_ERROR_BUF + 1]; @@ -112,7 +113,6 @@ bool wflag; /* -w: pattern must start bool xflag; /* -x: pattern must match entire line */ bool lbflag; /* --line-buffered */ bool nullflag; /* --null */ -bool exclflag; /* --exclude */ char *label; /* --label */ const char *color; /* --color */ int grepbehave = GREP_BASIC; /* -EFGP: type of the regex */ @@ -122,6 +122,9 @@ int devbehave = DEV_READ; /* -D: handl int dirbehave = DIR_READ; /* -dRr: handling of directories */ int linkbehave = LINK_READ; /* -OpS: handling of symlinks */ +bool dexclude, dinclude; /* --exclude amd --include */ +bool fexclude, finclude; /* --exclude-dir and --include-dir */ + enum { BIN_OPT = CHAR_MAX + 1, COLOR_OPT, @@ -234,32 +237,44 @@ add_pattern(char *pat, size_t len) --len; /* pat may not be NUL-terminated */ pattern[patterns] = grep_malloc(len + 1); - memcpy(pattern[patterns], pat, len); - pattern[patterns][len] = '\0'; + strlcpy(pattern[patterns], pat, len + 1); ++patterns; } /* - * Adds an include/exclude pattern to the internal array. + * Adds a file include/exclude pattern to the internal array. */ static void -add_epattern(char *pat, size_t len, int type, int mode) +add_fpattern(const char *pat, int mode) { /* Increase size if necessary */ - if (epatterns == epattern_sz) { - epattern_sz *= 2; - epattern = grep_realloc(epattern, ++epattern_sz * + if (fpatterns == fpattern_sz) { + fpattern_sz *= 2; + fpattern = grep_realloc(fpattern, ++fpattern_sz * sizeof(struct epat)); } - if (len > 0 && pat[len - 1] == '\n') - --len; - epattern[epatterns].pat = grep_malloc(len + 1); - memcpy(epattern[epatterns].pat, pat, len); - epattern[epatterns].pat[len] = '\0'; - epattern[epatterns].type = type; - epattern[epatterns].mode = mode; - ++epatterns; + fpattern[fpatterns].pat = grep_strdup(pat); + fpattern[fpatterns].mode = mode; + ++fpatterns; +} + +/* + * Adds a directory include/exclude pattern to the internal array. + */ +static void +add_dpattern(const char *pat, int mode) +{ + + /* Increase size if necessary */ + if (dpatterns == dpattern_sz) { + dpattern_sz *= 2; + dpattern = grep_realloc(dpattern, ++dpattern_sz * + sizeof(struct epat)); + } + dpattern[dpatterns].pat = grep_strdup(pat); + dpattern[dpatterns].mode = mode; + ++dpatterns; } /* @@ -591,24 +606,20 @@ main(int argc, char *argv[]) nullflag = true; break; case R_INCLUDE_OPT: - exclflag = true; - add_epattern(basename(optarg), strlen(basename(optarg)), - FILE_PAT, INCL_PAT); + finclude = true; + add_fpattern(optarg, INCL_PAT); break; case R_EXCLUDE_OPT: - exclflag = true; - add_epattern(basename(optarg), strlen(basename(optarg)), - FILE_PAT, EXCL_PAT); + fexclude = true; + add_fpattern(optarg, EXCL_PAT); break; case R_DINCLUDE_OPT: - exclflag = true; - add_epattern(basename(optarg), strlen(basename(optarg)), - DIR_PAT, INCL_PAT); + dexclude = true; + add_dpattern(optarg, INCL_PAT); break; case R_DEXCLUDE_OPT: - exclflag = true; - add_epattern(basename(optarg), strlen(basename(optarg)), - DIR_PAT, EXCL_PAT); + dinclude = true; + add_dpattern(optarg, EXCL_PAT); break; case HELP_OPT: default: @@ -680,8 +691,11 @@ main(int argc, char *argv[]) if (dirbehave == DIR_RECURSE) c = grep_tree(aargv); else - for (c = 0; aargc--; ++aargv) + for (c = 0; aargc--; ++aargv) { + if ((finclude || fexclude) && !file_matching(*aargv)) + continue; c+= procfile(*aargv); + } #ifndef WITHOUT_NLS catclose(catalog); Modified: head/usr.bin/grep/grep.h ============================================================================== --- head/usr.bin/grep/grep.h Wed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/grep.h Thu Jul 29 00:11:14 2010 (r210578) @@ -71,8 +71,6 @@ extern const char *errstr[]; #define LINK_EXPLICIT 1 #define LINK_SKIP 2 -#define FILE_PAT 0 -#define DIR_PAT 1 #define EXCL_PAT 0 #define INCL_PAT 1 @@ -98,7 +96,6 @@ struct str { struct epat { char *pat; int mode; - int type; }; typedef struct { @@ -118,7 +115,7 @@ extern int cflags, eflags; extern bool Eflag, Fflag, Gflag, Hflag, Lflag, bflag, cflag, hflag, iflag, lflag, mflag, nflag, oflag, qflag, sflag, vflag, wflag, xflag; -extern bool exclflag, nullflag; +extern bool dexclude, dinclude, fexclude, finclude, nullflag; extern unsigned long long Aflag, Bflag, mcount; extern char *label; extern const char *color; @@ -126,9 +123,9 @@ extern int binbehave, devbehave, dirbeh extern bool first, matchall, notfound, prev; extern int tail; -extern unsigned int epatterns, patterns; +extern unsigned int dpatterns, fpatterns, patterns; extern char **pattern; -extern struct epat *epattern; +extern struct epat *dpattern, *fpattern; extern regex_t *er_pattern, *r_pattern; extern fastgrep_t *fg_pattern; @@ -137,11 +134,14 @@ extern fastgrep_t *fg_pattern; extern char re_error[RE_ERROR_BUF + 1]; /* Seems big enough */ /* util.c */ +bool dir_matching(const char *dname); +bool file_matching(const char *fname); int procfile(const char *fn); int grep_tree(char **argv); void *grep_malloc(size_t size); void *grep_calloc(size_t nmemb, size_t size); void *grep_realloc(void *ptr, size_t size); +char *grep_strdup(const char *str); void printline(struct str *line, int sep, regmatch_t *matches, int m); /* queue.c */ Modified: head/usr.bin/grep/queue.c ============================================================================== --- head/usr.bin/grep/queue.c Wed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/queue.c Thu Jul 29 00:11:14 2010 (r210578) @@ -60,7 +60,7 @@ enqueue(struct str *x) item->data.len = x->len; item->data.line_no = x->line_no; item->data.off = x->off; - memcpy(item->data.dat, x->dat, x->len); + strcpy(item->data.dat, x->dat); item->data.file = x->file; STAILQ_INSERT_TAIL(&queue, item, list); Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Wed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/util.c Thu Jul 29 00:11:14 2010 (r210578) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -51,6 +52,45 @@ __FBSDID("$FreeBSD$"); static int linesqueued; static int procline(struct str *l, int); +bool +file_matching(const char *fname) +{ + bool ret; + + ret = finclude ? false : true; + + for (unsigned int i = 0; i < fpatterns; ++i) { + if (fnmatch(fpattern[i].pat, + fname, 0) == 0 || fnmatch(fpattern[i].pat, + basename(fname), 0) == 0) { + if (fpattern[i].mode == EXCL_PAT) + return (false); + else + ret = true; + } + } + return (ret); +} + +bool +dir_matching(const char *dname) +{ + bool ret; + + ret = dinclude ? false : true; + + for (unsigned int i = 0; i < dpatterns; ++i) { + if (dname != NULL && + fnmatch(dname, dpattern[i].pat, 0) == 0) { + if (dpattern[i].mode == EXCL_PAT) + return (false); + else + ret = true; + } + } + return (ret); +} + /* * Processes a directory when a recursive search is performed with * the -R option. Each appropriate file is passed to procfile(). @@ -61,7 +101,6 @@ grep_tree(char **argv) FTS *fts; FTSENT *p; char *d, *dir = NULL; - unsigned int i; int c, fts_flags; bool ok; @@ -102,30 +141,19 @@ grep_tree(char **argv) default: /* Check for file exclusion/inclusion */ ok = true; - if (exclflag) { + if (dexclude || dinclude) { if ((d = strrchr(p->fts_path, '/')) != NULL) { dir = grep_malloc(sizeof(char) * (d - p->fts_path + 2)); strlcpy(dir, p->fts_path, (d - p->fts_path + 1)); } - for (i = 0; i < epatterns; ++i) { - switch(epattern[i].type) { - case FILE_PAT: - if (fnmatch(epattern[i].pat, - basename(p->fts_path), 0) == 0) - ok = epattern[i].mode != EXCL_PAT; - break; - case DIR_PAT: - if (dir != NULL && strstr(dir, - epattern[i].pat) != NULL) - ok = epattern[i].mode != EXCL_PAT; - break; - } - } + ok = dir_matching(dir); free(dir); dir = NULL; } + if (fexclude || finclude) + ok &= file_matching(p->fts_path); if (ok) c += procfile(p->fts_path); @@ -409,6 +437,19 @@ grep_realloc(void *ptr, size_t size) } /* + * Safe strdup() for internal use. + */ +char * +grep_strdup(const char *str) +{ + char *ret; + + if ((ret = strdup(str)) == NULL) + err(2, "strdup"); + return (ret); +} + +/* * Prints a matching line according to the command line options. */ void From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 00:53:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7E741065679 for ; Thu, 29 Jul 2010 00:53:15 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 939B68FC15 for ; Thu, 29 Jul 2010 00:53:15 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 6A6E26676C for ; Thu, 29 Jul 2010 02:34:34 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id D08841509E; Thu, 29 Jul 2010 02:34:29 +0200 (CEST) Date: Thu, 29 Jul 2010 02:34:29 +0200 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20100729003429.GA6430@britannica.bec.de> References: <201007290011.o6T0BE0l072516@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007290011.o6T0BE0l072516@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 00:53:15 -0000 On Thu, Jul 29, 2010 at 12:11:14AM +0000, Gabor Kovesdan wrote: > - Some improvements on the exiting code, like replacing memcpy with > strlcpy/strcpy Why is this an improvement? At least for non-trivial sizes, it is quite likely to be a regression. Especially using strlcpy as replacement for memcpy+\0 is bogus. Joerg From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 01:15:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A348510656DA; Thu, 29 Jul 2010 01:15:26 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91FCF8FC18; Thu, 29 Jul 2010 01:15:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T1FQOb086574; Thu, 29 Jul 2010 01:15:26 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T1FQIo086569; Thu, 29 Jul 2010 01:15:26 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007290115.o6T1FQIo086569@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 29 Jul 2010 01:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210579 - head/usr.bin/grep/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 01:15:26 -0000 Author: gabor Date: Thu Jul 29 01:15:26 2010 New Revision: 210579 URL: http://svn.freebsd.org/changeset/base/210579 Log: - Add Japanese NLS catalogs Submitted by: hrs Approved by: delphij (mentor) Added: head/usr.bin/grep/nls/ja_JP.SJIS.msg (contents, props changed) head/usr.bin/grep/nls/ja_JP.UTF-8.msg (contents, props changed) head/usr.bin/grep/nls/ja_JP.eucJP.msg (contents, props changed) Modified: head/usr.bin/grep/nls/Makefile.inc Modified: head/usr.bin/grep/nls/Makefile.inc ============================================================================== --- head/usr.bin/grep/nls/Makefile.inc Thu Jul 29 00:11:14 2010 (r210578) +++ head/usr.bin/grep/nls/Makefile.inc Thu Jul 29 01:15:26 2010 (r210579) @@ -4,6 +4,9 @@ NLSNAME= grep NLS= es_ES.ISO8859-1 NLS+= gl_ES.ISO8859-1 NLS+= hu_HU.ISO8859-2 +NLS+= ja_JP.eucJP +NLS+= ja_JP.SJIS +NLS+= ja_JP.UTF-8 NLS+= pt_BR.ISO8859-1 NLS+= ru_RU.KOI8-R Added: head/usr.bin/grep/nls/ja_JP.SJIS.msg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ja_JP.SJIS.msg Thu Jul 29 01:15:26 2010 (r210579) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(•W€“ü—Í)" +2 "bzip2 ˆ³kƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Þ‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñ" +3 "--color ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è’l‚ÉŒë‚肪‚ ‚è‚Ü‚·" +4 "Žg‚¢•û: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ”Žš] [-B ”Žš] [-C[”Žš]]\n" +5 "\t[-e ƒpƒ^[ƒ“] [-f ƒtƒ@ƒCƒ‹–¼] [--binary-files=’l] [--color=’l]\n" +6 "\t[--context[=”Žš]] [--directories=“®ì] [--label] [--line-buffered]\n" +7 "\t[--null] [ƒpƒ^[ƒ“] [ƒtƒ@ƒCƒ‹–¼ ...]\n" +8 "--binary-files ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è’l‚ÉŒë‚肪‚ ‚è‚Ü‚·" +9 "ƒoƒCƒiƒŠƒtƒ@ƒCƒ‹ %s ‚Ƀ}ƒbƒ`‚µ‚Ü‚µ‚½\n" +10 "%s (BSD grep) %s\n" Added: head/usr.bin/grep/nls/ja_JP.UTF-8.msg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ja_JP.UTF-8.msg Thu Jul 29 01:15:26 2010 (r210579) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(標準入力)" +2 "bzip2 圧縮ファイルを読ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã›ã‚“" +3 "--color オプションã®æŒ‡å®šå€¤ã«èª¤ã‚ŠãŒã‚ã‚Šã¾ã™" +4 "使ã„æ–¹: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A æ•°å­—] [-B æ•°å­—] [-C[æ•°å­—]]\n" +5 "\t[-e パターン] [-f ファイルå] [--binary-files=値] [--color=値]\n" +6 "\t[--context[=æ•°å­—]] [--directories=動作] [--label] [--line-buffered]\n" +7 "\t[--null] [パターン] [ファイルå ...]\n" +8 "--binary-files オプションã®æŒ‡å®šå€¤ã«èª¤ã‚ŠãŒã‚ã‚Šã¾ã™" +9 "ãƒã‚¤ãƒŠãƒªãƒ•ã‚¡ã‚¤ãƒ« %s ã«ãƒžãƒƒãƒã—ã¾ã—ãŸ\n" +10 "%s (BSD grep) %s\n" Added: head/usr.bin/grep/nls/ja_JP.eucJP.msg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ja_JP.eucJP.msg Thu Jul 29 01:15:26 2010 (r210579) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(ɸ½àÆþÎÏ)" +2 "bzip2 °µ½Ì¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó" +3 "--color ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹" +4 "»È¤¤Êý: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ¿ô»ú] [-B ¿ô»ú] [-C[¿ô»ú]]\n" +5 "\t[-e ¥Ñ¥¿¡¼¥ó] [-f ¥Õ¥¡¥¤¥ë̾] [--binary-files=ÃÍ] [--color=ÃÍ]\n" +6 "\t[--context[=¿ô»ú]] [--directories=Æ°ºî] [--label] [--line-buffered]\n" +7 "\t[--null] [¥Ñ¥¿¡¼¥ó] [¥Õ¥¡¥¤¥ë̾ ...]\n" +8 "--binary-files ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹" +9 "¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë %s ¤Ë¥Þ¥Ã¥Á¤·¤Þ¤·¤¿\n" +10 "%s (BSD grep) %s\n" From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 02:32:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6A961065672; Thu, 29 Jul 2010 02:32:21 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B49218FC20; Thu, 29 Jul 2010 02:32:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T2WLvS004283; Thu, 29 Jul 2010 02:32:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T2WLR5004280; Thu, 29 Jul 2010 02:32:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007290232.o6T2WLR5004280@svn.freebsd.org> From: Juli Mallett Date: Thu, 29 Jul 2010 02:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210595 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 02:32:21 -0000 Author: jmallett Date: Thu Jul 29 02:32:21 2010 New Revision: 210595 URL: http://svn.freebsd.org/changeset/base/210595 Log: o) Subtract 64K from the default userland stack pointer. GCC generate code that with a 32-bit ABI on a system with 64-bit registers can attempt to access an invalid (well, kernel) memory address rather than the intended user address for stack-relative loads and stores. Lowering the stack pointer works around this. [1] o) Make TRAP_DEBUG code conditional on the trap_debug variable. Make trap_debug default to 0 instead of 1 now but make it possible to change it at runtime using sysctl. o) Kill programs that attempt an unaligned access of a kernel address. Note that with some ABIs, calling useracc() is not sufficient since the register may be 64-bit but vm_offset_t is 32-bit so a kernel address could be truncated to what looks like a valid user address, allowing the user to crash the kernel. o) Clean up unaligned access emulation to support unaligned 16-bit and 64-bit accesses. (For 16-bit accesses it was checking for user access to too much memory (4 bytes) and there was no 64-bit support.) This still lacks support for unaligned load-linked and store-conditional. Reviewed by: [1] gonzo Modified: head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Thu Jul 29 02:24:21 2010 (r210594) +++ head/sys/mips/mips/pm_machdep.c Thu Jul 29 02:32:21 2010 (r210595) @@ -479,9 +479,37 @@ exec_setregs(struct thread *td, struct i bzero((caddr_t)td->td_frame, sizeof(struct trapframe)); /* - * Make sp 64-bit aligned. + * The stack pointer has to be aligned to accommodate the largest + * datatype at minimum. This probably means it should be 16-byte + * aligned, but for now we're 8-byte aligning it. */ td->td_frame->sp = ((register_t) stack) & ~(sizeof(__int64_t) - 1); + + /* + * If we're running o32 or n32 programs but have 64-bit registers, + * GCC may use stack-relative addressing near the top of user + * address space that, due to sign extension, will yield an + * invalid address. For instance, if sp is 0x7fffff00 then GCC + * might do something like this to load a word from 0x7ffffff0: + * + * addu sp, sp, 32768 + * lw t0, -32528(sp) + * + * On systems with 64-bit registers, sp is sign-extended to + * 0xffffffff80007f00 and the load is instead done from + * 0xffffffff7ffffff0. + * + * To prevent this, we subtract 64K from the stack pointer here. + * + * For consistency, we should just always do this unless we're + * running n64 programs. For now, since we don't support + * COMPAT_FREEBSD32 on n64 kernels, we just do it unless we're + * running n64 kernels. + */ +#if !defined(__mips_n64) + td->td_frame->sp -= 65536; +#endif + td->td_frame->pc = imgp->entry_addr & ~3; td->td_frame->t9 = imgp->entry_addr & ~3; /* abicall req */ td->td_frame->sr = MIPS_SR_KSU_USER | MIPS_SR_EXL | MIPS_SR_INT_IE | Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Thu Jul 29 02:24:21 2010 (r210594) +++ head/sys/mips/mips/trap.c Thu Jul 29 02:32:21 2010 (r210595) @@ -96,7 +96,9 @@ __FBSDID("$FreeBSD$"); #ifdef TRAP_DEBUG -int trap_debug = 1; +int trap_debug = 0; +SYSCTL_INT(_machdep, OID_AUTO, trap_debug, CTLFLAG_RW, + &trap_debug, 0, "Debug information on all traps"); #endif static void log_illegal_instruction(const char *, struct trapframe *); @@ -259,7 +261,7 @@ static int allow_unaligned_acc = 1; SYSCTL_INT(_vm, OID_AUTO, allow_unaligned_acc, CTLFLAG_RW, &allow_unaligned_acc, 0, "Allow unaligned accesses"); -static int emulate_unaligned_access(struct trapframe *frame); +static int emulate_unaligned_access(struct trapframe *frame, int mode); extern void fswintrberr(void); /* XXX */ @@ -555,7 +557,10 @@ dofault: case T_ADDR_ERR_LD + T_USER: /* misaligned or kseg access */ case T_ADDR_ERR_ST + T_USER: /* misaligned or kseg access */ - if (allow_unaligned_acc) { + if (trapframe->badvaddr < 0 || + trapframe->badvaddr >= VM_MAXUSER_ADDRESS) { + msg = "ADDRESS_SPACE_ERR"; + } else if (allow_unaligned_acc) { int mode; if (type == (T_ADDR_ERR_LD + T_USER)) @@ -563,23 +568,13 @@ dofault: else mode = VM_PROT_WRITE; - /* - * ADDR_ERR faults have higher priority than TLB - * Miss faults. Therefore, it is necessary to - * verify that the faulting address is a valid - * virtual address within the process' address space - * before trying to emulate the unaligned access. - */ - if (useracc((caddr_t) - (((vm_offset_t)trapframe->badvaddr) & - ~(sizeof(int) - 1)), sizeof(int) * 2, mode)) { - access_type = emulate_unaligned_access( - trapframe); - if (access_type != 0) - goto out; - } + access_type = emulate_unaligned_access(trapframe, mode); + if (access_type != 0) + goto out; + msg = "ALIGNMENT_FIX_ERR"; + } else { + msg = "ADDRESS_ERR"; } - msg = "ADDRESS_ERR"; /* FALL THROUGH */ @@ -686,7 +681,9 @@ dofault: #endif } #ifdef TRAP_DEBUG - printf("SYSCALL #%d pid:%u\n", code, p->p_pid); + if (trap_debug) { + printf("SYSCALL #%d pid:%u\n", code, p->p_pid); + } #endif if (p->p_sysent->sv_mask) @@ -723,8 +720,10 @@ dofault: } } #ifdef TRAP_DEBUG - for (i = 0; i < nargs; i++) { - printf("args[%d] = %#jx\n", i, (intmax_t)args[i]); + if (trap_debug) { + for (i = 0; i < nargs; i++) { + printf("args[%d] = %#jx\n", i, (intmax_t)args[i]); + } } #endif #ifdef SYSCALL_TRACING @@ -937,8 +936,10 @@ dofault: case T_ADDR_ERR_LD: /* misaligned access */ case T_ADDR_ERR_ST: /* misaligned access */ #ifdef TRAP_DEBUG - printf("+++ ADDR_ERR: type = %d, badvaddr = %#jx\n", type, - (intmax_t)trapframe->badvaddr); + if (trap_debug) { + printf("+++ ADDR_ERR: type = %d, badvaddr = %#jx\n", type, + (intmax_t)trapframe->badvaddr); + } #endif /* Only allow emulation on a user address */ if (allow_unaligned_acc && @@ -950,22 +951,9 @@ dofault: else mode = VM_PROT_WRITE; - /* - * ADDR_ERR faults have higher priority than TLB - * Miss faults. Therefore, it is necessary to - * verify that the faulting address is a valid - * virtual address within the process' address space - * before trying to emulate the unaligned access. - */ - if (useracc((caddr_t) - (((vm_offset_t)trapframe->badvaddr) & - ~(sizeof(int) - 1)), sizeof(int) * 2, mode)) { - access_type = emulate_unaligned_access( - trapframe); - if (access_type != 0) { - return (trapframe->pc); - } - } + access_type = emulate_unaligned_access(trapframe, mode); + if (access_type != 0) + return (trapframe->pc); } /* FALLTHROUGH */ @@ -997,9 +985,10 @@ err: printf("kernel mode)\n"); #ifdef TRAP_DEBUG - printf("badvaddr = %#jx, pc = %#jx, ra = %#jx, sr = %#jxx\n", - (intmax_t)trapframe->badvaddr, (intmax_t)trapframe->pc, (intmax_t)trapframe->ra, - (intmax_t)trapframe->sr); + if (trap_debug) + printf("badvaddr = %#jx, pc = %#jx, ra = %#jx, sr = %#jxx\n", + (intmax_t)trapframe->badvaddr, (intmax_t)trapframe->pc, (intmax_t)trapframe->ra, + (intmax_t)trapframe->sr); #endif #ifdef KDB @@ -1433,76 +1422,120 @@ log_bad_page_fault(char *msg, struct tra * Unaligned load/store emulation */ static int -mips_unaligned_load_store(struct trapframe *frame, register_t addr, register_t pc) +mips_unaligned_load_store(struct trapframe *frame, int mode, register_t addr, register_t pc) { register_t *reg = (register_t *) frame; u_int32_t inst = *((u_int32_t *)(intptr_t)pc); - u_int32_t value_msb, value; - int access_type = 0; + register_t value_msb, value; + unsigned size; + /* + * ADDR_ERR faults have higher priority than TLB + * Miss faults. Therefore, it is necessary to + * verify that the faulting address is a valid + * virtual address within the process' address space + * before trying to emulate the unaligned access. + */ + switch (MIPS_INST_OPCODE(inst)) { + case OP_LHU: case OP_LH: + case OP_SH: + size = 2; + break; + case OP_LWU: case OP_LW: + case OP_SW: + size = 4; + break; + case OP_LD: + case OP_SD: + size = 8; + break; + default: + printf("%s: unhandled opcode in address error: %#x\n", __func__, MIPS_INST_OPCODE(inst)); + return (0); + } + + if (!useracc((void *)((vm_offset_t)addr & ~(size - 1)), size * 2, mode)) + return (0); + + /* + * XXX + * Handle LL/SC LLD/SCD. + */ switch (MIPS_INST_OPCODE(inst)) { case OP_LHU: + KASSERT(mode == VM_PROT_READ, ("access mode must be read for load instruction.")); lbu_macro(value_msb, addr); addr += 1; lbu_macro(value, addr); value |= value_msb << 8; reg[MIPS_INST_RT(inst)] = value; - access_type = MIPS_LHU_ACCESS; - break; + return (MIPS_LHU_ACCESS); case OP_LH: + KASSERT(mode == VM_PROT_READ, ("access mode must be read for load instruction.")); lb_macro(value_msb, addr); addr += 1; lbu_macro(value, addr); value |= value_msb << 8; reg[MIPS_INST_RT(inst)] = value; - access_type = MIPS_LH_ACCESS; - break; + return (MIPS_LH_ACCESS); case OP_LWU: + KASSERT(mode == VM_PROT_READ, ("access mode must be read for load instruction.")); lwl_macro(value, addr); addr += 3; lwr_macro(value, addr); value &= 0xffffffff; reg[MIPS_INST_RT(inst)] = value; - access_type = MIPS_LWU_ACCESS; - break; + return (MIPS_LWU_ACCESS); case OP_LW: + KASSERT(mode == VM_PROT_READ, ("access mode must be read for load instruction.")); lwl_macro(value, addr); addr += 3; lwr_macro(value, addr); reg[MIPS_INST_RT(inst)] = value; - access_type = MIPS_LW_ACCESS; - break; + return (MIPS_LW_ACCESS); + + case OP_LD: + KASSERT(mode == VM_PROT_READ, ("access mode must be read for load instruction.")); + ldl_macro(value, addr); + addr += 7; + ldr_macro(value, addr); + reg[MIPS_INST_RT(inst)] = value; + return (MIPS_LD_ACCESS); case OP_SH: + KASSERT(mode == VM_PROT_WRITE, ("access mode must be write for store instruction.")); value = reg[MIPS_INST_RT(inst)]; value_msb = value >> 8; sb_macro(value_msb, addr); addr += 1; sb_macro(value, addr); - access_type = MIPS_SH_ACCESS; - break; + return (MIPS_SH_ACCESS); case OP_SW: + KASSERT(mode == VM_PROT_WRITE, ("access mode must be write for store instruction.")); value = reg[MIPS_INST_RT(inst)]; swl_macro(value, addr); addr += 3; swr_macro(value, addr); - access_type = MIPS_SW_ACCESS; - break; + return (MIPS_SW_ACCESS); - default: - break; + case OP_SD: + KASSERT(mode == VM_PROT_WRITE, ("access mode must be write for store instruction.")); + value = reg[MIPS_INST_RT(inst)]; + sdl_macro(value, addr); + addr += 7; + sdr_macro(value, addr); + return (MIPS_SD_ACCESS); } - - return access_type; + panic("%s: should not be reached.", __func__); } static int -emulate_unaligned_access(struct trapframe *frame) +emulate_unaligned_access(struct trapframe *frame, int mode) { register_t pc; int access_type = 0; @@ -1523,7 +1556,7 @@ emulate_unaligned_access(struct trapfram * Otherwise restore pc and fall through. */ access_type = mips_unaligned_load_store(frame, - frame->badvaddr, pc); + mode, frame->badvaddr, pc); if (access_type) { if (DELAYBRANCH(frame->cause)) From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 05:15:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 250D71065674; Thu, 29 Jul 2010 05:15:00 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13F418FC1D; Thu, 29 Jul 2010 05:15:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T5Ex0O040368; Thu, 29 Jul 2010 05:14:59 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T5ExV4040366; Thu, 29 Jul 2010 05:14:59 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201007290514.o6T5ExV4040366@svn.freebsd.org> From: Neel Natu Date: Thu, 29 Jul 2010 05:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210596 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 05:15:00 -0000 Author: neel Date: Thu Jul 29 05:14:59 2010 New Revision: 210596 URL: http://svn.freebsd.org/changeset/base/210596 Log: Fix build for o32 kernels. The emulation of 'ld' and 'sd' instructions only works for ABIs that support 64-bit registers and the instructions 'ldl' and 'ldr' that operate on those registers. Reviewed by: jmallett Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Thu Jul 29 02:32:21 2010 (r210595) +++ head/sys/mips/mips/trap.c Thu Jul 29 05:14:59 2010 (r210596) @@ -1497,6 +1497,7 @@ mips_unaligned_load_store(struct trapfra reg[MIPS_INST_RT(inst)] = value; return (MIPS_LW_ACCESS); +#if defined(__mips_n32) || defined(__mips_n64) case OP_LD: KASSERT(mode == VM_PROT_READ, ("access mode must be read for load instruction.")); ldl_macro(value, addr); @@ -1504,6 +1505,7 @@ mips_unaligned_load_store(struct trapfra ldr_macro(value, addr); reg[MIPS_INST_RT(inst)] = value; return (MIPS_LD_ACCESS); +#endif case OP_SH: KASSERT(mode == VM_PROT_WRITE, ("access mode must be write for store instruction.")); @@ -1522,6 +1524,7 @@ mips_unaligned_load_store(struct trapfra swr_macro(value, addr); return (MIPS_SW_ACCESS); +#if defined(__mips_n32) || defined(__mips_n64) case OP_SD: KASSERT(mode == VM_PROT_WRITE, ("access mode must be write for store instruction.")); value = reg[MIPS_INST_RT(inst)]; @@ -1529,6 +1532,7 @@ mips_unaligned_load_store(struct trapfra addr += 7; sdr_macro(value, addr); return (MIPS_SD_ACCESS); +#endif } panic("%s: should not be reached.", __func__); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 05:26:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 433C01065673; Thu, 29 Jul 2010 05:26:37 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 688F58FC1C; Thu, 29 Jul 2010 05:26:36 +0000 (UTC) Received: by gwj23 with SMTP id 23so93325gwj.13 for ; Wed, 28 Jul 2010 22:26:35 -0700 (PDT) Received: by 10.100.4.5 with SMTP id 5mr12967145and.160.1280381195285; Wed, 28 Jul 2010 22:26:35 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.42.4.66 with HTTP; Wed, 28 Jul 2010 22:26:15 -0700 (PDT) In-Reply-To: <201007290514.o6T5ExV4040366@svn.freebsd.org> References: <201007290514.o6T5ExV4040366@svn.freebsd.org> From: Juli Mallett Date: Wed, 28 Jul 2010 22:26:15 -0700 X-Google-Sender-Auth: xsimv7FxrrCNdiS3GjFoAmIpuhc Message-ID: To: Neel Natu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210596 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 05:26:37 -0000 On Wed, Jul 28, 2010 at 22:14, Neel Natu wrote: > Log: > =A0Fix build for o32 kernels. > > =A0The emulation of 'ld' and 'sd' instructions only works for ABIs that s= upport > =A064-bit registers and the instructions 'ldl' and 'ldr' that operate on = those > =A0registers. Thanks, Neel! From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 06:27:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 976061065672; Thu, 29 Jul 2010 06:27:41 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86FA98FC1D; Thu, 29 Jul 2010 06:27:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T6Rfb4056368; Thu, 29 Jul 2010 06:27:41 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T6RfTF056366; Thu, 29 Jul 2010 06:27:41 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201007290627.o6T6RfTF056366@svn.freebsd.org> From: Neel Natu Date: Thu, 29 Jul 2010 06:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210597 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 06:27:41 -0000 Author: neel Date: Thu Jul 29 06:27:41 2010 New Revision: 210597 URL: http://svn.freebsd.org/changeset/base/210597 Log: Fix 'pciconf -a' by providing an implementation of PCIOCATTACHED. Reviewed by: imp MFC after: 1 week Pointed out by: Heymian Wong (heymian at mit.alum.edu) Sponsored by: NetApp Modified: head/sys/dev/pci/pci_user.c Modified: head/sys/dev/pci/pci_user.c ============================================================================== --- head/sys/dev/pci/pci_user.c Thu Jul 29 05:14:59 2010 (r210596) +++ head/sys/dev/pci/pci_user.c Thu Jul 29 06:27:41 2010 (r210597) @@ -735,6 +735,16 @@ getconfexit: bio->pbi_enabled = (value & PCIM_CMD_PORTEN) != 0; error = 0; break; + case PCIOCATTACHED: + error = 0; + io = (struct pci_io *)data; + pcidev = pci_find_dbsf(io->pi_sel.pc_domain, io->pi_sel.pc_bus, + io->pi_sel.pc_dev, io->pi_sel.pc_func); + if (pcidev != NULL) + io->pi_data = device_is_attached(pcidev); + else + error = ENODEV; + break; default: error = ENOTTY; break; From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 09:20:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A07911065676; Thu, 29 Jul 2010 09:20:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 749B88FC14; Thu, 29 Jul 2010 09:20:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T9K824094786; Thu, 29 Jul 2010 09:20:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T9K8OB094785; Thu, 29 Jul 2010 09:20:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007290920.o6T9K8OB094785@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Jul 2010 09:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210598 - stable/8/lib/libc/compat-43 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 09:20:08 -0000 Author: kib Date: Thu Jul 29 09:20:08 2010 New Revision: 210598 URL: http://svn.freebsd.org/changeset/base/210598 Log: MFC r210370: Verify return value of the sigset manipulation functions to catch invalid signal numbers. Modified: stable/8/lib/libc/compat-43/sigcompat.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/compat-43/sigcompat.c ============================================================================== --- stable/8/lib/libc/compat-43/sigcompat.c Thu Jul 29 06:27:41 2010 (r210597) +++ stable/8/lib/libc/compat-43/sigcompat.c Thu Jul 29 09:20:08 2010 (r210598) @@ -112,16 +112,11 @@ int xsi_sigpause(int sig) { sigset_t set; - int error; - if (!_SIG_VALID(sig)) { - errno = EINVAL; + if (_sigprocmask(SIG_BLOCK, NULL, &set) == -1) + return (-1); + if (sigdelset(&set, sig) == -1) return (-1); - } - error = _sigprocmask(SIG_BLOCK, NULL, &set); - if (error != 0) - return (error); - sigdelset(&set, sig); return (_sigsuspend(&set)); } @@ -131,7 +126,8 @@ sighold(int sig) sigset_t set; sigemptyset(&set); - sigaddset(&set, sig); + if (sigaddset(&set, sig) == -1) + return (-1); return (_sigprocmask(SIG_BLOCK, &set, NULL)); } @@ -151,7 +147,8 @@ sigrelse(int sig) sigset_t set; sigemptyset(&set); - sigaddset(&set, sig); + if (sigaddset(&set, sig) == -1) + return (-1); return (_sigprocmask(SIG_UNBLOCK, &set, NULL)); } @@ -160,35 +157,30 @@ void { sigset_t set, pset; struct sigaction sa, psa; - int error; sigemptyset(&set); - sigaddset(&set, sig); - error = _sigprocmask(SIG_BLOCK, NULL, &pset); - if (error == -1) + if (sigaddset(&set, sig) == -1) + return (SIG_ERR); + if (_sigprocmask(SIG_BLOCK, NULL, &pset) == -1) return (SIG_ERR); if ((__sighandler_t *)disp == SIG_HOLD) { - error = _sigprocmask(SIG_BLOCK, &set, &pset); - if (error == -1) + if (_sigprocmask(SIG_BLOCK, &set, &pset) == -1) return (SIG_ERR); if (sigismember(&pset, sig)) return (SIG_HOLD); else { - error = _sigaction(sig, NULL, &psa); - if (error == -1) + if (_sigaction(sig, NULL, &psa) == -1) return (SIG_ERR); return (psa.sa_handler); } } else { - error = _sigprocmask(SIG_UNBLOCK, &set, &pset); - if (error == -1) + if (_sigprocmask(SIG_UNBLOCK, &set, &pset) == -1) return (SIG_ERR); } bzero(&sa, sizeof(sa)); sa.sa_handler = disp; - error = _sigaction(sig, &sa, &psa); - if (error == -1) + if (_sigaction(sig, &sa, &psa) == -1) return (SIG_ERR); if (sigismember(&pset, sig)) return (SIG_HOLD); From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 11:37:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23F3E10656D8; Thu, 29 Jul 2010 11:37:05 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 130C78FC19; Thu, 29 Jul 2010 11:37:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TBb5Nt028152; Thu, 29 Jul 2010 11:37:05 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TBb424028147; Thu, 29 Jul 2010 11:37:04 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201007291137.o6TBb424028147@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Jul 2010 11:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210599 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 11:37:05 -0000 Author: rrs Date: Thu Jul 29 11:37:04 2010 New Revision: 210599 URL: http://svn.freebsd.org/changeset/base/210599 Log: PR SCTP Bugs. Basically a full sized frame of PR SCTP FWD-TSN's would not be sent and thus cause a stalled connection. Also the rwnd Calculation was also off on the receiver side for PR-SCTP. MFC after: 1 month Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Jul 29 09:20:08 2010 (r210598) +++ head/sys/netinet/sctp_indata.c Thu Jul 29 11:37:04 2010 (r210599) @@ -91,8 +91,10 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, st * take out what has NOT been put on socket queue and we yet hold * for putting up. */ - calc = sctp_sbspace_sub(calc, (uint32_t) asoc->size_on_reasm_queue); - calc = sctp_sbspace_sub(calc, (uint32_t) asoc->size_on_all_streams); + calc = sctp_sbspace_sub(calc, (uint32_t) (asoc->size_on_reasm_queue + + asoc->cnt_on_reasm_queue * MSIZE)); + calc = sctp_sbspace_sub(calc, (uint32_t) (asoc->size_on_all_streams + + asoc->cnt_on_all_streams * MSIZE)); if (calc == 0) { /* out of space */ @@ -3322,6 +3324,10 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (tp1->sent >= SCTP_DATAGRAM_RESEND) { /* either a RESEND, ACKED, or MARKED */ /* skip */ + if (tp1->sent == SCTP_FORWARD_TSN_SKIP) { + /* Continue strikin FWD-TSN chunks */ + tp1->rec.data.fwd_tsn_cnt++; + } tp1 = TAILQ_NEXT(tp1, sctp_next); continue; } @@ -3707,7 +3713,6 @@ sctp_try_advance_peer_ack_point(struct s tp1 = TAILQ_FIRST(&asoc->sent_queue); while (tp1) { if (tp1->sent != SCTP_FORWARD_TSN_SKIP && - tp1->sent != SCTP_DATAGRAM_ACKED && tp1->sent != SCTP_DATAGRAM_RESEND) { /* no chance to advance, out of here */ break; @@ -3763,8 +3768,7 @@ sctp_try_advance_peer_ack_point(struct s * the chunk, advance our peer ack point and we can check * the next chunk. */ - if ((tp1->sent == SCTP_FORWARD_TSN_SKIP) || - (tp1->sent == SCTP_DATAGRAM_ACKED)) { + if (tp1->sent == SCTP_FORWARD_TSN_SKIP) { /* advance PeerAckPoint goes forward */ if (compare_with_wrap(tp1->rec.data.TSN_seq, asoc->advanced_peer_ack_point, @@ -3905,7 +3909,7 @@ sctp_express_handle_sack(struct sctp_tcb } else if (asoc->last_acked_seq == cumack) { /* Window update sack */ asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); + (uint32_t) (asoc->total_flight + (asoc->total_flight_count * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { /* SWS sender side engages */ asoc->peers_rwnd = 0; @@ -4189,7 +4193,7 @@ sctp_express_handle_sack(struct sctp_tcb } /* RWND update */ asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); + (uint32_t) (asoc->total_flight + (asoc->total_flight_count * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { /* SWS sender side engages */ asoc->peers_rwnd = 0; @@ -4404,10 +4408,8 @@ again: asoc->nonce_resync_tsn = asoc->advanced_peer_ack_point; } else if (lchk) { /* try to FR fwd-tsn's that get lost too */ - lchk->rec.data.fwd_tsn_cnt++; - if (lchk->rec.data.fwd_tsn_cnt > 3) { + if (lchk->rec.data.fwd_tsn_cnt >= 3) { send_forward_tsn(stcb, asoc); - lchk->rec.data.fwd_tsn_cnt = 0; } } } @@ -5188,10 +5190,10 @@ done_with_it: /* Adjust and set the new rwnd value */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd_set(SCTP_SET_PEER_RWND_VIA_SACK, - asoc->peers_rwnd, asoc->total_flight, (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)), a_rwnd); + asoc->peers_rwnd, asoc->total_flight, (asoc->total_flight_count * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)), a_rwnd); } asoc->peers_rwnd = sctp_sbspace_sub(a_rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); + (uint32_t) (asoc->total_flight + (asoc->total_flight_count * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { /* SWS sender side engages */ asoc->peers_rwnd = 0; @@ -5314,6 +5316,7 @@ again: } if (compare_with_wrap(asoc->advanced_peer_ack_point, old_adv_peer_ack_point, MAX_TSN)) { + send_forward_tsn(stcb, asoc); /* * ECN Nonce: Disable Nonce Sum check when @@ -5323,10 +5326,8 @@ again: asoc->nonce_resync_tsn = asoc->advanced_peer_ack_point; } else if (lchk) { /* try to FR fwd-tsn's that get lost too */ - lchk->rec.data.fwd_tsn_cnt++; - if (lchk->rec.data.fwd_tsn_cnt > 3) { + if (lchk->rec.data.fwd_tsn_cnt >= 3) { send_forward_tsn(stcb, asoc); - lchk->rec.data.fwd_tsn_cnt = 0; } } } Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Jul 29 09:20:08 2010 (r210598) +++ head/sys/netinet/sctp_output.c Thu Jul 29 11:37:04 2010 (r210599) @@ -6579,6 +6579,8 @@ sctp_clean_up_ctl(struct sctp_tcb *stcb, chk->data = NULL; } asoc->ctrl_queue_cnt--; + if (chk->rec.chunk_id.id == SCTP_FORWARD_CUM_TSN) + asoc->fwd_tsn_cnt--; sctp_free_a_chunk(stcb, chk); } else if (chk->rec.chunk_id.id == SCTP_STREAM_RESET) { /* special handling, we must look into the param */ @@ -7799,7 +7801,7 @@ again_one_more_time: } else omtu = 0; /* Here we do NOT factor the r_mtu */ - if ((chk->send_size < (int)(mtu - omtu)) || + if ((chk->send_size <= (int)(mtu - omtu)) || (chk->flags & CHUNK_FLAGS_FRAGMENT_OK)) { /* * We probably should glom the mbuf chain @@ -9704,6 +9706,7 @@ send_forward_tsn(struct sctp_tcb *stcb, if (chk == NULL) { return; } + asoc->fwd_tsn_cnt++; chk->copy_by_ref = 0; chk->rec.chunk_id.id = SCTP_FORWARD_CUM_TSN; chk->rec.chunk_id.can_take_data = 0; @@ -9735,8 +9738,8 @@ sctp_fill_in_rest: unsigned int cnt_of_skipped = 0; TAILQ_FOREACH(at, &asoc->sent_queue, sctp_next) { - if ((at->sent != SCTP_FORWARD_TSN_SKIP) && - (at->sent != SCTP_DATAGRAM_ACKED)) { + if ((at->sent != SCTP_FORWARD_TSN_SKIP) /* && (at->sent != + SCTP_DATAGRAM_ACKED) */ ) { /* no more to look at */ break; } Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Thu Jul 29 09:20:08 2010 (r210598) +++ head/sys/netinet/sctp_structs.h Thu Jul 29 11:37:04 2010 (r210599) @@ -869,6 +869,7 @@ struct sctp_association { unsigned int size_on_reasm_queue; unsigned int cnt_on_reasm_queue; + unsigned int fwd_tsn_cnt; /* amount of data (bytes) currently in flight (on all destinations) */ unsigned int total_flight; /* Total book size in flight */ Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Thu Jul 29 09:20:08 2010 (r210598) +++ head/sys/netinet/sctp_timer.c Thu Jul 29 11:37:04 2010 (r210599) @@ -545,7 +545,7 @@ static void sctp_backoff_on_timeout(struct sctp_tcb *stcb, struct sctp_nets *net, int win_probe, - int num_marked) + int num_marked, int num_abandoned) { if (net->RTO == 0) { net->RTO = stcb->asoc.minrto; @@ -554,7 +554,7 @@ sctp_backoff_on_timeout(struct sctp_tcb if (net->RTO > stcb->asoc.maxrto) { net->RTO = stcb->asoc.maxrto; } - if ((win_probe == 0) && num_marked) { + if ((win_probe == 0) && (num_marked || num_abandoned)) { /* We don't apply penalty to window probe scenarios */ /* JRS - Use the congestion control given in the CC module */ stcb->asoc.cc_functions.sctp_cwnd_update_after_timeout(stcb, net); @@ -612,7 +612,8 @@ sctp_mark_all_for_resend(struct sctp_tcb struct sctp_nets *net, struct sctp_nets *alt, int window_probe, - int *num_marked) + int *num_marked, + int *num_abandoned) { /* @@ -621,10 +622,11 @@ sctp_mark_all_for_resend(struct sctp_tcb * We only mark chunks that have been outstanding long enough to * have received feed-back. */ - struct sctp_tmit_chunk *chk, *tp2, *could_be_sent = NULL; + struct sctp_tmit_chunk *chk, *tp2; struct sctp_nets *lnets; struct timeval now, min_wait, tv; int cur_rtt; + int cnt_abandoned; int audit_tf, num_mk, fir; unsigned int cnt_mk; uint32_t orig_flight, orig_tf; @@ -680,6 +682,7 @@ sctp_mark_all_for_resend(struct sctp_tcb net->fast_retran_ip = 0; /* Now on to each chunk */ + cnt_abandoned = 0; num_mk = cnt_mk = 0; tsnfirst = tsnlast = 0; #ifndef INVARIANTS @@ -768,6 +771,7 @@ start_again: chk, (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), SCTP_SO_NOT_LOCKED); + cnt_abandoned++; } continue; } @@ -780,6 +784,7 @@ start_again: chk, (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), SCTP_SO_NOT_LOCKED); + cnt_abandoned++; } continue; } @@ -841,9 +846,11 @@ start_again: if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 1) { chk->no_fr_allowed = 1; } +#ifdef THIS_SHOULD_NOT_BE_DONE } else if (chk->sent == SCTP_DATAGRAM_ACKED) { /* remember highest acked one */ could_be_sent = chk; +#endif } if (chk->sent == SCTP_DATAGRAM_RESEND) { cnt_mk++; @@ -870,6 +877,7 @@ start_again: } #endif *num_marked = num_mk; + *num_abandoned = cnt_abandoned; /* * Now check for a ECN Echo that may be stranded And include the * cnt_mk'd to have all resends in the control queue. @@ -890,12 +898,14 @@ start_again: atomic_add_int(&alt->ref_count, 1); } } +#ifdef THIS_SHOULD_NOT_BE_DONE if ((stcb->asoc.sent_queue_retran_cnt == 0) && (could_be_sent)) { /* fix it so we retransmit the highest acked anyway */ sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); cnt_mk++; could_be_sent->sent = SCTP_DATAGRAM_RESEND; } +#endif if (stcb->asoc.sent_queue_retran_cnt != cnt_mk) { #ifdef INVARIANTS SCTP_PRINTF("Local Audit says there are %d for retran asoc cnt:%d we marked:%d this time\n", @@ -996,7 +1006,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, struct sctp_nets *net) { struct sctp_nets *alt; - int win_probe, num_mk; + int win_probe, num_mk, num_abandoned; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { sctp_log_fr(0, 0, 0, SCTP_FR_T3_TIMEOUT); @@ -1055,8 +1065,10 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, } else { /* CMT is OFF */ alt = sctp_find_alternate_net(stcb, net, 0); } - - (void)sctp_mark_all_for_resend(stcb, net, alt, win_probe, &num_mk); + num_mk = 0; + num_abandoned = 0; + (void)sctp_mark_all_for_resend(stcb, net, alt, win_probe, + &num_mk, &num_abandoned); /* FR Loss recovery just ended with the T3. */ stcb->asoc.fast_retran_loss_recovery = 0; @@ -1070,7 +1082,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, stcb->asoc.sat_t3_recovery_tsn = stcb->asoc.sending_seq; /* Backoff the timer and cwnd */ - sctp_backoff_on_timeout(stcb, net, win_probe, num_mk); + sctp_backoff_on_timeout(stcb, net, win_probe, num_mk, num_abandoned); if (win_probe == 0) { /* We don't do normal threshold management on window probes */ if (sctp_threshold_management(inp, stcb, net, @@ -1221,7 +1233,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp return (1); } stcb->asoc.dropped_special_cnt = 0; - sctp_backoff_on_timeout(stcb, stcb->asoc.primary_destination, 1, 0); + sctp_backoff_on_timeout(stcb, stcb->asoc.primary_destination, 1, 0, 0); if (stcb->asoc.initial_init_rto_max < net->RTO) { net->RTO = stcb->asoc.initial_init_rto_max; } @@ -1302,7 +1314,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp * an alternate */ stcb->asoc.dropped_special_cnt = 0; - sctp_backoff_on_timeout(stcb, cookie->whoTo, 1, 0); + sctp_backoff_on_timeout(stcb, cookie->whoTo, 1, 0, 0); alt = sctp_find_alternate_net(stcb, cookie->whoTo, 0); if (alt != cookie->whoTo) { sctp_free_remote_addr(cookie->whoTo); @@ -1347,7 +1359,7 @@ sctp_strreset_timer(struct sctp_inpcb *i * cleared theshold management now lets backoff the address & select * an alternate */ - sctp_backoff_on_timeout(stcb, strrst->whoTo, 1, 0); + sctp_backoff_on_timeout(stcb, strrst->whoTo, 1, 0, 0); alt = sctp_find_alternate_net(stcb, strrst->whoTo, 0); sctp_free_remote_addr(strrst->whoTo); strrst->whoTo = alt; @@ -1426,7 +1438,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp * cleared threshold management, so now backoff the net and * select an alternate */ - sctp_backoff_on_timeout(stcb, asconf->whoTo, 1, 0); + sctp_backoff_on_timeout(stcb, asconf->whoTo, 1, 0, 0); alt = sctp_find_alternate_net(stcb, asconf->whoTo, 0); if (asconf->whoTo != alt) { sctp_free_remote_addr(asconf->whoTo); @@ -1643,7 +1655,7 @@ sctp_heartbeat_timer(struct sctp_inpcb * net->ro._s_addr = NULL; net->src_addr_selected = 0; } - sctp_backoff_on_timeout(stcb, net, 1, 0); + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); } /* Zero PBA, if it needs it */ if (net->partial_bytes_acked) { From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 12:02:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67293106567D; Thu, 29 Jul 2010 12:02:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C72F8FC1D; Thu, 29 Jul 2010 12:02:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TC20M0033691; Thu, 29 Jul 2010 12:02:00 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TC20Oh033689; Thu, 29 Jul 2010 12:02:00 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201007291202.o6TC20Oh033689@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Jul 2010 12:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210600 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 12:02:00 -0000 Author: rrs Date: Thu Jul 29 12:01:59 2010 New Revision: 210600 URL: http://svn.freebsd.org/changeset/base/210600 Log: Fix the comment block that has the nice table to really have the nice table :-) MFC after: 1 month Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Jul 29 11:37:04 2010 (r210599) +++ head/sys/netinet/sctp_output.c Thu Jul 29 12:01:59 2010 (r210600) @@ -2186,21 +2186,31 @@ sctp_is_ifa_addr_preferred(struct sctp_i /* dest_is_priv is true if destination is a private address */ /* dest_is_loop is true if destination is a loopback addresses */ - /* + /** * Here we determine if its a preferred address. A preferred address * means it is the same scope or higher scope then the destination. * L = loopback, P = private, G = global - * ----------------------------------------- src | dest | result - * ---------------------------------------- L | L | yes - * ----------------------------------------- P | L | - * yes-v4 no-v6 ----------------------------------------- G | - * L | yes-v4 no-v6 ----------------------------------------- L - * | P | no ----------------------------------------- P | - * P | yes ----------------------------------------- G | - * P | no ----------------------------------------- L | G - * | no ----------------------------------------- P | G | - * no ----------------------------------------- G | G | - * yes ----------------------------------------- + * ----------------------------------------- + * src | dest | result + * ---------------------------------------- + * L | L | yes + * ----------------------------------------- + * P | L | yes-v4 no-v6 + * ----------------------------------------- + * G | L | yes-v4 no-v6 + * ----------------------------------------- + * L | P | no + * ----------------------------------------- + * P | P | yes + * ----------------------------------------- + * G | P | no + * ----------------------------------------- + * L | G | no + * ----------------------------------------- + * P | G | no + * ----------------------------------------- + * G | G | yes + * ----------------------------------------- */ if (ifa->address.sa.sa_family != fam) { From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 12:08:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6D1F1065690; Thu, 29 Jul 2010 12:08:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B46638FC17; Thu, 29 Jul 2010 12:08:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TC8k7R035225; Thu, 29 Jul 2010 12:08:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TC8kIb035205; Thu, 29 Jul 2010 12:08:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007291208.o6TC8kIb035205@svn.freebsd.org> From: Alexander Motin Date: Thu, 29 Jul 2010 12:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210601 - in head/sys: conf sparc64/include sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 12:08:46 -0000 Author: mav Date: Thu Jul 29 12:08:46 2010 New Revision: 210601 URL: http://svn.freebsd.org/changeset/base/210601 Log: Adapt sparc64 and sun4v timer code for the new event timers infrastructure. Reviewed by: marius@ Modified: head/sys/conf/files.sparc64 head/sys/conf/files.sun4v head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/include/pcpu.h head/sys/sparc64/include/smp.h head/sys/sparc64/include/tick.h head/sys/sparc64/sparc64/clock.c head/sys/sparc64/sparc64/intr_machdep.c head/sys/sparc64/sparc64/mp_machdep.c head/sys/sparc64/sparc64/tick.c head/sys/sun4v/include/clock.h head/sys/sun4v/include/intr_machdep.h head/sys/sun4v/include/pcpu.h head/sys/sun4v/include/smp.h head/sys/sun4v/include/tick.h head/sys/sun4v/sun4v/clock.c head/sys/sun4v/sun4v/intr_machdep.c head/sys/sun4v/sun4v/mp_machdep.c head/sys/sun4v/sun4v/tick.c Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/conf/files.sparc64 Thu Jul 29 12:08:46 2010 (r210601) @@ -59,6 +59,7 @@ dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_sparc64.c optional uart dev/uart/uart_kbd_sun.c optional uart sc +kern/kern_clocksource.c standard kern/syscalls.c optional ktr libkern/ffs.c standard libkern/ffsl.c standard Modified: head/sys/conf/files.sun4v ============================================================================== --- head/sys/conf/files.sun4v Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/conf/files.sun4v Thu Jul 29 12:08:46 2010 (r210601) @@ -29,6 +29,7 @@ dev/ofw/openfirm.c standard dev/ofw/openfirmio.c standard dev/ofw/openpromio.c standard dev/uart/uart_cpu_sparc64.c optional uart +kern/kern_clocksource.c standard kern/syscalls.c optional ktr libkern/ffs.c standard libkern/ffsl.c standard Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/include/intr_machdep.h Thu Jul 29 12:08:46 2010 (r210601) @@ -46,6 +46,8 @@ #define PIL_AST 4 /* ast ipi */ #define PIL_STOP 5 /* stop cpu ipi */ #define PIL_PREEMPT 6 /* preempt idle thread cpu ipi */ +#define PIL_HARDCLOCK 7 /* hardclock broadcast */ +#define PIL_STATCLOCK 8 /* statclock broadcast */ #define PIL_FILTER 12 /* filter interrupts */ #define PIL_FAST 13 /* fast interrupts */ #define PIL_TICK 14 /* tick interrupts */ Modified: head/sys/sparc64/include/pcpu.h ============================================================================== --- head/sys/sparc64/include/pcpu.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/include/pcpu.h Thu Jul 29 12:08:46 2010 (r210601) @@ -53,6 +53,7 @@ struct pmap; vm_offset_t pc_addr; \ u_long pc_tickref; \ u_long pc_tickadj; \ + u_long pc_tickincrement; \ u_int pc_clock; \ u_int pc_impl; \ u_int pc_mid; \ Modified: head/sys/sparc64/include/smp.h ============================================================================== --- head/sys/sparc64/include/smp.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/include/smp.h Thu Jul 29 12:08:46 2010 (r210601) @@ -58,6 +58,8 @@ #define IPI_AST PIL_AST #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_PREEMPT PIL_PREEMPT +#define IPI_HARDCLOCK PIL_HARDCLOCK +#define IPI_STATCLOCK PIL_STATCLOCK #define IPI_STOP PIL_STOP #define IPI_STOP_HARD PIL_STOP Modified: head/sys/sparc64/include/tick.h ============================================================================== --- head/sys/sparc64/include/tick.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/include/tick.h Thu Jul 29 12:08:46 2010 (r210601) @@ -32,7 +32,6 @@ extern u_int hardclock_use_stick; void tick_clear(u_int cpu_impl); -void tick_start(void); void tick_stop(u_int cpu_impl); #endif Modified: head/sys/sparc64/sparc64/clock.c ============================================================================== --- head/sys/sparc64/sparc64/clock.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/sparc64/clock.c Thu Jul 29 12:08:46 2010 (r210601) @@ -81,14 +81,3 @@ delay_tick(int usec) sched_unpin(); } -void -cpu_startprofclock(void) -{ - -} - -void -cpu_stopprofclock(void) -{ - -} Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/sparc64/intr_machdep.c Thu Jul 29 12:08:46 2010 (r210601) @@ -96,7 +96,9 @@ static const char *const pil_names[] = { "ast", /* PIL_AST */ "stop", /* PIL_STOP */ "preempt", /* PIL_PREEMPT */ - "stray", "stray", "stray", "stray", "stray", + "hardclock", /* PIL_HARDCLOCK */ + "statclock", /* PIL_STATCLOCK */ + "stray", "stray", "stray", "filter", /* PIL_FILTER */ "fast", /* PIL_FAST */ "tick", /* PIL_TICK */ Modified: head/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/mp_machdep.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/sparc64/mp_machdep.c Thu Jul 29 12:08:46 2010 (r210601) @@ -96,7 +96,9 @@ __FBSDID("$FreeBSD$"); #define SUNW_STOPSELF "SUNW,stop-self" static ih_func_t cpu_ipi_ast; +static ih_func_t cpu_ipi_hardclock; static ih_func_t cpu_ipi_preempt; +static ih_func_t cpu_ipi_statclock; static ih_func_t cpu_ipi_stop; /* @@ -279,6 +281,8 @@ cpu_mp_start(void) -1, NULL, NULL); intr_setup(PIL_STOP, cpu_ipi_stop, -1, NULL, NULL); intr_setup(PIL_PREEMPT, cpu_ipi_preempt, -1, NULL, NULL); + intr_setup(PIL_HARDCLOCK, cpu_ipi_hardclock, -1, NULL, NULL); + intr_setup(PIL_STATCLOCK, cpu_ipi_statclock, -1, NULL, NULL); cpuid_to_mid[curcpu] = PCPU_GET(mid); @@ -437,9 +441,6 @@ cpu_mp_bootstrap(struct pcpu *pc) wrpr(pil, 0, PIL_TICK); wrpr(pstate, 0, PSTATE_KERNEL); - /* Start the (S)TICK interrupts. */ - tick_start(); - smp_cpus++; KASSERT(curthread != NULL, ("%s: curthread", __func__)); PCPU_SET(other_cpus, all_cpus & ~(1 << curcpu)); @@ -451,6 +452,9 @@ cpu_mp_bootstrap(struct pcpu *pc) while (csa->csa_count != 0) ; + /* Start per-CPU event timers. */ + cpu_initclocks_ap(); + /* Ok, now enter the scheduler. */ sched_throw(NULL); } @@ -508,6 +512,20 @@ cpu_ipi_preempt(struct trapframe *tf) } static void +cpu_ipi_hardclock(struct trapframe *tf) +{ + + hardclockintr(tf); +} + +static void +cpu_ipi_statclock(struct trapframe *tf) +{ + + statclockintr(tf); +} + +static void spitfire_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) { u_int cpu; Modified: head/sys/sparc64/sparc64/tick.c ============================================================================== --- head/sys/sparc64/sparc64/tick.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sparc64/sparc64/tick.c Thu Jul 29 12:08:46 2010 (r210601) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -48,9 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -/* 10000 ticks proved okay for 500MHz. */ -#define TICK_GRACE(clock) ((clock) / 1000000 * 2 * 10) - +#define STICK_QUALITY -500 #define TICK_QUALITY_MP 10 #define TICK_QUALITY_UP 1000 @@ -76,20 +75,25 @@ u_int hardclock_use_stick = 0; SYSCTL_INT(_machdep_tick, OID_AUTO, hardclock_use_stick, CTLFLAG_RD, &hardclock_use_stick, 0, "hardclock uses STICK instead of TICK timer"); +static struct timecounter stick_tc; static struct timecounter tick_tc; -static u_long tick_increment; +static struct eventtimer tick_et; static uint64_t tick_cputicks(void); +static timecounter_get_t stick_get_timecount; static timecounter_get_t tick_get_timecount_up; #ifdef SMP static timecounter_get_t tick_get_timecount_mp; #endif -static void tick_hardclock(struct trapframe *tf); -static void tick_hardclock_bbwar(struct trapframe *tf); +static int tick_et_start(struct eventtimer *et, + struct bintime *first, struct bintime *period); +static int tick_et_stop(struct eventtimer *et); +static void tick_intr(struct trapframe *tf); +static void tick_intr_bbwar(struct trapframe *tf); static inline void tick_hardclock_common(struct trapframe *tf, u_long tick, u_long adj); static inline void tick_process(struct trapframe *tf); -static void stick_hardclock(struct trapframe *tf); +static void stick_intr(struct trapframe *tf); static uint64_t tick_cputicks(void) @@ -101,39 +105,34 @@ tick_cputicks(void) void cpu_initclocks(void) { - uint32_t clock; - - stathz = hz; + uint32_t clock, sclock; + clock = PCPU_GET(clock); + sclock = 0; + if (PCPU_GET(impl) == CPU_IMPL_SPARC64V || + PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCIII) { + if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", + &sclock, sizeof(sclock)) == -1) { + panic("%s: could not determine STICK frequency", + __func__); + } + } /* * Given that the STICK timers typically are driven at rather low * frequencies they shouldn't be used except when really necessary. */ if (hardclock_use_stick != 0) { - if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", - &clock, sizeof(clock)) == -1) - panic("%s: could not determine STICK frequency", __func__); - intr_setup(PIL_TICK, stick_hardclock, -1, NULL, NULL); + intr_setup(PIL_TICK, stick_intr, -1, NULL, NULL); /* * We don't provide a CPU ticker as long as the frequency * supplied isn't actually used per-CPU. */ } else { - clock = PCPU_GET(clock); intr_setup(PIL_TICK, PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCI && PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? - tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); + tick_intr_bbwar : tick_intr, -1, NULL, NULL); set_cputicker(tick_cputicks, clock, 0); } - tick_increment = clock / hz; - /* - * Avoid stopping of hardclock in terms of a lost (S)TICK interrupt - * by ensuring that the (S)TICK period is at least TICK_GRACE ticks. - */ - if (tick_increment < TICK_GRACE(clock)) - panic("%s: HZ too high, decrease to at least %d", - __func__, clock / TICK_GRACE(clock)); - tick_start(); /* * Initialize the TICK-based timecounter. This must not happen @@ -142,7 +141,7 @@ cpu_initclocks(void) tick_tc.tc_get_timecount = tick_get_timecount_up; tick_tc.tc_poll_pps = NULL; tick_tc.tc_counter_mask = ~0u; - tick_tc.tc_frequency = PCPU_GET(clock); + tick_tc.tc_frequency = clock; tick_tc.tc_name = "tick"; tick_tc.tc_quality = TICK_QUALITY_UP; tick_tc.tc_priv = NULL; @@ -161,19 +160,46 @@ cpu_initclocks(void) } #endif tc_init(&tick_tc); + if (sclock != 0) { + stick_tc.tc_get_timecount = stick_get_timecount; + stick_tc.tc_poll_pps = NULL; + stick_tc.tc_counter_mask = ~0u; + stick_tc.tc_frequency = sclock; + stick_tc.tc_name = "stick"; + stick_tc.tc_quality = STICK_QUALITY; + stick_tc.tc_priv = NULL; + tc_init(&stick_tc); + } + tick_et.et_name = hardclock_use_stick ? "stick" : "tick"; + tick_et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | + ET_FLAGS_PERCPU; + tick_et.et_quality = 1000; + tick_et.et_frequency = hardclock_use_stick ? sclock : clock; + tick_et.et_min_period.sec = 0; + tick_et.et_min_period.frac = 0x00010000LLU << 32; /* To be safe. */ + tick_et.et_max_period.sec = 3600 * 24; /* No practical limit. */ + tick_et.et_max_period.frac = 0; + tick_et.et_start = tick_et_start; + tick_et.et_stop = tick_et_stop; + tick_et.et_priv = NULL; + et_register(&tick_et); + + cpu_initclocks_bsp(); } static inline void tick_process(struct trapframe *tf) { + struct trapframe *oldframe; + struct thread *td; - if (curcpu == 0) - hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - else - hardclock_cpu(TRAPF_USERMODE(tf)); - if (profprocs != 0) - profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - statclock(TRAPF_USERMODE(tf)); + if (tick_et.et_active) { + td = curthread; + oldframe = td->td_intr_frame; + td->td_intr_frame = tf; + tick_et.et_event_cb(&tick_et, tick_et.et_arg); + td->td_intr_frame = oldframe; + } } /* @@ -184,48 +210,60 @@ tick_process(struct trapframe *tf) */ static void -tick_hardclock(struct trapframe *tf) +tick_intr(struct trapframe *tf) { - u_long adj, tick; + u_long adj, tick, tick_increment; register_t s; critical_enter(); adj = PCPU_GET(tickadj); + tick_increment = PCPU_GET(tickincrement); s = intr_disable(); tick = rd(tick); - wr(tick_cmpr, tick + tick_increment - adj, 0); + if (tick_increment != 0) + wr(tick_cmpr, tick + tick_increment - adj, 0); + else + wr(tick_cmpr, 1L << 63, 0); intr_restore(s); tick_hardclock_common(tf, tick, adj); critical_exit(); } static void -tick_hardclock_bbwar(struct trapframe *tf) +tick_intr_bbwar(struct trapframe *tf) { - u_long adj, tick; + u_long adj, tick, tick_increment; register_t s; critical_enter(); adj = PCPU_GET(tickadj); + tick_increment = PCPU_GET(tickincrement); s = intr_disable(); tick = rd(tick); - wrtickcmpr(tick + tick_increment - adj, 0); + if (tick_increment != 0) + wrtickcmpr(tick + tick_increment - adj, 0); + else + wrtickcmpr(1L << 63, 0); intr_restore(s); tick_hardclock_common(tf, tick, adj); critical_exit(); } static void -stick_hardclock(struct trapframe *tf) +stick_intr(struct trapframe *tf) { - u_long adj, stick; + u_long adj, stick, tick_increment; register_t s; critical_enter(); adj = PCPU_GET(tickadj); + tick_increment = PCPU_GET(tickincrement); s = intr_disable(); stick = rdstick(); - wrstickcmpr(stick + tick_increment - adj, 0); + if (tick_increment != 0) + wrstickcmpr(stick + tick_increment - adj, 0); + else + wrstickcmpr(1L << 63, 0); intr_restore(s); tick_hardclock_common(tf, stick, adj); critical_exit(); @@ -234,10 +272,11 @@ stick_hardclock(struct trapframe *tf) static inline void tick_hardclock_common(struct trapframe *tf, u_long tick, u_long adj) { - u_long ref; + u_long ref, tick_increment; long delta; int count; + tick_increment = PCPU_GET(tickincrement); ref = PCPU_GET(tickref); delta = tick - ref; count = 0; @@ -248,6 +287,8 @@ tick_hardclock_common(struct trapframe * if (adj != 0) adjust_ticks++; count++; + if (tick_increment == 0) + break; } if (count > 0) { adjust_missed += count - 1; @@ -266,6 +307,13 @@ tick_hardclock_common(struct trapframe * } static u_int +stick_get_timecount(struct timecounter *tc) +{ + + return ((u_int)rdstick()); +} + +static u_int tick_get_timecount_up(struct timecounter *tc) { @@ -294,12 +342,28 @@ tick_get_timecount_mp(struct timecounter } #endif -void -tick_start(void) +static int +tick_et_start(struct eventtimer *et, + struct bintime *first, struct bintime *period) { + u_long fdiv, div; u_long base; register_t s; + if (period != NULL) { + div = (tick_et.et_frequency * (period->frac >> 32)) >> 32; + if (period->sec != 0) + div += tick_et.et_frequency * period->sec; + } else + div = 0; + if (first != NULL) { + fdiv = (tick_et.et_frequency * (first->frac >> 32)) >> 32; + if (first->sec != 0) + fdiv += tick_et.et_frequency * first->sec; + } else + fdiv = div; + PCPU_SET(tickincrement, div); + /* * Try to make the (S)TICK interrupts as synchronously as possible * on all CPUs to avoid inaccuracies for migrating processes. Leave @@ -312,14 +376,25 @@ tick_start(void) base = rdstick(); else base = rd(tick); - base = roundup(base, tick_increment); + if (div != 0) + base = roundup(base, div); PCPU_SET(tickref, base); if (hardclock_use_stick != 0) - wrstickcmpr(base + tick_increment, 0); + wrstickcmpr(base + fdiv, 0); else - wrtickcmpr(base + tick_increment, 0); + wrtickcmpr(base + fdiv, 0); intr_restore(s); critical_exit(); + return (0); +} + +static int +tick_et_stop(struct eventtimer *et) +{ + + PCPU_SET(tickincrement, 0); + tick_stop(PCPU_GET(impl)); + return (0); } void Modified: head/sys/sun4v/include/clock.h ============================================================================== --- head/sys/sun4v/include/clock.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/include/clock.h Thu Jul 29 12:08:46 2010 (r210601) @@ -29,7 +29,6 @@ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ -extern u_long tick_increment; extern u_long tick_freq; extern u_long tick_MHz; Modified: head/sys/sun4v/include/intr_machdep.h ============================================================================== --- head/sys/sun4v/include/intr_machdep.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/include/intr_machdep.h Thu Jul 29 12:08:46 2010 (r210601) @@ -46,6 +46,8 @@ #define PIL_AST 4 /* ast ipi */ #define PIL_STOP 5 /* stop cpu ipi */ #define PIL_PREEMPT 6 /* preempt idle thread cpu ipi */ +#define PIL_HARDCLOCK 7 /* hardclock broadcast */ +#define PIL_STATCLOCK 8 /* statclock broadcast */ #define PIL_FAST 13 /* fast interrupts */ #define PIL_TICK 14 Modified: head/sys/sun4v/include/pcpu.h ============================================================================== --- head/sys/sun4v/include/pcpu.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/include/pcpu.h Thu Jul 29 12:08:46 2010 (r210601) @@ -73,6 +73,7 @@ struct pmap; uint64_t pc_nrq_size; \ u_long pc_tickref; \ u_long pc_tickadj; \ + u_long pc_tickincrement; \ struct rwindow pc_kwbuf; \ u_long pc_kwbuf_sp; \ u_int pc_kwbuf_full; \ Modified: head/sys/sun4v/include/smp.h ============================================================================== --- head/sys/sun4v/include/smp.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/include/smp.h Thu Jul 29 12:08:46 2010 (r210601) @@ -46,7 +46,8 @@ #define IPI_STOP PIL_STOP #define IPI_STOP_HARD PIL_STOP #define IPI_PREEMPT PIL_PREEMPT - +#define IPI_HARDCLOCK PIL_HARDCLOCK +#define IPI_STATCLOCK PIL_STATCLOCK #define IPI_RETRIES 5000 @@ -81,6 +82,8 @@ void cpu_ipi_send(u_int mid, u_long d0, void cpu_ipi_ast(struct trapframe *tf); void cpu_ipi_stop(struct trapframe *tf); void cpu_ipi_preempt(struct trapframe *tf); +void cpu_ipi_hardclock(struct trapframe *tf); +void cpu_ipi_statclock(struct trapframe *tf); void ipi_selected(u_int cpus, u_int ipi); void ipi_all_but_self(u_int ipi); Modified: head/sys/sun4v/include/tick.h ============================================================================== --- head/sys/sun4v/include/tick.h Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/include/tick.h Thu Jul 29 12:08:46 2010 (r210601) @@ -30,7 +30,5 @@ #define _MACHINE_TICK_H_ void tick_init(u_long clock); -void tick_start(void); -void tick_stop(void); #endif Modified: head/sys/sun4v/sun4v/clock.c ============================================================================== --- head/sys/sun4v/sun4v/clock.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/sun4v/clock.c Thu Jul 29 12:08:46 2010 (r210601) @@ -30,7 +30,6 @@ #include #include -u_long tick_increment; u_long tick_freq; u_long tick_MHz; @@ -46,13 +45,3 @@ DELAY(int n) while (rd(tick) < end) ; } - -void -cpu_startprofclock(void) -{ -} - -void -cpu_stopprofclock(void) -{ -} Modified: head/sys/sun4v/sun4v/intr_machdep.c ============================================================================== --- head/sys/sun4v/sun4v/intr_machdep.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/sun4v/intr_machdep.c Thu Jul 29 12:08:46 2010 (r210601) @@ -109,7 +109,9 @@ static char *pil_names[] = { "ast", /* PIL_AST */ "stop", /* PIL_STOP */ "preempt", /* PIL_PREEMPT */ - "stray", "stray", "stray", "stray", "stray", "stray", + "hardclock", /* PIL_HARDCLOCK */ + "statclock", /* PIL_STATCLOCK */ + "stray", "stray", "stray", "stray", "fast", /* PIL_FAST */ "tick", /* PIL_TICK */ }; @@ -262,6 +264,8 @@ intr_init(void) intr_handlers[PIL_RENDEZVOUS] = (ih_func_t *)smp_rendezvous_action; intr_handlers[PIL_STOP]= cpu_ipi_stop; intr_handlers[PIL_PREEMPT]= cpu_ipi_preempt; + intr_handlers[PIL_HARDCLOCK]= cpu_ipi_hardclock; + intr_handlers[PIL_STATCLOCK]= cpu_ipi_statclock; #endif mtx_init(&intr_table_lock, "intr table", NULL, MTX_SPIN); cpu_intrq_alloc(); Modified: head/sys/sun4v/sun4v/mp_machdep.c ============================================================================== --- head/sys/sun4v/sun4v/mp_machdep.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/sun4v/mp_machdep.c Thu Jul 29 12:08:46 2010 (r210601) @@ -392,7 +392,6 @@ cpu_mp_bootstrap(struct pcpu *pc) tte_hash_set_scratchpad_kernel(kernel_pmap->pm_hash); trap_init(); cpu_intrq_init(); - tick_start(); #ifdef TRAP_TRACING mp_trap_trace_init(); @@ -413,6 +412,10 @@ cpu_mp_bootstrap(struct pcpu *pc) while (csa->csa_count != 0) ; + + /* Start per-CPU event timers. */ + cpu_initclocks_ap(); + /* ok, now enter the scheduler */ sched_throw(NULL); } @@ -467,6 +470,20 @@ cpu_ipi_preempt(struct trapframe *tf) } void +cpu_ipi_hardclock(struct trapframe *tf) +{ + + hardclockintr(tf); +} + +void +cpu_ipi_statclock(struct trapframe *tf) +{ + + statclockintr(tf); +} + +void cpu_ipi_selected(int cpu_count, uint16_t *cpulist, u_long d0, u_long d1, u_long d2, uint64_t *ackmask) { Modified: head/sys/sun4v/sun4v/tick.c ============================================================================== --- head/sys/sun4v/sun4v/tick.c Thu Jul 29 12:01:59 2010 (r210600) +++ head/sys/sun4v/sun4v/tick.c Thu Jul 29 12:08:46 2010 (r210601) @@ -33,7 +33,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -46,8 +48,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#define TICK_GRACE 10000 - SYSCTL_NODE(_machdep, OID_AUTO, tick, CTLFLAG_RD, 0, "tick statistics"); static int adjust_edges = 0; @@ -66,7 +66,12 @@ static int adjust_ticks = 0; SYSCTL_INT(_machdep_tick, OID_AUTO, adjust_ticks, CTLFLAG_RD, &adjust_ticks, 0, "total number of tick interrupts with adjustment"); -static void tick_hardclock(struct trapframe *); +static struct eventtimer tick_et; + +static int tick_et_start(struct eventtimer *et, + struct bintime *first, struct bintime *period); +static int tick_et_stop(struct eventtimer *et); +static void tick_intr(struct trapframe *); static uint64_t tick_cputicks(void) @@ -79,28 +84,44 @@ void cpu_initclocks(void) { - stathz = hz; - tick_start(); + intr_setup(PIL_TICK, tick_intr, -1, NULL, NULL); + + tick_et.et_name = "tick"; + tick_et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | + ET_FLAGS_PERCPU; + tick_et.et_quality = 1000; + tick_et.et_frequency = tick_freq; + tick_et.et_min_period.sec = 0; + tick_et.et_min_period.frac = 0x00010000LLU << 32; /* To be safe. */ + tick_et.et_max_period.sec = 3600 * 24; /* No practical limit. */ + tick_et.et_max_period.frac = 0; + tick_et.et_start = tick_et_start; + tick_et.et_stop = tick_et_stop; + tick_et.et_priv = NULL; + et_register(&tick_et); + + cpu_initclocks_bsp(); } static __inline void tick_process(struct trapframe *tf) { + struct trapframe *oldframe; + struct thread *td; - if (curcpu == 0) - hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - else - hardclock_cpu(TRAPF_USERMODE(tf)); - if (profprocs != 0) - profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - - statclock(TRAPF_USERMODE(tf)); + if (tick_et.et_active) { + td = curthread; + oldframe = td->td_intr_frame; + td->td_intr_frame = tf; + tick_et.et_event_cb(&tick_et, tick_et.et_arg); + td->td_intr_frame = oldframe; + } } static void -tick_hardclock(struct trapframe *tf) +tick_intr(struct trapframe *tf) { - u_long adj, s, tick, ref; + u_long adj, ref, s, tick, tick_increment; long delta; int count; @@ -108,6 +129,7 @@ tick_hardclock(struct trapframe *tf) if (curthread->td_critnest > 2 || curthread->td_critnest < 1) panic("nested hardclock %d\n", curthread->td_critnest); #endif + tick_increment = PCPU_GET(tickincrement); /* * The sequence of reading the TICK register, calculating the value * of the next tick and writing it to the TICK_CMPR register must not @@ -118,7 +140,10 @@ tick_hardclock(struct trapframe *tf) adj = PCPU_GET(tickadj); s = intr_disable_all(); tick = rd(tick); - wrtickcmpr(tick + tick_increment - adj, 0); + if (tick_increment != 0) + wrtickcmpr(tick + tick_increment - adj, 0); + else + wrtickcmpr(1L << 63, 0); intr_restore_all(s); ref = PCPU_GET(tickref); @@ -131,6 +156,8 @@ tick_hardclock(struct trapframe *tf) if (adj != 0) adjust_ticks++; count++; + if (tick_increment == 0) + break; } if (count > 0) { adjust_missed += count - 1; @@ -146,7 +173,6 @@ tick_hardclock(struct trapframe *tf) } PCPU_SET(tickref, ref); PCPU_SET(tickadj, adj); - } void @@ -155,41 +181,55 @@ tick_init(u_long clock) tick_freq = clock; tick_MHz = clock / 1000000; - tick_increment = clock / hz; - /* - * Avoid stopping of hardclock in terms of a lost tick interrupt - * by ensuring that the tick period is at least TICK_GRACE ticks. - */ - printf("tick_freq=%ld hz=%d tick_increment=%ld\n", - tick_freq, hz, tick_increment); - -#ifndef SIMULATOR - if (tick_increment < TICK_GRACE) - panic("%s: HZ too high, decrease to at least %ld", __func__, - clock / TICK_GRACE); -#endif set_cputicker(tick_cputicks, tick_freq, 0); } -void -tick_start(void) -{ - u_long base, s; - - if (curcpu == 0) - intr_setup(PIL_TICK, tick_hardclock, -1, NULL, NULL); +static int +tick_et_start(struct eventtimer *et, + struct bintime *first, struct bintime *period) +{ + u_long fdiv, div; + u_long base; + register_t s; + + if (period != NULL) { + div = (tick_et.et_frequency * (period->frac >> 32)) >> 32; + if (period->sec != 0) + div += tick_et.et_frequency * period->sec; + } else + div = 0; + if (first != NULL) { + fdiv = (tick_et.et_frequency * (first->frac >> 32)) >> 32; + if (first->sec != 0) + fdiv += tick_et.et_frequency * first->sec; + } else + fdiv = div; + PCPU_SET(tickincrement, div); /* * Try to make the tick interrupts as synchronously as possible on * all CPUs to avoid inaccuracies for migrating processes. Leave out * one tick to make sure that it is not missed. */ + critical_enter(); PCPU_SET(tickadj, 0); s = intr_disable_all(); base = rd(tick); - base = roundup(base, tick_increment); + if (div != 0) + base = roundup(base, div); PCPU_SET(tickref, base); - wrtickcmpr(base + tick_increment, 0); + wrtickcmpr(base + fdiv, 0); intr_restore_all(s); + critical_exit(); + return (0); +} + +static int +tick_et_stop(struct eventtimer *et) +{ + + PCPU_SET(tickincrement, 0); + wrtickcmpr(1L << 63, 0); + return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 12:20:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 220E0106566B; Thu, 29 Jul 2010 12:20:36 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id B453E8FC15; Thu, 29 Jul 2010 12:20:35 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id C8EEB35A83D; Thu, 29 Jul 2010 14:20:34 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id B3BEF172BD; Thu, 29 Jul 2010 14:20:34 +0200 (CEST) Date: Thu, 29 Jul 2010 14:20:34 +0200 From: Jilles Tjoelker To: Gabor Kovesdan Message-ID: <20100729122034.GA28899@stack.nl> References: <201007290011.o6T0BE0l072516@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007290011.o6T0BE0l072516@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 12:20:36 -0000 On Thu, Jul 29, 2010 at 12:11:14AM +0000, Gabor Kovesdan wrote: > Author: gabor > Date: Thu Jul 29 00:11:14 2010 > New Revision: 210578 > URL: http://svn.freebsd.org/changeset/base/210578 > Log: > - Some improvements on the exiting code, like replacing memcpy with > strlcpy/strcpy Hmm, I don't think this is an improvement :( If you know the length of the string, then memcpy() is usually the right function to use. I think this is clearer, and it is definitely more efficient. The strlcpy() function is for cases where the code does not know the length. The receiving buffer typically has a fixed length and overflow either leads to an error condition or silent truncation. (In the latter case, a security problem might still result.) Note that this is the reasoning of the glibc people why they do not want strlcat/strlcpy. I think these functions are acceptable but should be used with care, not as a panacea against all buffer overflows. > Modified: head/usr.bin/grep/fastgrep.c > ============================================================================== > --- head/usr.bin/grep/fastgrep.c Wed Jul 28 21:52:09 2010 (r210577) > +++ head/usr.bin/grep/fastgrep.c Thu Jul 29 00:11:14 2010 (r210578) > @@ -119,8 +119,7 @@ fastcomp(fastgrep_t *fg, const char *pat > * string respectively. > */ > fg->pattern = grep_malloc(fg->len + 1); > - memcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len); > - fg->pattern[fg->len] = '\0'; > + strlcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len + 1); > > /* Look for ways to cheat...er...avoid the full regex engine. */ > for (i = 0; i < fg->len; i++) { :( Note that this code may not be safe if fg->len comes from an untrusted user, as fg->len + 1 is 0 if fg->len == SIZE_MAX. This is not the case if fg->len is an actual length from strlen() or similar. > Modified: head/usr.bin/grep/grep.c > ============================================================================== > --- head/usr.bin/grep/grep.c Wed Jul 28 21:52:09 2010 (r210577) > +++ head/usr.bin/grep/grep.c Thu Jul 29 00:11:14 2010 (r210578) [snip] > @@ -234,32 +237,44 @@ add_pattern(char *pat, size_t len) > --len; > /* pat may not be NUL-terminated */ > pattern[patterns] = grep_malloc(len + 1); > - memcpy(pattern[patterns], pat, len); > - pattern[patterns][len] = '\0'; > + strlcpy(pattern[patterns], pat, len + 1); > ++patterns; > } :( Alternatively, consider strndup() here. > /* > - * Adds an include/exclude pattern to the internal array. > + * Adds a file include/exclude pattern to the internal array. > */ > static void > -add_epattern(char *pat, size_t len, int type, int mode) > +add_fpattern(const char *pat, int mode) > { > > /* Increase size if necessary */ > - if (epatterns == epattern_sz) { > - epattern_sz *= 2; > - epattern = grep_realloc(epattern, ++epattern_sz * > + if (fpatterns == fpattern_sz) { > + fpattern_sz *= 2; > + fpattern = grep_realloc(fpattern, ++fpattern_sz * > sizeof(struct epat)); > } > - if (len > 0 && pat[len - 1] == '\n') > - --len; > - epattern[epatterns].pat = grep_malloc(len + 1); > - memcpy(epattern[epatterns].pat, pat, len); > - epattern[epatterns].pat[len] = '\0'; > - epattern[epatterns].type = type; > - epattern[epatterns].mode = mode; > - ++epatterns; > + fpattern[fpatterns].pat = grep_strdup(pat); > + fpattern[fpatterns].mode = mode; > + ++fpatterns; > +} This part seems an improvement. The length came from strlen() anyway. > Modified: head/usr.bin/grep/queue.c > ============================================================================== > --- head/usr.bin/grep/queue.c Wed Jul 28 21:52:09 2010 (r210577) > +++ head/usr.bin/grep/queue.c Thu Jul 29 00:11:14 2010 (r210578) > @@ -60,7 +60,7 @@ enqueue(struct str *x) > item->data.len = x->len; > item->data.line_no = x->line_no; > item->data.off = x->off; > - memcpy(item->data.dat, x->dat, x->len); > + strcpy(item->data.dat, x->dat); > item->data.file = x->file; > > STAILQ_INSERT_TAIL(&queue, item, list); :( > Modified: head/usr.bin/grep/util.c > ============================================================================== > --- head/usr.bin/grep/util.c Wed Jul 28 21:52:09 2010 (r210577) > +++ head/usr.bin/grep/util.c Thu Jul 29 00:11:14 2010 (r210578) > @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -51,6 +52,45 @@ __FBSDID("$FreeBSD$"); > static int linesqueued; > static int procline(struct str *l, int); > > +bool > +file_matching(const char *fname) > +{ > + bool ret; > + > + ret = finclude ? false : true; > + > + for (unsigned int i = 0; i < fpatterns; ++i) { > + if (fnmatch(fpattern[i].pat, > + fname, 0) == 0 || fnmatch(fpattern[i].pat, > + basename(fname), 0) == 0) { > + if (fpattern[i].mode == EXCL_PAT) > + return (false); > + else > + ret = true; > + } > + } > + return (ret); > +} > + > +bool > +dir_matching(const char *dname) > +{ > + bool ret; > + > + ret = dinclude ? false : true; > + > + for (unsigned int i = 0; i < dpatterns; ++i) { > + if (dname != NULL && > + fnmatch(dname, dpattern[i].pat, 0) == 0) { > + if (dpattern[i].mode == EXCL_PAT) > + return (false); > + else > + ret = true; > + } > + } > + return (ret); > +} > + > /* > * Processes a directory when a recursive search is performed with > * the -R option. Each appropriate file is passed to procfile(). > @@ -61,7 +101,6 @@ grep_tree(char **argv) > FTS *fts; > FTSENT *p; > char *d, *dir = NULL; > - unsigned int i; > int c, fts_flags; > bool ok; > > @@ -102,30 +141,19 @@ grep_tree(char **argv) > default: > /* Check for file exclusion/inclusion */ > ok = true; > - if (exclflag) { > + if (dexclude || dinclude) { > if ((d = strrchr(p->fts_path, '/')) != NULL) { > dir = grep_malloc(sizeof(char) * > (d - p->fts_path + 2)); > strlcpy(dir, p->fts_path, > (d - p->fts_path + 1)); Why do the buffer sizes differ here? Also, this can be a memcpy plus a '\0' write instead of a strlcpy. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 13:46:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A706E106564A; Thu, 29 Jul 2010 13:46:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96B3A8FC0C; Thu, 29 Jul 2010 13:46:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TDkbZ9056764; Thu, 29 Jul 2010 13:46:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TDkbF5056762; Thu, 29 Jul 2010 13:46:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007291346.o6TDkbF5056762@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Jul 2010 13:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210604 - head/sys/dev/ipmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 13:46:37 -0000 Author: jhb Date: Thu Jul 29 13:46:37 2010 New Revision: 210604 URL: http://svn.freebsd.org/changeset/base/210604 Log: Fix test for double-nul characters that terminate the string table at the end of each SMBIOS/DMI structure. Submitted by: Dmitrij Tejblum @ yandex.ru MFC after: 3 days Modified: head/sys/dev/ipmi/ipmi_smbios.c Modified: head/sys/dev/ipmi/ipmi_smbios.c ============================================================================== --- head/sys/dev/ipmi/ipmi_smbios.c Thu Jul 29 13:34:40 2010 (r210603) +++ head/sys/dev/ipmi/ipmi_smbios.c Thu Jul 29 13:46:37 2010 (r210604) @@ -189,7 +189,7 @@ smbios_walk_table(uint8_t *p, int entrie * formatted area of this structure. */ p += s->length; - while (p[0] != 0 && p[1] != 0) + while (!(p[0] == 0 && p[1] == 0)) p++; /* From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 13:52:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2D081065677; Thu, 29 Jul 2010 13:52:46 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D24238FC08; Thu, 29 Jul 2010 13:52:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TDqkFY058136; Thu, 29 Jul 2010 13:52:46 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TDqkwQ058134; Thu, 29 Jul 2010 13:52:46 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007291352.o6TDqkwQ058134@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 13:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210605 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 13:52:47 -0000 Author: jchandra Date: Thu Jul 29 13:52:46 2010 New Revision: 210605 URL: http://svn.freebsd.org/changeset/base/210605 Log: Fix RQB_FFS for 64 bit, we need to use ffsl() for 64bit. Use 'ifdef __mips_n64' instead of 'if defined' to be consistant with other usage. Modified: head/sys/mips/include/runq.h Modified: head/sys/mips/include/runq.h ============================================================================== --- head/sys/mips/include/runq.h Thu Jul 29 13:46:37 2010 (r210604) +++ head/sys/mips/include/runq.h Thu Jul 29 13:52:46 2010 (r210605) @@ -30,7 +30,7 @@ #ifndef _MACHINE_RUNQ_H_ #define _MACHINE_RUNQ_H_ -#if defined(__mips_n64) +#ifdef __mips_n64 #define RQB_LEN (1) /* Number of priority status words. */ #define RQB_L2BPW (6) /* Log2(sizeof(rqb_word_t) * NBBY)). */ #else @@ -42,12 +42,16 @@ #define RQB_BIT(pri) (1ul << ((pri) & (RQB_BPW - 1))) #define RQB_WORD(pri) ((pri) >> RQB_L2BPW) +#ifdef __mips_n64 +#define RQB_FFS(word) (ffsl(word) - 1) +#else #define RQB_FFS(word) (ffs(word) - 1) +#endif /* * Type of run queue status word. */ -#if defined(__mips_n64) +#ifdef __mips_n64 typedef u_int64_t rqb_word_t; #else typedef u_int32_t rqb_word_t; From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 14:04:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C062C1065675; Thu, 29 Jul 2010 14:04:29 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF68B8FC14; Thu, 29 Jul 2010 14:04:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TE4Thu060809; Thu, 29 Jul 2010 14:04:29 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TE4TFV060806; Thu, 29 Jul 2010 14:04:29 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007291404.o6TE4TFV060806@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 14:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210606 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 14:04:29 -0000 Author: jchandra Date: Thu Jul 29 14:04:29 2010 New Revision: 210606 URL: http://svn.freebsd.org/changeset/base/210606 Log: Update MIPS _stdint.h for 64 bit. Initial 64 bit changes for profile.h. Modified: head/sys/mips/include/_stdint.h head/sys/mips/include/profile.h Modified: head/sys/mips/include/_stdint.h ============================================================================== --- head/sys/mips/include/_stdint.h Thu Jul 29 13:52:46 2010 (r210605) +++ head/sys/mips/include/_stdint.h Thu Jul 29 14:04:29 2010 (r210606) @@ -46,15 +46,28 @@ #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) +#ifdef __mips_n64 +#define INT64_C(c) (c ## L) +#else #define INT64_C(c) (c ## LL) +#endif #define UINT8_C(c) (c) #define UINT16_C(c) (c) #define UINT32_C(c) (c ## U) +#ifdef __mips_n64 +#define UINT64_C(c) (c ## UL) +#else #define UINT64_C(c) (c ## ULL) +#endif +#ifdef __mips_n64 +#define INTMAX_C(c) (c ## L) +#define UINTMAX_C(c) (c ## UL) +#else #define INTMAX_C(c) (c ## LL) #define UINTMAX_C(c) (c ## ULL) +#endif #endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ @@ -68,19 +81,19 @@ #define INT8_MIN (-0x7f-1) #define INT16_MIN (-0x7fff-1) #define INT32_MIN (-0x7fffffff-1) -#define INT64_MIN (-0x7fffffffffffffffLL-1) +#define INT64_MIN (-INTMAX_C(0x7fffffffffffffff)-1) /* Maximum values of exact-width signed integer types. */ #define INT8_MAX 0x7f #define INT16_MAX 0x7fff #define INT32_MAX 0x7fffffff -#define INT64_MAX 0x7fffffffffffffffLL +#define INT64_MAX INTMAX_C(0x7fffffffffffffff) /* Maximum values of exact-width unsigned integer types. */ #define UINT8_MAX 0xff #define UINT16_MAX 0xffff #define UINT32_MAX 0xffffffffU -#define UINT64_MAX 0xffffffffffffffffULL +#define UINT64_MAX UINTMAX_C(0xffffffffffffffff) /* * ISO/IEC 9899:1999 @@ -130,9 +143,15 @@ * ISO/IEC 9899:1999 * 7.18.2.4 Limits of integer types capable of holding object pointers */ +#ifdef __mips_n64 +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#else #define INTPTR_MIN INT32_MIN #define INTPTR_MAX INT32_MAX #define UINTPTR_MAX UINT32_MAX +#endif /* * ISO/IEC 9899:1999 @@ -147,15 +166,24 @@ * 7.18.3 Limits of other integer types */ /* Limits of ptrdiff_t. */ +#ifdef __mips_n64 +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#else #define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX +#endif /* Limits of sig_atomic_t. */ #define SIG_ATOMIC_MIN INT32_MIN #define SIG_ATOMIC_MAX INT32_MAX /* Limit of size_t. */ +#ifdef __mips_n64 +#define SIZE_MAX UINT64_MAX +#else #define SIZE_MAX UINT32_MAX +#endif #ifndef WCHAR_MIN /* Also possibly defined in */ /* Limits of wchar_t. */ Modified: head/sys/mips/include/profile.h ============================================================================== --- head/sys/mips/include/profile.h Thu Jul 29 13:52:46 2010 (r210605) +++ head/sys/mips/include/profile.h Thu Jul 29 14:04:29 2010 (r210606) @@ -115,7 +115,11 @@ void stopguprof __P((struct gmonparam *p #define FUNCTION_ALIGNMENT 4 -typedef unsigned int uintfptr_t; +#ifdef __mips_n64 +typedef u_long uintfptr_t; +#else +typedef u_int uintfptr_t; +#endif #endif /* _KERNEL */ @@ -123,7 +127,11 @@ typedef unsigned int uintfptr_t; * An unsigned integral type that can hold non-negative difference between * function pointers. */ +#ifdef __mips_n64 +typedef u_long fptrdiff_t; +#else typedef u_int fptrdiff_t; +#endif #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 14:23:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3C381065674; Thu, 29 Jul 2010 14:23:58 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0E7D8FC16; Thu, 29 Jul 2010 14:23:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TENwqp065223; Thu, 29 Jul 2010 14:23:58 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TENwS2065218; Thu, 29 Jul 2010 14:23:58 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201007291423.o6TENwS2065218@svn.freebsd.org> From: Alexander Leidinger Date: Thu, 29 Jul 2010 14:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210608 - stable/8/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 14:23:59 -0000 Author: netchild Date: Thu Jul 29 14:23:58 2010 New Revision: 210608 URL: http://svn.freebsd.org/changeset/base/210608 Log: MFC r200107,200109-200110,202364,202376,205678,207569: Merge linux emulation parts for video4linux support (requires a native v4l device, e.g. something which works with ports://multimedia/webcamd). Added: stable/8/sys/compat/linux/linux_videodev.h (contents, props changed) - copied, changed from r200109, head/sys/compat/linux/linux_videodev.h stable/8/sys/compat/linux/linux_videodev_compat.h - copied unchanged from r200110, head/sys/compat/linux/linux_videodev_compat.h Modified: stable/8/sys/compat/linux/linux_ioctl.c stable/8/sys/compat/linux/linux_ioctl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/8/sys/compat/linux/linux_ioctl.c Thu Jul 29 14:13:45 2010 (r210607) +++ stable/8/sys/compat/linux/linux_ioctl.c Thu Jul 29 14:23:58 2010 (r210608) @@ -78,6 +78,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); static linux_ioctl_function_t linux_ioctl_cdrom; @@ -91,6 +94,7 @@ static linux_ioctl_function_t linux_ioct static linux_ioctl_function_t linux_ioctl_private; static linux_ioctl_function_t linux_ioctl_drm; static linux_ioctl_function_t linux_ioctl_sg; +static linux_ioctl_function_t linux_ioctl_v4l; static linux_ioctl_function_t linux_ioctl_special; static struct linux_ioctl_handler cdrom_handler = @@ -115,6 +119,8 @@ static struct linux_ioctl_handler drm_ha { linux_ioctl_drm, LINUX_IOCTL_DRM_MIN, LINUX_IOCTL_DRM_MAX }; static struct linux_ioctl_handler sg_handler = { linux_ioctl_sg, LINUX_IOCTL_SG_MIN, LINUX_IOCTL_SG_MAX }; +static struct linux_ioctl_handler video_handler = +{ linux_ioctl_v4l, LINUX_IOCTL_VIDEO_MIN, LINUX_IOCTL_VIDEO_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, vfat_handler); @@ -127,6 +133,7 @@ DATA_SET(linux_ioctl_handler_set, termio DATA_SET(linux_ioctl_handler_set, private_handler); DATA_SET(linux_ioctl_handler_set, drm_handler); DATA_SET(linux_ioctl_handler_set, sg_handler); +DATA_SET(linux_ioctl_handler_set, video_handler); struct handler_element { @@ -136,7 +143,7 @@ struct handler_element }; static TAILQ_HEAD(, handler_element) handlers = - TAILQ_HEAD_INITIALIZER(handlers); + TAILQ_HEAD_INITIALIZER(handlers); static struct sx linux_ioctl_sx; SX_SYSINIT(linux_ioctl, &linux_ioctl_sx, "linux ioctl handlers"); @@ -2589,6 +2596,361 @@ linux_ioctl_sg(struct thread *td, struct } /* + * Video4Linux (V4L) ioctl handler + */ +static int +linux_to_bsd_v4l_tuner(struct l_video_tuner *lvt, struct video_tuner *vt) +{ + vt->tuner = lvt->tuner; + strlcpy(vt->name, lvt->name, LINUX_VIDEO_TUNER_NAME_SIZE); + vt->rangelow = lvt->rangelow; /* possible long size conversion */ + vt->rangehigh = lvt->rangehigh; /* possible long size conversion */ + vt->flags = lvt->flags; + vt->mode = lvt->mode; + vt->signal = lvt->signal; + return (0); +} + +static int +bsd_to_linux_v4l_tuner(struct video_tuner *vt, struct l_video_tuner *lvt) +{ + lvt->tuner = vt->tuner; + strlcpy(lvt->name, vt->name, LINUX_VIDEO_TUNER_NAME_SIZE); + lvt->rangelow = vt->rangelow; /* possible long size conversion */ + lvt->rangehigh = vt->rangehigh; /* possible long size conversion */ + lvt->flags = vt->flags; + lvt->mode = vt->mode; + lvt->signal = vt->signal; + return (0); +} + +#ifdef COMPAT_LINUX_V4L_CLIPLIST +static int +linux_to_bsd_v4l_clip(struct l_video_clip *lvc, struct video_clip *vc) +{ + vc->x = lvc->x; + vc->y = lvc->y; + vc->width = lvc->width; + vc->height = lvc->height; + vc->next = PTRIN(lvc->next); /* possible pointer size conversion */ + return (0); +} +#endif + +static int +linux_to_bsd_v4l_window(struct l_video_window *lvw, struct video_window *vw) +{ + vw->x = lvw->x; + vw->y = lvw->y; + vw->width = lvw->width; + vw->height = lvw->height; + vw->chromakey = lvw->chromakey; + vw->flags = lvw->flags; + vw->clips = PTRIN(lvw->clips); /* possible pointer size conversion */ + vw->clipcount = lvw->clipcount; + return (0); +} + +static int +bsd_to_linux_v4l_window(struct video_window *vw, struct l_video_window *lvw) +{ + lvw->x = vw->x; + lvw->y = vw->y; + lvw->width = vw->width; + lvw->height = vw->height; + lvw->chromakey = vw->chromakey; + lvw->flags = vw->flags; + lvw->clips = PTROUT(vw->clips); /* possible pointer size conversion */ + lvw->clipcount = vw->clipcount; + return (0); +} + +static int +linux_to_bsd_v4l_buffer(struct l_video_buffer *lvb, struct video_buffer *vb) +{ + vb->base = PTRIN(lvb->base); /* possible pointer size conversion */ + vb->height = lvb->height; + vb->width = lvb->width; + vb->depth = lvb->depth; + vb->bytesperline = lvb->bytesperline; + return (0); +} + +static int +bsd_to_linux_v4l_buffer(struct video_buffer *vb, struct l_video_buffer *lvb) +{ + lvb->base = PTROUT(vb->base); /* possible pointer size conversion */ + lvb->height = vb->height; + lvb->width = vb->width; + lvb->depth = vb->depth; + lvb->bytesperline = vb->bytesperline; + return (0); +} + +static int +linux_to_bsd_v4l_code(struct l_video_code *lvc, struct video_code *vc) +{ + strlcpy(vc->loadwhat, lvc->loadwhat, LINUX_VIDEO_CODE_LOADWHAT_SIZE); + vc->datasize = lvc->datasize; + vc->data = PTRIN(lvc->data); /* possible pointer size conversion */ + return (0); +} + +#ifdef COMPAT_LINUX_V4L_CLIPLIST +static int +linux_v4l_clip_copy(void *lvc, struct video_clip **ppvc) +{ + int error; + struct video_clip vclip; + struct l_video_clip l_vclip; + + error = copyin(lvc, &l_vclip, sizeof(l_vclip)); + if (error) return (error); + linux_to_bsd_v4l_clip(&l_vclip, &vclip); + /* XXX: If there can be no concurrency: s/M_NOWAIT/M_WAITOK/ */ + if ((*ppvc = malloc(sizeof(**ppvc), M_LINUX, M_NOWAIT)) == NULL) + return (ENOMEM); /* XXX: linux has no ENOMEM here */ + memcpy(*ppvc, &vclip, sizeof(vclip)); + (*ppvc)->next = NULL; + return (0); +} + +static int +linux_v4l_cliplist_free(struct video_window *vw) +{ + struct video_clip **ppvc; + struct video_clip **ppvc_next; + + for (ppvc = &(vw->clips); *ppvc != NULL; ppvc = ppvc_next) { + ppvc_next = &((*ppvc)->next); + free(*ppvc, M_LINUX); + } + vw->clips = NULL; + + return (0); +} + +static int +linux_v4l_cliplist_copy(struct l_video_window *lvw, struct video_window *vw) +{ + int error; + int clipcount; + void *plvc; + struct video_clip **ppvc; + + /* + * XXX: The cliplist is used to pass in a list of clipping + * rectangles or, if clipcount == VIDEO_CLIP_BITMAP, a + * clipping bitmap. Some Linux apps, however, appear to + * leave cliplist and clips uninitialized. In any case, + * the cliplist is not used by pwc(4), at the time of + * writing, FreeBSD's only V4L driver. When a driver + * that uses the cliplist is developed, this code may + * need re-examiniation. + */ + error = 0; + clipcount = vw->clipcount; + if (clipcount == VIDEO_CLIP_BITMAP) { + /* + * In this case, the pointer (clips) is overloaded + * to be a "void *" to a bitmap, therefore there + * is no struct video_clip to copy now. + */ + } else if (clipcount > 0 && clipcount <= 16384) { + /* + * Clips points to list of clip rectangles, so + * copy the list. + * + * XXX: Upper limit of 16384 was used here to try to + * avoid cases when clipcount and clips pointer + * are uninitialized and therefore have high random + * values, as is the case in the Linux Skype + * application. The value 16384 was chosen as that + * is what is used in the Linux stradis(4) MPEG + * decoder driver, the only place we found an + * example of cliplist use. + */ + plvc = PTRIN(lvw->clips); + vw->clips = NULL; + ppvc = &(vw->clips); + while (clipcount-- > 0) { + if (plvc == 0) { + error = EFAULT; + break; + } else { + error = linux_v4l_clip_copy(plvc, ppvc); + if (error) { + linux_v4l_cliplist_free(vw); + break; + } + } + ppvc = &((*ppvc)->next); + plvc = PTRIN(((struct l_video_clip *) plvc)->next); + } + } else { + /* + * clipcount == 0 or negative (but not VIDEO_CLIP_BITMAP) + * Force cliplist to null. + */ + vw->clipcount = 0; + vw->clips = NULL; + } + return (error); +} +#endif + +static int +linux_ioctl_v4l(struct thread *td, struct linux_ioctl_args *args) +{ + struct file *fp; + int error; + struct video_tuner vtun; + struct video_window vwin; + struct video_buffer vbuf; + struct video_code vcode; + struct l_video_tuner l_vtun; + struct l_video_window l_vwin; + struct l_video_buffer l_vbuf; + struct l_video_code l_vcode; + + switch (args->cmd & 0xffff) { + case LINUX_VIDIOCGCAP: args->cmd = VIDIOCGCAP; break; + case LINUX_VIDIOCGCHAN: args->cmd = VIDIOCGCHAN; break; + case LINUX_VIDIOCSCHAN: args->cmd = VIDIOCSCHAN; break; + + case LINUX_VIDIOCGTUNER: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = copyin((void *) args->arg, &l_vtun, sizeof(l_vtun)); + if (error) { + fdrop(fp, td); + return (error); + } + linux_to_bsd_v4l_tuner(&l_vtun, &vtun); + error = fo_ioctl(fp, VIDIOCGTUNER, &vtun, td->td_ucred, td); + if (!error) { + bsd_to_linux_v4l_tuner(&vtun, &l_vtun); + error = copyout(&l_vtun, (void *) args->arg, + sizeof(l_vtun)); + } + fdrop(fp, td); + return (error); + + case LINUX_VIDIOCSTUNER: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = copyin((void *) args->arg, &l_vtun, sizeof(l_vtun)); + if (error) { + fdrop(fp, td); + return (error); + } + linux_to_bsd_v4l_tuner(&l_vtun, &vtun); + error = fo_ioctl(fp, VIDIOCSTUNER, &vtun, td->td_ucred, td); + fdrop(fp, td); + return (error); + + case LINUX_VIDIOCGPICT: args->cmd = VIDIOCGPICT; break; + case LINUX_VIDIOCSPICT: args->cmd = VIDIOCSPICT; break; + case LINUX_VIDIOCCAPTURE: args->cmd = VIDIOCCAPTURE; break; + + case LINUX_VIDIOCGWIN: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = fo_ioctl(fp, VIDIOCGWIN, &vwin, td->td_ucred, td); + if (!error) { + bsd_to_linux_v4l_window(&vwin, &l_vwin); + error = copyout(&l_vwin, (void *) args->arg, + sizeof(l_vwin)); + } + fdrop(fp, td); + return (error); + + case LINUX_VIDIOCSWIN: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = copyin((void *) args->arg, &l_vwin, sizeof(l_vwin)); + if (error) { + fdrop(fp, td); + return (error); + } + linux_to_bsd_v4l_window(&l_vwin, &vwin); +#ifdef COMPAT_LINUX_V4L_CLIPLIST + error = linux_v4l_cliplist_copy(&l_vwin, &vwin); + if (error) { + fdrop(fp, td); + return (error); + } +#endif + error = fo_ioctl(fp, VIDIOCSWIN, &vwin, td->td_ucred, td); + fdrop(fp, td); +#ifdef COMPAT_LINUX_V4L_CLIPLIST + linux_v4l_cliplist_free(&vwin); +#endif + return (error); + + case LINUX_VIDIOCGFBUF: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = fo_ioctl(fp, VIDIOCGFBUF, &vbuf, td->td_ucred, td); + if (!error) { + bsd_to_linux_v4l_buffer(&vbuf, &l_vbuf); + error = copyout(&l_vbuf, (void *) args->arg, + sizeof(l_vbuf)); + } + fdrop(fp, td); + return (error); + + case LINUX_VIDIOCSFBUF: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = copyin((void *) args->arg, &l_vbuf, sizeof(l_vbuf)); + if (error) { + fdrop(fp, td); + return (error); + } + linux_to_bsd_v4l_buffer(&l_vbuf, &vbuf); + error = fo_ioctl(fp, VIDIOCSFBUF, &vbuf, td->td_ucred, td); + fdrop(fp, td); + return (error); + + case LINUX_VIDIOCKEY: args->cmd = VIDIOCKEY; break; + case LINUX_VIDIOCGFREQ: args->cmd = VIDIOCGFREQ; break; + case LINUX_VIDIOCSFREQ: args->cmd = VIDIOCSFREQ; break; + case LINUX_VIDIOCGAUDIO: args->cmd = VIDIOCGAUDIO; break; + case LINUX_VIDIOCSAUDIO: args->cmd = VIDIOCSAUDIO; break; + case LINUX_VIDIOCSYNC: args->cmd = VIDIOCSYNC; break; + case LINUX_VIDIOCMCAPTURE: args->cmd = VIDIOCMCAPTURE; break; + case LINUX_VIDIOCGMBUF: args->cmd = VIDIOCGMBUF; break; + case LINUX_VIDIOCGUNIT: args->cmd = VIDIOCGUNIT; break; + case LINUX_VIDIOCGCAPTURE: args->cmd = VIDIOCGCAPTURE; break; + case LINUX_VIDIOCSCAPTURE: args->cmd = VIDIOCSCAPTURE; break; + case LINUX_VIDIOCSPLAYMODE: args->cmd = VIDIOCSPLAYMODE; break; + case LINUX_VIDIOCSWRITEMODE: args->cmd = VIDIOCSWRITEMODE; break; + case LINUX_VIDIOCGPLAYINFO: args->cmd = VIDIOCGPLAYINFO; break; + + case LINUX_VIDIOCSMICROCODE: + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = copyin((void *) args->arg, &l_vcode, sizeof(l_vcode)); + if (error) { + fdrop(fp, td); + return (error); + } + linux_to_bsd_v4l_code(&l_vcode, &vcode); + error = fo_ioctl(fp, VIDIOCSMICROCODE, &vcode, td->td_ucred, td); + fdrop(fp, td); + return (error); + + case LINUX_VIDIOCGVBIFMT: args->cmd = VIDIOCGVBIFMT; break; + case LINUX_VIDIOCSVBIFMT: args->cmd = VIDIOCSVBIFMT; break; + default: return (ENOIOCTL); + } + + error = ioctl(td, (struct ioctl_args *)args); + return (error); +} + +/* * Special ioctl handler */ static int Modified: stable/8/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/8/sys/compat/linux/linux_ioctl.h Thu Jul 29 14:13:45 2010 (r210607) +++ stable/8/sys/compat/linux/linux_ioctl.h Thu Jul 29 14:23:58 2010 (r210608) @@ -575,4 +575,40 @@ struct ifnet; int linux_ifname(struct ifnet *, char *, size_t); +/* + * video + */ +#define LINUX_VIDIOCGCAP 0x7601 +#define LINUX_VIDIOCGCHAN 0x7602 +#define LINUX_VIDIOCSCHAN 0x7603 +#define LINUX_VIDIOCGTUNER 0x7604 +#define LINUX_VIDIOCSTUNER 0x7605 +#define LINUX_VIDIOCGPICT 0x7606 +#define LINUX_VIDIOCSPICT 0x7607 +#define LINUX_VIDIOCCAPTURE 0x7608 +#define LINUX_VIDIOCGWIN 0x7609 +#define LINUX_VIDIOCSWIN 0x760a +#define LINUX_VIDIOCGFBUF 0x760b +#define LINUX_VIDIOCSFBUF 0x760c +#define LINUX_VIDIOCKEY 0x760d +#define LINUX_VIDIOCGFREQ 0x760e +#define LINUX_VIDIOCSFREQ 0x760f +#define LINUX_VIDIOCGAUDIO 0x7610 +#define LINUX_VIDIOCSAUDIO 0x7611 +#define LINUX_VIDIOCSYNC 0x7623 +#define LINUX_VIDIOCMCAPTURE 0x7613 +#define LINUX_VIDIOCGMBUF 0x7614 +#define LINUX_VIDIOCGUNIT 0x7615 +#define LINUX_VIDIOCGCAPTURE 0x7616 +#define LINUX_VIDIOCSCAPTURE 0x7617 +#define LINUX_VIDIOCSPLAYMODE 0x7618 +#define LINUX_VIDIOCSWRITEMODE 0x7619 +#define LINUX_VIDIOCGPLAYINFO 0x761a +#define LINUX_VIDIOCSMICROCODE 0x761b +#define LINUX_VIDIOCGVBIFMT 0x761c +#define LINUX_VIDIOCSVBIFMT 0x761d + +#define LINUX_IOCTL_VIDEO_MIN LINUX_VIDIOCGCAP +#define LINUX_IOCTL_VIDEO_MAX LINUX_VIDIOCSVBIFMT + #endif /* !_LINUX_IOCTL_H_ */ Copied and modified: stable/8/sys/compat/linux/linux_videodev.h (from r200109, head/sys/compat/linux/linux_videodev.h) ============================================================================== --- head/sys/compat/linux/linux_videodev.h Fri Dec 4 20:46:45 2009 (r200109, copy source) +++ stable/8/sys/compat/linux/linux_videodev.h Thu Jul 29 14:23:58 2010 (r210608) @@ -1,48 +1,41 @@ +/* + * This header comes from linux, but it has no license. The author + * (Alan Cox @ Redhat) gave explicit permissions to use it in FreeBSD. + * The freeBSD vendor branch for v4l gives a more detailed description + * about this. + * + * $FreeBSD$ + */ + #ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H -#include +#include +typedef int32_t __s32; +typedef uint32_t __u32; +typedef uint16_t __u16; +typedef uint8_t __u8; +#if 0 #define HAVE_V4L1 1 #include +#endif -#ifdef __KERNEL__ - -#include - -extern struct video_device* video_devdata(struct file*); - -#define to_video_device(cd) container_of(cd, struct video_device, class_dev) -static inline void -video_device_create_file(struct video_device *vfd, - struct class_device_attribute *attr) -{ - class_device_create_file(&vfd->class_dev, attr); -} -static inline void -video_device_remove_file(struct video_device *vfd, - struct class_device_attribute *attr) -{ - class_device_remove_file(&vfd->class_dev, attr); -} - -#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ -/* helper functions to access driver private data. */ -static inline void *video_get_drvdata(struct video_device *dev) -{ - return dev->priv; -} - -static inline void video_set_drvdata(struct video_device *dev, void *data) -{ - dev->priv = data; -} -#endif - -extern int video_exclusive_open(struct inode *inode, struct file *file); -extern int video_exclusive_release(struct inode *inode, struct file *file); -#endif /* __KERNEL__ */ +#define VID_TYPE_CAPTURE 1 /* Can capture */ +#define VID_TYPE_TUNER 2 /* Can tune */ +#define VID_TYPE_TELETEXT 4 /* Does teletext */ +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ +#define VID_TYPE_CLIPPING 32 /* Can clip */ +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ +#define VID_TYPE_SCALES 128 /* Scalable */ +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ struct video_capability { @@ -157,7 +150,7 @@ struct video_window __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; - struct video_clip __user *clips; /* Set only */ + struct video_clip *clips; /* Set only */ int clipcount; #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ @@ -197,6 +190,8 @@ struct video_key __u32 flags; }; +#define VIDEO_MAX_FRAME 32 + struct video_mbuf { int size; /* Total memory to map */ Copied: stable/8/sys/compat/linux/linux_videodev_compat.h (from r200110, head/sys/compat/linux/linux_videodev_compat.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/compat/linux/linux_videodev_compat.h Thu Jul 29 14:23:58 2010 (r210608, copy of r200110, head/sys/compat/linux/linux_videodev_compat.h) @@ -0,0 +1,59 @@ +/* + * $FreeBSD$ + */ + +/* + * This file defines compatibility versions of several video structures + * defined in the Linux videodev.h header (linux_videodev.h). The + * structures defined in this file are the ones that have been determined + * to have 32- to 64-bit size dependencies. + */ + +#ifndef _LINUX_VIDEODEV_COMPAT_H_ +#define _LINUX_VIDEODEV_COMPAT_H_ + +struct l_video_tuner +{ + l_int tuner; +#define LINUX_VIDEO_TUNER_NAME_SIZE 32 + char name[LINUX_VIDEO_TUNER_NAME_SIZE]; + l_ulong rangelow, rangehigh; + uint32_t flags; + uint16_t mode; + uint16_t signal; +}; + +struct l_video_clip +{ + int32_t x, y; + int32_t width, height; + l_uintptr_t next; +}; + +struct l_video_window +{ + uint32_t x, y; + uint32_t width, height; + uint32_t chromakey; + uint32_t flags; + l_uintptr_t clips; + l_int clipcount; +}; + +struct l_video_buffer +{ + l_uintptr_t base; + l_int height, width; + l_int depth; + l_int bytesperline; +}; + +struct l_video_code +{ +#define LINUX_VIDEO_CODE_LOADWHAT_SIZE 16 + char loadwhat[LINUX_VIDEO_CODE_LOADWHAT_SIZE]; + l_int datasize; + l_uintptr_t data; +}; + +#endif /* !_LINUX_VIDEODEV_COMPAT_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:01:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2FF7106566B; Thu, 29 Jul 2010 16:01:10 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 925DC8FC0A; Thu, 29 Jul 2010 16:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TG1Agc086686; Thu, 29 Jul 2010 16:01:10 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TG1ASw086685; Thu, 29 Jul 2010 16:01:10 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201007291601.o6TG1ASw086685@svn.freebsd.org> From: Ulf Lilleengen Date: Thu, 29 Jul 2010 16:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210609 - head/sbin/devd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:01:10 -0000 Author: lulf Date: Thu Jul 29 16:01:10 2010 New Revision: 210609 URL: http://svn.freebsd.org/changeset/base/210609 Log: - Remove unused instance of string. Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Jul 29 14:23:58 2010 (r210608) +++ head/sbin/devd/devd.cc Thu Jul 29 16:01:10 2010 (r210609) @@ -250,7 +250,6 @@ action::do_action(config &c) match::match(config &c, const char *var, const char *re) : _var(var) { - string pattern = re; _re = "^"; _re.append(c.expand_string(string(re))); _re.append("$"); From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:06:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77387106567D; Thu, 29 Jul 2010 16:06:40 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 669F18FC23; Thu, 29 Jul 2010 16:06:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TG6eXc087957; Thu, 29 Jul 2010 16:06:40 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TG6e0V087955; Thu, 29 Jul 2010 16:06:40 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201007291606.o6TG6e0V087955@svn.freebsd.org> From: Ulf Lilleengen Date: Thu, 29 Jul 2010 16:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210610 - head/sbin/devd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:06:40 -0000 Author: lulf Date: Thu Jul 29 16:06:40 2010 New Revision: 210610 URL: http://svn.freebsd.org/changeset/base/210610 Log: - Avoid calling the copy constructor when it is not necessary. Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Jul 29 16:01:10 2010 (r210609) +++ head/sbin/devd/devd.cc Thu Jul 29 16:06:40 2010 (r210610) @@ -264,7 +264,7 @@ match::~match() bool match::do_match(config &c) { - string value = c.get_variable(_var); + const string &value = c.get_variable(_var); bool retval; if (Dflag) @@ -577,7 +577,7 @@ void config::expand_one(const char *&src, string &dst) { int count; - string buffer, varstr; + string buffer; src++; // $$ -> $ @@ -615,8 +615,7 @@ config::expand_one(const char *&src, str buffer.append(src++, 1); } while (is_id_char(*src)); buffer.append("", 1); - varstr = get_variable(buffer.c_str()); - dst.append(varstr); + dst.append(get_variable(buffer.c_str())); } const string From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:13:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC95E1065674; Thu, 29 Jul 2010 16:13:26 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC4F18FC1E; Thu, 29 Jul 2010 16:13:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TGDQ9H089498; Thu, 29 Jul 2010 16:13:26 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TGDQii089496; Thu, 29 Jul 2010 16:13:26 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007291613.o6TGDQii089496@svn.freebsd.org> From: Rui Paulo Date: Thu, 29 Jul 2010 16:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210611 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:13:27 -0000 Author: rpaulo Date: Thu Jul 29 16:13:26 2010 New Revision: 210611 URL: http://svn.freebsd.org/changeset/base/210611 Log: Bump the witness pendlist to 768 to accomodate the increased number of spinlocks. Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Thu Jul 29 16:06:40 2010 (r210610) +++ head/sys/kern/subr_witness.c Thu Jul 29 16:13:26 2010 (r210611) @@ -135,7 +135,7 @@ __FBSDID("$FreeBSD$"); #define WITNESS_COUNT 1024 #define WITNESS_CHILDCOUNT (WITNESS_COUNT * 4) #define WITNESS_HASH_SIZE 251 /* Prime, gives load factor < 2 */ -#define WITNESS_PENDLIST 512 +#define WITNESS_PENDLIST 768 /* Allocate 256 KB of stack data space */ #define WITNESS_LO_DATA_COUNT 2048 From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:30:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8601106566C; Thu, 29 Jul 2010 16:30:27 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A658B8FC17; Thu, 29 Jul 2010 16:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TGURmD093378; Thu, 29 Jul 2010 16:30:27 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TGURZS093374; Thu, 29 Jul 2010 16:30:27 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007291630.o6TGURZS093374@svn.freebsd.org> From: Rui Paulo Date: Thu, 29 Jul 2010 16:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210612 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:30:27 -0000 Author: rpaulo Date: Thu Jul 29 16:30:27 2010 New Revision: 210612 URL: http://svn.freebsd.org/changeset/base/210612 Log: When building WITH_CTF=1, print the ctf executable that's going to be run. This makes the 'ctfconvert' and 'ctfmerge' programs show up during a build when compiling a kernel, a library or a program. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Thu Jul 29 16:13:26 2010 (r210611) +++ head/share/mk/bsd.lib.mk Thu Jul 29 16:30:27 2010 (r210612) @@ -73,11 +73,15 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .c.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -87,40 +91,58 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .m.po: ${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .m.So: ${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .S.po: ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} all: objwarn @@ -191,7 +213,9 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Jul 29 16:13:26 2010 (r210611) +++ head/share/mk/bsd.prog.mk Thu Jul 29 16:30:27 2010 (r210612) @@ -66,7 +66,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .else # !defined(SRCS) @@ -90,7 +92,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} + @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Thu Jul 29 16:13:26 2010 (r210611) +++ head/share/mk/sys.mk Thu Jul 29 16:30:27 2010 (r210612) @@ -156,11 +156,15 @@ YFLAGS ?= -d # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .sh: cp ${.IMPSRC} ${.TARGET} @@ -170,25 +174,33 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -226,11 +238,15 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -240,11 +256,15 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -255,28 +275,38 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.c: @@ -288,26 +318,34 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:40:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 875911065674; Thu, 29 Jul 2010 16:40:45 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 769C48FC0A; Thu, 29 Jul 2010 16:40:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TGej90095737; Thu, 29 Jul 2010 16:40:45 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TGejWI095735; Thu, 29 Jul 2010 16:40:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007291640.o6TGejWI095735@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 29 Jul 2010 16:40:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210613 - head/bin/kill X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:40:45 -0000 Author: jilles Date: Thu Jul 29 16:40:45 2010 New Revision: 210613 URL: http://svn.freebsd.org/changeset/base/210613 Log: kill: Stop processing if a syntactically invalid pid is encountered. So a command like kill _HUP 1 now fails without sending SIGTERM to init. The behaviour when kill(2) fails remains unchanged: processing continues. This matches other implementations and POSIX and is useful for killing multiple processes at once when some of them may already be gone. PR: bin/40282 Modified: head/bin/kill/kill.c Modified: head/bin/kill/kill.c ============================================================================== --- head/bin/kill/kill.c Thu Jul 29 16:30:27 2010 (r210612) +++ head/bin/kill/kill.c Thu Jul 29 16:40:45 2010 (r210613) @@ -123,10 +123,9 @@ main(int argc, char *argv[]) for (errors = 0; argc; argc--, argv++) { pid = strtol(*argv, &ep, 10); - if (!**argv || *ep) { - warnx("illegal process id: %s", *argv); - errors = 1; - } else if (kill(pid, numsig) == -1) { + if (!**argv || *ep) + errx(1, "illegal process id: %s", *argv); + else if (kill(pid, numsig) == -1) { warn("%s", *argv); errors = 1; } From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:41:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F7BD106564A; Thu, 29 Jul 2010 16:41:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EAD98FC0C; Thu, 29 Jul 2010 16:41:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TGfLuf095922; Thu, 29 Jul 2010 16:41:21 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TGfL6p095918; Thu, 29 Jul 2010 16:41:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007291641.o6TGfL6p095918@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Jul 2010 16:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210614 - in head/sys/amd64: acpica amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:41:21 -0000 Author: jkim Date: Thu Jul 29 16:41:21 2010 New Revision: 210614 URL: http://svn.freebsd.org/changeset/base/210614 Log: Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h. Modified: head/sys/amd64/acpica/acpi_switch.S head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/genassym.c Modified: head/sys/amd64/acpica/acpi_switch.S ============================================================================== --- head/sys/amd64/acpica/acpi_switch.S Thu Jul 29 16:40:45 2010 (r210613) +++ head/sys/amd64/acpica/acpi_switch.S Thu Jul 29 16:41:21 2010 (r210614) @@ -156,7 +156,7 @@ ENTRY(acpi_restorecpu) movq PCPU(FPCURTHREAD), %rax testq %rax, %rax je 1f - fxrstor WAKEUP_PCB(USER_FPU) + fxrstor WAKEUP_PCB(USERFPU) 1: /* Restore CR0 with FPU mode. */ Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Thu Jul 29 16:40:45 2010 (r210613) +++ head/sys/amd64/amd64/cpu_switch.S Thu Jul 29 16:41:21 2010 (r210614) @@ -421,7 +421,7 @@ ENTRY(savectx2) testq %rax,%rax je 1f clts - fxsave PCB_USER_FPU(%r8) + fxsave PCB_USERFPU(%r8) 1: movl $1, %eax Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Thu Jul 29 16:40:45 2010 (r210613) +++ head/sys/amd64/amd64/genassym.c Thu Jul 29 16:41:21 2010 (r210614) @@ -140,7 +140,7 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_ ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); -ASSYM(PCB_USER_FPU, offsetof(struct pcb, pcb_user_save)); +ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save)); ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp)); ASSYM(PCB_FULL_IRET, offsetof(struct pcb, pcb_full_iret)); ASSYM(PCB_DBREGS, PCB_DBREGS); From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:49:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F02C1065676; Thu, 29 Jul 2010 16:49:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F26CC8FC15; Thu, 29 Jul 2010 16:49:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TGnKxm097721; Thu, 29 Jul 2010 16:49:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TGnKca097719; Thu, 29 Jul 2010 16:49:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007291649.o6TGnKca097719@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Jul 2010 16:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210615 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:49:21 -0000 Author: jkim Date: Thu Jul 29 16:49:20 2010 New Revision: 210615 URL: http://svn.freebsd.org/changeset/base/210615 Log: Fix another fallout from r208833. savectx() is used to save CPU context for crash dump (dumppcb) and kdb (stoppcbs). For both cases, there cannot have a valid pointer in pcb_save. This should restore the previous behaviour. Modified: head/sys/amd64/amd64/cpu_switch.S Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Thu Jul 29 16:41:21 2010 (r210614) +++ head/sys/amd64/amd64/cpu_switch.S Thu Jul 29 16:49:20 2010 (r210615) @@ -347,7 +347,7 @@ ENTRY(savectx) lmsw %ax movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */ - movq PCB_SAVEFPU(%rcx),%rsi /* arg 2 */ + leaq PCB_USERFPU(%rcx),%rsi /* arg 2 */ /* arg 1 (%rdi) already loaded */ call bcopy 1: From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 16:55:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C188A1065675; Thu, 29 Jul 2010 16:55:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B03418FC0A; Thu, 29 Jul 2010 16:55:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TGtRps099121; Thu, 29 Jul 2010 16:55:27 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TGtR0k099119; Thu, 29 Jul 2010 16:55:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007291655.o6TGtR0k099119@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 29 Jul 2010 16:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210616 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:55:27 -0000 Author: jilles Date: Thu Jul 29 16:55:27 2010 New Revision: 210616 URL: http://svn.freebsd.org/changeset/base/210616 Log: MFC r208881: sh: Pass through SIGINT if interactive and job control is enabled. This already worked if without job control. In either case, this depends on it that a process that terminates due to SIGINT exits on it (so not with status 1, or worse, 0). Example: sleep 5; echo continued This does not print "continued" any more if sleep is aborted via ctrl+c. Modified: stable/8/bin/sh/jobs.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Thu Jul 29 16:49:20 2010 (r210615) +++ stable/8/bin/sh/jobs.c Thu Jul 29 16:55:27 2010 (r210616) @@ -862,6 +862,7 @@ waitforjob(struct job *jp, int *origstat { #if JOBS pid_t mypgrp = getpgrp(); + int propagate_int = jp->jobctl && jp->foreground; #endif int status; int st; @@ -899,6 +900,11 @@ waitforjob(struct job *jp, int *origstat else CLEAR_PENDING_INT; } +#if JOBS + else if (rootshell && iflag && propagate_int && + WIFSIGNALED(status) && WTERMSIG(status) == SIGINT) + kill(getpid(), SIGINT); +#endif INTON; return st; } From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 17:00:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F4C81065674; Thu, 29 Jul 2010 17:00:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E9648FC17; Thu, 29 Jul 2010 17:00:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TH0fdt000414; Thu, 29 Jul 2010 17:00:41 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TH0ftm000411; Thu, 29 Jul 2010 17:00:41 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007291700.o6TH0ftm000411@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Jul 2010 17:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210617 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 17:00:42 -0000 Author: jkim Date: Thu Jul 29 17:00:41 2010 New Revision: 210617 URL: http://svn.freebsd.org/changeset/base/210617 Log: MFamd64: r210615 Fix another fallout from r208833. savectx() is used to save CPU context for crash dump (dumppcb) and kdb (stoppcbs). For both cases, we cannot have a valid pointer in pcb_save. This should restore the previous behaviour. Modified: head/sys/i386/i386/genassym.c head/sys/i386/i386/swtch.s Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Thu Jul 29 16:55:27 2010 (r210616) +++ head/sys/i386/i386/genassym.c Thu Jul 29 17:00:41 2010 (r210617) @@ -137,6 +137,7 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_ ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); +ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save)); ASSYM(PCB_PSL, offsetof(struct pcb, pcb_psl)); ASSYM(PCB_DBREGS, PCB_DBREGS); ASSYM(PCB_EXT, offsetof(struct pcb, pcb_ext)); Modified: head/sys/i386/i386/swtch.s ============================================================================== --- head/sys/i386/i386/swtch.s Thu Jul 29 16:55:27 2010 (r210616) +++ head/sys/i386/i386/swtch.s Thu Jul 29 17:00:41 2010 (r210617) @@ -416,7 +416,7 @@ ENTRY(savectx) popl %ecx pushl $PCB_SAVEFPU_SIZE - movl PCB_SAVEFPU(%ecx),%ecx + leal PCB_USERFPU(%ecx),%ecx pushl %ecx pushl %eax call bcopy From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 17:37:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0139106564A; Thu, 29 Jul 2010 17:37:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF9A78FC0A; Thu, 29 Jul 2010 17:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6THbZ10008600; Thu, 29 Jul 2010 17:37:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6THbZIl008598; Thu, 29 Jul 2010 17:37:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007291737.o6THbZIl008598@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Jul 2010 17:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210620 - head/sys/x86/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 17:37:36 -0000 Author: jhb Date: Thu Jul 29 17:37:35 2010 New Revision: 210620 URL: http://svn.freebsd.org/changeset/base/210620 Log: When performing a sanity check on the SRAT table to ensure that each memory domain has an assigned CPU, ignore disabled CPUs. Previously disabled CPUs were counted as being in domain 0. Reported by: mdf Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Thu Jul 29 17:03:27 2010 (r210619) +++ head/sys/x86/acpica/srat.c Thu Jul 29 17:37:35 2010 (r210620) @@ -150,7 +150,8 @@ check_domains(void) for (i = 0; i < num_mem; i++) { found = 0; for (j = 0; j <= MAX_APIC_ID; j++) - if (cpus[j].domain == mem_info[i].domain) { + if (cpus[j].enabled && + cpus[j].domain == mem_info[i].domain) { cpus[j].has_memory = 1; found++; } From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 17:52:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B8911065670; Thu, 29 Jul 2010 17:52:23 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A17A8FC15; Thu, 29 Jul 2010 17:52:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6THqNcS011854; Thu, 29 Jul 2010 17:52:23 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6THqNOM011851; Thu, 29 Jul 2010 17:52:23 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007291752.o6THqNOM011851@svn.freebsd.org> From: "George V. Neville-Neil" Date: Thu, 29 Jul 2010 17:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210621 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 17:52:23 -0000 Author: gnn Date: Thu Jul 29 17:52:23 2010 New Revision: 210621 URL: http://svn.freebsd.org/changeset/base/210621 Log: Make sure that we clear the correct bits when we turn off a PMC. It was possible that we could have turned a bit on but never cleared it. Extend the calls to rdmsr() to all necessary functions, not just those which previously caused a panic. Pointed out by: jhb@ MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Thu Jul 29 17:37:35 2010 (r210620) +++ head/sys/dev/hwpmc/hwpmc_core.c Thu Jul 29 17:52:23 2010 (r210621) @@ -168,13 +168,13 @@ core_pcpu_fini(struct pmc_mdep *md, int core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; for (n = 0; n < npmc; n++) { - msr = rdmsr(IAP_EVSEL0 + n); - wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK); + msr = rdmsr(IAP_EVSEL0 + n) & ~IAP_EVSEL_MASK; + wrmsr(IAP_EVSEL0 + n, msr); } if (core_cputype != PMC_CPU_INTEL_CORE) { - msr = rdmsr(IAF_CTRL); - wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; + wrmsr(IAF_CTRL, msr); npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num; } @@ -392,13 +392,13 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; - msr = rdmsr(IAF_CTRL); + msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); - msr = rdmsr(IA_GLOBAL_CTRL); + msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK; wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); @@ -434,13 +434,13 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); - msr = rdmsr(IAF_CTRL); + msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET)); - msr = rdmsr(IA_GLOBAL_CTRL); + msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK; wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); @@ -473,10 +473,14 @@ iaf_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); - msr = rdmsr(IAF_CTRL); - wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + /* Turn off fixed counters */ + msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; + wrmsr(IAF_CTRL, msr); + wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); - msr = rdmsr(IAF_CTRL); + + /* Turn on fixed counters */ + msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " @@ -1910,15 +1914,17 @@ iap_stop_pmc(int cpu, int ri) PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); - msr = rdmsr(IAP_EVSEL0 + ri); - wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK); /* stop hw */ + msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK; + wrmsr(IAP_EVSEL0 + ri, msr); /* stop hw */ if (core_cputype == PMC_CPU_INTEL_CORE) return (0); + msr = 0; do { cc->pc_resync = 0; cc->pc_globalctrl &= ~(1ULL << ri); + msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK; wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl); } while (cc->pc_resync != 0); @@ -2004,7 +2010,7 @@ core_intr(int cpu, struct trapframe *tf) struct pmc *pm; struct core_cpu *cc; int error, found_interrupt, ri; - uint64_t msr = 0; + uint64_t msr; PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -2036,15 +2042,15 @@ core_intr(int cpu, struct trapframe *tf) * Stop the counter, reload it but only restart it if * the PMC is not stalled. */ - msr = rdmsr(IAP_EVSEL0 + ri); - wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK); + msr = rdmsr(IAP_EVSEL0 + ri) & ~IAP_EVSEL_MASK; + wrmsr(IAP_EVSEL0 + ri, msr); wrmsr(IAP_PMC0 + ri, v); if (error) continue; - wrmsr(IAP_EVSEL0 + ri, - pm->pm_md.pm_iap.pm_iap_evsel | IAP_EN); + wrmsr(IAP_EVSEL0 + ri, msr | (pm->pm_md.pm_iap.pm_iap_evsel | + IAP_EN)); } if (found_interrupt) @@ -2060,7 +2066,7 @@ static int core2_intr(int cpu, struct trapframe *tf) { int error, found_interrupt, n; - uint64_t flag, intrstatus, intrenable; + uint64_t flag, intrstatus, intrenable, msr; struct pmc *pm; struct core_cpu *cc; pmc_value_t v; @@ -2091,7 +2097,8 @@ core2_intr(int cpu, struct trapframe *tf /* * Stop PMCs and clear overflow status bits. */ - wrmsr(IA_GLOBAL_CTRL, 0); + msr = rdmsr(IA_GLOBAL_CTRL) & ~IA_GLOBAL_CTRL_MASK; + wrmsr(IA_GLOBAL_CTRL, msr); wrmsr(IA_GLOBAL_OVF_CTRL, intrenable | IA_GLOBAL_STATUS_FLAG_OVFBUF | IA_GLOBAL_STATUS_FLAG_CONDCHG); @@ -2162,7 +2169,7 @@ core2_intr(int cpu, struct trapframe *tf cc->pc_globalctrl |= intrenable; - wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl); + wrmsr(IA_GLOBAL_CTRL, cc->pc_globalctrl & IA_GLOBAL_CTRL_MASK); PMCDBG(MDP,INT, 1, "cpu=%d fixedctrl=%jx globalctrl=%jx status=%jx " "ovf=%jx", cpu, (uintmax_t) rdmsr(IAF_CTRL), Modified: head/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.h Thu Jul 29 17:37:35 2010 (r210620) +++ head/sys/dev/hwpmc/hwpmc_core.h Thu Jul 29 17:52:23 2010 (r210621) @@ -144,6 +144,12 @@ struct pmc_md_iap_op_pmcallocate { /* The mask is only for the fixed porttion of the register. */ #define IAF_GLOBAL_CTRL_MASK 0x0000000700000000 +/* The mask is only for the programmable porttion of the register. */ +#define IAP_GLOBAL_CTRL_MASK 0x00000000ffffffff + +/* The mask is for both the fixed and programmable porttions of the register. */ +#define IA_GLOBAL_CTRL_MASK 0x00000007ffffffff + #define IA_GLOBAL_OVF_CTRL 0x390 #define IA_GLOBAL_STATUS_FLAG_CONDCHG (1ULL << 63) From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 18:02:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EB6B1065679; Thu, 29 Jul 2010 18:02:58 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D3EE8FC0C; Thu, 29 Jul 2010 18:02:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TI2whT014563; Thu, 29 Jul 2010 18:02:58 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TI2wcJ014551; Thu, 29 Jul 2010 18:02:58 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007291802.o6TI2wcJ014551@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 29 Jul 2010 18:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210622 - in head/usr.bin/grep: . nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 18:02:58 -0000 Author: gabor Date: Thu Jul 29 18:02:57 2010 New Revision: 210622 URL: http://svn.freebsd.org/changeset/base/210622 Log: - Some minor changes to the messages to increase usefulness of error msgs Reviewed by: hrs (Japanese catalogs), pluknet (Russian catalog) Approved by: delphij (mentor) Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/nls/C.msg head/usr.bin/grep/nls/es_ES.ISO8859-1.msg head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg head/usr.bin/grep/nls/ja_JP.SJIS.msg head/usr.bin/grep/nls/ja_JP.UTF-8.msg head/usr.bin/grep/nls/ja_JP.eucJP.msg head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg head/usr.bin/grep/nls/ru_RU.KOI8-R.msg head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/grep.c Thu Jul 29 18:02:57 2010 (r210622) @@ -61,14 +61,13 @@ const char *errstr[] = { "", /* 1*/ "(standard input)", /* 2*/ "cannot read bzip2 compressed file", -/* 3*/ "unknown --color option", +/* 3*/ "unknown %s option", /* 4*/ "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n", /* 5*/ "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n", /* 6*/ "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n", /* 7*/ "\t[--null] [pattern] [file ...]\n", -/* 8*/ "unknown --binary-files option", -/* 9*/ "Binary file %s matches\n", -/*10*/ "%s (BSD grep) %s\n", +/* 8*/ "Binary file %s matches\n", +/* 9*/ "%s (BSD grep) %s\n", }; /* Flags passed to regcomp() and regexec() */ @@ -445,10 +444,8 @@ main(int argc, char *argv[]) devbehave = DEV_SKIP; else if (strcasecmp(optarg, "read") == 0) devbehave = DEV_READ; - else { - errno = EINVAL; - err(2, NULL); - } + else + errx(2, getstr(3), "--devices"); break; case 'd': if (strcasecmp("recurse", optarg) == 0) { @@ -458,10 +455,8 @@ main(int argc, char *argv[]) dirbehave = DIR_SKIP; else if (strcasecmp("read", optarg) == 0) dirbehave = DIR_READ; - else { - errno = EINVAL; - err(2, NULL); - } + else + errx(2, getstr(3), "--directories"); break; case 'E': grepbehave = GREP_EXTENDED; @@ -552,7 +547,7 @@ main(int argc, char *argv[]) /* noop, compatibility */ break; case 'V': - printf(getstr(10), __progname, VERSION); + printf(getstr(9), __progname, VERSION); exit(0); case 'v': vflag = true; @@ -574,7 +569,7 @@ main(int argc, char *argv[]) else if (strcasecmp("text", optarg) == 0) binbehave = BINFILE_TEXT; else - errx(2, "%s", getstr(8)); + errx(2, getstr(3), "--binary-files"); break; case COLOR_OPT: color = NULL; @@ -594,7 +589,7 @@ main(int argc, char *argv[]) } else if (strcasecmp("never", optarg) != 0 && strcasecmp("none", optarg) != 0 && strcasecmp("no", optarg) != 0) - errx(2, "%s", getstr(3)); + errx(2, getstr(3), "--color"); break; case LABEL_OPT: label = optarg; Modified: head/usr.bin/grep/nls/C.msg ============================================================================== --- head/usr.bin/grep/nls/C.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/C.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(standard input)" 2 "cannot read bzip2 compressed file" -3 "unknown --color option" +3 "unknown %s option" 4 "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n" 5 "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n" 6 "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n" 7 "\t[--null] [pattern] [file ...]\n" -8 "unknown --binary-files option" -9 "Binary file %s matches\n" -10 "%s (BSD grep) %s\n" +8 "Binary file %s matches\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/es_ES.ISO8859-1.msg ============================================================================== --- head/usr.bin/grep/nls/es_ES.ISO8859-1.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/es_ES.ISO8859-1.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(entrada estándar)" 2 "no se puede leer el fichero comprimido bzip2" -3 "opción desconocida de --color" +3 "opción desconocida de %s" 4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A no] [-B no] [-C[no]]\n" 5 "\t[-e pauta] [-f fichero] [--binary-files=valor] [--color=cuando]\n" 6 "\t[--context[=no]] [--directories=acción] [--label] [--line-buffered]\n" 7 "\t[--null] [pauta] [fichero ...]\n" -8 "opción desconocida de --binary-files" -9 "fichero binario %s se ajusta\n" -10 "%s (BSD grep) %s\n" +8 "fichero binario %s se ajusta\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg ============================================================================== --- head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(entrada estándar)" 2 "non se pode ler o ficheiro comprimido bzip2" -3 "opción descoñecida de --color" +3 "opción descoñecida de %s" 4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A no] [-B no] [-C[no]]\n" 5 "\t[-e pauta] [-f ficheiro] [--binary-files=valor] [--color=cando]\n" 6 "\t[--context[=no]] [--directories=acción] [--label] [--line-buffered]\n" 7 "\t[--null] [pauta] [ficheiro ...]\n" -8 "opción descoñecida de --binary-files" -9 "ficheiro binario %s conforma\n" -10 "%s (BSD grep) %s\n" +8 "ficheiro binario %s conforma\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg ============================================================================== --- head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(szabványos bemenet)" 2 "bzip2 tömörített fájl nem olvasható" -3 "ismeretlen --color opció" +3 "ismeretlen %s opció" 4 "használat: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A szám] [-B szám] [-C[szám]]\n" 5 "\t[-e minta] [-f fájl] [--binary-files=érték] [--color=mikor]\n" 6 "\t[--context[=szám]] [--directories=mûvelet] [--label] [--line-buffered]\n" 7 "\t[--null] [minta] [fájl ...]\n" -8 "ismeretlen --binary-files opció" -9 "%s bináris fájl illeszkedik\n" -10 "%s (BSD grep) %s\n" +8 "%s bináris fájl illeszkedik\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/ja_JP.SJIS.msg ============================================================================== --- head/usr.bin/grep/nls/ja_JP.SJIS.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/ja_JP.SJIS.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(•W€“ü—Í)" 2 "bzip2 ˆ³kƒtƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Þ‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñ" -3 "--color ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è’l‚ÉŒë‚肪‚ ‚è‚Ü‚·" +3 "%s ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è’l‚ÉŒë‚肪‚ ‚è‚Ü‚·" 4 "Žg‚¢•û: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ”Žš] [-B ”Žš] [-C[”Žš]]\n" 5 "\t[-e ƒpƒ^[ƒ“] [-f ƒtƒ@ƒCƒ‹–¼] [--binary-files=’l] [--color=’l]\n" 6 "\t[--context[=”Žš]] [--directories=“®ì] [--label] [--line-buffered]\n" 7 "\t[--null] [ƒpƒ^[ƒ“] [ƒtƒ@ƒCƒ‹–¼ ...]\n" -8 "--binary-files ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è’l‚ÉŒë‚肪‚ ‚è‚Ü‚·" -9 "ƒoƒCƒiƒŠƒtƒ@ƒCƒ‹ %s ‚Ƀ}ƒbƒ`‚µ‚Ü‚µ‚½\n" -10 "%s (BSD grep) %s\n" +8 "ƒoƒCƒiƒŠƒtƒ@ƒCƒ‹ %s ‚Ƀ}ƒbƒ`‚µ‚Ü‚µ‚½\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/ja_JP.UTF-8.msg ============================================================================== --- head/usr.bin/grep/nls/ja_JP.UTF-8.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/ja_JP.UTF-8.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(標準入力)" 2 "bzip2 圧縮ファイルを読ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã›ã‚“" -3 "--color オプションã®æŒ‡å®šå€¤ã«èª¤ã‚ŠãŒã‚ã‚Šã¾ã™" +3 "%s オプションã®æŒ‡å®šå€¤ã«èª¤ã‚ŠãŒã‚ã‚Šã¾ã™" 4 "使ã„æ–¹: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A æ•°å­—] [-B æ•°å­—] [-C[æ•°å­—]]\n" 5 "\t[-e パターン] [-f ファイルå] [--binary-files=値] [--color=値]\n" 6 "\t[--context[=æ•°å­—]] [--directories=動作] [--label] [--line-buffered]\n" 7 "\t[--null] [パターン] [ファイルå ...]\n" -8 "--binary-files オプションã®æŒ‡å®šå€¤ã«èª¤ã‚ŠãŒã‚ã‚Šã¾ã™" -9 "ãƒã‚¤ãƒŠãƒªãƒ•ã‚¡ã‚¤ãƒ« %s ã«ãƒžãƒƒãƒã—ã¾ã—ãŸ\n" -10 "%s (BSD grep) %s\n" +8 "ãƒã‚¤ãƒŠãƒªãƒ•ã‚¡ã‚¤ãƒ« %s ã«ãƒžãƒƒãƒã—ã¾ã—ãŸ\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/ja_JP.eucJP.msg ============================================================================== --- head/usr.bin/grep/nls/ja_JP.eucJP.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/ja_JP.eucJP.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(ɸ½àÆþÎÏ)" 2 "bzip2 °µ½Ì¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó" -3 "--color ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹" +3 "%s ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹" 4 "»È¤¤Êý: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ¿ô»ú] [-B ¿ô»ú] [-C[¿ô»ú]]\n" 5 "\t[-e ¥Ñ¥¿¡¼¥ó] [-f ¥Õ¥¡¥¤¥ë̾] [--binary-files=ÃÍ] [--color=ÃÍ]\n" 6 "\t[--context[=¿ô»ú]] [--directories=Æ°ºî] [--label] [--line-buffered]\n" 7 "\t[--null] [¥Ñ¥¿¡¼¥ó] [¥Õ¥¡¥¤¥ë̾ ...]\n" -8 "--binary-files ¥ª¥×¥·¥ç¥ó¤Î»ØÄêÃͤ˸í¤ê¤¬¤¢¤ê¤Þ¤¹" -9 "¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë %s ¤Ë¥Þ¥Ã¥Á¤·¤Þ¤·¤¿\n" -10 "%s (BSD grep) %s\n" +8 "¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë %s ¤Ë¥Þ¥Ã¥Á¤·¤Þ¤·¤¿\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg ============================================================================== --- head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(entrada padrão)" 2 "não se posso ler o fichero comprimido bzip2" -3 "opcão não conhecida de --color" +3 "opcão não conhecida de %s" 4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n" 5 "\t[-e padrão] [-f arquivo] [--binary-files=valor] [--color=quando]\n" 6 "\t[--context[=num]] [--directories=ação] [--label] [--line-buffered]\n" 7 "\t[--null] [padrão] [arquivo ...]\n" -8 "opcão não conhecida de --binary-files" -9 "arquivo binário %s casa com o padrão\n" -10 "%s (BSD grep) %s\n" +8 "arquivo binário %s casa com o padrão\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/nls/ru_RU.KOI8-R.msg ============================================================================== --- head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Thu Jul 29 18:02:57 2010 (r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(ÓÔÁÎÄÁÒÔÎÙÊ ××ÏÄ)" 2 "ÎÅ ÍÏÇÕ ÐÒÏÞÉÔÁÔØ ÓÖÁÔÙÊ × bzip2 ÆÁÊÌ" -3 "ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ --color" +3 "ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ %s" 4 "ÉÓÐÏÌØÚÏ×ÁÎÉÅ: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ÞÉÓ] [-B ÞÉÓ] [-C[ÞÉÓ]]\n" 5 "\t[-e ÛÁÂÌÏÎ] [-f ÆÁÊÌ] [--binary-files=ÚÎÁÞÅÎÉÅ] [--color=ËÏÇÄÁ]\n" 6 "\t[--context[=ÞÉÓ]] [--directories=ÄÅÊÓÔ×ÉÅ] [--label] [--line-buffered]\n" 7 "\t[--null] [ÛÁÂÌÏÎ] [ÆÁÊÌ ...]\n" -8 "ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ --binary-files" -9 "Ä×ÏÉÞÎÙÊ ÆÁÊÌ %s ÓÏ×ÐÁÄÁÅÔ\n" -10 "%s (BSD grep) %s\n" +8 "Ä×ÏÉÞÎÙÊ ÆÁÊÌ %s ÓÏ×ÐÁÄÁÅÔ\n" +9 "%s (BSD grep) %s\n" Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Thu Jul 29 17:52:23 2010 (r210621) +++ head/usr.bin/grep/util.c Thu Jul 29 18:02:57 2010 (r210622) @@ -260,7 +260,7 @@ procfile(const char *fn) printf("%s\n", fn); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) - printf(getstr(9), fn); + printf(getstr(8), fn); free(ln.file); free(f); From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 18:44:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB34D106566B; Thu, 29 Jul 2010 18:44:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFE188FC08; Thu, 29 Jul 2010 18:44:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TIiAwS023674; Thu, 29 Jul 2010 18:44:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TIiAeB023670; Thu, 29 Jul 2010 18:44:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007291844.o6TIiAeB023670@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Jul 2010 18:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210623 - in head/sys: amd64/include i386/include ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 18:44:11 -0000 Author: jhb Date: Thu Jul 29 18:44:10 2010 New Revision: 210623 URL: http://svn.freebsd.org/changeset/base/210623 Log: Mark the __curthread() functions as __pure2 and remove the volatile keyword from the inline assembly. This allows the compiler to cache invocations of curthread since it's value does not change within a thread context. Submitted by: zec (i386) MFC after: 1 week Modified: head/sys/amd64/include/pcpu.h head/sys/i386/include/pcpu.h head/sys/ia64/include/pcpu.h Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Thu Jul 29 18:02:57 2010 (r210622) +++ head/sys/amd64/include/pcpu.h Thu Jul 29 18:44:10 2010 (r210623) @@ -216,12 +216,12 @@ extern struct pcpu *pcpup; #define PCPU_PTR(member) __PCPU_PTR(pc_ ## member) #define PCPU_SET(member, val) __PCPU_SET(pc_ ## member, val) -static __inline struct thread * +static __inline __pure2 struct thread * __curthread(void) { struct thread *td; - __asm __volatile("movq %%gs:0,%0" : "=r" (td)); + __asm("movq %%gs:0,%0" : "=r" (td)); return (td); } #define curthread (__curthread()) Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Thu Jul 29 18:02:57 2010 (r210622) +++ head/sys/i386/include/pcpu.h Thu Jul 29 18:44:10 2010 (r210623) @@ -223,12 +223,12 @@ extern struct pcpu *pcpup; #define PCPU_PTR(member) __PCPU_PTR(pc_ ## member) #define PCPU_SET(member, val) __PCPU_SET(pc_ ## member, val) -static __inline struct thread * +static __inline __pure2 struct thread * __curthread(void) { struct thread *td; - __asm __volatile("movl %%fs:0,%0" : "=r" (td)); + __asm("movl %%fs:0,%0" : "=r" (td)); return (td); } #define curthread (__curthread()) Modified: head/sys/ia64/include/pcpu.h ============================================================================== --- head/sys/ia64/include/pcpu.h Thu Jul 29 18:02:57 2010 (r210622) +++ head/sys/ia64/include/pcpu.h Thu Jul 29 18:44:10 2010 (r210623) @@ -70,12 +70,12 @@ struct pcpu; register struct pcpu *pcpup __asm__("r13"); -static __inline struct thread * +static __inline __pure2 struct thread * __curthread(void) { struct thread *td; - __asm __volatile("ld8.acq %0=[r13]" : "=r"(td)); + __asm("ld8.acq %0=[r13]" : "=r"(td)); return (td); } #define curthread (__curthread()) From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 19:08:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B082D1065672; Thu, 29 Jul 2010 19:08:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2A48FC0A; Thu, 29 Jul 2010 19:08:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TJ8MOa029085; Thu, 29 Jul 2010 19:08:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TJ8Mrf029081; Thu, 29 Jul 2010 19:08:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201007291908.o6TJ8Mrf029081@svn.freebsd.org> From: Xin LI Date: Thu, 29 Jul 2010 19:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210624 - in head/sys: amd64/include dev/coretemp i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 19:08:22 -0000 Author: delphij Date: Thu Jul 29 19:08:22 2010 New Revision: 210624 URL: http://svn.freebsd.org/changeset/base/210624 Log: Improve cputemp(4) driver wrt newer Intel processors, especially Xeon 5500/5600 series: - Utilize IA32_TEMPERATURE_TARGET, a.k.a. Tj(target) in place of Tj(max) when a sane value is available, as documented in Intel whitepaper "CPU Monitoring With DTS/PECI"; (By sane value we mean 70C - 100C for now); - Print the probe results when booting verbose; - Replace cpu_mask with cpu_stepping; - Use CPUID_* macros instead of rolling our own. Approved by: rpaulo MFC after: 1 month Modified: head/sys/amd64/include/specialreg.h head/sys/dev/coretemp/coretemp.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Thu Jul 29 18:44:10 2010 (r210623) +++ head/sys/amd64/include/specialreg.h Thu Jul 29 19:08:22 2010 (r210624) @@ -258,6 +258,7 @@ #define MSR_THERM_INTERRUPT 0x19b #define MSR_THERM_STATUS 0x19c #define MSR_IA32_MISC_ENABLE 0x1a0 +#define MSR_IA32_TEMPERATURE_TARGET 0x1a2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Thu Jul 29 18:44:10 2010 (r210623) +++ head/sys/dev/coretemp/coretemp.c Thu Jul 29 19:08:22 2010 (r210624) @@ -133,15 +133,13 @@ coretemp_attach(device_t dev) struct coretemp_softc *sc = device_get_softc(dev); device_t pdev; uint64_t msr; - int cpu_model; - int cpu_mask; + int cpu_model, cpu_stepping; + int ret, tjtarget; sc->sc_dev = dev; pdev = device_get_parent(dev); - cpu_model = (cpu_id >> 4) & 15; - /* extended model */ - cpu_model += ((cpu_id >> 16) & 0xf) << 4; - cpu_mask = cpu_id & 15; + cpu_model = CPUID_TO_MODEL(cpu_id); + cpu_stepping = cpu_id & CPUID_STEPPING; /* * Some CPUs, namely the PIII, don't have thermal sensors, but @@ -164,7 +162,7 @@ coretemp_attach(device_t dev) * * Adapted from the Linux coretemp driver. */ - if (cpu_model == 0xe && cpu_mask < 0xc) { + if (cpu_model == 0xe && cpu_stepping < 0xc) { msr = rdmsr(MSR_BIOS_SIGN); msr = msr >> 32; if (msr < 0x39) { @@ -174,20 +172,56 @@ coretemp_attach(device_t dev) } } #endif + /* - * On some Core 2 CPUs, there's an undocumented MSR that - * can tell us if Tj(max) is 100 or 85. - * - * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted - * from the Linux coretemp driver. + * Use 100C as the initial value. */ sc->sc_tjmax = 100; - if ((cpu_model == 0xf && cpu_mask >= 2) || cpu_model == 0xe) { + + /* + * Attempt to get Tj(max) from MSR IA32_TEMPERATURE_TARGET. + * + * This method is described in Intel white paper + * "CPU Monitoring With DTS/PECI". (#322683) + */ + ret = rdmsr_safe(MSR_IA32_TEMPERATURE_TARGET, &msr); + if (ret == 0) { + tjtarget = (msr >> 16) & 0xff; + /* + * On earlier generation of processors, the value obtained + * from IA32_TEMPERATURE_TARGET register is an offset that + * needs to be summed with a model specific base. It is + * however not clear what these numbers are, with the + * publicly available documents from Intel. + * + * For now, we consider [70, 100]C range, as described in + * #322683, as "reasonable" and accept these values + * whenever the MSR is available for read, regardless the + * CPU model. + */ + if (tjtarget >= 70 && tjtarget <= 100) + sc->sc_tjmax = tjtarget; + else + device_printf(dev, "Tj(target) value %d does " + "not seem right.\n", tjtarget); + } + + if ((cpu_model == 0xf && cpu_stepping >= 2) || cpu_model == 0xe) { + /* + * On some Core 2 CPUs, there's an undocumented MSR that + * can tell us if Tj(max) is 100 or 85. + * + * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted + * from the Linux coretemp driver. + */ msr = rdmsr(MSR_IA32_EXT_CONFIG); if (msr & (1 << 30)) sc->sc_tjmax = 85; } + if (bootverbose) + device_printf(dev, "Setting TjMax=%d\n", sc->sc_tjmax); + /* * Add the "temperature" MIB to dev.cpu.N. */ Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Thu Jul 29 18:44:10 2010 (r210623) +++ head/sys/i386/include/specialreg.h Thu Jul 29 19:08:22 2010 (r210624) @@ -264,6 +264,7 @@ #define MSR_THERM_INTERRUPT 0x19b #define MSR_THERM_STATUS 0x19c #define MSR_IA32_MISC_ENABLE 0x1a0 +#define MSR_IA32_TEMPERATURE_TARGET 0x1a2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 19:14:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A648D1065672; Thu, 29 Jul 2010 19:14:06 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9583E8FC0A; Thu, 29 Jul 2010 19:14:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TJE6bi030384; Thu, 29 Jul 2010 19:14:06 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TJE6OL030382; Thu, 29 Jul 2010 19:14:06 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007291914.o6TJE6OL030382@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 19:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210625 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 19:14:06 -0000 Author: jchandra Date: Thu Jul 29 19:14:06 2010 New Revision: 210625 URL: http://svn.freebsd.org/changeset/base/210625 Log: MIPS 64 bit support. Define fuword64() for n64 compilation, fuword() should be fuword64() in 64 bit. Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Thu Jul 29 19:08:22 2010 (r210624) +++ head/sys/mips/mips/support.S Thu Jul 29 19:14:06 2010 (r210625) @@ -429,8 +429,9 @@ END(copyerr) * {fu,su},{byte,sword,word}, fetch or store a byte, short or word to * user data space. */ -LEAF(fuword) -ALEAF(fuword32) +#ifdef __mips_n64 +LEAF(fuword64) +ALEAF(fuword) ALEAF(fuiword) PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space @@ -438,10 +439,26 @@ ALEAF(fuiword) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) PTR_S v0, U_PCB_ONFAULT(v1) + ld v0, 0(a0) # fetch word + j ra + PTR_S zero, U_PCB_ONFAULT(v1) +END(fuword64) +#endif + +LEAF(fuword32) +#ifndef __mips_n64 +ALEAF(fuword) +#endif + PTR_LA v0, fswberr + blt a0, zero, fswberr # make sure address is in user space + nop + GET_CPU_PCPU(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) lw v0, 0(a0) # fetch word j ra PTR_S zero, U_PCB_ONFAULT(v1) -END(fuword) +END(fuword32) LEAF(fusword) ALEAF(fuisword) From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 19:26:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE2FA1065677; Thu, 29 Jul 2010 19:26:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BF3BA8FC19; Thu, 29 Jul 2010 19:26:57 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 478FE46B2A; Thu, 29 Jul 2010 15:26:57 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9E65F8A03C; Thu, 29 Jul 2010 15:26:56 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Thu, 29 Jul 2010 15:03:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007291844.o6TIiAeB023670@svn.freebsd.org> In-Reply-To: <201007291844.o6TIiAeB023670@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007291503.14225.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 29 Jul 2010 15:26:56 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r210623 - in head/sys: amd64/include i386/include ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 19:26:58 -0000 On Thursday, July 29, 2010 2:44:10 pm John Baldwin wrote: > Author: jhb > Date: Thu Jul 29 18:44:10 2010 > New Revision: 210623 > URL: http://svn.freebsd.org/changeset/base/210623 > > Log: > Mark the __curthread() functions as __pure2 and remove the volatile keyword > from the inline assembly. This allows the compiler to cache invocations of > curthread since it's value does not change within a thread context. Other platforms can add this feature if desired by adding a similar __curthread() inline function. curthread is a bit special in this regards as opposed to other per-CPU values. I think Peter originally added the __curthread() inline simply to speed up compile times as the PCPU_*() macros are a lot of work for the compiler, so that can be another reason to do it on other platforms. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 19:47:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63F0B106566C; Thu, 29 Jul 2010 19:47:15 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5379C8FC14; Thu, 29 Jul 2010 19:47:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TJlFii037674; Thu, 29 Jul 2010 19:47:15 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TJlFlr037672; Thu, 29 Jul 2010 19:47:15 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007291947.o6TJlFlr037672@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 19:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210626 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 19:47:15 -0000 Author: jchandra Date: Thu Jul 29 19:47:15 2010 New Revision: 210626 URL: http://svn.freebsd.org/changeset/base/210626 Log: Add fuiword() in n64 for completeness. Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Thu Jul 29 19:14:06 2010 (r210625) +++ head/sys/mips/mips/support.S Thu Jul 29 19:47:15 2010 (r210626) @@ -448,6 +448,7 @@ END(fuword64) LEAF(fuword32) #ifndef __mips_n64 ALEAF(fuword) +ALEAF(fuiword) #endif PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:02:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE86106566C; Thu, 29 Jul 2010 20:02:56 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCB28FC0C; Thu, 29 Jul 2010 20:02:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TK2u1f041123; Thu, 29 Jul 2010 20:02:56 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TK2u3O041119; Thu, 29 Jul 2010 20:02:56 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007292002.o6TK2u3O041119@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 20:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210627 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:02:56 -0000 Author: jchandra Date: Thu Jul 29 20:02:56 2010 New Revision: 210627 URL: http://svn.freebsd.org/changeset/base/210627 Log: Prepare for 3 level page tables for MIPS. - Move page table second level shift and mask to param.h - rename SEGOFSET to SEGMASK - fix values for 64 bit maximum kernel and user addresses. Modified: head/sys/mips/include/param.h head/sys/mips/include/vmparam.h head/sys/mips/mips/pmap.c Modified: head/sys/mips/include/param.h ============================================================================== --- head/sys/mips/include/param.h Thu Jul 29 19:47:15 2010 (r210626) +++ head/sys/mips/include/param.h Thu Jul 29 20:02:56 2010 (r210627) @@ -103,9 +103,14 @@ #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ #define PAGE_SIZE (1<flags & OBJ_COLORED) != 0) offset += ptoa(object->pg_color); - superpage_offset = offset & SEGOFSET; - if (size - ((NBSEG - superpage_offset) & SEGOFSET) < NBSEG || - (*addr & SEGOFSET) == superpage_offset) + superpage_offset = offset & SEGMASK; + if (size - ((NBSEG - superpage_offset) & SEGMASK) < NBSEG || + (*addr & SEGMASK) == superpage_offset) return; - if ((*addr & SEGOFSET) < superpage_offset) - *addr = (*addr & ~SEGOFSET) + superpage_offset; + if ((*addr & SEGMASK) < superpage_offset) + *addr = (*addr & ~SEGMASK) + superpage_offset; else - *addr = ((*addr + SEGOFSET) & ~SEGOFSET) + superpage_offset; + *addr = ((*addr + SEGMASK) & ~SEGMASK) + superpage_offset; } /* From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:16:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC121065675; Thu, 29 Jul 2010 20:16:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA648FC12; Thu, 29 Jul 2010 20:16:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TKGDPe044083; Thu, 29 Jul 2010 20:16:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TKGDrI044081; Thu, 29 Jul 2010 20:16:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201007292016.o6TKGDrI044081@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 29 Jul 2010 20:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210628 - head/sbin/hastctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:16:13 -0000 Author: pjd Date: Thu Jul 29 20:16:12 2010 New Revision: 210628 URL: http://svn.freebsd.org/changeset/base/210628 Log: Fix typo. PR: docs/149033 Submitted by: Kolar MFC after: 3 days Modified: head/sbin/hastctl/hastctl.8 Modified: head/sbin/hastctl/hastctl.8 ============================================================================== --- head/sbin/hastctl/hastctl.8 Thu Jul 29 20:02:56 2010 (r210627) +++ head/sbin/hastctl/hastctl.8 Thu Jul 29 20:16:12 2010 (r210628) @@ -178,7 +178,7 @@ nodeB# hastctl create shared nodeB# hastd nodeB# hastctl role secondary shared -nodeB# hastctl create shared +nodeA# hastctl create shared nodeA# hastd nodeA# hastctl role primary shared nodeA# newfs -U /dev/hast/shared From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:18:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE084106566B; Thu, 29 Jul 2010 20:18:52 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2B48FC1F; Thu, 29 Jul 2010 20:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TKIqbs044671; Thu, 29 Jul 2010 20:18:52 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TKIqwH044668; Thu, 29 Jul 2010 20:18:52 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007292018.o6TKIqwH044668@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 20:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210629 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:18:52 -0000 Author: jchandra Date: Thu Jul 29 20:18:52 2010 New Revision: 210629 URL: http://svn.freebsd.org/changeset/base/210629 Log: 64 bit support for MIPS rtld. - Handle the case where pltgot[1] is 64 bit. - use 'ifdef __mips_n64' instead of 'ELFSIZE == 64' to detect 64 bit compile. Modified: head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/mips/rtld_start.S Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Thu Jul 29 20:16:12 2010 (r210628) +++ head/libexec/rtld-elf/mips/reloc.c Thu Jul 29 20:18:52 2010 (r210629) @@ -41,13 +41,19 @@ __FBSDID("$FreeBSD$"); #include "debug.h" #include "rtld.h" +#ifdef __mips_n64 +#define GOT1_MASK 0x8000000000000000UL +#else +#define GOT1_MASK 0x80000000UL +#endif + void init_pltgot(Obj_Entry *obj) { if (obj->pltgot != NULL) { obj->pltgot[0] = (Elf_Addr) &_rtld_bind_start; - /* XXX only if obj->pltgot[1] & 0x80000000 ?? */ - obj->pltgot[1] |= (Elf_Addr) obj; + if (obj->pltgot[1] & 0x80000000) + obj->pltgot[1] = (Elf_Addr) obj | GOT1_MASK; } } @@ -64,7 +70,7 @@ void _rtld_relocate_nonplt_self(Elf_Dyn * It is possible for the compiler to emit relocations for unaligned data. * We handle this situation with these inlines. */ -#if ELFSIZE == 64 +#ifdef __mips_n64 /* * ELF64 MIPS encodes the relocs uniquely. The first 32-bits of info contain * the symbol index. The top 32-bits contain three relocation types encoded @@ -90,7 +96,7 @@ load_ptr(void *where, size_t len) Elf_Sxword val; if (__predict_true(((uintptr_t)where & (len - 1)) == 0)) { -#if ELFSIZE == 64 +#ifdef __mips_n64 if (len == sizeof(Elf_Sxword)) return *(Elf_Sxword *)where; #endif @@ -111,7 +117,7 @@ static __inline void store_ptr(void *where, Elf_Sxword val, size_t len) { if (__predict_true(((uintptr_t)where & (len - 1)) == 0)) { -#if ELFSIZE == 64 +#ifdef __mips_n64 if (len == sizeof(Elf_Sxword)) { *(Elf_Sxword *)where = val; return; @@ -165,7 +171,7 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp } } - i = (got[1] & 0x80000000) ? 2 : 1; + i = (got[1] & GOT1_MASK) ? 2 : 1; /* Relocate the local GOT entries */ got += i; for (; i < local_gotno; i++) { @@ -197,7 +203,7 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp : sizeof(Elf_Sword); Elf_Sxword old = load_ptr(where, rlen); Elf_Sxword val = old; -#if ELFSIZE == 64 +#ifdef __mips_n64 assert(r_type == R_TYPE(REL32) || r_type == (R_TYPE(REL32)|(R_TYPE(64) << 8))); #endif @@ -272,7 +278,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry dbg("%s: broken=%d", obj->path, broken); #endif - i = (got[1] & 0x80000000) ? 2 : 1; + i = (got[1] & GOT1_MASK) ? 2 : 1; /* Relocate the local GOT entries */ got += i; Modified: head/libexec/rtld-elf/mips/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/mips/rtld_start.S Thu Jul 29 20:16:12 2010 (r210628) +++ head/libexec/rtld-elf/mips/rtld_start.S Thu Jul 29 20:18:52 2010 (r210629) @@ -130,11 +130,12 @@ _rtld_bind_start: /* .got = $gp - 0x7ff0 */ /* Simple math as you can see. */ #if defined(__mips_n64) - ld a0, 8(a0) /* object = pltgot[1] & 0x7fffffff */ + ld a0, 8(a0) /* object = pltgot[1] */ + and a0, a0, 0x7fffffffffffffff #else lw a0, 4(a0) /* object = pltgot[1] & 0x7fffffff */ -#endif and a0, a0, 0x7fffffff +#endif move a1, t8 /* symbol index */ PTR_LA t9, _C_LABEL(_mips_rtld_bind) From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:27:36 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D30AD1065675; Thu, 29 Jul 2010 20:27:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 84D438FC15; Thu, 29 Jul 2010 20:27:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6TKJuWg013576; Thu, 29 Jul 2010 14:19:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 29 Jul 2010 14:20:18 -0600 (MDT) Message-Id: <20100729.142018.295937982770216853.imp@bsdimp.com> To: jilles@stack.nl From: "M. Warner Losh" In-Reply-To: <20100729122034.GA28899@stack.nl> References: <201007290011.o6T0BE0l072516@svn.freebsd.org> <20100729122034.GA28899@stack.nl> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, gabor@FreeBSD.org Subject: Re: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:27:36 -0000 In message: <20100729122034.GA28899@stack.nl> Jilles Tjoelker writes: : On Thu, Jul 29, 2010 at 12:11:14AM +0000, Gabor Kovesdan wrote: : > Author: gabor : > Date: Thu Jul 29 00:11:14 2010 : > New Revision: 210578 : > URL: http://svn.freebsd.org/changeset/base/210578 : : > Log: : > - Some improvements on the exiting code, like replacing memcpy with : > strlcpy/strcpy : : Hmm, I don't think this is an improvement :( I agree in this case. The changes don't actually improve the safety of the code, but may make the code slower due to the need to recompute the length... : If you know the length of the string, then memcpy() is usually the right : function to use. I think this is clearer, and it is definitely more : efficient. : : The strlcpy() function is for cases where the code does not know the : length. The receiving buffer typically has a fixed length and overflow : either leads to an error condition or silent truncation. (In the latter : case, a security problem might still result.) : : Note that this is the reasoning of the glibc people why they do not want : strlcat/strlcpy. I think these functions are acceptable but should be : used with care, not as a panacea against all buffer overflows. The glibc people's line of reasoning is flawed. Because it might be abused, it should be excluded is not a good reason. It is demonstrably better than the alternatives, even if it doesn't solve all problems. By the same logic, one should remove most of str* functions, since they can all be misused... Warner : > Modified: head/usr.bin/grep/fastgrep.c : > ============================================================================== : > --- head/usr.bin/grep/fastgrep.c Wed Jul 28 21:52:09 2010 (r210577) : > +++ head/usr.bin/grep/fastgrep.c Thu Jul 29 00:11:14 2010 (r210578) : > @@ -119,8 +119,7 @@ fastcomp(fastgrep_t *fg, const char *pat : > * string respectively. : > */ : > fg->pattern = grep_malloc(fg->len + 1); : > - memcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len); : > - fg->pattern[fg->len] = '\0'; : > + strlcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len + 1); : > : > /* Look for ways to cheat...er...avoid the full regex engine. */ : > for (i = 0; i < fg->len; i++) { : : :( : : Note that this code may not be safe if fg->len comes from an untrusted : user, as fg->len + 1 is 0 if fg->len == SIZE_MAX. This is not the case : if fg->len is an actual length from strlen() or similar. : : > Modified: head/usr.bin/grep/grep.c : > ============================================================================== : > --- head/usr.bin/grep/grep.c Wed Jul 28 21:52:09 2010 (r210577) : > +++ head/usr.bin/grep/grep.c Thu Jul 29 00:11:14 2010 (r210578) : [snip] : > @@ -234,32 +237,44 @@ add_pattern(char *pat, size_t len) : > --len; : > /* pat may not be NUL-terminated */ : > pattern[patterns] = grep_malloc(len + 1); : > - memcpy(pattern[patterns], pat, len); : > - pattern[patterns][len] = '\0'; : > + strlcpy(pattern[patterns], pat, len + 1); : > ++patterns; : > } : : :( : : Alternatively, consider strndup() here. : : > /* : > - * Adds an include/exclude pattern to the internal array. : > + * Adds a file include/exclude pattern to the internal array. : > */ : > static void : > -add_epattern(char *pat, size_t len, int type, int mode) : > +add_fpattern(const char *pat, int mode) : > { : > : > /* Increase size if necessary */ : > - if (epatterns == epattern_sz) { : > - epattern_sz *= 2; : > - epattern = grep_realloc(epattern, ++epattern_sz * : > + if (fpatterns == fpattern_sz) { : > + fpattern_sz *= 2; : > + fpattern = grep_realloc(fpattern, ++fpattern_sz * : > sizeof(struct epat)); : > } : > - if (len > 0 && pat[len - 1] == '\n') : > - --len; : > - epattern[epatterns].pat = grep_malloc(len + 1); : > - memcpy(epattern[epatterns].pat, pat, len); : > - epattern[epatterns].pat[len] = '\0'; : > - epattern[epatterns].type = type; : > - epattern[epatterns].mode = mode; : > - ++epatterns; : > + fpattern[fpatterns].pat = grep_strdup(pat); : > + fpattern[fpatterns].mode = mode; : > + ++fpatterns; : > +} : : This part seems an improvement. The length came from strlen() anyway. : : > Modified: head/usr.bin/grep/queue.c : > ============================================================================== : > --- head/usr.bin/grep/queue.c Wed Jul 28 21:52:09 2010 (r210577) : > +++ head/usr.bin/grep/queue.c Thu Jul 29 00:11:14 2010 (r210578) : > @@ -60,7 +60,7 @@ enqueue(struct str *x) : > item->data.len = x->len; : > item->data.line_no = x->line_no; : > item->data.off = x->off; : > - memcpy(item->data.dat, x->dat, x->len); : > + strcpy(item->data.dat, x->dat); : > item->data.file = x->file; : > : > STAILQ_INSERT_TAIL(&queue, item, list); : : :( : : > Modified: head/usr.bin/grep/util.c : > ============================================================================== : > --- head/usr.bin/grep/util.c Wed Jul 28 21:52:09 2010 (r210577) : > +++ head/usr.bin/grep/util.c Thu Jul 29 00:11:14 2010 (r210578) : > @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); : > #include : > #include : > #include : > +#include : > #include : > #include : > #include : > @@ -51,6 +52,45 @@ __FBSDID("$FreeBSD$"); : > static int linesqueued; : > static int procline(struct str *l, int); : > : > +bool : > +file_matching(const char *fname) : > +{ : > + bool ret; : > + : > + ret = finclude ? false : true; : > + : > + for (unsigned int i = 0; i < fpatterns; ++i) { : > + if (fnmatch(fpattern[i].pat, : > + fname, 0) == 0 || fnmatch(fpattern[i].pat, : > + basename(fname), 0) == 0) { : > + if (fpattern[i].mode == EXCL_PAT) : > + return (false); : > + else : > + ret = true; : > + } : > + } : > + return (ret); : > +} : > + : > +bool : > +dir_matching(const char *dname) : > +{ : > + bool ret; : > + : > + ret = dinclude ? false : true; : > + : > + for (unsigned int i = 0; i < dpatterns; ++i) { : > + if (dname != NULL && : > + fnmatch(dname, dpattern[i].pat, 0) == 0) { : > + if (dpattern[i].mode == EXCL_PAT) : > + return (false); : > + else : > + ret = true; : > + } : > + } : > + return (ret); : > +} : > + : > /* : > * Processes a directory when a recursive search is performed with : > * the -R option. Each appropriate file is passed to procfile(). : > @@ -61,7 +101,6 @@ grep_tree(char **argv) : > FTS *fts; : > FTSENT *p; : > char *d, *dir = NULL; : > - unsigned int i; : > int c, fts_flags; : > bool ok; : > : > @@ -102,30 +141,19 @@ grep_tree(char **argv) : > default: : > /* Check for file exclusion/inclusion */ : > ok = true; : > - if (exclflag) { : > + if (dexclude || dinclude) { : > if ((d = strrchr(p->fts_path, '/')) != NULL) { : > dir = grep_malloc(sizeof(char) * : > (d - p->fts_path + 2)); : > strlcpy(dir, p->fts_path, : > (d - p->fts_path + 1)); : : Why do the buffer sizes differ here? Also, this can be a memcpy plus a : '\0' write instead of a strlcpy. : : -- : Jilles Tjoelker : From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:41:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0274D106564A; Thu, 29 Jul 2010 20:41:41 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E59AC8FC19; Thu, 29 Jul 2010 20:41:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TKfeBS049766; Thu, 29 Jul 2010 20:41:40 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TKfeqL049764; Thu, 29 Jul 2010 20:41:40 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007292041.o6TKfeqL049764@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 29 Jul 2010 20:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210630 - head/sys/mips/rmi/dev/xlr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:41:41 -0000 Author: jchandra Date: Thu Jul 29 20:41:40 2010 New Revision: 210630 URL: http://svn.freebsd.org/changeset/base/210630 Log: Update rge driver for 64 bit kernel. - stored virtual addresses should be 64bit - physical memory can be directly accessed using XKPHYS pointers in 64 bit. - no need to enable KX Modified: head/sys/mips/rmi/dev/xlr/rge.c Modified: head/sys/mips/rmi/dev/xlr/rge.c ============================================================================== --- head/sys/mips/rmi/dev/xlr/rge.c Thu Jul 29 20:18:52 2010 (r210629) +++ head/sys/mips/rmi/dev/xlr/rge.c Thu Jul 29 20:41:40 2010 (r210630) @@ -567,8 +567,8 @@ build_frag_list(struct mbuf *m_head, str paddr = vtophys((vm_offset_t)tx_desc); tx_desc->frag[nfrag] = (1ULL << 63) | (fr_stid << 54) | paddr; nfrag++; - tx_desc->frag[XLR_MAX_TX_FRAGS] = (uint64_t) (vm_offset_t)tx_desc; - tx_desc->frag[XLR_MAX_TX_FRAGS + 1] = (uint64_t) (vm_offset_t)m_head; + tx_desc->frag[XLR_MAX_TX_FRAGS] = (uint64_t)(intptr_t)tx_desc; + tx_desc->frag[XLR_MAX_TX_FRAGS + 1] = (uint64_t)(intptr_t)m_head; p2d_len = (nfrag * 8); p2p_msg->msg0 = (1ULL << 63) | (1ULL << 62) | (127ULL << 54) | @@ -614,19 +614,27 @@ static void free_buf(vm_paddr_t paddr) { struct mbuf *m; - uint32_t mag, um, sr; + uint32_t mag; +#ifdef __mips_n64 + uint64_t *vaddr; + + vaddr = (uint64_t *)MIPS_PHYS_TO_XKPHYS_CACHED(paddr); + m = (struct mbuf *)vaddr[0]; + mag = (uint32_t)vaddr[1]; +#else + uint32_t sr; sr = xlr_enable_kx(); - um = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE); - mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); + m = (struct mbuf *)(intptr_t)xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); + mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + 3 * sizeof(uint32_t)); mips_wr_status(sr); +#endif if (mag != 0xf00bad) { printf("Something is wrong kseg:%lx found mag:%x not 0xf00bad\n", (u_long)paddr, mag); return; } - m = (struct mbuf *)(intptr_t)um; if (m != NULL) m_freem(m); } @@ -635,7 +643,7 @@ static void * get_buf(void) { struct mbuf *m_new = NULL; - unsigned int *md; + uint64_t *md; #ifdef INVARIANTS vm_paddr_t temp1, temp2; #endif @@ -645,7 +653,7 @@ get_buf(void) return NULL; m_adj(m_new, XLR_CACHELINE_SIZE - ((uintptr_t)m_new->m_data & 0x1f)); - md = (unsigned int *)m_new->m_data; + md = (uint64_t *)m_new->m_data; md[0] = (uintptr_t)m_new; /* Back Ptr */ md[1] = 0xf00bad; m_adj(m_new, XLR_CACHELINE_SIZE); @@ -2033,18 +2041,30 @@ static void rge_rx(struct rge_softc *sc, vm_paddr_t paddr, int len) { struct mbuf *m; - uint32_t tm, mag, sr; + uint32_t mag; struct ifnet *ifp = sc->rge_ifp; +#ifdef __mips_n64 + uint64_t *vaddr; + vaddr =(uint64_t *)MIPS_PHYS_TO_XKPHYS_CACHED(paddr - XLR_CACHELINE_SIZE); + m = (struct mbuf *)vaddr[0]; + mag = (uint32_t)vaddr[1]; +#else + uint32_t sr; + /* + * On 32 bit machines we use XKPHYS to get the values stores with + * the mbuf, need to explicitly enable KX. Disable interrupts while + * KX is enabled to prevent this setting leaking to other code. + */ sr = xlr_enable_kx(); - tm = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE); - mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); + m = (struct mbuf *)(intptr_t)xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + sizeof(uint32_t)); + mag = xlr_paddr_lw(paddr - XLR_CACHELINE_SIZE + 3 * sizeof(uint32_t)); mips_wr_status(sr); - - m = (struct mbuf *)(intptr_t)tm; +#endif if (mag != 0xf00bad) { /* somebody else packet Error - FIXME in intialization */ - printf("cpu %d: *ERROR* Not my packet paddr %p\n", xlr_cpu_id(), (void *)paddr); + printf("cpu %d: *ERROR* Not my packet paddr %p\n", + xlr_cpu_id(), (void *)paddr); return; } /* align the data */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:42:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6F510656D9; Thu, 29 Jul 2010 20:42:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACF8D8FC1A; Thu, 29 Jul 2010 20:42:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TKgKXW049934; Thu, 29 Jul 2010 20:42:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TKgK10049932; Thu, 29 Jul 2010 20:42:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007292042.o6TKgK10049932@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Jul 2010 20:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210631 - head/sys/opencrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:42:20 -0000 Author: kib Date: Thu Jul 29 20:42:20 2010 New Revision: 210631 URL: http://svn.freebsd.org/changeset/base/210631 Log: Add compat32 shims for opencrypto(4). Reviewed by: bz MFC after: 3 weeks Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Thu Jul 29 20:41:40 2010 (r210630) +++ head/sys/opencrypto/cryptodev.c Thu Jul 29 20:42:20 2010 (r210631) @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -56,6 +58,201 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef COMPAT_FREEBSD32 +#include +#include + +struct session_op32 { + u_int32_t cipher; + u_int32_t mac; + u_int32_t keylen; + u_int32_t key; + int mackeylen; + u_int32_t mackey; + u_int32_t ses; +}; + +struct session2_op32 { + u_int32_t cipher; + u_int32_t mac; + u_int32_t keylen; + u_int32_t key; + int mackeylen; + u_int32_t mackey; + u_int32_t ses; + int crid; + int pad[4]; +}; + +struct crypt_op32 { + u_int32_t ses; + u_int16_t op; + u_int16_t flags; + u_int len; + u_int32_t src, dst; + u_int32_t mac; + u_int32_t iv; +}; + +struct crparam32 { + u_int32_t crp_p; + u_int crp_nbits; +}; + +struct crypt_kop32 { + u_int crk_op; + u_int crk_status; + u_short crk_iparams; + u_short crk_oparams; + u_int crk_crid; + struct crparam32 crk_param[CRK_MAXPARAM]; +}; + +struct cryptotstat32 { + struct timespec32 acc; + struct timespec32 min; + struct timespec32 max; + u_int32_t count; +}; + +struct cryptostats32 { + u_int32_t cs_ops; + u_int32_t cs_errs; + u_int32_t cs_kops; + u_int32_t cs_kerrs; + u_int32_t cs_intrs; + u_int32_t cs_rets; + u_int32_t cs_blocks; + u_int32_t cs_kblocks; + struct cryptotstat32 cs_invoke; + struct cryptotstat32 cs_done; + struct cryptotstat32 cs_cb; + struct cryptotstat32 cs_finis; +}; + +#define CIOCGSESSION32 _IOWR('c', 101, struct session_op32) +#define CIOCCRYPT32 _IOWR('c', 103, struct crypt_op32) +#define CIOCKEY32 _IOWR('c', 104, struct crypt_kop32) +#define CIOCGSESSION232 _IOWR('c', 106, struct session2_op32) +#define CIOCKEY232 _IOWR('c', 107, struct crypt_kop32) + +static void +session_op_from_32(const struct session_op32 *from, struct session_op *to) +{ + + CP(*from, *to, cipher); + CP(*from, *to, mac); + CP(*from, *to, keylen); + PTRIN_CP(*from, *to, key); + CP(*from, *to, mackeylen); + PTRIN_CP(*from, *to, mackey); + CP(*from, *to, ses); +} + +static void +session2_op_from_32(const struct session2_op32 *from, struct session2_op *to) +{ + + session_op_from_32((const struct session_op32 *)from, + (struct session_op *)to); + CP(*from, *to, crid); +} + +static void +session_op_to_32(const struct session_op *from, struct session_op32 *to) +{ + + CP(*from, *to, cipher); + CP(*from, *to, mac); + CP(*from, *to, keylen); + PTROUT_CP(*from, *to, key); + CP(*from, *to, mackeylen); + PTROUT_CP(*from, *to, mackey); + CP(*from, *to, ses); +} + +static void +session2_op_to_32(const struct session2_op *from, struct session2_op32 *to) +{ + + session_op_to_32((const struct session_op *)from, + (struct session_op32 *)to); + CP(*from, *to, crid); +} + +static void +crypt_op_from_32(const struct crypt_op32 *from, struct crypt_op *to) +{ + + CP(*from, *to, ses); + CP(*from, *to, op); + CP(*from, *to, flags); + CP(*from, *to, len); + PTRIN_CP(*from, *to, src); + PTRIN_CP(*from, *to, dst); + PTRIN_CP(*from, *to, mac); + PTRIN_CP(*from, *to, iv); +} + +static void +crypt_op_to_32(const struct crypt_op *from, struct crypt_op32 *to) +{ + + CP(*from, *to, ses); + CP(*from, *to, op); + CP(*from, *to, flags); + CP(*from, *to, len); + PTROUT_CP(*from, *to, src); + PTROUT_CP(*from, *to, dst); + PTROUT_CP(*from, *to, mac); + PTROUT_CP(*from, *to, iv); +} + +static void +crparam_from_32(const struct crparam32 *from, struct crparam *to) +{ + + PTRIN_CP(*from, *to, crp_p); + CP(*from, *to, crp_nbits); +} + +static void +crparam_to_32(const struct crparam *from, struct crparam32 *to) +{ + + PTROUT_CP(*from, *to, crp_p); + CP(*from, *to, crp_nbits); +} + +static void +crypt_kop_from_32(const struct crypt_kop32 *from, struct crypt_kop *to) +{ + int i; + + CP(*from, *to, crk_op); + CP(*from, *to, crk_status); + CP(*from, *to, crk_iparams); + CP(*from, *to, crk_oparams); + CP(*from, *to, crk_crid); + for (i = 0; i < CRK_MAXPARAM; i++) + crparam_from_32(&from->crk_param[i], &to->crk_param[i]); +} + +static void +crypt_kop_to_32(const struct crypt_kop *from, struct crypt_kop32 *to) +{ + int i; + + CP(*from, *to, crk_op); + CP(*from, *to, crk_status); + CP(*from, *to, crk_iparams); + CP(*from, *to, crk_oparams); + CP(*from, *to, crk_crid); + for (i = 0; i < CRK_MAXPARAM; i++) + crparam_to_32(&from->crk_param[i], &to->crk_param[i]); +} +#endif + struct csession { TAILQ_ENTRY(csession) next; u_int64_t sid; @@ -180,11 +377,27 @@ cryptof_ioctl( u_int64_t sid; u_int32_t ses; int error = 0, crid; +#ifdef COMPAT_FREEBSD32 + struct session2_op sopc; + struct crypt_op copc; + struct crypt_kop kopc; +#endif switch (cmd) { case CIOCGSESSION: case CIOCGSESSION2: - sop = (struct session_op *)data; +#ifdef COMPAT_FREEBSD32 + case CIOCGSESSION32: + case CIOCGSESSION232: + if (cmd == CIOCGSESSION32) { + session_op_from_32(data, (struct session_op *)&sopc); + sop = (struct session_op *)&sopc; + } else if (cmd == CIOCGSESSION232) { + session2_op_from_32(data, &sopc); + sop = (struct session_op *)&sopc; + } else +#endif + sop = (struct session_op *)data; switch (sop->cipher) { case 0: break; @@ -294,7 +507,11 @@ cryptof_ioctl( } /* NB: CIOGSESSION2 has the crid */ - if (cmd == CIOCGSESSION2) { + if (cmd == CIOCGSESSION2 +#ifdef COMPAT_FREEBSD32 + || cmd == CIOCGSESSION232 +#endif + ) { crid = SES2(sop)->crid; error = checkforsoftware(crid); if (error) @@ -315,7 +532,11 @@ cryptof_ioctl( goto bail; } sop->ses = cse->ses; - if (cmd == CIOCGSESSION2) { + if (cmd == CIOCGSESSION2 +#ifdef COMPAT_FREEBSD32 + || cmd == CIOCGSESSION232 +#endif + ) { /* return hardware/driver id */ SES2(sop)->crid = CRYPTO_SESID2HID(cse->sid); } @@ -326,6 +547,15 @@ bail: if (cria.cri_key) free(cria.cri_key, M_XDATA); } +#ifdef COMPAT_FREEBSD32 + else { + if (cmd == CIOCGSESSION32) + session_op_to_32(sop, data); + else if (cmd == CIOCGSESSION232) + session2_op_to_32((struct session2_op *)sop, + data); + } +#endif break; case CIOCFSESSION: ses = *(u_int32_t *)data; @@ -336,25 +566,54 @@ bail: error = csefree(cse); break; case CIOCCRYPT: - cop = (struct crypt_op *)data; +#ifdef COMPAT_FREEBSD32 + case CIOCCRYPT32: + if (cmd == CIOCCRYPT32) { + cop = &copc; + crypt_op_from_32(data, cop); + } else +#endif + cop = (struct crypt_op *)data; cse = csefind(fcr, cop->ses); if (cse == NULL) return (EINVAL); error = cryptodev_op(cse, cop, active_cred, td); +#ifdef COMPAT_FREEBSD32 + if (error == 0 && cmd == CIOCCRYPT32) + crypt_op_to_32(cop, data); +#endif break; case CIOCKEY: case CIOCKEY2: +#ifdef COMPAT_FREEBSD32 + case CIOCKEY32: + case CIOCKEY232: +#endif if (!crypto_userasymcrypto) return (EPERM); /* XXX compat? */ - mtx_lock(&Giant); - kop = (struct crypt_kop *)data; - if (cmd == CIOCKEY) { +#ifdef COMPAT_FREEBSD32 + if (cmd == CIOCKEY32 || cmd == CIOCKEY232) { + kop = &kopc; + crypt_kop_from_32(data, kop); + } else +#endif + kop = (struct crypt_kop *)data; + if (cmd == CIOCKEY +#ifdef COMPAT_FREEBSD32 + || cmd == CIOCKEY32 +#endif + ) { /* NB: crypto core enforces s/w driver use */ kop->crk_crid = CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE; } + mtx_lock(&Giant); error = cryptodev_key(kop); mtx_unlock(&Giant); +#ifdef COMPAT_FREEBSD32 + if (cmd == CIOCKEY32 || cmd == CIOCKEY232) + crypt_kop_to_32(kop, data); +#endif break; case CIOCASYMFEAT: if (!crypto_userasymcrypto) { From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 20:42:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069841065670; Thu, 29 Jul 2010 20:42:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9B5F8FC13; Thu, 29 Jul 2010 20:42:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6TKgcjM050039; Thu, 29 Jul 2010 20:42:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6TKgcZi050037; Thu, 29 Jul 2010 20:42:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007292042.o6TKgcZi050037@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 29 Jul 2010 20:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210632 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 20:42:39 -0000 Author: yongari Date: Thu Jul 29 20:42:38 2010 New Revision: 210632 URL: http://svn.freebsd.org/changeset/base/210632 Log: Consistently check header type after reading PCIR_HDRTYPE register. While I'm here use defined macro instead of using magic numbers for header type. Reviewed by: jhb Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Jul 29 20:42:20 2010 (r210631) +++ head/sys/dev/pci/pci.c Thu Jul 29 20:42:38 2010 (r210632) @@ -450,12 +450,12 @@ pci_maprange(uint64_t mapreg) static void pci_fixancient(pcicfgregs *cfg) { - if (cfg->hdrtype != 0) + if ((cfg->hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) return; /* PCI to PCI bridges use header type 1 */ if (cfg->baseclass == PCIC_BRIDGE && cfg->subclass == PCIS_BRIDGE_PCI) - cfg->hdrtype = 1; + cfg->hdrtype = PCIM_HDRTYPE_BRIDGE; } /* extract header type specific config data */ @@ -464,16 +464,16 @@ static void pci_hdrtypedata(device_t pcib, int b, int s, int f, pcicfgregs *cfg) { #define REG(n, w) PCIB_READ_CONFIG(pcib, b, s, f, n, w) - switch (cfg->hdrtype) { - case 0: + switch (cfg->hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: cfg->subvendor = REG(PCIR_SUBVEND_0, 2); cfg->subdevice = REG(PCIR_SUBDEV_0, 2); cfg->nummaps = PCI_MAXMAPS_0; break; - case 1: + case PCIM_HDRTYPE_BRIDGE: cfg->nummaps = PCI_MAXMAPS_1; break; - case 2: + case PCIM_HDRTYPE_CARDBUS: cfg->subvendor = REG(PCIR_SUBVEND_2, 2); cfg->subdevice = REG(PCIR_SUBDEV_2, 2); cfg->nummaps = PCI_MAXMAPS_2; @@ -569,11 +569,11 @@ pci_read_extcap(device_t pcib, pcicfgreg int ptr, nextptr, ptrptr; switch (cfg->hdrtype & PCIM_HDRTYPE) { - case 0: - case 1: + case PCIM_HDRTYPE_NORMAL: + case PCIM_HDRTYPE_BRIDGE: ptrptr = PCIR_CAP_PTR; break; - case 2: + case PCIM_HDRTYPE_CARDBUS: ptrptr = PCIR_CAP_PTR_2; /* cardbus capabilities ptr */ break; default: @@ -660,7 +660,8 @@ pci_read_extcap(device_t pcib, pcicfgreg break; case PCIY_SUBVENDOR: /* Should always be true. */ - if ((cfg->hdrtype & PCIM_HDRTYPE) == 1) { + if ((cfg->hdrtype & PCIM_HDRTYPE) == + PCIM_HDRTYPE_BRIDGE) { val = REG(ptr + PCIR_SUBVENDCAP_ID, 4); cfg->subvendor = val & 0xffff; cfg->subdevice = val >> 16; @@ -674,7 +675,8 @@ pci_read_extcap(device_t pcib, pcicfgreg * PCI-express or HT chipsets might match on * this check as well. */ - if ((cfg->hdrtype & PCIM_HDRTYPE) == 1) + if ((cfg->hdrtype & PCIM_HDRTYPE) == + PCIM_HDRTYPE_BRIDGE) pcix_chipset = 1; break; case PCIY_EXPRESS: /* PCI-express */ @@ -1117,11 +1119,11 @@ pci_find_extcap_method(device_t dev, dev * Determine the start pointer of the capabilities list. */ switch (cfg->hdrtype & PCIM_HDRTYPE) { - case 0: - case 1: + case PCIM_HDRTYPE_NORMAL: + case PCIM_HDRTYPE_BRIDGE: ptr = PCIR_CAP_PTR; break; - case 2: + case PCIM_HDRTYPE_CARDBUS: ptr = PCIR_CAP_PTR_2; break; default: @@ -2947,7 +2949,9 @@ pci_suspend(device_t dev) for (i = 0; acpi_dev && i < numdevs; i++) { child = devlist[i]; dinfo = (struct pci_devinfo *) device_get_ivars(child); - if (device_is_attached(child) && dinfo->cfg.hdrtype == 0) { + if (device_is_attached(child) && + (dinfo->cfg.hdrtype & PCIM_HDRTYPE) == + PCIM_HDRTYPE_NORMAL) { dstate = PCI_POWERSTATE_D3; ACPI_PWR_FOR_SLEEP(acpi_dev, child, &dstate); pci_set_powerstate(child, dstate); @@ -2981,7 +2985,8 @@ pci_resume(device_t dev) child = devlist[i]; dinfo = (struct pci_devinfo *) device_get_ivars(child); if (acpi_dev && device_is_attached(child) && - dinfo->cfg.hdrtype == 0) { + (dinfo->cfg.hdrtype & PCIM_HDRTYPE) == + PCIM_HDRTYPE_NORMAL) { ACPI_PWR_FOR_SLEEP(acpi_dev, child, NULL); pci_set_powerstate(child, PCI_POWERSTATE_D0); } @@ -4014,7 +4019,7 @@ pci_cfg_restore(device_t dev, struct pci * Other types are unknown, and we err on the side of safety * by ignoring them. */ - if (dinfo->cfg.hdrtype != 0) + if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) return; /* @@ -4062,7 +4067,7 @@ pci_cfg_save(device_t dev, struct pci_de * we err on the side of safety by ignoring them. Powering down * bridges should not be undertaken lightly. */ - if (dinfo->cfg.hdrtype != 0) + if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL) return; for (i = 0; i < dinfo->cfg.nummaps; i++) dinfo->cfg.bar[i] = pci_read_config(dev, PCIR_BAR(i), 4); From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 21:25:37 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 234C5106567B; Thu, 29 Jul 2010 21:25:37 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id CEC2B8FC17; Thu, 29 Jul 2010 21:25:36 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 453B214DC3B4; Thu, 29 Jul 2010 23:25:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id amcZ135pEYTc; Thu, 29 Jul 2010 23:25:34 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 7D53914DC39B; Thu, 29 Jul 2010 23:25:33 +0200 (CEST) Message-ID: <4C51F1CA.6080702@FreeBSD.org> Date: Thu, 29 Jul 2010 23:25:30 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: "M. Warner Losh" References: <201007290011.o6T0BE0l072516@svn.freebsd.org> <20100729122034.GA28899@stack.nl> <20100729.142018.295937982770216853.imp@bsdimp.com> In-Reply-To: <20100729.142018.295937982770216853.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jilles@stack.nl Subject: Re: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 21:25:37 -0000 Em 2010.07.29. 22:20, M. Warner Losh escreveu: > In message:<20100729122034.GA28899@stack.nl> > Jilles Tjoelker writes: > : On Thu, Jul 29, 2010 at 12:11:14AM +0000, Gabor Kovesdan wrote: > :> Author: gabor > :> Date: Thu Jul 29 00:11:14 2010 > :> New Revision: 210578 > :> URL: http://svn.freebsd.org/changeset/base/210578 > : > :> Log: > :> - Some improvements on the exiting code, like replacing memcpy with > :> strlcpy/strcpy > : > : Hmm, I don't think this is an improvement :( > > I agree in this case. The changes don't actually improve the safety > of the code, but may make the code slower due to the need to recompute > the length... > Thanks to both of you for the comments. I'll talk to my mentor and revert those changes. Gabor From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 22:25:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 439CB106564A; Thu, 29 Jul 2010 22:25:12 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6EEE68FC0A; Thu, 29 Jul 2010 22:25:11 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 4D729A5F35B; Fri, 30 Jul 2010 06:25:09 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id H9azR9IFzMYB; Fri, 30 Jul 2010 06:25:00 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 6EAD3A5F33E; Fri, 30 Jul 2010 06:24:58 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=qJOyEUSZTb2QYH6Q472PaefEhl+o/7gEBSAdWa/R9De8uDWdHwZxeWX2Fe2UrChdA vwrfJcyG2OnxGlakq3Qhw== Message-ID: <4C51FFB6.7040802@delphij.net> Date: Thu, 29 Jul 2010 15:24:54 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100721 Thunderbird/3.0.6 ThunderBrowse/3.3.1 MIME-Version: 1.0 To: Jilles Tjoelker References: <201007290011.o6T0BE0l072516@svn.freebsd.org> <20100729122034.GA28899@stack.nl> In-Reply-To: <20100729122034.GA28899@stack.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Gabor Kovesdan Subject: Re: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 22:25:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Jilles, Thanks for your comments. On 2010/07/29 05:20, Jilles Tjoelker wrote: > On Thu, Jul 29, 2010 at 12:11:14AM +0000, Gabor Kovesdan wrote: >> Author: gabor >> Date: Thu Jul 29 00:11:14 2010 >> New Revision: 210578 >> URL: http://svn.freebsd.org/changeset/base/210578 > >> Log: >> - Some improvements on the exiting code, like replacing memcpy with >> strlcpy/strcpy > > Hmm, I don't think this is an improvement :( > > If you know the length of the string, then memcpy() is usually the right > function to use. I think this is clearer, and it is definitely more > efficient. Agreed. > The strlcpy() function is for cases where the code does not know the > length. The receiving buffer typically has a fixed length and overflow > either leads to an error condition or silent truncation. (In the latter > case, a security problem might still result.) > > Note that this is the reasoning of the glibc people why they do not want > strlcat/strlcpy. I think these functions are acceptable but should be > used with care, not as a panacea against all buffer overflows. > >> Modified: head/usr.bin/grep/fastgrep.c >> ============================================================================== >> --- head/usr.bin/grep/fastgrep.c Wed Jul 28 21:52:09 2010 (r210577) >> +++ head/usr.bin/grep/fastgrep.c Thu Jul 29 00:11:14 2010 (r210578) >> @@ -119,8 +119,7 @@ fastcomp(fastgrep_t *fg, const char *pat >> * string respectively. >> */ >> fg->pattern = grep_malloc(fg->len + 1); >> - memcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len); >> - fg->pattern[fg->len] = '\0'; >> + strlcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len + 1); >> >> /* Look for ways to cheat...er...avoid the full regex engine. */ >> for (i = 0; i < fg->len; i++) { > > :( > > Note that this code may not be safe if fg->len comes from an untrusted > user, as fg->len + 1 is 0 if fg->len == SIZE_MAX. This is not the case > if fg->len is an actual length from strlen() or similar. Speaking for this piece of code, I have to say that the modified version is actually safer (an improvement, as the attacker could not overwrite arbitrary memory). If fg->len + 1 == 0, fg->pattern would point to a small area (assuming normal malloc.conf setting without V) where, for memcpy, it would overwrite fg->len bytes, while strlcpy() will do nothing. By the way how can fg->len come from an untrusted party? It's strlen(pat) which I don't think can ever reach SIZE_MAX without crashing the program. I'll dig further for this piece of code anyways. >> Modified: head/usr.bin/grep/grep.c >> ============================================================================== >> --- head/usr.bin/grep/grep.c Wed Jul 28 21:52:09 2010 (r210577) >> +++ head/usr.bin/grep/grep.c Thu Jul 29 00:11:14 2010 (r210578) > [snip] >> @@ -234,32 +237,44 @@ add_pattern(char *pat, size_t len) >> --len; >> /* pat may not be NUL-terminated */ >> pattern[patterns] = grep_malloc(len + 1); >> - memcpy(pattern[patterns], pat, len); >> - pattern[patterns][len] = '\0'; >> + strlcpy(pattern[patterns], pat, len + 1); >> ++patterns; >> } > > :( > > Alternatively, consider strndup() here. I think we should probably revert the code back to its previous state. Using memcpy and assigning nul seems to be a better approach. strndup() needs to re-evaluate strlen() which doesn't sound like a good idea here. >> Modified: head/usr.bin/grep/queue.c >> ============================================================================== >> --- head/usr.bin/grep/queue.c Wed Jul 28 21:52:09 2010 (r210577) >> +++ head/usr.bin/grep/queue.c Thu Jul 29 00:11:14 2010 (r210578) >> @@ -60,7 +60,7 @@ enqueue(struct str *x) >> item->data.len = x->len; >> item->data.line_no = x->line_no; >> item->data.off = x->off; >> - memcpy(item->data.dat, x->dat, x->len); >> + strcpy(item->data.dat, x->dat); >> item->data.file = x->file; >> >> STAILQ_INSERT_TAIL(&queue, item, list); > > :( Oops, I didn't caught this :-/ Sorry. >> Modified: head/usr.bin/grep/util.c >> ============================================================================== >> --- head/usr.bin/grep/util.c Wed Jul 28 21:52:09 2010 (r210577) >> +++ head/usr.bin/grep/util.c Thu Jul 29 00:11:14 2010 (r210578) [snip] >> @@ -102,30 +141,19 @@ grep_tree(char **argv) >> default: >> /* Check for file exclusion/inclusion */ >> ok = true; >> - if (exclflag) { >> + if (dexclude || dinclude) { >> if ((d = strrchr(p->fts_path, '/')) != NULL) { >> dir = grep_malloc(sizeof(char) * >> (d - p->fts_path + 2)); >> strlcpy(dir, p->fts_path, >> (d - p->fts_path + 1)); > > Why do the buffer sizes differ here? Also, this can be a memcpy plus a > '\0' write instead of a strlcpy. I think in this case the malloc part should be d - p->fts_path + 1. Speaking for strlcpy vs memcpy for this case, I don't see much difference as grep_tree() is being called during fts operation, these string can never be long enough, nor the code path be "hot" enough without I/O. I'll take care for the rest of changes. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMUf+2AAoJEATO+BI/yjfBPuoH/0zahV2GYxBJIyuxw+WYMvjT WnPI4I9piIuGtREYS2kUYY5HGswPwOiRGxEoNQ4m1wWYkpSf3gtjnR7B+lCkzYeJ WloTK8jfuYg7stGozJvOVGd4SIQBjchI3OepR86YbKCqGTDMo3iL+Fou/RQruJ5G HyAvZv00HNrGVagdBT/0KHrRiZ/W5bT7+lwuRxR8VsSdxBXjDBS0L87oiBGfvr5u bKmEWNUWNELJb+j2yvIh7M7M5CJIrlqx7enpGhyGciaEaWZzWuRF2aVmqGhlcBVt m5XcChcd7jpGr/HOQq0o3hAvfG684BKG+UPm7yBSs8bAZwrXVdECXnbYS9MxcAc= =8dGx -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 22:55:59 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C88C1065676; Thu, 29 Jul 2010 22:55:59 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id E69CE8FC1C; Thu, 29 Jul 2010 22:55:58 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 55EC635A834; Fri, 30 Jul 2010 00:55:58 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 439BB17267; Fri, 30 Jul 2010 00:55:58 +0200 (CEST) Date: Fri, 30 Jul 2010 00:55:58 +0200 From: Jilles Tjoelker To: d@delphij.net Message-ID: <20100729225558.GB42378@stack.nl> References: <201007290011.o6T0BE0l072516@svn.freebsd.org> <20100729122034.GA28899@stack.nl> <4C51FFB6.7040802@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C51FFB6.7040802@delphij.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Gabor Kovesdan Subject: Re: svn commit: r210578 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 22:55:59 -0000 On Thu, Jul 29, 2010 at 03:24:54PM -0700, Xin LI wrote: > On 2010/07/29 05:20, Jilles Tjoelker wrote: > > Note that this code may not be safe if fg->len comes from an untrusted > > user, as fg->len + 1 is 0 if fg->len == SIZE_MAX. This is not the case > > if fg->len is an actual length from strlen() or similar. > Speaking for this piece of code, I have to say that the modified version > is actually safer (an improvement, as the attacker could not overwrite > arbitrary memory). > If fg->len + 1 == 0, fg->pattern would point to a small area (assuming > normal malloc.conf setting without V) where, for memcpy, it would > overwrite fg->len bytes, while strlcpy() will do nothing. > By the way how can fg->len come from an untrusted party? It's > strlen(pat) which I don't think can ever reach SIZE_MAX without crashing > the program. Right, fg->len comes from a strlen() so adding one to it is safe. My remark was directed at similar code where a length comes from a number supplied by an untrusted user. > I'll dig further for this piece of code anyways. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Jul 29 23:46:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D33F1065670; Thu, 29 Jul 2010 23:46:25 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1278E8FC1C; Thu, 29 Jul 2010 23:46:24 +0000 (UTC) Received: by iwn35 with SMTP id 35so947604iwn.13 for ; Thu, 29 Jul 2010 16:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=eIN1aXGj21UKkTnXP5IW5NzpCsJQLQPDpmSXvPSIL/c=; b=SgxUqsSWP8O1sZG6dKeDqIHGLGlN0X9123UZKCEi6pBvZmukGRMVQtAnqV0gDQe+Vk dOxNYILIjgEHBOgnR81ox7EyqX/HAGLqNezp8kfFRRlzpgm/YipujbF84epB9FVTqUXH 6S7b4wIFgzyZNmd5dK+rjwo3HR4HqRrBZAD38= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=S7WtmpH6f7KcFNnqwq/b7hVkVQ9whQ/7NWKLMwT30mD9o/3zEvHCq69yr6J3Kp1e9s u1YRYJwUH2OA96F/r+thHC0DD8YsSdH2rH/5GTeQQ76Po7wkEnA0CV4J3fYd+nFeCpkL HMxwYIt1JRM4mcAdxkn35Cymigaeb44qjHv9c= Received: by 10.231.14.76 with SMTP id f12mr646119iba.63.1280447184370; Thu, 29 Jul 2010 16:46:24 -0700 (PDT) Received: from centel.dataix.local (adsl-99-19-46-227.dsl.klmzmi.sbcglobal.net [99.19.46.227]) by mx.google.com with ESMTPS id e8sm1264750ibb.20.2010.07.29.16.46.22 (version=SSLv3 cipher=RC4-MD5); Thu, 29 Jul 2010 16:46:23 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C5212CC.2070201@dataix.net> Date: Thu, 29 Jul 2010 19:46:20 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.11) Gecko/20100722 Thunderbird MIME-Version: 1.0 To: Jilles Tjoelker References: <201007291655.o6TGtR0k099119@svn.freebsd.org> In-Reply-To: <201007291655.o6TGtR0k099119@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, FreeBSD SVN Source All , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210616 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 23:46:25 -0000 So what has been commited here is implicitly stating that instead of using ( trap 'exit 1' 2 ) in a script to catch SIGINT and exit it is now being done on behalf of the user with no way for them to control it ? Basically this has the same effect on a script that uses ( && ) and to which now have the same meaning. This script should print "PRINTME" twice when ^C during the sleep. #!/bin/sh sleep 5000; echo "PRINTME" echo "PRINTME" Whereas this script with the old behavior would have done what is trying to be done now for the first line but should still print only the second "PRINTME" during a ^C of sleep. #!/bin/sh sleep 5000 && echo "PRINTME" echo "PRINTME" And this script should not print anything when ^C is used during sleep. #!/bin/sh trap 'exit 1' 2 sleep 5000 ; echo "PRINTME" echo "PRINTME" What is being done currently on stable/8 is incorrect... On 07/29/2010 12:55, Jilles Tjoelker wrote: > Author: jilles > Date: Thu Jul 29 16:55:27 2010 > New Revision: 210616 > URL: http://svn.freebsd.org/changeset/base/210616 > > Log: > MFC r208881: sh: Pass through SIGINT if interactive and job control > is enabled. > > This already worked if without job control. > > In either case, this depends on it that a process that terminates due to > SIGINT exits on it (so not with status 1, or worse, 0). > > Example: > sleep 5; echo continued > This does not print "continued" any more if sleep is aborted via ctrl+c. > > Modified: > stable/8/bin/sh/jobs.c > Directory Properties: > stable/8/bin/sh/ (props changed) > > Modified: stable/8/bin/sh/jobs.c > ============================================================================== > --- stable/8/bin/sh/jobs.c Thu Jul 29 16:49:20 2010 (r210615) > +++ stable/8/bin/sh/jobs.c Thu Jul 29 16:55:27 2010 (r210616) > @@ -862,6 +862,7 @@ waitforjob(struct job *jp, int *origstat > { > #if JOBS > pid_t mypgrp = getpgrp(); > + int propagate_int = jp->jobctl && jp->foreground; > #endif > int status; > int st; > @@ -899,6 +900,11 @@ waitforjob(struct job *jp, int *origstat > else > CLEAR_PENDING_INT; > } > +#if JOBS > + else if (rootshell && iflag && propagate_int && > + WIFSIGNALED(status) && WTERMSIG(status) == SIGINT) > + kill(getpid(), SIGINT); > +#endif > INTON; > return st; > } -- jhell,v From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 00:33:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94A0E106566B; Fri, 30 Jul 2010 00:33:48 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6A18FC08; Fri, 30 Jul 2010 00:33:48 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id B6A8E582C7; Thu, 29 Jul 2010 19:33:47 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id xtv4Zr5X6bij; Thu, 29 Jul 2010 19:33:47 -0500 (CDT) Received: from wanderer.tachypleus.net (adsl-75-50-88-235.dsl.mdsnwi.sbcglobal.net [75.50.88.235]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 0CA3F582C4; Thu, 29 Jul 2010 19:33:46 -0500 (CDT) Message-ID: <4C521DEA.6080706@freebsd.org> Date: Fri, 30 Jul 2010 02:33:46 +0200 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100727 Thunderbird/3.0.6 MIME-Version: 1.0 To: Matthew D Fleming References: <201007281536.o6SFaEIX057859@svn.freebsd.org> In-Reply-To: <201007281536.o6SFaEIX057859@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210564 - in head/sys: amd64/conf conf i386/conf ia64/conf kern pc98/conf powerpc/conf sparc64/conf sun4v/conf sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 00:33:48 -0000 On 07/28/10 17:36, Matthew D Fleming wrote: > Author: mdf > Date: Wed Jul 28 15:36:12 2010 > New Revision: 210564 > URL: http://svn.freebsd.org/changeset/base/210564 > > Log: > Add MALLOC_DEBUG_MAXZONES debug malloc(9) option to use multiple uma > zones for each malloc bucket size. The purpose is to isolate > different malloc types into hash classes, so that any buffer overruns > or use-after-free will usually only affect memory from malloc types in > that hash class. This is purely a debugging tool; by varying the hash > function and tracking which hash class was corrupted, the intersection > of the hash classes from each instance will point to a single malloc > type that is being misused. At this point inspection or memguard(9) > can be used to catch the offending code. > > Add MALLOC_DEBUG_MAXZONES=8 to -current GENERIC configuration files. > The suggestion to have this on by default came from Kostik Belousov on > -arch. > > This code is based on work by Ron Steinke at Isilon Systems. > > Reviewed by: -arch (mostly silence) > Reviewed by: zml > Approved by: zml (mentor) > > Could you also add this change to the powerpc64 GENERIC? It lives at sys/powerpc/conf/GENERIC64. -Nathan From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 02:47:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE6181065673; Fri, 30 Jul 2010 02:47:33 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8958FC08; Fri, 30 Jul 2010 02:47:32 +0000 (UTC) Received: by eyh6 with SMTP id 6so566525eyh.13 for ; Thu, 29 Jul 2010 19:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=k2NlryEL5SCeAT4gDjdzB7En5QXE6qrAf+1ZoB3KulQ=; b=TsDaVgwenKN8157NEXlu8P4Q5yegYqKp9Z9d7fPzS7U/AgyvRkidPIokOd7FuVJNaX 7A3uNjx2k+Cp/5vrCAoe0eOWH4Ep9cLjszK9+op+EOZuhW/InU34j/BaB55t6PmaAGNc /onAU1dahJqt/CmMXjiLrwdgc7OhO1z9bQTh8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=vhikF99J+bctG+kFAsxgIviPLcRs36S56N/okRhHO0DSv4zeDPK82aNC3AQR22nVld SbkR9K14NSkB9VcqPWyQB4mxgsNx2S5XaNh30JlsFstEEFY/ANA3uUwEnouOH074iAET l7VhDG2usPJxCOm/o5xbqCgzoirYR4WBkJf+I= Received: by 10.14.45.8 with SMTP id o8mr784294eeb.57.1280458051603; Thu, 29 Jul 2010 19:47:31 -0700 (PDT) Received: from localhost ([85.17.254.135]) by mx.google.com with ESMTPS id x54sm2311499eeh.23.2010.07.29.19.47.29 (version=SSLv3 cipher=RC4-MD5); Thu, 29 Jul 2010 19:47:30 -0700 (PDT) From: Anonymous To: Rui Paulo References: <201007291630.o6TGURZS093374@svn.freebsd.org> Date: Fri, 30 Jul 2010 06:42:44 +0400 In-Reply-To: <201007291630.o6TGURZS093374@svn.freebsd.org> (Rui Paulo's message of "Thu, 29 Jul 2010 16:30:27 +0000 (UTC)") Message-ID: <86vd7xheqj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210612 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 02:47:34 -0000 Rui Paulo writes: > Author: rpaulo > Date: Thu Jul 29 16:30:27 2010 > New Revision: 210612 > URL: http://svn.freebsd.org/changeset/base/210612 > > Log: > When building WITH_CTF=1, print the ctf executable that's going to be > run. This makes the 'ctfconvert' and 'ctfmerge' programs show up during > a build when compiling a kernel, a library or a program. > > Sponsored by: The FreeBSD Foundation > > Modified: > head/share/mk/bsd.lib.mk > head/share/mk/bsd.prog.mk > head/share/mk/sys.mk > [...] > Modified: head/share/mk/sys.mk > ============================================================================== > --- head/share/mk/sys.mk Thu Jul 29 16:13:26 2010 (r210611) > +++ head/share/mk/sys.mk Thu Jul 29 16:30:27 2010 (r210612) > @@ -156,11 +156,15 @@ YFLAGS ?= -d > # SINGLE SUFFIX RULES > .c: > ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} > - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} > + @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ > + ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ > + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} After this commit ctfconvert breaks buildworld for me. $ make -j3 -Qs buildworld ... ===> lib/libelf (all) ERROR: ctfmerge: libelf.so.1: Cannot get sect .gnu.version_d data: Invalid section descriptor $ echo 'int main(void) { return(0); }' >test.c $ make -dA test |& fgrep -A2 -- '-o test' cc -O0 -g3 test.c -o test [ -z "ctfconvert" -o -n "1" ] || echo ctfconvert -L VERSION test && ctfconvert -L VERSION test ERROR: crt1.c: multiple compilation units not supported $ true || { echo foo && echo bar; } $ true || echo foo && echo bar bar From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 07:30:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D685B1065689; Fri, 30 Jul 2010 07:30:57 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C56178FC1A; Fri, 30 Jul 2010 07:30:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6U7UvMB092853; Fri, 30 Jul 2010 07:30:57 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6U7Uvmx092851; Fri, 30 Jul 2010 07:30:57 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201007300730.o6U7Uvmx092851@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 30 Jul 2010 07:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210634 - stable/8/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 07:30:58 -0000 Author: ae Date: Fri Jul 30 07:30:57 2010 New Revision: 210634 URL: http://svn.freebsd.org/changeset/base/210634 Log: MFC r210401: Prevent access after free to table entry in case when user deletes partition that not yet created (changes doesn't committed to disk). PR: 148687 Approved by: mav (mentor) Modified: stable/8/sys/geom/part/g_part.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/part/g_part.c ============================================================================== --- stable/8/sys/geom/part/g_part.c Fri Jul 30 06:06:33 2010 (r210633) +++ stable/8/sys/geom/part/g_part.c Fri Jul 30 07:30:57 2010 (r210634) @@ -829,14 +829,6 @@ g_part_ctl_delete(struct gctl_req *req, entry->gpe_pp = NULL; } - if (entry->gpe_created) { - LIST_REMOVE(entry, gpe_entry); - g_free(entry); - } else { - entry->gpe_modified = 0; - entry->gpe_deleted = 1; - } - if (pp != NULL) g_wither_provider(pp, ENXIO); @@ -849,6 +841,14 @@ g_part_ctl_delete(struct gctl_req *req, gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); } + + if (entry->gpe_created) { + LIST_REMOVE(entry, gpe_entry); + g_free(entry); + } else { + entry->gpe_modified = 0; + entry->gpe_deleted = 1; + } return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 07:31:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBFA2106566B; Fri, 30 Jul 2010 07:31:50 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9038C8FC1B; Fri, 30 Jul 2010 07:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6U7VoKR093085; Fri, 30 Jul 2010 07:31:50 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6U7VoDg093083; Fri, 30 Jul 2010 07:31:50 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201007300731.o6U7VoDg093083@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 30 Jul 2010 07:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210635 - stable/8/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 07:31:50 -0000 Author: ae Date: Fri Jul 30 07:31:50 2010 New Revision: 210635 URL: http://svn.freebsd.org/changeset/base/210635 Log: MFC r210408: Document that SI unit suffixes are supported for -b and -s options of add verb. Mention about maximum size limit for "freebsd-boot" partition. It should be smaller than 545 KB (hardcoded in pmbr). Show usage of SI unit suffixes in example. Approved by: mav (mentor) Modified: stable/8/sbin/geom/class/part/gpart.8 Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/8/sbin/geom/class/part/gpart.8 Fri Jul 30 07:30:57 2010 (r210634) +++ stable/8/sbin/geom/class/part/gpart.8 Fri Jul 30 07:31:50 2010 (r210635) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2010 +.Dd July 23, 2010 .Dt GPART 8 .Os .Sh NAME @@ -84,9 +84,9 @@ utility: .\" ==== ADD ==== .Nm .Cm add -.Fl b Ar start -.Fl s Ar size .Fl t Ar type +.Op Fl b Ar start +.Op Fl s Ar size .Op Fl i Ar index .Op Fl l Ar label .Op Fl f Ar flags @@ -171,9 +171,13 @@ Add a new partition to the partitioning The partition begins on the logical block address given by the .Fl b Ar start option. -Its size is expressed in logical block numbers and given by the +Its size is given by the .Fl s Ar size -option. +option. SI unit suffixes are allowed. One or both +.Fl b +and +.Fl s +options can be ommitted. If so they are automatically calculated. The type of the partition is given by the .Fl t Ar type option. @@ -542,7 +546,7 @@ from a partition, and install bootstrap code into it. This partition must be larger than .Pa /boot/gptboot , -or the GPT boot you are planning to write. +or the GPT boot you are planning to write, but smaller than 545 KB. A size of 15 blocks (7680 bytes) would be sufficient for booting from UFS but let's use 128 blocks (64 KB) here in this example, in order to reserve some space for potential @@ -569,7 +573,7 @@ Create a 512MB-sized .Cm freebsd-ufs partition that would contain UFS where the system boots from. .Bd -literal -offset indent -/sbin/gpart add -b 0 -s 1048576 -t freebsd-ufs da0 +/sbin/gpart add -s 512M -t freebsd-ufs da0 .Ed .Pp After having created all required partitions, embed bootstrap code into them. From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 08:52:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98AB31065670; Fri, 30 Jul 2010 08:52:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86E808FC1F; Fri, 30 Jul 2010 08:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6U8qJbs010948; Fri, 30 Jul 2010 08:52:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6U8qJY6010944; Fri, 30 Jul 2010 08:52:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007300852.o6U8qJY6010944@svn.freebsd.org> From: Rui Paulo Date: Fri, 30 Jul 2010 08:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210636 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 08:52:19 -0000 Author: rpaulo Date: Fri Jul 30 08:52:19 2010 New Revision: 210636 URL: http://svn.freebsd.org/changeset/base/210636 Log: Fix previous commit: I forgot to include parenthesis. Submitted by: anonymous Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Jul 30 07:31:50 2010 (r210635) +++ head/share/mk/bsd.lib.mk Fri Jul 30 08:52:19 2010 (r210636) @@ -74,14 +74,14 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .c.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .cc.po .C.po .cpp.po .cxx.po: ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -92,57 +92,57 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .m.po: ${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .m.So: ${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .S.po: ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) all: objwarn @@ -214,8 +214,8 @@ ${SHLIB_NAME}: ${SOBJS} `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} + (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}) .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Jul 30 07:31:50 2010 (r210635) +++ head/share/mk/bsd.prog.mk Fri Jul 30 08:52:19 2010 (r210636) @@ -67,8 +67,8 @@ ${PROG}: ${OBJS} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} + (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) .else # !defined(SRCS) @@ -93,8 +93,8 @@ ${PROG}: ${OBJS} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} + (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) .endif .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Jul 30 07:31:50 2010 (r210635) +++ head/share/mk/sys.mk Fri Jul 30 08:52:19 2010 (r210636) @@ -157,14 +157,14 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .sh: cp ${.IMPSRC} ${.TARGET} @@ -175,14 +175,14 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -190,8 +190,8 @@ YFLAGS ?= -d rm -f y.tab.c mv y.tab.o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} @@ -199,8 +199,8 @@ YFLAGS ?= -d rm -f lex.yy.c mv lex.yy.o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -239,14 +239,14 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -257,14 +257,14 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -276,20 +276,20 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) # XXX not -j safe .y.o: @@ -297,16 +297,16 @@ YFLAGS ?= -d ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) # XXX not -j safe .y.c: @@ -319,16 +319,16 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) # XXX not -j safe .y.out: @@ -336,16 +336,16 @@ YFLAGS ?= -d ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} + (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 09:34:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 143331065676; Fri, 30 Jul 2010 09:34:41 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 040BA8FC1C; Fri, 30 Jul 2010 09:34:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6U9YeF2020320; Fri, 30 Jul 2010 09:34:40 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6U9Yeop020318; Fri, 30 Jul 2010 09:34:40 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201007300934.o6U9Yeop020318@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Jul 2010 09:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210637 - head/games/pom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 09:34:41 -0000 Author: uqs Date: Fri Jul 30 09:34:40 2010 New Revision: 210637 URL: http://svn.freebsd.org/changeset/base/210637 Log: Fix typo in pom(6) manpage PR: docs/148825 Submitted by: Anatoly Borodin MFC after: 1 week Modified: head/games/pom/pom.6 Modified: head/games/pom/pom.6 ============================================================================== --- head/games/pom/pom.6 Fri Jul 30 08:52:19 2010 (r210636) +++ head/games/pom/pom.6 Fri Jul 30 09:34:40 2010 (r210637) @@ -57,7 +57,7 @@ option to print just the phase as a perc Use the arguments .Fl d and -.Fl o +.Fl t to specify a specific date and time for which the phase of the moon has to be calculated. If From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 09:38:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18C9A1065674; Fri, 30 Jul 2010 09:38:48 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0E298FC16; Fri, 30 Jul 2010 09:38:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6U9cl35021237; Fri, 30 Jul 2010 09:38:47 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6U9clAN021233; Fri, 30 Jul 2010 09:38:47 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007300938.o6U9clAN021233@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 30 Jul 2010 09:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210638 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 09:38:48 -0000 Author: jchandra Date: Fri Jul 30 09:38:47 2010 New Revision: 210638 URL: http://svn.freebsd.org/changeset/base/210638 Log: MIPS n64 support - support kstack in XKSEG. - enable KX on entry from user-space, we need KX set to save to XKSEG addresses. - add MIPS_XKSEG_START to genassym.c - Add n64 case for swth.S Modified: head/sys/mips/mips/exception.S head/sys/mips/mips/genassym.c head/sys/mips/mips/swtch.S Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Fri Jul 30 09:34:40 2010 (r210637) +++ head/sys/mips/mips/exception.S Fri Jul 30 09:38:47 2010 (r210638) @@ -426,6 +426,12 @@ NNON_LEAF(MipsUserGenException, CALLFRAM /* * Save all of the registers except for the kernel temporaries in u.u_pcb. */ + mfc0 k0, MIPS_COP_0_STATUS + HAZARD_DELAY +#ifdef __mips_n64 + ori k1, k0, MIPS_SR_KX + mtc0 k1, MIPS_COP_0_STATUS +#endif GET_CPU_PCPU(k1) PTR_L k1, PC_CURPCB(k1) SAVE_U_PCB_REG(AT, AST, k1) @@ -443,7 +449,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM SAVE_U_PCB_REG(t2, T2, k1) SAVE_U_PCB_REG(t3, T3, k1) SAVE_U_PCB_REG(ta0, TA0, k1) - mfc0 a0, MIPS_COP_0_STATUS # First arg is the status reg. + move a0, k0 # First arg is the status reg. SAVE_U_PCB_REG(ta1, TA1, k1) SAVE_U_PCB_REG(ta2, TA2, k1) SAVE_U_PCB_REG(ta3, TA3, k1) @@ -642,6 +648,12 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r * Save the relevant user registers into the u.u_pcb struct. * We don't need to save s0 - s8 because the compiler does it for us. */ + mfc0 k0, MIPS_COP_0_STATUS + HAZARD_DELAY +#ifdef __mips_n64 + ori k1, k0, MIPS_SR_KX + mtc0 k1, MIPS_COP_0_STATUS +#endif GET_CPU_PCPU(k1) PTR_L k1, PC_CURPCB(k1) SAVE_U_PCB_REG(AT, AST, k1) @@ -680,7 +692,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r mflo v0 # get lo/hi late to avoid stall mfhi v1 - mfc0 a0, MIPS_COP_0_STATUS + move a0, k0 mfc0 a1, MIPS_COP_0_CAUSE MFC0 a3, MIPS_COP_0_EXC_PC SAVE_U_PCB_REG(v0, MULLO, k1) Modified: head/sys/mips/mips/genassym.c ============================================================================== --- head/sys/mips/mips/genassym.c Fri Jul 30 09:34:40 2010 (r210637) +++ head/sys/mips/mips/genassym.c Fri Jul 30 09:38:47 2010 (r210638) @@ -103,3 +103,4 @@ ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(MIPS_KSEG0_START, MIPS_KSEG0_START); ASSYM(MIPS_KSEG1_START, MIPS_KSEG1_START); ASSYM(MIPS_KSEG2_START, MIPS_KSEG2_START); +ASSYM(MIPS_XKSEG_START, MIPS_XKSEG_START); Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Fri Jul 30 09:34:40 2010 (r210637) +++ head/sys/mips/mips/swtch.S Fri Jul 30 09:38:47 2010 (r210638) @@ -278,10 +278,12 @@ blocked_loop: PTR_L a2, TD_PCB(a1) PTR_S a2, PC_CURPCB(a3) PTR_L v0, TD_KSTACK(a1) -#if !defined(__mips_n64) +#if defined(__mips_n64) + PTR_LI s0, MIPS_XKSEG_START +#else PTR_LI s0, MIPS_KSEG2_START # If Uarea addr is below kseg2, - bltu v0, s0, sw2 # no need to insert in TLB. #endif + bltu v0, s0, sw2 # no need to insert in TLB. lw a1, TD_UPTE + 0(s7) # a1 = u. pte #0 lw a2, TD_UPTE + 4(s7) # a2 = u. pte #1 /* From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 11:07:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A35B1065677; Fri, 30 Jul 2010 11:07:24 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59B048FC21; Fri, 30 Jul 2010 11:07:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UB7OOJ042276; Fri, 30 Jul 2010 11:07:24 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UB7O5S042273; Fri, 30 Jul 2010 11:07:24 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007301107.o6UB7O5S042273@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 30 Jul 2010 11:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210639 - head/usr.bin/grep/nls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 11:07:24 -0000 Author: gabor Date: Fri Jul 30 11:07:24 2010 New Revision: 210639 URL: http://svn.freebsd.org/changeset/base/210639 Log: - Add Ukranian catalog Submitted by: Alex Kozlov Added: head/usr.bin/grep/nls/uk_UA.UTF-8.msg (contents, props changed) Modified: head/usr.bin/grep/nls/Makefile.inc Modified: head/usr.bin/grep/nls/Makefile.inc ============================================================================== --- head/usr.bin/grep/nls/Makefile.inc Fri Jul 30 09:38:47 2010 (r210638) +++ head/usr.bin/grep/nls/Makefile.inc Fri Jul 30 11:07:24 2010 (r210639) @@ -9,6 +9,7 @@ NLS+= ja_JP.SJIS NLS+= ja_JP.UTF-8 NLS+= pt_BR.ISO8859-1 NLS+= ru_RU.KOI8-R +NLS+= uk_UA.UTF-8 NLSSRCDIR= ${.CURDIR}/nls .for lang in ${NLS} Added: head/usr.bin/grep/nls/uk_UA.UTF-8.msg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/uk_UA.UTF-8.msg Fri Jul 30 11:07:24 2010 (r210639) @@ -0,0 +1,12 @@ +$ $FreeBSD$ +$set 1 +$quote " +1 "(Ñтандартний ввод)" +2 "не можу прочитати ÑтиÑлий bzip2 файл" +3 "невiдома Ð¾Ð¿Ñ†Ñ–Ñ %s" +4 "викориÑтаннÑ: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A чиÑ] [-B чиÑ] [-C[чиÑ]]\n" +5 "\t[-e шаблон] [-f файл] [--binary-files=значеннÑ] [--color=коли]\n" +6 "\t[--context[=чиÑ] [--directories=діÑ] [--label] [--line-buffered]\n" +7 "\t[--null] [шаблон] [файл ...]\n" +8 "двійковий файл %s Ñпівпадає\n" +9 "%s (BSD grep) %s\n" From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 11:55:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F7C81065674; Fri, 30 Jul 2010 11:55:53 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F234D8FC13; Fri, 30 Jul 2010 11:55:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UBtqbA052903; Fri, 30 Jul 2010 11:55:52 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UBtq8F052900; Fri, 30 Jul 2010 11:55:52 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201007301155.o6UBtq8F052900@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 30 Jul 2010 11:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210640 - in stable/8/contrib/nvi: docs ex X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 11:55:53 -0000 Author: jh Date: Fri Jul 30 11:55:52 2010 New Revision: 210640 URL: http://svn.freebsd.org/changeset/base/210640 Log: MFC r208611: Fix misspelling of "substitution". PR: bin/130874 Modified: stable/8/contrib/nvi/docs/help stable/8/contrib/nvi/ex/ex_cmd.c Directory Properties: stable/8/contrib/nvi/ (props changed) Modified: stable/8/contrib/nvi/docs/help ============================================================================== --- stable/8/contrib/nvi/docs/help Fri Jul 30 11:07:24 2010 (r210639) +++ stable/8/contrib/nvi/docs/help Fri Jul 30 11:55:52 2010 (r210640) @@ -129,7 +129,7 @@ EX COMMANDS: ^D: scroll lines !: filter lines through commands or run commands #: display numbered lines - &: repeat the last subsitution + &: repeat the last substitution *: execute a buffer <: shift lines left =: display line number Modified: stable/8/contrib/nvi/ex/ex_cmd.c ============================================================================== --- stable/8/contrib/nvi/ex/ex_cmd.c Fri Jul 30 11:07:24 2010 (r210639) +++ stable/8/contrib/nvi/ex/ex_cmd.c Fri Jul 30 11:55:52 2010 (r210640) @@ -68,7 +68,7 @@ EXCMDLIST const cmds[] = { {"&", ex_subagain, E_ADDR2, "s", "[line [,line]] & [cgr] [count] [#lp]", - "repeat the last subsitution"}, + "repeat the last substitution"}, /* C_STAR */ {"*", ex_at, 0, "b", From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 11:58:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C09F1065678; Fri, 30 Jul 2010 11:58:18 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69A118FC32; Fri, 30 Jul 2010 11:58:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UBwIKX053476; Fri, 30 Jul 2010 11:58:18 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UBwID2053469; Fri, 30 Jul 2010 11:58:18 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201007301158.o6UBwID2053469@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Jul 2010 11:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210641 - in head: lib/libc/sys share/man/man4 tools/debugscripts usr.bin/ar usr.sbin/sysinstall/help usr.sbin/ugidfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 11:58:18 -0000 Author: uqs Date: Fri Jul 30 11:58:18 2010 New Revision: 210641 URL: http://svn.freebsd.org/changeset/base/210641 Log: Fix a couple of typos. PR: docs/148891 Submitted by: olgeni MFC after: 1 week Modified: head/lib/libc/sys/sctp_peeloff.2 head/share/man/man4/isp.4 head/tools/debugscripts/README head/usr.bin/ar/ar.1 head/usr.sbin/sysinstall/help/options.hlp head/usr.sbin/ugidfw/ugidfw.8 Modified: head/lib/libc/sys/sctp_peeloff.2 ============================================================================== --- head/lib/libc/sys/sctp_peeloff.2 Fri Jul 30 11:55:52 2010 (r210640) +++ head/lib/libc/sys/sctp_peeloff.2 Fri Jul 30 11:58:18 2010 (r210641) @@ -50,7 +50,7 @@ The .Fn sctp_peeloff system call attempts detach the association specified by .Fa id -into its own seperate socket. +into its own separate socket. .Pp .Sh RETURN VALUES The call returns -1 on failure and the new socket descriptor Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Fri Jul 30 11:55:52 2010 (r210640) +++ head/share/man/man4/isp.4 Fri Jul 30 11:58:18 2010 (r210641) @@ -207,7 +207,7 @@ for the values. This value says how long to wait in seconds after loop has gone down before giving up and expiring all of the devices that were visible. The default is 300 seconds (5 minutes). -A seperate (nonadjustable) timeout is used when +A separate (nonadjustable) timeout is used when booting to not stop booting on lack of FC connectivity. .It Va dev.isp.N.gone_device_time This value says how long to wait for devices to reappear if they (temporarily) Modified: head/tools/debugscripts/README ============================================================================== --- head/tools/debugscripts/README Fri Jul 30 11:55:52 2010 (r210640) +++ head/tools/debugscripts/README Fri Jul 30 11:58:18 2010 (r210641) @@ -15,7 +15,7 @@ perform kernel debugging, you would do: This directory also contains a kgdb script that given a crash dump number -automaticly extract the path to the kernel source, run gdb to extract +automatically extract the path to the kernel source, run gdb to extract information about kernel modules loaded, and then rerun gdb loading the necessary symbols for the modules. You need to make sure you build the -modules w/ debugging symbols seperately to get things to work. +modules w/ debugging symbols separately to get things to work. Modified: head/usr.bin/ar/ar.1 ============================================================================== --- head/usr.bin/ar/ar.1 Fri Jul 30 11:55:52 2010 (r210640) +++ head/usr.bin/ar/ar.1 Fri Jul 30 11:58:18 2010 (r210641) @@ -292,7 +292,7 @@ or options, .Nm gives a file-by-file description of the archive modification being -performed, which consists of three white-space seperated fields: +performed, which consists of three white-space separated fields: the option letter, a dash .Dq "-" , and the file name. Modified: head/usr.sbin/sysinstall/help/options.hlp ============================================================================== --- head/usr.sbin/sysinstall/help/options.hlp Fri Jul 30 11:55:52 2010 (r210640) +++ head/usr.sbin/sysinstall/help/options.hlp Fri Jul 30 11:58:18 2010 (r210641) @@ -152,7 +152,7 @@ Package Temp: Where package temporary f Some packages, like emacs, can use a LOT of temporary space - up to 20 or 30MB. If you are going to configure a small / directory and no - seperate /var (and hence a small /var/tmp), then you may wish to set + separate /var (and hence a small /var/tmp), then you may wish to set this to point at another location (say, /usr/tmp). Modified: head/usr.sbin/ugidfw/ugidfw.8 ============================================================================== --- head/usr.sbin/ugidfw/ugidfw.8 Fri Jul 30 11:55:52 2010 (r210640) +++ head/usr.sbin/ugidfw/ugidfw.8 Fri Jul 30 11:58:18 2010 (r210641) @@ -223,8 +223,7 @@ The subject can be required to have a pa .Ar uid and/or .Ar gid . -A range of uids/gids can be specified, -seperated by a colon. +A range of uids/gids can be specified, separated by a colon. The subject can be required to be in a particular jail with the .Ar jailid . .It Xo @@ -274,9 +273,9 @@ Objects can be required to be owned by t .Ar uid and/or .Ar gid . -A range of uids/gids can be specified, seperated by a colon. +A range of uids/gids can be specified, separated by a colon. The object can be required to be in a particular filesystem by -specifing the filesystem using +specifying the filesystem using .Cm filesys . Note, if the filesystem is unmounted and remounted, From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 12:04:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38E70106567A; Fri, 30 Jul 2010 12:04:30 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 256AF8FC0C; Fri, 30 Jul 2010 12:04:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UC4U6r055017; Fri, 30 Jul 2010 12:04:30 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UC4UrF055013; Fri, 30 Jul 2010 12:04:30 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201007301204.o6UC4UrF055013@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 30 Jul 2010 12:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210642 - in stable/8: tools/regression/usr.bin tools/regression/usr.bin/apply tools/regression/usr.bin/pkill usr.bin/apply X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 12:04:30 -0000 Author: jh Date: Fri Jul 30 12:04:29 2010 New Revision: 210642 URL: http://svn.freebsd.org/changeset/base/210642 Log: MFC r204761: - Use errx(3) instead of err(3) when checking if snprintf(3) succeeded. snprintf(3) doesn't set errno in the tested cases. - If the same argument reference (for example %1) was specified more than once, the command didn't necessarily fit to the final command buffer. Fix this using a dynamic sbuf buffer. Add a few regression tests for the case. PR: bin/95079 Added: stable/8/tools/regression/usr.bin/apply/ - copied from r204761, head/tools/regression/usr.bin/apply/ Modified: stable/8/tools/regression/usr.bin/Makefile stable/8/usr.bin/apply/Makefile stable/8/usr.bin/apply/apply.c Directory Properties: stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/usr.bin/apply/ (props changed) Modified: stable/8/tools/regression/usr.bin/Makefile ============================================================================== --- stable/8/tools/regression/usr.bin/Makefile Fri Jul 30 11:58:18 2010 (r210641) +++ stable/8/tools/regression/usr.bin/Makefile Fri Jul 30 12:04:29 2010 (r210642) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= calendar file2c join jot m4 printf sed tr uudecode uuencode xargs lastcomm +SUBDIR= apply calendar file2c join jot m4 printf sed tr uudecode uuencode xargs lastcomm .include Modified: stable/8/usr.bin/apply/Makefile ============================================================================== --- stable/8/usr.bin/apply/Makefile Fri Jul 30 11:58:18 2010 (r210641) +++ stable/8/usr.bin/apply/Makefile Fri Jul 30 12:04:29 2010 (r210642) @@ -3,5 +3,7 @@ PROG= apply WARNS?= 4 +DPADD= ${LIBSBUF} +LDADD= -lsbuf .include Modified: stable/8/usr.bin/apply/apply.c ============================================================================== --- stable/8/usr.bin/apply/apply.c Fri Jul 30 11:58:18 2010 (r210641) +++ stable/8/usr.bin/apply/apply.c Fri Jul 30 12:04:29 2010 (r210642) @@ -44,10 +44,12 @@ static char sccsid[] = "@(#)apply.c 8.4 __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include #include #include #include @@ -61,10 +63,13 @@ static int exec_shell(const char *, char static void usage(void); int -main(int argc, char *argv[]) { +main(int argc, char *argv[]) +{ + struct sbuf *cmdbuf; + long arg_max; int ch, debug, i, magic, n, nargs, offset, rval; - size_t clen, cmdsize, l; - char *c, *cmd, *name, *p, *q, *shell, *slashp, *tmpshell; + size_t cmdsize; + char *cmd, *name, *p, *shell, *slashp, *tmpshell; debug = 0; magic = '%'; /* Default magic char is `%'. */ @@ -144,13 +149,13 @@ main(int argc, char *argv[]) { p = cmd; offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]); if ((size_t)offset >= cmdsize) - err(1, "snprintf() failed"); + errx(1, "snprintf() failed"); p += offset; cmdsize -= offset; for (i = 1; i <= nargs; i++) { offset = snprintf(p, cmdsize, " %c%d", magic, i); if ((size_t)offset >= cmdsize) - err(1, "snprintf() failed"); + errx(1, "snprintf() failed"); p += offset; cmdsize -= offset; } @@ -164,61 +169,53 @@ main(int argc, char *argv[]) { } else { offset = snprintf(cmd, cmdsize, EXEC "%s", argv[0]); if ((size_t)offset >= cmdsize) - err(1, "snprintf() failed"); + errx(1, "snprintf() failed"); nargs = n; } - /* - * Grab some space in which to build the command. Allocate - * as necessary later, but no reason to build it up slowly - * for the normal case. - */ - if ((c = malloc(clen = 1024)) == NULL) + cmdbuf = sbuf_new(NULL, NULL, 1024, SBUF_AUTOEXTEND); + if (cmdbuf == NULL) err(1, NULL); + arg_max = sysconf(_SC_ARG_MAX); + /* * (argc) and (argv) are still offset by one to make it simpler to * expand %digit references. At the end of the loop check for (argc) * equals 1 means that all the (argv) has been consumed. */ for (rval = 0; argc > nargs; argc -= nargs, argv += nargs) { - /* - * Find a max value for the command length, and ensure - * there's enough space to build it. - */ - for (l = strlen(cmd), i = 0; i < nargs; i++) - l += strlen(argv[i+1]); - if (l > clen && (c = realloc(c, clen = l)) == NULL) - err(1, NULL); - + sbuf_clear(cmdbuf); /* Expand command argv references. */ - for (p = cmd, q = c; *p != '\0'; ++p) + for (p = cmd; *p != '\0'; ++p) { if (p[0] == magic && isdigit(p[1]) && p[1] != '0') { - offset = snprintf(q, l, "%s", - argv[(++p)[0] - '0']); - if ((size_t)offset >= l) - err(1, "snprintf() failed"); - q += offset; - l -= offset; - } else - *q++ = *p; + if (sbuf_cat(cmdbuf, argv[(++p)[0] - '0']) + == -1) + errc(1, ENOMEM, "sbuf"); + } else { + if (sbuf_putc(cmdbuf, *p) == -1) + errc(1, ENOMEM, "sbuf"); + } + if (sbuf_len(cmdbuf) > arg_max) + errc(1, E2BIG, NULL); + } /* Terminate the command string. */ - *q = '\0'; + sbuf_finish(cmdbuf); /* Run the command. */ if (debug) - (void)printf("%s\n", c); + (void)printf("%s\n", sbuf_data(cmdbuf)); else - if (exec_shell(c, shell, name)) + if (exec_shell(sbuf_data(cmdbuf), shell, name)) rval = 1; } if (argc != 1) errx(1, "expecting additional argument%s after \"%s\"", - (nargs - argc) ? "s" : "", argv[argc - 1]); + (nargs - argc) ? "s" : "", argv[argc - 1]); free(cmd); - free(c); + sbuf_delete(cmdbuf); free(shell); exit(rval); } From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 12:36:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C6691065679; Fri, 30 Jul 2010 12:36:40 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AAD38FC13; Fri, 30 Jul 2010 12:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UCaeax062096; Fri, 30 Jul 2010 12:36:40 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UCaenb062094; Fri, 30 Jul 2010 12:36:40 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201007301236.o6UCaenb062094@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Jul 2010 12:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210643 - in stable: 7/bin/chio 8/bin/chio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 12:36:40 -0000 Author: uqs Date: Fri Jul 30 12:36:40 2010 New Revision: 210643 URL: http://svn.freebsd.org/changeset/base/210643 Log: MFC r208730: Zero struct before reading from it PR: 140384 Modified: stable/8/bin/chio/chio.c Directory Properties: stable/8/bin/chio/ (props changed) Changes in other areas also in this revision: Modified: stable/7/bin/chio/chio.c Directory Properties: stable/7/bin/chio/ (props changed) Modified: stable/8/bin/chio/chio.c ============================================================================== --- stable/8/bin/chio/chio.c Fri Jul 30 12:04:29 2010 (r210642) +++ stable/8/bin/chio/chio.c Fri Jul 30 12:36:40 2010 (r210643) @@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et, /* Read in the changer slots */ if (cp.cp_nslots > 0) { + (void) memset(&cesr, 0, sizeof(cesr)); cesr.cesr_element_type = CHET_ST; cesr.cesr_element_base = 0; cesr.cesr_element_count = cp.cp_nslots; From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 12:36:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E104D106566C; Fri, 30 Jul 2010 12:36:40 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAD7E8FC18; Fri, 30 Jul 2010 12:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UCaeCR062102; Fri, 30 Jul 2010 12:36:40 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UCae9Y062100; Fri, 30 Jul 2010 12:36:40 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201007301236.o6UCae9Y062100@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Jul 2010 12:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210643 - in stable: 7/bin/chio 8/bin/chio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 12:36:41 -0000 Author: uqs Date: Fri Jul 30 12:36:40 2010 New Revision: 210643 URL: http://svn.freebsd.org/changeset/base/210643 Log: MFC r208730: Zero struct before reading from it PR: 140384 Modified: stable/7/bin/chio/chio.c Directory Properties: stable/7/bin/chio/ (props changed) Changes in other areas also in this revision: Modified: stable/8/bin/chio/chio.c Directory Properties: stable/8/bin/chio/ (props changed) Modified: stable/7/bin/chio/chio.c ============================================================================== --- stable/7/bin/chio/chio.c Fri Jul 30 12:04:29 2010 (r210642) +++ stable/7/bin/chio/chio.c Fri Jul 30 12:36:40 2010 (r210643) @@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et, /* Read in the changer slots */ if (cp.cp_nslots > 0) { + (void) memset(&cesr, 0, sizeof(cesr)); cesr.cesr_element_type = CHET_ST; cesr.cesr_element_base = 0; cesr.cesr_element_count = cp.cp_nslots; From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 12:45:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FCF3106566B; Fri, 30 Jul 2010 12:45:01 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F07EF8FC13; Fri, 30 Jul 2010 12:45:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UCj0km063991; Fri, 30 Jul 2010 12:45:00 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UCj0u2063986; Fri, 30 Jul 2010 12:45:00 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007301245.o6UCj0u2063986@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 30 Jul 2010 12:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210644 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 12:45:01 -0000 Author: jchandra Date: Fri Jul 30 12:45:00 2010 New Revision: 210644 URL: http://svn.freebsd.org/changeset/base/210644 Log: n64 support - enable UX bit in STATUS for kernel and userspace. - enable UX in kernel start, and kernel entry - keep UX flag in cpu_fork and cpu_set_upcall - enable UX for userspace Modified: head/sys/mips/mips/exception.S head/sys/mips/mips/locore.S head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Fri Jul 30 12:36:40 2010 (r210643) +++ head/sys/mips/mips/exception.S Fri Jul 30 12:45:00 2010 (r210644) @@ -238,7 +238,7 @@ SlowFault: #elif defined(TARGET_XLR_XLS) #define CLEAR_STATUS \ mfc0 a0, MIPS_COP_0_STATUS ;\ - li a2, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) ; \ + li a2, (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_COP_2_BIT) ; \ or a0, a0, a2 ; \ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ @@ -484,7 +484,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM #if defined(CPU_CNMIPS) or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) #elif defined(TARGET_XLR_XLS) - or t0, t0, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) + or t0, t0, (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_COP_2_BIT) #endif mtc0 t0, MIPS_COP_0_STATUS PTR_ADDU a0, k1, U_PCB_REGS @@ -708,7 +708,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r #ifdef CPU_CNMIPS or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) #elif defined(TARGET_XLR_XLS) - or t0, t0, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) + or t0, t0, (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_COP_2_BIT) #endif mtc0 t0, MIPS_COP_0_STATUS ITLBNOPFIX Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Fri Jul 30 12:36:40 2010 (r210643) +++ head/sys/mips/mips/locore.S Fri Jul 30 12:45:00 2010 (r210644) @@ -101,7 +101,7 @@ VECTOR(_locore, unknown) li t0, ~(MIPS_SR_DE | MIPS_SR_SOFT_RESET | MIPS_SR_ERL | MIPS_SR_EXL | MIPS_SR_INT_IE) #elif defined (TARGET_XLR_XLS) /* Set these bits */ - li t1, (MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | MIPS_SR_KX) + li t1, (MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | MIPS_SR_KX | MIPS_SR_UX) /* Reset these bits */ li t0, ~(MIPS_SR_BEV | MIPS_SR_SOFT_RESET | MIPS_SR_INT_IE) Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Fri Jul 30 12:36:40 2010 (r210643) +++ head/sys/mips/mips/pm_machdep.c Fri Jul 30 12:45:00 2010 (r210644) @@ -514,8 +514,10 @@ exec_setregs(struct thread *td, struct i td->td_frame->t9 = imgp->entry_addr & ~3; /* abicall req */ td->td_frame->sr = MIPS_SR_KSU_USER | MIPS_SR_EXL | MIPS_SR_INT_IE | (mips_rd_status() & MIPS_SR_INT_MASK); -#if defined(__mips_n32) || defined(__mips_n64) +#if defined(__mips_n32) td->td_frame->sr |= MIPS_SR_PX; +#elif defined(__mips_n64) + td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX; #endif #ifdef CPU_CNMIPS td->td_frame->sr |= MIPS_SR_COP_2_BIT | MIPS_SR_PX | MIPS_SR_UX | Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Fri Jul 30 12:36:40 2010 (r210643) +++ head/sys/mips/mips/vm_machdep.c Fri Jul 30 12:45:00 2010 (r210644) @@ -148,8 +148,8 @@ cpu_fork(register struct thread *td1,reg pcb2->pcb_context[PCB_REG_S0] = (register_t)(intptr_t)fork_return; pcb2->pcb_context[PCB_REG_S1] = (register_t)(intptr_t)td2; pcb2->pcb_context[PCB_REG_S2] = (register_t)(intptr_t)td2->td_frame; - pcb2->pcb_context[PCB_REG_SR] = (MIPS_SR_KX | MIPS_SR_INT_MASK) & - mips_rd_status(); + pcb2->pcb_context[PCB_REG_SR] = mips_rd_status() & + (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_INT_MASK); /* * FREEBSD_DEVELOPERS_FIXME: * Setup any other CPU-Specific registers (Not MIPS Standard) @@ -351,8 +351,8 @@ cpu_set_upcall(struct thread *td, struct pcb2->pcb_context[PCB_REG_S1] = (register_t)(intptr_t)td; pcb2->pcb_context[PCB_REG_S2] = (register_t)(intptr_t)td->td_frame; /* Dont set IE bit in SR. sched lock release will take care of it */ - pcb2->pcb_context[PCB_REG_SR] = (MIPS_SR_KX | MIPS_SR_INT_MASK) & - mips_rd_status(); + pcb2->pcb_context[PCB_REG_SR] = mips_rd_status() & + (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_INT_MASK); #ifdef CPU_CNMIPS pcb2->pcb_context[PCB_REG_SR] |= MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | @@ -414,8 +414,13 @@ cpu_set_upcall_kse(struct thread *td, vo /* * Keep interrupt mask */ - tf->sr = MIPS_SR_KSU_USER | MIPS_SR_EXL | (MIPS_SR_INT_MASK & mips_rd_status()) | - MIPS_SR_INT_IE; + td->td_frame->sr = MIPS_SR_KSU_USER | MIPS_SR_EXL | MIPS_SR_INT_IE | + (mips_rd_status() & MIPS_SR_INT_MASK); +#if defined(__mips_n32) + td->td_frame->sr |= MIPS_SR_PX; +#elif defined(__mips_n64) + td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX; +#endif #ifdef CPU_CNMIPS tf->sr |= MIPS_SR_INT_IE | MIPS_SR_COP_0_BIT | MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX; From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 12:56:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E236A1065677; Fri, 30 Jul 2010 12:56:34 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D18FE8FC19; Fri, 30 Jul 2010 12:56:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UCuYvv066560; Fri, 30 Jul 2010 12:56:34 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UCuYHu066558; Fri, 30 Jul 2010 12:56:34 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201007301256.o6UCuYHu066558@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Jul 2010 12:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210645 - head/sbin/geom/class/sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 12:56:35 -0000 Author: uqs Date: Fri Jul 30 12:56:34 2010 New Revision: 210645 URL: http://svn.freebsd.org/changeset/base/210645 Log: gsched(8) was first released with FreeBSD 8.1 MFC after: 3 days Modified: head/sbin/geom/class/sched/gsched.8 Modified: head/sbin/geom/class/sched/gsched.8 ============================================================================== --- head/sbin/geom/class/sched/gsched.8 Fri Jul 30 12:45:00 2010 (r210644) +++ head/sbin/geom/class/sched/gsched.8 Fri Jul 30 12:56:34 2010 (r210645) @@ -157,7 +157,7 @@ geom sched destroy -v ad0.sched. The .Nm utility first appeared in -.Fx 9.0 . +.Fx 8.1 . .Sh AUTHORS .An Fabio Checconi Aq fabio@FreeBSD.org .An Luigi Rizzo Aq luigi@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 13:23:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14FDE106566B; Fri, 30 Jul 2010 13:23:22 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02FA68FC15; Fri, 30 Jul 2010 13:23:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UDNLQa072475; Fri, 30 Jul 2010 13:23:21 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UDNLcA072472; Fri, 30 Jul 2010 13:23:21 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201007301323.o6UDNLcA072472@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 30 Jul 2010 13:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210646 - stable/8/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 13:23:22 -0000 Author: jh Date: Fri Jul 30 13:23:21 2010 New Revision: 210646 URL: http://svn.freebsd.org/changeset/base/210646 Log: MFC r207671: Fix deadlock between GEOM class unloading and withering. Withering can't proceed while g_unload_class() blocks the event thread. Fix this by not running g_unload_class() as a GEOM event and dropping the topology lock when withering needs to proceed. PR: kern/139847 Modified: stable/8/sys/geom/geom.h stable/8/sys/geom/geom_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/geom.h ============================================================================== --- stable/8/sys/geom/geom.h Fri Jul 30 12:56:34 2010 (r210645) +++ stable/8/sys/geom/geom.h Fri Jul 30 13:23:21 2010 (r210646) @@ -353,6 +353,9 @@ g_free(void *ptr) sx_assert(&topology_lock, SX_UNLOCKED); \ } while (0) +#define g_topology_sleep(chan, timo) \ + sx_sleep(chan, &topology_lock, 0, "gtopol", timo) + #define DECLARE_GEOM_CLASS(class, name) \ static moduledata_t name##_mod = { \ #name, g_modevent, &class \ Modified: stable/8/sys/geom/geom_subr.c ============================================================================== --- stable/8/sys/geom/geom_subr.c Fri Jul 30 12:56:34 2010 (r210645) +++ stable/8/sys/geom/geom_subr.c Fri Jul 30 13:23:21 2010 (r210646) @@ -134,65 +134,73 @@ g_load_class(void *arg, int flag) } } -static void -g_unload_class(void *arg, int flag) +static int +g_unload_class(struct g_class *mp) { - struct g_hh00 *hh; - struct g_class *mp; struct g_geom *gp; struct g_provider *pp; struct g_consumer *cp; int error; - g_topology_assert(); - hh = arg; - mp = hh->mp; - G_VALID_CLASS(mp); + g_topology_lock(); g_trace(G_T_TOPOLOGY, "g_unload_class(%s)", mp->name); - - /* - * We allow unloading if we have no geoms, or a class - * method we can use to get rid of them. - */ - if (!LIST_EMPTY(&mp->geom) && mp->destroy_geom == NULL) { - hh->error = EOPNOTSUPP; - return; - } - - /* We refuse to unload if anything is open */ +retry: + G_VALID_CLASS(mp); LIST_FOREACH(gp, &mp->geom, geom) { + /* We refuse to unload if anything is open */ LIST_FOREACH(pp, &gp->provider, provider) if (pp->acr || pp->acw || pp->ace) { - hh->error = EBUSY; - return; + g_topology_unlock(); + return (EBUSY); } LIST_FOREACH(cp, &gp->consumer, consumer) if (cp->acr || cp->acw || cp->ace) { - hh->error = EBUSY; - return; + g_topology_unlock(); + return (EBUSY); } + /* If the geom is withering, wait for it to finish. */ + if (gp->flags & G_GEOM_WITHER) { + g_topology_sleep(mp, 1); + goto retry; + } + } + + /* + * We allow unloading if we have no geoms, or a class + * method we can use to get rid of them. + */ + if (!LIST_EMPTY(&mp->geom) && mp->destroy_geom == NULL) { + g_topology_unlock(); + return (EOPNOTSUPP); } /* Bar new entries */ mp->taste = NULL; mp->config = NULL; - error = 0; + LIST_FOREACH(gp, &mp->geom, geom) { + error = mp->destroy_geom(NULL, mp, gp); + if (error != 0) { + g_topology_unlock(); + return (error); + } + } + /* Wait for withering to finish. */ for (;;) { gp = LIST_FIRST(&mp->geom); if (gp == NULL) break; - error = mp->destroy_geom(NULL, mp, gp); - if (error != 0) - break; + KASSERT(gp->flags & G_GEOM_WITHER, + ("Non-withering geom in class %s", mp->name)); + g_topology_sleep(mp, 1); } - if (error == 0) { - if (mp->fini != NULL) - mp->fini(mp); - LIST_REMOVE(mp, class); - } - hh->error = error; - return; + G_VALID_CLASS(mp); + if (mp->fini != NULL) + mp->fini(mp); + LIST_REMOVE(mp, class); + g_topology_unlock(); + + return (0); } int @@ -213,12 +221,12 @@ g_modevent(module_t mod, int type, void g_ignition++; g_init(); } - hh = g_malloc(sizeof *hh, M_WAITOK | M_ZERO); - hh->mp = data; error = EOPNOTSUPP; switch (type) { case MOD_LOAD: - g_trace(G_T_TOPOLOGY, "g_modevent(%s, LOAD)", hh->mp->name); + g_trace(G_T_TOPOLOGY, "g_modevent(%s, LOAD)", mp->name); + hh = g_malloc(sizeof *hh, M_WAITOK | M_ZERO); + hh->mp = mp; /* * Once the system is not cold, MOD_LOAD calls will be * from the userland and the g_event thread will be able @@ -236,18 +244,14 @@ g_modevent(module_t mod, int type, void } break; case MOD_UNLOAD: - g_trace(G_T_TOPOLOGY, "g_modevent(%s, UNLOAD)", hh->mp->name); - error = g_waitfor_event(g_unload_class, hh, M_WAITOK, NULL); - if (error == 0) - error = hh->error; + g_trace(G_T_TOPOLOGY, "g_modevent(%s, UNLOAD)", mp->name); + DROP_GIANT(); + error = g_unload_class(mp); + PICKUP_GIANT(); if (error == 0) { - KASSERT(LIST_EMPTY(&hh->mp->geom), - ("Unloaded class (%s) still has geom", hh->mp->name)); + KASSERT(LIST_EMPTY(&mp->geom), + ("Unloaded class (%s) still has geom", mp->name)); } - g_free(hh); - break; - default: - g_free(hh); break; } return (error); From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 13:54:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0538A1065675; Fri, 30 Jul 2010 13:54:16 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E806E8FC24; Fri, 30 Jul 2010 13:54:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UDsFW9079411; Fri, 30 Jul 2010 13:54:15 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UDsF8P079410; Fri, 30 Jul 2010 13:54:15 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <201007301354.o6UDsF8P079410@svn.freebsd.org> From: Doug Rabson Date: Fri, 30 Jul 2010 13:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210650 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 13:54:17 -0000 Author: dfr Date: Fri Jul 30 13:54:15 2010 New Revision: 210650 URL: http://svn.freebsd.org/changeset/base/210650 Log: A simple test harness to help debug problems with the ZFS boot code. Added: head/sys/boot/zfs/zfstest.c (contents, props changed) Added: head/sys/boot/zfs/zfstest.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/zfs/zfstest.c Fri Jul 30 13:54:15 2010 (r210650) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2010 Doug Rabson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +/* $FreeBSD$ */ +/* + * Compile with 'cc -I. -I../../cddl/boot/zfs zfstest.c -o zfstest' + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define NBBY 8 + +void +pager_output(const char *line) +{ + printf("%s", line); +} + +#include "zfsimpl.c" + +static int +vdev_read(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes) +{ + int fd = *(int *) priv; + + if (pread(fd, buf, bytes, off) != bytes) + return -1; + return 0; +} + +static int +zfs_read(spa_t *spa, dnode_phys_t *dn, void *buf, size_t size, off_t off) +{ + const znode_phys_t *zp = (const znode_phys_t *) dn->dn_bonus; + size_t n; + int rc; + + n = size; + if (off + n > zp->zp_size) + n = zp->zp_size - off; + + rc = dnode_read(spa, dn, off, buf, n); + if (rc) + return (rc); + + return (n); +} + +int +main(int argc, char** argv) +{ + int i, n, off; + int fd[99]; + spa_t *spa; + dnode_phys_t dn; + char buf[512]; + + zfs_init(); + if (argc == 1) { + static char *av[] = { + "zfstest", "/dev/da0p2", "/dev/da1p2", "/dev/da2p2", + NULL, + }; + argc = 4; + argv = av; + } + for (i = 1; i < argc; i++) { + fd[i] = open(argv[i], O_RDONLY); + if (fd[i] < 0) + continue; + if (vdev_probe(vdev_read, &fd[i], NULL) != 0) + close(fd[i]); + } + spa_all_status(); + + spa = STAILQ_FIRST(&zfs_pools); + if (!spa || zfs_mount_pool(spa)) + exit(1); + + if (zfs_lookup(spa, "zfs.c", &dn)) + exit(1); + + off = 0; + do { + n = zfs_read(spa, &dn, buf, 512, off); + write(1, buf, n); + off += n; + } while (n == 512); +} From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 13:56:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C93811065678; Fri, 30 Jul 2010 13:56:36 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDD58FC0C; Fri, 30 Jul 2010 13:56:36 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id A2CF435A83D; Fri, 30 Jul 2010 15:56:35 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 9942917357; Fri, 30 Jul 2010 15:56:35 +0200 (CEST) Date: Fri, 30 Jul 2010 15:56:35 +0200 From: Jilles Tjoelker To: jhell Message-ID: <20100730135635.GB42845@stack.nl> References: <201007291655.o6TGtR0k099119@svn.freebsd.org> <4C5212CC.2070201@dataix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C5212CC.2070201@dataix.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, FreeBSD SVN Source All , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210616 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 13:56:36 -0000 On Thu, Jul 29, 2010 at 07:46:20PM -0400, jhell wrote: > So what has been commited here is implicitly stating that instead of > using ( trap 'exit 1' 2 ) in a script to catch SIGINT and exit it is now > being done on behalf of the user with no way for them to control it ? No, this commit only changes something for interactive mode. It basically tries to create similar behaviour as the lines above (which have been in place for longer) but for the case with job control. The lines above do have an effect in non-interactive mode, for example: sh -c 'ftp; echo continued' Even if ^C has been typed in ftp(1), the shell continues. If a trap has been set on SIGINT, the code has no effect as int_pending is not set in that case. > Basically this has the same effect on a script that uses ( && ) and to > which now have the same meaning. > This script should print "PRINTME" twice when ^C during the sleep. > #!/bin/sh > sleep 5000; echo "PRINTME" > echo "PRINTME" No, this script should print nothing. This follows from common sense (users should be able to abort scripts unless those scripts do something to prevent it). A more technical explanation: because job control is not enabled, sh and sleep are in the same process group and therefore both receive terminal signals. Because sleep exited on the SIGINT, sh should exit on it, too. > Whereas this script with the old behavior would have done what is trying > to be done now for the first line but should still print only the second > "PRINTME" during a ^C of sleep. > #!/bin/sh > sleep 5000 && echo "PRINTME" > echo "PRINTME" This should not print anything either, for the same reasons. > And this script should not print anything when ^C is used during sleep. > #!/bin/sh > trap 'exit 1' 2 > sleep 5000 ; echo "PRINTME" > echo "PRINTME" Correct. > What is being done currently on stable/8 is incorrect... -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 14:05:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE4D01065673; Fri, 30 Jul 2010 14:05:20 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD96E8FC20; Fri, 30 Jul 2010 14:05:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UE5KXf081957; Fri, 30 Jul 2010 14:05:20 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UE5KEx081955; Fri, 30 Jul 2010 14:05:20 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201007301405.o6UE5KEx081955@svn.freebsd.org> From: Joel Dahl Date: Fri, 30 Jul 2010 14:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210652 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 14:05:21 -0000 Author: joel (doc committer) Date: Fri Jul 30 14:05:20 2010 New Revision: 210652 URL: http://svn.freebsd.org/changeset/base/210652 Log: Fix spelling. Modified: head/usr.bin/grep/grep.1 Modified: head/usr.bin/grep/grep.1 ============================================================================== --- head/usr.bin/grep/grep.1 Fri Jul 30 13:58:43 2010 (r210651) +++ head/usr.bin/grep/grep.1 Fri Jul 30 14:05:20 2010 (r210652) @@ -300,7 +300,7 @@ Use instead of .Xr read 2 to read input, which can result in better performance under some -circumstances but can cause undefined behaiour. +circumstances but can cause undefined behaviour. .It Fl m Ar num, Fl Fl max-count Ns = Ns Ar num Stop reading the file after .Ar num From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 14:38:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5429E106564A; Fri, 30 Jul 2010 14:38:36 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42F4D8FC22; Fri, 30 Jul 2010 14:38:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UEcaYQ089305; Fri, 30 Jul 2010 14:38:36 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UEcaAf089303; Fri, 30 Jul 2010 14:38:36 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007301438.o6UEcaAf089303@svn.freebsd.org> From: Ken Smith Date: Fri, 30 Jul 2010 14:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210654 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 14:38:36 -0000 Author: kensmith Date: Fri Jul 30 14:38:35 2010 New Revision: 210654 URL: http://svn.freebsd.org/changeset/base/210654 Log: Turn releng/8.1 over to secteam. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Jul 30 14:29:54 2010 (r210653) +++ svnadmin/conf/approvers Fri Jul 30 14:38:35 2010 (r210654) @@ -19,8 +19,7 @@ #^head/ re #^stable/8/ re #^stable/7/ re -^releng/8.1/ re -^releng/8.0/ (security-officer|so) +^releng/8.[0-1]/ (security-officer|so) ^releng/7.[0-3]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 15:25:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9E191065676; Fri, 30 Jul 2010 15:25:57 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A87EB8FC18; Fri, 30 Jul 2010 15:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UFPvQW099785; Fri, 30 Jul 2010 15:25:57 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UFPvnk099782; Fri, 30 Jul 2010 15:25:57 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007301525.o6UFPvnk099782@svn.freebsd.org> From: Rui Paulo Date: Fri, 30 Jul 2010 15:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210656 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 15:25:57 -0000 Author: rpaulo Date: Fri Jul 30 15:25:57 2010 New Revision: 210656 URL: http://svn.freebsd.org/changeset/base/210656 Log: Add missing escape characthers. Pointed out by: b.f. Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Jul 30 14:53:25 2010 (r210655) +++ head/share/mk/bsd.lib.mk Fri Jul 30 15:25:57 2010 (r210656) @@ -214,7 +214,7 @@ ${SHLIB_NAME}: ${SOBJS} `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} + (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \ ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}) .endif Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Jul 30 14:53:25 2010 (r210655) +++ head/share/mk/bsd.prog.mk Fri Jul 30 15:25:57 2010 (r210656) @@ -93,7 +93,7 @@ ${PROG}: ${OBJS} ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && + (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) .endif From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 16:23:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3818910656F8; Fri, 30 Jul 2010 16:23:46 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25B408FC1D; Fri, 30 Jul 2010 16:23:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UGNkvk012660; Fri, 30 Jul 2010 16:23:46 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UGNkmd012658; Fri, 30 Jul 2010 16:23:46 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007301623.o6UGNkmd012658@svn.freebsd.org> From: Benedict Reuschling Date: Fri, 30 Jul 2010 16:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210659 - stable/8/sbin/newfs_msdos X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 16:23:46 -0000 Author: bcr (doc committer) Date: Fri Jul 30 16:23:45 2010 New Revision: 210659 URL: http://svn.freebsd.org/changeset/base/210659 Log: MFC r210463: Clarify that the "number of bytes per sector"-range in the -S option is meant to be "inclusive". The original issue of the PR was already fixed. PR: docs/142418 Submitted by: David Naylor (naylor dot b dot david at gmail dot com) No objection from: kib Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 Directory Properties: stable/8/sbin/newfs_msdos/ (props changed) Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.8 Fri Jul 30 15:56:00 2010 (r210658) +++ stable/8/sbin/newfs_msdos/newfs_msdos.8 Fri Jul 30 16:23:45 2010 (r210659) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2009 +.Dd July 25, 2010 .Dt NEWFS_MSDOS 8 .Os .Sh NAME @@ -116,7 +116,7 @@ The default is .It Fl S Ar sector-size Number of bytes per sector. Acceptable values are powers of 2 -in the range 512 through 32768. +in the range 512 through 32768, inclusive. .It Fl a Ar FAT-size Number of sectors per FAT. .It Fl b Ar block-size From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 16:27:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 113BA1065679; Fri, 30 Jul 2010 16:27:42 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2DA28FC12; Fri, 30 Jul 2010 16:27:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UGRfqW013565; Fri, 30 Jul 2010 16:27:41 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UGRfKr013562; Fri, 30 Jul 2010 16:27:41 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007301627.o6UGRfKr013562@svn.freebsd.org> From: Benedict Reuschling Date: Fri, 30 Jul 2010 16:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210660 - stable/8/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 16:27:42 -0000 Author: bcr (doc committer) Date: Fri Jul 30 16:27:41 2010 New Revision: 210660 URL: http://svn.freebsd.org/changeset/base/210660 Log: MFC r210468: Apply a small grammar fix to {toupper,tolower}(3). PR: docs/140458 Submitted by: Jeremy Huddleston (Jeremyhu at apple dot com) Modified: stable/8/lib/libc/locale/tolower.3 stable/8/lib/libc/locale/toupper.3 Directory Properties: stable/8/lib/libc/locale/ (props changed) Modified: stable/8/lib/libc/locale/tolower.3 ============================================================================== --- stable/8/lib/libc/locale/tolower.3 Fri Jul 30 16:23:45 2010 (r210659) +++ stable/8/lib/libc/locale/tolower.3 Fri Jul 30 16:27:41 2010 (r210660) @@ -32,7 +32,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd July 25, 2010 .Dt TOLOWER 3 .Os .Sh NAME @@ -57,7 +57,7 @@ or the value of If the argument is an upper-case letter, the .Fn tolower function returns the corresponding lower-case letter if there is -one; otherwise the argument is returned unchanged. +one; otherwise, the argument is returned unchanged. .Sh COMPATIBILITY The .Bx 4.4 Modified: stable/8/lib/libc/locale/toupper.3 ============================================================================== --- stable/8/lib/libc/locale/toupper.3 Fri Jul 30 16:23:45 2010 (r210659) +++ stable/8/lib/libc/locale/toupper.3 Fri Jul 30 16:27:41 2010 (r210660) @@ -32,7 +32,7 @@ .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 17, 2005 +.Dd July 25, 2010 .Dt TOUPPER 3 .Os .Sh NAME @@ -57,7 +57,7 @@ or the value of If the argument is a lower-case letter, the .Fn toupper function returns the corresponding upper-case letter if there is -one; otherwise the argument is returned unchanged. +one; otherwise, the argument is returned unchanged. .Sh COMPATIBILITY The .Bx 4.4 From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 17:51:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE8D106566C; Fri, 30 Jul 2010 17:51:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5EB8FC19; Fri, 30 Jul 2010 17:51:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UHpN9P032002; Fri, 30 Jul 2010 17:51:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UHpNnM031998; Fri, 30 Jul 2010 17:51:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201007301751.o6UHpNnM031998@svn.freebsd.org> From: Xin LI Date: Fri, 30 Jul 2010 17:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210661 - head/sys/dev/et X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 17:51:23 -0000 Author: delphij Date: Fri Jul 30 17:51:22 2010 New Revision: 210661 URL: http://svn.freebsd.org/changeset/base/210661 Log: Change copyright holder to author. We prefer using a real legal entity for copyright holders. Approved by: sephe MFC after: 3 days Modified: head/sys/dev/et/if_et.c head/sys/dev/et/if_etreg.h head/sys/dev/et/if_etvar.h Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Fri Jul 30 16:27:41 2010 (r210660) +++ head/sys/dev/et/if_et.c Fri Jul 30 17:51:22 2010 (r210661) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 The DragonFly Project. All rights reserved. + * Copyright (c) 2007 Sepherosa Ziehau. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Sepherosa Ziehau Modified: head/sys/dev/et/if_etreg.h ============================================================================== --- head/sys/dev/et/if_etreg.h Fri Jul 30 16:27:41 2010 (r210660) +++ head/sys/dev/et/if_etreg.h Fri Jul 30 17:51:22 2010 (r210661) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 The DragonFly Project. All rights reserved. + * Copyright (c) 2007 Sepherosa Ziehau. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Sepherosa Ziehau Modified: head/sys/dev/et/if_etvar.h ============================================================================== --- head/sys/dev/et/if_etvar.h Fri Jul 30 16:27:41 2010 (r210660) +++ head/sys/dev/et/if_etvar.h Fri Jul 30 17:51:22 2010 (r210661) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 The DragonFly Project. All rights reserved. + * Copyright (c) 2007 Sepherosa Ziehau. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Sepherosa Ziehau From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 20:20:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF5A6106566B; Fri, 30 Jul 2010 20:20:16 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEA738FC14; Fri, 30 Jul 2010 20:20:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UKKG49064611; Fri, 30 Jul 2010 20:20:16 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UKKFQn064609; Fri, 30 Jul 2010 20:20:15 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201007302020.o6UKKFQn064609@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Jul 2010 20:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210662 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 20:20:16 -0000 Author: uqs Date: Fri Jul 30 20:20:14 2010 New Revision: 210662 URL: http://svn.freebsd.org/changeset/base/210662 Log: Fix indention of attribution line for some recent additions. MFC after: 3 days Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Fri Jul 30 17:51:22 2010 (r210661) +++ head/games/fortune/datfiles/fortunes Fri Jul 30 20:20:14 2010 (r210662) @@ -2110,7 +2110,7 @@ self-propagating. He who receives ideas from me, receives instruction himself without lessening mine; as he who lights his taper at mine receives light without darkening me. - -- Thomas Jefferson on patents on ideas + -- Thomas Jefferson on patents on ideas % "Heard you were moving your piano, so I came over to help." "Thanks. Got it upstairs already." @@ -57546,11 +57546,11 @@ LII: -- Norman Augustine % XML is a giant step in no direction at all. - -- Erik Naggum + -- Erik Naggum % XML is like violence: if it doesn't solve your problem, you aren't using enough of it. - -- XML guru Chris Maden + -- XML guru Chris Maden % X-rated movies are all alike -- the only thing they leave to the imagination is the plot. From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 20:25:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A055106564A; Fri, 30 Jul 2010 20:25:05 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 197178FC14; Fri, 30 Jul 2010 20:25:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6UKP4Eh065713; Fri, 30 Jul 2010 20:25:04 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UKP4kq065711; Fri, 30 Jul 2010 20:25:04 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201007302025.o6UKP4kq065711@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 30 Jul 2010 20:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210663 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 20:25:05 -0000 Author: mdf Date: Fri Jul 30 20:25:04 2010 New Revision: 210663 URL: http://svn.freebsd.org/changeset/base/210663 Log: Add MALLOC_DEBUG_MAXZONES=8 to powerpc64 GENERIC configuration file. Requested by: nwhitehorn Approved by: zml (mentor) Modified: head/sys/powerpc/conf/GENERIC64 Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Fri Jul 30 20:20:14 2010 (r210662) +++ head/sys/powerpc/conf/GENERIC64 Fri Jul 30 20:25:04 2010 (r210663) @@ -73,6 +73,7 @@ options INVARIANTS #Enable calls of ex options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS options WITNESS #Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # To make an SMP kernel, the next line is needed #options SMP # Symmetric MultiProcessor Kernel From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 21:28:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26E41065675; Fri, 30 Jul 2010 21:28:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A18218FC16; Fri, 30 Jul 2010 21:28:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ULSPFi079790; Fri, 30 Jul 2010 21:28:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ULSPjg079788; Fri, 30 Jul 2010 21:28:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201007302128.o6ULSPjg079788@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 30 Jul 2010 21:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210664 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 21:28:25 -0000 Author: bz Date: Fri Jul 30 21:28:25 2010 New Revision: 210664 URL: http://svn.freebsd.org/changeset/base/210664 Log: MFC r210532: Return NULL rather than 0 for a pointer. Modified: stable/7/sys/net/if.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if.c ============================================================================== --- stable/7/sys/net/if.c Fri Jul 30 20:25:04 2010 (r210663) +++ stable/7/sys/net/if.c Fri Jul 30 21:28:25 2010 (r210664) @@ -1356,7 +1356,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, u_int af = addr->sa_family; if (af >= AF_MAX) - return (0); + return (NULL); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != af) continue; From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 21:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06F2A106564A; Fri, 30 Jul 2010 21:39:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAD688FC1D; Fri, 30 Jul 2010 21:39:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ULdSg3082220; Fri, 30 Jul 2010 21:39:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ULdSj0082218; Fri, 30 Jul 2010 21:39:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201007302139.o6ULdSj0082218@svn.freebsd.org> From: Xin LI Date: Fri, 30 Jul 2010 21:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210665 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 21:39:29 -0000 Author: delphij Date: Fri Jul 30 21:39:28 2010 New Revision: 210665 URL: http://svn.freebsd.org/changeset/base/210665 Log: In rdmsr_safe, use zero extend (by doing a 32-bit movl over eax to itself) instead of a sign extend. Discussed with: stas MFC after: 1 month Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Fri Jul 30 21:28:25 2010 (r210664) +++ head/sys/amd64/amd64/support.S Fri Jul 30 21:39:28 2010 (r210665) @@ -729,7 +729,7 @@ ENTRY(rdmsr_safe) rdmsr /* Read MSR pointed by %ecx. Returns hi byte in edx, lo in %eax */ salq $32,%rdx /* sign-shift %rdx left */ - cltq /* sign-extend %eax -> %rax */ + movl %eax,%eax /* zero-extend %eax -> %rax */ orq %rdx,%rax movq %rax,(%rsi) xorq %rax,%rax From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 21:45:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790261065673; Fri, 30 Jul 2010 21:45:53 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68BA18FC14; Fri, 30 Jul 2010 21:45:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ULjrTj083667; Fri, 30 Jul 2010 21:45:53 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ULjr3k083665; Fri, 30 Jul 2010 21:45:53 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201007302145.o6ULjr3k083665@svn.freebsd.org> From: Andre Oppermann Date: Fri, 30 Jul 2010 21:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210666 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 21:45:53 -0000 Author: andre Date: Fri Jul 30 21:45:53 2010 New Revision: 210666 URL: http://svn.freebsd.org/changeset/base/210666 Log: Fix a bug in syncache where the initial CWND for new incoming connections was limited to one segment under the faulty assumption of a retransmit. Due to this the opportunity to initialize the increased congestion window according to RFC3390 was missed. Support for RFC3465 introduced in r187289 uncovered the bug as the ACK to SYN/ACK no longer caused snd_cwnd increase by MSS (actually, this increase shouldn't happen as it's explicitly forbidden by RFC3390, but it's another issue). Snd_cwnd remains really small (1*MSS + 1) and this causes really bad interaction with delayed acks on other side. The variable name sc_rxmits is a bit misleading as it counts all transmits, not just retransmits. Submitted by: Maxim Dounin MFC after: 10 days Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Fri Jul 30 21:39:28 2010 (r210665) +++ head/sys/netinet/tcp_syncache.c Fri Jul 30 21:45:53 2010 (r210666) @@ -804,8 +804,9 @@ syncache_socket(struct syncache *sc, str /* * If the SYN,ACK was retransmitted, reset cwnd to 1 segment. + * NB: sc_rxmits counts all SYN,ACK transmits, not just retransmits. */ - if (sc->sc_rxmits) + if (sc->sc_rxmits > 1) tp->snd_cwnd = tp->t_maxseg; tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); From owner-svn-src-all@FreeBSD.ORG Fri Jul 30 21:58:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 431D8106566C; Fri, 30 Jul 2010 21:58:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 326C28FC08; Fri, 30 Jul 2010 21:58:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ULwaIn086440; Fri, 30 Jul 2010 21:58:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ULwaOI086438; Fri, 30 Jul 2010 21:58:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201007302158.o6ULwaOI086438@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 30 Jul 2010 21:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210667 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2010 21:58:36 -0000 Author: bz Date: Fri Jul 30 21:58:35 2010 New Revision: 210667 URL: http://svn.freebsd.org/changeset/base/210667 Log: MFC r210532: Return NULL rather than 0 for a pointer. Modified: stable/8/sys/net/if.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Fri Jul 30 21:45:53 2010 (r210666) +++ stable/8/sys/net/if.c Fri Jul 30 21:58:35 2010 (r210667) @@ -1757,7 +1757,7 @@ ifaof_ifpforaddr(struct sockaddr *addr, u_int af = addr->sa_family; if (af >= AF_MAX) - return (0); + return (NULL); IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != af) From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 00:08:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 283E2106566B; Sat, 31 Jul 2010 00:08:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1813C8FC16; Sat, 31 Jul 2010 00:08:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6V08IdS014830; Sat, 31 Jul 2010 00:08:18 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6V08IYO014828; Sat, 31 Jul 2010 00:08:18 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007310008.o6V08IYO014828@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 00:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210668 - head/sys/modules/ata/atacore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 00:08:19 -0000 Author: rpaulo Date: Sat Jul 31 00:08:18 2010 New Revision: 210668 URL: http://svn.freebsd.org/changeset/base/210668 Log: pci_if.h is required to build atacore. Modified: head/sys/modules/ata/atacore/Makefile Modified: head/sys/modules/ata/atacore/Makefile ============================================================================== --- head/sys/modules/ata/atacore/Makefile Fri Jul 30 21:58:35 2010 (r210667) +++ head/sys/modules/ata/atacore/Makefile Sat Jul 31 00:08:18 2010 (r210668) @@ -4,6 +4,6 @@ KMOD= ata SRCS= ata-all.c ata-lowlevel.c ata-queue.c ata_if.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h +SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h .include From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 02:12:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A48A51065678; Sat, 31 Jul 2010 02:12:27 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 37E488FC1D; Sat, 31 Jul 2010 02:12:26 +0000 (UTC) Received: by iwn35 with SMTP id 35so2445682iwn.13 for ; Fri, 30 Jul 2010 19:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=InFNHpn42qqVq8EdiuVo/dU5dfwuAqa7jcrzjHHFldU=; b=ZYBbWJ1pqHiUZiGIPeK/+LwcZ6E3aAveuoLcHCJW/eURf8Zd4cOgkmDgjYY7ZW6u0M 2iafimQenb/hqcYMQ1pEATU6lNwMK3oy0p8AHIOWH2ldqFuwD3CSdyDZdmPA/3opMFMq VWRb3edXKs0053GFQWe5uSDxWHtggwHwsSJOA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=pW8fX79GBiiAT5Ej8debNvlXCpZ8sYRQ1AfSFbTAN9V/jSMnWc4UJ6YWIRYFAWKM1k djI3d32CqHMN/5g9twvmWa+4NnQykBXyMfRtJP3DVAsoua1b6WUrzdadomVS6sx56i5+ BzjpWKcJSz7sWEvPAm8+EimBXzmcR4ls3nrzA= Received: by 10.231.34.70 with SMTP id k6mr2808547ibd.25.1280542346552; Fri, 30 Jul 2010 19:12:26 -0700 (PDT) Received: from centel.dataix.local (adsl-99-19-46-227.dsl.klmzmi.sbcglobal.net [99.19.46.227]) by mx.google.com with ESMTPS id n20sm2516345ibe.23.2010.07.30.19.12.23 (version=SSLv3 cipher=RC4-MD5); Fri, 30 Jul 2010 19:12:24 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C538686.5050403@dataix.net> Date: Fri, 30 Jul 2010 22:12:22 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.11) Gecko/20100722 Thunderbird MIME-Version: 1.0 To: Jilles Tjoelker References: <201007291655.o6TGtR0k099119@svn.freebsd.org> <4C5212CC.2070201@dataix.net> <20100730135635.GB42845@stack.nl> In-Reply-To: <20100730135635.GB42845@stack.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=89D8547E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, FreeBSD SVN Source All , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210616 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 02:12:27 -0000 On 07/30/2010 09:56, Jilles Tjoelker wrote: > On Thu, Jul 29, 2010 at 07:46:20PM -0400, jhell wrote: >> So what has been commited here is implicitly stating that instead of >> using ( trap 'exit 1' 2 ) in a script to catch SIGINT and exit it is now >> being done on behalf of the user with no way for them to control it ? > > No, this commit only changes something for interactive mode. It > basically tries to create similar behaviour as the lines above (which > have been in place for longer) but for the case with job control. > > The lines above do have an effect in non-interactive mode, for example: > sh -c 'ftp; echo continued' > Even if ^C has been typed in ftp(1), the shell continues. If a trap has > been set on SIGINT, the code has no effect as int_pending is not set in > that case. > >> Basically this has the same effect on a script that uses ( && ) and to >> which now have the same meaning. > >> This script should print "PRINTME" twice when ^C during the sleep. > >> #!/bin/sh >> sleep 5000; echo "PRINTME" >> echo "PRINTME" > > No, this script should print nothing. This follows from common sense > (users should be able to abort scripts unless those scripts do something > to prevent it). A more technical explanation: because job control is not > enabled, sh and sleep are in the same process group and therefore both > receive terminal signals. Because sleep exited on the SIGINT, sh should > exit on it, too. > >> Whereas this script with the old behavior would have done what is trying >> to be done now for the first line but should still print only the second >> "PRINTME" during a ^C of sleep. > >> #!/bin/sh >> sleep 5000 && echo "PRINTME" >> echo "PRINTME" > > This should not print anything either, for the same reasons. > >> And this script should not print anything when ^C is used during sleep. >> #!/bin/sh >> trap 'exit 1' 2 >> sleep 5000 ; echo "PRINTME" >> echo "PRINTME" > > Correct. > >> What is being done currently on stable/8 is incorrect... > Thank you for you explanation with these. I was confusing the way SIGINT should be handled compared to how ";" is supposed to act. I did some tests against some other shells to and to my surprise they confirmed the same behavior that we have now which is correct. Thanks again & much appreciated, -- jhell,v From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 07:00:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FDB7106566B; Sat, 31 Jul 2010 07:00:35 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE468FC1D; Sat, 31 Jul 2010 07:00:34 +0000 (UTC) Received: by pzk7 with SMTP id 7so943317pzk.13 for ; Sat, 31 Jul 2010 00:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=T24NGvyaFwGjh/ARG0xFKg7B1yS2q1+HKJbcos7SGeU=; b=r0tb1Ml5Zy6gdXWBYRNNotGamwtbv/VmN/MSNv4Caey1tUS/dQGo2vTtBOX7w5hk+K 3YVa9Sn92XbIjisCqTucFtZBOyJIkQtFer2Dy22MScmgykq6wQCdZ6ESU76LcdMhN1l6 ZgNUx5mjA1KKiqefpOdzfcLrsKllKEOyCBifM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=V2esTJRQkBTD2yloItjE6Sn3f7s7c5SIDY2M799nUTwICG+abuSbJklouzSUllMOiW tcxyEjzG/z8spgw4JzgO9+lGJON20E0lO2IcMDI8Qgo4kVd6K8Xp1WvMAm0vt4ER0em4 o9Paruc7WLUEpzwkv+F0rFSKKIT7cfR9jFt3A= MIME-Version: 1.0 Received: by 10.142.47.3 with SMTP id u3mr2742292wfu.40.1280559634431; Sat, 31 Jul 2010 00:00:34 -0700 (PDT) Received: by 10.142.226.21 with HTTP; Sat, 31 Jul 2010 00:00:34 -0700 (PDT) In-Reply-To: <201007310008.o6V08IYO014828@svn.freebsd.org> References: <201007310008.o6V08IYO014828@svn.freebsd.org> Date: Sat, 31 Jul 2010 11:00:34 +0400 Message-ID: From: pluknet To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210668 - head/sys/modules/ata/atacore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 07:00:35 -0000 On 31 July 2010 04:08, Rui Paulo wrote: > Author: rpaulo > Date: Sat Jul 31 00:08:18 2010 > New Revision: 210668 > URL: http://svn.freebsd.org/changeset/base/210668 > > Log: > =A0pci_if.h is required to build atacore. > > Modified: > =A0head/sys/modules/ata/atacore/Makefile > > Modified: head/sys/modules/ata/atacore/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/modules/ata/atacore/Makefile =A0 =A0 =A0 Fri Jul 30 21:58:35= 2010 =A0 =A0 =A0 =A0(r210667) > +++ head/sys/modules/ata/atacore/Makefile =A0 =A0 =A0 Sat Jul 31 00:08:18= 2010 =A0 =A0 =A0 =A0(r210668) > @@ -4,6 +4,6 @@ > > =A0KMOD=3D =A0ata > =A0SRCS=3D =A0ata-all.c ata-lowlevel.c ata-queue.c ata_if.c > -SRCS+=3D opt_ata.h ata_if.h device_if.h bus_if.h > +SRCS+=3D opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h > > =A0.include Hmm.. That probably fixes universe failure on powerpc, mips, arm, sparc64 for me.. --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:01:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BF831065677; Sat, 31 Jul 2010 10:01:16 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AB938FC14; Sat, 31 Jul 2010 10:01:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VA1Gkn044280; Sat, 31 Jul 2010 10:01:16 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VA1GlN044276; Sat, 31 Jul 2010 10:01:16 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201007311001.o6VA1GlN044276@svn.freebsd.org> From: Joel Dahl Date: Sat, 31 Jul 2010 10:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210669 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:01:16 -0000 Author: joel (doc committer) Date: Sat Jul 31 10:01:15 2010 New Revision: 210669 URL: http://svn.freebsd.org/changeset/base/210669 Log: Spelling fixes. Modified: head/share/man/man9/DEVICE_PROBE.9 head/share/man/man9/VFS_VGET.9 head/share/man/man9/bios.9 head/share/man/man9/kproc.9 head/share/man/man9/sglist.9 head/share/man/man9/taskqueue.9 head/share/man/man9/timeout.9 head/share/man/man9/usbdi.9 Modified: head/share/man/man9/DEVICE_PROBE.9 ============================================================================== --- head/share/man/man9/DEVICE_PROBE.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/DEVICE_PROBE.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -114,7 +114,7 @@ return this value, while the one that su return BUS_PROBE_DEFAULT. .It BUS_PROBE_GENERIC The driver matches the type of device generally. -This allows drivers to match all serial ports generally, with sepcialized +This allows drivers to match all serial ports generally, with specialized drivers matching particular types of serial ports that need special treatment for some reason. .It BUS_PROBE_HOOVER Modified: head/share/man/man9/VFS_VGET.9 ============================================================================== --- head/share/man/man9/VFS_VGET.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/VFS_VGET.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -43,7 +43,7 @@ .Sh DESCRIPTION The .Fn VFS_VGET -looks up or creates a vnode from a (mount, inode#) tupple. +looks up or creates a vnode from a (mount, inode#) tuple. .Pp Its arguments are: .Bl -tag -width ".Fa flags" Modified: head/share/man/man9/bios.9 ============================================================================== --- head/share/man/man9/bios.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/bios.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -124,7 +124,7 @@ up to the given .Fa maxlen bytes (including trailing .Ql \e0 , -and any trailing space surpressed). +and any trailing space suppressed). If an error is encountered, i.e.\& trying to read out of said BIOS range, other invalid input, or .Fa buffer Modified: head/share/man/man9/kproc.9 ============================================================================== --- head/share/man/man9/kproc.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/kproc.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -248,7 +248,7 @@ pointer points to a pointer that is the location to be updated with the new proc pointer if a new process is created, or if not .Dv NULL , -must contain the process pointer for the already exisiting process. +must contain the process pointer for the already existing process. If this argument points to .Dv NULL , then a new process is created and the field updated. Modified: head/share/man/man9/sglist.9 ============================================================================== --- head/share/man/man9/sglist.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/sglist.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -151,7 +151,7 @@ or .Pp The .Nm sglist_clone -function returns a copy of an exising scatter/gather list object +function returns a copy of an existing scatter/gather list object .Fa sg . The .Fa mflags Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/taskqueue.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -172,7 +172,7 @@ function returns .No 1 if the given thread .Fa td -is part of the given taskqeueue +is part of the given taskqueue .Fa queue and .No 0 Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/timeout.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -234,7 +234,7 @@ after the callout function returns. .Pp The .Fn callout_init_rw -function serves the need of using rwlocks in conujunction with callouts. +function serves the need of using rwlocks in conjunction with callouts. The function does basically the same as .Fn callout_init_mtx with the possibility of specifying an extra @@ -249,7 +249,7 @@ may be specified: .Bl -tag -width ".Dv CALLOUT_SHAREDLOCK" .It Dv CALLOUT_SHAREDLOCK The lock is only acquired in read mode when running the callout handler. -It has no effects when used in conjuction with +It has no effects when used in conjunction with .Fa mtx . .El .Pp Modified: head/share/man/man9/usbdi.9 ============================================================================== --- head/share/man/man9/usbdi.9 Sat Jul 31 00:08:18 2010 (r210668) +++ head/share/man/man9/usbdi.9 Sat Jul 31 10:01:15 2010 (r210669) @@ -294,7 +294,7 @@ usb_default_callback(struct usb_xfer *xf /* * Read usb frame data, if any. * "actlen" has the total length for all frames - * transfered. + * transferred. */ break; From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:12:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D741065678; Sat, 31 Jul 2010 10:12:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 462658FC0A; Sat, 31 Jul 2010 10:12:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VACs4h046835; Sat, 31 Jul 2010 10:12:54 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VACsZ8046832; Sat, 31 Jul 2010 10:12:54 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007311012.o6VACsZ8046832@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 31 Jul 2010 10:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210670 - stable/8/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:12:54 -0000 Author: bschmidt Date: Sat Jul 31 10:12:53 2010 New Revision: 210670 URL: http://svn.freebsd.org/changeset/base/210670 Log: MFC r210209: - Add new IDs for 6000 series devices. - The 6000 series WiMAX devices need a separate firmware. - The b-gen devices are not hooked because the hardware revision type is not know. Obtained from: OpenBSD Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:01:15 2010 (r210669) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:12:53 2010 (r210670) @@ -320,8 +320,17 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x4239, "Intel(R) PRO/Wireless 6000" }, { 0x8086, 0x422B, "Intel(R) PRO/Wireless 6000" }, { 0x8086, 0x422C, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x0086, "Intel(R) PRO/Wireless 6050" }, - { 0x8086, 0x0087, "Intel(R) PRO/Wireless 6050" }, + { 0x8086, 0x0087, "Intel(R) PRO/Wireless 6250" }, + { 0x8086, 0x0089, "Intel(R) PRO/Wireless 6250" }, + { 0x8086, 0x0082, "Intel(R) PRO/Wireless 6205a" }, + { 0x8086, 0x0085, "Intel(R) PRO/Wireless 6205a" }, +#ifdef notyet + { 0x8086, 0x008a, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x008b, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x008f, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x0090, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x0091, "Intel(R) PRO/Wireless 6205b" }, +#endif { 0, 0, NULL } }; @@ -734,7 +743,14 @@ iwn_hal_attach(struct iwn_softc *sc) case IWN_HW_REV_TYPE_6050: sc->sc_hal = &iwn5000_hal; sc->limits = &iwn6000_sensitivity_limits; - sc->fwname = "iwn6000fw"; + sc->fwname = "iwn6050fw"; + sc->txchainmask = IWN_ANT_AB; + sc->rxchainmask = IWN_ANT_AB; + break; + case IWN_HW_REV_TYPE_6005: + sc->sc_hal = &iwn5000_hal; + sc->limits = &iwn6000_sensitivity_limits; + sc->fwname = "iwn6005fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; break; @@ -5751,8 +5767,7 @@ iwn_apm_init(struct iwn_softc *sc) IWN_CLRBITS(sc, IWN_GIO, IWN_GIO_L0S_ENA); if (sc->hw_type != IWN_HW_REV_TYPE_4965 && - sc->hw_type != IWN_HW_REV_TYPE_6000 && - sc->hw_type != IWN_HW_REV_TYPE_6050) + sc->hw_type <= IWN_HW_REV_TYPE_1000) IWN_SETBITS(sc, IWN_ANA_PLL, IWN_ANA_PLL_INIT); /* Wait for clock stabilization before accessing prph. */ Modified: stable/8/sys/dev/iwn/if_iwnreg.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnreg.h Sat Jul 31 10:01:15 2010 (r210669) +++ stable/8/sys/dev/iwn/if_iwnreg.h Sat Jul 31 10:12:53 2010 (r210670) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnreg.h,v 1.37 2010/02/17 18:23:00 damien Exp $ */ +/* $OpenBSD: if_iwnreg.h,v 1.38 2010/04/10 08:37:36 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -204,6 +204,7 @@ #define IWN_HW_REV_TYPE_1000 6 #define IWN_HW_REV_TYPE_6000 7 #define IWN_HW_REV_TYPE_6050 8 +#define IWN_HW_REV_TYPE_6005 11 /* Possible flags for register IWN_GIO_CHICKEN. */ #define IWN_GIO_CHICKEN_L1A_NO_L0S_RX (1 << 23) From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:15:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64992106564A; Sat, 31 Jul 2010 10:15:18 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535848FC1B; Sat, 31 Jul 2010 10:15:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VAFIiC047453; Sat, 31 Jul 2010 10:15:18 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VAFIkP047451; Sat, 31 Jul 2010 10:15:18 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007311015.o6VAFIkP047451@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 31 Jul 2010 10:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210671 - stable/8/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:15:18 -0000 Author: bschmidt Date: Sat Jul 31 10:15:18 2010 New Revision: 210671 URL: http://svn.freebsd.org/changeset/base/210671 Log: MFC r210110: Detect active chains differently to work around a firmware bug which would mark non-existing chains as active. Obtained from: OpenBSD Modified: stable/8/sys/dev/iwn/if_iwn.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:12:53 2010 (r210670) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:15:18 2010 (r210671) @@ -4134,10 +4134,14 @@ iwn_collect_noise(struct iwn_softc *sc, val = MAX(calib->rssi[2], val); /* Determine which antennas are connected. */ - sc->chainmask = 0; + sc->chainmask = sc->rxchainmask; for (i = 0; i < 3; i++) - if (val - calib->rssi[i] <= 15 * 20) - sc->chainmask |= 1 << i; + if (val - calib->rssi[i] > 15 * 20) + sc->chainmask &= ~(1 << i); + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: RX chains mask: theoretical=0x%x, actual=0x%x\n", + __func__, sc->rxchainmask, sc->chainmask); + /* If none of the TX antennas are connected, keep at least one. */ if ((sc->chainmask & sc->txchainmask) == 0) sc->chainmask |= IWN_LSB(sc->txchainmask); From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:16:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B90106566B; Sat, 31 Jul 2010 10:16:41 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 845578FC17; Sat, 31 Jul 2010 10:16:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VAGfJU047820; Sat, 31 Jul 2010 10:16:41 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VAGfeV047816; Sat, 31 Jul 2010 10:16:41 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007311016.o6VAGfeV047816@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 31 Jul 2010 10:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210672 - stable/8/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:16:42 -0000 Author: bschmidt Date: Sat Jul 31 10:16:41 2010 New Revision: 210672 URL: http://svn.freebsd.org/changeset/base/210672 Log: MFC r210111: Add support for firmware images in "type-length-value" format. Obtained from: OpenBSD Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnreg.h stable/8/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:15:18 2010 (r210671) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:16:41 2010 (r210672) @@ -231,6 +231,10 @@ static int iwn4965_load_firmware(struct static int iwn5000_load_firmware_section(struct iwn_softc *, uint32_t, const uint8_t *, int); static int iwn5000_load_firmware(struct iwn_softc *); +static int iwn_read_firmware_leg(struct iwn_softc *, + struct iwn_fw_info *); +static int iwn_read_firmware_tlv(struct iwn_softc *, + struct iwn_fw_info *, uint16_t); static int iwn_read_firmware(struct iwn_softc *); static int iwn_clock_wait(struct iwn_softc *); static int iwn_apm_init(struct iwn_softc *); @@ -5644,39 +5648,19 @@ iwn5000_load_firmware(struct iwn_softc * return 0; } +/* + * Extract text and data sections from a legacy firmware image. + */ static int -iwn_read_firmware(struct iwn_softc *sc) +iwn_read_firmware_leg(struct iwn_softc *sc, struct iwn_fw_info *fw) { - const struct iwn_hal *hal = sc->sc_hal; - struct iwn_fw_info *fw = &sc->fw; const uint32_t *ptr; + size_t hdrlen = 24; uint32_t rev; - size_t size; - - IWN_UNLOCK(sc); - - /* Read firmware image from filesystem. */ - sc->fw_fp = firmware_get(sc->fwname); - if (sc->fw_fp == NULL) { - device_printf(sc->sc_dev, - "%s: could not load firmare image \"%s\"\n", __func__, - sc->fwname); - IWN_LOCK(sc); - return EINVAL; - } - IWN_LOCK(sc); - - size = sc->fw_fp->datasize; - if (size < 28) { - device_printf(sc->sc_dev, - "%s: truncated firmware header: %zu bytes\n", - __func__, size); - return EINVAL; - } - /* Process firmware header. */ ptr = (const uint32_t *)sc->fw_fp->data; rev = le32toh(*ptr++); + /* Check firmware API version. */ if (IWN_FW_API(rev) <= 1) { device_printf(sc->sc_dev, @@ -5685,34 +5669,27 @@ iwn_read_firmware(struct iwn_softc *sc) } if (IWN_FW_API(rev) >= 3) { /* Skip build number (version 2 header). */ - size -= 4; + hdrlen += 4; ptr++; } + if (fw->size < hdrlen) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } fw->main.textsz = le32toh(*ptr++); fw->main.datasz = le32toh(*ptr++); fw->init.textsz = le32toh(*ptr++); fw->init.datasz = le32toh(*ptr++); fw->boot.textsz = le32toh(*ptr++); - size -= 24; - - /* Sanity-check firmware header. */ - if (fw->main.textsz > hal->fw_text_maxsz || - fw->main.datasz > hal->fw_data_maxsz || - fw->init.textsz > hal->fw_text_maxsz || - fw->init.datasz > hal->fw_data_maxsz || - fw->boot.textsz > IWN_FW_BOOT_TEXT_MAXSZ || - (fw->boot.textsz & 3) != 0) { - device_printf(sc->sc_dev, "%s: invalid firmware header\n", - __func__); - return EINVAL; - } /* Check that all firmware sections fit. */ - if (fw->main.textsz + fw->main.datasz + fw->init.textsz + - fw->init.datasz + fw->boot.textsz > size) { + if (fw->size < hdrlen + fw->main.textsz + fw->main.datasz + + fw->init.textsz + fw->init.datasz + fw->boot.textsz) { device_printf(sc->sc_dev, "%s: firmware file too short: %zu bytes\n", - __func__, size); + __func__, fw->size); return EINVAL; } @@ -5726,6 +5703,151 @@ iwn_read_firmware(struct iwn_softc *sc) return 0; } +/* + * Extract text and data sections from a TLV firmware image. + */ +int +iwn_read_firmware_tlv(struct iwn_softc *sc, struct iwn_fw_info *fw, + uint16_t alt) +{ + const struct iwn_fw_tlv_hdr *hdr; + const struct iwn_fw_tlv *tlv; + const uint8_t *ptr, *end; + uint64_t altmask; + uint32_t len; + + if (fw->size < sizeof (*hdr)) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } + hdr = (const struct iwn_fw_tlv_hdr *)fw->data; + if (hdr->signature != htole32(IWN_FW_SIGNATURE)) { + device_printf(sc->sc_dev, + "%s: bad firmware file signature 0x%08x\n", + __func__, le32toh(hdr->signature)); + return EINVAL; + } + + /* + * Select the closest supported alternative that is less than + * or equal to the specified one. + */ + altmask = le64toh(hdr->altmask); + while (alt > 0 && !(altmask & (1ULL << alt))) + alt--; /* Downgrade. */ + + ptr = (const uint8_t *)(hdr + 1); + end = (const uint8_t *)(fw->data + fw->size); + + /* Parse type-length-value fields. */ + while (ptr + sizeof (*tlv) <= end) { + tlv = (const struct iwn_fw_tlv *)ptr; + len = le32toh(tlv->len); + + ptr += sizeof (*tlv); + if (ptr + len > end) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } + /* Skip other alternatives. */ + if (tlv->alt != 0 && tlv->alt != htole16(alt)) + goto next; + + switch (le16toh(tlv->type)) { + case IWN_FW_TLV_MAIN_TEXT: + fw->main.text = ptr; + fw->main.textsz = len; + break; + case IWN_FW_TLV_MAIN_DATA: + fw->main.data = ptr; + fw->main.datasz = len; + break; + case IWN_FW_TLV_INIT_TEXT: + fw->init.text = ptr; + fw->init.textsz = len; + break; + case IWN_FW_TLV_INIT_DATA: + fw->init.data = ptr; + fw->init.datasz = len; + break; + case IWN_FW_TLV_BOOT_TEXT: + fw->boot.text = ptr; + fw->boot.textsz = len; + break; + default: + DPRINTF(sc, IWN_DEBUG_RESET, + "%s: TLV type %d not handled\n", + __func__, le16toh(tlv->type)); + break; + } +next: /* TLV fields are 32-bit aligned. */ + ptr += (len + 3) & ~3; + } + return 0; +} + +static int +iwn_read_firmware(struct iwn_softc *sc) +{ + const struct iwn_hal *hal = sc->sc_hal; + struct iwn_fw_info *fw = &sc->fw; + int error; + + IWN_UNLOCK(sc); + + memset(fw, 0, sizeof (*fw)); + + /* Read firmware image from filesystem. */ + sc->fw_fp = firmware_get(sc->fwname); + if (sc->fw_fp == NULL) { + device_printf(sc->sc_dev, + "%s: could not load firmare image \"%s\"\n", __func__, + sc->fwname); + IWN_LOCK(sc); + return EINVAL; + } + IWN_LOCK(sc); + + fw->size = sc->fw_fp->datasize; + fw->data = (const uint8_t *)sc->fw_fp->data; + if (fw->size < sizeof (uint32_t)) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } + + /* Retrieve text and data sections. */ + if (*(const uint32_t *)fw->data != 0) /* Legacy image. */ + error = iwn_read_firmware_leg(sc, fw); + else + error = iwn_read_firmware_tlv(sc, fw, 1); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not read firmware sections\n", __func__); + return error; + } + + /* Make sure text and data sections fit in hardware memory. */ + if (fw->main.textsz > hal->fw_text_maxsz || + fw->main.datasz > hal->fw_data_maxsz || + fw->init.textsz > hal->fw_text_maxsz || + fw->init.datasz > hal->fw_data_maxsz || + fw->boot.textsz > IWN_FW_BOOT_TEXT_MAXSZ || + (fw->boot.textsz & 3) != 0) { + device_printf(sc->sc_dev, + "%s: firmware sections too large\n", __func__); + return EINVAL; + } + + /* We can proceed with loading the firmware. */ + return 0; +} + static int iwn_clock_wait(struct iwn_softc *sc) { Modified: stable/8/sys/dev/iwn/if_iwnreg.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnreg.h Sat Jul 31 10:15:18 2010 (r210671) +++ stable/8/sys/dev/iwn/if_iwnreg.h Sat Jul 31 10:16:41 2010 (r210672) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnreg.h,v 1.38 2010/04/10 08:37:36 damien Exp $ */ +/* $OpenBSD: if_iwnreg.h,v 1.40 2010/05/05 19:41:57 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -1260,6 +1260,34 @@ struct iwn_fw_dump { uint32_t time[2]; } __packed; +/* TLV firmware header. */ +struct iwn_fw_tlv_hdr { + uint32_t zero; /* Always 0, to differentiate from legacy. */ + uint32_t signature; +#define IWN_FW_SIGNATURE 0x0a4c5749 /* "IWL\n" */ + + uint8_t descr[64]; + uint32_t rev; +#define IWN_FW_API(x) (((x) >> 8) & 0xff) + + uint32_t build; + uint64_t altmask; +} __packed; + +/* TLV header. */ +struct iwn_fw_tlv { + uint16_t type; +#define IWN_FW_TLV_MAIN_TEXT 1 +#define IWN_FW_TLV_MAIN_DATA 2 +#define IWN_FW_TLV_INIT_TEXT 3 +#define IWN_FW_TLV_INIT_DATA 4 +#define IWN_FW_TLV_BOOT_TEXT 5 +#define IWN_FW_TLV_PBREQ_MAXLEN 6 + + uint16_t alt; + uint32_t len; +} __packed; + #define IWN4965_FW_TEXT_MAXSZ ( 96 * 1024) #define IWN4965_FW_DATA_MAXSZ ( 40 * 1024) #define IWN5000_FW_TEXT_MAXSZ (256 * 1024) @@ -1268,8 +1296,6 @@ struct iwn_fw_dump { #define IWN4965_FWSZ (IWN4965_FW_TEXT_MAXSZ + IWN4965_FW_DATA_MAXSZ) #define IWN5000_FWSZ IWN5000_FW_TEXT_MAXSZ -#define IWN_FW_API(x) (((x) >> 8) & 0xff) - /* * Offsets into EEPROM. */ Modified: stable/8/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnvar.h Sat Jul 31 10:15:18 2010 (r210671) +++ stable/8/sys/dev/iwn/if_iwnvar.h Sat Jul 31 10:16:41 2010 (r210672) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnvar.h,v 1.17 2010/02/17 18:23:00 damien Exp $ */ +/* $OpenBSD: if_iwnvar.h,v 1.18 2010/04/30 16:06:46 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -150,7 +150,8 @@ struct iwn_fw_part { }; struct iwn_fw_info { - u_char *data; + const uint8_t *data; + size_t size; struct iwn_fw_part init; struct iwn_fw_part main; struct iwn_fw_part boot; From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:18:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 900FE1065672; Sat, 31 Jul 2010 10:18:15 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5BA8FC0C; Sat, 31 Jul 2010 10:18:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VAIF2e048200; Sat, 31 Jul 2010 10:18:15 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VAIFkB048195; Sat, 31 Jul 2010 10:18:15 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007311018.o6VAIFkB048195@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 31 Jul 2010 10:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210673 - in stable/8/sys: amd64/conf conf contrib/dev/iwn i386/conf modules/iwnfw modules/iwnfw/iwn6000 modules/iwnfw/iwn6050 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:18:15 -0000 Author: bschmidt Date: Sat Jul 31 10:18:15 2010 New Revision: 210673 URL: http://svn.freebsd.org/changeset/base/210673 Log: MFC r210113: - Update 6000 firmware to 9.221.4.1 - Add 6050 firmware Added: stable/8/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu - copied unchanged from r210113, head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu stable/8/sys/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu - copied unchanged from r210113, head/sys/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu stable/8/sys/modules/iwnfw/iwn6050/ - copied from r210113, head/sys/modules/iwnfw/iwn6050/ Deleted: stable/8/sys/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu Modified: stable/8/sys/amd64/conf/NOTES stable/8/sys/conf/files stable/8/sys/i386/conf/NOTES stable/8/sys/modules/iwnfw/Makefile stable/8/sys/modules/iwnfw/iwn6000/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Sat Jul 31 10:16:41 2010 (r210672) +++ stable/8/sys/amd64/conf/NOTES Sat Jul 31 10:18:15 2010 (r210673) @@ -325,6 +325,7 @@ device ath_rate_sample # SampleRate tx # iwn5000fw: Specific module for the 5000 only # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only +# iwn6050fw: Specific module for the 6050 only # mwlfw: Marvell 88W8363 firmware # wpifw: Intel 3945ABG Wireless LAN Controller firmware @@ -342,6 +343,7 @@ device iwn1000fw device iwn5000fw device iwn5150fw device iwn6000fw +device iwn6050fw device mwlfw device wpifw Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sat Jul 31 10:16:41 2010 (r210672) +++ stable/8/sys/conf/files Sat Jul 31 10:18:15 2010 (r210673) @@ -1179,7 +1179,21 @@ iwn6000fw.fwo optional iwn6000fw | iwn clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency ".PHONY" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn6000.fw" +iwn6050fw.c optional iwn6050fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn6050fw.c" +iwn6050fw.fwo optional iwn6050fw | iwnfw \ + dependency "iwn6050.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6050.fw" \ + no-implicit-rule \ + clean "iwn6050fw.fwo" +iwn6050.fw optional iwn6050fw | iwnfw \ + dependency ".PHONY" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn6000.fw" dev/ixgb/if_ixgb.c optional ixgb Copied: stable/8/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu (from r210113, head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu Sat Jul 31 10:18:15 2010 (r210673, copy of r210113, head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu) @@ -0,0 +1,8017 @@ +Copyright (c) 2006-2010, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +begin-base64 644 iwlwifi-6000-9.221.4.1.fw.uu +AQTdCbxjAADQOAIAAEABAOQ2AgAAQAEAAAAAACAggA8AAEAAaSAAAGkgQABpIAAAaSBAACAggA8A +AOgAaSAAAGkgQABpIAAAaSBAACAggA8AAHAGaSAAAGkgQABpIAAASiAAAEohAABKIgAASiMAAEok +AABKJQAASiYAAEonAABKIAAQSiEAEEoiABBKIwAQSiQAEEolABBKJgAQSicAEEogACBKIQAgSiIA +IEojACBKJAAgSiUAIEomACBKJwAgSiAAMEohADAKJIA/gQAAQEEsnDBALJwwQiQcNAoigD+AAOSC +CiMANwYPAABKJgBwaSBAAEomAHBKJgBwSiYAcEomAHAAFgBwgABsBEB4ICBAhwAAAAAAAAAAAADP +caqqu7vPcJ8AuP82oDagNqA2oM9xoADIOw6BiLgOoWkgQAD+8eB48cClwUHAQsEMHAAxEBxAMc9x +gAD8gzQZwA8wGQAPLBnADigZgA4kGUAOz3CAAPyDIBhAC89wgAD8gxwYAAvPcIAA/IMYGMAKz3CA +APyDFBiACs9wgAD8gxAYwAjPcIAA/IMMGIAIz3CAAPyDCBhACM9xgACAg4AZAAh8GcAHeBmAB3QZ +QAdwGQAHbBkAB2gZgAZkGUAGYBkABlwZwAVYGYAFVBlABVAZAAVMGcAESBmABEQZQARAGQAE76HO +oa2hjKEsGcACKBmAAiQZQAIgGQACHBnAARgZgAEUGUABEBkAAWOhaiAAA9gZAABqIMAC1BkAAGog +gALQGQAAaiBAAcgZAABqIAABxBkAAGogwADAGQAAaiCAALwZAABqIEAAuBkAAGogAAC0GQAAaiCA +AcwZAABA2J+4z3GfALj/HaHPcKD+BQAWoVMjwAQFIIAPsP4AABahGIFTJ841UyXENVMmxTWUuBih +QMMBwALB17oMFAYwyXMA3boNIAAQFAcwz3CgALQPvKDPcaAAyDsugVINIAB92D4PAAAuCWAAqXAI +2ADZ2ghgAJm5z3CAADCNAJCO4MwgooLKIIEP4ADEMcohIQAEDmEAzyGhBQbx4HjhwOHB4cLPcaAA +yB8WEQCGz3KAAJiYAKISEQCGAaITEQCGAqIUEQCGA6IVEQCGBKIkEQCGBqLPcJ8AuP9WoIog/w8S +GRiAExkYgBQZGIAVGRiAJBkYgMHCwcHBwCAgQIcMyM9yoADIHw4aGIANyA8aGIAOyBAaGIAPEgE2 +AcgkeBEaGIAQyC0aGIDgfuHE/BzIvvwcSL7hwOHB4cLhw/wcCLH8HEix/ByIsfwcyLH8HAiy/BxI +svwciLL8HMiy/BwIv2okgBDhxGokwBDhxPHAz3CgANAbFIDPcYAAaAQEIICPz1EE4QChCvIvKQEA +z3CAAOhA8CBAAEB42v/RwMHEayTAEMHEaySAEMHEn3QEFAs0BBQKNAQUCTQEFAg0BBQHNAQUBjQE +FAU0BBQENMHDwcLBwcHAwcRFLH4QCiZAfsHEaySAFMHEICBAhwzIh7gMGhgwDcibuA0aGDAOyA4a +GDAPyIe4DxoYMBDIEBoYMOB+4HjxwAzIlbgMGhgwDcibuA0aGDAPyIq4jbiQuA8aGDDPcIAAOEIY +iIHgC/QPyM9xAABUGKy4DxoYMOoPYAAP2GfYXgsgAIohxwnRwOB+8cDPcIAAcMgAgIYg/oEO9A/I +BSCADwAAANQPGhgwAtgyCyAAiiHHC57/iiBVBSYLIACKIQcO5PHPcQMAQA3PcKAAqCAtoM9xgACo +BECBAWoAoc9woAA4LgWABCCAD8AAAADXcMAAAAAK8kjYz3GfALj/GqFboWnYGLgZoc9wgABoCCWA +I4EggcdxAACIE10EQAngeM9wgABoCO0DQAngePHAbgxAAYDgz3eAAGgEiHUF8oHgBfQB2ALwANgL +r4DhBfKB4QX0AdgC8ADYCq+A4gXygeIF9AHYAvAA2AyvANjPdqAAyB8YHhiQC4+A4IohEAAP8giP +gOAL8s9wAwBADUUeGBAwpgLYGB4YkALwMaYKj4DgGfIJj4DgF/LPcAIAzjggHhiQz3CAACgAIR4Y +kM9wgABkBCIeGJAYFgCWRSAAAxgeGJAMj4DgCPIYFgCWhSABBBgeGJCB4wf0GBYAloi4GB4YkM9w +gAAwjQCQjuDMIKKCBvQYFgCWgLgYHhiQgOUZ8gDYlLjPdYAAnAQApXHYBrhaDSAA/Nkghc9wAABM +HE4NIACfuRgWAJaFuBgeGJDFA0AB4HjxwHvYlgkgAPDZz3afALj/HYYKIcAnQN+fv/2mz3Gg/gQA +NqZTJsA0BSCAD7D+AAAWps91oADIHxkVEpbPcAAARBwqC2AACiDAL3pwGRUAllEgAIIh8j2G/abP +coAAAAAEggHg07gEogUggA/Q/gAAFqZYHoAXIRUAliIVAJbPcoAA0AQAghamAYIWpgjYGR0YkDam +PaYH2NIKYAAKuFMgQQcH2JIMIAAKuM9woADUCxiAQiAACEggAADPd4AAfD/PcYAAnAQggeAfABAL +IcCEyiUiE8ogYgAy9EwigKAP9FEjgKUJ8oDgB/RBK00lwL0c5QHYJPAE3SHwjCIEoBzyTCIAohTy +CvZMIkCgDvJMIgChFPQT3RPwTCIApAryjCIBoAz0Ft0L8A3dCfAU3QfwFd0F8BfdA/AP3QDYgeAG +9FgewBSuCgACcYepcApxKnIKJIAEZQHv/wolwAQlBc//8cB2CAAAddgyCCAAiiHLAloJgABKCIAC +F/82DUAACiHAD+tyBtiKIwsHSiQAAC0B7/8KJQAB4HjxwL4JQAHPc4AAFAlDgwDfz3WgACwgsIXS +atR+fmalpgSmAeKMIhCAJqZDo4X3AoPjowHgAqPxAUAB4HgA2M9xoADIHxihGaEB2A6h4H7gePHA +RglAAQh3unHacvpzCiIAIQojQCEKIYAhz3AAAMgbYglgAAogwCEbcM9wAADMG1IJQAA7cM9wAAAE +HEYJQADPdaAAyB+acAHYE6URFQCWBdjPdoAAgAjhpgCmDsAgHgAUCaYVhRweQBQKphiFGB7AFAum +GYUUHoAUDKagFQAQEB7AFQ2mpBUAEAwegBUOpqgVABAIHkAVD6bPcAEA3QkQpuIIYAAo2BGm2ghg +AADYEqZTJ8B1E6YCyFQeABcWphIVAJZQHgAXF6YTFQCWz3KAAIAIGKYUFQCWUyQBIxmmFRUAlhC5 +GqYkFQCWSiRAeRumFhUAlhymz3CAAHw/EYAdps9wgACACHgYgArPcIAAgAh8GMAKz3CAAPwIBBgA +C4QaQAvPcKAAyBwIgIgaAADPcIAA5AQAgIwaAAAvIAcGCLgFeS8gRwYleJAaAAAA2KggQAPwIgMA +z3GfALj/dqHgeOB44HjgeAHgHQBAAeB4iiRBfQDZqCAABM9wgAAkOfAgQAAAgOB44HjgeOB44Hjg +eAHh4H7geOB+4HjgfuB44H7geOB+4HjgfuB44H7geOB+4HjgfuB44H7geOB+4HjgfuB44H8B2PHA +z3GAAHw/EaHgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjR +wOB+4HjhxeHGQCkNAiV9QC0DFIjipXsIdZD3UyV+kAbyAR1SEGG6+/FBKo4AwbpCJk6QBB3QEP31 +gOIK8i8kiXDgeKgggAEBHVIQ4HjBxuB/wcXgeChyANnW8eB48cAKDwABocEId892oACsLxmGBCCA +D3AAAADXcCAAAAAB2MB4LyYH8Ch1GnIT9IogSQYiDe//iiFNCDmGFg3v/4ogCQaKIAkGCg3v/6lx +ANgk8BHMABxEM08gwQMB4BB4BCCADwAA/7+PuAIcRDARGhwwOg0gEEAnABIH5wQnjx8AAPz/BScA +FJ24n7jscQChAMHscCCgAdjVBiABocDgeCK5BvDscmCiBOBhuYHhYIA69wDZz3CgANQLbaDPcKAA +RB01oOB+4HjxwEoOAAEIdih1KHBIcWhyyv+B4MoggQPAD+H/yiFBA5UGAAHhxc9ygACEBKSKgOXP +cp8AuP8G8s9z0Lr+yn6iGqI7ooDlDvLPcKAAOC4FgAQggA/AAAAA13DAAAAA9vNp2Bi4GaLgf8HF +4HjxwNoNAAEId89xgACEBAWJAN6A4KnBQMZD9AHdpanPcYAAgI/PcKAAzCstoADYj7gRGhwwIRqC +M+YNYA2LcL4NQALPcAEA3QlBwIogUABCwM9wgACwegCIZMUC3REcAjAAwBIcQjMTHAIwz3CAABQJ +RcDPcIAAgAhGwM9wgADkBACAQ8Yg2QHaR8BIx4HAPdsXu8H/CNgB2cj/BBpYM6UFIAGpwAPaz3Gg +ABQERaHPcaAA1AsNoeB+8cDhxc9yoADUCwPdsaIA23CiBRICN9dyAAAAQAHawiKKABe6x3IADgAA +RSICBp26n7rsdUClAtogGoIwCBINNuxyoKIREgI3AeIRGpww7HIAogISAjbscECg7HAgoAHYz3Wg +AMgfE6U4hexwIKAZhd//dB3YkM9xoADIOw6BiLgOoRkFAAHgePHAANgIEoEw3P8IEoUwCiHAD+ty +B9iKI9EI5QOv/0okAADgeADaA/AB4kEogQAwcrz34H7PcYAAfD9EGcAHz3GgAMgfXIGduJ64TRkY +gOB44HjgeOB44HjgeOB44HgcgeB+4HgD2s9xoAAUBEWhz3GgAPwLDKngfgPaz3GgABQERaHPcaAA +CAwAseB+BcwA2tdwAAAAQAHYwiAKABe4x3AADgAATyCBAJ25n7nscCCgz3CgABQEA9kloAISATbP +cKAA1AstoM9woABEHVWg4H6A4VTyQCHCA8O5j+GcAC0AJLozJkFwgAAEbEAng3I0ewB7ABYBQAQY +UAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQ +AAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAA +ABYBQEIiQoAEGFAAv/XgfuB4gOLhxSLyY2rBuoPiPAAtACK7MyaCcIAAFGxAJ41yVH0AfQQQAgQE +GZAABBACBAQZkAAEEAIEBBmQAEIjQ4AEEAIEBBmQAO/19wTP/4Di4cVT8kAiwwPDuo/ingAtACS7 +MyaCcIAAGGxAJw1yVH0AfQEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgAB +EIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQ +ggQBGZIAARCCBAEZkgABEIIEARmSAEIjQ4ABEIIEARmSAL71SwTP/+B48cAmCgABKHZGIc0AHWUi +uZL/wb6B5g7yguYI8oPmDfQAFoBAAR0SEAAWgEABHRIQABaAQACtXQIAAeB4gOHKJE1w4HjoIK0B +ABYBQQIYVADgfuB4gOHKJE1w4HjoIK0BABaBQAEYUgDgfuB48cC6CSABUyFCAE4iDQHPcqAAFATJ +ggDbDiaCHwAAAAZQccohxg/KIsYHyiBmAcojhg8AAAwCyiRmAOAApv/KJcYAgOHKJE1wyiLNAOgg +LQJOYM9xoAA4BAHiyKmB5Q7yguUI8oPlDvTPcKAAOARoqM9woAA4BGioz3CgADgEaKilAQAB4cUA +2g/woIANc6CjoYANc6CjooANc6Cjo4ANc6CjEOAB4kEpAwFwcq/3ANsG8AQQDQQNcqCiAeNTIcIA +IrpQc7f3ANsG8AEQjQQNcqCqAeNTIUIAUHO59/sCz/8A289ynwC4/xqie6I+os9wAGwEABmi4H7x +wLoIIAEA2qHBGnDPcNS6/spAwM9xnwC4/2gZAAQE2Buhi3AeoZ26z3CgANAbUaDPcABtABAZoQXw +4gjv/4ogSQVRIUDH+/MAFAUwDCWAj9S6/so69CDdz3OgAMgfsKMB2EMbGAAA2I24/P6xo89xnwC4 +/2gZAAQE2Buhi3AeoQDYnbgTGxiAz3AAbQAQGaEF8IoI7/+KIAkKUSFAx/vzABQFMAwlgI/Uuv7K +yiHBD8oiwQfKIGEByiOBDwAAbAJgB2H/yiQBBIEB7/+ocOB4z3GAAIQEZImA489ynwC4/wXyz3HQ +uv7KPqIaooDjDvLPcKAAOC4FgAQggA/AAAAA13DAAAAA9vNq2Bi4GaIcguB+4HjxwK4P4ACYcCh2 +SHXs/wYggQOIcKV5Xf4BAAABz3GgADQfBKEB2AehCIGA4P71BYHgfuB48cB2D+AASiQAAgDdz3cA +AAQdqXYVIoAzHBABBgDYz3KgABQEyqKooieiBKI9ZYjhaLnKIQ4A6XBH/kIkRABMJACAIOcB5ij3 +lQfAAEEpgYAK8i8kSXDgeKgggAEEEAIE7HFAoeB+4HjxwBIPwAAIdSh2og3gD0AhAAIFzNdwAAAA +QAHYwiAKABe4ACCBDwAOAAAHbgQggA8AAPz/JXiduJ+47HEAoQISATbscCCgIr4F8OxxAKEE5WG+ +geYAhTv3YP4lB8AA4HgH2c9yoADUBxoaWICA4A7yGRIBhgkgQwAPEgGGAiDAgHlhDxpYgPb14H7g +eKHB8cAFEgI313IAAABAAdrCIooAF7rHcgAOAACDuuxzQKPscgCiKHBJ/tHA4H+hwPHA4cXPcIAA +MI0miIDhMPIniIDhLPKgkE9th+IJ9zMmgnCAAChsQCeBclR5AHkA2RHwJJAH3YDhAdnAeQvwJJAI +3YXhAdnAeQXwJJCE4QHZwHmB4QzyCBAFAQohwA/rchDYiiPPCVEFb/+YdV0GwAChweB/ocDgeOB+ +4HjxwNoN4AC4cc9ygAAohQW5MCJEAFEkQIOiwQbyz3OAALTOBfDPc4AAxMtAIwIGQCMBB1EkQILK +IcIPyiLCB8ojgg8AAEUE9ARi/8ogYgHPdoAAMIlALY0BpmbovkDGIMUE8sK9qmEP8FEmQJIH8kQl +ARxEuSpiiboF8FMlwRA8eSpjz3GAADCIFiFBASKJDrlFeSCgsQXgAKLA4HiA4fHAA/Kg4Iv2CiHA +D+tyBdj120okQACFBG//uHPPcoAA6EAVeiCi0cDgfgDZnrkZec9ygADcQAGCJXjgfwGiANmeuRl5 +z3KAANxAAYImeOB/AaLPcoAA3EAhgkKCJHoA2Z65GXkEIYAAQiAAgOB/yiBiAM9wgADcQAGA4H8v +KAEA4HjPcYAA3EDgfwKh4HjxwD4OT//geOB44HjgeGkggAFvIT8AaSAAAPfx8cBq2M4Kr/+KIUQG +ANiNuMYLoAQKGhgwFMyGIP+KCfLPcIAAFQUAiIDgZAnCBKjx8cCKCcAEz3GAAHw78CEAAEB4z3Cg +ANAbgNpQoM9wgAAAAACAUSAAggDZBvLPcJ8AuP89oIzx4HjxwCYMwADPcYAAAAAAgVEgwIAb8gGB +USDAgEDYzyDiB8oggQ8AANAAzyDhB89ynwC4/x2iBIEB4NO4BKEFIIAP0P4AABaiz3CAAGgEoIDP +cIAAOEIIgAQljR8PAADg67gB3gb0pglAC4DgDvTPcaAAtEcA2EsZGIB3GZiDANieuFQZGIDPcoAA +tAQgguGCBCWEHwEAAABALIAApHgEJYMfAAAAQAd5A7sgoqR7BHlnfwYlQBDhogQlgR8AAACALyIC +AUV5ArnkewQljR8CAAAAZnikeSZ4LygBAE4gQQTPcIAAKIPwIEIAz3CAAAzOhCoLDDAgQA5TIECA +GxpYMC30z3CfALj/OKCG4Rn0z3KAAIiXCZKA4AzyGxqYM8lxz3KAAHw/HIIB4ByiF/AMkoDgE/IE +2RsaWDDz8YThzCFigAv0z3CAAIiXDpCA4AXyBtkbGlgw5fHPcqAAFAQqos9wgADkBwCIgeAF9AmC +uOAA2IL3AdiA4Aj0z3CgAIggNXjAoDnwz3GAABwFANgAoQDZkbnPcKAAyB8TGFiAz3CAANgCEHjP +daAAtEdJHRiQz3GAACSnz3CAACQFIKBvJ0MQVB3Yk6oJoAQKGpgzPghAC4DgEfQA2JG4z3GgAMgf +ExkYgM9wgAAIBBB4SR0YkFQd2JOdAsAA4HjxwC4KwADPcIAAYECEEAEAgBACAM91oADIH0R5Ly5B +EM9xAwBADZ/mRR1YEADfIPLPcYAAAABAgfK6GvJBgfK6QNrPIuIHyiKBDwAA0ADPIuEHz3OfALj/ +XaNEgQHi07pEoQUigg/Q/gAAVqPwIIADQHif5gvyz3CAAAAAAIDyuAXyz3CfALj//aCA2BUdGJAF +AsAA8cDPcYAAaAR82NYPb/8ggQohwA/rcgXYiiPEA0okAADdAG//CiUAAfHA4cXPcIAAaASggGvY +BCWNHw8AAOCiD2//iiFICC8oQQN+DeAOTiBABAolAIDKIcIPyiLCB8ogYgHKI4IPAAAnApQAYv/K +JGIAf9gKuM9xoADQGxOhf9gQoZEBwADgePHA4cXPdYAAAAAAhe+4GvIBhe+4QNjPIOIHyiCBDwAA +0ADPIOEHz3GfALj/HaEEhQHg07gEpQUggA/Q/gAAFqFr2BYPb/+KIQgN9gzgDgTYCiUAgMohwg/K +IsIHyiBiAcojgg8AADYCDABi/8okYgAAhe+4BvIA2c9wnwC4/z2gCQHAAEokgHYA2aggwAPPcIAA +aEE2eGGAQIDPcIAAYEAB4VV4YKDgfuB+4HhRIUDHBfINyL24DRoYMADZnbnPcKAA0BsxoOB+4H7g +ePHAgeDMIKKABfTPcoAAOEIE8M9ygAAgy89xgAC0mIHgzCDigCn0aIJgoWmCYaF8imipfYppqSoS +gwBqqSsSgwBrqSwSgwBsqXSSdqltkmexd5JosWiCwLt0qWiCBCODDwAGAACA4wHbwHtyqYQSAgBU +GZgAHPBggWiiYYFpomiJfKppiX2qaokqGsIAa4krGsIAbIksGsIAdol0smeRbbJokXeyVBEDBoQa +wACC4Ab0vgnv/0AhAAbRwOB+z3CAACDLIIDPcqAAgCUmoiKQJ6IigCqiJpAros9xgABwyCCBUSFA +gCCAFfQooiKQKaIigDGiJpAyoiKAN6ImkDiiIoA7oiaQPKIggDmiIpA6oiCANaIikDai8QFAD+B4 +8cAqD4AAz3CAADivAN7UqM9wgABwyACAUSBAgBPyCN/JdYDlzCWikMwlIpHMJWKRzAsiBcogQgNh +v4DnAeUz9xzwiiQBcc9xgACIl6ggQAEEGZAD4HgA2UokAHLPcoAA4JmoIAADFiJAAHaQz3CAAACY +NHgB4WCwz3WAACDLz3eAALCrQCUAEiRv0guv/wbaqXBAJ4ESxguv/wbaQCUAEkAnARS2C6//BtoY +jYTgD/SKIA8Kugxv/4oh2gwoFYAQCglgECiFrg/ADgmFUSBAgQnyiiCHDpoMb/+KIZsCOgwACc9w +gABwyACAUSBAgMgIAQPPcQAA///PcIAAZKgsoCugBRqYM6f/iQaAAPHAHg6gAADahCgLDAAhg3+A +ACDLtRuYAM92gAAwbLRoumZSggKGACGBf4AAHM3Pd4AABJq6G5gAYYbcGcAAZYbgGQAABobkGcAA +6BkAABYngBAWJoEQCOAE4aIIYAUI2t1lFIUWfhZ/QCcAEiRujghgBQjaEQaAAPHAANjh/yYKYAUA +2M9wgADIRgIOgAjPcIAACEf2DYAIxgxABW4OgAMB2ADZMgtgDoDasg2AC24NwA4GCwAJ3g0ACk4K +gAkA2PYJYA8Icc9wgACAZACIUSCAgAjyz3GgAMAdAIGguAChmg4ADLYLQAmpBc//8cDhxQDdz3CA +AEwFoKDPcIAAHK+ssBYOIAmpcEIIT/8SCOALqXB6DoAF7g4ABUYNgAruCCAMqXC6CAAMbQWAAPHA +9gyAAILgo8EG9M91gAA4QgjwhCgLDAAhjX+AACDLguAG9M92gABstQnwz3GAAOjNhCgLDAAhTg4t +lTx6KHCGIfEPR7nCuoYg/gMkekS4UHHKIcIPyiLCB8ogYgHKI4IPAABQBMokIgDsAyL/yiUCAUiF +O7pTIgKAQK5NlcC6Qa4M8neVhiP/CUO7Z653lYYj/gdFu2iugOIS8s9ygAAQUBUiAwAAizV6Aq4B +iwOuAosErgOLBa4DigvwAdkprgLYAq4jrgDYBK4D2AWuBq6LcMlx+g4gBQzaAMABwZ4JYAwCwotw +yXHmDiAFDNoAwAHBCgpgDALCz3GAALwGAKENlUS44LgA2S+lBfKKIQgAL6XhuAPyi7kvpVEggIAE +8o25L6U9BKAAo8DgePHAxgugAJhwhCgLDAAhgH+AACDLVSBGCiiAVSDFC1EhwICKIQgAyiEhANgY +RABKJAByANmoIIAPz3WAAFhw/IguZeR+LyqBA04igwfPcoAAfHBvYgAmQwDgq1QQjwDkfi8ugRNO +Jo8X7mLIq8iAUSbAkA/yXYiG4dMipgAvKoEATiKNB89ygACEcKpiEPDPdoAAbHAuZs5lvIjEfWwQ +jgDEfS8tQRNOJY4XymJQqwHhSiQAcgDaqCCBANyIz3OAAGRwT2PPdYAAfHDkfi8pgQNOIY8H72UA +JoEA/KlUEI8A5H4vLoETTiaPF+5lJBmCA8iAUSbAkA/yfYiA4tMjoQAvK8EATiONB89zgACEcKtj +EfCA4gPyyWoC8Eh2zmN8iMR7bBCOAMR7LyvBAE4jjgfLZSwZwgAB4kokAHEA2qggQAXPcYAAYHB9 +iElhACWMAAHiZHkvKUEATiGDB89xgACEcGlhIKz+DCAIiHDBAoAA8cBWCoAAguAF9M9xgAA4Qgfw +hCgLDAAhgX+AACDL6YFYiUEvwxDAuxe7x3MAAIAc5L/PIyIG4L9O3c8jogDKJYIfAABOAYbizyVh +EuW/LPTPcoAAtJgWEoUAz3KAACzORpKwcs92gAAgy8UWBBYM9MQWAhZTIgUAz3KAALSYVIqwcgvy +QSxCAVEiAIAF8kmGUSJAgQn0USRAgQb0SYZRIkCBA/KBu89ygAAUzlSKh+LPI+EAUScAks8jogWC +4IgZwACMGUADBvTPcYAAOEII8IQoCwwAIYF/gAAgy2kRgwBOEQ4BDiOCDwAAOgEJumJ+RX5akWJ6 +ErpFfluRYnpAKs0FxX0EJb6fAPAAAMohwg/KIsIHyiBiAcojgg8AAOoAzyPiAsokwgCQACL/yiVC +A4LgkBlAAwb0z3WAADhCCPCEKAsMACGNf4AAIMvPcIAAMI0AkI7gzCCigiryB9gOCa//CrgEIIAP +BwAAADC4h+BkAA0AMyYAcIAAlGxAJwFyFHkAeYogBACUHQAQHvCKIBAAlB0AEBrwANiLuJQdABAU +8ADYjLiUHQAQEPAA2I24lB0AEArwA9gMuJQdABAG8ADYjriUHQAQgiABAfEAoACUHQAQCiHAD+ty +BdjPcwAAHwlKJAAA1Qfv/golAAHgePHAZgiAAILgCHUG9M92gAA4QgjwhC0LHAAhjn+AACDLAdlo +HkIQAN+AHsATTNhOHgQQBdgQpgrYG7YQ2Bq2FNhMHgQQLdhQHgQQJthSHgQQSiQAculwqCCADc9y +gAC4cPQiAwDPcoAAfKkUemCyz3KAAMhw9CIDAM9ygACMqRR6YLLPcoAA2HD0IgMAz3KAAJypFHpg +ss9ygADocPQiAwDPcoAArKkUemCyz3KAAPhw9CIDAM9ygAC8qRR6AeBgsgiG5bgF8gTaYh6CEAPw +Yh7CE+S4CvIJ2WoeRBAu2l22AtppHoIQCvAU2moehBAy2l22aR5CEBTZWY5RIACAWWEweWoeRBAa +4Ty2CvIK2GQeBBAG2GYeBBAH2AjwENhkHgQQZh7EEwXYEKapcJL+PI4ocFQeQhCGIAMA5rlsHgIQ +yiJBAAvyUCHDAW96VB7CEFAgwwFveGwewhDluQfySHOGIwMAb3pUHsIQ5LkE8qW4bB4CEFEhwIAE +8qS6VB6CEILlGPKpcMf+z3CAAPTNhC0LHDAgQA5RIECA8djAKCIByiCBDwAAkwDAKCEBoB4AEBjY +jbgXpgiGUSDAgM9wgAAgywbyvhCAAIm4BPClEIAAFqbPcKAArC8ZgDC4wLjSDGAPVR4CEAiGBCC+ +jwAGAAAL8ja4wLgbeAHgbh4EEALYgB4AEAPwbh7EEwDYHKYdpqlwAP8ohgHaSHNBKQAFNblSIAAA +UiEBAMC4wLnOCS//mHKdBkAA4HjPcIAAOEIIgM9xpAAcQMC4E3jBuBKh4H7xwOHFz3WAADhCV5XP +cYAAwAbgulfYAKED8l/YAKHiugPyhbgAoVEiQIAE8oe4AKHPcYAAbLVAiQDZgOLKIEEAz3GlAOgP +BqHPcaAApDABgYDizyDiANAg4QABod4KwAwwhc9woADIHCig5g2gDA+FHQZAAOHFz3CAADhCKYBE +IYOAANok9JDiigAGAAAijQ+AAEBFAI2guACtgBWAEKC4gB0CEEAVgBCguEAdAhAQjaC4EK2QFYAQ +oLiQHQIQUBWAEKC4UB0CEAHi3/GQ4kYABgAAIo0PgABARQCNgLgArYAVgBCAuIAdAhBAFYAQgLhA +HQIQEI2AuBCtkBWAEIC4kB0CEFAVgBCAuFAdAhAB4t7x5rkQ8s9ygABARQiKgLgIqogSgACAuIga +AgBIEoAAgLgS8IDjEvTPcoAAQEUIiqC4CKqIEoAAoLiIGgIASBKAAKC4SBoCAFEhAIAA2B7ySiQA +dOB4qCBABuK4FPIAIIMPgABARSATgQCAuSAbQgCgE4EAgLmgG0IAYBOBAIC5YBtCAAHgHfBKJAB0 +4HioIEAG4rgU8gAggw+AAEBFIBOCAKC6IBuCAKATggCguqAbggBgE4IAoLpgG4IAAeDgf8HF4Hjx +wEIMYAAH2s92oADIH0gemJDPdYAAOEKAFQAQz3GrAKD/TB4YkADYGaFaoRihiiAEAA+mahUAEc93 +gAAwjbAeABC0HgAQH9gIuA6mCIVRIACAANiLuBXyEKbyCQAPz3GgAKQwAYGEuAGhBJeF4Br0ANmU +uc9woAAERCWgEvARphoKAA/PcaAApDABgaS4AaEEl4XgBvTPcaAABEQA2AWhz3CAAMwEAIDguAry +hiD/DiK4FLjPcaAABEQFoVb/DghADFv/d//PcAAAVVVaHhiQAdhZHhiQCIXPcaYAKADzuAbyANgP +oTYKQA8E8AHYD6FuFQERz3CmAOgHJqDCCkAE7g3gCw2VB4+A4AvyiiDYCXYJL/8B2RYMYAIC2ATw +VglgBAHYiBUAEM9xoADEJw8ZGICMFQIQz3CgADAQRKDPcIAAdKIQeI8ZGIDPcoAAJKNQeJYiAgAQ +ukV4kBkYgIogBACSGRiAkBUAEECXQBkAgM9wgABARVMZGIAPEQCGjuKfuA8ZGIDMIqKCCPQIEQCA +hSCEAAgZAICK4gf0CBEAgIq4CBkAgA/YEBkAgJQVABAcGRiACIX9uA3yTg3gDgDYUg3gDgHYz3Gm +APTPAdgSoQPwOg3ADtUCQADgePHAYgpAAAolAJDPcIAAIMsacQX0xRABBgLwKYAluVEhAIAo8s9y +gAC0mM9xgAAsziaRdoowcwj0xBABBlSKwLlQcQvyxRABBlEhQIEF8imAUSFAgQ70CiHAD+tyBdjP +cwAANglKJAAAYQHv/golAAGELQscL3fPdoAAOEL4YMlxyg4v/ynaz3GAAGy1ACeAH4AA6M0CDy// +DNrPcKAAtA8A3/ygSIZTIgAAUg9gCzSWmgpAAlz/gOVQCCEMyiBhAATIUSCAgAXyFgqAAgvwANme +uc9woAD8RCGgz3CgALQP/KBMIACgAA/iDsogYgDPdYAAvAQMjYDgBfR2CMAMAdgMrcUBQADgePHA +UglAAAolAJAB2BHyBMhRIICADPQKIcAP63IF2IojCANKJAAAnQDv/rhzANiELQscz3aAACDLACZP +HoQoCwxAJgEZMCFADkmHJbglulMgEQBTIhIA6XA+DS//DdkmDeAPqXAJh4DlJbhTIBAABvQD2Cr8 +cPwE8PIMwA5MIACgHvJMIgCgyiHCD8oiwgfKI4IPAAAvAsogYgHF9f4MwAf2CC//AdhMIQCgz3eA +AHDIBfSmDsAJqg7ACRfw2ggv/wDYgOXPd4AAcMgE9Lv8CfCWDMAOAIdRIECAnAzCDkwhAKBMC4H/ +qXAE/iIP4ACpcEwhAKAE2AQaGDA29M9xgAC0mM9wgAAszgaQVokQcgj0xBYAFjSJwLgwcA/yxRYA +FlEgQIEJ8gmGUSBAgQXyAIdRIECAGPSpcApxcP9/2RG5z3CgALAfNKByDoAHD8gFIIAPAQAA/A8a +GDAC2EYO7/6KIUoAAIdRIECAIfLPcYAAtJjPcIAALM4GkFaJEHII9MQWABY0icC4MHAK8sUWABZR +IECBCYbRIGKBCfQYjs9xgAA4QhipCYYJoQHesgpgC8lwz3CAAJ0GyghgC8CogeUL9M9wgAAUzhSI +h+AF9EwgAKAIDMIO2gvADkoMwAd2Cw//Qg7gAQDYxQcAAPHAANiE/xYKz/7PcYAAtJgWiYoNoA80 +ic0HT//xwFIPAACB4M92gAAgyxpwA/SphgPwxRYNFiW9hCgLLAAmTx4Jh8C9USBAgcohwQ/KIsEH +yiBhAcojgQ8AAMECyiQhAHQGof7KJQEEz3CAAIxCTCAAoAGIzHE09ECBz3GAALSYQKEAFgNAgOBh +oQAWg0BoqQAWg0BpqQAWAEED8g+2ABaAQAQigg8ABgAACqkAFoBAgOILqQAWgEAB2gypABaAQAAW +AEHAegexABYAQQixABYAQFKpWg5v/wTYOfAggc9ygAAYz8QeWBAAFgFAgODFHlgQABaBQBQaQoAA +FoFAFRpCgMxwB/IgkM9wgAAsziGwAvAAkAAWgEDPcYAAHM8iGgKAABaAQCMaAoAAFoBAJBoCgAAW +gEAAFgBBDhkEgAAWAEEiGQSAABYAQC8gBwRw/c4M4AAKcM9xgAC0mBaJgOXPcoAALM5Gkh70UHAH +9MQWABY0icC4MHAR8sUWABZRIECBDfIJhlEgQIEJ8s9wgABwyACAUSBAgAb0KYcKcCW5wLnb/h4K +wA6+CQ//JQYAAPHAANia/89xgAC0mBaJ3gugDzSJIQZP//HAANnPcKAAtA88oMIKgAxWCkAMrgxA +C8oNYAwA2P/Zz3CrAKD/OaAC2HYJL/8EGhgw7QVP/+B4hCgLDAAhgH+AABzN4BACAM9xgACwmtwQ +AwBgGYCA5BACAOgQAABcGcCAbBmAgOB/cBkAgPHANg0gABLZqcEIdk4LL/+LcEokAHEA2qgggAIW +JIAwKIiB4cP2YbkoqAHiAcICwYQuCxwAIYB/gAAczdwYgAAFwuAYQAAGwbRu5BiAAMd1gAAwbEgV +ERDoGEAAz3CAAASaCiBALhYgQAQI4IPBrg+gBAja9IXPcIAABJqHwfZ4COCaD6AECNoAwAAgjS+A +ACDLUSAAgLUdGBAI8rod2BO7FQAWgLgH8LodWBS7FQAWoLi7HRgQz3CAAPTKVIg2iEQqPgsAIYB/ +gABQyTV4BogQdvwO4f/KIIEDtRUAFlEgQIDx2MAoIgHKIIEPAACTAMAoIQE+CC//oB0AEJkEIACp +wOB4ANh+8fHApcGLcGoIL/8F2QDC4LoT8s9wgAA4QhiIgeAN9ADYmrjPcaAAyB8PoQHApBkAAMPY +GrgOoVEigIAW8gYSAjYA2UokAHLgeKgggAO4cYNxKIkRIkCAACJAMWQYQgAJ8kAlQQDGD8/+pcDR +wOB+CiHAD+tyBdiKI48IIQOv/kokQADgePHAz3CAADhCCYBRIECByiHCD8oiwgfKIGIByiOCDwAA +KQfKJGIA8AKi/solwgDiDIALegygCAHYz3CAABTOFIiH4CP0z3CAAAjOC4BRIECBG/LPcIAAnMkK +kM9xgABoryWBCrgwcMohwg/KIsIHyiBiAcojgg8AADMHyiQiAJgCov7KJcIAWg6P/ioOIAsA2AIM +AAsSD8/+jQNP//HAAtir/LT9gQNP//HACgsAAADez3WgALQP3KWOCGALaHf4/5YJ4AvpcATIUSCA +gATyXgtAAgnwANmeuc9woAD8RCGg3KU5AwAA4HiEKAsMz3GAAAjOMCFCDs9wgADgmVZ4dpDPcYAA +tJjEGdwAF5DPc4AAsJrFGRwAz3CAAASaVngMiJAbAoAA2OB/xxkcAPHA4gxP/4oOgA5ODU//7QJP +/+B48cB2CiAARNrPdYAAMGzEbc9xgAAImo4P7/6pcEokgHAA2agggAgUadhgcYCEKQsMACGCf4AA +IMsAIYB/gAAczboa2AAA27Ua2ABhhUKFAeHcGMAAZYXgGIAARoXkGMAA6BiAAH0CAADPcIAAtJjx +Au/+iiEFBeB48cD2CSAAANqhwUDCABaOQAAWjUAAFoNAABaQQIDlHfKpd89xgACUtSOJhif8F0W/ +w73meeC5yiJCA2DC4bnKIkIDyiIhAAEcgjBRIYCAyiUhEAIcQjOA4CT0z3CAALSYtoj0iLFzzCbB +kxHyCiHAD+tyQCsEBBC+BdiKI94CBSREA90Ar/4FJsUTAMVAIA4Gz3eAACDLVBhYA4QfQBMh8M9w +gAAszgaQEHMK9M93gAAgy8QXABbAuBB2DfIKIcAP63IF2IojHgWYc5UAr/5KJQAAAMXPdoAAvMnd +H1gTQCBBIEkhAQY0eUoN7/7JcEIgwCVIIAAAgOAA28v3ANoAFgFAAeKD4r33AeMQc7j3ViYAGSIN +7/4G2c9wgABwyACAUSBAgBryz3GAALSYz3CAACzOBpBWiRByB/TEFwAWNInAuBBxCvLFFwAWUSBA +gQbyCYdRIECBDvTKCi//yXDPcIAAtEKioIogEg3WDq/+qXECyM9xgAB8P3YM7/4eod0AIAChwADY +PvHxwKHBi3CmDO/+AdkAFAUwTCUAgMohwQ/KIsEHyiBhAcojgQ8AAMwHrAdh/sokYQDPcIAAlLUy +DO/+AxhCAaHA0cDgfvwciLb8HEi2/BwItvwcyLX8HIi1/BxItfwcCLX8HMi0/ByItPwcSLT8HAi0 +/BzIs/wciLP8HEiz4H7geATcON018OB4BNw03TPw4HgE3DDdMfDgeATcLN0v8OB4BNwo3S3w4HgE +3CTdK/DgeATcIN0p8OB4BNwc3Sfw4HgE3BjdJfDgeATcFN0j8OB4BNwQ3SHw4HgE3AzdH/DgeATc +CN0c8OB4BNwE3RnwNBQaMDAUGTAsFBgwKBQXMCQUFjAgFBUwHBQUMBgUEzAUFBIwEBQRMAwUEDAC +xwHGsCRNM7AkHzPgfvHARg/P/wh2z3CgAGQu8CCPAxsSEDYbGpgz9dgFuA4J7/7JcRvIz3WgABQE +CqUJhYDgoA1CB89woADAL1EQAIYLIMCD9fXPcAAAZB4SD8/+ESCAg+3zCYWA4Ov1GxoYNPXYBbjG +CO/+CnEbyAqlPQfP/+B48cDKCs/+DQZP/uB4ABYBQSCwABaCQFMiQQAhoEEqwQBSIQEAwLkoqEEq +gQDAuSmoQSoBAcC5MKgAFoFAz3GgAMgcKIHgfyOg8cABgIDgEvKB4BnyguAZ8gohwA/rcgXYiiPE +AkokAADRBW/+CiUAAQHZz3CgAMgcKaDqCe/+FNgI8ALZ9/EB2c9woADIHCmg0cDgfoDg8cAR8oHg +EvKC4BPyCiHAD+tyBdiKIwUKSiQAAIkFb/4KJQABKdgSuAjwFdgTuATwT3or2BK4NXhAoODx4Hjx +wOHFCHWKCe/+FNgjhc9woADIHCigZQbP/+B48cDmDc//pcGLd+lwxP/pcNL/IsCA4BjyABYOQSTA +gOAD8gAWAEEA3QnwAcAAFgJAyXHd/wHm0H4B5QAUATEwdbX3FPAA3Q3wABYBQYDiBPIAFgBBAcAA +FgJAAeXS/wAUATEwdSTCsvckwIDgBvRRIQCABPIAFgBBBczXcAAAAEAB2MIgCgAXuMdwAA4AAIO4 +nbifuOxxAKECEgE27HAgoOlw0f8OCO/+AdgA2c9woABEHTWgmQXv/6XA4HjxwAGAgOAU8oHgEPKC +4BDyCiHAD+tyBdiKIwQMSiQAAG0Eb/4KJQABAtgD8AHYz3GgAMgcCaGCCO/+FNhU8eB4gODxwBHy +geAV8oLgFvIKIcAP63IF2IojhgZKJAAAMQRv/golAAEp2BK48CBAAACiOvEV2BO4+/Er2BK49/Hg +ePHAqgzP/6XBi3fpcHX/6XDc/wAUATEFzAK513AAAABAAdjCIAoAF7jHcAAOAAAL4QQhgQ8AAPz/ +JXiduJ+47HEAoQISATbscCCgABQBMexwILAJFIAwgOAH8s9wpgCcPxmAgeD79SLAgOAX8gAWDUEk +wIDgA/IAFgBBAN4I8OxyAcCpcc//AeWwfQHmABQBMTB2t/cS8ADdC/AAFgFBgOID8gAWAEHscgHA +xv8B5QAUATEwdSTCs/ckwIDgBvRRIQCABPIAFgBB6XB4/74Pr/4B2ADZz3CgAEQdNaBO8eB48cDK +C+//AdgAFoJAABaKQAAWiUAAFoZARCa+g0QigxPAeAohQILKIWIAAeGA48ojgQDKIyIAgODKIEIC +yiAhAEDcBCILkxtjb3sk9AXMAd3XcAAAAEASa8IlShMM4Be9BCCADwAA/P/HdQAOAACleJ24n7js +dQClAhINNuxwoKDsdQAdghLscGCoANvscGCwgOHyAC4AANj4cBlxgeDKI4EByiJBAsojggJEI4ED +guFKJUAAwiVCAVIjDgDAvkQjAAyQ4AHbwHug4AHYwHgFIMQAABYNQIDhYbpPehj0gOIA39D3IIWA +5gTlBPQAFg1ATCMAkAP07HAgoAHnUHe09yCFTCMAkAT07HAgoAYlPoES8oDiANjN9wAWAUCA5iCl +BOUE9AAWDUAB4FBwtvcAFgBAAKULJECBHvKA4gDY0/cAFgFA4IWA4wPy53kC8OV5IKWA5gTlBPQA +Fg1AAeBQcLD3ABYAQCCFgOME8id4A/AleAClQiBBEIDhIAft/0AnQABMIwCQBvQODq/+AdgH8APZ +z3CgABQEJaAA2c9woABEHTWgjQLP/xUGj/7xwB4K7/8A2c9woADQDzWgABYDQQAWAkHpuwXMFvLX +cAAAAEAB2MIgCgAXuAAgjQ8ADgAAQCIBA89wAAD8/yR4pXiduJ+4E/DXcAAAAEAB3cIlShMXvcd1 +AA4AAEAiAQPPcAAA/P8keKV47HEAoQLI7HEAoexwQLDscQDYALHou0DyI2rjuwQhgQ8AAPz/CfLP +daAAOAQIrQHYYbkweeS7DPKhaAi9BX3PdqAAEAS4tgLgD3hiuTB5AN0U8MNoGL7iaO9/EL/lfuFo +738Iv+V+BX7Pd6AAFATLpwTgD3gB5dpp0XWs9wDeCPDPdaAAOAQIrQHgD3gB5lMhTQCxdrf35bsI +8gHZz3CgANAPERhYgOa7CfID2M9xoAAUBBChAdgEoeO7BvIAFoFA7HAgqGG65LsJ8oHix/cAFgFB +7HAgsGK6RCOBgUEqgAAV9ADeC/DPdaAAAATsjQAWjUDsdeCtAeayaLF2R/fnu/T1ABaPQPbxguEU +9ADZCvDPdaAA1APclQAWDUHsdcC1AeEbfbFxRvfnu/P1ABYOQffx4rsV8oDgyiQNcOB46CDtA+e7 +CfLPcKAAmAM9gAAWAEAD8AAWAUDscCCgANkG8AAWg0DscGCoAeFTIkAAEHG59w4Mr/4B2ADYz3Gg +ANAPERkYgM9xoAAUBAShBMjPcaAA0A+GIP8OIrgVoYEAz//gePHAFgjv/wDZSiQAcuB4qCCAAgAW +AkAVIkAwHBiYAAHhABYNQAAWDkB2CM/+z3CgABQErKDPcKAA1AvcoMoLj/5BAM//4cXhxiSIz3KA +AJxspojCuS5iANkPIYEDgOXPc4AATJp2EwIGBfQmenYbmAAc8EV5dhtYACWIFSONA3kdWBAmiEWI +WWF8HVgQIICMIRCARfeKIRAAIKAjuXcbWAAAgCq4eBsYAADZz3CgAPA2LKB5EwEGJaB8EwEGJqB6 +EwEGJ6B9EwEGKKB7EwEGKaB+EwEGKqB3EwEGK6B4EwEGLaB2EwEGJKDBxuB/wcXgePHA4cWiwYt1 +qXBSC6/+AtmpcNH/AguP/oEHr/+iwOB4gODxwAf0z3CAACSc4g9v/iTZrQDP/+B48cDqDq//mHCQ +4Mohxg/KIsYHyiBmAcojhg8AAGcDMAYm/solJgQA2kokAHTPdoAAzASoIIAPQCyDAVV7x3OAADCJ +IIPPdYAAKIVALEAB3bkAZSCj8bjRISKCCfKgi893gAAAcK1ngeUK9s91gAAwiBYlDRGgjVElAJAE +8p65FvAtuMC4FSYPEOOHUiFNAgsnQJMN8s91gABAy4QoCwwwJUAe/rjs85+5IKMB4qUGj//xwC4O +j/+iwQAWEUEAFgBBQClOIcd2gAAohQCGTCEApC24UyASAI73CiHAD+tyBdiKI9UESiRAAGUFL/4K +JUAEz3CAADCIFiBABBpwJgqv/gLZz3CAALCIFiBABBYKr/4C2UApjSEAJYAfgAAwiQYKr/4Q2Ytw +/gmv/gHZAIZRIECCB/KqCY/+AQav/6LAACWAH4AAMInCCaALENkBEIAgkODKIcoPyiLKB8ojig8A +AIAFhAfq/8ogagFKJAB0ANmoIAEKFSVCEM9wgAAwiTAghQAEJYOPAAAAAQQcQDFG8iHGz3CAAABw +BCWEDwYAAABBLEIEz2Cg5vhi0SXhgjHygOME8oHnC/YEJYQPAAAAJAwkgI8AAAAkI/KC4kIADQCC +4gb0gOMd8oLnG/SA4wTyzOYX9s9ygAAwjUaSUHcR9lElwIIP8s9zgABAy4QqCywwI0IOBCK+jwAG +AAAD9ADbAvAB2297BPAB2AhzBCWCDwEAAMAuus92gAA4c0pmUHAB2MIgDQCA48wgIoAR8gHhAhCA +IM9xgABQcAhhgeAe8gohwA/rcgXYiiPWBRDwz3OAAEDLhCoLLDAjRA4KIcAP63IF2NkDL/6KIxYF +SiRAAM0DL/5KJQAAAxCAIAhhguDKIcIPyiLCB8ojgg8AAJkFBdju9SpwV//PcIAAsIgWIEAEQJDP +cQAAGBUJIkEAILA68eB48cAmDK//AtnPcIAAzAQ2Co/+z3CAAMwEQIDPdqAA7CfPd6AABETPdYAA +MI3guj7yK4ZEIoAAhiL/DiK6obkUurS5BXoFIYMABCGBDxAAAgAEIoIPEAACAGumJXpFpyiVh+HM +IaKBEPSA4M9xoADIHAbyAdgeoQYOgAsG8ADYHqFqDoALBJWF4C/0z3CAAMwEAIBRIMCAKfIE2c9w +oABEHSWgI6AkoCHwz3CgAMgcAdk+oAuGgbgLpsINgAsElYXgDvTPcIAAOEIIgFEgAIAI8gDYlLgF +pwuGlLgG8ADYBacLhrS4C6Y2D0/+pQOP/+B48cDPcIAA3AZKCa/+AtkeD0/+4QSP/+B44cU1aM9y +gAAohSFiLbnAuYQpCwwAIYF/gAAgy0iBUSIAgM9ygACUtUGCCfI8iYDhxSKBDwAACgID8kUiQgNK +JAB0ANuoIIACNmh1eQAhjQ+AADCJQKUB4wDdz3OAADCIFiMCAKCqoaoB2SKqA9kjqkokAHGpcagg +wAF6YRZ6pKoB4eB/wcXgeMEDj/+9A4//8cDhxc91gADcQqlwYgiv/hDZABUEEEwkQIAN8kwkwIAQ +8gohwA/rcgXYhdvFAS/+uHMBhQy4BCCADwEAAPABpQXM13AAAABAAdjCIAoAF7jHcAAOAACDuJ24 +n7jscQChAhIBNuxwIKDyDG/+AdgA2c9woABEHTWgjQKP//HAABYCQKHBQMIBFIAwUSAAgAbyz3GA +ABCpBfDPcYAAKKlAoWCJAdoH8AAWAEAVIYwAAKQB4n14EHL591EjAIAJ8gAWAEED8ADYFSGMAACk +AeKF4vr3BczXcAAAAEAB2MIgCgAXuMdwAA4AAIO4nbifuOxyAKICEgI27HBAoGINb/4CiQDZz3Cg +AEQdNaChwNHA4H7xwOHFABYDQM9xgAAAAGChABYCQADdQaEAFgBA/7sCoQAWAEADoaShEPL/ukDY +zyDiB8oggQ8AANAAzyDhB89xnwC4/x2hBvDPcJ8AuP+9oAXM13AAAABAAdjCIAoAF7jHcAAOAACD +uJ24n7jscQChAhIBNuxwIKDSC2/+AdjPcKAARB21oHEBj//gePHA4cXPdYAAzAQEbcYOb/4I2QGF +z3GgALgeAqEChQOhxgxP/kUBj//xwOHFocEA3UDFABYBQAAWAECB4RryBczXcAAAAEAB2MIgCgAX +uMdwAA4AAEUgAAOduJ+47HEAoQISATbscCCg7HCgoKlwIPDGCOALi3AFzAHZ13AAAABAAdjCIAoA +F7jHcAAOAACEuJ24n7jscgCiAhICNuxwQKDscCCgAMHscCCgAdgSC0/+z3CgAEQdtaCxAK//ocDg +ePHAKgiP/womAJA6cVDyLyiBA04gjQfa2F4OL/6pcRsaWDNAJQAUSiAAIA8gECD12AW44glv/qlx +G8jPd6AAFAQKp89xoABkLvAhAQAJh4DgEfTPcKAAwC9REACGCyBAgAn0z3AAALAe3g9P/gsgAIQV +9NrYAg4v/ooh3AEph/oNL/7a2M9xoADAL1ERAYbqDS/+2tiyD+AGKnBuDOADqXAA2A8gQAMGJg6Q +s/XPcYAAUAUAgQfah+AbGpgwHfLPcKAAOC4FgAQggA/AAAAA13DAAAAADfL12AW4z3OfALj/GqNb +o2nYGLgZowHYAvAA2IHgA/RAoc9woAAUBEqgjQdP/+B48cAqD2//CNmiwQISDzbPdqAAwC+lFhCW +9gxv/otwABQEMADdBCS+j/D/AADKIcIPyiLCB8ogYgHKI4IPAAA9BlAG4v3KJcIAUSRAgsohwg/K +IsIHyiBiAcojgg8AAEAGMAbi/colwgClHliTDgsgDj/YAMKA4qUemJCpcBXyLymBAE4hgwfPcaAA +DC1ve/AhwQDCuQ8gQAAA2Q8hwQAGIkKA7/VAwgQUATFRFgOWCyOAgP31grmS/6UeGJRmCm/+AhrY +M8kGb/+iwOB48cBWDm//gNjPd6AAwC+lFxKWFBcRlgDepR+Yk89yoABkLhQfmJMvKwEATiOBB/Ai +QwBlfgDbDyNDAAYgwID19U8mwBakHxiQpBcAlv+4/vOjFwCWBCCADwAAAA+MIBCA+PPz2AW4gNna +Dy/+n7kbEhA29dgFuAfdyg8v/qlxz3CgABQEqqAbGlgzB/AD2c9woAAUBCWgz3CgABQEqYCA5R7y +gOX080EtgJAK8i8kCXDgeKgggAEAFgBA4HhTJU2QCfIvJElz4HioIEABABaAQOB4z3CgABQEqYDl +8fPYmg1v/gW4/7jf9fXYBbhWDy/+CnHPcaAAFAQoGQAEgOYbGhg0JPIvKIEDTiCBB5ThyiJFAIX3 +KHKAIsIBz3CgABgs8CCDAJThyiJFAIX3KHKAIsIEz3CgAGgsVXhgoADYDyBAAAYmDpDg9YDZz3Cg +ANAbMKClH5iUFB9YlFkFT//gePHA9gxv/xfZt8EyCW/+i3AjwEoiQCBTINEAhiD+A0whAKRCKBAB +DBxCNI72CiHAD+tyBdiKI88ACiSABCkE7/0KJUAEEsctvyDAwL/PdoAAKIVAKU0hUSAAgKBm3WWG +IPcPSfSA4MohwQ/KIsEHyiOBDwAAygMF2ODzAcACwSpy3gkgBGZtgOAx8ulwngvgACpxDRSAMIUg +wQANHAIwiiD/D1PAAIWpuAClEsCGIPsPKLgNrUokAHQA2KggwAL/2dtgQClCIRDjW2MgqwHgKnA6 +C+AAi3HPcYAAoAT1eQCBDyBABAChAd8C8ALfKnA+/gbwgODKJ4EUyiciEoHnsvQghc9wgAA4QhiI +KHOB4IYj+w8U8s9wgABwyACAUSBAgBnyz3CAABTOFIiH4BP0QSlAA1EgAIAP8hPA6LgSwgvyhiL7 +D0EqBAJNjZByA/KouFPAE8ASwgZ5RHgleIDjAKWGIPsPCvKA4MogQQTKISEA6A/hDcoi4QMMHQIU +ANjPcYAASIcWIUEEQIUAofW6AaEE9ADYi7gBofa6BvIBgYUgAQ4BoeoI4ACLcA0UgDBRIECBDvJY +FAAxBbWA4MogQgTKISIAlA/iDcoi4gMNFIAwUSBAgBnyUBQAMYDgArUV8gDeENgacAKVESCAg8og +QgTKIYIDZA/iDcoiggNCIEAggOAB5jD3DRSAMFEgAIEH8ipwfgogBFUUgTANFIAwUSDAgB7yNcFW +FAIxKnDWCiAEEsO4cIwgAoDKIcEPyiLBB8ogYQHKI4EPAABzBBgC4f3KJGEAUSXAgconIhEqcO/8 +BczXcAAAAEAB2MIgCgAXuMdwAA4AAIO4nbifuOxxAKECEgE27HAgoEYNL/7pcADZz3CgAEQdNaC5 +Am//t8DgePHAVgpP/6TBSiFAIIHAjg4v/ipxAN9W8ILAgg4v/gLZAsCLcjIO4AMDwQQgQAQvIQeg +R/IAwQDYz3WAACiFDyBAAAW5IWUvIgogLblTIRAAz3GAAEwFQIEEIoCgAKEH9IDi/AziCMogIggg +wIIJIAQQ2QDAAN6KIggANWi5YcKxQKHJcTYO4A0P2gDAgNo1aD1lz3GAAKAESK0VIQEESa1AgQQi +ggRAoc9xgABIhxZ5wKHBoc9xgAAohxR5wLEB5yHAEHdUB8X/BczXcAAAAEAB2MIgCgAXuMdwAA4A +AIO4nbifuOxxAKECEgE27HAgoD4NL/4qcL0Bb/+kwPHA8gzAA1YND/4ZA0//4HjxwFYJT/+EKAsM +z3KAAKAE8CINAAAhgX+AACDLaIEEI4IPgAAAAEQjDwIvuga/RX8EI4IPAAEAAEEqTgMsuuV+RX7P +coAAzAQVegOCEHY18gQjvo+AAQAAI/LPcIAAFM4UiIfgHfTPcIAAcMgAgFEgQIAX8r67aKFEIwAC +BrgEI4EPgAAAAC+5JXgEI4MPAAEAAEErQQMleCy7BSMOAIDlw6IL8i8pQQNOIYAHECUNEG/8gOX4 +9QkBT//gePHAosGLcHYOL/4I2QDAgODPcYAAlAQAoQfyBhQAMQOxBBQAMQKxagwP/qLA0cDgfvHA +pMGLcEYOL/4Q2QXM13AAAABAAdjCIAoAF7jHcAAOAACDuJ24n7jscQChAhIBNuxwIKAAwFEgAIAD +wAb0AsFaDGAEANoF8NoIIAUBweoKD/4A2c9woABEHTWgpMDRwOB+4HjB2c9woAAEJSCg4H7xwP4P +D//PcAAARBwCCG/+AN5x2PoPL/4GuM9wAABMHO4PL/4I3c9wAADIG+IPD/7PcAAAzBvaDw/+z3AA +AAgczg8P/s9wAAAEHMYPD/7PcKAA1As4gByAz3CfALj/WBgACAAmgB8AAMAbpg8v/gTmYb2A5Tf3 +AN4F3QAmgB8AAAAcjg8v/gTmYb2A5Tf33QcP/+B4z3GgANAPGREAhhwRAIbPcKAAyB8VEAKGHoDP +cKAAxCcZEAKGnBECABUQAoYtEAKGLhAChi8QAoYwEAKGgBECAIQRAgChEAKGkBECAKIQAIaUEQAA +mBEAAIwRAACIEQAAGIHPcZ8AuP9YGQAIz3GfALj/WBlACM9woADQDzuAOYDPcaYA1AQXEACGLBEA +gDARAIA4EQCAz3GgAIgkAIEBgQKBA4EEgQWBBoEHgWDx4HjxwOHFz3WAAEicqXDiCi/+A9kBhc9x +oACAJQyhAoUNoQCNUSAAgADYjrgE8g+hA/AQoXoKD/75Bg//4HjxwHYOD//PdYAA4AQAhc92gAB0 +ouSQ6XH2CaAChiH8A1EgwIAacAXyH4aAuB+mIIUAkThgAKVUFoAQgOAV9OlwSgvgBoYg/AOA4Azy +USAAoAvyz3CAADhCCYBRIECABfQfhoK4H6Z1Bg//4HjxwA4OD/+iwc9wgAB0oj6ABCGBD///D9AE +JYBfAADwLyV4z3WAAHSiXgvgBh6lgOCQAyEAmB0AEM9xgAAAAACB67ga8gGB67hA2M8g4gfKIIEP +AADQAM8g4QfPcp8AuP8dogSBAeDTuAShBSCAD9D+AAAWolElwNEG8s9wgACMQgKIBvADhZIL4AMk +hZQdAhAehYYg/wOg4Af0USXA0gX0gNiUHQIQlBWBEFEhwIFAKQAGavRRIoDTgrgS8kQiPtML9M9w +gAB0ogGAUSAAgAXyRgzABhTwRg3ABhLwz3GAAACjKIlFIAAGhiH9D1IhwQFFuSV4z3GgAIgkEKHP +cIAAyKIAiIDgWfRRIoDSCPTPcKAADCQTgFMgwIBP8kQiAFNBKIEATXCGIPwDQSgCAVElgNHPcIAA +dKIH8gS5WWHHcYAAQEUU8FElQNMJ8nRpW2MAI4EPgACARQrwUSVA0gryBLk6YgAigQ+AAMBFrBhA +AKwQAgCA4iHyIIqXGEIAPNgAqhvwPoVRIoDTs7k+pcUggg8AAAAHz3GAAACjKIlFIAAGhiH9D1Ih +wQFFuSV4z3GgAIgkEKGKIdYAz3CgAIAlL6DPcaAAxCdBEQCGUSLA088g4gLQIOECQRkYgM91gAB0 +ogCVBCCADwAAzIDXcAAAyIAJ9AuFUSAAgAXy0g2AAk/wHoXzuFQVghBp8hoRAIaA4gUggA8AAACa +GhkYgAfyAdrPcKAA1AtSoATYEBkYgE1xIgrv/YogRA4G8C4M7/2KIEYCUSCAxAT0USEAxvjzz3WA +AHSiz3agAMQnLhYBlhaFInhkuBB4hh0EEM9xgAA4QiIKYAcvkRoWAJYEIIAP////ABoeGJARFgCW +67gJ8gDYi7gTHhiQGtgZHhiQHoVRIICBANmZ8hSVUSBAgZX0z3CgACwgD4CA4I/0ENhBwM9wgABw +yACAUSBAgBLyUSVA0xDyAdhAwA3wgOIG8gHaz3CgANQLUqAE2BAZGIDZ8UDBC4XPc4AArMeLcgQg +gA/AAAAAwoM2uBEmAJCBwUAjBAsw8uGVx4Nwv/QkAAAIJs4TEHZMAAwAlBWAEFEgwIEg9M92oAAs +IA+GgOAa9MaGHJUQdsj3z3CAACSrwoAFgxB2EPSA4gTyAtgAogODgOGDuAOjBPIAgaa4AKEBwg7w +A4PjuAHCCvIA3p6+z3GgAPxEwaGjuAOjC4UEowOFBaNUFYAQgOAH8gDAguDPImIBAvSHugDBQcJV +JUAaEgpgAwDbH4WUuB+lHoWQuB6lDfDPcYAAyI0NgQHgDaEQ2c9woACQIz2goQIv/6LAz3CkAJBB +TYDPcYAASKFCsRqAUSBAxgOxBCCAD/8AAAAwuASxz3CAAEihANoI8s9xgAB0ojGBUSGAggXyQrBD +sESw4H9ZsOB48cDqCS//mHDPcYAAdKIOkc92gABIoQC2z3CmAOj/C4DPdaQAtEUDpgwVA5YNFQKW +RBGJAC8nxwD/2BC4KXSEJAOcBCMIAAX0USEAkCz0MhUAllMgjwD/ZwG2/9j0fwi4739keEAvBRIA +JQYAACfHAwUmxgFALwAWBCODDwD/AABALwcUG2MAIMgR/9gFJgYCCLgFI4MBBCIGAPpiACZAAQV6 +5bZveAQjgw//AAAAKLtleE96A7ZEtgQVAJYCthGBUSAAgg3yz3CAAABwMiBAAoHgx/bPcKYA6P8N +gAPwANgGpgWmANhKJIBwBtqNuqggQAMp2xK78COPAEAmAx8VewHi4KMB4ACROB4AEVUmQRQats9w +gADAqLYN7/0I2hsVAJbPcaUA2MsZphwVAJYaph0VAJYbpg6BHKYPgR2mJhUAlh6mz3CkAJB/HIAF +AS//H6bgePHAiggP/89xoADIH0ARAAbPcKAA1AsA3c92gAB0ohiAOIHPcIAArMcooM9xoADEJ1IR +EIYVEQ+GG9gWGRiA47/KIUEjEPIdhgHdg7gdps9wgABEjiKAAeEioIIOr/2KIMUIOnVRIMDGSiIA +IBDyHYYB3Vp1hLgdps9wgABEjiGAAeEhoFYOr/2KIIUJUScAkQXyVBaAEIDgA/IA3wvwHYbPcYAA +RI4B34W4HaYFgQHgBaEA2kwhAKDMIiGgzCchkFTyANnPcKAA/ESeuSGgRaAehs9xnwC4/7C4HqZY +GQAIz3CgALQPF4DPcIAAjEIPiBahqBYAEM92oADIH2TgHqYQ2A6mAdgVHhiQKgvv/QnYA9gephDY +DqYB2BUeGJAG8NIPr/2KIA8Lz3CgAAwkB4CA4AXyUSMAwPTzz3CgAMQnTxAAhiYOQAGA5wb0z3aA +AHSiXPDPcYAARI4FgQHgNgpgAQWhIQIAAM9woADEJ08QAYZCEACGBCC+jwDAAABG8gG2HobzuD7y +iiCEDk4Nr/2KIZAD8gpABwCWhiD8AIwgAoA09EIJQAeA4DD0A9nPcKAA1AsxoOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HgxoBPM +ERocMAbwAJbmD2AINJasFgEQgOEA3wbylxaAEACprB7AE1QWgBCA4CTyz3OgAPwlVIMB2c9wgABE +jqaAgOJdZaagBfLPcoAAOQggqjODR4CA5VlhJ6AehgHdUPJRIMCBTvIB2c9wgABwBSCgSPBRIACg +DvIB2c9wgAA5CCCoz3GAAESOA4EB4AOhHobp8QPZz3CgANQLMaDgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4MaBMIgCgE8wRGhww +C/Qdhs9xgABEjoK4HaYEgQHgBKEB3R6G8LgK8pUWgBCkFgEQyXK6DuABAdsE8KoKQAIfhlEgAIAH +8s9wgABAqboLgATPcIAAyK0ZgIDgB/JGDsADz3CAAMit+aBaCEABz3CAADhCCIDruBHygOUP9AQg +gC//AF//1v7PcIAASKGg2cTaPdvuDq/9F7sehvC4GA/CA89wgACsxwCAgODoD2INyiBiAGEFz/7x +wP4Mz/7PcYAAJKPPcIAA4AQgoADZz3KAAPCiKaLPcIAArMckoCWgLKLPcAAA/3/PcaAADCQBoRvY +BKFRIADEz3aAAHSiFfIdhoS4HabPcIAArAQggAWBAeAFoYoghQnyCq/9JIHGDgABaQIAAEQWgBDx +hsK4BCePHwAAAAhUFoIQ+3+A4s91oADEJwDZFfLg2r8dmJCU2pUeghAE289ygABIBWCiAto8HYCQ +z3KAACSrIaIH8EDZvx1YkNTZlR5CEAAgkQ+AACDLwBGBIAAgkg+AABjPuBKAoAUh0wOWD2ABBSDQ +A4Dg6AEBAAHYEB0YkMgRgCDPcYAAfKnleBumbBaAEMO4HHj0IQAAZB7AFF4eBBDAEoCg5XgcpnAW +gBDDuBx49CEAAM9ygACcqWAeBBBkFoAQw7gcePQiAQBoHgAUih5EEM9xgACsqfQhAACOHgQQaBaA +EMO4HHj0IgIA9CEAAIwehBCQHgQQFMyGIP+FKAqBAc9wgAA4QgiA67hcCcL/HPDPcYAAMKsAgWOB +Q6FmeAChBIEMFQGQEngleAwdAJAA2I+4Ex0YkAgVAJCguAgdAJAa2BkdGJDWCkABz3aAAHSiHYZR +IMCBgvTPdaAAxCcRFRCWUSDAowDa1fVRIECiHfRRIICjMvRRIACj5vVRIACgXPRRIMCgbPII2BMd +GJBKDUABgOBi9ALYPB0AkCOGz3CAACSrIaDQ8R79oBYAEJEVAZYB4MO5MHCgHgAQxvWKIggAEx2Y +kJEVAJbDuBBxvPMSHZiQuvE6FQCWUSCAgB/yz3GAADCrAIHguBn0gLgAoQHYA6GKIP8ABKE6FQCW +hiD/AQO4AaEMFQCQRiAADwwdAJAIFQCQgLgIHQCQANiOuBMdGJBRJQDQkPME2c9woACQIz2givEV +/QLYPB0AkCOGz3CAACSrIaAehvO4fvMTHRiUbP4E8BMdGJSFAs/+VBaAEIDgCfRCFQCWBCC+jwDA +AAAE9FEgAKIR8r8VAJaluL8dGJCKIAQAEx0YkPoMQA1UFoAQgOBY9VEggKAO9AohwA/rcgXYiiON +Bookgw9NAW/9CiUABM9wgACsxyqAz3CgAAREJqDE8eB44cXPdYAASKEJpSqleLVLpQHYGbXgf8HF +SiQAegDZqCCAAgDaz3CAAEihNXhAoAHh4H7gePHAmgnP/gDez3GAAAAAwKHPcqAAyDsdgsKhgODB +ocOhA/QA2ArwBIHXcGWHIUP79YoghAAAoQGhgODEoQ3y0Nmfuc9wnwC4/z2ggtgUos9wAIARFA6i +iiDFD891oADIHxkdGJAB2AhxCHIIc8IMb/2YcM9wgAAUANdwgAAUAAzyCiHAD+tyBdhq24okgw9x +AG/9uHPPd6AA0A/Vp4XYCbjPdqAAwC96HhiQJg6ABy4JwAg2CQALQNnPcJ8AuP8yoGYJz/2A2c9w +oAAUBCygHR9YkKYKQAf2DoAGuglgBwDY7g0ACwfYSB0YkKoOj/5SCgAKz3CAADCNAJCH4IAJAgqi +DIAK4giADi4IwA0VhlIgAABRIACABvS6CKAKAd8Q8APfE4aauBOmIN4F2NClQx0YEADYAgyv/Y24 +0aXPcIAAMI0AkIfgOAkBCuINj/7aC0ADsg+AAy4MAACCD0ADqgnAA1YIwAmqCEAI2g+ADOoKQA06 +DEAN/ggP/oogxg3PcYAAOEINsQPYbRkCABvZz3CAAFRP8gjgATCo/g9P/8oKQA0qCI/9Ug2ADioP +gA0WCq/96XBNAM/+8cDhxVIKoAYw2LRoSgqgBjLYBX0YvZG9z3CAAKRsZgqgBpK9KLileM9xgADk +BC0A7/4AofHAmg+v/gHZpcEacAoigC+AAPAE0guv/YtwTCBAoAAUhTABFJEwBvQKIoAvgAD0BEwl +AIDE9kwlAIHL9gohwA/rcgXYrNvNBi/9SiRAAEwlAIAmAQ4AqHAAFo5AABaUQEwkAKR6cIX2jCTD +ryj0ABYAQQAWj0AAFoBAABYAQUwkAKR+AAoAgOcl8s9wgADoBACAQCzNILV9EOC4YEoLr/0E2c9w +gADoBACATCFAoB1lzCdhkxX0ANiMuBTwCiHAD+tyBdi320okQABJBi/9CiUABQohwA/rcgXYwNv1 +8QDYALXPcIAA6AQggEAswCAVeBJhGWEFIkAEALEE3QbwgcAE3eYKr/2pcQAijCMAHAIVz3CAAKAE +8CACBB7fgOIvKYEAAidAECTyz3OAAC+FNWgrYxEjgIMJ8gAmgR+AAFScFnkAGQIFAC2BEwshwIAJ +8gAmgR+AAFScFnkEGQIFECICgC8pgQACJ0AQ4PVCI0AggODoBs3/LgqP/XUGr/6lwADYQPHxwOHF +rcGLdalwWgqv/Q3ZAMAdeFMgAQBEKT4NqXAAIYF/gADIh+oKr/0N2vIJj/1xBq/+rcDgePHACiHA +D+tyBdiKI4wIiiSDD0UFL/1KJQAA4HjxwOHFINvPcaAAyBxpoQAWAEDPcqAAEBQMogAWBUAB3Uwl +AIDKIcEPyiLBB8ogYQHKI4EPAAAJAQAFIf3KJEEDGBpAAWgZQAED2A+iuaFqoXoJj/35BY/+8cB+ +DY/+pBABAPm5osFw9CDZz3OgAMgcKaOkEAEAUSHAgS7yMYjPdaAAEBQjucC5A7kF4QPaT6VGhUHC +jeEQ3som4hEGFA8xjCfDnwj0BBQPMfF2zCfqkAHeQ/YA3oDm6vXFgEV+x6WxiIYl/B8YvaV6z3Wg +AMwXWqAX8EWAz3GgABAUR6GkEAEAUSGAggnyMYjXuoYh/A8YuUV5OqDPdaAAzBcN2QHaA+ENHZiQ +Dh1YkCaAGR1YkCeAGh1YkCiAGx1YkAPZFB1YkHAQAQEQHViQcBABAc91oAD0BwThJ6VHo6QQAQCZ +uaQYQAD5BK/+osDgePHAA8ikEAEA+bkED8H/A9nPcKAAEBQloNHA4H4A2oDhyiRNcOB46CDtAf/Z +XGAgrAHi4H7xwM9zgADwBGhwBNn3/wRrBNn2/+jx4HjxwGYL4AkQ2G/ZB7nPcqAA8Bcxos9xAADw +/ziiygzACdbx4HjxwPH/9v/S8YHgz3GAAPAEA/QEaQLwKHAE2crxD3tIuA94z3KAAABu9CIAAEAo +AQJIuAV59CLAADB54H8neOB48cDaC4/+pcEIdgKLKHWYcGTAAIsAEgYBERwCMHlwAhIHAQQSCAEQ +FAAx5JIGEgUBACDJAwCRLyFIEgcgQAIQeOf/ACCKAQGVLyKIEgcggAIQeOP/ACDGAQKVLyaIAQcg +gAEQeN7/ACAHAgOVLyfIAQcgwAEQeNr/ACUFAASVLyVIAQcgQAEQeNX/H2cFlfB/53gQeNL/JpUh +cBB4B3k8eg+5JXpQegAigQIweQAcRDBHlSd6XHkPukV5MHkAIYIBUHpceQIchDAPukV5MHkAIcIB +UHpceQQchDAPukV5MHkAIUIBUHpceQYchDAPukV5MHk/Z/B//HkIHMQzD7/leTB5OGBpcca5hbkI +uQUhwQIgthB4IJUKHAQwJ3gceAi4BSAAAQG2AMABpgHAAqYCwAOmEQOv/qXA4H7gePHA4cUIdT6I +z3CAAOgEQIBAJQAUA7k1eVlhag9v/QraqXD3//ECj/7xwG4Kj/4IduyICJDPcoAA8AS1bwhzhiPz +D0IrEQLHdYAAKIVghe27SHED8iRq67iKIMMvA/QeFpAQTY5RIgCAnPLjuDv067sU8v/YB61KJABx +ANioIEADCmEAIIMPgABUnPZ7RKsKYQHgD3hAq1rwTCEAoY32CiHAD+tyBdiKIwsFSiRAAFUBL/0K +JUAE7rhHjTIhQAQAIYEvgABUnPZ5CPIEqQTYAChABEV4B6088ACpDyJCBEetXvBMIACklPaMIMOv +yiHCD8oiwgfKIGIByiOCDwAA6ALKJGIA/AAi/colAgTJcL3/CJbuuATyAo4JrQTwAY4IrQCF67gX +8gDZSiQAcSetqCCAAwAhgA+AAFSc9ngEGAIEABgCBAHhL3kBjgitAo4JrSjwTCEAocohyg/KIsoH +yiOKDwAABQNGB+r/BdgIlgAhgS+AAFSc7rgHjfZ5CfIEGQIEBNkAKUEEJngHreDxABkCBADZDyFB +BCZ4B60BjgitVQGP/kGJBbjHcIAAKIVIqCKJ4H8pqOB4EYjgf8K44HjgfuB44cXPcoAA8ASA4MAi +IgH/3RVpACCDD4AAL4Wgq0okAHEA26gggANtYgAjgA+AAFScNnikqG1iAeNve6Co4H/BxfHAmgiv +/phwpcEod7hzAN4EI4AP/wAAABi6BXpveQi5/9gIuGR4KLgFeUV5CN30JIADJ3hEwBAUADEZ/xIU +AjFhvUAoAQQFeUd5RMEQFAIxFCSAM4DlQLAB5iv3UyXCBUCnABQNAQfZBvAQfRQnTBAAtGG5FCRA +MLt7T70AkKV7geFwe3hgM/cEIIAPAAAA/xC4BXpfBe//QKfgePHA/g9v/iDZANrPdaAAyBwppc9x +oACUE1uhz3OAAOgEYIPzaM92gAB0ogyG9X9TIMQF8GP7Y1MgjwCD56TBi3Ea9B6Gm7gepjQWgBDi +i/FwCvQocEAjAQREa0AmAxzy/g3aKvAdhpG4krgdps9woADMFyvwhecO9EEqAlJAIwAEwbqIc7j/ +HoacuB6mDdoU8Cy4UyACAB6GA7qZuB6m5IMF4gUnABEAoQWDAaEGgwKhB4MDoQPiz3CgAMwXz3Gg +AJQTXKEB2oDiB/Qehpe4HqYg2AqlGPAAwQPaGBhYgAHBGRhYgALBGhhYgAPBGxhYgBQYmICGFgER +EBhYgATZJ6UWGJiAYQdv/qTA4HjgfuB48cDhxaHBi3AeC2/9AdkgwM91gADsQgCliiAXChYNL/0C +EgE2iiAXCgoNL/0ghUDZz3CAAFyEmgxv/UDBpgpP/boMwAohB2/+ocDgePHApg5P/qHBz3aAAIAE +yXAB3coKb/2pcYogFwrKDC/9AhIBNkCOiiAXCiGOELq6DC/9RXlAxYtwXg9v/QTZ1QZv/qHA4cXh +xphwz3KAAAxDBYIggmaCyLgQuMi5BSEBgAGCyLsQu8i4BSMFAGeCAoLIuxC7yLgFIwcAaIIDgsi7 +yLgQuwUjBgAk8gAUDgAvKEEATiCDBwDYDyDAABJ9BCBDAaR+ZX4AHIAD2oKkfsV7eqJ5ggQgjgEE +IMABpHvFe3mieIKkewQhQYNleBii3/XBxuB/wcXgePHAwg1P/jpwBYGggci4ELjIvQUlDZABgSaB +yLjIuRC5BSEQAAHeG/IEJYCTFPIvKAEATiCCB/AhgSCA4QDfDyePEAnyBCcAFEIgAIBgecogYgDm +fYDl237o9ckFT/7gePHAocEB2F4MIA1AwM9wgAAMQwqAUSAAgMogAgfKISIByiKCDwAAZwDKI2IP ++A4i/cAr4gWhwNHA4H7geKHB8cAmDU/+o8EIdUjAz3aAAAxDGob7hjyGBH8kf6d/QcdSCy/9iiDY +BIog2ARGCy/9qXGA5xX0gOVp9A4Ir/0J2IDgY/IKIcAP63IF2IojRg9KJAAAPQTv/AolAAEEFAEx +gOEZ8iAUADELIECADfLPcIAAeARggM9xAACEZwzYYHsD2gnwgOAH9M9wgAB8BCCAYHkM2AYUATGA +4RnyIhQAMQsgQIAN8s9wgAB4BGCAz3EAAIRnDdhgewTaCfCA4Af0z3CAAHwEIIBgeQ3YBCdQkwvy +Tg9v/QnYiiAYCJYKL/0KcRLwgOUQ9Iog2ASGCi/9iiFHCkIPb/0J2IogGARyCi/96XGw/7ymCNyD +BG/+o8DgePHA4cWjwQHYQMDPdYAADEOpcOoJb/1c2TqFG4UkeDyFBHmBwEHBZv8BwDuFBHlBwS4K +L/2KIFgEVSVAH6lxhf/PcIAAhERAJQEbgv+LcMIMb/0E2QHApv+2CgANAIWA4AX0BYWA4EwOwf8p +BG/+o8DxwKILT/6iwQHdz3aAAAxDOoYbhiR4PIYEIRAA0gkv/YogmANMIACgVSZPFyryA/C7fQQg +QKP+8y8oAQBOIJEH8CdAFFweQBSA4MohwQ/KIsEHyiBhAcojgQ8AABgCyiQBBKwC4fzKJUEEQHiK +IJgDfgkv/SpxANgPIEAEBiAQIApwf/+KIJgDZgkv/TyGdQNv/qLA8cAOC0/+psE6cRpyYMAA2AEc +AjAB2AIcAjADHAIwi3DeCCALgcEEwQpwIyBABAXCA8CA4Av0CiHAD+tyBdjs24okww81Au/8uHNA +eCEDb/6mwOB48cC+Ck/+GnAodUh3aHY4Y2bZPdqiCy/9F7qB4An0CnB6C2/9qXHpcC4ML/3JcfUC +T/7gePHAjgpP/gh2AN2KINgDxggv/clxz3CAAAxDWoA7gER5ANoPIoIDBCJDAEIjA4DKI2IALybH +8AHfyiBBAwbyHIAkeEV4R//pcK0CT/7gfwDY8cA2Ck/+GnAodzpyz3aAADhCFJbPdYAATI0QuDYO +oAgApYDgyiciEIUhBylPIUAnn7jscQCh7HEAGQAECIZRIACABfIAhYG4AKXPcIAAuAYAiIDgBPQA +hYO4AKXPcKAALCAQgADebR0YEEokwHDJcaggAAbPcIAA/QcAiIDgDNjKICEARCm+A89ygAAM0Sdw +MyIAAAAhgg+AAMyOAeEAqoDnHvIAhWIVDxapcWMVBBaAuAClANgH8OxzQKMEGZADAeD34ECBuvfP +cKAA1AtNoMChYh3YE2MdGBEQ8ADZqXIF8OxzAKME4gHh9+EAgrv3z3GgANQLDaGdAW/+1B2AE/HA +4cWhwQh1Pgxv/RnYz3CAAPgEAICA4BX0ndgAHAQwEcypcR7aAhwEMAHgEHgEIIAPAAD/v4+4ERoc +MADAGLqw/zoNwAVxAW/+ocAA2Nrx8cDhxQAWDUAFzAHa13AAAABAAsjCIooAF7rHcgAOAABTJQEQ +o/9RJUCQz3GAAPgEAdjKICEAMQFv/gCh8cCuCG/+ANnPcqcAFEgoogeCz3WAAFSfH6UQgs9zpwA0 +RIAdABDPcPMP//wnohCioNiauDai9RsYAM9wpAC4PZsQAgbPdqAAyB9bpaYQAgYg31ylkhACBl2l +oxACBl6lmxhYAP/aphiYAJIYmACjGJgAz3KkAOz/J6LPcAAA//8GolEWEJYB2FEeGJDwpkMeGBAA +2LoLL/2NuPGmiiDEAM9xoADsJwahCoFoHQQQiiDNAAahCoFqHQQQz3AoAAIBBqGKII0ABqFRHhiU +RQBP/vHA4cUIcgHdgOHKIcEPyiLBB8ogYQHKI4EPAACiAMokIQAkB6H8yiUBAYDiRPZTeool/x+A +4UT2M3mzfRQhgACiCiAGO3mseBEAb/4vcOB48cB6Dw/+enCacUh3GnMKJQAhANrPcasAoP9ZoQfY +GqFYoSDez3WgAMgf0KUB2EMdGBAA2PoKL/2NuNGlGdnPcKcAmEc6oB4P4Ake2M9ypwAUSB2CvoJs +EhEAcBISAACnABhAI/e4xSCCDwD/AADTIOEF973FJYIfAP8AANMl4RWKIRAAy/8IdqlwiiEQAMn/ +CHVAKQAiiiEIAMb/CHdAKgAiiiEIAMP/0XkZ4Sx5L3GxehniTHovcjB3ABuAIwAcQCOE9gDYBfBQ +cH72Adj9Bi/+AB0CIOB48cC6Di/+ANjPcaAAtA+8gRyhz3KAAFSfaBIDARC7TyNOAIi+z3OgAOwn +xqNqEg4BEL6FJo0QxqPfgs93pwAUSMengBIOANCn+4LPdqQAuD2bHtgT/IKmHtgT/YKSHtgTXoKj +HpgQz3KkAOz/BqKKIIoABqO8oXYMIAIB2KUGD/7xwBIOD/7PcIAAMI0HiIDg9AQhAKzBz3CrAKD/ +ZBAZAGgQFwBgEBgAB91Y/wDZz3CrAKD/OaC6oDigyg9gCQHYz3egAMgfURcAls92oADsJ0DAAdhR +HxiQINgQpwHYQx8YEADYcgkv/Y24INgRp89xpwAUSKyhANgNoQ6hD6HPcAAAASoGps9wpQDoD6eg +INgQpwXYQx8YEADYPgkv/Y24INgRpwHYz3GgALQPHKHPcAAAAi8Gps9wAADCMAamz3AAAEJIBqbP +cAAAAkoGps9wAAACYgamz3AAAMJjBqZKIAAgz3CAADCNJJALiEQpvgcYYBV4argAIEEOFSAAJDhg +x3CAAARFAxCUAAQQlQABEJIAAhCWACCIELkFIYEPAABCLSamIIgQuQUhgQ8AAIJGJqYAiBC4BSCA +DwAAQmAGpiDYEKcF2EMfGBAA2IoIL/2NuCDYEadKIQAgEPDPcIAAyJoWIEAERBiAAUGFSBhAAUAh +USBXoDigz3CAADCNBpAycOgCDgDPcacAFEhcGUAEQCoAJE8gQQCHuYm5JqYIcYUhiwAmpoUgjAAG +pkwhAKAT8kwhQKAd8kwhgKAl9EAsACQFIIEPAACCYCamBSCADwAAQmIY8EAsACQFIIEPAACCLSam +BSCADwAAQi8M8EAsACQFIIEPAADCRiamBSCADwAAgkgGpiDYEKcF2EMfGBAA2MYP7/yNuCDYEaeB +wILBQCQTO4nCisMKJMAEH/8rwIDgRvIJwEApTSHHdYAATJoApQrAAaUBwBilAsAZpUAuACSFIIoA +BqYg2BCnBdhDHxgQANhyD+/8jbgg2BGng8CEwYnCisMKJMAEDP8rwIDgJfIJwEwhAKACpQrAA6UD +wBqlBMAbpSLyTCFAoCryTCGAoDT0QC0AJAUggQ8AAIJgJqYFIIAPAABCYifwCiHAD+tyBdiKI0QF +pvAKIcAP63IF2IojBAig8EAtACQFIIEPAACCLSamBSCADwAAQi8N8EAtACQFIIEPAADCRiamBSCA +DwAAgkgGpiDYEKcF2EMfGBAA2MIO7/yNuCDYEaeFwIbBicKKwwokwATg/ivAgOBs8gnABqUKwAel +BcAepQbAH6Ug2BCnBdhDHxgQANiKDu/8jbgg2BGnQCoAJIUgigAGpofAiMGJworDCiTABM/+K8CA +4FbyCcAIwQSlCsABwwWlB8AcpT2lA8ECIcIABcNYYAIgxYBN8mJ5THkvcKhxrv4DwUAojSC0fRUl +TRQCecd1gABUnwLABMIhpQjDAiIBAAbAO2MCIwWAPfICeix6L3CocaH+BMIFwwIiAQADwCelAiMG +gDQdgBE08gbAAiCFgGwF4v9MHUARCiHAD+tyBdiKI8UFG/AKIcAP63IF2IojRA5KJAAAhQGv/Aol +AAEKIcAP63IF2IojBQH08QohwA/rcgXYiiMFA2UBr/yKJIMPCiHAD+tyBdiKIwUE9/EKIcAP63IF +2IojBQWKJIMPPQGv/AolgAFAIFAgTCCAoHIExf8A2M9xoAC0Dxyhwf7PcasAoP9kGUAGaBnABWAZ +AAZKJABxANmoIMAMKHCAIIINEHgGuIG4l7gGpihwgCBCDxB4BriBuJe4BqYocIAgxAYQeAa4gbiX +uAamKHCAIIQIEHgGuIG4l7gGpihwgCCGABB4BriBuJe4BqYocIAgRgIQeAa4gbiXuAamAeEAwFEf +GJBNAS/+rMDgePHAHgkv/phwocHPcoAA/AQgis9zgABUnwGChBMDAJBxzCDBgOrycHAG8s9wgABs +oCGIIKpKJMBwSiAAEKggwALPcIAAbKAyIAACkHAD8kAgSBBMIMCQpAEGAM9wgABsoAGIkHAG9AQh +AQEvJUcABvAHIAABLyUHAGGiANvPcKAAtA9wEBIAfKAAGgIBFPBAIIAhEHgGuIG4QCkBJCV4BqZA +I4ERMHkGuYG5QCoAFCV4BqYB489wgAAwjQaQEHMyAQYAANkPIcEACyFAgQHYyicCAA30CyEAge3z +z3CAAGygAYiQcOfzCicAAoDjEfKB42fyguMG9IoghiCKIUYCDPAKIcAP63IF2IojDwFk8Lbavdka +cnlxz3agAOwnSiEAIEokAHEKIkAUKnWoIIECACBBI1RrQC8AARR4GmK1esdygADMnwiSMHlAKYkB +TyFBEBx/EL/leSamwLi4eAUgQAQvIQggACNPEwmS8H8Gv08nRhAceUApEwQFI4EhJqbAuLh4BSCB +Ai8iSBBFIcAQBqYKhotxALEIki8mAQAAFAAx0HAU9EUnzxDmpgqGALEJkgAUATEceDBwFPQB5Wnx +iiLEBoohhAin8QohwA/rcgXYiiMPBkokAAC5Bm/8CiUAAQohwA/rcgXYiiOPBvTxz3GgALQPcBmA +BH0H7/2hwOB4ANnPcIAAbKAgqCGo4H8iqOB+4HjxwPIOz/2vwc9wgAA4QgiAz3WAAARFwLhAwM9w +gAAwjSSQC4hEKb4HGGAVeGq4ACBBDgDAFXg4YBllI4lBwRllJIm4YAKIQsFDwM9wgABUnwCAIrjA +uETAz3CAAFSfZBABAc9wgAC0BgCQEHFKIQAgJ/TPcoAAVE8tis92gABsoIYh/wFgjkO57opPigIh +wYBhjoYn/xHKIWIAQ78OI8ODhiL/AcojYgB7e2V5e2pCjg4iwoDKImIAArpFeQLwB9mA4QYEIQBF +wc9xoAC0R0cRAYaA4fIDAQDPcoAAVE8tis9zgABsoIYh/wFDuSCrLoqGIf8BQ7khqy+KhiH/AUO5 +IqvPcYAAVJ9kGQQAANmeuc9woAC0R1MYWIBU/c92oADIH1EWD5YB2FEeGJAg2BCmAdhDHhgQANh+ +Ce/8jbgg2BGmz3GAADCNBJEric9yoADsJ0Qovgc5YTV5arkAIUAOAME1eThgCWUQuQUhgQ8AAEIt +JqIJZRC5BSGBDwAAgkYmoghlELgFIIAPAABCYAaiUR7Yk89wpwAUSAyAz3IPAAD8z3eAAFSfRsAA +wAK4FHgbZx1nGWcAJwQQACcFEB9nCYdhg6eFBscgFAQAgOcigQwVBQAb9Aq7RHvJvaV7z3WnABRI +baUKuSR6iHHJuUV5z3KnABRILqJALYECBCGBDw8AAPzJuCV4GvAKvUR9ybule891pwAUSG2lQCyD +AmR6yblFec9ypwAUSC6iCrgEIIAPDwAA/KhxybkleM9xpwAUSA+hSiIAIAPYR8AKI0AkBcARIICE +OgIBAM9xgABsoDIhgARCcUjBz3GgALRHYBkYgBC4m7jPcYAAbLUgiZ+4gOEB2cB5D7kleM9xoAC0 +R18ZGIAF8OIMr/yKIMgFz3CgALRHcRAAhgQggA8OAAAAQSh+hPH1AN8C8AHnz3CAADCNBpAQd8oB +BgAIwACIESDAg/XzAMACuBR4ScABwQLAgOcCIFkAz3CnABRI96AL8oHne/KC5wv0iiGGIIojRiIF +8LbYvdk6cHpxSiQAIYp1QC9YEWG9URYQlgHYUR4YkCDYEKYB2EMeGBAA2IoPr/yNuCDYEaYDwDVt +JXgQeBC4hSCKAM9xoADsJwahACVAFBB4BriBuJe4BqEAJcAUEHgGuIG4l7gGoUAhgCEQeAa4gbgG +oUAjgCEQeAa4gbgGoVEeGJRAJAQ+isCLwYzCjcP+/C7AgOAN9M9wgABUn3wQAAbPcYAAVJ8B4HwZ +GAAJwAbB9XiA4cdwgABUnxr0i8JggorBIIGKwmCii8Igoo3CYIKMwSCBjMJgoo3CIKIzgDQQEAAJ +8IogxAaKIYQIjfEtgEwQEAAWIEAzCsIAIJUPgABMmgvA8B2AIPQdACAIIoAP//8B/y8mQCYELj4g +L3DG/A4glw8AAAABC8CIIHwABCi+BS9wCnHA/A4ggQ8AAAABCSeALwAA/wGJIccPSCAAAEghAQAu +wlQdGCCB4lUdWCAF8gTCgOIM9FRvQCoDIXR7emK1esdygADMnwiyKbJCJFQgTCQAoIwGzf8X8QfA +YbiA4EAiUiC4Be3/R8BeD0AF8PwF8NIKr/yKIMgFz3CgALRHcRAAhgQggA8OAAAAQSh+hPH1bQLv +/a/A8cChwYtwKgjv/ATZAMBRIACABAyC/wDAUSBAgBgL4v/KIKIAAMBRIICALAlCCgDAUSDAgJwL +QgoAwFEgAIEID0IFPgjgAQHYz3GAruAB7HAgoALI7HEAoc9ygABMmookgX0A2aggwAHwIkMA7HBg +oAHhqgyv/ADYocDRwOB+4HjxwM4Jz/3PcIAAgAUAgIXgvAAFAM92oACsLxqGUiAAAFEgAIBU9M9x +gABMoAmBAeAJoc9wgAB4tUCAgOIDgBV5BfIKgQHgCqEE8BiBAeAYoRiGz3WgAMgfIN+auBimBdjw +pUMdGBAA2AINr/yNuPGljP4YhrO4urgYpmTY8KVDHRgQANjmDK/8jbjxpVYKgAlWCAAJtgjAAQXw +kgmv/IogyAXPcKAAeEUAgAQggA8OAAAAQSh+hPP1z3GAADhCSIE0kVMiAAACDq/9AdsKDO/8E9hl +Ac/94HjxwPYIz/3PcKUA6A8HgM9ypAAMQlMgBIBEII0ARCADAQKCz3YPAAD8CHHJucR444IquNh3 +xH9BL4US5IJTJkYC6XLJuuR+Kr4G8p7hhPeMIU+IxPcA2QPwAdlMJACABPKe4ET3ANgG8IwgT4g8 +9wHYgOUbeCV4BfJMJoCHQ/cA2QXwjCZPiD33AdmA5QK5BXkE8kwlgIdE9wDYBvCMJU+IPPcB2IDj +A7gFeQTynuJE9wDYBvCMIk+IPPcB2IDjBLgFeQTynuZE9wDYBvCMJk+YPPcB2AW4JXhCIACAgQDv +/cogYgDgfwDY4H7geM9woAAsIBCA4H8J4OB+4HjgfwHYANmWuc9woACsLzyg4H7geOB+4HjgfuB4 +4H7geOB+4HjgfwDY4H7geOB+4HjgfuB44H7geOB+4HjgfwHYz3KAAIxCVIpZYTB5QWlQcMT2IngQ +eAPwAtjPcaAAyB8eoRDYDqEB2BUZGIDgfuB48cCKD4/9AN/PdaAA0A/1pQPeEvDgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeGG+jCb/n+71A9gapc9wgACMQu+oAdgVpaUHj/3xwDoPr/0F +2ADdC7ipcd3/z3GAAHSiHoHuuGDyHYFRIACAXPJCCk/8ANmcuc9woADQGzCgAdnPcKQAmEA8oAQg +vs8wAAAAAeXKJSIQUSMAwCf0USBAxQXyUSGAwyjyUSDAxQ7yUSGAwwryz3CqAAAEAYCGID8Lg+Aa +8s7/IN/PdqAAyB/wpgHYQx4YEADYSgqv/I248aaE5aYHxf8I8MX/z3GAAMCOCYEB4AmhUSAAxwDZ +D/IA2s9woADQG5y6UKDPcIAArARAgBCCAeAQos9wpACYQDygPfCOCU/8USBAxTf0USAAxQHlyiUi +EFEjAMDPdqAAyB8g3w708KYB2EMeGBAA2NIJr/yNuPGmhOVCAAYA5vHPdaAA0A8A2BWl8KYB2EMe +GBAA2K4Jr/yNuAPY8aYapQDYz3GAAIxCD6nPcYAAwI4JgQHgCaEB2BWlVQaP/eB48cDmDY/9z3Gg +APxEBYEA3892oADQD7y4BaH1pgPdEvDgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeGG9 +jCX/n+71A9gaps9wgACMQu+oAdgVps9xgAB0oh2BgLgdoZL//g6AAuUFj/3gePHA4cXPcqAA0A+w +gs9wgACMQi+IMHUA2wX0A9k6om+oAvDc/8kFj/0A289yoADEJ4ogGAg8GsCAz3GgAMgfDqGAEQAA +USBAgM9wgAAkqw3yQhIChgQivo8AwAAABfJBgIDiA/JCoIAZwADgf2Gg4HgUzAQgvo8AAChARfLj +uCHyFRICN4DYz3GAAESO67oUGhwwBvIYgQHgGKEF8BCBAeAQoVEiwIAH9ADZz3CgACwgL6AVzEYg +gALgfxUaHDBRIECBF/KKIAQAFBocMM9xgABEjg+BAeAPoRXMANlGIIACFRocMM9woAAsIC+g4H4E +2BQaHDDPcYAA+D8DgQHg4H8DoeB+8cByDI/9AN0g2M92gACsqEAmDxUSDCAGAKbPc6AAyB8B2BOj +WIM5g1QTBAD4EwAAz3OgADAQYYPPc6AADCQCIgKAZ4MDIUEDQaYipgIkAwDPcoAAOELPcYAAdKJj +pkwZRAMUklAZRANoggm2z3KlAAgMUyMAAAi2ABIEAE4ZRANTJEUBUyRCAEgZQgGD4sohwQ/KIsEH +yiOBDwAAZQ04AyH8yiBhAQQkhQ8AAADgQS1CA5YZggA+ge65FB4AEQzyBLqBukV4CLYH2AfwFScM +EKCkA/AE2AHgiOC69+u74AnC/ql3USCAxbrygOe49M9wgAB0oj6ABCGBDwAAAEAEIYBPAAAAQBBx +Ad/KJyIQyiViEM9xgACMQg+JAeAPeA+pz3GgALQPN4EwcADeCPTPcKAAqCAGgIwgg47M9wDfVP/P +cIAArAQggAHdCIEB4AihgOeG8s9xgACsqAWBBCCADwAAAOBBKEQDz3CkAJBBdYBWgFEkAIC4ckih +z3KAAHSiZ6EF8kwaxAAI8EwahAMEI4MP//8AAGehUSRAgAXyMLtOGsQABfBOGoQDcHtnoVEkgIAF +8lAaRAEI8FAahAMEJYMP//8AAGihDYAGoQQggA8AAAD+KbhSGgQAHoLuuCPyz3CqAAAEBIAJoc9w +gAAQqUCIgOJAIAQBMvKA4loALgACEIUA9CSDAxXYE7jwIMMAz3CAAOio1XgB5lB2YKC09xvwz3CA +ACipQIiA4kAgBAEW8oDiAhCFAM/39CSDAynYErjwIMMAz3CAAOio1XgB5lB2YKCz90GpAhlCAYDn +GPQEIL7PYAAAABL0z3CAAKwEIIAB3QGBYbgBoQeBAeAHoYoghQcyCG/8FBIBN1EjAMAT8gDf/v6K +IMUHHghv/Olxz3CAAKwEIIAB3QGBYbgBoQeBAeAHoRoKb/yKIEQCBCC+z4ABAADMJyKQzCUhkAzz +z3CgADAQA4CA4ADZCvLPcIAArARAgAHdKHcMggHgDKKA5RXyAtnPcKAAyBwqoBz/z3CAAHSiQNk9 +oBTMhiD5jwX0ANiPuBQaHDDBAa/96XDhxTDbAN3PcKAAyBxpoAPaz3GgAMwXIRmYgE6hp6BqoOB/ +wcXxwOHFz3GAAHw/DoEB4A6hz3GgAMQnGREAhoDgANoF8gLYEBkYgM91oADUC1el//7PcYAAdKId +gYe4HaHo/xCFgOAr8gPYEaXgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB4EaUTzBEaHDCu/hUBj/0KIcAP63IF2M9zAADLCUokAADp +B+/7CiUAAVEhAMbxwFX0z3CgAAwkB4CA4E/yz3CAAPCiC4DPcaAAyB9k4B6hENgOoQHYFRkYgOoL +b/wL2FEhAMY79FEgQMcA2izyz3GgANQLFoE4gSTgMHBX91EhAMYE9FEjAMD881EjAMAE9FEggMQj +8gDanroA2c9woAD8REGgJaAO8ADZz3CgAPxEnrkhoEWgz3GAAHw/D4EB4A+hz3CfALj/WBjACM9w +nwC4/1gYAAip/9HA4H7gePHAyg9P/Qh1z3aAAHSiHYYvJgjwPPTgvRD0grjPcYAArARAgR2mA4IB +4AOiIIGKIEUJ3g0v/COBUSVAkB2GEfSEuM9ygACsBCCCHaYEgQHgBKEggooghQm2DS/8JIHPcKAA +DCQDgFEgwIAdhhDyhLjPcoAArAQggh2mBYEB4AWhIIKKIIUJig0v/CWBPYYvJkjwAN8N9AohwA/r +cgXYSdsFu4okgw+JBu/7SiUAAM91oADQDxEVAJaA4IbyRCF+ghLyUSEAgBjyz3KAAKwEIIICgQHg +AqEggoogRQgyDS/8IoEK8FEhAIEU8pn/HYZRIMCBaPTPcKAAxCcZEACGgOAG8gLZz3CgAJAjPaA2 +/hzwj/8dhlEgwIFU9DmF6XIG8AARAFAB4k96QSmAABByuvcA2gbwABGAUAHiT3pTIUAAEHK69wPY +Eh0YkOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HgSHRiQE8wRGhwwTP4ehvO4CvLPcIAAXK/rqM9wgAAcr+ywz3AAAP9/z3GgAAwk +AaEb2AShL/9xBk/9CiHAD+tyz3MAAGcJBdhp8fHA4cVQ3QDaz3OgAMgfr6NeowIgQgBeowHaFRuY +gEDaTqMEIL7PAAIAEBQOgf9BBk/94HjxwMINT/3PcIAAdKIxgFEhQIIR8s9xgACMQi6JRBCCAER5 +USGAgEjayiKBDwAAkAAC8A7aANvPcaAAqCAngagQDQBZYbFxwiVFEMol5hKweArZbv0a/s9wgAD4 +RwCQz3agAMQnUSAAgQTyjCUDkgT3AN8V8M9woAC0D3ygz3CrAKD/eqB2DaAJANgZFgCWgOAE8gLY +EB4YkAHfGRYAloDgPvRRIQDGPPQD2c9woADUCzGg4HjgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeDGgE8zPcYAAfD9qvREaHDAUgQHg +FKEVgbhgFaFSCG/8AdjeCmABAdix/Q0Fb/3pcOB48cCeDG/9wNjPdYAArKhBjSAaAjASakTgz3Gg +ANQL2IEA20ImDhiA5somzBDRcEYADgDPcZ8AuP8Ygc9ygACsBJC4GKEYgbC4GKEgggWBAeAFoc9x +gAB0oh2Bg7gdoSCCiiDFCH4KL/wlgQDYGv8A2D3wz3aAADhCyYYD4AQggA8AAPz/Kr7Avhe+x3YA +DgAAxXjsdgCmCMjsdgCmEczPdqAAiCRKJMBzAeAQeAQggA8AAP+/j7gRGhwwHqYA3qggAALwJY8T +7HDgoAHmgOIA3cv3z3CAAOio8CBOA+xwwKAB5VB1t/dtoQHYHQRP/eB4wdggGgIwz3KAADhCGIoB +289xgAB0oobgFoHCI8EADOAYIMAAYhkEAGIRAAED4AQggA8AAPz/nbifuOxzAKMIyOxzAKMYijaB +huAB2MIgAQAYIQEA7HAgoOB/AdjxwFYLb/0b2M92oADEJxUWDZYWHhiQA9nPcKAA1AsxoOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HgxoBPMERocMIogBAwqCS/8ANl3/eS9E/LPcIAArAQggBGBAeARoTr9GRYAloDgBfIC2BAeGJBb +/iLwUhYAllMgQQCD4dEl4ZAD8rj+GPDPcIAAOQgB2SCoz3CAAKwEQIAGggHgBqLPcIAAdKIegFEg +wIEG8s9wgABwBSCg5QJP/fHAdgpv/QDZz3AAAP9/z3WgAMQnEx0YkBvYFh0YkAHYEB0YkM92gAB0 +oh6G8bgF8qgeQBAI8BGGNoZqDmACANqoHgAQbP4dhue4BPIA2CXwLRUBllaGMHIG8oC4HaYA2JL+ +9vEEJYFfAADwLx6GJXgephEVAZbpuQXyz3AAAJChC/DwuQTyAtiIHgQQ4LkH8s9wAABkpE0CT/1R +IcCAG/II2BMdGJAD/4Dg0vUC2DwdAJAhFQGWz3CAACSrIaARFQCWUSCAgAf0S/4dhlEgwIG+9REV +BZZRJYCADPQKIcAP63IF2IojRgjtAO/7iiSDDwTYEx0YkIv/qvHgePHA4cXPcoAAdKIWgpjgz3GA +AESrBfJUEoAAgOAE8hmCuoIE8BuCvIJRgs9z/v//P2R4pHsEIoIPAAAAEEV4AKEA2AGhZXpJoQ7a +SqHPcYAAIMuaCoABz3CAAHDIAIBRIECACPLPcYAAEM6CCqABAdh9AU/98cD2CE/9z3GAAAAAAIFR +IACAG/IBgVEgAIBA2M8g4gfKIIEPAADQAM8g4QfPcp8AuP8dogSBAeDTuAShBSCAD9D+AAAWogDe +z3WAAHSi3aXepVQdghPfpYDYlB0CEM9wgADIrdmgz3CAADCrwKDPcIAArMfCoBTMgB2AE1EgwICI +HYQTqB2AEw7yFcxTIECACvLPcIAAOEIJgFEgQIBKIUAgBPJKIQAgz3CgAAQl1KAw2c9woABQDCKg +EcyA2RMaHDDPcKAAsB83oDaguvxRIYDDz3eAADhCz3GAAEyNHfIA2I64HqXPcIAArARU4SCgG5cc +tR2Xkh0EEIoghA4etYogRAtCDu/7ANkG2c9woADIHCmgE/DPcIAArAQE4SCgGpcctRyXkh0EEE4X +ABEetYoghAsSDu/7ANnPcYAArARAgQCCAeAAoiCBAYEB4AGh+tj6D2//ANnO/IDg4AcBAM9woAAM +JM9xAAD/fyGgz3CgANAPERAAhoDgDfIKIcAP63IF2Iojjg+KJIMP2Qav+7hzAdnPcKAA0A8RGFiA +aBeBEByVAiBQAB6F7rgSAiEALyAIJEAdhBPPcqoAAAQIEgQAz3ClAAgMAIAEJIEPAAAA/yi5BCCA +DwAAAOAbeIm5BXkIhwQgvo8ABgAAMaUE8oy5MaXPc4AArKgwGwABLaMggkQVgBCU4CqjGvIF9org +GPQjuQ3wt+AN8u7gEvRFKf4CQSnBcFEkwIHCIWIAANgK8EUp/gJBKQFx+/EiufnxANkB2DalQYI8 +s0uj5LrKIGIA4brKIGEAhiL+D0EqBAEQEwUBSR0CER2lBSUCAUizVSHDBuC4z3IAAHwPCSOCAAPy +ANg78I7hjPegFwMQcHEI989zoADQD4ATAwBwcQnygLgdpaIM7/uKIAUI6/HPcKAA0A8ZEACGQiAA +CEggAAAQctz3z3GfALj/GIGQuBihGIGwuBihz3GAAKwEQIEFggHgBaIdhSCBg7gdpYogxQhWDO/7 +JYHH8QHYgOAJ9ADfz3WgANQLANiM/TMGAAAKcADZ//1iF4AQRBWBEAQgRACGIf8DQikFAUQkAgGg +cs9xgADcy8G6SWGJuTulbBWDEEkVgRAEIw8AhiP/A0S7JH9/Z89zgAAIcfQjzwNKHYITXh3EE893 +gADMzkpnibpcpXAVghBEeIYi/wMkeES6WGD0IwAABCEBAWAdBBARhaBxz3KAAChx9CJDABmlz3KA +ADhx9CJBAIodxBAapYwdxBCOHUQQkB1EEGECIAAA389wpgAIBAGABCCADzAAAAA0uFEgQMZAHQQQ +QBUBEQv0z3CgAKggCIAZYTB5Yg1v/wpwA/AKcMb9BCCAT4ABAADXcAABAAAA3xb0AdiWFYIQSh0C +EM9wgACsqCiQBLqJukAdxBNJHcIT9qXpoEV5KLDl8EkdwhPPcKYAjAN9gFEgwMcEI4EPOAAAAEEp +wASWHQIQBCOADwAAAPAsuCW5JXgRpc91gAB0ogXyEYWMuBGlUyPBAkQVhBA2pVEkAIDRI+KHANgD +9AHYz3KAAKyoaaKWFYMQyJIEu8V7aLLRhTyyUyTDAHx7z3eAAMzLb2cdpfulbBWPEMO/LyXBA893 +gAB8qfQnTxHNol4dxBPPd4AAvM5vZ9ml/KVwFY8Qw78vJcEDz3eAAHyp9CdPEdqlYB3EE893gACc +qfQnxRDPdqYAjAPPd4AArKn0J8MQih1EEYwdRBGOHcQQkB3EEN2GBCaPHwEAAAAwv0odwhPJokoV +ghCA4gDbGfJMJECDCvKAuB2liiBFCAIK7/uKIZEEHYVRIACAB/J18AoM7/uKINEHUSAAxvvzSPBV +Ic4G4LjPcgAAfA8JJoIQBPIA2DzwjuGP9892gAC0QsmG0XEJ9893oADQD4AXDhDRcQjygLgdpaoJ +7/uKIAUI6vEZFwCWQiAACIDgyiDMABBy2/fPcZ8AuP8Ygc9ygACsBJC4GKEYgbC4GKEgggWBAeAF +oR2FIIKDuB2liiDFCGIJ7/slgcbxAdiA4CfyAN9MIQCgz3aAAHSiB/IWho7gBfQehpG4HqZKFoAQ +gOAa9Ml1z3CgAHgmQtkyoB6F8bi8AgIAj/2A4KwCAQDJ/YDgrAICAKECAAAA2L78mQIgAADfiiDF +APoI7/uKIVEPz3GmANQELBEAgDQREYA4EQ2AyxESBipxxrmpcoYi/Q8GukV5KnKGIv0PBLpFeQQg +gg8CAAAAJ7pFeUQlAhwNukV5qXKGIvMPBCCADzgAAAAOukV5JbgleEQlgRAUuSV4iLhEJQESQSnB +gFIgQAURplQeQhDKIYIPAAD//8ohgQ8AABAfGnE2hj+2BCGBL/8DAP8ouTamSg4gAgDa8r2oHgAQ +PfJEFoIQMYag4tEh4YI18gQhhI8AAAABCPLPc4AAAHBLY4HjCvYEIYMPAAAAJNdzAAAAJCPyBCGD +DwYAAAAxu4LjNgANAILjC/RMJACAFfLPc4AAAHBLY4LjD/RMJACABPLM4gv2doYSc8ojjg8BAIgN +zCDOgM3313ABAIgNx/fPcoAAfD82ggHhNqIB2Rrwz3OAAABwSmPPc4AAMI1mk3ByD/bruQryz3GA +ADhCKIEEIb6PAAYAAAXySiAAIAPwAtkacVQWgRDPcoAArKgoGkAEB7lokoi5ZXkosjaGMBqABDyy +MYarogQljR8IAAIAHbItotd1CAAAAPQLoQvKIAEEFoaA4HQeABQE9NYLgAtq8M9xoADQD4ARAQAw +cAryTyABID2mz3KAAESOIIIB4SCiVBaBEIDhbOAL8gkggQ8AAGoGz3CgANAPIhhYgAbwz3EAAHwP +CSBBAM9woADQDxkQAIZCIAAISCAAABBxQgAOAM9xnwC4/xiBkLgYoRiBsLgYoc9xgACsBECBBYIB +4AWiHYYggYO4HaaKIMUIsg6v+yWBz3GAAESOAoEB4AKhHYZEIP6CFPKGIL+NCvKKIMULjg6v+4oh +UgtBAs//z3GAAESOCYEB4AmhnPwE8CILD/7PdaAA1Asv8Gz9CiYAkC70A9jPdaAA1AsRpeB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HgRpRPMERocMPClFQAP/R6F8bgD8kB+yPEUzIYg/4UF8gPIAYD9uALyjf1eDIAI8/HgePHA4cUI +dc9wgADwoguAz3GgAMgfZOAeoRDYDqEB2BUZGIAF8NYPr/t72AGFgOAF9FEjAMD48wGFwbiD4A/0 +z3CAADkIAdkgqM9wgACsBCCABoEB4AahANgW8AGFUSAAgAf0z3GAAHSiHYGCuB2hAYVRIECAB/TP +cYAAdKIdgYS4HaEB2JEHz/zxwM9wgAAoqfoPr/sY2c9wgAAQqe4Pr/sY2S8HT//geAHaANnPcKAA +tA9coM9wgADAjimg6QEv/BrY4HihwfHAsg7P/Ah3WnLPcoAAAAAAgppxUSDAgaHBOnMb8gGCUSDA +gUDYzyDiB8oggQ8AANAAzyDhB89xnwC4/x2hBIIB4NO4BKIFIIAP0P4AABahz3GAAJivJoEA2IHh +AdnAeYDnQCkTAz/yz3OAAHSilBOBAOe5CfTPcIAAKIUFuSBgLbjAuOlxhiH8AIwhAoUUexH0z3CA +AEgFAIBRIICABfIg3Y4TDgEI8JjdihMOAQTwXhMOAQ7diiCFAGIMr/upcYoghQBaDK/7yXHPcIAA +MKsAgOC4wCUiEbB6LyCII0onQCAJ8M9xgAAwqwCh+nAIdRpwCHLPc4AArMcgg4PhBfQjg1EhwIAK +9EohACAKJkAkCiBANAolQCSB8MATAgA4EoMANxKBAAi7ZXk5EoMAELtleToSgwAYu2V5NBKDAEAh +EAQzEoEALyAIJAi7ZXk1EoMAELtleTYSgwDPcqAA/EQYu2V5QCEVAV2CANlRIoCBzCEioAnyLyJI +BTpx+nHacRtxS/BPI9MjQSxCI8C6BLpUeopxxrlJIcEFNHpRJMCiz3GAAKByUWEG8kEpAgEUIkEA +KLkD4c92AAD8/wQhgwPPcYAAAKNIic9xgAAohQW6QWFAIBAh8rkvIAgkB/J7e0AgECEvIAgkQCXB +ISR+CCOCAwIimANRIACAwCUhESdtBCGBDwAA/P8II0AAAiBWABpiUHqKIQIgAhIBIUAgACUwcEj2 +AiEBBEghAQAweUDBBPAA2EDALyBIBIpxCnOqCiACSiQAAAokAKA+9ArYz3GgAMgfHqEQ2A6hAdgV +GRiABvDSDK/7iiAKCFEgAMMN9M9woAD8RB2ABCC+jzAAAAAF9FEjAMDu81EjAMDKIcIPyiLCB8og +YgHKI4IPAACmAsokIgCYA2L7yiUiAFEgAMMA2An0z3GAAHw/CYEB4AmhANiYuJpwTCQAoMolIhDK +IEIDyPRMIQCgz3aAADCrF/LPcKAA9AetoM9wgAAoyDGAW4kaiQi6RXgEtl2JHIkIukV4BbYAhoG4 +AKYD8ADYAqZMJwCgmvIAhlEgAIA78s9wgACsokyIz3CAAABwMiCEAB/ZTCQAgADa3PfPcAMAFABW +eM9zowCw/1DgYGDPdQMAGABWfVDlY2UvKAEAAeIvK8EAAnswc8ohxQCQcqj3QCxAAUIgAAgZYc9w +gABocyhgIYZPI9MjCbgFeQKGJXgCpgUjwCMNcQCxDXEAwACxDBIBIA1wIKAQEgEhDXAgsIoghQBq +Ca/76XGMJwKVFPKMJwORG/KMJwOVIfIKIcAP63IF2M9zAAAXDIokgw9hAm/7uHPPcIAArAQggA+B +AeAPoeII4AFKcBDwz3CAAKwEIIAOgQHgDqEI8M9wgACsBCCADYEB4A2hAIaA4AbyIoYNcCCgANgA +pkwhAKDPcaAA9AcA2BLyB6EB2AuhA9gIoUwZgAUB2APwANiqcQtySnNmDWALABQEMM9yoAD0BwDZ +JKIB3YDgAdhSDWALwHgAwQAhAATPcaAAyB/4EQIAQnhIIAAAX4EQeFBwSgAFAAwSAiDPcIAAJKtC +oKDYD6EA2B+hz3KAAIxCz3CAAHSiVYockEJ4AMJMJACgWGAfoQLYFRkYgAXyUSBAxiDYAvKA2A6h +jCcDlQf0z3CAAHSiHJAI8IwnA5EJ9M9wgADsog2Q9gtv/wDZ4gwP/xTMhiD5jwr0jCcDkQDYzyCh +A8ogIgEUGhwwz3CAAAAAAIBRIMCBBvLPcZ8AuP8A2B2hz3GAADCrANgAoalwCNzDAe/8ocDxwJYJ +7/wA2Qh1AYDBuIPgyiBBIMogQQAF8qlweP5KIEAggeAR8hCFUSCAgUXyEIXPdoAAdKJRIMCBGvLP +cIAAjEICiBjwAdsA3znwAN9VJkAa6XGQ2vYIIAEA20AlABKcHgAQANgFtQTbKfAFhSaFMg9AAVEg +wIGUHgIQB/IdhpW4HaYehpe4HqYfhgQgvo8QcAAAyiciEOj1nLgfps9wgABwyACAUSBAgNLzEIXt +uM7zAd/N8QDf6XPPcoAAdKJUEo4Az3GgAPQmgObPcIAAJKsR9M92gADSovQmzhNcktpiz3aAAIxC +1Y7CehC6gLoC8ALaQ6ElhUwgAKAhoA70z3CAADkIAdkgqM9wgACsBCCABoEB4AahfgsP/90A7/xo +cOB48cByCO/8kNmiwQh2QcEhhsG5g+EA2MogASAG8slwL/5KIEAgz3GgACwgJoGB4ADfMHkc8hCG +USCAgTTyz3WAAHSiHJUQccn2JYbPcIAAJKsCgBBxq/QQhlEgwIEI8s9wgACMQgKICPAB2ELwBYYm +hg4OQAE/hQQhvo8QcAAAlB0CEBD0z3GAAHDIIIFRIUCAAdlH8lCG7bpD8kDBKHdD8ADfI/CLcIDg +A/IC22CgA4GA4oO4A6EF8gCCprgAoiwWAAAEoQwWAAAFoQDBAcJVJUAaVg/gAAHbH4WeuB+lQCYA +EpwdABCOCg//ANjPdYAAdKJUFYIQgOLPcaAA9CZl9M9ygADSovQiwwNclXpiz3OAAIxCdYtiehC6 +gLpW8EDHAN9RIMCB0/VthgWGz3GAAKzHgcIEI4MPwAAAAAKBNrsRIMCAQCYGEkAhBAsh8gWWHBEH +AEIgBQT0JMMACCdAAXBw1/bPcKAALCAPgIDgEfTPcKAALCBmgByVcHAoB8b/z3CAACSrYoAFgRBz +jPMDgVEgwICV8wDaz3CgAPxEnrpBoAOBo7gDoYvxz3GAAKwEQIELggHgC6IggYogRQv+DG/7K4Fu +8QLaQ6FFhkwgAKDPcYAAJKtBoQ30z3GAADkIAdpAqc9xgACsBECBJoIB4Sai5Qav/KLA8cB+Do/8 +CHYVzFMgQIAK8gcSATYA2JgRAQD6CuAACHIBhsG4g+DKJyEQyiXBEwbyyXCs/Qh1Ad+B5cojYQBD +8hCGUSCAgQX0ANtocDzwFMxRIMCALPIVzFMgQIAbEgI2D/QAIoEPgAAQmAHYAKnPcYAAVE8yiVEh +AIA0DIIAENgUGhwwz3GAAESOEoEB4BKhA8gbEgE2hBACAc9wgAAEmDV4KYBZYSmgCN3Q8c9wgADI +jSuAAeEroAoMb/uKIMUJANsB2ALZz3KgAPQmI6JDhoDnz3GAACSrQaEO9M9xgAA5CAHaQKnPcYAA +rARAgSaCAeEmooDgCvIA2J64z3GgAPxEAaEA2AWhcggP/9kFr/wFI0AD8cBuDY/8CHYBgMG4g+AA +3cogQQME8slwbf0B3YHgANks8hCGUSCAgSjyFMzPcoAATI1RIECBGfJA2BQaHDBQEgAGAeBQGhgA +G8jPcoAAiJcUeiCqAxIBNgDYmBEBAKIJ4AAIcgrwpBIBAAHhpBpAAD4Lb/uKIAUKAtnPcKAA9CYj +oCOGgOXPcIAAJKshoA70z3CAADkIAdkgqM9wgACsBCCABoEB4Aahvg/P/i0Fr/wA2OB48cDPcoAA +dKJUEoEAgOEU9DySz3KAAIxCVIpCeRC5RSFDAc9xoAD0JmOhANrPcYAAJKtBoTn9geDKIGEABPJ2 +D8/+ANijBA//8cBqDI/8CHUacUEpAAHPcYAAIHPDuAhhJJUEIYEPAAAAgNdxAAAAgAHZwHk1eCGV +BOEwcA3yjCACpAn0z3CAAHSiFoCMIAKGA/IQ2JfwJJViCm/7iiDEC4wgAqwi8g72jCACoETyjCAC +pGbyjCACqIf0qXCY/oPwjCADpBXyCPaMIAOgffSpcJ//efCMIAOozCCCrwAA8ABz9Klwx/9v8Klw +1v5r8M9xgAAAAACBUSAAgRvyAYFRIACBQNjPIOIHyiCBDwAA0ADPIOEHz3KfALj/HaIEgQHg07gE +oQUggA/Q/gAAFqKpcEL/SfDPcoAAAAAAglEgAIEa8gGCUSAAgUDYzyDiB8oggQ8AANAAzyDhB89x +nwC4/x2hBIIB4NO4BKIFIIAP0P4AABah9gtgAalwJfDPcYAAAAAAgVEgAIEa8gGBUSAAgUDYzyDi +B8oggQ8AANAAzyDhB89ynwC4/x2iBIEB4NO4BKEFIIAP0P4AABaiJg5gAalwVQOP/E1xMglv+4og +hQhh8eB48cDiCo/8z3aAAHSiH4YEIL6PAHAAAFnyLykBAM9wgAAEBfQgTQCcFgIQAN+kFgEQTyWA +EOlz9fyA4BD0jCUDkM9xgAD4Pwb0F4EB4BehPfAWgQHgFqE58B+G/rgv8s91gABUTxCNLo0QcS3y +Eo1RIMCAKfQwrZ4IoAAD2FEgAMMZ9ADZnrnPcKAA/EQhoDCNhiH/AUO5ELlPIcIGz3GAAGy1IImf +uoDhAdnAeQ+5RXktoBKNhLgSrQXwz3CAABCv4KgSDIABhQKP/OB48cDhxZYJL/8A3c9xgAB0oh2B +USDAgV70z3CgAAQlooAEJY0f/wBf/1MlgBCH4EX0USKA00HyHoH6uD/0BCC+jwAeAAAO8gfwz3AA +AB0KJgpP+1EigMD69VEiAMDPJWIRz3GAAHSiHoH5uM8lIhLPJeISzyWiEyH0+7gS8oi9ib2NvU8l +wBK9gY64BCWNHwIAAABSJU0UKr0FfQ/w/LjFJYIfAAAABc8l4hLPJaITxSWBHwAAAAfPcIAAAKMI +iMS4GLhRIIDEBX3oDGL7yiAiCL0Br/ypcOB48cA+Ca/8CHLPcYAAdKIAkYgRAwHPdaAA0A9EIAQD +CibAkEDbEB3YkEIshACGIPwDyiZiEKgRDwBALoUVz3OAAKyo8H79s/yTEL7lfgwdmJNhiwK7SOMQ +HdiQYhEOAYgRAwHbY8CRcHtRJoCSRLhiGcQABvQukVMhwYAQ8s9wgAA4QgmAUSAAgD3YwCjiBcog +oQfAKCEGCvBALAEBOGDPcYAAQEUIYRe4A+MFIEABBCODDwAA/P9leJ24n7gMHRiQEcwB4BB4BCCA +DwAA/7+PuBEaHDAOHZiQIBUAls9wgAA4QgiA67gQ8uS6DvRqDm/9SHDPcIAASKGg2cTaPdv+CW/7 +F7uhAI/88cAyCK/8iiEIAM92gAAko89woAAMJCGgpJbPcIAAdKIegBp18biGIPwjSfJRJYDRRfKM +IAOkQ/QD2c9woADUCzGg4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeDGgyXBN/lEgwIAG8s9wgABAqeINAALPcaAAxCcZEQCGgOAE +8gLYEBkYgATYExkYgBvYFhkYgJvwjgwgBApwCHfJcApxwf4IdSP/RCV+lA7yUSUAkQjyz3GAAHSi +HYGAuB2hAYaKD8/+g/CA5wzyTP/PcYAAdKI9gVEhwIF59H7/K/AD2c9woADUCzGg4HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeDGg +E8wRGhwwz3eAAHSiHodRIMCBB/IB2c9wgABwBSCgUSXAkAfyz3CAAECp/gwAAs92oADEJxEWAJZR +IICAAN0X9CoOz/4dh1EgwIEr9BEWBZZRJYCAC/QKIcAP63IF2IojCQ/pBe/6iiSDDwTYEx4YkBvY +Fh4YkM92gADIrRmGgOAE8kIPQAG5ps9wgAAAAACAUSAAgQXyz3CfALj/vaCpBk/84HjxwEYOb/xN +2M9yoADEJy0SDoYJuBoaGIDPcIAAyKIgiIDhocEG8gHbz3GgANQLcqEE2RAaWIBNcYYh8w+MIQyA +AdnAeTlhNHkAiB7hgODKJUEQBPJAIQ0DIn4H8M9wAAD+Dz4OD/tRIIDEBfRRIQDG9vPPcaAA0A8Q +GViDJREAhmDAJREAhg95ARwCMAAUADGMINiBzCCCjwAABwjKICIAB/SI4QHYwHhyCCALLm7PcqAA +xCcaEgGGBCGBD////wAaGliAERIBhuu5CfIA2Yu5ExpYgBrZGRpYgNkFb/yhwPHAXg1P/M92gAB0 +os9woAAMJDyAVoahwQIiQABkuBB4hh4EEBByyiHOD8oizgfKIG4ByiOODwAAMwXKJC4AiATu+sol +DgEDyAGA/bgJ8i8ghwqMIAKGBfQehp64HqbPdaAAxCchFRCWcgoABIDgHAIhAJgeABDPcoAAAAAA +guu4GfIBguu4QNjPIOIHyiCBDwAA0ADPIOEHz3GfALj/HaEEggHg07gEogUggA/Q/gAAFqFRJcDR +z3WAADhCBPJWFYAQBvADhqYKIAEkhj6GlB4CEEQhAAyg4Af0USXA0gX0gNiUHgIQlBaAEFEgwIEE +8pe5PqZRIYCBJ/IUllEgQIEj9MIIgAeA4B/0z3CgACwgD4CA4AXyA8gBgP24FfIehpC4HqbPcIAA +cMgAgFEgQIAF8lElQNMB2QL0ANmLcJDa0gugAADbz3CAAHSilBCBAEApAgaGIf0PUiHBAUW5RXnP +cqAAiCQwoimF47legATy6boE8gDYA/AB2FEhAIHRImKCANnKIWIA97oleA94FvRRIoDTEvKA4BD0 +RCI+0wz0z3CAAHSiAYBRIACABPK+CgAEBPC6CwAEz3WAAHSiHoXzuCPyBNnPcKAAkCM9oE1x1gkv ++4ogRA4F8OYLL/uKIBYPUSCAxAX0USEAxvfzz3WAAHSihhUAEc9xgAA4QuoJoAQvkRXwAJUEIIAP +AADMgNdwAADIgAj0C4VRIACABPJA/wfwBNnPcKAAkCM9oALYz3egAMQnPB8AkJQVgBDPcYAAJKtR +IMCBBBkABAnyHYWVuB2liiAFCU4JL/sA2Tz+CHYdhVEgwIEKAgIAUyZAEIPgB/QVFwCWUSDAgFzy +Hgvv/slw7wEAAM9xgADIjQ2BAeANoQPZz3CgANQLMaDgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4MaATzM9xgAAkqxEaHDAQ2BAd +GJAC2DwdAJDuCe/+BBkABB2GUSDAgbf0ERUFllElgIAL9AohwA/rcgXYiiOXDKkB7/qKJIMPBNgT +HRiQG9gWHRiQofAUzFEgwIA+hQvyBCGADwBAQADXcABAQAAD9Ji5PqXwuRLyAMHU2KlyLgtv/wHb +gOAE8u4LQAEI8M9xgAD4PxaBAeAWoc9wgAA5CAHf4KjPcIAArAQggAaBAeAGoR6F87i8DYIEHoXw +uMAMgf4ehVEgwIEH8gHZz3CAAHAFIKDPcaAAyBwA2AehMNgKoclwGf6KIIQN3g/v+slxA8gBgP24 +FfIehfi4E/IQ2BQaHDDPcIAAQKm6D8ABG8gAIIEPgAAQmB6F4Km4uB6lAJWGIPwAjCACgC70qguA +BIDgKvQD2c9woADUCzGg4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeDGgE8wRGhwwHoXzuAX0AJVGCuAFNJVRAW/8ocDPcoAAjEJU +illhMHlBaVBwxPYieBB4A/AC2M9xoADIHx+hiiAYCA6hAtgVGRiA4H7xwLIIT/zPcIAA/AUAgIDg +uA6CBs92gAAAAACGUSDAgEogACAa8gGGUSDAgEDZzyHiB8ohgQ8AANAAzyHhB89wnwC4/z2gJIYB +4dO5JKYFIYEP0P4AADagFMzguADfRfLPcaAAyB+wEQIAz3OAADhCahMAAWO4CCIAAB6hENgOoQHa +FRmYgM9wgAAkpwMaGDDPcIAA6KcHGhgwCIPPdaAAtEfruAXySx3Yk3cdmJBKDwACVxUAlry4Vx0Y +kM9wgAAUBQCIgOAG8gIJQAgSCkAIBCCRTzAAAADPcqAALCDPdaAAyB818O24yiWBH6AAyB/KIoEP +oAAsICnywg7P/s91oAD8RAWFvLgFpc9wgADAjgmAjCACjYn3lgpv+xrYz3CgALQP/KDPcIAAOEII +gOu4BPIA2J64AqUUzM91oADIH89yoAAsIO+4GfQKIQAkz3GAAHw/46HloQOC8QIgAAehTgpv+xrY +z3CgALQP/KDPdaAAyB/VAiAAGnYE2AoaGDAfhYDgiiAMAMoggg8AAAACDqUD2BW4Eh0YkM9wgAD8 +BQCAgOBADYIGAIYEIL6PAADfeAQEAQDPcJ8AuP/9oPkDAAAKyM9xnwC4/xahz3CfALj/WBgACB6F +USBAxTzyCsiGIPGPOPTPdYAAfD8DhQHgA6XKDe/+Ad7PcKAA/EQlgLy5JaDPcYAAwI4pgYwhAo1Q +B+b/AN/PcYAAOEIogeu5BPIA2Z65IqDPcIAAdKIdgIYgvo8E8gWFAeAFpc9wgAAAAACA67gG8s9w +nwC4//2gSiBAIBTM5LgN9Oa4HPSGIP+FU/JRIwDACfJRIEDFB/Ql8BXMUyBAgAf0z3WgAMgfyQEg +AADfB8gDEgE2AxoYMAcaWDBiDQACz3CgAPxEJYC8uSWgz3CAABQFAIiA4OfzGg8ACCoIQAjh8RTM +z3WAAESOUSDAgDfygNgUGhwwFczruAjyGIUB4BilSiAAIAXwEIUB4BClz3CAAFRPEohRIACA+Asi +AMogYgBMIQCgBfIXhQHgF6UUzOe4AN9c8hXMBCCADwAAABjXcAAAAAge9B4NIAEKcFEgAIAW8gjY +m7gP8IogBAAUGhwwD4VMIQCgAeAPpeHzFoUB4Bal3fEKGhgwefAE2P3x1gyAABXMUSDAgCfyz3Gg +ACwgBYEmgQrgMHAy9wMSATYC2BQaHDBQ2P4NIACYEQEAbgwAAs9xoAD8RAWBvLgFoc9wgAAUBQCI +gOBR8iYOAAg2DwAIS/ADyKAQAADwuOlwGfIuCoAAANiWuBXw6LgW8joLoACKIAQAXgygAOl1A8ig +EAAA8LipcAXyBgqAAADYlbieDIAAtPHpuM9yoADIHwfy7gmgAAHYANiQuPPx7rgK8lEjAMAI8oog +BAAOogTYChoYMBUSATfvuRHyQBICBs9wgADsog2QEHKJ96+5FRpcMM9wgACsx+Cgz3WgAMgfCsgE +IL6PA4DoQ3IFwv9RIEDFagXC/z+FoBUAEAkhAADk4NP2z3CAAAiaAIBRIECAC/L+pRDekg+gA8lw +gOAF9AHYHqXOpYogCACgHcATDqUfhajgSPeA4AT0iiAEAA6logjABxIVAJYVFQCWERUAli/YlbgS +HRiQz3ABAMD8FR0YkJ4JgADPcoAAUAUAgofgH/LPcKAAOC4FgAQggA/AAAAA13DAAAAADvL12QW5 +z3CfALj/OqAH2TugadkYuTmgAdgD8ADYgeAD9AfYAKLPcIAA/AUAgIDgxAmCBs9xgAB8PwOBRIEI +IgAABKEFgUaBCCIAAAahfIUHgUiBAnsAyggiwgCI4EihCfQD2c9woABALTCgABrCMwTwAeAAGgIw +z3CAAAAAAIAEIL6PAADfeAXyz3CfALj//aDPcIAAOEIIgOu4FPLPcIAA5AMQeM9xoAC0R0kZGIDP +cABEFABLGRiATBnYgwPYdxkYgF0DD/zPcIAAFQVAiOC6CPLPcaAArC8ZgYq4GaFRIkCAB/LPcaAA +rC8ZgY64GaHgfvHA4cUH2RsaWDDPcKAA1AcaGFiADhANhs9xgAAAAECBUSIAggsaWDMa8kGBUSIA +gkDazyLiB8oigQ8AANAAzyLhB89znwC4/12jRIEB4tO6RKEFIoIP0P4AAFajz3GgAEgsvqEfEACG +AhoYMAjKnODMIIKPAACRAAXyABYAQAAWAEAFzM9xnwC4/xihiiBGBIoI7/oCEgE2tQIv/AjK4Hjx +wOHFz3GAADhCSIFRIgCAKPKGIP8Bz3KAAFBwQ7gKYgDbgOLKIcEPyiLBB8ogYQHKI4EPAABtAMok +wQBcAaH6yiUhAIHiz3CqAAxQvoHH94C9vqEB2SWgBPCgvb6hZaBNAg/88cDKCQ/8GnDPd4AAVE8Q +j4Yg/wFCKNEAz3agALRHKnUF8A4K7/qKIMgFcRYAlgQggA8OAAAAQSh+hPX1QxYAlkYgAA1DHhiQ +VxYAlry4v7hXHhiQXxYAlr+4Xx4YkADYnrhTHhiQEI9gHhiQzP/PcIAAMI0HiIDgFPIQj4Yg/wEm +CC/+Q7jPd4AAGAUYjxB1CPLPcIAAhFcWgEB4GB9CFDIKQAhDFgCWTCDAoEUgAA1DHhiQgAANAApw +MyYAcIAA1HNAJ4FyFHkAeRC9m73PcIAAbLUAiJ+9gOAB2MB4D7ileF8eGJAg8M9wgABstQCIEL2A +4AHYwHgPuJi4n7ileEUgwAFfHhiQDvAQvc9wgABstQCIn72A4AHYwHgPuKV4Xx4YkArIhOCcCyH7 +yiDhBPkAD/wKIcAP63IF2IojTg1KJAAA8Qdv+golAAHxwIYIL/wB2c9wgAA4QgiAwLgbeADez3Wg +ALRHSx2Yk3cdWJDPcaAAhETYoQLZdx1YkADZnrlTHViQVB1YkM9xgABAAUcdWJCOuM9xgAAoAEUg +Bg1IHViQz3CAADhCSR2YkxqQArhsuEQdGJAc2EUdGJDPcIAAgGQBiEYdGJDPcIAAVE8QiHP/SiTA +cM9xgABEq8lyqCCAA89wgACUtVZ4YYDyavZ/P2cCgGKnAeIDp893gAAYBQCHgOAE8mQdGJBDHZiR +Adh8/89wgAA4QiiA67kR8s9wgADkAxB4SR0YkM9wAEQUAEsdGJBMHZiTA9gE8EsdmJMB2HcdGJBR +IQCAQIcO8lMiQQASuUQiAAMOuCV4hiL/Awq6RXgS8EhwhiDzDwq4BCKBDwAAAAwGuSV4BCKBDwAA +ADACuSV4z3GAABBkrQfv+wKhocHxwCIP7/uYcKbBBCCDjwAAAARQwQbyz3CAAFgFIIDPcIAAlLUA +gEDBCHKGIv4DJLpAKo0DEMLCuA64pnoFIIUAQBxAMQQlgA8BAADALrhAKA8GnL/PcoAAOEJIgp+/ +z3WAABgFUSIAgM9ygAAARhZ6BvLQgsWlUYIF8MCCQYLFpVEkgIFEpQjaC/IL2gQlvo8AAAAYyiKC +DwAADwRRJACBWnLPJ+IWBfRRJACCzydiF1ElQII+8oDjyiHCD8oiwgfKI4IPAAB2AdgFYvrKIGIB +BCGBDwEAAMAuuc9ygABQcCpiSSKCAGG6z3WAADhCYhWNEDDDCLgyajR5ZH3HcYAAzKlIEREGSREU +BoYl/x4JvQV9pXsEJYAPAAAAEAUg0wCevxjiT3oDyLkYggCI8IDjJvJRIQCCRMEkwg/yz3GAAABw +SWGB4cn2guEE9AbZYMEG8AfZYMEC8GDCQgwACM9xqwCg/wKlWIHPcIAAxAZAoDmBz3CAAMgGIKAA +wOi4H/JEwCTDoOPKIsIAyiIhAAQggQ8BAADAz3WAAABwa2UEIIAPBgAAADG4LrkbY89wgABQcChg +YngWIgUAFPBTIMEAz3KAADBzPXkpYgQggA8BAADALrjPcoAAUHAIYmG4FiEFAEwlAIaL9wohwA/r +cgXYiiOGBq0Eb/qKJIMPEMDouAHaBvIwws9xgAAAcEphQC2BADR5x3GAAMypABERAAQRFABhugQg +gA/vAADdJrgFegPIUiLTA7kYQgHPcoAADEMagluCRHhRIACCAN0H8iKBz3CnAIhJL6BAFBAwanCG +IOMPz3agALRHQSgVAgbwKg2v+oogyAVxFgCWBCCADw4AAABBKH6E9PWKIP8Pbx4YkGseGJAD2A+4 +z3KgAMgfExoYgFkeGJVaHliUWx7YlFgemJT7v0olAAAN8h6CArhCIIUDTCUAgMolTAOocMm4BX8A +2M9xgACUtSeBDyBABSR4z3GAAMwEgOAB2GCBwHhTIwGAr78I8oYjfw99ew+7ZX8F8IDgzyfiE1ce +2JNAEgIGgOEF9IDgBt3KJeERz3CAADhCCIBRIACAE/JPJQASjbiXuBUeGJAFJYAfgABAOhoeGJAF +JY0fgADAUxHwBSWAH4AAwCQVHhiQBSWAH4AAAD4aHhiQBSWNH4AAgFcXHliTz3CAADCNBJCB4A30 +hBYBllAhAAMEIYEPAAAADK24ArkleAPwhBYAlhYeGJCMJc+PyiHGD8oixgfKIGYByiOGDwAAEgHs +Amb6yiTGACpwLgigCApxCNyvA+/7psDgeKHB8cBWC+/7mHDPcIAAlLVggKTBaHCGIP4DJLgOuAZ5 +wrsOu2V5TcEEIYMPAQAAwC67geIB2MB4BrhWIEAIQCsNBpy9z3KAADhCSIKfvc92gAAYBVEiAIDP +coAAAEZ2egXy8ILlplGCBPDggkGC5abpuUSmLvIEIYIPAQAAwC66z3aAAFBwSmZJIoIAYbrPdoAA +OEJiFo4QLccCulR6x3KAAMyp5H5IEhEGSRISBoYm/x4Jvgi7xXtlfwQhgQ8AAAAQJX+evU8gFAFP +JNQhX/BRJECCzyBiAc8gIQHouZpwIfJDwSPDoOPKIMIAyiAhAM92gAAAcGtmBCGPDwYAAAAxvwQh +gg8BAADA+2Muus93gABQcEpnYnoWIIUALcALZhXwUyHAAM9ygAAwcx14CGIEIYIPAQAAwC66z3OA +AFBwSmNhuhYghQAB20wlAIaM9wohwA/rcgXYiiPJDHUBb/qKJIMPQC2CAFR6x3KAAMypABIRAAQS +EgBhuwQhgQ/vAADdJrlleVIhzwPPcYAADEMagTuBJHhRIACCB/Iigs9wpwCISS+gNBQQMOlwhiDj +D892oAC0R0EoEwIG8A4Kr/qKIMgFcRYAlgQggA8OAAAAQSh+hPT1iiD/D28eGJBrHhiQA9gPuM9x +oADIHxMZGIBZHpiUWh5YlFse2JNYHhiV+71KJQAAC/IegQK4QiCFA0glBQCocMm4BX0A2s9wgACU +tQeADyLCBAR6z3CAAMwEgOIB2mCAwHpTIwCAr70I8oYjfw99ew+7ZX0F8IDizyXiE1ceWJNAEQEG +gOAG9IDiBtjKIOEBA/AA2M9xgAA4QiiBUSEAgBPyTyABAo25l7kVHliQBSCBD4AAQDoaHliQBSCA +D4AAwFMR8AUggQ+AAMAkFR5YkAUggQ+AAAA+Gh5YkAUggA+AAIBXFx4YkM9wgAAwjQSQgeAN9IQW +AZZQIQADBCGBDwAAAAytuAK5JXgD8IQWAJYWHhiQjCXPj8ohxg/KIsYHyiBmAcojhg8AABIB0Acm ++sokxgAqcBINYAgKcQjcmwDv+6TA4HjxwDYI7/sCudpwz3CAADhCH4A2eQAhjQ+AAESrgOChwUDD +zPIIhQUgkwAgHcAUGBUUEBAVFRAUFREQ54WKcAAVEBCGIOMPz3agALRHQSgSAgXwXgiv+oogyAVx +FgCWBCCADw4AAABBKH6E9fWKIP8Pbx4YkGseGJAD2A+4z3KgAMgfExoYgFkeWJVaHliUWx4YlVge +2JT7v0olAAAK8h6CArhCIIUDSCUFAKhwybgFf89wgACUtQeAANkPIYEEJHjPcYAAzASA4AHYYIHA +eFMjAYCvvwfyhiN/D317D7tlfwTwgODPJ+ITVx7Yk0ASAgaA4Qf0gOAG2Mog4QEC8ADYz3GAADhC +KIFRIQCAEvJPIAECjbmXuRUeWJAFIIEPgABAOhoeWJAFIIAPgADAUxLwBSCBD4AAwCQVHliQBSCB +D4AAAD4aHliQBSCAD4AAgFcXHhiQz3CAADCNBJCB4A70hBYBllAhAAMEIYEPAAAADK24ArkleATw +hBYAlhYeGJCMJc+PyiHGD8oixgfKIGYByiOGDwAAEgEcBib6yiTGACpwYgtgCApxJg1gCgDAANnP +cIAAOEI/oACFAB4AIMUGr/uhwPHAjg6v+wDbgOGlwQrySIEEIoIPAAAAMEIiA4DKI2IAUmhWesdy +gABEq8CC6L5AxhHyIMDPdYAAAHAyJQQQAIoNZQQmgB8GAAAAMbgAIEUDBPAB2JhwuHCuvq++sL5A +xoDjzCEigI30z3CAAJS1z3OAAHSilhOBAAOICyEAgDjySBOBAADfANtTIU0ADyNDA0QhDQNCvYYh +/wMPJ08TvGkEJw+QANkEew8hQQMkeMonARCA48ojwQNMJUCAE/JMJYCAFPJMJcCAQvIKIcAP63IF +2IojCw1KJAAAGQUv+golAAEOu2V+N/Dle/3xIYLPdYAAKIV1aWNlUSNAggryLygBAE4ggQcA2I64 +OHgFfiPwTCVAgA7yTCWAgBLyTCXAgBbyCiHAD+tyBdiKI8wC1fHPcIAAMIg2eAKIB/DPcIAAMIg2 +eAOIDrgFfgXwjr6PvpC+BCaAHwEAAMAuuM9xgAA4cwhhsHBWACYAQMYKIcAP63IF2IojzAR5BC/6 +mHYNkSiBhiB/DAQhgQ8AAAAwLLmpaRx4QCWBExEgQIMPJk4QQMYN9AohwA/rcgXYiiMMB4okww89 +BC/6uHXPcYAAlLUAgYtzoIOGIP4DJLgOuAZ9oKMAgcK4DrileACjAMDPc4AAOEIEIIEPAQAAwC65 +QCkFBk8lBQeog08lxQfPdoAAGAVRJQCQz3WAAABGNn0G8vCF5aaxhQXw4IWhheWm6bikpi3ypoII +uSV9pqIEIIAPAQAAwC64z3WAAFBwCGVJIIAAYbgCuBR4x3CAAMSqqoDLgGITgAAgxwQgxAPPcIAA +rKIREIYATyWFBwQmAAEJuAV55XmKIAYGUfDouB3yRMAkxqDmyiWCE8olIRDPd4AAAHDOZwQgjw8G +AAAAMb8EIIEPAQAAwP5mLrnPd4AAUHApZ8J5EvBTIMEAPXnPdYAAMHMtZQQggQ8BAADALrnPdoAA +UHApZmG5Nn2Y5Yz3CiHAD+tyBdiKI80EiiSDDwUDL/q4dTJtNHnHcYAAzKmggcGBQiRBAAQggA/v +AADdJrgFeVIhwQOKIAQCxKKlohwaQAEIoiaiAdgfo80Dr/ulwADYkLjPcaAAyB8VGRiAz3CAAAia +RpBbek8iAwBaEQKGOBCAAGR6WGDYGQAA4H7geOHFANvPcoAAiJcUIg0AYLVotRpiIBrCAMAdxBAo +GsIAz3GAAAiaFnkikTAawgDQHcQQgB3cEHgdRBAB2YgaQgDPcYAAKJgVeWCh4B3EEPAdxBDgf8HF +4HjxwOHFCHUbEgE2z3CAAIiXNHgRiIDgEvIDyAGA7bgO8s9wgAAog/AgQADPcYAAvAQUeQCREOAA +scYNAAMbyNv/A8gB2aAYQACiCiADqXDPcIAAAAAAgFEgQIES8s9xqqq7u89wnwC4/zagNqA2oDag +z3GgAMg7DoGIuA6h0QKP+/HAVgqv+0okAHLPcKAAiCAA3qgggA+H5jnyoIDPcYAACJrPcoAAaK/W +eWiJR4J6YoDlz3OAAACY1Hse9AAmjR+AAPiX+I2C5wj04JP7fyORgL8kf+CzBvCB5wT0IpEgswDZ +OK3PdaAAyBz6hSCT5HksswXwLJMwdcP3WWED8KyzuWKJIc8PBBhQAAHmANnPcIAAaK8pAq/7J6Dg +ePHAugmP+1EgwIEbEgE2z3WAAIiXAxICNs9zgABkqTR98Y0QFYQQEvIB5+lwMhKFAKeTAhsCAc92 +QQCDAKazz3WAAOQ/46sR8EAkQAAxEoUAAqvAFQ0R46vPdiEAggCms891gADoP7Bwx/fEowCFAeAA +pQSDWfDPcIAAqJcoYAHgBKsBglEgAIGwikDyLyTIA893gAAgZAeH0oqA4C95BPIFhyTwSSHAADVt +z3eAACiFIWf2uQfyz3GAADCItnkhiQLwANnHcIAAMIi2eASICCYOEAgmQRCAcUkhwQMWbTV4z3GA +ADCJAGHPcYAASIe2ec91gAA4Qr2FIYGleQQhgQ8AAAAIJngD8AOCAqOYEoAAKIsQcQbyANgEq2DY +GLgE8ADYnbgEo/0Aj/vgeOHF4cbPcKAAFAQD2SOgG8jPcoAAZKlhks9xgACIl8SKFCENAGi1ACCD +D4AAqJc44cCrYoIVeQaSYKEDEgM2wB0EEASCoBMBAIYhww8leKAbAADBxuB/wcUbEgI2BCC+j2AA +AADPc4AAiJdUe8dygAD4lwhxBvIDyByQUSCAggryBCGBD2EAAADXcQEAAAAG9ADYALMB2B7wFMxR +IMCBAxIBNg3yMhGBAAGLMHAE9ADYAavy8QHgAasL8DERgQAAizBwBfQA2ACr5vEB4ACrAtjgfxiq +8cC6D2/7BNkIdRsSDjYG2BsaGDDPd6AAFAQKp89wgADYc+YNT/oAhd4Nb/oE2QGF1g1v+jjZIoWA +4QbyAYUAkBBxzPcKIcAP63IF2ITbSiRAAM0G7/m4c64Nb/oDhQGFQoUgkAWFog1v+kJ5yqe1B2/7 +GxqYM+B4z3GAADQF4H8DoeB48cA2D0/7IYAKJQCQEInDuMohwQ/KIsEHyiOBDwAAvQDKIGEBMfKA +4cohwQ/KIsEHyiOBDwAAvgDKIGEBJfIFuM9xgAAohQdhA4UAkIYg/ACMIAKALb/Avwr0hC8LHAAh +gH+AAAjOIYCBuSGgAYXCgAGGgOAE8gCGgOAM9AohwA/rcgXYyttKJEAAEQbv+bhzUSCAwQX0AguA +BoDgDPKKIM4C2gwv+tHZAIaA2SigAYZAeBzwAYUgkCLIEHHKIc0PyiLNB8ojjQ8AANcAugft/wXY +qXCq/wGGx//PcIAAKIPmoI4Lb/vpcLUGT/vPcYAANAUjgeB/IKDxwOHFAxIBNqKBIIViC2/6JNoB +hYDg4iACAJ0GT/vgePHAHg5v+wbYGxIPNhsaGDDPdaAAFAQKpQmFgOAA3hPyXg3AAgmFgOAN8iQV +BRAKIcAP63IF2IojxAZJBe/5SiRAAOqlz3GgANAbEIHPcoAAiJeGuBChE4GQuBOhHYqA4Bsa2DMM +8s9wgAAogwaAz3GAALwEFHkAkRDgALHGss6yJhqCA8wahAOKIE8L1gsv+oohBAvxBU/78cDhxQh1 +z3CAACiDRoDPcIAAxMuEKgsMACBCDs9wgAC0mACAUSDAgKHBFPIWac9zgAAwiQBjUSBAggz0z3CA +ADCINnhbigKIiboOuEV4BvBiD2/6i3AAwAClpQVv+6HACiSA8AUgRADgIMEHRCT+gEEqxACEAAIA +LyQC8UIhAQFCIAMB6CCiBAQRBAIEEQUCBBEGAgQRBwIEGwgBBBtIAQQbiAEEG8gBLAAlAEQiPoE8 +ACIARCL8gEAhwQDgIMEHQCPDAKgggAEBEYQCARsKASAgwAcEEQQCBBEFAgQbCAHUB+H/BBtIAUQi +/IAEEQQCyQfv/wQbCAFCIUEAQiBDAKgggAEBEYQCARsKASAgwAfxwHoMb/sA2M91gABMrEokAHSA +3qggQAUIcQHgTyDCARYlQxBHq4oiCABAKUQBACSBD4AAKIVAoQDaQrHGqcDYfx0CEM91gABEBcCt +z3CAAMysgNm+DC/6KHLBrc9wgACMQoUEb/vCqKLB8cAKDG/7mHJFwUEoAQJBKAMEB3kne8a7x3OA +AMysIIvnuRL0FBQOMc9ygABMrBYiTQDghfFwBPTildF3CPInjee5Z23z8wDYIPDGjYDmBvSA389w +gABEBeGoz3CAAIxC4ojxdgT0gN7CqMaNNnoAHIADB42HuQCrz3CAAEQFYIggqAHYZ6oM3O8DT/vg +ePHAcgtP+89xgADccyGBo8FCwc9xgACgBBUhEAAAEA4ggOYvKIEDTiCNB1TyFW0AIJEPgAAohQYR +gCDPcYAATKwWeQCBIpGO5QgcRDDKIGEABPKLcgLBx/+A4DXyANjPcYAATAVAgQ8gQAMvIgogBCKA +oAChBvSA4gAO4gTKICIIr3iKCiAAENkA3wQZxCOKIQgAABlAIKlw6XE+D+AJD9rPcIAASIcAEAEg +tnjgoOGgz3CAACiHBCGBBAAYQCC0eOCwECZOky8ogQNOII0HsPX9Am/7o8DgeKLB8cCiCk/7RcHP +dYAAOEIihTBwCPQmlRQUDjEwdgT0Vh2CEIDiDPTPdYAARAXBjYDmANnKIEEAI/IhrY7iBPQB2B/w +QSgNAgd9QSgBBKd5z3aAAEQFoI5TJUURTCUAhMa5i/YKIcAP63IF2LLbnQHv+Yokgw9RJYCRBPIA +2FLxz3WAAEysFiVNEeeNAKUUFAAx4K5GrQK1x3GAAMysAIkHrQAZQgEAG0IBzPGiwUHBQSgCAgd6 +QSgBBEd5z3KAAMysxrkqYue6EPQEFAMxz3GAAEysVnlAgVBwBfRCkXByBvJHiee69fOA2APwBong +f6LA4HjxwLYJb/u4cEokQACQ4Mohyg/KIsoHyiOKDwAAAgH4AOr5yiBqAUAtQwHHc4AAKIXGi4wm +ApAA2A3yz3CAAEysFiCNA6CFoKEmizZ4ApAAsohw0QFP++B48cDhxc91gABMrc9xgAA4QgCBdBUC +FhByIfQCkeoVAhcQch30dhUAFjoP7/93FQEWjCACgBPyz3KAAEgFIYIA2w8jAwAFuGZ5IaIAIIEP +gAAohQCBqriIuAChANh1AW/79B0cEM9wgAAAoyiIz3KAACyvjCECgAKSQSgDAwvy67gJ9AW5x3GA +ACiFApEPIMAAArEA2OB/BLIA2kokAHRIcagggAPPcIAAMK7Pc4AAsK40e0CzNnhAoEGgAeFKJMBz +ANmoIEACz3CAACiHNHhAsAHhz3CAAEgFQaDPcIAALK/gf0Sw8cB2CG/7VGiGIvgDibpTIcMARXvP +coAAKIcUeo/hiiUPHMogKQAJ9gCSAN4PJk4QiiXPH8Z4ALJKJAB0ANqoIEAGz3eAAKiuVH/El6R+ +0XPPcIAAMK4M9ADexLdWeMCgwaDPcIAA0K5VeMCgAeJxAE/74HjxwAIIb/uYcgh1z3aAALCu9CZA +EM93gAAwrlEgQILKIEEAyiQidMogIgDoIGIC9CYCEFEiQIID8gHgkOBGAAYALbvAu89ygAAoh7R6 +QCuFAmCSBL2GJfgTib0PI0MAYLIA2hZ/QKdBp8O5pXkFIUMBFH5gts9xgADQrhV5ABkAAQLwgNjl +Bw/7CHHDuM9zgACwrvQjAgDJulBxyiQidMogIgDoIGIC9CMCAMm6UHED8gHg4H7xwE4PL/sA2aPB +CHUBgMG4g+DKIEEAnA8i/sogQgOB4BHyEIVRIICBD/IQhc92gAB0olEgwIEa8s9wgACMQgKIGPAB +3gLwAN4C2c9woAD0JiOgJYXPcIAAJKvyCa/9IaDJcFUHL/ujwAWFJoXqDM//lB4CEB+GBCC+jxBw +AABh9M9wgABwyACAUSBAgAXyUSVA0wHYAvQA2EDAlBaAEFEgwIFI9G2FJYXPcYAArMeLcAQjgw/A +AAAA4oE2uxEnwJBAJQISQCEECyXy5ZUcEQYAQicFFPQkwwAIJk8BcHc2AAwAz3egACwgb4eA4xP0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:20:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8823E106566B; Sat, 31 Jul 2010 10:20:09 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C8B38FC17; Sat, 31 Jul 2010 10:20:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VAK9Am048709; Sat, 31 Jul 2010 10:20:09 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VAK9Pt048707; Sat, 31 Jul 2010 10:20:09 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007311020.o6VAK9Pt048707@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 31 Jul 2010 10:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210674 - stable/8/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:20:09 -0000 Author: bschmidt Date: Sat Jul 31 10:20:09 2010 New Revision: 210674 URL: http://svn.freebsd.org/changeset/base/210674 Log: MFC r210114: Handle RUN->ASSOC->RUN transition correctly, as in not trigger a firmware error. Convert if statements to a switch statement while I'm here. Modified: stable/8/sys/dev/iwn/if_iwn.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:18:15 2010 (r210673) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Jul 31 10:20:09 2010 (r210674) @@ -1940,27 +1940,44 @@ iwn_newstate(struct ieee80211vap *vap, e IWN_LOCK(sc); callout_stop(&sc->sc_timer_to); - if (nstate == IEEE80211_S_AUTH && vap->iv_state != IEEE80211_S_AUTH) { - /* !AUTH -> AUTH requires adapter config */ - /* Reset state to handle reassociations correctly. */ + switch (nstate) { + case IEEE80211_S_ASSOC: + if (vap->iv_state != IEEE80211_S_RUN) + break; + /* FALLTHROUGH */ + case IEEE80211_S_AUTH: + if (vap->iv_state == IEEE80211_S_AUTH) + break; + + /* + * !AUTH -> AUTH transition requires state reset to handle + * reassociations correctly. + */ sc->rxon.associd = 0; sc->rxon.filter &= ~htole32(IWN_FILTER_BSS); iwn_calib_reset(sc); error = iwn_auth(sc, vap); - } - if (nstate == IEEE80211_S_RUN && vap->iv_state != IEEE80211_S_RUN) { + break; + + case IEEE80211_S_RUN: + /* + * RUN -> RUN transition; Just restart the timers. + */ + if (vap->iv_state == IEEE80211_S_RUN) { + iwn_calib_reset(sc); + break; + } + /* * !RUN -> RUN requires setting the association id * which is done with a firmware cmd. We also defer * starting the timers until that work is done. */ error = iwn_run(sc, vap); - } - if (nstate == IEEE80211_S_RUN) { - /* - * RUN -> RUN transition; just restart the timers. - */ - iwn_calib_reset(sc); + break; + + default: + break; } IWN_UNLOCK(sc); IEEE80211_LOCK(ic); From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:24:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AAD01065676; Sat, 31 Jul 2010 10:24:10 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 593378FC15; Sat, 31 Jul 2010 10:24:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VAOArA049660; Sat, 31 Jul 2010 10:24:10 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VAOAhE049657; Sat, 31 Jul 2010 10:24:10 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007311024.o6VAOAhE049657@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 31 Jul 2010 10:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210675 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:24:10 -0000 Author: bschmidt Date: Sat Jul 31 10:24:10 2010 New Revision: 210675 URL: http://svn.freebsd.org/changeset/base/210675 Log: MFC r210289: Update manpage to reflect changes regarding the 6050's firmware. Modified: stable/8/share/man/man4/iwn.4 stable/8/share/man/man4/iwnfw.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/iwn.4 ============================================================================== --- stable/8/share/man/man4/iwn.4 Sat Jul 31 10:20:09 2010 (r210674) +++ stable/8/share/man/man4/iwn.4 Sat Jul 31 10:24:10 2010 (r210675) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd July 20, 2010 .Os .Dt IWN 4 .Sh NAME @@ -51,6 +51,7 @@ Choose one from: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6050fw" .Ed .Pp Or you can use @@ -70,6 +71,7 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6050fw_load="YES" .Ed .Sh DESCRIPTION The Modified: stable/8/share/man/man4/iwnfw.4 ============================================================================== --- stable/8/share/man/man4/iwnfw.4 Sat Jul 31 10:20:09 2010 (r210674) +++ stable/8/share/man/man4/iwnfw.4 Sat Jul 31 10:24:10 2010 (r210675) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd July 20, 2010 .Dt IWNFW 4 .Os .Sh NAME @@ -45,6 +45,7 @@ of the following: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6050fw" .Ed .Pp Alternatively, to load the driver as a @@ -56,6 +57,7 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6050fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 10:44:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4531065676; Sat, 31 Jul 2010 10:44:10 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id C1FB78FC21; Sat, 31 Jul 2010 10:44:10 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id C949611B904; Sat, 31 Jul 2010 05:44:09 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id L3F4OQ3DT4DM; Sat, 31 Jul 2010 05:44:09 -0500 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: Date: Sat, 31 Jul 2010 11:44:06 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <6A88BA06-482E-419E-91F7-E7553A5BC388@freebsd.org> References: <201007310008.o6V08IYO014828@svn.freebsd.org> To: pluknet X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210668 - head/sys/modules/ata/atacore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 10:44:11 -0000 On 31 Jul 2010, at 08:00, pluknet wrote: > On 31 July 2010 04:08, Rui Paulo wrote: >> Author: rpaulo >> Date: Sat Jul 31 00:08:18 2010 >> New Revision: 210668 >> URL: http://svn.freebsd.org/changeset/base/210668 >>=20 >> Log: >> pci_if.h is required to build atacore. >>=20 >> Modified: >> head/sys/modules/ata/atacore/Makefile >>=20 >> Modified: head/sys/modules/ata/atacore/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/modules/ata/atacore/Makefile Fri Jul 30 21:58:35 = 2010 (r210667) >> +++ head/sys/modules/ata/atacore/Makefile Sat Jul 31 00:08:18 = 2010 (r210668) >> @@ -4,6 +4,6 @@ >>=20 >> KMOD=3D ata >> SRCS=3D ata-all.c ata-lowlevel.c ata-queue.c ata_if.c >> -SRCS+=3D opt_ata.h ata_if.h device_if.h bus_if.h >> +SRCS+=3D opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h >>=20 >> .include >=20 > Hmm.. That probably fixes universe failure on powerpc, mips, arm, > sparc64 for me.. Yes, that was the purpose :-) Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 12:14:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6850E1065672; Sat, 31 Jul 2010 12:14:29 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56DB98FC18; Sat, 31 Jul 2010 12:14:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VCET6k075612; Sat, 31 Jul 2010 12:14:29 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VCETOO075594; Sat, 31 Jul 2010 12:14:29 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201007311214.o6VCETOO075594@svn.freebsd.org> From: Joel Dahl Date: Sat, 31 Jul 2010 12:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210676 - in head/share/man: man4 man5 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 12:14:29 -0000 Author: joel (doc committer) Date: Sat Jul 31 12:14:28 2010 New Revision: 210676 URL: http://svn.freebsd.org/changeset/base/210676 Log: Fix a bunch of typos and spelling mistakes. Modified: head/share/man/man4/ae.4 head/share/man/man4/asmc.4 head/share/man/man4/ata.4 head/share/man/man4/blackhole.4 head/share/man/man4/bpf.4 head/share/man/man4/bridge.4 head/share/man/man4/icmp6.4 head/share/man/man4/ksyms.4 head/share/man/man4/net80211.4 head/share/man/man4/pcm.4 head/share/man/man4/snd_hda.4 head/share/man/man4/uep.4 head/share/man/man4/vpo.4 head/share/man/man5/rc.conf.5 head/share/man/man9/VOP_VPTOCNP.9 head/share/man/man9/locking.9 head/share/man/man9/netisr.9 Modified: head/share/man/man4/ae.4 ============================================================================== --- head/share/man/man4/ae.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/ae.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -142,7 +142,7 @@ driver and this manual page was written It first appeared in .Fx 7.1 . .Sh BUGS -The Attansic L2 FastEthernet contoller supports DMA but does not use a +The Attansic L2 FastEthernet controller supports DMA but does not use a descriptor based transfer mechanism via scatter-gather DMA. Thus the data should be copied to/from the controller memory on each transmit/receive. Modified: head/share/man/man4/asmc.4 ============================================================================== --- head/share/man/man4/asmc.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/asmc.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -108,7 +108,7 @@ sysctl tree contains the leaf nodes and .Va targetspeed . Each of these leaf nodes represent the current fan speed, the safest -minimum fan speed, the mininum speed and the maximum speed +minimum fan speed, the minimum speed and the maximum speed respectively. .Pp All values are in RPM. Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/ata.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -85,7 +85,7 @@ To turn .Xr ata 4 subsystem controller drivers into cam(4) interface modules (disables all native .Xr ata 4 -APIs and periperal drivers): +APIs and peripheral drivers): .Cd options ATA_CAM .Pp The following tunables are settable from the loader: Modified: head/share/man/man4/blackhole.4 ============================================================================== --- head/share/man/man4/blackhole.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/blackhole.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -62,7 +62,7 @@ for firewall solutions. Better security would consist of the .Nm .Xr sysctl 8 -MIB used in conjuction with one of the available firewall packages. +MIB used in conjunction with one of the available firewall packages. .Pp This mechanism is not a substitute for securing a system. It should be used together with other security mechanisms. Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/bpf.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -1,7 +1,7 @@ .\" Copyright (c) 2007 Seccuris Inc. .\" All rights reserved. .\" -.\" This sofware was developed by Robert N. M. Watson under contract to +.\" This software was developed by Robert N. M. Watson under contract to .\" Seccuris Inc. .\" .\" Redistribution and use in source and binary forms, with or without @@ -253,7 +253,7 @@ As in the buffered read mode, .Xr poll 2 , and .Xr select 2 -may be used to sleep awaiting the availbility of a completed buffer. +may be used to sleep awaiting the availability of a completed buffer. They will return a readable file descriptor when ownership of the next buffer is assigned to user space. .Pp Modified: head/share/man/man4/bridge.4 ============================================================================== --- head/share/man/man4/bridge.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/bridge.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -259,7 +259,7 @@ MAC. There are situations when some of the bridge members are sharing the same MAC address (for example the .Xr vlan 4 -interfaces: they are currenly sharing the +interfaces: they are currently sharing the MAC address of the parent physical interface). It is not possible to distinguish between these interfaces using their MAC address, excluding the case when the packet's destination Modified: head/share/man/man4/icmp6.4 ============================================================================== --- head/share/man/man4/icmp6.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/icmp6.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -98,7 +98,7 @@ The following types are defined: .It 131 Ta grouprep Ta "Group membership report" .It 131 Ta listenrep Ta "Multicast listener report" .It 132 Ta groupterm Ta "Group membership termination" -.It 132 Ta listendone Ta "Multicast listerner done" +.It 132 Ta listendone Ta "Multicast listener done" .It 133 Ta routersol Ta "Router solicitation" .It 134 Ta routeradv Ta "Router advertisement" .It 135 Ta neighbrsol Ta "Neighbor solicitation" @@ -122,7 +122,7 @@ The following codes are defined: .It 0 Ta noroute-unr Ta unreach Ta "No route to destination" .It 1 Ta admin-unr Ta unreach Ta "Administratively prohibited" .It 2 Ta beyond-unr Ta unreach Ta "Beyond scope of source address" -.It 2 Ta notnbr-unr Ta unreach Ta "Not a neighbor (obselete)" +.It 2 Ta notnbr-unr Ta unreach Ta "Not a neighbor (obsolete)" .It 3 Ta addr-unr Ta unreach Ta "Address unreachable" .It 4 Ta port-unr Ta unreach Ta "Port unreachable" .It 0 Ta transit Ta timex Ta "Time exceeded in transit" Modified: head/share/man/man4/ksyms.4 ============================================================================== --- head/share/man/man4/ksyms.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/ksyms.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -59,7 +59,7 @@ The STRTAB section contains the symbol n loaded modules that the symbol table entries reference. .El .Pp -Elf formated symbol table data read from the +Elf formatted symbol table data read from the .Pa /dev/ksyms file represents the state of the kernel at the time when the device is opened. Since Modified: head/share/man/man4/net80211.4 ============================================================================== --- head/share/man/man4/net80211.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/net80211.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -308,7 +308,7 @@ By default 802.11h is enabled if the dev Return, in .Va i_val , whether unencrypted packets transmit/received should be discarded. -This value will be zero if unecrypted packets will be accepted and +This value will be zero if unencrypted packets will be accepted and non-zero if they are to be discarded. .It Dv IEEE80211_IOC_DTIM_PERIOD Return the period (in beacon intervals) between DTIM events in @@ -397,7 +397,7 @@ and Return whether or not the system handles inactivity processing in .Va i_val . When inactivity processing is enabled the system will track stations -that have not trasmitted frames and periodically probe them to +that have not transmitted frames and periodically probe them to check if they are still present. Stations that are inactive and do not respond to probes are dropped. .It Dv IEEE80211_IOC_MACCMD @@ -1002,7 +1002,7 @@ and Set whether or not the system handles inactivity processing using the value in .Va i_val . When inactivity processing is enabled the system will track stations -that have not trasmitted frames and periodically probe them to +that have not transmitted frames and periodically probe them to check if they are still present. Stations that are inactive and do not respond to probes are dropped. .It Dv IEEE80211_IOC_MACCMD @@ -1073,7 +1073,7 @@ There are several MLME operations suppor .Dv IEEE80211_MLME_DEAUTH (deauthenticate the specified station), .Dv IEEE80211_MLME_AUHORIZE -(mark the specifed station authorized to pass data frames), +(mark the specified station authorized to pass data frames), .Dv IEEE80211_MLME_UNAUTHORIZE (revoke the specified station's ability to pass data frames), and Modified: head/share/man/man4/pcm.4 ============================================================================== --- head/share/man/man4/pcm.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/pcm.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -237,7 +237,7 @@ are device specific. .It Va hw.snd.compat_linux_mmap Linux .Xr mmap 2 -compability. +compatability. The following values are supported (default is 0): .Bl -tag -width 2n .It -1 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/snd_hda.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -304,7 +304,7 @@ any codec pin (external connector). All codec pins are reversible (could be configured either as input or output). .Pp So high codec uniformity and flexibility allow driver to configure it in many -different ways, depending on requested pins usage decribed by pins configuration. +different ways, depending on requested pins usage described by pins configuration. The driver reports such default pin configuration when verbose messages enabled: .Bd -literal hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 Modified: head/share/man/man4/uep.4 ============================================================================== --- head/share/man/man4/uep.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/uep.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -51,7 +51,7 @@ driver provides support for the eGalax o .Pp The driver is stub. It just probes and attaches to USB device, creates device entry -and feeds reassambled packets from the hardware to it. +and feeds reassembled packets from the hardware to it. .Pp To get mouse working in .Xr X 7 , Modified: head/share/man/man4/vpo.4 ============================================================================== --- head/share/man/man4/vpo.4 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man4/vpo.4 Sat Jul 31 12:14:28 2010 (r210676) @@ -61,7 +61,7 @@ DOS and .Fx file systems are supported. When mounting a DOS file system or -formating a +formatting a .Fx file system, check the slice of the disk with the .Xr fdisk 8 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man5/rc.conf.5 Sat Jul 31 12:14:28 2010 (r210676) @@ -4233,14 +4233,14 @@ Must set properly if multiple profiles u .Pq Vt bool Tells .Xr rfcomm_pppd 8 -if it should register Serial Port service on the speficied RFCOMM channel. +if it should register Serial Port service on the specified RFCOMM channel. Default .Dq Li NO . .It Va rfcomm_pppd_server_ Ns Ao Ar profile Ac Ns _register_dun .Pq Vt bool Tells .Xr rfcomm_pppd 8 -if it should register Dial-Up Networking service on the speficied +if it should register Dial-Up Networking service on the specified RFCOMM channel. Default .Dq Li NO . Modified: head/share/man/man9/VOP_VPTOCNP.9 ============================================================================== --- head/share/man/man9/VOP_VPTOCNP.9 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man9/VOP_VPTOCNP.9 Sat Jul 31 12:14:28 2010 (r210676) @@ -50,7 +50,7 @@ The vnode to translate. The vnode of the parent directory of .Fa vp . .It Fa buf -The buffer into which to preprend the component name. +The buffer into which to prepend the component name. .It Fa buflen The remaining size of the buffer. .El Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man9/locking.9 Sat Jul 31 12:14:28 2010 (r210676) @@ -53,12 +53,12 @@ the two is that spin mutexes never sleep for the thread holding the lock, which runs on another CPU, to release it. Differently from ordinary mutex, spin mutexes disable interrupts when acquired. Since disabling interrupts is expensive, they are also generally slower. -Spin mutexes should be used only when neccessary, e.g. to protect data shared +Spin mutexes should be used only when necessary, e.g. to protect data shared with interrupt filter code (see .Xr bus_setup_intr 9 for details). .Ss Pool mutexes -With most synchronisaton primitives, such as mutexes, programmer must +With most synchronization primitives, such as mutexes, programmer must provide a piece of allocated memory to hold the primitive. For example, a mutex may be embedded inside the structure it protects. Pool mutex is a variant of mutex without this requirement - to lock or unlock Modified: head/share/man/man9/netisr.9 ============================================================================== --- head/share/man/man9/netisr.9 Sat Jul 31 10:24:10 2010 (r210675) +++ head/share/man/man9/netisr.9 Sat Jul 31 12:14:28 2010 (r210676) @@ -173,7 +173,7 @@ Both accept a protocol number and .Vt mbuf argument, but while .Fn netisr_queue -will always execute the protocol handler asynchonously in a deferred +will always execute the protocol handler asynchronously in a deferred context, .Fn netisr_dispatch will optionally direct dispatch if permitted by global and per-protocol From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 13:22:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C11F106567C; Sat, 31 Jul 2010 13:22:34 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69FCF8FC29; Sat, 31 Jul 2010 13:22:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VDMYBB090440; Sat, 31 Jul 2010 13:22:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VDMYON090428; Sat, 31 Jul 2010 13:22:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007311322.o6VDMYON090428@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Jul 2010 13:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210677 - in head/sys: conf powerpc/conf powerpc/mambo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 13:22:34 -0000 Author: nwhitehorn Date: Sat Jul 31 13:22:34 2010 New Revision: 210677 URL: http://svn.freebsd.org/changeset/base/210677 Log: Add support for the IBM Full-System Simulator (Mambo). This code has been developed against the 970 and Cell simulators. Added: head/sys/powerpc/mambo/ head/sys/powerpc/mambo/mambo.c (contents, props changed) head/sys/powerpc/mambo/mambo_console.c (contents, props changed) head/sys/powerpc/mambo/mambo_disk.c (contents, props changed) head/sys/powerpc/mambo/mambo_openpic.c (contents, props changed) head/sys/powerpc/mambo/mambocall.S (contents, props changed) head/sys/powerpc/mambo/mambocall.h (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/conf/options.powerpc head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/NOTES Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sat Jul 31 12:14:28 2010 (r210676) +++ head/sys/conf/files.powerpc Sat Jul 31 13:22:34 2010 (r210677) @@ -111,6 +111,11 @@ powerpc/fpu/fpu_implode.c optional fpu_e powerpc/fpu/fpu_mul.c optional fpu_emu powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc/fpu/fpu_subr.c optional fpu_emu +powerpc/mambo/mambocall.S optional mambo +powerpc/mambo/mambo.c optional mambo +powerpc/mambo/mambo_console.c optional mambo +powerpc/mambo/mambo_disk.c optional mambo +powerpc/mambo/mambo_openpic.c optional mambo powerpc/mpc85xx/atpic.c optional mpc85xx isa powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Sat Jul 31 12:14:28 2010 (r210676) +++ head/sys/conf/options.powerpc Sat Jul 31 13:22:34 2010 (r210677) @@ -17,6 +17,7 @@ GFB_NO_MODE_CHANGE opt_gfb.h MPC85XX opt_platform.h POWERMAC opt_platform.h +MAMBO PSIM SC_OFWFB opt_ofwfb.h Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sat Jul 31 12:14:28 2010 (r210676) +++ head/sys/powerpc/conf/GENERIC Sat Jul 31 13:22:34 2010 (r210677) @@ -28,6 +28,7 @@ makeoptions DEBUG=-g #Build kernel with # Platform support options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator +options MAMBO #IBM Mambo Full System Simulator options SCHED_ULE #ULE scheduler options INET #InterNETworking Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Sat Jul 31 12:14:28 2010 (r210676) +++ head/sys/powerpc/conf/GENERIC64 Sat Jul 31 13:22:34 2010 (r210677) @@ -27,6 +27,7 @@ makeoptions DEBUG=-g #Build kernel with # Platform support options POWERMAC #NewWorld Apple PowerMacs +options MAMBO #IBM Mambo Full System Simulator options SCHED_ULE #ULE scheduler options INET #InterNETworking Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Sat Jul 31 12:14:28 2010 (r210676) +++ head/sys/powerpc/conf/NOTES Sat Jul 31 13:22:34 2010 (r210677) @@ -20,6 +20,7 @@ options FPU_EMU #options MPC85XX options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator +options MAMBO #IBM Mambo Full System Simulator options SC_OFWFB # OFW frame buffer Added: head/sys/powerpc/mambo/mambo.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mambo/mambo.c Sat Jul 31 13:22:34 2010 (r210677) @@ -0,0 +1,101 @@ +/*- + * Copyright 2008 by Nathan Whitehorn. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include + +/* + * Mambo interface + */ +static int mambobus_probe(device_t); +static int mambobus_attach(device_t); + +static device_method_t mambobus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, mambobus_probe), + DEVMETHOD(device_attach, mambobus_attach), + + /* Bus interface */ + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource,bus_generic_activate_resource), + + {0,0} +}; + +static driver_t mambobus_driver = { + "mambo", + mambobus_methods, + 0 +}; + +static devclass_t mambobus_devclass; + +DRIVER_MODULE(mambo, nexus, mambobus_driver, mambobus_devclass, 0, 0); + +static int +mambobus_probe(device_t dev) +{ + const char *name = ofw_bus_get_name(dev); + + if (name && !strcmp(name, "mambo")) { + device_set_desc(dev, "Mambo Simulator"); + return (0); + } + + return (ENXIO); +} + +static int +mambobus_attach(device_t dev) +{ + bus_generic_probe(dev); + return (bus_generic_attach(dev)); +} + Added: head/sys/powerpc/mambo/mambo_console.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mambo/mambo_console.c Sat Jul 31 13:22:34 2010 (r210677) @@ -0,0 +1,192 @@ +/*- + * Copyright (C) 2008 by Nathan Whitehorn. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_comconsole.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "mambocall.h" + +#define MAMBOBURSTLEN 128 /* max number of bytes to write in one chunk */ + +#define MAMBO_CONSOLE_WRITE 0 +#define MAMBO_CONSOLE_READ 60 + +static tsw_outwakeup_t mambotty_outwakeup; + +static struct ttydevsw mambo_ttydevsw = { + .tsw_flags = TF_NOPREFIX, + .tsw_outwakeup = mambotty_outwakeup, +}; + +static int polltime; +static struct callout mambo_callout; +static struct tty *tp = NULL; + +#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) +static int alt_break_state; +#endif + +static void mambo_timeout(void *); + +static cn_probe_t mambo_cnprobe; +static cn_init_t mambo_cninit; +static cn_term_t mambo_cnterm; +static cn_getc_t mambo_cngetc; +static cn_putc_t mambo_cnputc; + +CONSOLE_DRIVER(mambo); + +static void +cn_drvinit(void *unused) +{ + + if (mambo_consdev.cn_pri != CN_DEAD && + mambo_consdev.cn_name[0] != '\0') { + if (OF_finddevice("/mambo") == -1) + return; + + tp = tty_alloc(&mambo_ttydevsw, NULL); + tty_init_console(tp, 0); + tty_makedev(tp, NULL, "%s", "mambocons"); + tty_makealias(tp, "mambocons"); + + polltime = 1; + + callout_init(&mambo_callout, CALLOUT_MPSAFE); + callout_reset(&mambo_callout, polltime, mambo_timeout, NULL); + } +} + +SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, cn_drvinit, NULL); + +static void +mambotty_outwakeup(struct tty *tp) +{ + int len; + u_char buf[MAMBOBURSTLEN]; + + for (;;) { + len = ttydisc_getc(tp, buf, sizeof buf); + if (len == 0) + break; + mambocall(MAMBO_CONSOLE_WRITE, buf, (register_t)len, 1UL); + } +} + +static void +mambo_timeout(void *v) +{ + int c; + + tty_lock(tp); + while ((c = mambo_cngetc(NULL)) != -1) + ttydisc_rint(tp, c, 0); + ttydisc_rint_done(tp); + tty_unlock(tp); + + callout_reset(&mambo_callout, polltime, mambo_timeout, NULL); +} + +static void +mambo_cnprobe(struct consdev *cp) +{ + if (OF_finddevice("/mambo") == -1) { + cp->cn_pri = CN_DEAD; + return; + } + + cp->cn_pri = CN_NORMAL; +} + +static void +mambo_cninit(struct consdev *cp) +{ + + /* XXX: This is the alias, but that should be good enough */ + strcpy(cp->cn_name, "mambocons"); +} + +static void +mambo_cnterm(struct consdev *cp) +{ +} + +static int +mambo_cngetc(struct consdev *cp) +{ + int ch; + + ch = mambocall(MAMBO_CONSOLE_READ); + + if (ch > 0 && ch < 0xff) { +#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) + int kdb_brk; + + if ((kdb_brk = kdb_alt_break(ch, &alt_break_state)) != 0) { + switch (kdb_brk) { + case KDB_REQ_DEBUGGER: + kdb_enter(KDB_WHY_BREAK, + "Break sequence on console"); + break; + case KDB_REQ_PANIC: + kdb_panic("Panic sequence on console"); + break; + case KDB_REQ_REBOOT: + kdb_reboot(); + break; + + } + } +#endif + return (ch); + } + + return (-1); +} + +static void +mambo_cnputc(struct consdev *cp, int c) +{ + char cbuf; + + cbuf = c; + mambocall(MAMBO_CONSOLE_WRITE, &cbuf, 1UL, 1UL); +} Added: head/sys/powerpc/mambo/mambo_disk.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mambo/mambo_disk.c Sat Jul 31 13:22:34 2010 (r210677) @@ -0,0 +1,277 @@ +/*- + * Copyright (c) 2008 Nathan Whitehorn. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +struct mambodisk_softc { + device_t dev; + struct mtx sc_mtx; + struct disk *disk; + struct proc *p; + struct bio_queue_head bio_queue; + int running; + int maxblocks; +}; + +#define MAMBO_DISK_READ 116 +#define MAMBO_DISK_WRITE 117 +#define MAMBO_DISK_INFO 118 + +#define MAMBO_INFO_STATUS 1 +#define MAMBO_INFO_BLKSZ 2 +#define MAMBO_INFO_DEVSZ 3 + +/* bus entry points */ +static void mambodisk_identify(driver_t *driver, device_t parent); +static int mambodisk_probe(device_t dev); +static int mambodisk_attach(device_t dev); + +/* disk routines */ +static int mambodisk_open(struct disk *dp); +static int mambodisk_close(struct disk *dp); +static void mambodisk_strategy(struct bio *bp); +static void mambodisk_task(void *arg); + +#define MBODISK_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define MBODISK_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define MBODISK_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ + "mambodisk", MTX_DEF) +#define MBODISK_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); +#define MBODISK_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); +#define MBODISK_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); + +static void +mambodisk_identify(driver_t *driver, device_t parent) +{ + int i = 0; + + for (i = 0; mambocall(MAMBO_DISK_INFO,MAMBO_INFO_DEVSZ,i) > 0; i++) + BUS_ADD_CHILD(parent,0,"mambodisk",i); +} + +static int +mambodisk_probe(device_t dev) +{ + device_set_desc(dev, "Mambo Simulated Block Device"); + return (0); +} + +static int +mambodisk_attach(device_t dev) +{ + struct mambodisk_softc *sc; + struct disk *d; + intmax_t mb; + char unit; + + sc = device_get_softc(dev); + sc->dev = dev; + MBODISK_LOCK_INIT(sc); + + d = sc->disk = disk_alloc(); + d->d_open = mambodisk_open; + d->d_close = mambodisk_close; + d->d_strategy = mambodisk_strategy; + d->d_name = "mambodisk"; + d->d_drv1 = sc; + d->d_maxsize = MAXPHYS; /* Maybe ask bridge? */ + + d->d_sectorsize = 512; + sc->maxblocks = mambocall(MAMBO_DISK_INFO,MAMBO_INFO_BLKSZ,d->d_unit) + / 512; + + d->d_unit = device_get_unit(dev); + d->d_mediasize = mambocall(MAMBO_DISK_INFO,MAMBO_INFO_DEVSZ,d->d_unit) + * 1024ULL; /* Mambo gives size in KB */ + + mb = d->d_mediasize >> 20; /* 1MiB == 1 << 20 */ + unit = 'M'; + if (mb >= 10240) { /* 1GiB = 1024 MiB */ + unit = 'G'; + mb /= 1024; + } + device_printf(dev, "%ju%cB, %d byte sectors\n", mb, unit, + d->d_sectorsize); + disk_create(d, DISK_VERSION); + bioq_init(&sc->bio_queue); + + sc->running = 1; + kproc_create(&mambodisk_task, sc, &sc->p, 0, 0, "task: mambo hd"); + + return (0); +} + +static int +mambodisk_detach(device_t dev) +{ + struct mambodisk_softc *sc = device_get_softc(dev); + + /* kill thread */ + MBODISK_LOCK(sc); + sc->running = 0; + wakeup(sc); + MBODISK_UNLOCK(sc); + + /* wait for thread to finish. XXX probably want timeout. -sorbo */ + MBODISK_LOCK(sc); + while (sc->running != -1) + msleep(sc, &sc->sc_mtx, PRIBIO, "detach", 0); + MBODISK_UNLOCK(sc); + + /* kill disk */ + disk_destroy(sc->disk); + /* XXX destroy anything in queue */ + + MBODISK_LOCK_DESTROY(sc); + + return (0); +} + +static int +mambodisk_open(struct disk *dp) +{ + return (0); +} + +static int +mambodisk_close(struct disk *dp) +{ + return (0); +} + +static void +mambodisk_strategy(struct bio *bp) +{ + struct mambodisk_softc *sc; + + sc = (struct mambodisk_softc *)bp->bio_disk->d_drv1; + MBODISK_LOCK(sc); + bioq_disksort(&sc->bio_queue, bp); + wakeup(sc); + MBODISK_UNLOCK(sc); +} + +static void +mambodisk_task(void *arg) +{ + struct mambodisk_softc *sc = (struct mambodisk_softc*)arg; + struct bio *bp; + size_t sz; + int result; + daddr_t block, end; + device_t dev; + u_long unit; + + dev = sc->dev; + unit = device_get_unit(dev); + + while (sc->running) { + MBODISK_LOCK(sc); + do { + bp = bioq_first(&sc->bio_queue); + if (bp == NULL) + msleep(sc, &sc->sc_mtx, PRIBIO, "jobqueue", 0); + } while (bp == NULL && sc->running); + if (bp) + bioq_remove(&sc->bio_queue, bp); + MBODISK_UNLOCK(sc); + if (!sc->running) + break; + sz = sc->disk->d_sectorsize; + end = bp->bio_pblkno + (bp->bio_bcount / sz); + for (block = bp->bio_pblkno; block < end;) { + u_long numblocks; + char *vaddr = bp->bio_data + + (block - bp->bio_pblkno) * sz; + + numblocks = end - block; + if (numblocks > sc->maxblocks) + numblocks = sc->maxblocks; + + if (bp->bio_cmd == BIO_READ) { + result = mambocall(MAMBO_DISK_READ, vaddr, + (u_long)block, (numblocks << 16) | unit); + } else if (bp->bio_cmd == BIO_WRITE) { + result = mambocall(MAMBO_DISK_WRITE, vaddr, + (u_long)block, (numblocks << 16) | unit); + } else { + result = 1; + } + + if (result) + break; + + block += numblocks; + } + if (block < end) { + bp->bio_error = EIO; + bp->bio_resid = (end - block) * sz; + bp->bio_flags |= BIO_ERROR; + } + biodone(bp); + } + + /* tell parent we're done */ + MBODISK_LOCK(sc); + sc->running = -1; + wakeup(sc); + MBODISK_UNLOCK(sc); + + kproc_exit(0); +} + +static device_method_t mambodisk_methods[] = { + DEVMETHOD(device_identify, mambodisk_identify), + DEVMETHOD(device_probe, mambodisk_probe), + DEVMETHOD(device_attach, mambodisk_attach), + DEVMETHOD(device_detach, mambodisk_detach), + {0, 0}, +}; + +static driver_t mambodisk_driver = { + "mambodisk", + mambodisk_methods, + sizeof(struct mambodisk_softc), +}; +static devclass_t mambodisk_devclass; + +DRIVER_MODULE(mambodisk, mambo, mambodisk_driver, mambodisk_devclass, 0, 0); Added: head/sys/powerpc/mambo/mambo_openpic.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mambo/mambo_openpic.c Sat Jul 31 13:22:34 2010 (r210677) @@ -0,0 +1,180 @@ +/*- + * Copyright 2008 by Nathan Whitehorn. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include "pic_if.h" + +/* + * Mambo interface + */ +static int openpic_mambo_probe(device_t); +static uint32_t openpic_mambo_id(device_t dev); +static int openpicbus_mambo_probe(device_t dev); +static int openpicbus_mambo_attach(device_t dev); +static struct resource *openpicbus_alloc_resource(device_t bus, device_t dev, + int type, int *rid, u_long start, u_long end, u_long count, + u_int flags); + +static device_method_t openpicbus_mambo_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, openpicbus_mambo_probe), + DEVMETHOD(device_attach, openpicbus_mambo_attach), + + /* Bus interface */ + DEVMETHOD(bus_alloc_resource, openpicbus_alloc_resource), + + {0,0} +}; + +struct openpicbus_softc { + vm_offset_t picaddr; +}; + +static driver_t openpicbus_mambo_driver = { + "openpicbus", + openpicbus_mambo_methods, + sizeof(struct openpicbus_softc), +}; + +static device_method_t openpic_mambo_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, openpic_mambo_probe), + DEVMETHOD(device_attach, openpic_attach), + + /* PIC interface */ + DEVMETHOD(pic_config, openpic_config), + DEVMETHOD(pic_dispatch, openpic_dispatch), + DEVMETHOD(pic_enable, openpic_enable), + DEVMETHOD(pic_eoi, openpic_eoi), + DEVMETHOD(pic_ipi, openpic_ipi), + DEVMETHOD(pic_mask, openpic_mask), + DEVMETHOD(pic_unmask, openpic_unmask), + DEVMETHOD(pic_id, openpic_mambo_id), + + { 0, 0 }, +}; + +static driver_t openpic_mambo_driver = { + "openpic", + openpic_mambo_methods, + sizeof(struct openpic_softc), +}; + +static devclass_t openpicbus_devclass; + +DRIVER_MODULE(openpicbus, nexus, openpicbus_mambo_driver, + openpicbus_devclass, 0, 0); +DRIVER_MODULE(openpic, openpicbus, openpic_mambo_driver, + openpic_devclass, 0, 0); + +static int +openpicbus_mambo_probe(device_t dev) +{ + const char *type = ofw_bus_get_type(dev); + + if (type == NULL || strcmp(type, "open-pic") != 0) + return (ENXIO); + + device_set_desc(dev, "Mambo OpenPIC Container"); + + return (0); +} + +static int +openpicbus_mambo_attach(device_t dev) +{ + uint64_t picaddr; + phandle_t nexus; + struct openpicbus_softc *sc; + + sc = device_get_softc(dev); + + nexus = OF_parent(ofw_bus_get_node(dev)); + + OF_getprop(nexus,"platform-open-pic", + &picaddr,sizeof(picaddr)); + + sc->picaddr = picaddr; + + device_add_child(dev,"openpic",-1); + + return (bus_generic_attach(dev)); +} + +static struct resource * +openpicbus_alloc_resource(device_t bus, device_t dev, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct openpicbus_softc *sc; + + sc = device_get_softc(bus); + + count = 0x40000; + start = sc->picaddr; + end = start + count; + + return (bus_alloc_resource(bus, type, rid, start, end, count, flags)); +} + +static int +openpic_mambo_probe(device_t dev) +{ + device_set_desc(dev, OPENPIC_DEVSTR); + + return (0); +} + +static uint32_t +openpic_mambo_id(device_t dev) +{ + return (ofw_bus_get_node(device_get_parent(dev))); +} + Added: head/sys/powerpc/mambo/mambocall.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mambo/mambocall.S Sat Jul 31 13:22:34 2010 (r210677) @@ -0,0 +1,39 @@ +/*- + * Copyright 2008 by Nathan Whitehorn. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + + .text + +ASENTRY(mambocall) + /* + * Use the special Mambo callout opcode and whatever arguments we + * were passed. Then return whatever Mambo returned. + */ + .long 0x000EAEB0 + blr + Added: head/sys/powerpc/mambo/mambocall.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mambo/mambocall.h Sat Jul 31 13:22:34 2010 (r210677) @@ -0,0 +1,33 @@ +/*- + * Copyright 2008 by Nathan Whitehorn. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MAMBO_MAMBOCALL_H_ +#define _MAMBO_MAMBOCALL_H_ + +long mambocall(int op, ...); + +#endif /* _MAMBO_MAMBOCALL_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:26:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B0DB1065672; Sat, 31 Jul 2010 14:26:10 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 795C38FC08; Sat, 31 Jul 2010 14:26:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEQABo004502; Sat, 31 Jul 2010 14:26:10 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEQAMj004497; Sat, 31 Jul 2010 14:26:10 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311426.o6VEQAMj004497@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 14:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210678 - head/lib/librtld_db X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:26:10 -0000 Author: rpaulo Date: Sat Jul 31 14:26:10 2010 New Revision: 210678 URL: http://svn.freebsd.org/changeset/base/210678 Log: Import the librtld_db library. This is needed by userland DTrace. This is not yet enabled in the build because I also need to import a new version of libproc. Sponsored by: The FreeBSD Foundation Added: head/lib/librtld_db/ head/lib/librtld_db/Makefile (contents, props changed) head/lib/librtld_db/librtld_db.3 (contents, props changed) head/lib/librtld_db/rtld_db.c (contents, props changed) head/lib/librtld_db/rtld_db.h (contents, props changed) Added: head/lib/librtld_db/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librtld_db/Makefile Sat Jul 31 14:26:10 2010 (r210678) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.include + +LIB= rtld_db +SHLIB_MAJOR= 1 +MAN= librtld_db.3 + +SRCS= rtld_db.c +INCS= rtld_db.h + +CFLAGS+= -I${.CURDIR} + +.include Added: head/lib/librtld_db/librtld_db.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librtld_db/librtld_db.3 Sat Jul 31 14:26:10 2010 (r210678) @@ -0,0 +1,191 @@ +.\"- +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Rui Paulo under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 10, 2010 +.Dt LIBRTLD_DB 3 +.Os +.Sh NAME +.Nm librtld_db +.Nd library for run-time linker debugging +.Sh LIBRARY +.Lb librtld_db +.Sh SYNOPSIS +.In rtld_db.h +.Ft void +.Fo rd_delete +.Fa "rd_agent_t *rdap" +.Fc +.Ft char * +.Fo rd_errstr +.Fa "rd_err_e rderr" +.Fc +.Ft rd_err_e +.Fo rd_event_addr +.Fa "rd_agent_t *rdap, rd_notify_t *notify" +.Fc +.Ft rd_err_e +.Fo rd_event_enable +.Fa "rd_agent_t *rdap, int onoff" +.Fc +.Ft rd_err_e +.Fo rd_event_getmsg +.Fa "rd_agent_t *rdap, rd_event_msg_t *msg" +.Fc +.Ft rd_err_e +.Fo rd_init +.Fa "int version" +.Fc +.Ft typedef int +.Fo rl_iter_f +.Fa "const rd_loadobj_t *, void *" +.Fc +.Ft rd_err_e +.Fo rd_loadobj_iter +.Fa "rd_agent_t *rdap, rl_iter_f *cb, void *clnt_data" +.Fc +.Ft void +.Fo rd_log +.Fa "const int onoff" +.Fc +.Ft rd_agent_t * +.Fo rd_new +.Fa "struct proc_handle *php" +.Fc +.Ft rd_err_e +.Fo rd_objpad_enable +.Fa "rd_agent_t *rdap, size_t padsize" +.Fc +.Ft rd_err_e +.Fo rd_plt_resolution +.Fa "rd_agent_t *rdap, uintptr_t pc, struct proc *proc +.Fa "uintptr_t plt_base, rd_plt_info_t *rpi" +.Fc +.Ft rd_err_e +.Fo rd_reset +.Fa "rd_agent_t *rdap" +.Fc +.Sh DESCRIPTION +The +.Nm librtld_db +library provides a debugging interface to the run-time linker (rtld). +This library must be used along with +.Xr libproc 3 . +.Pp +Most library functions take a +.Ft rd_agent_t +argument. +This argument is an opaque structure containing information associated with +the current status of the agent. +.Pp +Before you start using +.Nm +you should call +.Fn rd_init +with the +.Ft RD_VERSION +argument. +This initializes the library to the correct version your program was compiled +with and provides proper ABI stability. +.Pp +What follows is a description of what each function. +.Pp +.Fn rd_new +creates a new +.Nm +agent. +The +.Ft php +argument should be the +.Ft proc_handle +you received from +.Xr libproc 3 . +.Pp +.Fn rd_reset +resets your previously created agent. +.Pp +.Fn rd_delete +dealocates the resources associated with the agent. +.Pp +.Fn rd_errstr +returns an error string describing the error present in +.Ft rderr . +.Pp +.Fn rd_event_enable +enables reporting of events. +This function always returns RD_OK. +.Pp +.Fn rd_event_addr +returns the event address in the +.Ft event +paramenter. +At the moment we only report RD_NOTIFY_BPT events. +.Pp +.Fn rd_event_getmsg +returns the message assoicated wit hthe latest event. +At the moment only RD_POSTINIT events are supported. +.Pp +.Fn rd_loadobj_iter +allows you to iterate over the program's loaded objects. +.Ft cb +is a callback of type +.Fn rl_iter_f . +.Sh RETURN VALUES +Most functions return an +.Ft rd_err_e +type error. +The error codes are described in the header file for this library. +You can get the error string using +.Fn rd_errstr . +.Sh CAVEATS +The functions +.Fn rd_event_enable , +.Fn rd_log , +.Fn rd_objpad_enable +and +.Fn rd_plt_resolution +are not yet implemented. +.Sh SEE ALSO +.Xr ld 1 , +.Xr ld-elf.so.1 1 , +.Xr ld.so 1 , +.Xr libproc 3 , +.Xr rtld 1 +.Sh HISTORY +The +.Nm librtld_db +library first appeared in +.Fx 9.0 +and was modeled after the same library present in the Solaris operating system. +.Sh AUTHORS +The +.Nm librtld_db +library and this manual page were written by +.An Rui Paulo Aq rpaulo@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Added: head/lib/librtld_db/rtld_db.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librtld_db/rtld_db.c Sat Jul 31 14:26:10 2010 (r210678) @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Rui Paulo under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "rtld_db.h" + +static int _librtld_db_debug = 0; +#define DPRINTF(...) do { \ + if (_librtld_db_debug) { \ + fprintf(stderr, "librtld_db: DEBUG: "); \ + fprintf(stderr, __VA_ARGS__); \ + } \ +} while (0) + +void +rd_delete(rd_agent_t *rdap) +{ + + free(rdap); +} + +const char * +rd_errstr(rd_err_e rderr) +{ + + switch (rderr) { + case RD_ERR: + return "generic error"; + case RD_OK: + return "no error"; + case RD_NOCAPAB: + return "capability not supported"; + case RD_DBERR: + return "database error"; + case RD_NOBASE: + return "NOBASE"; + case RD_NOMAPS: + return "NOMAPS"; + default: + return "unknown error"; + } +} + +rd_err_e +rd_event_addr(rd_agent_t *rdap, rd_event_e event __unused, rd_notify_t *notify) +{ + DPRINTF("%s rdap %p notify %p\n", __func__, rdap, notify); + + notify->type = RD_NOTIFY_BPT; + notify->u.bptaddr = rdap->rda_addr; + + return (RD_OK); +} + +rd_err_e +rd_event_enable(rd_agent_t *rdap __unused, int onoff) +{ + DPRINTF("%s onoff %d\n", __func__, onoff); + + return (RD_OK); +} + +rd_err_e +rd_event_getmsg(rd_agent_t *rdap __unused, rd_event_msg_t *msg) +{ + DPRINTF("%s\n", __func__); + + msg->type = RD_POSTINIT; + msg->u.state = RD_CONSISTENT; + + return (RD_OK); +} + +rd_err_e +rd_init(int version) +{ + char *debug = NULL; + + if (version == RD_VERSION) { + debug = getenv("LIBRTLD_DB_DEBUG"); + _librtld_db_debug = debug ? atoi(debug) : 0; + return (RD_OK); + } else + return (RD_NOCAPAB); +} + +rd_err_e +rd_loadobj_iter(rd_agent_t *rdap, rl_iter_f *cb, void *clnt_data) +{ + int cnt, i, lastvn = 0; + rd_loadobj_t rdl; + struct kinfo_vmentry *kves, *kve; + + DPRINTF("%s\n", __func__); + + if ((kves = kinfo_getvmmap(proc_getpid(rdap->rda_php), &cnt)) == NULL) { + warn("ERROR: kinfo_getvmmap() failed"); + return (RD_ERR); + } + for (i = 0; i < cnt; i++) { + kve = kves + i; + if (kve->kve_type == KVME_TYPE_VNODE) + lastvn = i; + memset(&rdl, 0, sizeof(rdl)); + /* + * Map the kinfo_vmentry struct to the rd_loadobj structure. + */ + rdl.rdl_saddr = kve->kve_start; + rdl.rdl_eaddr = kve->kve_end; + rdl.rdl_offset = kve->kve_offset; + if (kve->kve_protection & KVME_PROT_READ) + rdl.rdl_prot |= RD_RDL_R; + if (kve->kve_protection & KVME_PROT_WRITE) + rdl.rdl_prot |= RD_RDL_W; + if (kve->kve_protection & KVME_PROT_EXEC) + rdl.rdl_prot |= RD_RDL_X; + strlcpy(rdl.rdl_path, kves[lastvn].kve_path, + sizeof(rdl.rdl_path)); + (*cb)(&rdl, clnt_data); + } + free(kves); + + return (RD_OK); +} + +void +rd_log(const int onoff) +{ + DPRINTF("%s\n", __func__); + + (void)onoff; +} + +rd_agent_t * +rd_new(struct proc_handle *php) +{ + rd_agent_t *rdap; + + rdap = malloc(sizeof(rd_agent_t)); + if (rdap) { + memset(rdap, 0, sizeof(rd_agent_t)); + rdap->rda_php = php; + rd_reset(rdap); + } + + return (rdap); +} + +rd_err_e +rd_objpad_enable(rd_agent_t *rdap, size_t padsize) +{ + DPRINTF("%s\n", __func__); + + (void)rdap; + (void)padsize; + + return (RD_ERR); +} + +rd_err_e +rd_plt_resolution(rd_agent_t *rdap, uintptr_t pc, struct proc *proc, + uintptr_t plt_base, rd_plt_info_t *rpi) +{ + DPRINTF("%s\n", __func__); + + (void)rdap; + (void)pc; + (void)proc; + (void)plt_base; + (void)rpi; + + return (RD_ERR); +} + +rd_err_e +rd_reset(rd_agent_t *rdap) +{ + GElf_Sym sym; + + if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "r_debug_state", + &sym) < 0) + return (RD_ERR); + DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value); + rdap->rda_addr = sym.st_value; + + return (RD_OK); +} Added: head/lib/librtld_db/rtld_db.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librtld_db/rtld_db.h Sat Jul 31 14:26:10 2010 (r210678) @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Rui Paulo under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _RTLD_DB_H_ +#define _RTLD_DB_H_ + +#include +#include +#include + + +#define RD_VERSION 1 + +typedef enum { + RD_OK, + RD_ERR, + RD_DBERR, + RD_NOCAPAB, + RD_NODYNAM, + RD_NOBASE, + RD_NOMAPS +} rd_err_e; + +typedef struct rd_agent { + struct proc_handle *rda_php; + uintptr_t rda_addr; /* address of r_debug_state */ +} rd_agent_t; + +typedef struct rd_loadobj { + uintptr_t rdl_saddr; /* start address */ + uintptr_t rdl_eaddr; /* end address */ + uint32_t rdl_offset; + uint8_t rdl_prot; +#define RD_RDL_R 0x01 +#define RD_RDL_W 0x02 +#define RD_RDL_X 0x04 + enum { + RDL_TYPE_NONE = 0, + RDL_TYPE_DEF, + RDL_TYPE_VNODE, + RDL_TYPE_SWAP, + RDL_TYPE_DEV, + /* XXX some types missing */ + RDL_TYPE_UNKNOWN = 255 + } rdl_type; + unsigned char rdl_path[PATH_MAX]; +} rd_loadobj_t; + +typedef enum { + RD_NONE = 0, + RD_PREINIT, + RD_POSTINIT, + RD_DLACTIVITY +} rd_event_e; + +typedef enum { + RD_NOTIFY_BPT, + RD_NOTIFY_AUTOBPT, + RD_NOTIFY_SYSCALL +} rd_notify_e; + +typedef struct rd_notify { + rd_notify_e type; + union { + uintptr_t bptaddr; + long syscallno; + } u; +} rd_notify_t; + +typedef enum { + RD_NOSTATE = 0, + RD_CONSISTENT, + RD_ADD, + RD_DELETE +} rd_state_e; + +typedef struct rd_event_msg { + rd_event_e type; + union { + rd_state_e state; + } u; +} rd_event_msg_t; + +typedef enum { + RD_RESOLVE_NONE, + RD_RESOLVE_STEP, + RD_RESOLVE_TARGET, + RD_RESOLVE_TARGET_STEP +} rd_skip_e; + +typedef struct rd_plt_info { + rd_skip_e pi_skip_method; + long pi_nstep; + uintptr_t pi_target; + uintptr_t pi_baddr; + unsigned int pi_flags; +} rd_plt_info_t; + +#define RD_FLG_PI_PLTBOUND 0x0001 + +__BEGIN_DECLS + +struct proc_handle; +void rd_delete(rd_agent_t *); +const char *rd_errstr(rd_err_e); +rd_err_e rd_event_addr(rd_agent_t *, rd_event_e, rd_notify_t *); +rd_err_e rd_event_enable(rd_agent_t *, int); +rd_err_e rd_event_getmsg(rd_agent_t *, rd_event_msg_t *); +rd_err_e rd_init(int); +typedef int rl_iter_f(const rd_loadobj_t *, void *); +rd_err_e rd_loadobj_iter(rd_agent_t *, rl_iter_f *, void *); +void rd_log(const int); +rd_agent_t *rd_new(struct proc_handle *); +rd_err_e rd_objpad_enable(rd_agent_t *, size_t); +struct proc; +rd_err_e rd_plt_resolution(rd_agent_t *, uintptr_t, struct proc *, + uintptr_t, rd_plt_info_t *); +rd_err_e rd_reset(rd_agent_t *); + +__END_DECLS + +#endif /* _RTLD_DB_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:30:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0CF6106566B; Sat, 31 Jul 2010 14:30:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6C458FC20; Sat, 31 Jul 2010 14:30:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEUBeR005397; Sat, 31 Jul 2010 14:30:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEUBiU005395; Sat, 31 Jul 2010 14:30:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007311430.o6VEUBiU005395@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 31 Jul 2010 14:30:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210679 - head/bin/sleep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:30:12 -0000 Author: kib Date: Sat Jul 31 14:30:11 2010 New Revision: 210679 URL: http://svn.freebsd.org/changeset/base/210679 Log: Report the time left for the sleep on SIGINFO. Be stricter in the checking of interval specification. PR: bin/139345 MFC after: 3 weeks Modified: head/bin/sleep/sleep.c Modified: head/bin/sleep/sleep.c ============================================================================== --- head/bin/sleep/sleep.c Sat Jul 31 14:26:10 2010 (r210678) +++ head/bin/sleep/sleep.c Sat Jul 31 14:30:11 2010 (r210679) @@ -42,26 +42,34 @@ static char sccsid[] = "@(#)sleep.c 8.3 __FBSDID("$FreeBSD$"); #include +#include #include +#include #include #include #include #include -void usage(void); +static void usage(void); + +static volatile sig_atomic_t report_requested; +static void +report_request(int signo __unused) +{ + + report_requested = 1; +} int main(int argc, char *argv[]) { struct timespec time_to_sleep; - long l; + long l, original; int neg; char *p; - if (argc != 2) { + if (argc != 2) usage(); - return(1); - } p = argv[1]; @@ -74,10 +82,8 @@ main(int argc, char *argv[]) if (*p == '-') { neg = 1; ++p; - if (!isdigit((unsigned char)*p) && *p != '.') { + if (!isdigit((unsigned char)*p) && *p != '.') usage(); - return(1); - } } else if (*p == '+') ++p; @@ -85,13 +91,13 @@ main(int argc, char *argv[]) /* Calculate seconds. */ if (isdigit((unsigned char)*p)) { l = strtol(p, &p, 10); - if (l > INT_MAX) { - /* - * Avoid overflow when `seconds' is huge. This assumes - * that the maximum value for a time_t is <= INT_MAX. - */ + + /* + * Avoid overflow when `seconds' is huge. This assumes + * that the maximum value for a time_t is <= INT_MAX. + */ + if (l > INT_MAX) l = INT_MAX; - } } else l = 0; time_to_sleep.tv_sec = (time_t)l; @@ -110,16 +116,38 @@ main(int argc, char *argv[]) } while (l); } - if (!neg && (time_to_sleep.tv_sec > 0 || time_to_sleep.tv_nsec > 0)) - (void)nanosleep(&time_to_sleep, (struct timespec *)NULL); + /* Skip over the trailing whitespace. */ + while (isspace((unsigned char)*p)) + ++p; + if (*p != '\0') + usage(); + + signal(SIGINFO, report_request); + if (!neg && (time_to_sleep.tv_sec > 0 || time_to_sleep.tv_nsec > 0)) { + original = time_to_sleep.tv_sec; + while (nanosleep(&time_to_sleep, &time_to_sleep) != 0) { + if (report_requested) { + /* + * Reporting does not bother with + * fractions of a second... + */ + warnx("about %ld second(s) left" + " out of the original %ld", + time_to_sleep.tv_sec, original); + report_requested = 0; + } else + break; + } + } - return(0); + return (0); } -void +static void usage(void) { - const char msg[] = "usage: sleep seconds\n"; + static const char msg[] = "usage: sleep seconds\n"; write(STDERR_FILENO, msg, sizeof(msg) - 1); + exit(1); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:32:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 683DC1065672; Sat, 31 Jul 2010 14:32:54 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58D078FC17; Sat, 31 Jul 2010 14:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEWsxn006060; Sat, 31 Jul 2010 14:32:54 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEWsqu006058; Sat, 31 Jul 2010 14:32:54 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311432.o6VEWsqu006058@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 14:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210680 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:32:54 -0000 Author: rpaulo Date: Sat Jul 31 14:32:54 2010 New Revision: 210680 URL: http://svn.freebsd.org/changeset/base/210680 Log: Add LIBRTLD_DB. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sat Jul 31 14:30:11 2010 (r210679) +++ head/share/mk/bsd.libnames.mk Sat Jul 31 14:32:54 2010 (r210680) @@ -139,6 +139,7 @@ LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken. LIBRPCSVC?= ${DESTDIR}${LIBDIR}/librpcsvc.a LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR}/librpcsec_gss.a LIBRT?= ${DESTDIR}${LIBDIR}/librt.a +LIBRTLD_DB?= ${DESTDIR}${LIBDIR}/librtld_db.a LIBSBUF?= ${DESTDIR}${LIBDIR}/libsbuf.a LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:36:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE7431065673; Sat, 31 Jul 2010 14:36:34 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEB428FC08; Sat, 31 Jul 2010 14:36:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEaYkH006893; Sat, 31 Jul 2010 14:36:34 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEaY0E006891; Sat, 31 Jul 2010 14:36:34 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311436.o6VEaY0E006891@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 14:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210681 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:36:34 -0000 Author: rpaulo Date: Sat Jul 31 14:36:34 2010 New Revision: 210681 URL: http://svn.freebsd.org/changeset/base/210681 Log: Add librtld_db. Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Sat Jul 31 14:32:54 2010 (r210680) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Sat Jul 31 14:36:34 2010 (r210681) @@ -58,6 +58,7 @@ .ds doc-str-Lb-libpmc Performance Monitoring Counters Interface Library (libpmc, \-lpmc) .ds doc-str-Lb-librpcsec_gss RPC GSS-API Authentication Library (librpcsec_gss, \-lrpcsec_gss) .ds doc-str-Lb-librpcsvc RPC Service Library (librpcsvc, \-lrpcsvc) +.ds doc-str-lb-librtld_db Run-time Linker Debugging Library (librtld_db, \-lrtld_db) .ds doc-str-Lb-libsdp Bluetooth Service Discovery Protocol User Library (libsdp, \-lsdp) .ds doc-str-Lb-libthr 1:1 Threading Library (libthr, \-lthr) .ds doc-str-Lb-libufs UFS File System Access Library (libufs, \-lufs) From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:52:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E78106564A; Sat, 31 Jul 2010 14:52:30 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21A3C8FC1A; Sat, 31 Jul 2010 14:52:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEqUPf010504; Sat, 31 Jul 2010 14:52:30 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEqUcg010502; Sat, 31 Jul 2010 14:52:30 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311452.o6VEqUcg010502@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 14:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210682 - head/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:52:30 -0000 Author: rpaulo Date: Sat Jul 31 14:52:29 2010 New Revision: 210682 URL: http://svn.freebsd.org/changeset/base/210682 Log: libproc is going to be i386/amd64 only with the next update. Sponsored by: The FreeBSD Foundation Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Jul 31 14:36:34 2010 (r210681) +++ head/lib/Makefile Sat Jul 31 14:52:29 2010 (r210682) @@ -88,7 +88,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libpcap \ ${_libpkg} \ ${_libpmc} \ - libproc \ + ${_libproc} \ librt \ ${_libsdp} \ ${_libsm} \ @@ -173,6 +173,7 @@ _libncp= libncp .endif _libsmb= libsmb _libvgl= libvgl +_libproc= libproc .endif .if ${MACHINE_ARCH} == "ia64" @@ -186,6 +187,7 @@ _libncp= libncp .endif _libsmb= libsmb _libvgl= libvgl +_libproc= libproc .endif .if ${MACHINE_CPUARCH} == "powerpc" From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:53:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84E0A106566C; Sat, 31 Jul 2010 14:53:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7595A8FC08; Sat, 31 Jul 2010 14:53:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VErhQL010805; Sat, 31 Jul 2010 14:53:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VErhfm010803; Sat, 31 Jul 2010 14:53:43 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311453.o6VErhfm010803@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 14:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210683 - head/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:53:43 -0000 Author: rpaulo Date: Sat Jul 31 14:53:43 2010 New Revision: 210683 URL: http://svn.freebsd.org/changeset/base/210683 Log: Simplify the Makefile. The i386 and amd64 sections are equal. Sponsored by: The FreeBSD Foundation Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Jul 31 14:52:29 2010 (r210682) +++ head/lib/Makefile Sat Jul 31 14:53:43 2010 (r210683) @@ -167,7 +167,7 @@ _libnetgraph= libnetgraph _libypclnt= libypclnt .endif -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" .if ${MK_NCP} != "no" _libncp= libncp .endif @@ -181,15 +181,6 @@ _libefi= libefi _libsmb= libsmb .endif -.if ${MACHINE_ARCH} == "amd64" -.if ${MK_NCP} != "no" -_libncp= libncp -.endif -_libsmb= libsmb -_libvgl= libvgl -_libproc= libproc -.endif - .if ${MACHINE_CPUARCH} == "powerpc" _libsmb= libsmb .endif From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:57:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CA1A1065678; Sat, 31 Jul 2010 14:57:33 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CBB08FC08; Sat, 31 Jul 2010 14:57:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEvXWC011690; Sat, 31 Jul 2010 14:57:33 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEvX8m011688; Sat, 31 Jul 2010 14:57:33 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311457.o6VEvX8m011688@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 14:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210684 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:57:33 -0000 Author: rpaulo Date: Sat Jul 31 14:57:33 2010 New Revision: 210684 URL: http://svn.freebsd.org/changeset/base/210684 Log: Add libproc. Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Sat Jul 31 14:53:43 2010 (r210683) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Sat Jul 31 14:57:33 2010 (r210684) @@ -56,6 +56,7 @@ .ds doc-str-Lb-libmemstat Kernel Memory Allocator Statistics Library (libmemstat, \-lmemstat) .ds doc-str-Lb-libnetgraph Netgraph User Library (libnetgraph, \-lnetgraph) .ds doc-str-Lb-libpmc Performance Monitoring Counters Interface Library (libpmc, \-lpmc) +.ds doc-str-Lb-libproc Processor Monitoring and Analysis Library (libproc, \-lproc) .ds doc-str-Lb-librpcsec_gss RPC GSS-API Authentication Library (librpcsec_gss, \-lrpcsec_gss) .ds doc-str-Lb-librpcsvc RPC Service Library (librpcsvc, \-lrpcsvc) .ds doc-str-lb-librtld_db Run-time Linker Debugging Library (librtld_db, \-lrtld_db) From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 14:57:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48CAC106576A; Sat, 31 Jul 2010 14:57:39 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B1B48FC13; Sat, 31 Jul 2010 14:57:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VEvdwZ011760; Sat, 31 Jul 2010 14:57:39 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VEvdhn011758; Sat, 31 Jul 2010 14:57:39 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201007311457.o6VEvdhn011758@svn.freebsd.org> From: Philip Paeps Date: Sat, 31 Jul 2010 14:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210685 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 14:57:42 -0000 Author: philip Date: Sat Jul 31 14:57:38 2010 New Revision: 210685 URL: http://svn.freebsd.org/changeset/base/210685 Log: Take cbzimmer's commit bit into safekeeping per his request. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat Jul 31 14:57:33 2010 (r210684) +++ svnadmin/conf/access Sat Jul 31 14:57:38 2010 (r210685) @@ -42,7 +42,6 @@ brueffer bruno bschmidt bz -cbzimmer ceri charnier cognet Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sat Jul 31 14:57:33 2010 (r210684) +++ svnadmin/conf/mentors Sat Jul 31 14:57:38 2010 (r210685) @@ -14,7 +14,6 @@ ae mav Co-mentor: kib anchie bz andrew imp brucec rrs -cbzimmer sam dchagin kib eri mlaier Co-mentor: thompsa gabor delphij From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 15:31:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA78B1065672; Sat, 31 Jul 2010 15:31:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAE038FC0A; Sat, 31 Jul 2010 15:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VFVNO7019200; Sat, 31 Jul 2010 15:31:23 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VFVNNe019198; Sat, 31 Jul 2010 15:31:23 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201007311531.o6VFVNNe019198@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 31 Jul 2010 15:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210686 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 15:31:24 -0000 Author: bz Date: Sat Jul 31 15:31:23 2010 New Revision: 210686 URL: http://svn.freebsd.org/changeset/base/210686 Log: MFp4 @181628: Free the rtentry after we diconnected it from the FIB and are counting it as rttrash. There might still be a chance we leak it from a different code path but there is nothing we can do about this here. Sponsored by: ISPsystem (in February) Reviewed by: julian (in February) MFC after: 2 weeks Modified: head/sys/netinet/in_rmx.c Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Sat Jul 31 14:57:38 2010 (r210685) +++ head/sys/netinet/in_rmx.c Sat Jul 31 15:31:23 2010 (r210686) @@ -408,14 +408,28 @@ in_ifadownkill(struct radix_node *rn, vo if (rt->rt_ifa == ap->ifa && (ap->del || !(rt->rt_flags & RTF_STATIC))) { /* - * We need to disable the automatic prune that happens - * in this case in rtrequest() because it will blow - * away the pointers that rn_walktree() needs in order - * continue our descent. We will end up deleting all - * the routes that rtrequest() would have in any case, - * so that behavior is not needed there. + * Aquire a reference so that it can later be freed + * as the refcount would be 0 here in case of at least + * ap->del. + */ + RT_ADDREF(rt); + /* + * Disconnect it from the tree and permit protocols + * to cleanup. */ rtexpunge(rt); + /* + * At this point it is an rttrash node, and in case + * the above is the only reference we must free it. + * If we do not noone will have a pointer and the + * rtentry will be leaked forever. + * In case someone else holds a reference, we are + * fine as we only decrement the refcount. In that + * case if the other entity calls RT_REMREF, we + * will still be leaking but at least we tried. + */ + RTFREE_LOCKED(rt); + return (0); } RT_UNLOCK(rt); return 0; From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 15:35:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AB9C1065676; Sat, 31 Jul 2010 15:35:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id D1B7E8FC18; Sat, 31 Jul 2010 15:35:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id CAA8441C690; Sat, 31 Jul 2010 17:35:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 4o1eB7y8H1d3; Sat, 31 Jul 2010 17:35:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id E0AD841C67E; Sat, 31 Jul 2010 17:35:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id D8C6D4448EC; Sat, 31 Jul 2010 15:32:51 +0000 (UTC) Date: Sat, 31 Jul 2010 15:32:51 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201007311531.o6VFVNNe019198@svn.freebsd.org> Message-ID: <20100731153214.M57851@maildrop.int.zabbadoz.net> References: <201007311531.o6VFVNNe019198@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r210686 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 15:35:08 -0000 On Sat, 31 Jul 2010, Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Jul 31 15:31:23 2010 > New Revision: 210686 > URL: http://svn.freebsd.org/changeset/base/210686 > > Log: > MFp4 @181628: > > Free the rtentry after we diconnected it from the FIB and are counting > it as rttrash. There might still be a chance we leak it from a different > code path but there is nothing we can do about this here. See http://p4web.freebsd.org/@@181628?ac=10 for a quick and dirty script that reproduces the problem. -- Bjoern A. Zeeb From August on I will have a life. It's now up to you to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 15:36:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 155CE106567A; Sat, 31 Jul 2010 15:36:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04C328FC12; Sat, 31 Jul 2010 15:36:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VFasOi020454; Sat, 31 Jul 2010 15:36:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VFasIp020452; Sat, 31 Jul 2010 15:36:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007311536.o6VFasIp020452@svn.freebsd.org> From: Rick Macklem Date: Sat, 31 Jul 2010 15:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210687 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 15:36:55 -0000 Author: rmacklem Date: Sat Jul 31 15:36:54 2010 New Revision: 210687 URL: http://svn.freebsd.org/changeset/base/210687 Log: MFC: r210030 Fix a bogus comment that mentions lru lists that don't exist. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sat Jul 31 15:31:23 2010 (r210686) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sat Jul 31 15:36:54 2010 (r210687) @@ -45,7 +45,7 @@ NFSV4ROOTLOCKMUTEX; NFSSTATESPINLOCK; /* - * Hash and lru lists for nfs V4. + * Hash lists for nfs V4. * (Some would put them in the .h file, but I don't like declaring storage * in a .h) */ From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 16:10:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD7C31065676; Sat, 31 Jul 2010 16:10:20 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB3C78FC1B; Sat, 31 Jul 2010 16:10:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VGAKrq027816; Sat, 31 Jul 2010 16:10:20 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VGAKWZ027806; Sat, 31 Jul 2010 16:10:20 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311610.o6VGAKWZ027806@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 16:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210688 - in head/lib/libproc: . test test/t1-bkpt test/t2-name2map test/t3-name2sym X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 16:10:21 -0000 Author: rpaulo Date: Sat Jul 31 16:10:20 2010 New Revision: 210688 URL: http://svn.freebsd.org/changeset/base/210688 Log: New version of libproc. Changes are: * breakpoint setup support * register query * symbol to address mapping and vice-versa * more misc utility functions based on their Solaris counterpart Also, I've written some test cases. Sponsored by: The FreeBSD Foundation Added: head/lib/libproc/proc_bkpt.c (contents, props changed) head/lib/libproc/proc_regs.c (contents, props changed) head/lib/libproc/proc_rtld.c (contents, props changed) head/lib/libproc/test/ head/lib/libproc/test/Makefile (contents, props changed) head/lib/libproc/test/t1-bkpt/ head/lib/libproc/test/t1-bkpt/Makefile (contents, props changed) head/lib/libproc/test/t1-bkpt/t1-bkpt.c (contents, props changed) head/lib/libproc/test/t2-name2map/ head/lib/libproc/test/t2-name2map/Makefile (contents, props changed) head/lib/libproc/test/t2-name2map/t2-name2map.c (contents, props changed) head/lib/libproc/test/t3-name2sym/ head/lib/libproc/test/t3-name2sym/Makefile (contents, props changed) head/lib/libproc/test/t3-name2sym/t3-name2sym.c (contents, props changed) Modified: head/lib/libproc/Makefile head/lib/libproc/_libproc.h head/lib/libproc/libproc.h head/lib/libproc/proc_create.c head/lib/libproc/proc_sym.c head/lib/libproc/proc_util.c Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Sat Jul 31 15:36:54 2010 (r210687) +++ head/lib/libproc/Makefile Sat Jul 31 16:10:20 2010 (r210688) @@ -2,9 +2,11 @@ LIB= proc -SRCS= \ +SRCS= proc_bkpt.c \ proc_create.c \ + proc_regs.c \ proc_sym.c \ + proc_rtld.c \ proc_util.c INCS= libproc.h Modified: head/lib/libproc/_libproc.h ============================================================================== --- head/lib/libproc/_libproc.h Sat Jul 31 15:36:54 2010 (r210687) +++ head/lib/libproc/_libproc.h Sat Jul 31 16:10:20 2010 (r210688) @@ -31,6 +31,7 @@ #include #include #include +#include #include "libproc.h" @@ -39,5 +40,16 @@ struct proc_handle { int kq; /* Kernel event queue ID. */ int flags; /* Process flags. */ int status; /* Process status (PS_*). */ + int wstat; /* Process wait status. */ + rd_agent_t *rdap; /* librtld_db agent */ + rd_loadobj_t *rdobjs; + size_t rdobjsz; + size_t nobjs; + struct lwpstatus lwps; }; +#ifdef DEBUG +#define DPRINTF(fmt, ...) warn(fmt, __VA_ARGS__) +#else +#define DPRINTF(fmt, ...) +#endif Modified: head/lib/libproc/libproc.h ============================================================================== --- head/lib/libproc/libproc.h Sat Jul 31 15:36:54 2010 (r210687) +++ head/lib/libproc/libproc.h Sat Jul 31 16:10:20 2010 (r210688) @@ -1,7 +1,11 @@ /*- + * Copyright (c) 2010 The FreeBSD Foundation * Copyright (c) 2008 John Birrell (jb@freebsd.org) * All rights reserved. * + * Portions of this software were developed by Rui Paulo under sponsorship + * from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -30,6 +34,8 @@ #define _LIBPROC_H_ #include +#include +#include struct proc_handle; @@ -43,30 +49,100 @@ typedef void (*proc_child_func)(void *); #define PS_DEAD 5 #define PS_LOST 6 +/* Reason values for proc_detach(). */ +#define PRELEASE_HANG 1 +#define PRELEASE_KILL 2 + typedef struct prmap { uintptr_t pr_vaddr; /* Virtual address. */ + size_t pr_size; /* Mapping size in bytes */ + size_t pr_offset; /* Mapping offset in object */ + char pr_mapname[PATH_MAX]; /* Mapping filename */ + uint8_t pr_mflags; /* Protection flags */ +#define MA_READ 0x01 +#define MA_WRITE 0x02 +#define MA_EXEC 0x04 +#define MA_COW 0x08 +#define MA_NEEDS_COPY 0x10 +#define MA_NOCOREDUMP 0x20 } prmap_t; +typedef int proc_map_f(void *, const prmap_t *, const char *); +typedef int proc_sym_f(void *, const GElf_Sym *, const char *); + +/* Values for ELF sections */ +#define PR_SYMTAB 1 +#define PR_DYNSYM 2 + +/* Values for the 'mask' parameter in the iteration functions */ +#define BIND_LOCAL 0x0001 +#define BIND_GLOBAL 0x0002 +#define BIND_WEAK 0x0004 +#define BIND_ANY (BIND_LOCAL|BIND_GLOBAL|BIND_WEAK) +#define TYPE_NOTYPE 0x0100 +#define TYPE_OBJECT 0x0200 +#define TYPE_FUNC 0x0400 +#define TYPE_SECTION 0x0800 +#define TYPE_FILE 0x1000 +#define TYPE_ANY (TYPE_NOTYPE|TYPE_OBJECT|TYPE_FUNC|TYPE_SECTION|\ + TYPE_FILE) + +typedef enum { + REG_PC, + REG_SP, + REG_RVAL1, + REG_RVAL2 +} proc_reg_t; + +#define SIG2STR_MAX 8 + +typedef struct lwpstatus { + int pr_why; +#define PR_REQUESTED 1 +#define PR_FAULTED 2 +#define PR_SYSENTRY 3 +#define PR_SYSEXIT 4 + int pr_what; +#define FLTBPT -1 +} lwpstatus_t; + /* Function prototype definitions. */ __BEGIN_DECLS -const prmap_t *proc_addr2map(struct proc_handle *, uintptr_t); -const prmap_t *proc_name2map(struct proc_handle *, const char *); +prmap_t *proc_addr2map(struct proc_handle *, uintptr_t); +prmap_t *proc_name2map(struct proc_handle *, const char *); char *proc_objname(struct proc_handle *, uintptr_t, char *, size_t); +prmap_t *proc_obj2map(struct proc_handle *, const char *); +int proc_iter_objs(struct proc_handle *, proc_map_f *, void *); +int proc_iter_symbyaddr(struct proc_handle *, const char *, int, + int, proc_sym_f *, void *); int proc_addr2sym(struct proc_handle *, uintptr_t, char *, size_t, GElf_Sym *); int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl); int proc_continue(struct proc_handle *); int proc_clearflags(struct proc_handle *, int); int proc_create(const char *, char * const *, proc_child_func *, void *, struct proc_handle **); -int proc_detach(struct proc_handle *); +int proc_detach(struct proc_handle *, int); int proc_getflags(struct proc_handle *); int proc_name2sym(struct proc_handle *, const char *, const char *, GElf_Sym *); int proc_setflags(struct proc_handle *, int); int proc_state(struct proc_handle *); -int proc_wait(struct proc_handle *); pid_t proc_getpid(struct proc_handle *); +int proc_wstatus(struct proc_handle *); +int proc_getwstat(struct proc_handle *); +char * proc_signame(int, char *, size_t); +int proc_read(struct proc_handle *, char *, size_t, size_t); +const lwpstatus_t * + proc_getlwpstatus(struct proc_handle *); void proc_free(struct proc_handle *); +rd_agent_t *proc_rdagent(struct proc_handle *); +void proc_updatesyms(struct proc_handle *); +int proc_bkptset(struct proc_handle *, uintptr_t, unsigned long *); +int proc_bkptdel(struct proc_handle *, uintptr_t, unsigned long); +void proc_bkptregadj(unsigned long *); +int proc_bkptexec(struct proc_handle *, unsigned long); +int proc_regget(struct proc_handle *, proc_reg_t, unsigned long *); +int proc_regset(struct proc_handle *, proc_reg_t, unsigned long); __END_DECLS Added: head/lib/libproc/proc_bkpt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libproc/proc_bkpt.c Sat Jul 31 16:10:20 2010 (r210688) @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Rui Paulo under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include +#include +#include "_libproc.h" + +#if defined(__i386__) || defined(__amd64__) +#define BREAKPOINT_INSTR 0xcc /* int 0x3 */ +#define BREAKPOINT_INSTR_SZ 1 +#else +#error "Add support for your architecture" +#endif + +int +proc_bkptset(struct proc_handle *phdl, uintptr_t address, + unsigned long *saved) +{ + struct ptrace_io_desc piod; + unsigned long paddr, caddr; + + *saved = 0; + if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || + phdl->status == PS_IDLE) { + errno = ENOENT; + return (-1); + } + + /* + * Read the original instruction. + */ + caddr = address; + paddr = 0; + piod.piod_op = PIOD_READ_I; + piod.piod_offs = (void *)caddr; + piod.piod_addr = &paddr; + piod.piod_len = BREAKPOINT_INSTR_SZ; + if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { + DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, + address); + return (-1); + } + *saved = paddr; + /* + * Write a breakpoint instruction to that address. + */ + caddr = address; + paddr = BREAKPOINT_INSTR; + piod.piod_op = PIOD_WRITE_I; + piod.piod_offs = (void *)caddr; + piod.piod_addr = &paddr; + piod.piod_len = BREAKPOINT_INSTR_SZ; + if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { + warn("ERROR: couldn't write instruction at address 0x%" PRIuPTR, + address); + return (-1); + } + + return (0); +} + +int +proc_bkptdel(struct proc_handle *phdl, uintptr_t address, + unsigned long saved) +{ + struct ptrace_io_desc piod; + unsigned long paddr, caddr; + + if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || + phdl->status == PS_IDLE) { + errno = ENOENT; + return (-1); + } + DPRINTF("removing breakpoint at 0x%lx\n", address); + /* + * Overwrite the breakpoint instruction that we setup previously. + */ + caddr = address; + paddr = saved; + piod.piod_op = PIOD_WRITE_I; + piod.piod_offs = (void *)caddr; + piod.piod_addr = &paddr; + piod.piod_len = BREAKPOINT_INSTR_SZ; + if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { + DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, + address); + return (-1); + } + + return (0); +} + +/* + * Decrement pc so that we delete the breakpoint at the correct + * address, i.e. at the BREAKPOINT_INSTR address. + */ +void +proc_bkptregadj(unsigned long *pc) +{ + *pc = *pc - BREAKPOINT_INSTR_SZ; +} + +/* + * Step over the breakpoint. + */ +int +proc_bkptexec(struct proc_handle *phdl, unsigned long saved) +{ + unsigned long pc; + unsigned long samesaved; + int status; + + if (proc_regget(phdl, REG_PC, &pc) < 0) { + warn("ERROR: couldn't get PC register"); + return (-1); + } + proc_bkptregadj(&pc); + if (proc_bkptdel(phdl, pc, saved) < 0) { + warn("ERROR: couldn't delete breakpoint"); + return (-1); + } + /* + * Go back in time and step over the new instruction just + * set up by proc_bkptdel(). + */ + proc_regset(phdl, REG_PC, pc); + if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) { + warn("ERROR: ptrace step failed"); + return (-1); + } + status = proc_wstatus(phdl); + if (!WIFSTOPPED(status)) { + warn("ERROR: don't know why process stopped"); + return (-1); + } + /* + * Restore the breakpoint. The saved instruction should be + * the same as the one that we were passed in. + */ + if (proc_bkptset(phdl, pc, &samesaved) < 0) { + warn("ERROR: couldn't restore breakpoint"); + return (-1); + } + assert(samesaved == saved); + + return (0); +} Modified: head/lib/libproc/proc_create.c ============================================================================== --- head/lib/libproc/proc_create.c Sat Jul 31 15:36:54 2010 (r210687) +++ head/lib/libproc/proc_create.c Sat Jul 31 16:10:20 2010 (r210688) @@ -27,6 +27,7 @@ */ #include "_libproc.h" +#include #include #include #include @@ -40,11 +41,10 @@ int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl) { struct proc_handle *phdl; - struct kevent kev; int error = 0; int status; - if (pid == 0 || pphdl == NULL) + if (pid == 0 || pid == getpid()) return (EINVAL); /* @@ -58,26 +58,24 @@ proc_attach(pid_t pid, int flags, struct phdl->pid = pid; phdl->flags = flags; phdl->status = PS_RUN; + elf_version(EV_CURRENT); - EV_SET(&kev, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, - 0, NULL); - - if ((phdl->kq = kqueue()) == -1) - err(1, "ERROR: cannot create kernel evet queue"); - - if (kevent(phdl->kq, &kev, 1, NULL, 0, NULL) < 0) - err(2, "ERROR: cannot monitor child process %d", pid); - - if (ptrace(PT_ATTACH, phdl->pid, NULL, 0) != 0) + if (ptrace(PT_ATTACH, phdl->pid, 0, 0) != 0) { error = errno; + DPRINTF("ERROR: cannot ptrace child process %d", pid); + goto out; + } /* Wait for the child process to stop. */ - else if (waitpid(pid, &status, WUNTRACED) == -1) - err(3, "ERROR: child process %d didn't stop as expected", pid); + if (waitpid(pid, &status, WUNTRACED) == -1) { + error = errno; + DPRINTF("ERROR: child process %d didn't stop as expected", pid); + goto out; + } /* Check for an unexpected status. */ - else if (WIFSTOPPED(status) == 0) - err(4, "ERROR: child process %d status 0x%x", pid, status); + if (WIFSTOPPED(status) == 0) + DPRINTF("ERROR: child process %d status 0x%x", pid, status); else phdl->status = PS_STOP; @@ -85,6 +83,7 @@ proc_attach(pid_t pid, int flags, struct proc_free(phdl); else *pphdl = phdl; +out: return (error); } @@ -94,7 +93,6 @@ proc_create(const char *file, char * con void *child_arg, struct proc_handle **pphdl) { struct proc_handle *phdl; - struct kevent kev; int error = 0; int status; pid_t pid; @@ -106,6 +104,8 @@ proc_create(const char *file, char * con if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) return (ENOMEM); + elf_version(EV_CURRENT); + /* Fork a new process. */ if ((pid = vfork()) == -1) error = errno; @@ -128,31 +128,26 @@ proc_create(const char *file, char * con phdl->pid = pid; phdl->status = PS_IDLE; - EV_SET(&kev, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, - 0, NULL); - - if ((phdl->kq = kqueue()) == -1) - err(1, "ERROR: cannot create kernel evet queue"); - - if (kevent(phdl->kq, &kev, 1, NULL, 0, NULL) < 0) - err(2, "ERROR: cannot monitor child process %d", pid); - /* Wait for the child process to stop. */ - if (waitpid(pid, &status, WUNTRACED) == -1) - err(3, "ERROR: child process %d didn't stop as expected", pid); + if (waitpid(pid, &status, WUNTRACED) == -1) { + error = errno; + DPRINTF("ERROR: child process %d didn't stop as expected", pid); + goto bad; + } /* Check for an unexpected status. */ - if (WIFSTOPPED(status) == 0) - err(4, "ERROR: child process %d status 0x%x", pid, status); - else + if (WIFSTOPPED(status) == 0) { + error = errno; + DPRINTF("ERROR: child process %d status 0x%x", pid, status); + goto bad; + } else phdl->status = PS_STOP; } - +bad: if (error) proc_free(phdl); else *pphdl = phdl; - return (error); } Added: head/lib/libproc/proc_regs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libproc/proc_regs.c Sat Jul 31 16:10:20 2010 (r210688) @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Rui Paulo under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include "_libproc.h" + +int +proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue) +{ + struct reg regs; + + if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || + phdl->status == PS_IDLE) { + errno = ENOENT; + return (-1); + } + memset(®s, 0, sizeof(regs)); + if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) + return (-1); + switch (reg) { + case REG_PC: +#if defined(__amd64__) + *regvalue = regs.r_rip; +#elif defined(__i386__) + *regvalue = regs.r_eip; +#endif + break; + case REG_SP: +#if defined(__amd64__) + *regvalue = regs.r_rsp; +#elif defined(__i386__) + *regvalue = regs.r_esp; +#endif + break; + default: + warn("ERROR: no support for reg number %d", reg); + return (-1); + } + + return (0); +} + +int +proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue) +{ + struct reg regs; + + if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || + phdl->status == PS_IDLE) { + errno = ENOENT; + return (-1); + } + if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) + return (-1); + switch (reg) { + case REG_PC: +#if defined(__amd64__) + regs.r_rip = regvalue; +#elif defined(__i386__) + regs.r_eip = regvalue; +#endif + break; + case REG_SP: +#if defined(__amd64__) + regs.r_rsp = regvalue; +#elif defined(__i386__) + regs.r_esp = regvalue; +#endif + break; + default: + warn("ERROR: no support for reg number %d", reg); + return (-1); + } + if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) + return (-1); + + return (0); +} Added: head/lib/libproc/proc_rtld.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libproc/proc_rtld.c Sat Jul 31 16:10:20 2010 (r210688) @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Rui Paulo under sponsorship from the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include "libproc.h" +#include "_libproc.h" + +static int +map_iter(const rd_loadobj_t *lop, void *arg) +{ + struct proc_handle *phdl = arg; + + phdl->nobjs++; + if (phdl->nobjs >= phdl->rdobjsz) { + phdl->rdobjsz *= 2; + phdl->rdobjs = realloc(phdl->rdobjs, phdl->rdobjsz); + if (phdl->rdobjs == NULL) + return (-1); + } + memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*phdl->rdobjs)); + + return (0); +} + +rd_agent_t * +proc_rdagent(struct proc_handle *phdl) +{ + if (phdl->rdap == NULL && phdl->status != PS_UNDEAD && + phdl->status != PS_IDLE) { + if ((phdl->rdap = rd_new(phdl)) != NULL) { + phdl->rdobjs = malloc(sizeof(*phdl->rdobjs) * 64); + if (phdl->rdobjs == NULL) + return (phdl->rdap); + rd_loadobj_iter(phdl->rdap, map_iter, phdl); + } + } + + return (phdl->rdap); +} + +void +proc_updatesyms(struct proc_handle *phdl) +{ + memset(&phdl->rdobjs, 0, sizeof(*phdl->rdobjs) * phdl->rdobjsz); + phdl->nobjs = 0; + rd_loadobj_iter(phdl->rdap, map_iter, phdl); +} Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Sat Jul 31 15:36:54 2010 (r210687) +++ head/lib/libproc/proc_sym.c Sat Jul 31 16:10:20 2010 (r210688) @@ -1,7 +1,11 @@ /*- + * Copyright (c) 2010 The FreeBSD Foundation * Copyright (c) 2008 John Birrell (jb@freebsd.org) * All rights reserved. * + * Portions of this software were developed by Rui Paulo under sponsorship + * from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,43 +30,524 @@ * $FreeBSD$ */ -#include "_libproc.h" +#include +#include + +#include +#include #include +#include +#include +#include +#include +#include +#include +#include + +#include "_libproc.h" + +static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *); + +static void +proc_rdl2prmap(rd_loadobj_t *rdl, prmap_t *map) +{ + map->pr_vaddr = rdl->rdl_saddr; + map->pr_size = rdl->rdl_eaddr - rdl->rdl_saddr; + map->pr_offset = rdl->rdl_offset; + map->pr_mflags = 0; + if (rdl->rdl_prot & RD_RDL_R) + map->pr_mflags |= MA_READ; + if (rdl->rdl_prot & RD_RDL_W) + map->pr_mflags |= MA_WRITE; + if (rdl->rdl_prot & RD_RDL_X) + map->pr_mflags |= MA_EXEC; + strlcpy(map->pr_mapname, rdl->rdl_path, + sizeof(map->pr_mapname)); +} char * proc_objname(struct proc_handle *p, uintptr_t addr, char *objname, size_t objnamesz) { -printf("%s(%d): Not implemented. p %p addr 0x%lx objname %p objnamesz %zd\n",__func__,__LINE__,p,(u_long) addr,objname,objnamesz); + size_t i; + rd_loadobj_t *rdl; + + for (i = 0; i < p->nobjs; i++) { + rdl = &p->rdobjs[i]; + if (addr >= rdl->rdl_saddr && addr <= rdl->rdl_eaddr) { + strlcpy(objname, rdl->rdl_path, objnamesz); + return (objname); + } + } return (NULL); } -const prmap_t * +prmap_t * +proc_obj2map(struct proc_handle *p, const char *objname) +{ + size_t i; + prmap_t *map; + rd_loadobj_t *rdl; + char path[MAXPATHLEN]; + + for (i = 0; i < p->nobjs; i++) { + rdl = &p->rdobjs[i]; + basename_r(rdl->rdl_path, path); + if (strcmp(path, objname) == 0) { + if ((map = malloc(sizeof(*map))) == NULL) + return (NULL); + proc_rdl2prmap(rdl, map); + return (map); + } + } + return (NULL); +} + +int +proc_iter_objs(struct proc_handle *p, proc_map_f *func, void *cd) +{ + size_t i; + rd_loadobj_t *rdl; + prmap_t map; + char path[MAXPATHLEN]; + + if (p->nobjs == 0) + return (-1); + for (i = 0; i < p->nobjs; i++) { + rdl = &p->rdobjs[i]; + proc_rdl2prmap(rdl, &map); + basename_r(rdl->rdl_path, path); + (*func)(cd, &map, path); + } + + return (0); +} + +prmap_t * proc_addr2map(struct proc_handle *p, uintptr_t addr) { -printf("%s(%d): Not implemented. p %p addr 0x%lx\n",__func__,__LINE__,p,(u_long) addr); + size_t i; + int cnt, lastvn = 0; + prmap_t *map; + rd_loadobj_t *rdl; + struct kinfo_vmentry *kves, *kve; + + /* + * If we don't have a cache of listed objects, we need to query + * it ourselves. + */ + if (p->nobjs == 0) { + if ((kves = kinfo_getvmmap(p->pid, &cnt)) == NULL) + return (NULL); + for (i = 0; i < (size_t)cnt; i++) { + kve = kves + i; + if (kve->kve_type == KVME_TYPE_VNODE) + lastvn = i; + if (addr >= kve->kve_start && addr <= kve->kve_end) { + if ((map = malloc(sizeof(*map))) == NULL) { + free(kves); + return (NULL); + } + map->pr_vaddr = kve->kve_start; + map->pr_size = kve->kve_end - kve->kve_start; + map->pr_offset = kve->kve_offset; + map->pr_mflags = 0; + if (kve->kve_protection & KVME_PROT_READ) + map->pr_mflags |= MA_READ; + if (kve->kve_protection & KVME_PROT_WRITE) + map->pr_mflags |= MA_WRITE; + if (kve->kve_protection & KVME_PROT_EXEC) + map->pr_mflags |= MA_EXEC; + if (kve->kve_flags & KVME_FLAG_COW) + map->pr_mflags |= MA_COW; + if (kve->kve_flags & KVME_FLAG_NEEDS_COPY) + map->pr_mflags |= MA_NEEDS_COPY; + if (kve->kve_flags & KVME_FLAG_NOCOREDUMP) + map->pr_mflags |= MA_NOCOREDUMP; + strlcpy(map->pr_mapname, kves[lastvn].kve_path, + sizeof(map->pr_mapname)); + free(kves); + return (map); + } + } + free(kves); + return (NULL); + } + + for (i = 0; i < p->nobjs; i++) { + rdl = &p->rdobjs[i]; + if (addr >= rdl->rdl_saddr && addr <= rdl->rdl_eaddr) { + if ((map = malloc(sizeof(*map))) == NULL) + return (NULL); + proc_rdl2prmap(rdl, map); + return (map); + } + } return (NULL); } int proc_addr2sym(struct proc_handle *p, uintptr_t addr, char *name, - size_t namesz, GElf_Sym *sym) + size_t namesz, GElf_Sym *symcopy) { -printf("%s(%d): Not implemented. p %p addr 0x%lx name %p namesz %zd sym %p\n",__func__,__LINE__,p,(u_long) addr,name,namesz,sym); - return (0); + Elf *e; + Elf_Scn *scn, *dynsymscn = NULL, *symtabscn = NULL; + Elf_Data *data; + GElf_Shdr shdr; + GElf_Sym sym; + GElf_Ehdr ehdr; + int fd, error = -1; + size_t i; + uint64_t rsym; + prmap_t *map; + char *s; + unsigned long symtabstridx = 0, dynsymstridx = 0; + + if ((map = proc_addr2map(p, addr)) == NULL) + return (-1); + if (!map->pr_mapname || (fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { + warn("ERROR: open %s failed", map->pr_mapname); + goto err0; + } + if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { + warn("ERROR: elf_begin() failed"); + goto err1; + } + if (gelf_getehdr(e, &ehdr) == NULL) { + warn("ERROR: gelf_getehdr() failed"); + goto err2; + } + /* + * Find the index of the STRTAB and SYMTAB sections to locate + * symbol names. + */ + scn = NULL; + while ((scn = elf_nextscn(e, scn)) != NULL) { + gelf_getshdr(scn, &shdr); + switch (shdr.sh_type) { + case SHT_SYMTAB: + symtabscn = scn; + symtabstridx = shdr.sh_link; + break; + case SHT_DYNSYM: + dynsymscn = scn; + dynsymstridx = shdr.sh_link; + break; + default: + break; + } + } + /* + * Iterate over the Dynamic Symbols table to find the symbol. + * Then look up the string name in STRTAB (.dynstr) + */ + if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { + DPRINTF("ERROR: elf_getdata() failed"); + goto err2; + } + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + /* + * Calculate the address mapped to the virtual memory + * by rtld. + */ + rsym = map->pr_vaddr + sym.st_value; + if (addr >= rsym && addr <= (rsym + sym.st_size)) { + s = elf_strptr(e, dynsymstridx, sym.st_name); + if (s) { + strlcpy(name, s, namesz); + memcpy(symcopy, &sym, sizeof(sym)); + /* + * DTrace expects the st_value to contain + * only the address relative to the start of + * the function. + */ + symcopy->st_value = rsym; + error = 0; + goto out; + } + } + } + /* + * Iterate over the Symbols Table to find the symbol. + * Then look up the string name in STRTAB (.dynstr) + */ + if (symtabscn == NULL) + goto err2; + if ((data = elf_getdata(symtabscn, NULL)) == NULL) { + DPRINTF("ERROR: elf_getdata() failed"); + goto err2; + } + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + /* + * Calculate the address mapped to the virtual memory + * by rtld. + */ + if (ehdr.e_type != ET_EXEC) + rsym = map->pr_vaddr + sym.st_value; + else + rsym = sym.st_value; + if (addr >= rsym && addr <= (rsym + sym.st_size)) { + s = elf_strptr(e, symtabstridx, sym.st_name); + if (s) { + strlcpy(name, s, namesz); + memcpy(symcopy, &sym, sizeof(sym)); + /* + * DTrace expects the st_value to contain + * only the address relative to the start of + * the function. + */ + symcopy->st_value = rsym; + error = 0; + goto out; + } + } + } +out: +err2: + elf_end(e); +err1: + close(fd); +err0: + free(map); + return (error); } -const prmap_t * +prmap_t * proc_name2map(struct proc_handle *p, const char *name) { -printf("%s(%d): Not implemented. p %p name %p\n",__func__,__LINE__,p,name); + size_t i; + int cnt; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 16:11:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5EE61065686; Sat, 31 Jul 2010 16:11:11 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDB68FC13; Sat, 31 Jul 2010 16:11:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VGBBSG028073; Sat, 31 Jul 2010 16:11:11 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VGBBuO028071; Sat, 31 Jul 2010 16:11:11 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311611.o6VGBBuO028071@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 16:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210689 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 16:11:11 -0000 Author: rpaulo Date: Sat Jul 31 16:11:11 2010 New Revision: 210689 URL: http://svn.freebsd.org/changeset/base/210689 Log: Bump the shared library major version due to ABI conflicts. Sponsored by: The FreeBSD Foundation Modified: head/lib/libproc/Makefile Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Sat Jul 31 16:10:20 2010 (r210688) +++ head/lib/libproc/Makefile Sat Jul 31 16:11:11 2010 (r210689) @@ -13,7 +13,7 @@ INCS= libproc.h CFLAGS+= -I${.CURDIR} -SHLIB_MAJOR= 2 +SHLIB_MAJOR= 3 WITHOUT_MAN= From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 16:12:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 063861065674; Sat, 31 Jul 2010 16:12:48 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAFE08FC13; Sat, 31 Jul 2010 16:12:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VGClPJ028439; Sat, 31 Jul 2010 16:12:47 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VGCl5s028437; Sat, 31 Jul 2010 16:12:47 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311612.o6VGCl5s028437@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 16:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210690 - head/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 16:12:48 -0000 Author: rpaulo Date: Sat Jul 31 16:12:47 2010 New Revision: 210690 URL: http://svn.freebsd.org/changeset/base/210690 Log: Build librtld_db. Sponsored by: The FreeBSD Foundation Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Jul 31 16:11:11 2010 (r210689) +++ head/lib/Makefile Sat Jul 31 16:12:47 2010 (r210690) @@ -90,6 +90,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libpmc} \ ${_libproc} \ librt \ + ${_librtld_db} \ ${_libsdp} \ ${_libsm} \ ${_libsmb} \ @@ -174,6 +175,7 @@ _libncp= libncp _libsmb= libsmb _libvgl= libvgl _libproc= libproc +_librtld_db= librtld_db .endif .if ${MACHINE_ARCH} == "ia64" From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:09:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E360C106564A; Sat, 31 Jul 2010 17:09:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3B1D8FC1A; Sat, 31 Jul 2010 17:09:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VH9b9a041207; Sat, 31 Jul 2010 17:09:37 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VH9bvl041205; Sat, 31 Jul 2010 17:09:37 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311709.o6VH9bvl041205@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 17:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210691 - head/cddl/usr.sbin/dtrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:09:38 -0000 Author: rpaulo Date: Sat Jul 31 17:09:37 2010 New Revision: 210691 URL: http://svn.freebsd.org/changeset/base/210691 Log: dtrace(1) now depends on libutil and librtld_db. Sponsored by: The FreeBSD Foundation Modified: head/cddl/usr.sbin/dtrace/Makefile Modified: head/cddl/usr.sbin/dtrace/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/Makefile Sat Jul 31 16:12:47 2010 (r210690) +++ head/cddl/usr.sbin/dtrace/Makefile Sat Jul 31 17:09:37 2010 (r210691) @@ -20,7 +20,9 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ #CFLAGS+= -DNEED_ERRLOC #YFLAGS+= -d -DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} ${LIBCTF} ${LIBELF} ${LIBZ} -LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz +DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ + ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBUTIL} ${LIBRTLD_DB} +LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lutil \ + -lrtld_db .include From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:10:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF51B1065670; Sat, 31 Jul 2010 17:10:55 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF4D18FC13; Sat, 31 Jul 2010 17:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHAtuC041542; Sat, 31 Jul 2010 17:10:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHAtif041540; Sat, 31 Jul 2010 17:10:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311710.o6VHAtif041540@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 17:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210692 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:10:55 -0000 Author: rpaulo Date: Sat Jul 31 17:10:55 2010 New Revision: 210692 URL: http://svn.freebsd.org/changeset/base/210692 Log: Update to the new proc_detach() function. Sponsored by: The FreeBSD Foundation Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sat Jul 31 17:09:37 2010 (r210691) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sat Jul 31 17:10:55 2010 (r210692) @@ -723,7 +723,7 @@ dt_proc_error(dtrace_hdl_t *dtp, dt_proc #if defined(sun) Prelease(dpr->dpr_proc, 0); #else - proc_detach(dpr->dpr_proc); + proc_detach(dpr->dpr_proc, 0); #endif dt_free(dtp, dpr); @@ -861,7 +861,7 @@ dt_proc_destroy(dtrace_hdl_t *dtp, struc #if defined(sun) Prelease(dpr->dpr_proc, rflag); #else - proc_detach(dpr->dpr_proc); + proc_detach(dpr->dpr_proc, rflag); #endif dt_free(dtp, dpr); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:12:31 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F291F1065674; Sat, 31 Jul 2010 17:12:30 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 713248FC13; Sat, 31 Jul 2010 17:12:29 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.4/8.14.4) with ESMTP id o6VGsYHa040425; Sat, 31 Jul 2010 20:54:34 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1280595274; bh=wpqznmtpTWcj2Ls9xfQD+7cSRur4LiREOb6QcPVfGR4=; l=552; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=sh4RwphQ+69RT1F/a2DORDmB/Lq3tilPBg5KyN5C46k0sIjXorCye9taadHu0SnAV KHRw+VVehd3YT6EiUye1xIqz9ecfV4IDSjCZs/16NEonuvMrQcwzzEHZoZZqzEHI7y h/z/h/dyY6A08FBlxRTpFikCWcGOtwHzCthgEkhU= Received: (from ache@localhost) by nagual.pp.ru (8.14.4/8.14.4/Submit) id o6VGsYAU040424; Sat, 31 Jul 2010 20:54:34 +0400 (MSD) (envelope-from ache) Date: Sat, 31 Jul 2010 20:54:34 +0400 From: Andrey Chernov To: Konstantin Belousov Message-ID: <20100731165434.GA40375@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Konstantin Belousov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201007311430.o6VEUBiU005395@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007311430.o6VEUBiU005395@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r210679 - head/bin/sleep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:12:31 -0000 On Sat, Jul 31, 2010 at 02:30:11PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Jul 31 14:30:11 2010 > New Revision: 210679 > URL: http://svn.freebsd.org/changeset/base/210679 > > Log: > Report the time left for the sleep on SIGINFO. > Be stricter in the checking of interval specification. cc1: warnings being treated as errors /usr/src/bin/sleep/sleep.c: In function 'main': /usr/src/bin/sleep/sleep.c:136: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t' -- http://ache.pp.ru/ From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:13:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9261065672; Sat, 31 Jul 2010 17:13:15 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CCB88FC0A; Sat, 31 Jul 2010 17:13:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHDFeu042082; Sat, 31 Jul 2010 17:13:15 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHDE9m042079; Sat, 31 Jul 2010 17:13:14 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311713.o6VHDE9m042079@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 17:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210693 - in head/cddl: lib usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:13:15 -0000 Author: rpaulo Date: Sat Jul 31 17:13:14 2010 New Revision: 210693 URL: http://svn.freebsd.org/changeset/base/210693 Log: libdtrace, dtrace(1) and lockstat(1) are for i386 and amd64 only right now. Sponsored by: The FreeBSD Foundation Modified: head/cddl/lib/Makefile head/cddl/usr.sbin/Makefile Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Sat Jul 31 17:10:55 2010 (r210692) +++ head/cddl/lib/Makefile Sat Jul 31 17:13:14 2010 (r210693) @@ -5,7 +5,7 @@ SUBDIR= drti \ libavl \ libctf \ - libdtrace \ + ${_libdtrace} \ libnvpair \ libumem \ libuutil \ @@ -19,4 +19,8 @@ _libzpool= libzpool .endif .endif +.if ${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == i386 +_libdtrace= libdtrace +.endif + .include Modified: head/cddl/usr.sbin/Makefile ============================================================================== --- head/cddl/usr.sbin/Makefile Sat Jul 31 17:10:55 2010 (r210692) +++ head/cddl/usr.sbin/Makefile Sat Jul 31 17:13:14 2010 (r210693) @@ -2,8 +2,8 @@ .include -SUBDIR= dtrace \ - lockstat \ +SUBDIR= ${_dtrace} \ + ${_lockstat} \ ${_zdb} .if ${MK_ZFS} != "no" @@ -12,4 +12,9 @@ _zdb= zdb .endif .endif +.if ${MACHINE_ARCH} == amd64 || ${MACHINE_ARCH} == i386 +_dtrace= dtrace +_lockstat= lockstat +.endif + .include From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:14:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D097B106566B; Sat, 31 Jul 2010 17:14:54 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C144B8FC08; Sat, 31 Jul 2010 17:14:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHEsSP042509; Sat, 31 Jul 2010 17:14:54 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHEsxZ042507; Sat, 31 Jul 2010 17:14:54 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311714.o6VHEsxZ042507@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 17:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210694 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:14:54 -0000 Author: rpaulo Date: Sat Jul 31 17:14:54 2010 New Revision: 210694 URL: http://svn.freebsd.org/changeset/base/210694 Log: Revert SHLIB_MAJOR to 2. As discussed with kan@, since DTrace is the only consumer of libproc right now, there's no need for a major shlib bump. Modified: head/lib/libproc/Makefile Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Sat Jul 31 17:13:14 2010 (r210693) +++ head/lib/libproc/Makefile Sat Jul 31 17:14:54 2010 (r210694) @@ -13,7 +13,7 @@ INCS= libproc.h CFLAGS+= -I${.CURDIR} -SHLIB_MAJOR= 3 +SHLIB_MAJOR= 2 WITHOUT_MAN= From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:23:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6BA2106566B; Sat, 31 Jul 2010 17:23:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 969CA8FC12; Sat, 31 Jul 2010 17:23:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHNbZe044540; Sat, 31 Jul 2010 17:23:37 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHNbaf044538; Sat, 31 Jul 2010 17:23:37 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311723.o6VHNbaf044538@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 17:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210695 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:23:37 -0000 Author: rpaulo Date: Sat Jul 31 17:23:37 2010 New Revision: 210695 URL: http://svn.freebsd.org/changeset/base/210695 Log: proc_wait() was replaced by proc_wstatus(). Right now this call is useless because userland support is not working on HEAD, but this makes libdtrace compile again. Sponsored by: The FreeBSD Foundation Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sat Jul 31 17:14:54 2010 (r210694) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c Sat Jul 31 17:23:37 2010 (r210695) @@ -590,7 +590,7 @@ dt_proc_control(void *arg) continue; /* check dpr_quit and continue waiting */ #else /* Wait for the process to report status. */ - proc_wait(P); + proc_wstatus(P); #endif (void) pthread_mutex_lock(&dpr->dpr_lock); From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:41:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C9BF1065677; Sat, 31 Jul 2010 17:41:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CDA88FC16; Sat, 31 Jul 2010 17:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHfwKq048664; Sat, 31 Jul 2010 17:41:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHfwNT048662; Sat, 31 Jul 2010 17:41:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007311741.o6VHfwNT048662@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 31 Jul 2010 17:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210696 - head/bin/sleep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:41:58 -0000 Author: kib Date: Sat Jul 31 17:41:58 2010 New Revision: 210696 URL: http://svn.freebsd.org/changeset/base/210696 Log: Deal with proper format for printing time_t. Reported by: ache MFC after: 3 weeks Modified: head/bin/sleep/sleep.c Modified: head/bin/sleep/sleep.c ============================================================================== --- head/bin/sleep/sleep.c Sat Jul 31 17:23:37 2010 (r210695) +++ head/bin/sleep/sleep.c Sat Jul 31 17:41:58 2010 (r210696) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -131,9 +132,10 @@ main(int argc, char *argv[]) * Reporting does not bother with * fractions of a second... */ - warnx("about %ld second(s) left" - " out of the original %ld", - time_to_sleep.tv_sec, original); + warnx("about %jd second(s) left" + " out of the original %jd", + (intmax_t)time_to_sleep.tv_sec, + (intmax_t)original); report_requested = 0; } else break; From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:42:38 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA18F106566B; Sat, 31 Jul 2010 17:42:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 62D978FC1A; Sat, 31 Jul 2010 17:42:37 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6VHgXJc054252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 31 Jul 2010 20:42:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6VHgXVY091327; Sat, 31 Jul 2010 20:42:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6VHgXIc091326; Sat, 31 Jul 2010 20:42:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 31 Jul 2010 20:42:33 +0300 From: Kostik Belousov To: Andrey Chernov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20100731174233.GQ22295@deviant.kiev.zoral.com.ua> References: <201007311430.o6VEUBiU005395@svn.freebsd.org> <20100731165434.GA40375@nagual.pp.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dLxyWiplEfGRIOx4" Content-Disposition: inline In-Reply-To: <20100731165434.GA40375@nagual.pp.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r210679 - head/bin/sleep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:42:39 -0000 --dLxyWiplEfGRIOx4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 31, 2010 at 08:54:34PM +0400, Andrey Chernov wrote: > On Sat, Jul 31, 2010 at 02:30:11PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Jul 31 14:30:11 2010 > > New Revision: 210679 > > URL: http://svn.freebsd.org/changeset/base/210679 > >=20 > > Log: > > Report the time left for the sleep on SIGINFO. > > Be stricter in the checking of interval specification. >=20 > cc1: warnings being treated as errors > /usr/src/bin/sleep/sleep.c: In function 'main': > /usr/src/bin/sleep/sleep.c:136: warning: format '%ld' expects type 'long= =20 > int', but argument 2 has type 'time_t' Thanks, should be fixed in r210696. --dLxyWiplEfGRIOx4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxUYIgACgkQC3+MBN1Mb4ivKgCgh4RHInCqLV7v3q5KeLJQIEm7 OhsAn3WjVG3KjwpQWFLSAuwAO7PxIDkc =Y49G -----END PGP SIGNATURE----- --dLxyWiplEfGRIOx4-- From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 17:58:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5778106566C; Sat, 31 Jul 2010 17:58:44 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95A8D8FC20; Sat, 31 Jul 2010 17:58:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VHwiu9052440; Sat, 31 Jul 2010 17:58:44 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VHwijq052438; Sat, 31 Jul 2010 17:58:44 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007311758.o6VHwijq052438@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Jul 2010 17:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210697 - head/cddl/usr.sbin/lockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 17:58:44 -0000 Author: rpaulo Date: Sat Jul 31 17:58:44 2010 New Revision: 210697 URL: http://svn.freebsd.org/changeset/base/210697 Log: lockstat(1) now depends on libutil and librtld_db. Sponsored by: The FreeBSD Foundation Modified: head/cddl/usr.sbin/lockstat/Makefile Modified: head/cddl/usr.sbin/lockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/lockstat/Makefile Sat Jul 31 17:41:58 2010 (r210696) +++ head/cddl/usr.sbin/lockstat/Makefile Sat Jul 31 17:58:44 2010 (r210697) @@ -22,7 +22,10 @@ CFLAGS+= -DNEED_ERRLOC -g #YFLAGS+= -d -DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBRT} -LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lrt +DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ + ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBRT} ${LIBUTIL} \ + ${LIBRTLD_DB} +LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lrt -lutil \ + -lrtld_db .include From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 19:11:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E82541065670; Sat, 31 Jul 2010 19:11:38 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7B028FC1A; Sat, 31 Jul 2010 19:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VJBc7P068876; Sat, 31 Jul 2010 19:11:38 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VJBchp068874; Sat, 31 Jul 2010 19:11:38 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007311911.o6VJBchp068874@svn.freebsd.org> From: "Jayachandran C." Date: Sat, 31 Jul 2010 19:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210698 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 19:11:39 -0000 Author: jchandra Date: Sat Jul 31 19:11:38 2010 New Revision: 210698 URL: http://svn.freebsd.org/changeset/base/210698 Log: Use fuword32() to fetch instructions, this will work on both 32 and 64 bit compilation. Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Sat Jul 31 17:58:44 2010 (r210697) +++ head/sys/mips/mips/trap.c Sat Jul 31 19:11:38 2010 (r210698) @@ -820,7 +820,7 @@ dofault: va += sizeof(int); /* read break instruction */ - instr = fuword((caddr_t)va); + instr = fuword32((caddr_t)va); #if 0 printf("trap: %s (%d) breakpoint %x at %x: (adr %x ins %x)\n", p->p_comm, p->p_pid, instr, trapframe->pc, @@ -869,7 +869,7 @@ dofault: if (DELAYBRANCH(trapframe->cause)) va += sizeof(int); /* read break instruction */ - instr = fuword((caddr_t)va); + instr = fuword32((caddr_t)va); if (DELAYBRANCH(trapframe->cause)) { /* Check BD bit */ locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0, From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 19:13:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17ED61065673; Sat, 31 Jul 2010 19:13:09 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07B188FC1A; Sat, 31 Jul 2010 19:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VJD8rY069239; Sat, 31 Jul 2010 19:13:08 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VJD84N069237; Sat, 31 Jul 2010 19:13:08 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007311913.o6VJD84N069237@svn.freebsd.org> From: "Jayachandran C." Date: Sat, 31 Jul 2010 19:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210699 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 19:13:09 -0000 Author: jchandra Date: Sat Jul 31 19:13:08 2010 New Revision: 210699 URL: http://svn.freebsd.org/changeset/base/210699 Log: Use PTR_ADDU to change sp, so that it works for n64 too. Modified: head/sys/mips/mips/swtch.S Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Sat Jul 31 19:11:38 2010 (r210698) +++ head/sys/mips/mips/swtch.S Sat Jul 31 19:13:08 2010 (r210699) @@ -580,8 +580,8 @@ END(prepare_usermode) */ .globl _C_LABEL(sigcode) _C_LABEL(sigcode): - addu a0, sp, SIGF_UC # address of ucontext - li v0, SYS_sigreturn + PTR_ADDU a0, sp, SIGF_UC # address of ucontext + li v0, SYS_sigreturn # sigreturn (ucp) syscall break 0 # just in case sigreturn fails From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 19:25:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E7C81065672; Sat, 31 Jul 2010 19:25:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DEF88FC0C; Sat, 31 Jul 2010 19:25:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VJPp0q072003; Sat, 31 Jul 2010 19:25:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VJPps1072001; Sat, 31 Jul 2010 19:25:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007311925.o6VJPps1072001@svn.freebsd.org> From: Warner Losh Date: Sat, 31 Jul 2010 19:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210700 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 19:25:51 -0000 Author: imp Date: Sat Jul 31 19:25:51 2010 New Revision: 210700 URL: http://svn.freebsd.org/changeset/base/210700 Log: Adds the async option for journaled file systems (UFS + journaling) Submitted by: kris moore (kris at pcbsd org) Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Sat Jul 31 19:13:08 2010 (r210699) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Sat Jul 31 19:25:51 2010 (r210700) @@ -163,6 +163,14 @@ setup_fstab() # Unset EXT EXT="" + # Set mount options for file-systems + case $PARTFS in + UFS+J) MNTOPTS="rw,noatime,async" ;; + SWAP) MNTOPTS="sw" ;; + *) MNTOPTS="rw,noatime" ;; + esac + + # Figure out if we are using a glabel, or the raw name for this entry if [ ! -z "${PARTLABEL}" ] then @@ -212,9 +220,9 @@ setup_fstab() # Echo out the fstab entry now if [ "${PARTFS}" = "SWAP" ] then - echo "/dev/${DEVICE} none swap sw 0 0" >> ${FSTAB} + echo "/dev/${DEVICE} none swap ${MNTOPTS} 0 0" >> ${FSTAB} else - echo "/dev/${DEVICE} ${PARTMNT} ufs rw,noatime 1 1" >> ${FSTAB} + echo "/dev/${DEVICE} ${PARTMNT} ufs ${MNTOPTS} 1 1" >> ${FSTAB} fi fi # End of ZFS Check From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 19:27:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33C21106566B; Sat, 31 Jul 2010 19:27:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 091AB8FC18; Sat, 31 Jul 2010 19:27:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VJRhpb072479; Sat, 31 Jul 2010 19:27:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VJRhQU072477; Sat, 31 Jul 2010 19:27:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007311927.o6VJRhQU072477@svn.freebsd.org> From: Warner Losh Date: Sat, 31 Jul 2010 19:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210701 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 19:27:44 -0000 Author: imp Date: Sat Jul 31 19:27:43 2010 New Revision: 210701 URL: http://svn.freebsd.org/changeset/base/210701 Log: Fixes a bug when installing with a ZFS on root (/) and UFS /boot partition. Don't stamp the zfs boot-loader in this case. Submitted by: kris moore Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Sat Jul 31 19:25:51 2010 (r210700) +++ head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Sat Jul 31 19:27:43 2010 (r210701) @@ -61,6 +61,7 @@ setup_zfs_filesystem() # Check if we ended up with needing a zfs bootable partition if [ "${i}" = "/" -o "${i}" = "/boot" ] then + if [ "$HAVEBOOT" = "YES" ] ; then continue ; fi if [ "${PARTGEOM}" = "MBR" ] then # Lets stamp the proper ZFS boot loader @@ -129,6 +130,11 @@ setup_filesystems() rc_halt "sync" rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" rc_halt "sync" + + # Set flag that we've found a boot partition + if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then + HAVEBOOT="YES" + fi sleep 2 ;; UFS+S) echo_log "NEWFS: /dev/${PART} - ${PARTFS}" @@ -138,6 +144,10 @@ setup_filesystems() rc_halt "sync" rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" rc_halt "sync" + # Set flag that we've found a boot partition + if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then + HAVEBOOT="YES" + fi sleep 2 ;; UFS+J) echo_log "NEWFS: /dev/${PART} - ${PARTFS}" @@ -151,6 +161,10 @@ setup_filesystems() rc_halt "sync" rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal" rc_halt "sync" + # Set flag that we've found a boot partition + if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then + HAVEBOOT="YES" + fi sleep 2 ;; ZFS) echo_log "NEWFS: /dev/${PART} - ${PARTFS}" From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 21:02:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 197F81065674; Sat, 31 Jul 2010 21:02:25 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 0A76C8FC1A; Sat, 31 Jul 2010 21:02:23 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 9E04445CBA; Sat, 31 Jul 2010 23:02:21 +0200 (CEST) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id B844845685; Sat, 31 Jul 2010 23:02:16 +0200 (CEST) Date: Sat, 31 Jul 2010 23:02:10 +0200 From: Pawel Jakub Dawidek To: Warner Losh Message-ID: <20100731210210.GE1760@garage.freebsd.pl> References: <201007311925.o6VJPps1072001@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B0nZA57HJSoPbsHY" Content-Disposition: inline In-Reply-To: <201007311925.o6VJPps1072001@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, kris@pcbsd.org Subject: Re: svn commit: r210700 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 21:02:25 -0000 --B0nZA57HJSoPbsHY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 31, 2010 at 07:25:51PM +0000, Warner Losh wrote: > Author: imp > Date: Sat Jul 31 19:25:51 2010 > New Revision: 210700 > URL: http://svn.freebsd.org/changeset/base/210700 >=20 > Log: > Adds the async option for journaled file systems (UFS + journaling) > =20 > Submitted by: kris moore (kris at pcbsd org) Are you sure async is recommended for SU+J? It is for gjournal, but this is different story. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --B0nZA57HJSoPbsHY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkxUj1IACgkQForvXbEpPzQqrQCg4muj28MMk+mNelhdHd+iawYi W/kAoIJEUfvvL3YHNJupzNcU/NbwAFAm =wvYA -----END PGP SIGNATURE----- --B0nZA57HJSoPbsHY-- From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 21:09:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1FDA1065672; Sat, 31 Jul 2010 21:09:49 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF5E88FC16; Sat, 31 Jul 2010 21:09:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VL9nwu094747; Sat, 31 Jul 2010 21:09:49 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VL9ncJ094740; Sat, 31 Jul 2010 21:09:49 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201007312109.o6VL9ncJ094740@svn.freebsd.org> From: Joel Dahl Date: Sat, 31 Jul 2010 21:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210702 - in head: bin/ln sbin/camcontrol sbin/hastd sbin/ifconfig sbin/iscontrol sbin/sunlabel X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 21:09:49 -0000 Author: joel (doc committer) Date: Sat Jul 31 21:09:49 2010 New Revision: 210702 URL: http://svn.freebsd.org/changeset/base/210702 Log: Spelling fixes. Modified: head/bin/ln/ln.1 head/sbin/camcontrol/camcontrol.8 head/sbin/hastd/hast.conf.5 head/sbin/ifconfig/ifconfig.8 head/sbin/iscontrol/iscsi.conf.5 head/sbin/sunlabel/sunlabel.8 Modified: head/bin/ln/ln.1 ============================================================================== --- head/bin/ln/ln.1 Sat Jul 31 19:27:43 2010 (r210701) +++ head/bin/ln/ln.1 Sat Jul 31 21:09:49 2010 (r210702) @@ -229,7 +229,7 @@ The .Fl F option is .Fx -extention and should not be used in portable scripts. +extension and should not be used in portable scripts. .Sh SEE ALSO .Xr link 2 , .Xr lstat 2 , Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sat Jul 31 19:27:43 2010 (r210701) +++ head/sbin/camcontrol/camcontrol.8 Sat Jul 31 21:09:49 2010 (r210702) @@ -519,7 +519,7 @@ the command type. The command and data specification syntax is documented in .Xr cam_cdbparse 3 . -NOTE: If the CDB specified causes data to be transfered to or from the +NOTE: If the CDB specified causes data to be transferred to or from the SCSI device in question, you MUST specify either .Fl i or Modified: head/sbin/hastd/hast.conf.5 ============================================================================== --- head/sbin/hastd/hast.conf.5 Sat Jul 31 19:27:43 2010 (r210701) +++ head/sbin/hastd/hast.conf.5 Sat Jul 31 21:09:49 2010 (r210702) @@ -169,7 +169,7 @@ The only situation where some small amou the data is stored on primary node and sent to the secondary. Secondary node then acknowledges data receipt and primary reports success to an application. -However, it may happen that the seconderay goes down before the received +However, it may happen that the secondary goes down before the received data is really stored locally. Before secondary node returns, primary node dies entirely. When the secondary node comes back to life it becomes the new primary. Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sat Jul 31 19:27:43 2010 (r210701) +++ head/sbin/ifconfig/ifconfig.8 Sat Jul 31 21:09:49 2010 (r210702) @@ -616,7 +616,7 @@ Clear a flag .Cm accept_rtadv . .It Cm auto_linklocal Set a flag to perform automatic link-local address configuration when -the interface becomes avalilable. +the interface becomes available. .It Cm -auto_linklocal Clear a flag .Cm auto_linklocal . @@ -738,7 +738,7 @@ operation: .It Cm ampdu Enable sending and receiving AMPDU frames when using 802.11n (default). The 802.11n specification states a compliant station must be capable -of receiving AMPDU frames but transmision is optional. +of receiving AMPDU frames but transmission is optional. Use .Fl ampdu to disable all use of AMPDU with 802.11n. @@ -1944,7 +1944,7 @@ discover a path to us. Send broadcast path requests every two seconds and every node must reply with with a path reply even if it already has a path to this root mesh station, .It Cm RANN -Send broadcast root annoucement (RANN) frames. +Send broadcast root announcement (RANN) frames. Nodes on the mesh without a path to this root mesh station with try to discover a path to us. .El @@ -2260,7 +2260,7 @@ Another name for the .Fl tunnel parameter. .It Cm accept_rev_ethip_ver -Set a flag to acccept both correct EtherIP packets and ones +Set a flag to accept both correct EtherIP packets and ones with reversed version field. Enabled by default. This is for backward compatibility with .Fx 6.1 , Modified: head/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- head/sbin/iscontrol/iscsi.conf.5 Sat Jul 31 19:27:43 2010 (r210701) +++ head/sbin/iscontrol/iscsi.conf.5 Sat Jul 31 21:09:49 2010 (r210702) @@ -205,6 +205,6 @@ ISCSI RFC 3720 .\"Sh AUTHORS .Sh BUGS Some options have not been implemented, either they were found -to be unecessary, or not understood, this can change in the future. +to be unnecessary, or not understood, this can change in the future. .br The tags opening value is difficult to calculate, use wisely. Modified: head/sbin/sunlabel/sunlabel.8 ============================================================================== --- head/sbin/sunlabel/sunlabel.8 Sat Jul 31 19:27:43 2010 (r210701) +++ head/sbin/sunlabel/sunlabel.8 Sat Jul 31 21:09:49 2010 (r210702) @@ -97,7 +97,7 @@ The optional SVR4-compatible VTOC tag an by the .Fx kernel. -It is maintained solely for compatibilty with the +It is maintained solely for compatibility with the .Tn Solaris operating system that might share disks with .Fx From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 21:33:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2430106566B; Sat, 31 Jul 2010 21:33:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B69EF8FC08; Sat, 31 Jul 2010 21:33:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VLXI3W099875; Sat, 31 Jul 2010 21:33:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VLXISn099872; Sat, 31 Jul 2010 21:33:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201007312133.o6VLXISn099872@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 31 Jul 2010 21:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210703 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 21:33:19 -0000 Author: bz Date: Sat Jul 31 21:33:18 2010 New Revision: 210703 URL: http://svn.freebsd.org/changeset/base/210703 Log: Document the mandatory argument to the arptimer() and nd6_llinfo_timer() functions with a KASSERT(). Note: there is no need to return after panic. In the legacy IP case, only assign the arg after the check, in the IPv6 case, remove the extra checks for the table and interface as they have to be there unless we freed and forgot to cancel the timer. It doesn't matter anyway as we would panic on the NULL pointer deref immediately and the bug is elsewhere. This unifies the code of both address families to some extend. Reviewed by: rwatson MFC after: 6 days Modified: head/sys/netinet/if_ether.c head/sys/netinet6/nd6.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sat Jul 31 21:09:49 2010 (r210702) +++ head/sys/netinet/if_ether.c Sat Jul 31 21:33:18 2010 (r210703) @@ -163,12 +163,10 @@ static void arptimer(void *arg) { struct ifnet *ifp; - struct llentry *lle = (struct llentry *)arg; + struct llentry *lle; - if (lle == NULL) { - panic("%s: NULL entry!\n", __func__); - return; - } + KASSERT(arg != NULL, ("%s: arg NULL", __func__)); + lle = (struct llentry *)arg; ifp = lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); IF_AFDATA_LOCK(ifp); Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sat Jul 31 21:09:49 2010 (r210702) +++ head/sys/netinet6/nd6.c Sat Jul 31 21:33:18 2010 (r210703) @@ -446,14 +446,9 @@ nd6_llinfo_timer(void *arg) struct ifnet *ifp; struct nd_ifinfo *ndi = NULL; + KASSERT(arg != NULL, ("%s: arg NULL", __func__)); ln = (struct llentry *)arg; - if (ln == NULL) { - panic("%s: NULL entry!\n", __func__); - return; - } - - if ((ifp = ((ln->lle_tbl != NULL) ? ln->lle_tbl->llt_ifp : NULL)) == NULL) - panic("ln ifp == NULL"); + ifp = ln->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); From owner-svn-src-all@FreeBSD.ORG Sat Jul 31 21:35:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572F3106564A; Sat, 31 Jul 2010 21:35:16 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0DF8FC13; Sat, 31 Jul 2010 21:35:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6VLZG2Q000441; Sat, 31 Jul 2010 21:35:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6VLZG2p000437; Sat, 31 Jul 2010 21:35:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007312135.o6VLZG2p000437@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Jul 2010 21:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210704 - in head/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2010 21:35:16 -0000 Author: nwhitehorn Date: Sat Jul 31 21:35:15 2010 New Revision: 210704 URL: http://svn.freebsd.org/changeset/base/210704 Log: Improve hash coverage for kernel page table entries by modifying the kernel ESID -> VSID map function. This makes ZFS run stably on PowerPC under heavy loads (repeated simultaneous SVN checkouts and updates). Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/slb.c head/sys/powerpc/include/slb.h Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sat Jul 31 21:33:18 2010 (r210703) +++ head/sys/powerpc/aim/mmu_oea64.c Sat Jul 31 21:35:15 2010 (r210704) @@ -838,7 +838,7 @@ moea64_bootstrap_slb_prefault(vm_offset_ } entry.slbe = slbe; - entry.slbv = KERNEL_VSID(esid, large) << SLBV_VSID_SHIFT; + entry.slbv = KERNEL_VSID(esid) << SLBV_VSID_SHIFT; if (large) entry.slbv |= SLBV_L; Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Sat Jul 31 21:33:18 2010 (r210703) +++ head/sys/powerpc/aim/slb.c Sat Jul 31 21:35:15 2010 (r210704) @@ -104,17 +104,10 @@ uint64_t va_to_vsid(pmap_t pm, vm_offset_t va) { struct slb entry; - int large; /* Shortcut kernel case */ - if (pm == kernel_pmap) { - large = 0; - if (hw_direct_map && va < VM_MIN_KERNEL_ADDRESS && - mem_valid(va, 0) == 0) - large = 1; - - return (KERNEL_VSID((uintptr_t)va >> ADDR_SR_SHFT, large)); - } + if (pm == kernel_pmap) + return (KERNEL_VSID((uintptr_t)va >> ADDR_SR_SHFT)); /* * If there is no vsid for this VA, we need to add a new entry Modified: head/sys/powerpc/include/slb.h ============================================================================== --- head/sys/powerpc/include/slb.h Sat Jul 31 21:33:18 2010 (r210703) +++ head/sys/powerpc/include/slb.h Sat Jul 31 21:35:15 2010 (r210704) @@ -47,14 +47,15 @@ #define SLBV_VSID_MASK 0xfffffffffffff000UL /* Virtual segment ID mask */ #define SLBV_VSID_SHIFT 12 -#define KERNEL_VSID_BIT 0x0000001000000000UL /* Bit set in all kernel VSIDs */ - /* - * Shift large-page VSIDs one place left. At present, they are only used in the - * kernel direct map, and we already assume in the placement of KVA that the - * CPU cannot address more than 63 bits of memory. + * Make a predictable 1:1 map from ESIDs to VSIDs for the kernel. Hash table + * coverage is increased by swizzling the ESID and multiplying by a prime + * number (0x13bb). */ -#define KERNEL_VSID(esid, large) (((uint64_t)(esid) << (large ? 1 : 0)) | KERNEL_VSID_BIT) +#define KERNEL_VSID_BIT 0x0000001000000000UL /* Bit set in all kernel VSIDs */ +#define KERNEL_VSID(esid) ((((((uint64_t)esid << 8) | ((uint64_t)esid >> 28)) \ + * 0x13bbUL) & (KERNEL_VSID_BIT - 1)) | \ + KERNEL_VSID_BIT) #define SLBE_VALID 0x0000000008000000UL /* SLB entry valid */ #define SLBE_INDEX_MASK 0x0000000000000fffUL /* SLB index mask*/