From owner-svn-src-all@FreeBSD.ORG Sun May 2 00:44:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35A211065672; Sun, 2 May 2010 00:44:01 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB2C8FC0A; Sun, 2 May 2010 00:43:56 +0000 (UTC) Received: from [10.0.2.78] (ppp121-45-159-77.lns6.adl6.internode.on.net [121.45.159.77]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o420hgWv047886 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 2 May 2010 10:13:48 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <201005011636.o41GaFsK084343@svn.freebsd.org> Date: Sun, 2 May 2010 10:13:42 +0930 Content-Transfer-Encoding: 7bit Message-Id: <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> References: <201005011636.o41GaFsK084343@svn.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.1078) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207472 - in head/sys: conf dev/ath/ath_hal/ar5212 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, 02 May 2010 00:44:01 -0000 On 02/05/2010, at 2:06 AM, Warner Losh wrote: > Unfortunately, this condition is impossible to detect at runtime > without MIPS specific ifdefs. Rather than cast an overly-broad net > like Linux/OpenWRT dues (which enables this workaround all the time on > MIPS32 platforms), we put this option in the kernel for just the > affected machines. Sam didn't like this aspect of the patch when he > reviewed it, and I'd love to hear sane proposals on how to fix it :) Could you do TUNABLE_INT in the MIPS code and TUNABLE_INT_FETCH in ath_hal? -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-all@FreeBSD.ORG Sun May 2 01:25:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78AD6106566B; Sun, 2 May 2010 01:25:03 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 692768FC12; Sun, 2 May 2010 01:25: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 o421P3HY004273; Sun, 2 May 2010 01:25:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o421P3NS004271; Sun, 2 May 2010 01:25:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005020125.o421P3NS004271@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 01:25: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: r207487 - 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: Sun, 02 May 2010 01:25:03 -0000 Author: alc Date: Sun May 2 01:25:03 2010 New Revision: 207487 URL: http://svn.freebsd.org/changeset/base/207487 Log: Correct an error of omission in r206819. If VMFS_TLB_ALIGNED_SPACE is specified to vm_map_find(), then retry the vm_map_findspace() if vm_map_insert() fails because the aligned space is already partly used. Reported by: Neel Natu Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat May 1 23:25:53 2010 (r207486) +++ head/sys/vm/vm_map.c Sun May 2 01:25:03 2010 (r207487) @@ -1412,7 +1412,11 @@ vm_map_find(vm_map_t map, vm_object_t ob } result = vm_map_insert(map, object, offset, start, start + length, prot, max, cow); - } while (result == KERN_NO_SPACE && find_space == VMFS_ALIGNED_SPACE); + } while (result == KERN_NO_SPACE && (find_space == VMFS_ALIGNED_SPACE +#ifdef VMFS_TLB_ALIGNED_SPACE + || find_space == VMFS_TLB_ALIGNED_SPACE +#endif + )); vm_map_unlock(map); return (result); } From owner-svn-src-all@FreeBSD.ORG Sun May 2 01:51:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A787106566B; Sun, 2 May 2010 01:51:11 +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 4AABD8FC18; Sun, 2 May 2010 01:51:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o421li6n040425; Sat, 1 May 2010 19:47:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 01 May 2010 19:47:58 -0600 (MDT) Message-Id: <20100501.194758.49280345204940330.imp@bsdimp.com> To: doconnor@gsoft.com.au From: "M. Warner Losh" In-Reply-To: <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> References: <201005011636.o41GaFsK084343@svn.freebsd.org> <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> 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 Subject: Re: svn commit: r207472 - in head/sys: conf dev/ath/ath_hal/ar5212 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, 02 May 2010 01:51:11 -0000 In message: <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> "Daniel O'Connor" writes: : : On 02/05/2010, at 2:06 AM, Warner Losh wrote: : > Unfortunately, this condition is impossible to detect at runtime : > without MIPS specific ifdefs. Rather than cast an overly-broad net : > like Linux/OpenWRT dues (which enables this workaround all the time on : > MIPS32 platforms), we put this option in the kernel for just the : > affected machines. Sam didn't like this aspect of the patch when he : > reviewed it, and I'd love to hear sane proposals on how to fix it :) : : Could you do TUNABLE_INT in the MIPS code and TUNABLE_INT_FETCH in ath_hal? How is that better than a kernel option? The only place this would ever happen is atheros AR71xx SoC. It isn't like some of the Atheros 71xx SoCs would have it and some wouldn't. And besides, kenv has to be compiled into the kernel on MIPS these days... The only thing close to an idea I've had is to add: __weak int ath_needs_dma_war() { return 0; } and have this in the mips: int needs_ath_dma_war = 0; __weak int ath_needs_dma_war() { return needs_ath_dma_war; } and set it to 1 in the AR71xx CPU initialization. But that seemed kind of lame... Warner From owner-svn-src-all@FreeBSD.ORG Sun May 2 03:19:17 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2676D1065672; Sun, 2 May 2010 03:19:17 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 916038FC14; Sun, 2 May 2010 03:19:16 +0000 (UTC) Received: from [10.0.2.78] (ppp121-45-159-77.lns6.adl6.internode.on.net [121.45.159.77]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o423Iq1Y054159 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 2 May 2010 12:48:59 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <20100501.194758.49280345204940330.imp@bsdimp.com> Date: Sun, 2 May 2010 12:48:52 +0930 Content-Transfer-Encoding: quoted-printable Message-Id: <383911EE-5844-4673-BAA8-796DDEBC5D5C@gsoft.com.au> References: <201005011636.o41GaFsK084343@svn.freebsd.org> <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> <20100501.194758.49280345204940330.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1078) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r207472 - in head/sys: conf dev/ath/ath_hal/ar5212 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, 02 May 2010 03:19:17 -0000 On 02/05/2010, at 11:17 AM, M. Warner Losh wrote: > : Could you do TUNABLE_INT in the MIPS code and TUNABLE_INT_FETCH in = ath_hal? >=20 > How is that better than a kernel option? The only place this would > ever happen is atheros AR71xx SoC. It isn't like some of the Atheros > 71xx SoCs would have it and some wouldn't. OK. > And besides, kenv has to be compiled into the kernel on MIPS these > days... Ahh that makes a tunable fairly useless then :) > The only thing close to an idea I've had is to add: >=20 > __weak int > ath_needs_dma_war() > { > return 0; > } >=20 > and have this in the mips: >=20 > int needs_ath_dma_war =3D 0; > __weak int ath_needs_dma_war() > { > return needs_ath_dma_war; > } >=20 > and set it to 1 in the AR71xx CPU initialization. But that seemed > kind of lame... It does have the advantage of not requiring the user to do anything = which is nice even if it's clunky looking. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-all@FreeBSD.ORG Sun May 2 04:16:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1E10106564A; Sun, 2 May 2010 04:16:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A29A98FC1F; Sun, 2 May 2010 04: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 o424Gd4U042018; Sun, 2 May 2010 04:16:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o424GdVQ042016; Sun, 2 May 2010 04:16:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005020416.o424GdVQ042016@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 04: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: r207490 - head/sys/cam 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, 02 May 2010 04:16:39 -0000 Author: mav Date: Sun May 2 04:16:39 2010 New Revision: 207490 URL: http://svn.freebsd.org/changeset/base/207490 Log: Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in usual operation, but required in some conditions to make queue running after being shrinked. MFC after: 3 days Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun May 2 03:28:29 2010 (r207489) +++ head/sys/cam/cam_xpt.c Sun May 2 04:16:39 2010 (r207490) @@ -4874,6 +4874,8 @@ camisr_runqueue(void *V_queue) if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 && (--dev->tag_delay_count == 0)) xpt_start_tags(ccb_h->path); + if (!device_is_send_queued(dev)) + xpt_schedule_dev_sendq(ccb_h->path->bus, dev); } if (ccb_h->status & CAM_RELEASE_SIMQ) { From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:14:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E487106566B; Sun, 2 May 2010 06:14:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0138FC13; Sun, 2 May 2010 06:14: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 o426EaXd067657; Sun, 2 May 2010 06:14:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426EaXY067653; Sun, 2 May 2010 06:14:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020614.o426EaXY067653@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:14: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: r207491 - stable/8/usr.sbin/config 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, 02 May 2010 06:14:36 -0000 Author: imp Date: Sun May 2 06:14:36 2010 New Revision: 207491 URL: http://svn.freebsd.org/changeset/base/207491 Log: MFC r207260: Move checking the version up from Makefile generation to just after we've parsed the config file. Makefile generation is too late if we've introduce changes to the syntax of the metafiles to warn about version skew, since we have to try to parse them and we get an parse error that's rather baffling to the user rather than a 'your config is too old, upgrade' which we should get. We have to defer doing it until after we've read the user's config file because we define machinename there. The version required to compile the kernel is encoded in Makefile.machinename. There's no real reason for this to be the case, but changing it now would introduce some logistical issues that I'd rather avoid for the moment. I intend to revisit this if we're still using config in FreeBSD 10. This also means that we cannot introduce any config metafile changes that result in a syntax error or other error for the user until 9.0 is released. Otherwise, we break the upgrade path, or at least reduce the usefulness of the error messages we generate. # This implies that the config file option mapping will need to be redone. Modified: stable/8/usr.sbin/config/config.h stable/8/usr.sbin/config/main.c stable/8/usr.sbin/config/mkmakefile.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/config.h ============================================================================== --- stable/8/usr.sbin/config/config.h Sun May 2 04:16:39 2010 (r207490) +++ stable/8/usr.sbin/config/config.h Sun May 2 06:14:36 2010 (r207491) @@ -179,6 +179,7 @@ void makehints(void); void headers(void); void cfgfile_add(const char *); void cfgfile_removeall(void); +FILE *open_makefile_template(void); extern STAILQ_HEAD(device_head, device) dtab; Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Sun May 2 04:16:39 2010 (r207490) +++ stable/8/usr.sbin/config/main.c Sun May 2 06:14:36 2010 (r207491) @@ -90,6 +90,7 @@ static void get_srcdir(void); static void usage(void); static void cleanheaders(char *); static void kernconfdump(const char *); +static void checkversion(void); struct hdr_list { char *h_name; @@ -204,6 +205,7 @@ main(int argc, char **argv) printf("cpu type must be specified\n"); exit(1); } + checkversion(); /* * make symbolic links in compilation directory @@ -721,3 +723,41 @@ kernconfdump(const char *file) } fclose(fp); } + +static void +badversion(int versreq) +{ + fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); + fprintf(stderr, "config version = %d, ", CONFIGVERS); + fprintf(stderr, "version required = %d\n\n", versreq); + fprintf(stderr, "Make sure that /usr/src/usr.sbin/config is in sync\n"); + fprintf(stderr, "with your /usr/src/sys and install a new config binary\n"); + fprintf(stderr, "before trying this again.\n\n"); + fprintf(stderr, "If running the new config fails check your config\n"); + fprintf(stderr, "file against the GENERIC or LINT config files for\n"); + fprintf(stderr, "changes in config syntax, or option/device naming\n"); + fprintf(stderr, "conventions\n\n"); + exit(1); +} + +static void +checkversion(void) +{ + FILE *ifp; + char line[BUFSIZ]; + int versreq; + + ifp = open_makefile_template(); + while (fgets(line, BUFSIZ, ifp) != 0) { + if (*line != '%') + continue; + if (strncmp(line, "%VERSREQ=", 9) != 0) + continue; + versreq = atoi(line + 9); + if (MAJOR_VERS(versreq) == MAJOR_VERS(CONFIGVERS) && + versreq <= CONFIGVERS) + continue; + badversion(versreq); + } + fclose(ifp); +} Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Sun May 2 04:16:39 2010 (r207490) +++ stable/8/usr.sbin/config/mkmakefile.c Sun May 2 06:14:36 2010 (r207491) @@ -105,17 +105,14 @@ new_fent(void) } /* - * Build the makefile from the skeleton + * Open the correct Makefile and return it, or error out. */ -void -makefile(void) +FILE * +open_makefile_template(void) { - FILE *ifp, *ofp; + FILE *ifp; char line[BUFSIZ]; - struct opt *op, *t; - int versreq; - read_files(); snprintf(line, sizeof(line), "../../conf/Makefile.%s", machinename); ifp = fopen(line, "r"); if (ifp == 0) { @@ -124,7 +121,21 @@ makefile(void) } if (ifp == 0) err(1, "%s", line); + return (ifp); +} +/* + * Build the makefile from the skeleton + */ +void +makefile(void) +{ + FILE *ifp, *ofp; + char line[BUFSIZ]; + struct opt *op, *t; + + read_files(); + ifp = open_makefile_template(); ofp = fopen(path("Makefile.new"), "w"); if (ofp == 0) err(1, "%s", path("Makefile.new")); @@ -156,23 +167,9 @@ makefile(void) do_rules(ofp); else if (eq(line, "%CLEAN\n")) do_clean(ofp); - else if (strncmp(line, "%VERSREQ=", sizeof("%VERSREQ=") - 1) == 0) { - versreq = atoi(line + sizeof("%VERSREQ=") - 1); - if (MAJOR_VERS(versreq) != MAJOR_VERS(CONFIGVERS) || - versreq > CONFIGVERS) { - fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); - fprintf(stderr, "config version = %d, ", CONFIGVERS); - fprintf(stderr, "version required = %d\n\n", versreq); - fprintf(stderr, "Make sure that /usr/src/usr.sbin/config is in sync\n"); - fprintf(stderr, "with your /usr/src/sys and install a new config binary\n"); - fprintf(stderr, "before trying this again.\n\n"); - fprintf(stderr, "If running the new config fails check your config\n"); - fprintf(stderr, "file against the GENERIC or LINT config files for\n"); - fprintf(stderr, "changes in config syntax, or option/device naming\n"); - fprintf(stderr, "conventions\n\n"); - exit(1); - } - } else + else if (strncmp(line, "%VERSREQ=", 9) == 0) + line[0] = '\0'; /* handled elsewhere */ + else fprintf(stderr, "Unknown %% construct in generic makefile: %s", line); From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:18:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81CE4106566C; Sun, 2 May 2010 06:18:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 706DE8FC15; Sun, 2 May 2010 06:18: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 o426I8KR068503; Sun, 2 May 2010 06:18:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426I8BH068500; Sun, 2 May 2010 06:18:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020618.o426I8BH068500@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:18: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: r207492 - stable/8/usr.sbin/config 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, 02 May 2010 06:18:08 -0000 Author: imp Date: Sun May 2 06:18:08 2010 New Revision: 207492 URL: http://svn.freebsd.org/changeset/base/207492 Log: MFC r207263: Redo how we add compat options so as to be compatible with old versions of config. Remove support for the syntax OLD = NEW form the options file, and instead have a new file $S/conf/options-compat. This file will be parsed as OLD NEW on each line. Bump version of config. Since nothing in -current ever used this, there's no hazards for current users, so I'm not bumping the version in the Makefiles.$MACHINE. No need, really, for this version bump in -current, but this was introduced into -stable before I realized the version check was ineffective there, so the verison bump doesn't hurt here and keeps the two branches in sync, versionwise, after the MFC. Modified: stable/8/usr.sbin/config/configvers.h stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/configvers.h ============================================================================== --- stable/8/usr.sbin/config/configvers.h Sun May 2 06:14:36 2010 (r207491) +++ stable/8/usr.sbin/config/configvers.h Sun May 2 06:18:08 2010 (r207492) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600008 +#define CONFIGVERS 600009 #define MAJOR_VERS(x) ((x) / 100000) Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:14:36 2010 (r207491) +++ stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:18:08 2010 (r207492) @@ -166,7 +166,7 @@ do_option(char *name) fprintf(outf, "#define %s %s\n", name, value); } /* else empty file */ - (void) fclose(outf); + (void)fclose(outf); return; } basefile = ""; @@ -225,7 +225,7 @@ do_option(char *name) if (cp == (char *)EOF) break; } - (void) fclose(inf); + (void)fclose(inf); if (!tidy && ((value == NULL && oldvalue == NULL) || (value && oldvalue && eq(value, oldvalue)))) { while (!SLIST_EMPTY(&op_head)) { @@ -263,7 +263,7 @@ do_option(char *name) free(op->op_value); free(op); } - (void) fclose(outf); + (void)fclose(outf); } /* @@ -277,7 +277,7 @@ tooption(char *name) struct opt_list *po; /* "cannot happen"? the otab list should be complete.. */ - (void) strlcpy(nbuf, "options.h", sizeof(nbuf)); + (void)strlcpy(nbuf, "options.h", sizeof(nbuf)); SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, name)) { @@ -286,78 +286,30 @@ tooption(char *name) } } - (void) strlcpy(hbuf, path(nbuf), sizeof(hbuf)); + (void)strlcpy(hbuf, path(nbuf), sizeof(hbuf)); return (hbuf); } -/* - * read the options and options. files - */ + static void -read_options(void) +insert_option(char *this, char *val, int flags) { - FILE *fp; - char fname[MAXPATHLEN]; - char *wd, *this, *val; struct opt_list *po; - int first = 1; - char genopt[MAXPATHLEN]; - int flags = 0; - SLIST_INIT(&otab); - (void) snprintf(fname, sizeof(fname), "../../conf/options"); -openit: - fp = fopen(fname, "r"); - if (fp == 0) { - return; - } -next: - flags = 0; - wd = get_word(fp); - if (wd == (char *)EOF) { - (void) fclose(fp); - if (first == 1) { - first++; - (void) snprintf(fname, sizeof fname, "../../conf/options.%s", machinename); - fp = fopen(fname, "r"); - if (fp != 0) - goto next; - (void) snprintf(fname, sizeof fname, "options.%s", machinename); - goto openit; - } - return; - } - if (wd == 0) - goto next; - if (wd[0] == '#') - { - while (((wd = get_word(fp)) != (char *)EOF) && wd) - ; - goto next; - } - this = ns(wd); - val = get_word(fp); - if (val == (char *)EOF) - return; - if (val == 0) { - char *s = ns(this); - (void) snprintf(genopt, sizeof(genopt), "opt_%s.h", lower(s)); - val = genopt; - free(s); - } else if (eq(val, "=")) { - val = get_word(fp); - if (val == (char *)EOF) { - printf("%s: unexpected end of file\n", fname); - exit(1); - } - if (val == 0) { - printf("%s: Expected a right hand side at %s\n", fname, - this); - exit(1); - } - flags |= OL_ALIAS; - } - val = ns(val); + po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); + po->o_name = this; + po->o_file = val; + po->o_flags = flags; + SLIST_INSERT_HEAD(&otab, po, o_next); +} + + +static void +check_duplicate(const char *fname, const char *this) +{ + struct opt_list *po; SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { @@ -366,16 +318,67 @@ next: exit(1); } } - - po = (struct opt_list *) calloc(1, sizeof *po); - if (po == NULL) - err(EXIT_FAILURE, "calloc"); - po->o_name = this; - po->o_file = val; - po->o_flags = flags; - SLIST_INSERT_HEAD(&otab, po, o_next); +} + +static int +read_option_file(const char *fname, int flags) +{ + FILE *fp; + char *wd, *this, *val; + char genopt[MAXPATHLEN]; - goto next; + fp = fopen(fname, "r"); + if (fp == 0) + return (0); + while ((wd = get_word(fp)) != (char *)EOF) { + if (wd == 0) + continue; + if (wd[0] == '#') { + while (((wd = get_word(fp)) != (char *)EOF) && wd) + continue; + continue; + } + this = ns(wd); + val = get_word(fp); + if (val == (char *)EOF) + return (1); + if (val == 0) { + if (flags) { + printf("%s: compat file requires two words " + "per line at %s\n", fname, this); + exit(1); + } + char *s = ns(this); + (void)snprintf(genopt, sizeof(genopt), "opt_%s.h", + lower(s)); + val = genopt; + free(s); + } + val = ns(val); + check_duplicate(fname, this); + insert_option(this, val, flags); + } + (void)fclose(fp); + return (1); +} + +/* + * read the options and options. files + */ +static void +read_options(void) +{ + char fname[MAXPATHLEN]; + + SLIST_INIT(&otab); + read_option_file("../../conf/options", 0); + (void)snprintf(fname, sizeof fname, "../../conf/options.%s", + machinename); + if (!read_option_file(fname, 0)) { + (void)snprintf(fname, sizeof fname, "options.%s", machinename); + read_option_file(fname, 0); + } + read_option_file("../../conf/options-compat", OL_ALIAS); } static char * From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:18:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 194B3106566B; Sun, 2 May 2010 06:18:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E39A88FC0C; Sun, 2 May 2010 06:18: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 o426Ivb9068713; Sun, 2 May 2010 06:18:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426Ivm7068711; Sun, 2 May 2010 06:18:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020618.o426Ivm7068711@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:18: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: r207493 - stable/8/usr.sbin/config 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, 02 May 2010 06:18:58 -0000 Author: imp Date: Sun May 2 06:18:57 2010 New Revision: 207493 URL: http://svn.freebsd.org/changeset/base/207493 Log: MFC r207265: Require the option that's mapped be listed in the options file. This will allow people with old config options to either have it just work (if config is new enough), or get a version error (if their config is about 7.0 or newer) rather than getting a cryptic error about duplicated options in the options file, or getting an error about an unknown option, at which point they'd update their config file only to learn they need a new config, only to learn they didn't really need to update their config file... All this because our version checking was in the wrong place for the past decade... # hopefully this is the last change, and we'll be able to config with an # 8.0 GENERIC file on stable/8 after I merge this change and add the # compat options. Modified: stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:18:08 2010 (r207492) +++ stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:18:57 2010 (r207493) @@ -292,32 +292,49 @@ tooption(char *name) static void -insert_option(char *this, char *val, int flags) +check_duplicate(const char *fname, const char *this) { struct opt_list *po; + SLIST_FOREACH(po, &otab, o_next) { + if (eq(po->o_name, this)) { + printf("%s: Duplicate option %s.\n", + fname, this); + exit(1); + } + } +} + +static void +insert_option(const char *fname, char *this, char *val) +{ + struct opt_list *po; + + check_duplicate(fname, this); po = (struct opt_list *) calloc(1, sizeof *po); if (po == NULL) err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; - po->o_flags = flags; + po->o_flags = 0; SLIST_INSERT_HEAD(&otab, po, o_next); } - static void -check_duplicate(const char *fname, const char *this) +update_option(const char *this, char *val, int flags) { struct opt_list *po; SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { - printf("%s: Duplicate option %s.\n", - fname, this); - exit(1); + free(po->o_file); + po->o_file = val; + po->o_flags = flags; + return; } } + printf("Compat option %s not listed in options file.\n", this); + exit(1); } static int @@ -355,8 +372,10 @@ read_option_file(const char *fname, int free(s); } val = ns(val); - check_duplicate(fname, this); - insert_option(this, val, flags); + if (flags == 0) + insert_option(fname, this, val); + else + update_option(this, val, flags); } (void)fclose(fp); return (1); From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:20:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72359106566C; Sun, 2 May 2010 06:20:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 617418FC0C; Sun, 2 May 2010 06:20: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 o426KgT3069149; Sun, 2 May 2010 06:20:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426Kg0a069143; Sun, 2 May 2010 06:20:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020620.o426Kg0a069143@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:20:42 +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: r207494 - in stable/8/sys: amd64/conf 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, 02 May 2010 06:20:42 -0000 Author: imp Date: Sun May 2 06:20:42 2010 New Revision: 207494 URL: http://svn.freebsd.org/changeset/base/207494 Log: Move to the new way of specifying compat options. The backs out the FOO = BAR form, in favor of listing the mapping in a separate file for more compatibility with older versions of config. Modified: stable/8/sys/amd64/conf/GENERIC stable/8/sys/conf/Makefile.amd64 stable/8/sys/conf/Makefile.ia64 stable/8/sys/conf/options.amd64 stable/8/sys/conf/options.ia64 Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/amd64/conf/GENERIC Sun May 2 06:20:42 2010 (r207494) @@ -54,7 +54,8 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -options COMPAT_FREEBSD32 # Compatible with i386 binaries +#options COMPAT_FREEBSD32 # Compatible with i386 binaries +options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 Modified: stable/8/sys/conf/Makefile.amd64 ============================================================================== --- stable/8/sys/conf/Makefile.amd64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/Makefile.amd64 Sun May 2 06:20:42 2010 (r207494) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600004 +%VERSREQ= 600009 STD8X16FONT?= iso Modified: stable/8/sys/conf/Makefile.ia64 ============================================================================== --- stable/8/sys/conf/Makefile.ia64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/Makefile.ia64 Sun May 2 06:20:42 2010 (r207494) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600004 +%VERSREQ= 600008 STD8X16FONT?= iso Modified: stable/8/sys/conf/options.amd64 ============================================================================== --- stable/8/sys/conf/options.amd64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/options.amd64 Sun May 2 06:20:42 2010 (r207494) @@ -11,7 +11,7 @@ MP_WATCHDOG # Options for emulators. These should only be used at config time, so # they are handled like options for static filesystems # (see src/sys/conf/options), except for broken debugging options. -COMPAT_IA32 = COMPAT_FREEBSD32 +COMPAT_IA32 opt_dontuse.h COMPAT_FREEBSD32 opt_compat.h #IBCS2 opt_dontuse.h #COMPAT_LINUX opt_dontuse.h Modified: stable/8/sys/conf/options.ia64 ============================================================================== --- stable/8/sys/conf/options.ia64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/options.ia64 Sun May 2 06:20:42 2010 (r207494) @@ -9,7 +9,7 @@ LOG2_PAGE_SIZE opt_global.h UWX_TRACE_ENABLE opt_global.h -COMPAT_IA32 = COMPAT_FREEBSD32 +COMPAT_IA32 opt_dontuse.h COMPAT_FREEBSD32 opt_compat.h EXCEPTION_TRACING opt_xtrace.h From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:23:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 075301065673; Sun, 2 May 2010 06:23:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D235B8FC0C; Sun, 2 May 2010 06:23: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 o426NFCm069763; Sun, 2 May 2010 06:23:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426NFAs069761; Sun, 2 May 2010 06:23:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020623.o426NFAs069761@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:23: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: r207495 - stable/8/sys/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, 02 May 2010 06:23:16 -0000 Author: imp Date: Sun May 2 06:23:15 2010 New Revision: 207495 URL: http://svn.freebsd.org/changeset/base/207495 Log: Ooops. Bump the version to 600009, not 600008. Modified: stable/8/sys/conf/Makefile.ia64 Modified: stable/8/sys/conf/Makefile.ia64 ============================================================================== --- stable/8/sys/conf/Makefile.ia64 Sun May 2 06:20:42 2010 (r207494) +++ stable/8/sys/conf/Makefile.ia64 Sun May 2 06:23:15 2010 (r207495) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600008 +%VERSREQ= 600009 STD8X16FONT?= iso From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:24:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 069E51065688; Sun, 2 May 2010 06:24:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EAC418FC0A; Sun, 2 May 2010 06:24: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 o426OHXh070038; Sun, 2 May 2010 06:24:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426OHwx070036; Sun, 2 May 2010 06:24:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020624.o426OHwx070036@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:24: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: r207496 - stable/8/sys/amd64/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, 02 May 2010 06:24:18 -0000 Author: imp Date: Sun May 2 06:24:17 2010 New Revision: 207496 URL: http://svn.freebsd.org/changeset/base/207496 Log: Revert 207494: it was only for testing purposes. Modified: stable/8/sys/amd64/conf/GENERIC Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Sun May 2 06:23:15 2010 (r207495) +++ stable/8/sys/amd64/conf/GENERIC Sun May 2 06:24:17 2010 (r207496) @@ -54,8 +54,7 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -#options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_IA32 # Compatible with i386 binaries +options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 From owner-svn-src-all@FreeBSD.ORG Sun May 2 06:34:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55225106564A; Sun, 2 May 2010 06:34:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44A058FC0A; Sun, 2 May 2010 06:34: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 o426YDrg072239; Sun, 2 May 2010 06:34:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426YDLB072237; Sun, 2 May 2010 06:34:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020634.o426YDLB072237@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:34:13 +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: r207497 - 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, 02 May 2010 06:34:13 -0000 Author: imp Date: Sun May 2 06:34:13 2010 New Revision: 207497 URL: http://svn.freebsd.org/changeset/base/207497 Log: Comment on new config version that's now required for amd64 and ia64. Comment on the confusing error message from Apr 17th-May 2nd generated by config(8) as well. Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Sun May 2 06:24:17 2010 (r207496) +++ stable/8/UPDATING Sun May 2 06:34:13 2010 (r207497) @@ -15,6 +15,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100502: + The config(8) command has been updated to maintain compatibility + with config files from 8.0-RELEASE. You will need a new version + of config to build kernels (this version can be used from 8.0-RELEASE + forward). The buildworld target will generate it, so following + the instructions in this file for updating will work glitch-free. + Merely doing a make buildkernel without first doing a make buildworld + (or kernel-toolchain), or attempting to build a kernel using + traidtional methods will generate a config version warning, indicating + you should update. + 20100408: The rc.firewall and rc.firewall6 were unified, and rc.firewall6 and rc.d/ip6fw were removed. @@ -28,6 +39,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. The meanings correspond to the relevant IPv4 variables. +20100417: + COMPAT_IA32 has been added as an alias for COMPAT_FREEBDS32. A new + version of config(8) is required. The error message when you hit this + condition is confusing (COMPAT_FREEBSD32 duplicate option), when it + should really say "your config is too old to compile this new kernel." + 20100406: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel From owner-svn-src-all@FreeBSD.ORG Sun May 2 11:36:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31936106566B; Sun, 2 May 2010 11:36:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 217DE8FC13; Sun, 2 May 2010 11:36: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 o42BaSAo045691; Sun, 2 May 2010 11:36:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42BaSKm045688; Sun, 2 May 2010 11:36:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021136.o42BaSKm045688@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 11:36: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: r207498 - head/sbin/camcontrol 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, 02 May 2010 11:36:28 -0000 Author: mav Date: Sun May 2 11:36:27 2010 New Revision: 207498 URL: http://svn.freebsd.org/changeset/base/207498 Log: Add -d and -f arguments to `camcontrol cmd`, to execute DMA ATA commands. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun May 2 06:34:13 2010 (r207497) +++ head/sbin/camcontrol/camcontrol.8 Sun May 2 11:36:27 2010 (r207498) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2010 +.Dd May 2, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -123,6 +123,8 @@ .Op generic args .Aq Fl a Ar cmd Op args .Aq Fl c Ar cmd Op args +.Op Fl d +.Op Fl f .Op Fl i Ar len Ar fmt .Bk -words .Op Fl o Ar len Ar fmt Op args @@ -530,6 +532,10 @@ lba_high_exp, features_exp, sector_count .It Fl c Ar cmd Op args This specifies the SCSI CDB. SCSI CDBs may be 6, 10, 12 or 16 bytes. +.It Fl d +Specifies DMA protocol to be used for ATA command. +.It Fl f +Specifies FPDMA (NCQ) protocol to be used for ATA command. .It Fl i Ar len Ar fmt This specifies the amount of data to read, and how it should be displayed. If the format is Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun May 2 06:34:13 2010 (r207497) +++ head/sbin/camcontrol/camcontrol.c Sun May 2 11:36:27 2010 (r207498) @@ -123,7 +123,7 @@ struct camcontrol_opts { }; #ifndef MINIMALISTIC -static const char scsicmd_opts[] = "a:c:i:o:r"; +static const char scsicmd_opts[] = "a:c:dfi:o:r"; static const char readdefect_opts[] = "f:GP"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; #endif @@ -2184,6 +2184,8 @@ scsicmd(struct cam_device *device, int a int c, data_bytes = 0; int cdb_len = 0; int atacmd_len = 0; + int dmacmd = 0; + int fpdmacmd = 0; int need_res = 0; char *datastr = NULL, *tstr, *resstr = NULL; int error = 0; @@ -2246,6 +2248,12 @@ scsicmd(struct cam_device *device, int a */ optind += hook.got; break; + case 'd': + dmacmd = 1; + break; + case 'f': + fpdmacmd = 1; + break; case 'i': if (arglist & CAM_ARG_CMD_OUT) { warnx("command must either be " @@ -2422,6 +2430,10 @@ scsicmd(struct cam_device *device, int a bcopy(atacmd, &ccb->ataio.cmd.command, atacmd_len); if (need_res) ccb->ataio.cmd.flags |= CAM_ATAIO_NEEDRESULT; + if (dmacmd) + ccb->ataio.cmd.flags |= CAM_ATAIO_DMA; + if (fpdmacmd) + ccb->ataio.cmd.flags |= CAM_ATAIO_FPDMA; cam_fill_ataio(&ccb->ataio, /*retries*/ retry_count, @@ -4353,7 +4365,7 @@ usage(int verbose) " [-P pagectl][-e | -b][-d]\n" " camcontrol cmd [dev_id][generic args]\n" " <-a cmd [args] | -c cmd [args]>\n" -" [-i len fmt|-o len fmt [args]] [-r fmt]\n" +" [-d] [-f] [-i len fmt|-o len fmt [args]] [-r fmt]\n" " camcontrol debug [-I][-P][-T][-S][-X][-c]\n" " \n" " camcontrol tags [dev_id][generic args] [-N tags] [-q] [-v]\n" From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:07:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4760106566C; Sun, 2 May 2010 12:07:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 928D78FC17; Sun, 2 May 2010 12:07: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 o42C7l0R052551; Sun, 2 May 2010 12:07:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42C7l1Y052542; Sun, 2 May 2010 12:07:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021207.o42C7l1Y052542@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:07: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: r207499 - in head: sbin/camcontrol sys/cam sys/cam/ata sys/dev/ahci sys/dev/siis 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, 02 May 2010 12:07:47 -0000 Author: mav Date: Sun May 2 12:07:47 2010 New Revision: 207499 URL: http://svn.freebsd.org/changeset/base/207499 Log: Make SATA XPT negotiate and enable some additional SATA features, such as: - device initiated power management (some devices support only this way); - Automatic Partial to Slumber Transition (more power saving); - DMA auto-activation (expected to slightly improve performance). More features could be added later, when hardware supports. Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_pmp.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_ccb.h head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sun May 2 11:36:27 2010 (r207498) +++ head/sbin/camcontrol/camcontrol.c Sun May 2 12:07:47 2010 (r207499) @@ -2855,6 +2855,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sNumber of tags: %d\n", pathstr, sata->tags); } + if ((sata->valid & CTS_SATA_VALID_CAPS) != 0) { + fprintf(stdout, "%sSATA capabilities: %08x\n", pathstr, + sata->caps); + } } if (cts->protocol == PROTO_SCSI) { struct ccb_trans_settings_scsi *scsi= Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Sun May 2 11:36:27 2010 (r207498) +++ head/sys/cam/ata/ata_pmp.c Sun May 2 12:07:47 2010 (r207499) @@ -101,6 +101,7 @@ struct pmp_softc { int events; #define PMP_EV_RESET 1 #define PMP_EV_RESCAN 2 + u_int caps; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -457,6 +458,14 @@ pmpstart(struct cam_periph *periph, unio ata_pm_read_cmd(ataio, 2, 15); break; case PMP_STATE_PRECONFIG: + /* Get/update host SATA capabilities. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + softc->caps = cts.xport_specific.sata.caps; cam_fill_ataio(ataio, pmp_retry_count, pmpdone, @@ -644,14 +653,16 @@ pmpdone(struct cam_periph *periph, union (done_ccb->ataio.res.lba_mid << 16) + (done_ccb->ataio.res.lba_low << 8) + done_ccb->ataio.res.sector_count; - if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) { + if (((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) || + (res & 0x600) != 0) { if (bootverbose) { printf("%s%d: port %d status: %08x\n", periph->periph_name, periph->unit_number, softc->pm_step, res); } - /* Report device speed. */ - if (xpt_create_path(&dpath, periph, + /* Report device speed if it is online. */ + if ((res & 0xf0f) == 0x103 && + xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), softc->pm_step, 0) == CAM_REQ_CMP) { bzero(&cts, sizeof(cts)); @@ -660,6 +671,9 @@ pmpdone(struct cam_periph *periph, union cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.revision = (res & 0x0f0) >> 4; cts.xport_specific.sata.valid = CTS_SATA_VALID_REVISION; + cts.xport_specific.sata.caps = softc->caps & + (CTS_SATA_CAPS_H_PMREQ | CTS_SATA_CAPS_H_DMAAA); + cts.xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); xpt_free_path(dpath); } Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sun May 2 11:36:27 2010 (r207498) +++ head/sys/cam/ata/ata_xpt.c Sun May 2 12:07:47 2010 (r207499) @@ -88,6 +88,9 @@ typedef enum { PROBE_IDENTIFY, PROBE_SPINUP, PROBE_SETMODE, + PROBE_SETPM, + PROBE_SETAPST, + PROBE_SETDMAAA, PROBE_SET_MULTI, PROBE_INQUIRY, PROBE_FULL_INQUIRY, @@ -101,6 +104,9 @@ static char *probe_action_text[] = { "PROBE_IDENTIFY", "PROBE_SPINUP", "PROBE_SETMODE", + "PROBE_SETPM", + "PROBE_SETAPST", + "PROBE_SETDMAAA", "PROBE_SET_MULTI", "PROBE_INQUIRY", "PROBE_FULL_INQUIRY", @@ -132,6 +138,7 @@ typedef struct { uint32_t pm_prv; int restart; int spinup; + u_int caps; struct cam_periph *periph; } probe_softc; @@ -393,6 +400,45 @@ negotiate: ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode); break; } + case PROBE_SETPM: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_PMREQ) ? 0x10 : 0x90, + 0, 0x03); + break; + case PROBE_SETAPST: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_APST) ? 0x10 : 0x90, + 0, 0x07); + break; + case PROBE_SETDMAAA: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_DMAAA) ? 0x10 : 0x90, + 0, 0x02); + break; case PROBE_SET_MULTI: { u_int sectors, bytecount; @@ -685,6 +731,7 @@ probedone(struct cam_periph *periph, uni probe_softc *softc; struct cam_path *path; u_int32_t priority; + u_int caps; int found = 1; CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n")); @@ -879,6 +926,67 @@ noerror: xpt_schedule(periph, priority); return; case PROBE_SETMODE: + if (path->device->transport != XPORT_SATA) + goto notsata; + /* Set supported bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else + caps = 0; + if (ident_buf->satacapabilities != 0xffff) { + if (ident_buf->satacapabilities & ATA_SUPPORT_IFPWRMNGTRCV) + caps |= CTS_SATA_CAPS_D_PMREQ; + if (ident_buf->satacapabilities & ATA_SUPPORT_HAPST) + caps |= CTS_SATA_CAPS_D_APST; + } + /* Mask unwanted bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps &= cts.xport_specific.sata.caps; + /* Store result to SIM. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + xpt_action((union ccb *)&cts); + softc->caps = caps; + if (ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) { + PROBE_SET_ACTION(softc, PROBE_SETPM); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETPM: + if (ident_buf->satacapabilities != 0xffff && + ident_buf->satacapabilities & ATA_SUPPORT_DAPST) { + PROBE_SET_ACTION(softc, PROBE_SETAPST); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETAPST: + if (ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) { + PROBE_SET_ACTION(softc, PROBE_SETDMAAA); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETDMAAA: +notsata: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); } else { @@ -964,6 +1072,35 @@ noerror: snprintf(ident_buf->revision, sizeof(ident_buf->revision), "%04x", softc->pm_prv); path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; + /* Set supported bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else + caps = 0; + /* All PMPs must support PM requests. */ + caps |= CTS_SATA_CAPS_D_PMREQ; + /* Mask unwanted bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps &= cts.xport_specific.sata.caps; + /* Store result to SIM. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + xpt_action((union ccb *)&cts); + softc->caps = caps; if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sun May 2 11:36:27 2010 (r207498) +++ head/sys/cam/cam_ccb.h Sun May 2 12:07:47 2010 (r207499) @@ -837,12 +837,21 @@ struct ccb_trans_settings_sata { #define CTS_SATA_VALID_PM 0x08 #define CTS_SATA_VALID_TAGS 0x10 #define CTS_SATA_VALID_ATAPI 0x20 +#define CTS_SATA_VALID_CAPS 0x40 int mode; /* Legacy PATA mode */ u_int bytecount; /* Length of PIO transaction */ int revision; /* SATA revision */ u_int pm_present; /* PM is present (XPT->SIM) */ u_int tags; /* Number of allowed tags */ u_int atapi; /* Length of ATAPI CDB */ + u_int caps; /* Device and host SATA caps. */ +#define CTS_SATA_CAPS_H 0x0000ffff +#define CTS_SATA_CAPS_H_PMREQ 0x00000001 +#define CTS_SATA_CAPS_H_APST 0x00000002 +#define CTS_SATA_CAPS_H_DMAAA 0x00000010 /* Auto-activation */ +#define CTS_SATA_CAPS_D 0xffff0000 +#define CTS_SATA_CAPS_D_PMREQ 0x00010000 +#define CTS_SATA_CAPS_D_APST 0x00020000 }; /* Get/Set transfer rate/width/disconnection/tag queueing settings */ Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun May 2 11:36:27 2010 (r207498) +++ head/sys/dev/ahci/ahci.c Sun May 2 12:07:47 2010 (r207499) @@ -111,6 +111,7 @@ static struct { #define AHCI_Q_EDGEIS 64 #define AHCI_Q_SATA2 128 #define AHCI_Q_NOBSYRES 256 +#define AHCI_Q_NOAA 512 } ahci_ids[] = { {0x43801002, 0x00, "ATI IXP600", 0}, {0x43901002, 0x00, "ATI IXP700", 0}, @@ -167,75 +168,75 @@ static struct { {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x044c10de, 0x00, "NVIDIA MCP65", 0}, - {0x044d10de, 0x00, "NVIDIA MCP65", 0}, - {0x044e10de, 0x00, "NVIDIA MCP65", 0}, - {0x044f10de, 0x00, "NVIDIA MCP65", 0}, - {0x045c10de, 0x00, "NVIDIA MCP65", 0}, - {0x045d10de, 0x00, "NVIDIA MCP65", 0}, - {0x045e10de, 0x00, "NVIDIA MCP65", 0}, - {0x045f10de, 0x00, "NVIDIA MCP65", 0}, - {0x055010de, 0x00, "NVIDIA MCP67", 0}, - {0x055110de, 0x00, "NVIDIA MCP67", 0}, - {0x055210de, 0x00, "NVIDIA MCP67", 0}, - {0x055310de, 0x00, "NVIDIA MCP67", 0}, - {0x055410de, 0x00, "NVIDIA MCP67", 0}, - {0x055510de, 0x00, "NVIDIA MCP67", 0}, - {0x055610de, 0x00, "NVIDIA MCP67", 0}, - {0x055710de, 0x00, "NVIDIA MCP67", 0}, - {0x055810de, 0x00, "NVIDIA MCP67", 0}, - {0x055910de, 0x00, "NVIDIA MCP67", 0}, - {0x055A10de, 0x00, "NVIDIA MCP67", 0}, - {0x055B10de, 0x00, "NVIDIA MCP67", 0}, - {0x058410de, 0x00, "NVIDIA MCP67", 0}, - {0x07f010de, 0x00, "NVIDIA MCP73", 0}, - {0x07f110de, 0x00, "NVIDIA MCP73", 0}, - {0x07f210de, 0x00, "NVIDIA MCP73", 0}, - {0x07f310de, 0x00, "NVIDIA MCP73", 0}, - {0x07f410de, 0x00, "NVIDIA MCP73", 0}, - {0x07f510de, 0x00, "NVIDIA MCP73", 0}, - {0x07f610de, 0x00, "NVIDIA MCP73", 0}, - {0x07f710de, 0x00, "NVIDIA MCP73", 0}, - {0x07f810de, 0x00, "NVIDIA MCP73", 0}, - {0x07f910de, 0x00, "NVIDIA MCP73", 0}, - {0x07fa10de, 0x00, "NVIDIA MCP73", 0}, - {0x07fb10de, 0x00, "NVIDIA MCP73", 0}, - {0x0ad010de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad110de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad210de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad310de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad410de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad510de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad610de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad710de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad810de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad910de, 0x00, "NVIDIA MCP77", 0}, - {0x0ada10de, 0x00, "NVIDIA MCP77", 0}, - {0x0adb10de, 0x00, "NVIDIA MCP77", 0}, - {0x0ab410de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab510de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab610de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab710de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab810de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab910de, 0x00, "NVIDIA MCP79", 0}, - {0x0aba10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abb10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abc10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abd10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abe10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abf10de, 0x00, "NVIDIA MCP79", 0}, - {0x0d8410de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8510de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8610de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8710de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8810de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8910de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8a10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8b10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8c10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8d10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8e10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8f10de, 0x00, "NVIDIA MCP89", 0}, + {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x055010de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055110de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055210de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055310de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055510de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055610de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055710de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055810de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055910de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055A10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055B10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x058410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x07f010de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f110de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f210de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f310de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f410de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f510de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f610de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f710de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f810de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f910de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07fa10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07fb10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x0ad010de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad110de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad210de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad310de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad410de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad510de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad610de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad710de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad810de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad910de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ada10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0adb10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ab410de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab510de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab610de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab710de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab810de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab910de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0aba10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abb10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abc10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abd10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abe10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abf10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0d8410de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8510de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8610de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8710de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8810de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8910de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8a10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8b10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8c10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x33491106, 0x00, "VIA VT8251", 0}, {0x62871106, 0x00, "VIA VT8251", 0}, {0x11841039, 0x00, "SiS 966", 0}, @@ -860,7 +861,14 @@ ahci_ch_attach(device_t dev) ch->user[i].mode = 0; ch->user[i].bytecount = 8192; ch->user[i].tags = ch->numslots; + ch->user[i].caps = 0; ch->curr[i] = ch->user[i]; + if (ch->pm_level) { + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ | + CTS_SATA_CAPS_H_APST | + CTS_SATA_CAPS_D_PMREQ | CTS_SATA_CAPS_D_APST; + } + ch->user[i].caps |= CTS_SATA_CAPS_H_DMAAA; } rid = ch->unit; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -1960,7 +1968,8 @@ ahci_end_transaction(struct ahci_slot *s et != AHCI_ERR_TIMEOUT) ahci_rearm_timeout(dev); /* Start PM timer. */ - if (ch->numrslots == 0 && ch->pm_level > 3) { + if (ch->numrslots == 0 && ch->pm_level > 3 && + (ch->curr[ch->pm_present ? 15 : 0].caps & CTS_SATA_CAPS_D_PMREQ)) { callout_schedule(&ch->pm_timer, (ch->pm_level == 4) ? hz / 1000 : hz / 8); } @@ -2464,6 +2473,8 @@ ahciaction(struct cam_sim *sim, union cc ch->pm_present = cts->xport_specific.sata.pm_present; if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -2496,9 +2507,24 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) { + if (ch->caps & (AHCI_CAP_PSC | AHCI_CAP_SSC)) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + if (ch->caps2 & AHCI_CAP2_APST) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_APST; + } + if ((ch->caps & AHCI_CAP_SNCQ) && + (ch->quirks & AHCI_Q_NOAA) == 0) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_DMAAA; + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE; Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Sun May 2 11:36:27 2010 (r207498) +++ head/sys/dev/ahci/ahci.h Sun May 2 12:07:47 2010 (r207499) @@ -372,6 +372,7 @@ struct ahci_device { u_int bytecount; u_int atapi; u_int tags; + u_int caps; }; /* structure describing an ATA channel */ Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sun May 2 11:36:27 2010 (r207498) +++ head/sys/dev/siis/siis.c Sun May 2 12:07:47 2010 (r207499) @@ -448,6 +448,8 @@ siis_ch_attach(device_t dev) ch->user[i].bytecount = 8192; ch->user[i].tags = SIIS_MAX_SLOTS; ch->curr[i] = ch->user[i]; + if (ch->pm_level) + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ; } mtx_init(&ch->mtx, "SIIS channel lock", NULL, MTX_DEF); rid = ch->unit; @@ -1697,6 +1699,8 @@ siisaction(struct cam_sim *sim, union cc } if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -1729,9 +1733,17 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE; Modified: head/sys/dev/siis/siis.h ============================================================================== --- head/sys/dev/siis/siis.h Sun May 2 11:36:27 2010 (r207498) +++ head/sys/dev/siis/siis.h Sun May 2 12:07:47 2010 (r207499) @@ -358,6 +358,7 @@ struct siis_device { u_int bytecount; u_int atapi; u_int tags; + u_int caps; }; /* structure describing an ATA channel */ From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:08:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DAC910657C4; Sun, 2 May 2010 12:08:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8DE388FC12; Sun, 2 May 2010 12:08: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 o42C8Fm5052687; Sun, 2 May 2010 12:08:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42C8FC2052685; Sun, 2 May 2010 12:08:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021208.o42C8FC2052685@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 12:08: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: r207500 - head/sys/sparc64/sparc64 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, 02 May 2010 12:08:15 -0000 Author: marius Date: Sun May 2 12:08:15 2010 New Revision: 207500 URL: http://svn.freebsd.org/changeset/base/207500 Log: Add a hack for SPARC64 V CPUs, which set some undocumented bits in the first data word. Modified: head/sys/sparc64/sparc64/interrupt.S Modified: head/sys/sparc64/sparc64/interrupt.S ============================================================================== --- head/sys/sparc64/sparc64/interrupt.S Sun May 2 12:07:47 2010 (r207499) +++ head/sys/sparc64/sparc64/interrupt.S Sun May 2 12:08:15 2010 (r207500) @@ -83,8 +83,11 @@ ENTRY(intr_vector) * The 2nd word points to code to execute and the 3rd is an argument * to pass. Jump to it. */ - brnz,a,pt %g3, 1f - nop + brnz,pt %g3, 1f + /* + * NB: Zeus CPUs set some undocumented bits in the first data word. + */ + and %g3, IV_MAX - 1, %g3 jmpl %g4, %g0 nop /* NOTREACHED */ From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:38:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7EC7106564A; Sun, 2 May 2010 12:38:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B74F48FC12; Sun, 2 May 2010 12:38: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 o42CcxXe059981; Sun, 2 May 2010 12:38:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CcxLL059979; Sun, 2 May 2010 12:38:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021238.o42CcxLL059979@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 12:38:59 +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: r207501 - stable/8/lib/libkvm 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, 02 May 2010 12:38:59 -0000 Author: jilles Date: Sun May 2 12:38:59 2010 New Revision: 207501 URL: http://svn.freebsd.org/changeset/base/207501 Log: MFC r207187: kvm(3): Mention that some of the functions use sysctl(3) instead of kmem. Additionally, because of sysctl(3) use (which is generally good), behaviour for crash dumps differs slightly from behaviour for live kernels and this will probably never be fixed entirely, so weaken that claim. Modified: stable/8/lib/libkvm/kvm.3 Directory Properties: stable/8/lib/libkvm/ (props changed) Modified: stable/8/lib/libkvm/kvm.3 ============================================================================== --- stable/8/lib/libkvm/kvm.3 Sun May 2 12:08:15 2010 (r207500) +++ stable/8/lib/libkvm/kvm.3 Sun May 2 12:38:59 2010 (r207501) @@ -32,7 +32,7 @@ .\" @(#)kvm.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 29, 2004 +.Dd April 25, 2010 .Dt KVM 3 .Os .Sh NAME @@ -46,12 +46,15 @@ The library provides a uniform interface for accessing kernel virtual memory images, including live systems and crash dumps. Access to live systems is via +.Xr sysctl 3 +for some functions, and .Xr mem 4 and .Xr kmem 4 +for other functions, while crash dumps can be examined via the core file generated by .Xr savecore 8 . -The interface behaves identically in both cases. +The interface behaves similarly in both cases. Memory can be read and written, kernel symbol addresses can be looked up efficiently, and information about user processes can be gathered. @@ -112,5 +115,6 @@ given descriptor. .Xr kvm_openfiles 3 , .Xr kvm_read 3 , .Xr kvm_write 3 , +.Xr sysctl 3 , .Xr kmem 4 , .Xr mem 4 From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7200D1065740; Sun, 2 May 2010 12:39:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 61B098FC16; Sun, 2 May 2010 12:39: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 o42CdTL1060117; Sun, 2 May 2010 12:39:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CdTXn060115; Sun, 2 May 2010 12:39:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021239.o42CdTXn060115@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:39:29 +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: r207502 - stable/8/sys/dev/ata/chipsets 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, 02 May 2010 12:39:29 -0000 Author: mav Date: Sun May 2 12:39:29 2010 New Revision: 207502 URL: http://svn.freebsd.org/changeset/base/207502 Log: MFC r206604: For early ALI chips do not announce I/O sizes that require unsupported 48bit DMA commands. Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun May 2 12:38:59 2010 (r207501) +++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun May 2 12:39:29 2010 (r207502) @@ -184,8 +184,11 @@ ata_ali_ch_attach(device_t dev) if (ctlr->chip->cfg2 & ALI_NEW && ctlr->chip->chiprev < 0xc7) ch->flags |= ATA_CHECKS_CABLE; /* older chips can't do 48bit DMA transfers */ - if (ctlr->chip->chiprev <= 0xc4) + if (ctlr->chip->chiprev <= 0xc4) { ch->flags |= ATA_NO_48BIT_DMA; + if (ch->dma.max_iosize > 256 * 512) + ch->dma.max_iosize = 256 * 512; + } return 0; } From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:40:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4924106566C; Sun, 2 May 2010 12:40:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B43E08FC0A; Sun, 2 May 2010 12:40: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 o42CesFd060474; Sun, 2 May 2010 12:40:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CesMe060472; Sun, 2 May 2010 12:40:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021240.o42CesMe060472@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:40: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: r207503 - stable/8/sys/dev/ata 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, 02 May 2010 12:40:54 -0000 Author: mav Date: Sun May 2 12:40:54 2010 New Revision: 207503 URL: http://svn.freebsd.org/changeset/base/207503 Log: MFC r207221: Mark ATA channel as idle on timeout in non-ATA_CAM mode. This should fix possible duplicate request completion. Modified: stable/8/sys/dev/ata/ata-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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ata/ata-queue.c ============================================================================== --- stable/8/sys/dev/ata/ata-queue.c Sun May 2 12:39:29 2010 (r207502) +++ stable/8/sys/dev/ata/ata-queue.c Sun May 2 12:40:54 2010 (r207503) @@ -513,9 +513,9 @@ ata_timeout(struct ata_request *request) request->flags |= ATA_R_TIMEOUT; if (ch->dma.unload) ch->dma.unload(request); -#ifdef ATA_CAM ch->running = NULL; ch->state = ATA_IDLE; +#ifdef ATA_CAM ata_cam_end_transaction(ch->dev, request); #endif mtx_unlock(&ch->state_mtx); From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:43:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 592301065672; Sun, 2 May 2010 12:43:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 485498FC14; Sun, 2 May 2010 12:43: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 o42ChIEu061071; Sun, 2 May 2010 12:43:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42ChIJc061069; Sun, 2 May 2010 12:43:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021243.o42ChIJc061069@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 12:43: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: r207504 - stable/8/bin/ln 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, 02 May 2010 12:43:18 -0000 Author: jilles Date: Sun May 2 12:43:18 2010 New Revision: 207504 URL: http://svn.freebsd.org/changeset/base/207504 Log: MFC r207188: symlink(7): The ownership of symlinks is used by the system, in at least three ways, so do not say it is ignored: * who may delete/rename a symlink in a sticky directory * who may do lchflags(2)/lchown(2)/lchmod(2) * whose inode quota is charged Modified: stable/8/bin/ln/symlink.7 Directory Properties: stable/8/bin/ln/ (props changed) Modified: stable/8/bin/ln/symlink.7 ============================================================================== --- stable/8/bin/ln/symlink.7 Sun May 2 12:40:54 2010 (r207503) +++ stable/8/bin/ln/symlink.7 Sun May 2 12:43:18 2010 (r207504) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd March 31, 1994 +.Dd April 25, 2010 .Dt SYMLINK 7 .Os .Sh NAME @@ -138,8 +138,8 @@ an existing symbolic link can be changed and .Xr lutimes 2 system calls, respectively. -Of these, only the flags are used by the system; -the access permissions and ownership are ignored. +Of these, only the flags and ownership are used by the system; +the access permissions are ignored. .Pp The .Bx 4.4 From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:44:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0CBB1065740; Sun, 2 May 2010 12:44:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 908718FC17; Sun, 2 May 2010 12:44: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 o42CiBit061342; Sun, 2 May 2010 12:44:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CiBtm061340; Sun, 2 May 2010 12:44:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021244.o42CiBtm061340@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:44:11 +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: r207505 - stable/8/sys/dev/siis 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, 02 May 2010 12:44:11 -0000 Author: mav Date: Sun May 2 12:44:11 2010 New Revision: 207505 URL: http://svn.freebsd.org/changeset/base/207505 Log: MFC r205358: Enable MSI by default for SiI3124. Modified: stable/8/sys/dev/siis/siis.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun May 2 12:43:18 2010 (r207504) +++ stable/8/sys/dev/siis/siis.c Sun May 2 12:44:11 2010 (r207505) @@ -94,14 +94,15 @@ static struct { int ports; int quirks; #define SIIS_Q_SNTF 1 +#define SIIS_Q_NOMSI 2 } siis_ids[] = { {0x31241095, "SiI3124", 4, 0}, {0x31248086, "SiI3124", 4, 0}, - {0x31321095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x02421095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x02441095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x31311095, "SiI3131", 1, SIIS_Q_SNTF}, - {0x35311095, "SiI3531", 1, SIIS_Q_SNTF}, + {0x31321095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x02421095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x02441095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x31311095, "SiI3131", 1, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x35311095, "SiI3531", 1, SIIS_Q_SNTF|SIIS_Q_NOMSI}, {0, NULL, 0, 0} }; @@ -249,7 +250,7 @@ static int siis_setup_interrupt(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - int msi = 0; + int msi = ctlr->quirks & SIIS_Q_NOMSI ? 0 : 1; /* Process hints. */ resource_int_value(device_get_name(dev), From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:45:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C1851065674; Sun, 2 May 2010 12:45:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDCD8FC0C; Sun, 2 May 2010 12:45: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 o42CjN7j061662; Sun, 2 May 2010 12:45:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CjNp7061660; Sun, 2 May 2010 12:45:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021245.o42CjNp7061660@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:45:23 +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: r207506 - stable/8/sys/dev/siis 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, 02 May 2010 12:45:23 -0000 Author: mav Date: Sun May 2 12:45:22 2010 New Revision: 207506 URL: http://svn.freebsd.org/changeset/base/207506 Log: MFC r206652: Explicitly enable PCI busmastering on attach. Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100). Modified: stable/8/sys/dev/siis/siis.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun May 2 12:44:11 2010 (r207505) +++ stable/8/sys/dev/siis/siis.c Sun May 2 12:45:22 2010 (r207506) @@ -164,6 +164,7 @@ siis_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); } + pci_enable_busmaster(dev); /* Reset controller */ siis_resume(dev); /* Number of HW channels */ From owner-svn-src-all@FreeBSD.ORG Sun May 2 12:50:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D37B3106564A; Sun, 2 May 2010 12:50:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C2D598FC13; Sun, 2 May 2010 12:50: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 o42CoTgY062919; Sun, 2 May 2010 12:50:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CoTjn062916; Sun, 2 May 2010 12:50:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021250.o42CoTjn062916@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:50:29 +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: r207507 - stable/8/sys/cam/ata 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, 02 May 2010 12:50:30 -0000 Author: mav Date: Sun May 2 12:50:29 2010 New Revision: 207507 URL: http://svn.freebsd.org/changeset/base/207507 Log: MFC r207222: Move PI_TAG_ABLE check from ada driver to ATA XPT. Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_xpt.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Sun May 2 12:45:22 2010 (r207506) +++ stable/8/sys/cam/ata/ata_da.c Sun May 2 12:50:29 2010 (r207507) @@ -686,14 +686,10 @@ adaregister(struct cam_periph *periph, v else softc->quirks = ADA_Q_NONE; - /* Check if the SIM does not want queued commands */ bzero(&cpi, sizeof(cpi)); xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - if (cpi.ccb_h.status != CAM_REQ_CMP || - (cpi.hba_inquiry & PI_TAG_ABLE) == 0) - softc->flags &= ~ADA_FLAG_CAN_NCQ; TASK_INIT(&softc->sysctl_task, 0, adasysctlinit, periph); Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun May 2 12:45:22 2010 (r207506) +++ stable/8/sys/cam/ata/ata_xpt.c Sun May 2 12:50:29 2010 (r207507) @@ -766,6 +766,7 @@ noerror: } case PROBE_IDENTIFY: { + struct ccb_pathinq cpi; int16_t *ptr; ident_buf = &softc->ident_data; @@ -840,16 +841,24 @@ noerror: ata_find_quirk(path->device); if (path->device->mintags != 0 && path->bus->sim->max_tagged_dev_openings != 0) { - /* Report SIM which tags are allowed. */ - bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); - cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; - cts.type = CTS_TYPE_CURRENT_SETTINGS; - cts.xport_specific.sata.tags = path->device->maxtags; - cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS; - xpt_action((union ccb *)&cts); - /* Reconfigure queues for tagged queueing. */ - xpt_start_tags(path); + /* Check if the SIM does not want queued commands. */ + bzero(&cpi, sizeof(cpi)); + xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); + cpi.ccb_h.func_code = XPT_PATH_INQ; + xpt_action((union ccb *)&cpi); + if (cpi.ccb_h.status == CAM_REQ_CMP && + (cpi.hba_inquiry & PI_TAG_ABLE)) { + /* Report SIM which tags are allowed. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.tags = path->device->maxtags; + cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS; + xpt_action((union ccb *)&cts); + /* Reconfigure queues for tagged queueing. */ + xpt_start_tags(path); + } } ata_device_transport(path); PROBE_SET_ACTION(softc, PROBE_SETMODE); From owner-svn-src-all@FreeBSD.ORG Sun May 2 13:36:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFFC9106564A; Sun, 2 May 2010 13:36:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BF9DF8FC13; Sun, 2 May 2010 13:36: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 o42DaNrS072937; Sun, 2 May 2010 13:36:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42DaNpM072935; Sun, 2 May 2010 13:36:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021336.o42DaNpM072935@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 13:36:23 +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: r207508 - stable/8/bin/ln 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, 02 May 2010 13:36:24 -0000 Author: jilles Date: Sun May 2 13:36:23 2010 New Revision: 207508 URL: http://svn.freebsd.org/changeset/base/207508 Log: MFC r207189: symlink(7): Add lpathconf(2) and *at system calls. Modified: stable/8/bin/ln/symlink.7 Directory Properties: stable/8/bin/ln/ (props changed) Modified: stable/8/bin/ln/symlink.7 ============================================================================== --- stable/8/bin/ln/symlink.7 Sun May 2 12:50:29 2010 (r207507) +++ stable/8/bin/ln/symlink.7 Sun May 2 13:36:23 2010 (r207508) @@ -103,19 +103,23 @@ the system call would return a file descriptor to the file .Dq afile . .Pp -There are nine system calls that do not follow links, and which operate +There are thirteen system calls that do not follow links, and which operate on the symbolic link itself. They are: .Xr lchflags 2 , .Xr lchmod 2 , .Xr lchown 2 , +.Xr lpathconf 2 , .Xr lstat 2 , .Xr lutimes 2 , .Xr readlink 2 , +.Xr readlinkat 2 , .Xr rename 2 , +.Xr renameat 2 , .Xr rmdir 2 , +.Xr unlink 2 , and -.Xr unlink 2 . +.Xr unlinkat 2 . Because .Xr remove 3 is an alias for @@ -123,9 +127,30 @@ is an alias for it also does not follow symbolic links. When .Xr rmdir 2 +or +.Xr unlinkat 2 +with the +.Dv AT_REMOVEDIR +flag is applied to a symbolic link, it fails with the error .Er ENOTDIR . .Pp +The +.Xr linkat 2 +system call does not follow symbolic links +unless given the +.Dv AT_SYMLINK_FOLLOW +flag. +.Pp +The following system calls follow symbolic links +unless given the +.Dv AT_SYMLINK_NOFOLLOW +flag: +.Xr fchmodat 2 , +.Xr fchownat 2 +and +.Xr fstatat 2 . +.Pp The owner and group of an existing symbolic link can be changed by means of the .Xr lchown 2 From owner-svn-src-all@FreeBSD.ORG Sun May 2 13:38:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F26E71065670; Sun, 2 May 2010 13:38:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E20438FC0C; Sun, 2 May 2010 13:38: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 o42Dc8hh073375; Sun, 2 May 2010 13:38:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Dc8rt073373; Sun, 2 May 2010 13:38:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021338.o42Dc8rt073373@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 13:38:08 +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: r207509 - stable/7/bin/ln 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, 02 May 2010 13:38:09 -0000 Author: jilles Date: Sun May 2 13:38:08 2010 New Revision: 207509 URL: http://svn.freebsd.org/changeset/base/207509 Log: MFC r207188: symlink(7): The ownership of symlinks is used by the system, in at least three ways, so do not say it is ignored: * who may delete/rename a symlink in a sticky directory * who may do lchflags(2)/lchown(2)/lchmod(2) * whose inode quota is charged Modified: stable/7/bin/ln/symlink.7 Directory Properties: stable/7/bin/ln/ (props changed) Modified: stable/7/bin/ln/symlink.7 ============================================================================== --- stable/7/bin/ln/symlink.7 Sun May 2 13:36:23 2010 (r207508) +++ stable/7/bin/ln/symlink.7 Sun May 2 13:38:08 2010 (r207509) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd March 31, 1994 +.Dd April 25, 2010 .Dt SYMLINK 7 .Os .Sh NAME @@ -138,8 +138,8 @@ an existing symbolic link can be changed and .Xr lutimes 2 system calls, respectively. -Of these, only the flags are used by the system; -the access permissions and ownership are ignored. +Of these, only the flags and ownership are used by the system; +the access permissions are ignored. .Pp The .Bx 4.4 From owner-svn-src-all@FreeBSD.ORG Sun May 2 13:48:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9DCD106566B; Sun, 2 May 2010 13:48:55 +0000 (UTC) (envelope-from asmrookie@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 005FB8FC08; Sun, 2 May 2010 13:48:54 +0000 (UTC) Received: by fxm15 with SMTP id 15so1631223fxm.13 for ; Sun, 02 May 2010 06:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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:content-transfer-encoding; bh=ftwlmWyDgkr5lrnLX9G5gvrgLnNtHUSRTMNyrmneG6M=; b=e7StRirYPo0IvwQUJVna5hHE7H8YH5MvHt/cuDptC/AvbqKESYzWEF0KBkAnpSO5fP 0szabaFf/nSPi3QRGr2zZf9FlzpA/beQZA+Zc2ISpagARiSnPC7o45X1siUvV3j7FS0F lA8yGrsZF3xOlX0lHnwSm6wDSsUH6NOGmf8sA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=n0v1k/fX8eYxqbINYgDLfBEnsO59qBftLy7MHo91f1EiZsxarIbbPfnH9tCQVaG6a8 QhRvdFAy59U4f7hLWUGgxMWs2TvqS7gKdhj/GGbyEFMLu+suZe7GNO61JFiRhWJO03q1 Kkhiv6UYIN3NGOBPAoj6HDg/7CqSjvvSO/3eQ= MIME-Version: 1.0 Received: by 10.239.190.77 with SMTP id w13mr213090hbh.196.1272808130138; Sun, 02 May 2010 06:48:50 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.239.129.207 with HTTP; Sun, 2 May 2010 06:48:50 -0700 (PDT) In-Reply-To: <20100501151339.GZ2391@deviant.kiev.zoral.com.ua> References: <201005011446.o41EkIa6051907@svn.freebsd.org> <20100501151339.GZ2391@deviant.kiev.zoral.com.ua> Date: Sun, 2 May 2010 15:48:50 +0200 X-Google-Sender-Auth: Y9oHArtPe34prlKszpM9t6M0mjw Message-ID: From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207468 - 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: Sun, 02 May 2010 13:48:55 -0000 2010/5/1 Kostik Belousov : > On Sat, May 01, 2010 at 04:47:36PM +0200, Attilio Rao wrote: >> 2010/5/1 Konstantin Belousov : >> > Author: kib >> > Date: Sat May =C2=A01 14:46:17 2010 >> > New Revision: 207468 >> > URL: http://svn.freebsd.org/changeset/base/207468 >> > >> > Log: >> > =C2=A0Extract thread_lock()/ruxagg()/thread_unlock() fragment into uti= lity >> > =C2=A0function ruxagg_tlock(). >> > =C2=A0Convert the definition of kern_getrusage() to ANSI C. >> > >> >> I would have preferred a different naming for this, as the well known >> _locked version we have of many functions. > > But this is not the case there, because I did not renamed ruxagg(). > It would be ruxagg()->ruxagg_unlocked() and ruxagg_tlock()->ruxagg(). Yes, this is exactly what I wanted to happen. > My biggest question with the patch is I am not sure whether to apply > the same checks for tu in calctru() as it is done for tu in calcru1(). > Any suggestions ? I think that the checks may be present (the process-scope one is just an aggregate of the threads' one, thus the same conditions apply. > diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2 > index bdf5d45..423503f 100644 > --- a/lib/libc/sys/getrusage.2 > +++ b/lib/libc/sys/getrusage.2 > @@ -28,7 +28,7 @@ > =C2=A0.\" =C2=A0 =C2=A0 @(#)getrusage.2 =C2=A0 =C2=A0 =C2=A0 =C2=A08.1 (B= erkeley) 6/4/93 > =C2=A0.\" $FreeBSD$ > =C2=A0.\" > -.Dd June 4, 1993 > +.Dd May 1, 2010 > =C2=A0.Dt GETRUSAGE 2 > =C2=A0.Os > =C2=A0.Sh NAME > @@ -42,6 +42,7 @@ > =C2=A0.In sys/resource.h > =C2=A0.Fd "#define =C2=A0 RUSAGE_SELF =C2=A0 =C2=A0 =C2=A00" > =C2=A0.Fd "#define =C2=A0 RUSAGE_CHILDREN -1" > +.Fd "#define =C2=A0 RUSAGE_THREAD =C2=A0 1" > =C2=A0.Ft int > =C2=A0.Fn getrusage "int who" "struct rusage *rusage" > =C2=A0.Sh DESCRIPTION > @@ -49,11 +50,12 @@ The > =C2=A0.Fn getrusage > =C2=A0system call > =C2=A0returns information describing the resources utilized by the curren= t > -process, or all its terminated child processes. > +thread, the current process, or all its terminated child processes. > =C2=A0The > =C2=A0.Fa who > =C2=A0argument is either > -.Dv RUSAGE_SELF > +.Dv RUSAGE_THREAD , > +.Dv RUSAGE_SELF , > =C2=A0or > =C2=A0.Dv RUSAGE_CHILDREN . > =C2=A0The buffer to which > @@ -175,6 +177,10 @@ The > =C2=A0.Fn getrusage > =C2=A0system call appeared in > =C2=A0.Bx 4.2 . > +The > +.Dv RUSAGE_THREAD > +facility first appeared in > +.Fx 8.1 . > =C2=A0.Sh BUGS > =C2=A0There is no way to obtain information about a child process > =C2=A0that has not yet terminated. > diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c > index a3ed75d..8e7fdb6 100644 > --- a/sys/kern/kern_resource.c > +++ b/sys/kern/kern_resource.c > @@ -921,6 +921,31 @@ calcru1(struct proc *p, struct rusage_ext *ruxp, str= uct timeval *up, > =C2=A0 =C2=A0 =C2=A0 =C2=A0sp->tv_usec =3D su % 1000000; > =C2=A0} > > +static void > +calctru(struct thread *td) > +{ > + =C2=A0 =C2=A0 =C2=A0 /* {user, system, interrupt, total} {ticks, usec}:= */ > + =C2=A0 =C2=A0 =C2=A0 u_int64_t ut, uu, st, su, it, tt, tu; > + > + =C2=A0 =C2=A0 =C2=A0 tu =3D cputick2usec(td->td_incruntime); > + =C2=A0 =C2=A0 =C2=A0 ut =3D td->td_uticks; > + =C2=A0 =C2=A0 =C2=A0 it =3D td->td_iticks; > + =C2=A0 =C2=A0 =C2=A0 st =3D td->td_sticks; > + > + =C2=A0 =C2=A0 =C2=A0 tt =3D ut + st + it; > + =C2=A0 =C2=A0 =C2=A0 if (tt =3D=3D 0) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Avoid divide by zer= o */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 st =3D 1; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tt =3D 1; > + =C2=A0 =C2=A0 =C2=A0 } > + =C2=A0 =C2=A0 =C2=A0 uu =3D td->td_ru.ru_utime.tv_usec + (ut * tu) / tt= ; > + =C2=A0 =C2=A0 =C2=A0 su =3D td->td_ru.ru_stime.tv_usec + (st * tu) / tt= ; > + =C2=A0 =C2=A0 =C2=A0 td->td_ru.ru_utime.tv_sec +=3D uu / 1000000; > + =C2=A0 =C2=A0 =C2=A0 td->td_ru.ru_utime.tv_usec =3D uu % 1000000; > + =C2=A0 =C2=A0 =C2=A0 td->td_ru.ru_stime.tv_sec +=3D su / 1000000; > + =C2=A0 =C2=A0 =C2=A0 td->td_ru.ru_stime.tv_usec =3D su % 1000000; > +} > + > =C2=A0#ifndef _SYS_SYSPROTO_H_ > =C2=A0struct getrusage_args { > =C2=A0 =C2=A0 =C2=A0 =C2=A0int =C2=A0 =C2=A0 who; The comment on the top of calctru() might be removed. > @@ -961,6 +986,13 @@ kern_getrusage(struct thread *td, int who, struct ru= sage *rup) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0calccru(p, &rup->r= u_utime, &rup->ru_stime); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > > + =C2=A0 =C2=A0 =C2=A0 case RUSAGE_THREAD: > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PROC_SLOCK(p); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ruxagg_tlock(p, td); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PROC_SUNLOCK(p); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *rup =3D td->td_ru; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0default: > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D EINVAL; > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > @@ -1010,6 +1042,12 @@ ruxagg(struct rusage_ext *rux, struct thread *td) > =C2=A0 =C2=A0 =C2=A0 =C2=A0rux->rux_uticks +=3D td->td_uticks; > =C2=A0 =C2=A0 =C2=A0 =C2=A0rux->rux_sticks +=3D td->td_sticks; > =C2=A0 =C2=A0 =C2=A0 =C2=A0rux->rux_iticks +=3D td->td_iticks; > + > + =C2=A0 =C2=A0 =C2=A0 /* > + =C2=A0 =C2=A0 =C2=A0 =C2=A0* Update thread rusage before ticks counters= cleaning. > + =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ > + =C2=A0 =C2=A0 =C2=A0 calctru(td); > + > =C2=A0 =C2=A0 =C2=A0 =C2=A0td->td_incruntime =3D 0; > =C2=A0 =C2=A0 =C2=A0 =C2=A0td->td_uticks =3D 0; > =C2=A0 =C2=A0 =C2=A0 =C2=A0td->td_iticks =3D 0; The comment might be single-line and the extra white line after calctru() is not due. Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sun May 2 13:53:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03657106566B; Sun, 2 May 2010 13:53:09 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E72138FC17; Sun, 2 May 2010 13:53: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 o42Dr8cK076635; Sun, 2 May 2010 13:53:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Dr8Vr076633; Sun, 2 May 2010 13:53:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021353.o42Dr8Vr076633@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 13:53:08 +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: r207510 - stable/7/lib/libkvm 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, 02 May 2010 13:53:09 -0000 Author: jilles Date: Sun May 2 13:53:08 2010 New Revision: 207510 URL: http://svn.freebsd.org/changeset/base/207510 Log: MFC r207187: kvm(3): Mention that some of the functions use sysctl(3) instead of kmem. Additionally, because of sysctl(3) use (which is generally good), behaviour for crash dumps differs slightly from behaviour for live kernels and this will probably never be fixed entirely, so weaken that claim. Modified: stable/7/lib/libkvm/kvm.3 Directory Properties: stable/7/lib/libkvm/ (props changed) Modified: stable/7/lib/libkvm/kvm.3 ============================================================================== --- stable/7/lib/libkvm/kvm.3 Sun May 2 13:38:08 2010 (r207509) +++ stable/7/lib/libkvm/kvm.3 Sun May 2 13:53:08 2010 (r207510) @@ -32,7 +32,7 @@ .\" @(#)kvm.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 29, 2004 +.Dd April 25, 2010 .Dt KVM 3 .Os .Sh NAME @@ -46,12 +46,15 @@ The library provides a uniform interface for accessing kernel virtual memory images, including live systems and crash dumps. Access to live systems is via +.Xr sysctl 3 +for some functions, and .Xr mem 4 and .Xr kmem 4 +for other functions, while crash dumps can be examined via the core file generated by .Xr savecore 8 . -The interface behaves identically in both cases. +The interface behaves similarly in both cases. Memory can be read and written, kernel symbol addresses can be looked up efficiently, and information about user processes can be gathered. @@ -112,5 +115,6 @@ given descriptor. .Xr kvm_openfiles 3 , .Xr kvm_read 3 , .Xr kvm_write 3 , +.Xr sysctl 3 , .Xr kmem 4 , .Xr mem 4 From owner-svn-src-all@FreeBSD.ORG Sun May 2 14:46:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F526106566B; Sun, 2 May 2010 14:46:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 105C68FC12; Sun, 2 May 2010 14:46: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 o42Ek5MH088718; Sun, 2 May 2010 14:46:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Ek5jU088716; Sun, 2 May 2010 14:46:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021446.o42Ek5jU088716@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 14:46: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: r207511 - head/sys/dev/ahci 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, 02 May 2010 14:46:06 -0000 Author: mav Date: Sun May 2 14:46:05 2010 New Revision: 207511 URL: http://svn.freebsd.org/changeset/base/207511 Log: Enable PCI busmastering explicitly to be sure. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun May 2 13:53:08 2010 (r207510) +++ head/sys/dev/ahci/ahci.c Sun May 2 14:46:05 2010 (r207511) @@ -340,6 +340,7 @@ ahci_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); } + pci_enable_busmaster(dev); /* Reset controller */ if ((error = ahci_ctlr_reset(dev)) != 0) { bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); From owner-svn-src-all@FreeBSD.ORG Sun May 2 15:52:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 324391065672; Sun, 2 May 2010 15:52:49 +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 8E0CD8FC0C; Sun, 2 May 2010 15:52:48 +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 o42FqiUd013282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 May 2010 18:52:44 +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 o42Fqi2o056410; Sun, 2 May 2010 18:52:44 +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 o42FqiwI056409; Sun, 2 May 2010 18:52:44 +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, 2 May 2010 18:52:44 +0300 From: Kostik Belousov To: Attilio Rao Message-ID: <20100502155244.GB50864@deviant.kiev.zoral.com.ua> References: <201005011446.o41EkIa6051907@svn.freebsd.org> <20100501151339.GZ2391@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xgyAXRrhYN0wYx8y" Content-Disposition: inline In-Reply-To: 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.5 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, src-committers@freebsd.org Subject: Re: svn commit: r207468 - 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: Sun, 02 May 2010 15:52:49 -0000 --xgyAXRrhYN0wYx8y Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 02, 2010 at 03:48:50PM +0200, Attilio Rao wrote: > 2010/5/1 Kostik Belousov : > > On Sat, May 01, 2010 at 04:47:36PM +0200, Attilio Rao wrote: > >> 2010/5/1 Konstantin Belousov : > >> > Author: kib > >> > Date: Sat May =9A1 14:46:17 2010 > >> > New Revision: 207468 > >> > URL: http://svn.freebsd.org/changeset/base/207468 > >> > > >> > Log: > >> > =9AExtract thread_lock()/ruxagg()/thread_unlock() fragment into util= ity > >> > =9Afunction ruxagg_tlock(). > >> > =9AConvert the definition of kern_getrusage() to ANSI C. > >> > > >> > >> I would have preferred a different naming for this, as the well known > >> _locked version we have of many functions. > > > > But this is not the case there, because I did not renamed ruxagg(). > > It would be ruxagg()->ruxagg_unlocked() and ruxagg_tlock()->ruxagg(). >=20 > Yes, this is exactly what I wanted to happen. >=20 > > My biggest question with the patch is I am not sure whether to apply > > the same checks for tu in calctru() as it is done for tu in calcru1(). > > Any suggestions ? >=20 > I think that the checks may be present (the process-scope one is just > an aggregate of the threads' one, thus the same conditions apply. Ok, then the easiest way is to rewrite the patch. I removed your comments for previous version since they are no longer relevant. I have to add rusage_ext to struct thread, that would complicate the MFC. And, looking at the whole picture, I do not understand how do we handle the exiting threads. It seems that only user/system runtime is getting collected to the process rusage. The other values, like i/o counters, signals, ctx switches etc are thrown out. diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2 index bdf5d45..423503f 100644 --- a/lib/libc/sys/getrusage.2 +++ b/lib/libc/sys/getrusage.2 @@ -28,7 +28,7 @@ .\" @(#)getrusage.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd May 1, 2010 .Dt GETRUSAGE 2 .Os .Sh NAME @@ -42,6 +42,7 @@ .In sys/resource.h .Fd "#define RUSAGE_SELF 0" .Fd "#define RUSAGE_CHILDREN -1" +.Fd "#define RUSAGE_THREAD 1" .Ft int .Fn getrusage "int who" "struct rusage *rusage" .Sh DESCRIPTION @@ -49,11 +50,12 @@ The .Fn getrusage system call returns information describing the resources utilized by the current -process, or all its terminated child processes. +thread, the current process, or all its terminated child processes. The .Fa who argument is either -.Dv RUSAGE_SELF +.Dv RUSAGE_THREAD , +.Dv RUSAGE_SELF , or .Dv RUSAGE_CHILDREN . The buffer to which @@ -175,6 +177,10 @@ The .Fn getrusage system call appeared in .Bx 4.2 . +The +.Dv RUSAGE_THREAD +facility first appeared in +.Fx 8.1 . .Sh BUGS There is no way to obtain information about a child process that has not yet terminated. diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index a3ed75d..0bc78d0 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -76,7 +76,7 @@ static void calcru1(struct proc *p, struct rusage_ext *ru= xp, struct timeval *up, struct timeval *sp); static int donice(struct thread *td, struct proc *chgp, int n); static struct uidinfo *uilookup(uid_t uid); -static void ruxagg_tlock(struct proc *p, struct thread *td); +static void ruxagg(struct proc *p, struct thread *td); =20 /* * Resource controls and accounting. @@ -630,7 +630,7 @@ lim_cb(void *arg) return; PROC_SLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { - ruxagg_tlock(p, td); + ruxagg(p, td); } PROC_SUNLOCK(p); if (p->p_rux.rux_runtime > p->p_cpulimit * cpu_tickrate()) { @@ -841,7 +841,7 @@ calcru(struct proc *p, struct timeval *up, struct timev= al *sp) FOREACH_THREAD_IN_PROC(p, td) { if (td->td_incruntime =3D=3D 0) continue; - ruxagg_tlock(p, td); + ruxagg(p, td); } calcru1(p, &p->p_rux, up, sp); } @@ -961,6 +961,16 @@ kern_getrusage(struct thread *td, int who, struct rusa= ge *rup) calccru(p, &rup->ru_utime, &rup->ru_stime); break; =20 + case RUSAGE_THREAD: + PROC_SLOCK(p); + ruxagg(p, td); + PROC_SUNLOCK(p); + thread_lock(td); + *rup =3D td->td_ru; + calcru1(p, &td->td_rux, &rup->ru_utime, &rup->ru_stime); + thread_unlock(td); + break; + default: error =3D EINVAL; } @@ -1001,7 +1011,7 @@ ruadd(struct rusage *ru, struct rusage_ext *rux, stru= ct rusage *ru2, * Aggregate tick counts into the proc's rusage_ext. */ void -ruxagg(struct rusage_ext *rux, struct thread *td) +ruxagg_locked(struct rusage_ext *rux, struct thread *td) { =20 THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -1010,18 +1020,19 @@ ruxagg(struct rusage_ext *rux, struct thread *td) rux->rux_uticks +=3D td->td_uticks; rux->rux_sticks +=3D td->td_sticks; rux->rux_iticks +=3D td->td_iticks; - td->td_incruntime =3D 0; - td->td_uticks =3D 0; - td->td_iticks =3D 0; - td->td_sticks =3D 0; } =20 static void -ruxagg_tlock(struct proc *p, struct thread *td) +ruxagg(struct proc *p, struct thread *td) { =20 thread_lock(td); - ruxagg(&p->p_rux, td); + ruxagg_locked(&p->p_rux, td); + ruxagg_locked(&td->td_rux, td); + td->td_incruntime =3D 0; + td->td_uticks =3D 0; + td->td_iticks =3D 0; + td->td_sticks =3D 0; thread_unlock(td); } =20 @@ -1039,7 +1050,7 @@ rufetch(struct proc *p, struct rusage *ru) *ru =3D p->p_ru; if (p->p_numthreads > 0) { FOREACH_THREAD_IN_PROC(p, td) { - ruxagg_tlock(p, td); + ruxagg(p, td); rucollect(ru, &td->td_ru); } } diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 9be4c2f..b32c584 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -432,7 +432,7 @@ thread_exit(void) PROC_UNLOCK(p); thread_lock(td); /* Save our tick information with both the thread and proc locked */ - ruxagg(&p->p_rux, td); + ruxagg_locked(&p->p_rux, td); PROC_SUNLOCK(p); td->td_state =3D TDS_INACTIVE; #ifdef WITNESS diff --git a/sys/sys/proc.h b/sys/sys/proc.h index fb31cfc..d2ff3df 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -173,6 +173,26 @@ struct kdtrace_thread; struct cpuset; =20 /* + * XXX: Does this belong in resource.h or resourcevar.h instead? + * Resource usage extension. The times in rusage structs in the kernel are + * never up to date. The actual times are kept as runtimes and tick counts + * (with control info in the "previous" times), and are converted when + * userland asks for rusage info. Backwards compatibility prevents putting + * this directly in the user-visible rusage struct. + * + * Locking: (cj) means (j) for p_rux and (c) for p_crux. + */ +struct rusage_ext { + u_int64_t rux_runtime; /* (cj) Real time. */ + u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */ + u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ + u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ + u_int64_t rux_uu; /* (c) Previous user time in usec. */ + u_int64_t rux_su; /* (c) Previous sys time in usec. */ + u_int64_t rux_tu; /* (c) Previous total time in usec. */ +}; + +/* * Kernel runnable context (thread). * This is what is put to sleep and reactivated. * Thread context. Processes may have multiple threads. @@ -219,7 +239,8 @@ struct thread { u_int td_estcpu; /* (t) estimated cpu utilization */ int td_slptick; /* (t) Time at sleep. */ int td_blktick; /* (t) Time spent blocked. */ - struct rusage td_ru; /* (t) rusage information */ + struct rusage td_ru; /* (t) rusage information. */ + struct rusage_ext td_rux; /* (t) Internal rusage information. */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ u_int td_pticks; /* (t) Statclock hits for profiling */ @@ -426,26 +447,6 @@ do { \ #define TD_SET_CAN_RUN(td) (td)->td_state =3D TDS_CAN_RUN =20 /* - * XXX: Does this belong in resource.h or resourcevar.h instead? - * Resource usage extension. The times in rusage structs in the kernel are - * never up to date. The actual times are kept as runtimes and tick counts - * (with control info in the "previous" times), and are converted when - * userland asks for rusage info. Backwards compatibility prevents putting - * this directly in the user-visible rusage struct. - * - * Locking: (cj) means (j) for p_rux and (c) for p_crux. - */ -struct rusage_ext { - u_int64_t rux_runtime; /* (cj) Real time. */ - u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */ - u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ - u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ - u_int64_t rux_uu; /* (c) Previous user time in usec. */ - u_int64_t rux_su; /* (c) Previous sys time in usec. */ - u_int64_t rux_tu; /* (c) Previous total time in usec. */ -}; - -/* * Process structure. */ struct proc { diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 9af96af..e703744 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -56,6 +56,7 @@ =20 #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN -1 +#define RUSAGE_THREAD 1 =20 struct rusage { struct timeval ru_utime; /* user time used */ diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 21728aa..95a9b49 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -131,7 +131,7 @@ void rucollect(struct rusage *ru, struct rusage *ru2); void rufetch(struct proc *p, struct rusage *ru); void rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up, struct timeval *sp); -void ruxagg(struct rusage_ext *rux, struct thread *td); +void ruxagg_locked(struct rusage_ext *rux, struct thread *td); int suswintr(void *base, int word); struct uidinfo *uifind(uid_t uid); --xgyAXRrhYN0wYx8y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvdn8oACgkQC3+MBN1Mb4hJbQCg0sO2vR/sh5TiY5QKuw1h+MZU pU4AoL2eFRvvw3cSKzap4nWcRdt6AMVk =4slr -----END PGP SIGNATURE----- --xgyAXRrhYN0wYx8y-- From owner-svn-src-all@FreeBSD.ORG Sun May 2 15:55:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC81B106566C; Sun, 2 May 2010 15:55:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id AC8C28FC16; Sun, 2 May 2010 15:55: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 o42FtTCj004384; Sun, 2 May 2010 15:55:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42FtT0d004382; Sun, 2 May 2010 15:55:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021555.o42FtT0d004382@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 15:55:29 +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: r207512 - stable/8/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: Sun, 02 May 2010 15:55:29 -0000 Author: bz Date: Sun May 2 15:55:29 2010 New Revision: 207512 URL: http://svn.freebsd.org/changeset/base/207512 Log: MFC r206989: Avoid memory access after free. Use the (shortend) copy for the ipsec mtu lookup as well. PR: kern/145736 Submitted by: Peter Molnar (peter molnar.cc) Modified: stable/8/sys/netinet/ip_input.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/ip_input.c ============================================================================== --- stable/8/sys/netinet/ip_input.c Sun May 2 14:46:05 2010 (r207511) +++ stable/8/sys/netinet/ip_input.c Sun May 2 15:55:29 2010 (r207512) @@ -1590,7 +1590,7 @@ ip_forward(struct mbuf *m, int srcrt) * If IPsec is configured for this path, * override any possibly mtu value set by ip_output. */ - mtu = ip_ipsec_mtu(m, mtu); + mtu = ip_ipsec_mtu(mcopy, mtu); #endif /* IPSEC */ /* * If the MTU was set before make sure we are below the From owner-svn-src-all@FreeBSD.ORG Sun May 2 15:58:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0AFE106566B; Sun, 2 May 2010 15:58:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 909CF8FC1C; Sun, 2 May 2010 15:58: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 o42FwPvT005083; Sun, 2 May 2010 15:58:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42FwP5c005081; Sun, 2 May 2010 15:58:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021558.o42FwP5c005081@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 15:58:25 +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: r207513 - stable/8/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: Sun, 02 May 2010 15:58:25 -0000 Author: bz Date: Sun May 2 15:58:25 2010 New Revision: 207513 URL: http://svn.freebsd.org/changeset/base/207513 Log: MFC r207116: Remove one zero from the double-0. This code doesn't have a license to kill. Modified: stable/8/sys/kern/kern_descrip.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_descrip.c ============================================================================== --- stable/8/sys/kern/kern_descrip.c Sun May 2 15:55:29 2010 (r207512) +++ stable/8/sys/kern/kern_descrip.c Sun May 2 15:58:25 2010 (r207513) @@ -2896,7 +2896,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE free(sa, M_SONAME); } if (so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa) - == 00 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { + == 0 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { bcopy(sa, &kif->kf_sa_peer, sa->sa_len); free(sa, M_SONAME); } @@ -3149,7 +3149,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER free(sa, M_SONAME); } if (so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa) - == 00 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { + == 0 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { bcopy(sa, &kif->kf_sa_peer, sa->sa_len); free(sa, M_SONAME); } From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:32:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 991F2106566B; Sun, 2 May 2010 16:32:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 88C218FC1F; Sun, 2 May 2010 16:32: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 o42GWfdq012591; Sun, 2 May 2010 16:32:41 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GWffl012588; Sun, 2 May 2010 16:32:41 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021632.o42GWffl012588@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 16:32: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: r207514 - stable/8/sys/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: Sun, 02 May 2010 16:32:41 -0000 Author: bz Date: Sun May 2 16:32:41 2010 New Revision: 207514 URL: http://svn.freebsd.org/changeset/base/207514 Log: MFC r207276: Make sure IPv6 source address selection does not change interface addresses while walking the IPv6 address list if in the jail case something is connecting to ::1. Reported by: Pieter de Boer (pieter thedarkside.nl) Tested by: Pieter de Boer (pieter thedarkside.nl) Modified: stable/8/sys/netinet6/in6_src.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet6/in6_src.c ============================================================================== --- stable/8/sys/netinet6/in6_src.c Sun May 2 15:58:25 2010 (r207513) +++ stable/8/sys/netinet6/in6_src.c Sun May 2 16:32:41 2010 (r207514) @@ -182,7 +182,7 @@ in6_selectsrc(struct sockaddr_in6 *dstso struct inpcb *inp, struct route_in6 *ro, struct ucred *cred, struct ifnet **ifpp, struct in6_addr *srcp) { - struct in6_addr dst; + struct in6_addr dst, tmp; struct ifnet *ifp = NULL; struct in6_ifaddr *ia = NULL, *ia_best = NULL; struct in6_pktinfo *pi = NULL; @@ -326,10 +326,9 @@ in6_selectsrc(struct sockaddr_in6 *dstso if (!V_ip6_use_deprecated && IFA6_IS_DEPRECATED(ia)) continue; + /* If jailed only take addresses of the jail into account. */ if (cred != NULL && - prison_local_ip6(cred, &ia->ia_addr.sin6_addr, - (inp != NULL && - (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)) != 0) + prison_check_ip6(cred, &ia->ia_addr.sin6_addr) != 0) continue; /* Rule 1: Prefer same address */ @@ -476,10 +475,26 @@ in6_selectsrc(struct sockaddr_in6 *dstso return (EADDRNOTAVAIL); } + /* + * At this point at least one of the addresses belonged to the jail + * but it could still be, that we want to further restrict it, e.g. + * theoratically IN6_IS_ADDR_LOOPBACK. + * It must not be IN6_IS_ADDR_UNSPECIFIED anymore. + * prison_local_ip6() will fix an IN6_IS_ADDR_LOOPBACK but should + * let all others previously selected pass. + * Use tmp to not change ::1 on lo0 to the primary jail address. + */ + tmp = ia->ia_addr.sin6_addr; + if (cred != NULL && prison_local_ip6(cred, &tmp, (inp != NULL && + (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)) != 0) { + IN6_IFADDR_RUNLOCK(); + return (EADDRNOTAVAIL); + } + if (ifpp) *ifpp = ifp; - bcopy(&ia->ia_addr.sin6_addr, srcp, sizeof(*srcp)); + bcopy(&tmp, srcp, sizeof(*srcp)); IN6_IFADDR_RUNLOCK(); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:36:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFE1B1065674; Sun, 2 May 2010 16:36:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CF7118FC1E; Sun, 2 May 2010 16:36: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 o42GaF9N013465; Sun, 2 May 2010 16:36:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GaFwE013462; Sun, 2 May 2010 16:36:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021636.o42GaFwE013462@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 16:36: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: r207515 - in stable/8/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: Sun, 02 May 2010 16:36:16 -0000 Author: bz Date: Sun May 2 16:36:15 2010 New Revision: 207515 URL: http://svn.freebsd.org/changeset/base/207515 Log: MFC r207277: Enhance the historic behaviour of raw sockets and jails in a way that we allow all possible jail IPs as source address rather than forcing the "primary". While IPv6 naturally has source address selection, for legacy IP we do not go through the pain in case IP_HDRINCL was not set. People should bind(2) for that. This will, for example, allow ping(|6) -S to work correctly for non-primary addresses. Reported by: (ten 211.ru) Tested by: (ten 211.ru) Modified: stable/8/sys/netinet/raw_ip.c stable/8/sys/netinet6/raw_ip6.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/raw_ip.c ============================================================================== --- stable/8/sys/netinet/raw_ip.c Sun May 2 16:32:41 2010 (r207514) +++ stable/8/sys/netinet/raw_ip.c Sun May 2 16:36:15 2010 (r207515) @@ -441,11 +441,24 @@ rip_output(struct mbuf *m, struct socket ip->ip_p = inp->inp_ip_p; ip->ip_len = m->m_pkthdr.len; ip->ip_src = inp->inp_laddr; - error = prison_get_ip4(inp->inp_cred, &ip->ip_src); - if (error != 0) { - INP_RUNLOCK(inp); - m_freem(m); - return (error); + if (jailed(inp->inp_cred)) { + /* + * prison_local_ip4() would be good enough but would + * let a source of INADDR_ANY pass, which we do not + * want to see from jails. We do not go through the + * pain of in_pcbladdr() for raw sockets. + */ + if (ip->ip_src.s_addr == INADDR_ANY) + error = prison_get_ip4(inp->inp_cred, + &ip->ip_src); + else + error = prison_local_ip4(inp->inp_cred, + &ip->ip_src); + if (error != 0) { + INP_RUNLOCK(inp); + m_freem(m); + return (error); + } } ip->ip_dst.s_addr = dst; ip->ip_ttl = inp->inp_ip_ttl; Modified: stable/8/sys/netinet6/raw_ip6.c ============================================================================== --- stable/8/sys/netinet6/raw_ip6.c Sun May 2 16:32:41 2010 (r207514) +++ stable/8/sys/netinet6/raw_ip6.c Sun May 2 16:36:15 2010 (r207515) @@ -465,7 +465,7 @@ rip6_output(m, va_alist) &oifp, &in6a); if (error) goto bad; - error = prison_get_ip6(in6p->inp_cred, &in6a); + error = prison_check_ip6(in6p->inp_cred, &in6a); if (error != 0) goto bad; ip6->ip6_src = in6a; From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:38:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85D5F1065672; Sun, 2 May 2010 16:38:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 755A18FC1C; Sun, 2 May 2010 16:38: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 o42Gcvcn014111; Sun, 2 May 2010 16:38:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GcvaQ014109; Sun, 2 May 2010 16:38:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021638.o42GcvaQ014109@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:38:57 +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: r207516 - stable/7/sys/sparc64/sparc64 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, 02 May 2010 16:38:57 -0000 Author: marius Date: Sun May 2 16:38:57 2010 New Revision: 207516 URL: http://svn.freebsd.org/changeset/base/207516 Log: MFC: r206448 Do as the comment suggests and determine the bus space based on the last bus we actually mapped at rather than always based on the last bus we encountered while moving upward in the tree. Otherwise we might use the wrong bus space in case the bridge directly underneath the nexus doesn't require mapping, i.e. was skipped as it's the case for ssm(4) nodes. Modified: stable/7/sys/sparc64/sparc64/ofw_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/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:36:15 2010 (r207515) +++ stable/7/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:38:57 2010 (r207516) @@ -187,13 +187,10 @@ OF_decode_addr(phandle_t node, int bank, name[sizeof(name) - 1] = '\0'; goto skip; } - if (lbus != bus) { - if (OF_getprop(bus, "#size-cells", &szc, - sizeof(szc)) == -1) - szc = 1; - if (szc < 1 || szc > 2) - return (ENXIO); - } + if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1) + szc = 1; + if (szc < 1 || szc > 2) + return (ENXIO); nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); bank = 0; for (i = 0; i < nbank; i++) { @@ -233,9 +230,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; } From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:39:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 612B81065678; Sun, 2 May 2010 16:39:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5125B8FC08; Sun, 2 May 2010 16:39: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 o42GdF3p014219; Sun, 2 May 2010 16:39:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GdFFk014217; Sun, 2 May 2010 16:39:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021639.o42GdFFk014217@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 16:39: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: r207517 - 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: Sun, 02 May 2010 16:39:15 -0000 Author: bz Date: Sun May 2 16:39:15 2010 New Revision: 207517 URL: http://svn.freebsd.org/changeset/base/207517 Log: MFC r207278: MFP4: @177254 Add missing CURVNET_RESTORE() calls for multiple code paths, to stop leaking the currently cached vnet into callers and to the process. Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH Modified: stable/8/sys/net/bpf.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Sun May 2 16:38:57 2010 (r207516) +++ stable/8/sys/net/bpf.c Sun May 2 16:39:15 2010 (r207517) @@ -1328,6 +1328,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c /* FALLSTHROUGH */ default: + CURVNET_RESTORE(); return (EINVAL); } @@ -1335,6 +1336,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c if (d->bd_sbuf != NULL || d->bd_hbuf != NULL || d->bd_fbuf != NULL || d->bd_bif != NULL) { BPFD_UNLOCK(d); + CURVNET_RESTORE(); return (EBUSY); } d->bd_bufmode = *(u_int *)addr; @@ -1342,13 +1344,16 @@ bpfioctl(struct cdev *dev, u_long cmd, c break; case BIOCGETZMAX: - return (bpf_ioctl_getzmax(td, d, (size_t *)addr)); + error = bpf_ioctl_getzmax(td, d, (size_t *)addr); + break; case BIOCSETZBUF: - return (bpf_ioctl_setzbuf(td, d, (struct bpf_zbuf *)addr)); + error = bpf_ioctl_setzbuf(td, d, (struct bpf_zbuf *)addr); + break; case BIOCROTZBUF: - return (bpf_ioctl_rotzbuf(td, d, (struct bpf_zbuf *)addr)); + error = bpf_ioctl_rotzbuf(td, d, (struct bpf_zbuf *)addr); + break; } CURVNET_RESTORE(); return (error); From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:40:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E67EE1065670; Sun, 2 May 2010 16:40:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9FDC58FC15; Sun, 2 May 2010 16:40: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 o42GeImW014506; Sun, 2 May 2010 16:40:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GeIMR014504; Sun, 2 May 2010 16:40:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021640.o42GeIMR014504@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:40: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: r207518 - stable/8/sys/sparc64/sparc64 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, 02 May 2010 16:40:19 -0000 Author: marius Date: Sun May 2 16:40:18 2010 New Revision: 207518 URL: http://svn.freebsd.org/changeset/base/207518 Log: MFC: r206448 Do as the comment suggests and determine the bus space based on the last bus we actually mapped at rather than always based on the last bus we encountered while moving upward in the tree. Otherwise we might use the wrong bus space in case the bridge directly underneath the nexus doesn't require mapping, i.e. was skipped as it's the case for ssm(4) nodes. Modified: stable/8/sys/sparc64/sparc64/ofw_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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:39:15 2010 (r207517) +++ stable/8/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:40:18 2010 (r207518) @@ -186,13 +186,10 @@ OF_decode_addr(phandle_t node, int bank, name[sizeof(name) - 1] = '\0'; goto skip; } - if (lbus != bus) { - if (OF_getprop(bus, "#size-cells", &szc, - sizeof(szc)) == -1) - szc = 1; - if (szc < 1 || szc > 2) - return (ENXIO); - } + if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1) + szc = 1; + if (szc < 1 || szc > 2) + return (ENXIO); nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); bank = 0; for (i = 0; i < nbank; i++) { @@ -232,9 +229,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; } From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:44:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC281106566B; Sun, 2 May 2010 16:44:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CCCD58FC14; Sun, 2 May 2010 16:44: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 o42Gi6TB015410; Sun, 2 May 2010 16:44:06 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Gi6fS015409; Sun, 2 May 2010 16:44:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005021644.o42Gi6fS015409@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 16:44: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: r207519 - 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: Sun, 02 May 2010 16:44:07 -0000 Author: alc Date: Sun May 2 16:44:06 2010 New Revision: 207519 URL: http://svn.freebsd.org/changeset/base/207519 Log: This change addresses the race condition that was introduced by the previous revision, r207450, to this file. Specifically, between dropping the page queues lock in vm_contig_launder() and reacquiring it in vm_contig_launder_page(), the page may be removed from the active or inactive queue. It could be wired, freed, cached, etc. None of which vm_contig_launder_page() is prepared for. Reviewed by: kib, kmacy Modified: head/sys/vm/vm_contig.c Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Sun May 2 16:40:18 2010 (r207518) +++ head/sys/vm/vm_contig.c Sun May 2 16:44:06 2010 (r207519) @@ -96,33 +96,33 @@ vm_contig_launder_page(vm_page_t m, vm_p vm_page_t m_tmp; struct vnode *vp; struct mount *mp; - int vfslocked, dirty; + int vfslocked; - vm_page_lock(m); - vm_page_lock_queues(); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); object = m->object; if (!VM_OBJECT_TRYLOCK(object) && !vm_pageout_fallback_object_lock(m, next)) { - VM_OBJECT_UNLOCK(object); - vm_page_unlock_queues(); vm_page_unlock(m); + VM_OBJECT_UNLOCK(object); return (EAGAIN); } if (vm_page_sleep_if_busy(m, TRUE, "vpctw0")) { VM_OBJECT_UNLOCK(object); + vm_page_lock_queues(); return (EBUSY); } vm_page_test_dirty(m); if (m->dirty == 0 && m->hold_count == 0) pmap_remove_all(m); - if ((dirty = m->dirty) != 0) { - vm_page_unlock_queues(); + if (m->dirty != 0) { vm_page_unlock(m); if ((object->flags & OBJ_DEAD) != 0) { VM_OBJECT_UNLOCK(object); return (EAGAIN); } if (object->type == OBJT_VNODE) { + vm_page_unlock_queues(); vp = object->handle; vm_object_reference_locked(object); VM_OBJECT_UNLOCK(object); @@ -136,19 +136,20 @@ vm_contig_launder_page(vm_page_t m, vm_p VFS_UNLOCK_GIANT(vfslocked); vm_object_deallocate(object); vn_finished_write(mp); + vm_page_lock_queues(); return (0); } else if (object->type == OBJT_SWAP || object->type == OBJT_DEFAULT) { + vm_page_unlock_queues(); m_tmp = m; vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC); VM_OBJECT_UNLOCK(object); + vm_page_lock_queues(); return (0); } - } else if (m->hold_count == 0) - vm_page_cache(m); - - if (dirty == 0) { - vm_page_unlock_queues(); + } else { + if (m->hold_count == 0) + vm_page_cache(m); vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); @@ -167,11 +168,12 @@ vm_contig_launder(int queue) if ((m->flags & PG_MARKER) != 0) continue; + if (!vm_page_trylock(m)) + continue; KASSERT(VM_PAGE_INQUEUE2(m, queue), ("vm_contig_launder: page %p's queue is not %d", m, queue)); - vm_page_unlock_queues(); error = vm_contig_launder_page(m, &next); - vm_page_lock_queues(); + vm_page_lock_assert(m, MA_NOTOWNED); if (error == 0) return (TRUE); if (error == EBUSY) From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:45:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EB561065670; Sun, 2 May 2010 16:45:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7E52E8FC08; Sun, 2 May 2010 16:45: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 o42Gj8bU015684; Sun, 2 May 2010 16:45:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Gj8R8015682; Sun, 2 May 2010 16:45:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021645.o42Gj8R8015682@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:45: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: r207520 - stable/8/sys/sparc64/sparc64 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, 02 May 2010 16:45:08 -0000 Author: marius Date: Sun May 2 16:45:08 2010 New Revision: 207520 URL: http://svn.freebsd.org/changeset/base/207520 Log: MFC: r206449 Unlike the sun4v variant, the sun4u version of SUNW,set-trap-table actually only takes one argument. Modified: stable/8/sys/sparc64/sparc64/trap.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/trap.c Sun May 2 16:44:06 2010 (r207519) +++ stable/8/sys/sparc64/sparc64/trap.c Sun May 2 16:45:08 2010 (r207520) @@ -260,7 +260,8 @@ sun4u_set_traptable(void *tba_addr) cell_t tba_addr; } args = { (cell_t)"SUNW,set-trap-table", - 2, + 1, + 0, }; args.tba_addr = (cell_t)tba_addr; From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:45:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 108891065672; Sun, 2 May 2010 16:45:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F42058FC0C; Sun, 2 May 2010 16:45: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 o42Gj9sq015718; Sun, 2 May 2010 16:45:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Gj9Lj015716; Sun, 2 May 2010 16:45:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021645.o42Gj9Lj015716@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:45:09 +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: r207521 - stable/7/sys/sparc64/sparc64 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, 02 May 2010 16:45:10 -0000 Author: marius Date: Sun May 2 16:45:09 2010 New Revision: 207521 URL: http://svn.freebsd.org/changeset/base/207521 Log: MFC: r206449 Unlike the sun4v variant, the sun4u version of SUNW,set-trap-table actually only takes one argument. Modified: stable/7/sys/sparc64/sparc64/trap.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/sparc64/sparc64/trap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/trap.c Sun May 2 16:45:08 2010 (r207520) +++ stable/7/sys/sparc64/sparc64/trap.c Sun May 2 16:45:09 2010 (r207521) @@ -249,7 +249,8 @@ sun4u_set_traptable(void *tba_addr) cell_t tba_addr; } args = { (cell_t)"SUNW,set-trap-table", - 2, + 1, + 0, }; args.tba_addr = (cell_t)tba_addr; From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:46:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72A1F106566C; Sun, 2 May 2010 16:46:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 624BC8FC08; Sun, 2 May 2010 16:46: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 o42GkK6K016051; Sun, 2 May 2010 16:46:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GkKfX016050; Sun, 2 May 2010 16:46:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021646.o42GkKfX016050@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:46: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: r207522 - stable/8/sys/sparc64/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, 02 May 2010 16:46:20 -0000 Author: marius Date: Sun May 2 16:46:20 2010 New Revision: 207522 URL: http://svn.freebsd.org/changeset/base/207522 Log: MFC: r206450 Correct the DCR_IPE macro to refer to the right bit. Also improve the associated comment as besides US-IV+ these bits are only available with US-III++, i.e. the 1.2GHz version of the US-III+. Modified: stable/8/sys/sparc64/include/dcr.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/include/dcr.h ============================================================================== --- stable/8/sys/sparc64/include/dcr.h Sun May 2 16:45:09 2010 (r207521) +++ stable/8/sys/sparc64/include/dcr.h Sun May 2 16:46:20 2010 (r207522) @@ -43,8 +43,8 @@ #define DCR_OBSDATA_CT_MASK \ (((1UL << DCR_OBSDATA_CT_BITS) - 1) << DCR_OBSDATA_SHIFT) -/* The following bits are valid for the UltraSPARC-III+/IV+ only. */ -#define DCR_IPE (1UL << 5) +/* The following bits are valid for the UltraSPARC-III++/IV+ only. */ +#define DCR_IPE (1UL << 2) #define DCR_OBSDATA_CTP_BITS 6 #define DCR_OBSDATA_CTP_MASK \ From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:46:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69DBE106567D; Sun, 2 May 2010 16:46:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 599CD8FC1C; Sun, 2 May 2010 16:46: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 o42GkMqP016084; Sun, 2 May 2010 16:46:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GkMxK016082; Sun, 2 May 2010 16:46:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021646.o42GkMxK016082@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:46:22 +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: r207523 - stable/7/sys/sparc64/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, 02 May 2010 16:46:22 -0000 Author: marius Date: Sun May 2 16:46:22 2010 New Revision: 207523 URL: http://svn.freebsd.org/changeset/base/207523 Log: MFC: r206450 Correct the DCR_IPE macro to refer to the right bit. Also improve the associated comment as besides US-IV+ these bits are only available with US-III++, i.e. the 1.2GHz version of the US-III+. Modified: stable/7/sys/sparc64/include/dcr.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/sparc64/include/dcr.h ============================================================================== --- stable/7/sys/sparc64/include/dcr.h Sun May 2 16:46:20 2010 (r207522) +++ stable/7/sys/sparc64/include/dcr.h Sun May 2 16:46:22 2010 (r207523) @@ -43,8 +43,8 @@ #define DCR_OBSDATA_CT_MASK \ (((1UL << DCR_OBSDATA_CT_BITS) - 1) << DCR_OBSDATA_SHIFT) -/* The following bits are valid for the UltraSPARC-III+/IV+ only. */ -#define DCR_IPE (1UL << 5) +/* The following bits are valid for the UltraSPARC-III++/IV+ only. */ +#define DCR_IPE (1UL << 2) #define DCR_OBSDATA_CTP_BITS 6 #define DCR_OBSDATA_CTP_MASK \ From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:47:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B62C106566B; Sun, 2 May 2010 16:47:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0618FC18; Sun, 2 May 2010 16:47: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 o42GlprW016474; Sun, 2 May 2010 16:47:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Glp0P016473; Sun, 2 May 2010 16:47:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021647.o42Glp0P016473@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:47: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: r207524 - stable/8/sys/sparc64/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, 02 May 2010 16:47:51 -0000 Author: marius Date: Sun May 2 16:47:50 2010 New Revision: 207524 URL: http://svn.freebsd.org/changeset/base/207524 Log: MFC: r206480 Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs. Modified: stable/8/sys/sparc64/include/lsu.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/include/lsu.h ============================================================================== --- stable/8/sys/sparc64/include/lsu.h Sun May 2 16:46:22 2010 (r207523) +++ stable/8/sys/sparc64/include/lsu.h Sun May 2 16:47:50 2010 (r207524) @@ -29,7 +29,7 @@ /* * Definitions for the Load-Store-Unit Control Register. This is called - * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III. + * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III and greater. */ #define LSU_IC (1UL << 0) #define LSU_DC (1UL << 1) @@ -41,7 +41,7 @@ #define LSU_FM_BITS 16 #define LSU_FM_MASK (((1UL << LSU_FM_BITS) - 1) << LSU_FM_SHIFT) -#define LSU_VM_SHIFT 25 +#define LSU_VM_SHIFT 25 #define LSU_VM_BITS 8 #define LSU_VM_MASK (((1UL << LSU_VM_BITS) - 1) << LSU_VM_SHIFT) @@ -65,4 +65,22 @@ #define LSU_CV (1UL << 48) #define LSU_CP (1UL << 49) +/* The following bit is valid for the UltraSPARC-IV only. */ +#define LSU_WIH (1UL << 4) + +/* The following bits are valid for the UltraSPARC-IV+ only. */ +#define LSU_PPS_SHIFT 50 +#define LSU_PPS_BITS 2 +#define LSU_PPS_MASK (((1UL << LSU_PPS_BITS) - 1) << LSU_PPS_SHIFT) + +#define LSU_IPS_SHIFT 52 +#define LSU_IPS_BITS 2 +#define LSU_IPS_MASK (((1UL << LSU_IPS_BITS) - 1) << LSU_IPS_SHIFT) + +#define LSU_PCM (1UL << 54) +#define LSU_WCE (1UL << 55) + +/* The following bit is valid for the SPARC64 V, VI, VII and VIIIfx only. */ +#define LSU_WEAK_SPCA (1UL << 41) + #endif /* _MACHINE_LSU_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:47:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB39A106564A; Sun, 2 May 2010 16:47:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id DAF448FC13; Sun, 2 May 2010 16:47: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 o42GlsPu016540; Sun, 2 May 2010 16:47:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GlsE9016538; Sun, 2 May 2010 16:47:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021647.o42GlsE9016538@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:47: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: r207525 - stable/7/sys/sparc64/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, 02 May 2010 16:47:55 -0000 Author: marius Date: Sun May 2 16:47:54 2010 New Revision: 207525 URL: http://svn.freebsd.org/changeset/base/207525 Log: MFC: r206480 Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs. Modified: stable/7/sys/sparc64/include/lsu.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/sparc64/include/lsu.h ============================================================================== --- stable/7/sys/sparc64/include/lsu.h Sun May 2 16:47:50 2010 (r207524) +++ stable/7/sys/sparc64/include/lsu.h Sun May 2 16:47:54 2010 (r207525) @@ -29,7 +29,7 @@ /* * Definitions for the Load-Store-Unit Control Register. This is called - * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III. + * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III and greater. */ #define LSU_IC (1UL << 0) #define LSU_DC (1UL << 1) @@ -41,7 +41,7 @@ #define LSU_FM_BITS 16 #define LSU_FM_MASK (((1UL << LSU_FM_BITS) - 1) << LSU_FM_SHIFT) -#define LSU_VM_SHIFT 25 +#define LSU_VM_SHIFT 25 #define LSU_VM_BITS 8 #define LSU_VM_MASK (((1UL << LSU_VM_BITS) - 1) << LSU_VM_SHIFT) @@ -65,4 +65,22 @@ #define LSU_CV (1UL << 48) #define LSU_CP (1UL << 49) +/* The following bit is valid for the UltraSPARC-IV only. */ +#define LSU_WIH (1UL << 4) + +/* The following bits are valid for the UltraSPARC-IV+ only. */ +#define LSU_PPS_SHIFT 50 +#define LSU_PPS_BITS 2 +#define LSU_PPS_MASK (((1UL << LSU_PPS_BITS) - 1) << LSU_PPS_SHIFT) + +#define LSU_IPS_SHIFT 52 +#define LSU_IPS_BITS 2 +#define LSU_IPS_MASK (((1UL << LSU_IPS_BITS) - 1) << LSU_IPS_SHIFT) + +#define LSU_PCM (1UL << 54) +#define LSU_WCE (1UL << 55) + +/* The following bit is valid for the SPARC64 V, VI, VII and VIIIfx only. */ +#define LSU_WEAK_SPCA (1UL << 41) + #endif /* _MACHINE_LSU_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:52:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36B9F1065700; Sun, 2 May 2010 16:52:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 25BC48FC14; Sun, 2 May 2010 16:52: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 o42GqNVx017574; Sun, 2 May 2010 16:52:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GqN2t017573; Sun, 2 May 2010 16:52:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021652.o42GqN2t017573@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:52:23 +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: r207526 - stable/8/lib/libc/softfloat 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, 02 May 2010 16:52:24 -0000 Author: marius Date: Sun May 2 16:52:23 2010 New Revision: 207526 URL: http://svn.freebsd.org/changeset/base/207526 Log: MFC: r206490, r206492 While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tininess is detected before rounding therefore rounding up to the smallest normalized number should set the underflow flag. This change is needed for using SoftFloat on sparc64 for reference purposes. PR: 144900 Submitted by: Peter Jeremy Modified: stable/8/lib/libc/softfloat/softfloat-specialize Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/softfloat/softfloat-specialize ============================================================================== --- stable/8/lib/libc/softfloat/softfloat-specialize Sun May 2 16:47:54 2010 (r207525) +++ stable/8/lib/libc/softfloat/softfloat-specialize Sun May 2 16:52:23 2010 (r207526) @@ -44,7 +44,11 @@ Underflow tininess-detection mode, stati #ifdef SOFTFLOAT_FOR_GCC static #endif +#ifdef __sparc64__ +int8 float_detect_tininess = float_tininess_before_rounding; +#else int8 float_detect_tininess = float_tininess_after_rounding; +#endif /* ------------------------------------------------------------------------------- From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:52:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EF261065702; Sun, 2 May 2010 16:52:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAD68FC20; Sun, 2 May 2010 16:52: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 o42GqOse017627; Sun, 2 May 2010 16:52:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GqOeE017625; Sun, 2 May 2010 16:52:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021652.o42GqOeE017625@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:52:24 +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: r207527 - stable/7/lib/libc/softfloat 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, 02 May 2010 16:52:24 -0000 Author: marius Date: Sun May 2 16:52:24 2010 New Revision: 207527 URL: http://svn.freebsd.org/changeset/base/207527 Log: MFC: r206490, r206492 While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tininess is detected before rounding therefore rounding up to the smallest normalized number should set the underflow flag. This change is needed for using SoftFloat on sparc64 for reference purposes. PR: 144900 Submitted by: Peter Jeremy Modified: stable/7/lib/libc/softfloat/softfloat-specialize Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/softfloat/softfloat-specialize ============================================================================== --- stable/7/lib/libc/softfloat/softfloat-specialize Sun May 2 16:52:23 2010 (r207526) +++ stable/7/lib/libc/softfloat/softfloat-specialize Sun May 2 16:52:24 2010 (r207527) @@ -44,7 +44,11 @@ Underflow tininess-detection mode, stati #ifdef SOFTFLOAT_FOR_GCC static #endif +#ifdef __sparc64__ +int8 float_detect_tininess = float_tininess_before_rounding; +#else int8 float_detect_tininess = float_tininess_after_rounding; +#endif /* ------------------------------------------------------------------------------- From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:55:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B004106566B; Sun, 2 May 2010 16:55:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1AB148FC1C; Sun, 2 May 2010 16:55: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 o42GtBnl018367; Sun, 2 May 2010 16:55:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GtAl6018365; Sun, 2 May 2010 16:55:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021655.o42GtAl6018365@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:55: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: r207528 - in stable/8/tools/test: . testfloat 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, 02 May 2010 16:55:11 -0000 Author: marius Date: Sun May 2 16:55:10 2010 New Revision: 207528 URL: http://svn.freebsd.org/changeset/base/207528 Log: MFC: r207151 Add a TestFloat based test suite for floating-point implementations currently supporting sparc64. After a `make depend all` there are three programs; testsoftfloat for testing against the SoftFloat in src/lib/libc/softfloat for reference purposes, testemufloat for testing the emulator source in src/lib/libc/sparc64/fpu and testfloat for testing with the installed libc. Support for other architectures can be added as needed. PR: 144900 Submitted by: Peter Jeremy Added: stable/8/tools/test/testfloat/ - copied from r207151, head/tools/test/testfloat/ Modified: stable/8/tools/test/README Directory Properties: stable/8/tools/test/ (props changed) Modified: stable/8/tools/test/README ============================================================================== --- stable/8/tools/test/README Sun May 2 16:52:24 2010 (r207527) +++ stable/8/tools/test/README Sun May 2 16:55:10 2010 (r207528) @@ -11,3 +11,4 @@ devrandom Programs to test /dev/*random. dtrace DTrace test suite malloc A program to test and benchmark malloc(). posixshm A program to test POSIX shared memory. +testfloat Programs to test floating-point implementations From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:55:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E78C106566C; Sun, 2 May 2010 16:55:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5E33F8FC13; Sun, 2 May 2010 16:55: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 o42GtDgo018403; Sun, 2 May 2010 16:55:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GtDsd018401; Sun, 2 May 2010 16:55:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021655.o42GtDsd018401@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:55:13 +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: r207529 - in stable/7/tools/test: . testfloat 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, 02 May 2010 16:55:13 -0000 Author: marius Date: Sun May 2 16:55:13 2010 New Revision: 207529 URL: http://svn.freebsd.org/changeset/base/207529 Log: MFC: r207151 Add a TestFloat based test suite for floating-point implementations currently supporting sparc64. After a `make depend all` there are three programs; testsoftfloat for testing against the SoftFloat in src/lib/libc/softfloat for reference purposes, testemufloat for testing the emulator source in src/lib/libc/sparc64/fpu and testfloat for testing with the installed libc. Support for other architectures can be added as needed. PR: 144900 Submitted by: Peter Jeremy Added: stable/7/tools/test/testfloat/ - copied from r207151, head/tools/test/testfloat/ Modified: stable/7/tools/test/README Directory Properties: stable/7/tools/test/ (props changed) Modified: stable/7/tools/test/README ============================================================================== --- stable/7/tools/test/README Sun May 2 16:55:10 2010 (r207528) +++ stable/7/tools/test/README Sun May 2 16:55:13 2010 (r207529) @@ -10,3 +10,4 @@ Please make a subdir per program, and ad devrandom Programs to test /dev/*random. malloc A program to test and benchmark malloc(). posixshm A program to test POSIX shared memory. +testfloat Programs to test floating-point implementations From owner-svn-src-all@FreeBSD.ORG Sun May 2 17:33:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0525D106566B; Sun, 2 May 2010 17:33:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E92E18FC22; Sun, 2 May 2010 17:33: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 o42HXkex026825; Sun, 2 May 2010 17:33:46 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42HXkpp026820; Sun, 2 May 2010 17:33:46 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005021733.o42HXkpp026820@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 17:33: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: r207530 - in head/sys: fs/tmpfs 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, 02 May 2010 17:33:47 -0000 Author: alc Date: Sun May 2 17:33:46 2010 New Revision: 207530 URL: http://svn.freebsd.org/changeset/base/207530 Log: It makes no sense for vm_page_sleep_if_busy()'s helper, vm_page_sleep(), to unconditionally set PG_REFERENCED on a page before sleeping. In many cases, it's perfectly ok for the page to disappear, i.e., be reclaimed by the page daemon, before the caller to vm_page_sleep() is reawakened. Instead, we now explicitly set PG_REFERENCED in those cases where having the page persist until the caller is awakened is clearly desirable. Note, however, that setting PG_REFERENCED on the page is still only a hint, and not a guarantee that the page should persist. Modified: head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/vfs_bio.c head/sys/vm/vm_fault.c head/sys/vm/vm_page.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun May 2 16:55:13 2010 (r207529) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun May 2 17:33:46 2010 (r207530) @@ -516,8 +516,16 @@ tmpfs_mappedread(vm_object_t vobj, vm_ob lookupvpg: if (((m = vm_page_lookup(vobj, idx)) != NULL) && vm_page_is_valid(m, offset, tlen)) { - if (vm_page_sleep_if_busy(m, FALSE, "tmfsmr")) + if ((m->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and sleeping so + * that the page daemon is less likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(m, PG_REFERENCED); + vm_page_sleep(m, "tmfsmr"); goto lookupvpg; + } vm_page_busy(m); VM_OBJECT_UNLOCK(vobj); error = uiomove_fromphys(&m, offset, tlen, uio); @@ -526,8 +534,16 @@ lookupvpg: VM_OBJECT_UNLOCK(vobj); return (error); } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { - if (vm_page_sleep_if_busy(m, FALSE, "tmfsmr")) + if ((m->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and sleeping so + * that the page daemon is less likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(m, PG_REFERENCED); + vm_page_sleep(m, "tmfsmr"); goto lookupvpg; + } vm_page_busy(m); VM_OBJECT_UNLOCK(vobj); sched_pin(); @@ -627,8 +643,16 @@ tmpfs_mappedwrite(vm_object_t vobj, vm_o lookupvpg: if (((vpg = vm_page_lookup(vobj, idx)) != NULL) && vm_page_is_valid(vpg, offset, tlen)) { - if (vm_page_sleep_if_busy(vpg, FALSE, "tmfsmw")) + if ((vpg->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and sleeping so + * that the page daemon is less likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(vpg, PG_REFERENCED); + vm_page_sleep(vpg, "tmfsmw"); goto lookupvpg; + } vm_page_busy(vpg); vm_page_lock_queues(); vm_page_undirty(vpg); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun May 2 16:55:13 2010 (r207529) +++ head/sys/kern/vfs_bio.c Sun May 2 17:33:46 2010 (r207530) @@ -3024,8 +3024,17 @@ allocbuf(struct buf *bp, int size) * vm_fault->getpages->cluster_read->allocbuf * */ - if (vm_page_sleep_if_busy(m, FALSE, "pgtblk")) + if ((m->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking + * and sleeping so that the page daemon + * is less likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(m, PG_REFERENCED); + vm_page_sleep(m, "pgtblk"); continue; + } /* * We have a good page. Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun May 2 16:55:13 2010 (r207529) +++ head/sys/vm/vm_fault.c Sun May 2 17:33:46 2010 (r207530) @@ -338,6 +338,12 @@ RetryFault:; * to pmap it. */ if ((fs.m->oflags & VPO_BUSY) || fs.m->busy) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_flag_set(fs.m, PG_REFERENCED); vm_page_unlock_queues(); vm_page_unlock(fs.m); VM_OBJECT_UNLOCK(fs.object); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun May 2 16:55:13 2010 (r207529) +++ head/sys/vm/vm_page.c Sun May 2 17:33:46 2010 (r207530) @@ -599,7 +599,7 @@ vm_page_free_zero(vm_page_t m) /* * vm_page_sleep: * - * Sleep and release the page queues lock. + * Sleep and release the page and page queues locks. * * The object containing the given page must be locked. */ @@ -608,13 +608,10 @@ vm_page_sleep(vm_page_t m, const char *m { VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); - if (!mtx_owned(vm_page_lockptr(m))) - vm_page_lock(m); - if (!mtx_owned(&vm_page_queue_mtx)) - vm_page_lock_queues(); - vm_page_flag_set(m, PG_REFERENCED); - vm_page_unlock_queues(); - vm_page_unlock(m); + if (mtx_owned(&vm_page_queue_mtx)) + vm_page_unlock_queues(); + if (mtx_owned(vm_page_lockptr(m))) + vm_page_unlock(m); /* * It's possible that while we sleep, the page will get @@ -1896,7 +1893,17 @@ vm_page_grab(vm_object_t object, vm_pind VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); retrylookup: if ((m = vm_page_lookup(object, pindex)) != NULL) { - if (vm_page_sleep_if_busy(m, TRUE, "pgrbwt")) { + if ((m->oflags & VPO_BUSY) != 0 || m->busy != 0) { + if ((allocflags & VM_ALLOC_RETRY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_lock_queues(); + vm_page_flag_set(m, PG_REFERENCED); + } + vm_page_sleep(m, "pgrbwt"); if ((allocflags & VM_ALLOC_RETRY) == 0) return (NULL); goto retrylookup; From owner-svn-src-all@FreeBSD.ORG Sun May 2 18:09:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C244106566B; Sun, 2 May 2010 18:09:34 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD158FC08; Sun, 2 May 2010 18:09: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 o42I9YNi034616; Sun, 2 May 2010 18:09:34 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42I9YEe034614; Sun, 2 May 2010 18:09:34 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005021809.o42I9YEe034614@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 18:09: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: r207531 - 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: Sun, 02 May 2010 18:09:34 -0000 Author: alc Date: Sun May 2 18:09:33 2010 New Revision: 207531 URL: http://svn.freebsd.org/changeset/base/207531 Log: Correct an error in r207410: Remove an unlock of a lock that is no longer held. Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sun May 2 17:33:46 2010 (r207530) +++ head/sys/vm/vm_object.c Sun May 2 18:09:33 2010 (r207531) @@ -1454,7 +1454,6 @@ retry: * not be changed by this operation. */ if ((m->oflags & VPO_BUSY) || m->busy) { - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(new_object); m->oflags |= VPO_WANTED; msleep(m, VM_OBJECT_MTX(orig_object), PVM, "spltwt", 0); From owner-svn-src-all@FreeBSD.ORG Sun May 2 19:05:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1573C106566B; Sun, 2 May 2010 19:05:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E0A8D8FC18; Sun, 2 May 2010 19:05: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 o42J5vGU046984; Sun, 2 May 2010 19:05:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42J5veA046982; Sun, 2 May 2010 19:05:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021905.o42J5veA046982@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 19:05: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: r207532 - head/sys/dev/quicc 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, 02 May 2010 19:05:58 -0000 Author: marius Date: Sun May 2 19:05:57 2010 New Revision: 207532 URL: http://svn.freebsd.org/changeset/base/207532 Log: Remove a soft member which was never used. Approved by: marcel Modified: head/sys/dev/quicc/quicc_bfe.h Modified: head/sys/dev/quicc/quicc_bfe.h ============================================================================== --- head/sys/dev/quicc/quicc_bfe.h Sun May 2 18:09:33 2010 (r207531) +++ head/sys/dev/quicc/quicc_bfe.h Sun May 2 19:05:57 2010 (r207532) @@ -50,7 +50,6 @@ struct quicc_softc { u_int sc_clock; int sc_fastintr:1; - int sc_leaving:1; int sc_polled:1; }; From owner-svn-src-all@FreeBSD.ORG Sun May 2 19:07:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F322106566B; Sun, 2 May 2010 19:07:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2178FC1C; Sun, 2 May 2010 19:07: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 o42J7J21047314; Sun, 2 May 2010 19:07:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42J7JXq047311; Sun, 2 May 2010 19:07:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021907.o42J7JXq047311@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 19:07: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: r207533 - in head/sys: dev/uart mips/cavium 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, 02 May 2010 19:07:19 -0000 Author: marius Date: Sun May 2 19:07:19 2010 New Revision: 207533 URL: http://svn.freebsd.org/changeset/base/207533 Log: Remove redundant checking of sc_leaving (uart_intr() already handles this). Approved by: marcel Modified: head/sys/dev/uart/uart_dev_ns8250.c head/sys/mips/cavium/uart_dev_oct16550.c Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Sun May 2 19:05:57 2010 (r207532) +++ head/sys/dev/uart/uart_dev_ns8250.c Sun May 2 19:07:19 2010 (r207533) @@ -604,7 +604,7 @@ ns8250_bus_ipend(struct uart_softc *sc) if (ipend == 0) ns8250_clrint(bas); uart_unlock(sc->sc_hwmtx); - return ((sc->sc_leaving) ? 0 : ipend); + return (ipend); } static int Modified: head/sys/mips/cavium/uart_dev_oct16550.c ============================================================================== --- head/sys/mips/cavium/uart_dev_oct16550.c Sun May 2 19:05:57 2010 (r207532) +++ head/sys/mips/cavium/uart_dev_oct16550.c Sun May 2 19:07:19 2010 (r207533) @@ -644,12 +644,9 @@ oct16550_bus_ipend(struct uart_softc *sc if (ipend) octeon_led_run_wheel(&where1, 6 + device_get_unit(sc->sc_dev)); #endif - return ((sc->sc_leaving) ? 0 : ipend); + return (ipend); } - - - static int oct16550_bus_param (struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) From owner-svn-src-all@FreeBSD.ORG Sun May 2 19:10:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E2351065670; Sun, 2 May 2010 19:10:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE8F8FC1F; Sun, 2 May 2010 19:10: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 o42JARdN048038; Sun, 2 May 2010 19:10:27 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42JARhV048036; Sun, 2 May 2010 19:10:27 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005021910.o42JARhV048036@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 19:10: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: r207534 - 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: Sun, 02 May 2010 19:10:27 -0000 Author: alc Date: Sun May 2 19:10:27 2010 New Revision: 207534 URL: http://svn.freebsd.org/changeset/base/207534 Log: Properly synchronize access to the page's hold_count in vfs_vmio_release(). Reviewed by: kib Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun May 2 19:07:19 2010 (r207533) +++ head/sys/kern/vfs_bio.c Sun May 2 19:10:27 2010 (r207534) @@ -1563,7 +1563,6 @@ vfs_vmio_release(struct buf *bp) vm_page_t m; VM_OBJECT_LOCK(bp->b_bufobj->bo_object); - vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; bp->b_pages[i] = NULL; @@ -1571,16 +1570,16 @@ vfs_vmio_release(struct buf *bp) * In order to keep page LRU ordering consistent, put * everything on the inactive queue. */ + vm_page_lock(m); + vm_page_lock_queues(); vm_page_unwire(m, 0); /* * We don't mess with busy pages, it is * the responsibility of the process that * busied the pages to deal with them. */ - if ((m->oflags & VPO_BUSY) || (m->busy != 0)) - continue; - - if (m->wire_count == 0) { + if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && + m->wire_count == 0) { /* * Might as well free the page if we can and it has * no valid data. We also free the page if the @@ -1595,8 +1594,9 @@ vfs_vmio_release(struct buf *bp) vm_page_try_to_cache(m); } } + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); pmap_qremove(trunc_page((vm_offset_t) bp->b_data), bp->b_npages); From owner-svn-src-all@FreeBSD.ORG Sun May 2 19:25:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86866106566B; Sun, 2 May 2010 19:25:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 76E768FC19; Sun, 2 May 2010 19:25: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 o42JPMVR051329; Sun, 2 May 2010 19:25:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42JPM2L051327; Sun, 2 May 2010 19:25:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005021925.o42JPM2L051327@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 2 May 2010 19:25: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: r207535 - 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: Sun, 02 May 2010 19:25:22 -0000 Author: kib Date: Sun May 2 19:25:22 2010 New Revision: 207535 URL: http://svn.freebsd.org/changeset/base/207535 Log: Lock the page around hold_count access. Reviewed by: alc Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun May 2 19:10:27 2010 (r207534) +++ head/sys/kern/uipc_syscalls.c Sun May 2 19:25:22 2010 (r207535) @@ -2108,6 +2108,7 @@ retry_space: mbstat.sf_iocnt++; } if (error) { + vm_page_lock(pg); vm_page_lock_queues(); vm_page_unwire(pg, 0); /* @@ -2121,6 +2122,7 @@ retry_space: vm_page_free(pg); } vm_page_unlock_queues(); + vm_page_unlock(pg); VM_OBJECT_UNLOCK(obj); if (error == EAGAIN) error = 0; /* not a real error */ From owner-svn-src-all@FreeBSD.ORG Sun May 2 19:28:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94FEE1065742; Sun, 2 May 2010 19:28:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 81C6E8FC0C; Sun, 2 May 2010 19:28:31 +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 o42JSVWm052050; Sun, 2 May 2010 19:28:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42JSVoY052041; Sun, 2 May 2010 19:28:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021928.o42JSVoY052041@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 19:28:31 +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: r207536 - in head: share/man/man4 sys/arm/mv sys/conf sys/dev/mvs sys/modules sys/modules/mvs 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, 02 May 2010 19:28:31 -0000 Author: mav Date: Sun May 2 19:28:30 2010 New Revision: 207536 URL: http://svn.freebsd.org/changeset/base/207536 Log: Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers driver for CAM ATA subsystem. This driver supports same hardware as atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides many additional features, such as NCQ, PMP, etc. Added: head/share/man/man4/mvs.4 (contents, props changed) head/sys/dev/mvs/ head/sys/dev/mvs/mvs.c (contents, props changed) head/sys/dev/mvs/mvs.h (contents, props changed) head/sys/dev/mvs/mvs_if.m (contents, props changed) head/sys/dev/mvs/mvs_pci.c (contents, props changed) head/sys/dev/mvs/mvs_soc.c (contents, props changed) head/sys/modules/mvs/ head/sys/modules/mvs/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/arm/mv/files.mv head/sys/conf/NOTES head/sys/conf/files head/sys/conf/kmod.mk head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun May 2 19:25:22 2010 (r207535) +++ head/share/man/man4/Makefile Sun May 2 19:28:30 2010 (r207536) @@ -220,6 +220,7 @@ MAN= aac.4 \ msk.4 \ mtio.4 \ multicast.4 \ + mvs.4 \ mwl.4 \ mwlfw.4 \ mxge.4 \ Added: head/share/man/man4/mvs.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/mvs.4 Sun May 2 19:28:30 2010 (r207536) @@ -0,0 +1,176 @@ +.\" Copyright (c) 2009 Alexander Motin +.\" 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. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" 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$ +.\" +.Dd April 27, 2010 +.Dt MVS 4 +.Os +.Sh NAME +.Nm mvs +.Nd Marvell Serial ATA Host Controller driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device pci" +.Cd "device scbus" +.Cd "device mvs" +.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 +mvs_load="YES" +.Ed +.Pp +The following tunables are settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.mvs. Ns Ar X Ns Va .msi +controls Message Signaled Interrupts (MSI) usage by the specified controller. +.It Va hint.mvs. Ns Ar X Ns Va .ccc +controls Command Completion Coalescing (CCC) usage by the specified controller. +Non-zero value enables CCC and defines maximum time (in us), request can wait +for interrupt. +CCC reduces number of context switches on systems with many parallel requests, +but it can decrease disk performance on some workloads due to additional +command latency. +.It Va hint.mvs. Ns Ar X Ns Va .cccc +defines number of completed commands for CCC, which trigger interrupt without +waiting for specified coalescing timeout. +.It Va hint.mvs. Ns Ar X Ns Va .pm_level +controls SATA interface Power Management for the specified channel, +allowing some power to be saved at the cost of additional command +latency. +Possible values: +.Bl -tag -compact +.It 0 +interface Power Management is disabled (default); +.It 1 +device is allowed to initiate PM state change, host is passive; +.It 4 +driver initiates PARTIAL PM state transition 1ms after port becomes idle; +.It 5 +driver initiates SLUMBER PM state transition 125ms after port becomes idle. +.El +.Pp +Note that interface Power Management is not compatible with +device presence detection. +A manual bus reset is needed on device hot-plug. +.It Va hint.mvs. Ns Ar X Ns Va .sata_rev +setting to nonzero value limits maximum SATA revision (speed). +Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. +.El +.Sh DESCRIPTION +This driver provides the +.Xr CAM 4 +subsystem with native access to the +.Tn SATA +ports of several generations (Gen-I/II/IIe) of Marvell SATA controllers. +Each SATA port found is represented to CAM as a separate bus with one +target, or, if HBA supports Port Multipliers (Gen-II/IIe), 16 targets. +Most of the bus-management details are handled by the SATA-specific +transport of CAM. +Connected ATA disks are handled by the ATA protocol disk peripheral driver +.Xr ada 4 . +ATAPI devices are handled by the SCSI protocol peripheral drivers +.Xr cd 4 , +.Xr da 4 , +.Xr sa 4 , +etc. +.Pp +Driver features include support for Serial ATA and ATAPI devices, +Port Multipliers (including FIS-based switching, when supported), +hardware command queues (up to 31 command per port), +Native Command Queuing, SATA interface Power Management, device hot-plug +and Message Signaled Interrupts. +.Pp +Same hardware is also supported by atamarvell and ataadaptec drivers from +.Xr ata 4 +subsystem. +If both drivers are loaded at the same time, this one will be +given precedence as the more functional of the two. +.Sh HARDWARE +The +.Nm +driver supports the following controllers: +.Bl -tag -compact +.It Gen-I (SATA 1.5Gbps): +.Bl -bullet -compact +.It +88SX5040 +.It +88SX5041 +.It +88SX5080 +.It +88SX5081 +.El +.It Gen-II (SATA 3Gbps, NCQ, PMP): +.Bl -bullet -compact +.It +88SX6040 +.It +88SX6041 (including Adaptec 1420SA) +.It +88SX6080 +.It +88SX6081 +.El +.It Gen-IIe (SATA 3Gbps, NCQ, PMP with FBS): +.Bl -bullet -compact +.It +88SX6042 +.It +88SX7042 (including Adaptec 1430SA) +.It +88F5182 SoC +.It +88F6281 SoC +.It +MV78100 SoC +.El +.El +Note, that this hardware supports command queueing and FIS-based switching +only for ATA DMA commands. ATAPI and non-DMA ATA commands executed one by one +for each port. +.Pp +.Sh SEE ALSO +.Xr ada 4 , +.Xr ata 4 , +.Xr cam 4 , +.Xr cd 4 , +.Xr da 4 , +.Xr sa 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org . Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Sun May 2 19:25:22 2010 (r207535) +++ head/sys/arm/mv/files.mv Sun May 2 19:28:30 2010 (r207536) @@ -30,6 +30,7 @@ arm/mv/timer.c standard arm/mv/twsi.c optional iicbus dev/mge/if_mge.c optional mge +dev/mvs/mvs_soc.c optional mvs dev/uart/uart_bus_mbus.c optional uart dev/uart/uart_cpu_mv.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun May 2 19:25:22 2010 (r207535) +++ head/sys/conf/NOTES Sun May 2 19:28:30 2010 (r207536) @@ -1660,12 +1660,14 @@ device twe # 3ware ATA RAID # Serial ATA host controllers: # # ahci: Advanced Host Controller Interface (AHCI) compatible +# mvs: Marvell 88SX50XX/88SX60XX/88SX70XX/SoC controllers # siis: SiliconImage SiI3124/SiI3132/SiI3531 controllers # # These drivers are part of cam(4) subsystem. They supersede less featured # ata(4) subsystem drivers, supporting same hardware. device ahci +device mvs device siis # Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun May 2 19:25:22 2010 (r207535) +++ head/sys/conf/files Sun May 2 19:28:30 2010 (r207536) @@ -1293,6 +1293,9 @@ dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt dev/msk/if_msk.c optional msk inet +dev/mvs/mvs.c optional mvs +dev/mvs/mvs_if.m standard +dev/mvs/mvs_pci.c optional mvs pci dev/mwl/if_mwl.c optional mwl dev/mwl/if_mwl_pci.c optional mwl pci dev/mwl/mwlhal.c optional mwl Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sun May 2 19:25:22 2010 (r207535) +++ head/sys/conf/kmod.mk Sun May 2 19:28:30 2010 (r207536) @@ -342,7 +342,7 @@ MFILES?= dev/acpica/acpi_if.m dev/acpi_s dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ - dev/mii/miibus_if.m dev/ofw/ofw_bus_if.m \ + dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \ dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \ dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \ Added: head/sys/dev/mvs/mvs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mvs/mvs.c Sun May 2 19:28:30 2010 (r207536) @@ -0,0 +1,2173 @@ +/*- + * Copyright (c) 2010 Alexander Motin + * 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, + * without modification, immediately at the beginning of the file. + * 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 "mvs.h" + +#include +#include +#include +#include +#include + +/* local prototypes */ +static int mvs_ch_suspend(device_t dev); +static int mvs_ch_resume(device_t dev); +static void mvs_dmainit(device_t dev); +static void mvs_dmasetupc_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); +static void mvs_dmafini(device_t dev); +static void mvs_slotsalloc(device_t dev); +static void mvs_slotsfree(device_t dev); +static void mvs_setup_edma_queues(device_t dev); +static void mvs_set_edma_mode(device_t dev, enum mvs_edma_mode mode); +static void mvs_ch_pm(void *arg); +static void mvs_ch_intr_locked(void *data); +static void mvs_ch_intr(void *data); +static void mvs_reset(device_t dev); +static void mvs_softreset(device_t dev, union ccb *ccb); + +static int mvs_sata_connect(struct mvs_channel *ch); +static int mvs_sata_phy_reset(device_t dev); +static int mvs_wait(device_t dev, u_int s, u_int c, int t); +static void mvs_tfd_read(device_t dev, union ccb *ccb); +static void mvs_tfd_write(device_t dev, union ccb *ccb); +static void mvs_legacy_intr(device_t dev); +static void mvs_crbq_intr(device_t dev); +static void mvs_begin_transaction(device_t dev, union ccb *ccb); +static void mvs_legacy_execute_transaction(struct mvs_slot *slot); +static void mvs_timeout(struct mvs_slot *slot); +static void mvs_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error); +static void mvs_requeue_frozen(device_t dev); +static void mvs_execute_transaction(struct mvs_slot *slot); +static void mvs_end_transaction(struct mvs_slot *slot, enum mvs_err_type et); + +static void mvs_issue_read_log(device_t dev); +static void mvs_process_read_log(device_t dev, union ccb *ccb); + +static void mvsaction(struct cam_sim *sim, union ccb *ccb); +static void mvspoll(struct cam_sim *sim); + +MALLOC_DEFINE(M_MVS, "MVS driver", "MVS driver data buffers"); + +static int +mvs_ch_probe(device_t dev) +{ + + device_set_desc_copy(dev, "Marvell SATA channel"); + return (0); +} + +static int +mvs_ch_attach(device_t dev) +{ + struct mvs_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct mvs_channel *ch = device_get_softc(dev); + struct cam_devq *devq; + int rid, error, i, sata_rev = 0; + + ch->dev = dev; + ch->unit = (intptr_t)device_get_ivars(dev); + ch->quirks = ctlr->quirks; + mtx_init(&ch->mtx, "MVS channel lock", NULL, MTX_DEF); + resource_int_value(device_get_name(dev), + device_get_unit(dev), "pm_level", &ch->pm_level); + if (ch->pm_level > 3) + callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); + resource_int_value(device_get_name(dev), + device_get_unit(dev), "sata_rev", &sata_rev); + for (i = 0; i < 16; i++) { + ch->user[i].revision = sata_rev; + ch->user[i].mode = 0; + ch->user[i].bytecount = (ch->quirks & MVS_Q_GENIIE) ? 8192 : 2048; + ch->user[i].tags = MVS_MAX_SLOTS; + ch->curr[i] = ch->user[i]; + if (ch->pm_level) { + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ | + CTS_SATA_CAPS_H_APST | + CTS_SATA_CAPS_D_PMREQ | CTS_SATA_CAPS_D_APST; + } + } + rid = ch->unit; + if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE))) + return (ENXIO); + mvs_dmainit(dev); + mvs_slotsalloc(dev); + mvs_ch_resume(dev); + mtx_lock(&ch->mtx); + rid = ATA_IRQ_RID; + if (!(ch->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &rid, RF_SHAREABLE | RF_ACTIVE))) { + device_printf(dev, "Unable to map interrupt\n"); + error = ENXIO; + goto err0; + } + if ((bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, + mvs_ch_intr_locked, dev, &ch->ih))) { + device_printf(dev, "Unable to setup interrupt\n"); + error = ENXIO; + goto err1; + } + /* Create the device queue for our SIM. */ + devq = cam_simq_alloc(MVS_MAX_SLOTS - 1); + if (devq == NULL) { + device_printf(dev, "Unable to allocate simq\n"); + error = ENOMEM; + goto err1; + } + /* Construct SIM entry */ + ch->sim = cam_sim_alloc(mvsaction, mvspoll, "mvsch", ch, + device_get_unit(dev), &ch->mtx, + 2, (ch->quirks & MVS_Q_GENI) ? 0 : MVS_MAX_SLOTS - 1, + devq); + if (ch->sim == NULL) { + cam_simq_free(devq); + device_printf(dev, "unable to allocate sim\n"); + error = ENOMEM; + goto err1; + } + if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { + device_printf(dev, "unable to register xpt bus\n"); + error = ENXIO; + goto err2; + } + if (xpt_create_path(&ch->path, /*periph*/NULL, cam_sim_path(ch->sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + device_printf(dev, "unable to create path\n"); + error = ENXIO; + goto err3; + } + if (ch->pm_level > 3) { + callout_reset(&ch->pm_timer, + (ch->pm_level == 4) ? hz / 1000 : hz / 8, + mvs_ch_pm, dev); + } + mtx_unlock(&ch->mtx); + return (0); + +err3: + xpt_bus_deregister(cam_sim_path(ch->sim)); +err2: + cam_sim_free(ch->sim, /*free_devq*/TRUE); +err1: + bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); +err0: + bus_release_resource(dev, SYS_RES_MEMORY, ch->unit, ch->r_mem); + mtx_unlock(&ch->mtx); + mtx_destroy(&ch->mtx); + return (error); +} + +static int +mvs_ch_detach(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + + mtx_lock(&ch->mtx); + xpt_async(AC_LOST_DEVICE, ch->path, NULL); + xpt_free_path(ch->path); + xpt_bus_deregister(cam_sim_path(ch->sim)); + cam_sim_free(ch->sim, /*free_devq*/TRUE); + mtx_unlock(&ch->mtx); + + if (ch->pm_level > 3) + callout_drain(&ch->pm_timer); + bus_teardown_intr(dev, ch->r_irq, ch->ih); + bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); + + mvs_ch_suspend(dev); + mvs_slotsfree(dev); + mvs_dmafini(dev); + + bus_release_resource(dev, SYS_RES_MEMORY, ch->unit, ch->r_mem); + mtx_destroy(&ch->mtx); + return (0); +} + +static int +mvs_ch_suspend(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + + /* Stop EDMA */ + mvs_set_edma_mode(dev, MVS_EDMA_OFF); + /* Disable port interrupts. */ + ATA_OUTL(ch->r_mem, EDMA_IEM, 0); + return (0); +} + +static int +mvs_ch_resume(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + uint32_t reg; + + /* Disable port interrupts */ + ATA_OUTL(ch->r_mem, EDMA_IEM, 0); + /* Stop EDMA */ + ch->curr_mode = MVS_EDMA_UNKNOWN; + mvs_set_edma_mode(dev, MVS_EDMA_OFF); + /* Clear and configure FIS interrupts. */ + ATA_OUTL(ch->r_mem, SATA_FISIC, 0); + reg = ATA_INL(ch->r_mem, SATA_FISC); + reg |= SATA_FISC_FISWAIT4HOSTRDYEN_B1; + ATA_OUTL(ch->r_mem, SATA_FISC, reg); + reg = ATA_INL(ch->r_mem, SATA_FISIM); + reg |= SATA_FISC_FISWAIT4HOSTRDYEN_B1; + ATA_OUTL(ch->r_mem, SATA_FISC, reg); + /* Clear SATA error register. */ + ATA_OUTL(ch->r_mem, SATA_SE, 0xffffffff); + /* Clear any outstanding error interrupts. */ + ATA_OUTL(ch->r_mem, EDMA_IEC, 0); + /* Unmask all error interrupts */ + ATA_OUTL(ch->r_mem, EDMA_IEM, ~EDMA_IE_TRANSIENT); + return (0); +} + +struct mvs_dc_cb_args { + bus_addr_t maddr; + int error; +}; + +static void +mvs_dmainit(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + struct mvs_dc_cb_args dcba; + + /* EDMA command request area. */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, MVS_WORKRQ_SIZE, 1, MVS_WORKRQ_SIZE, + 0, NULL, NULL, &ch->dma.workrq_tag)) + goto error; + if (bus_dmamem_alloc(ch->dma.workrq_tag, (void **)&ch->dma.workrq, 0, + &ch->dma.workrq_map)) + goto error; + if (bus_dmamap_load(ch->dma.workrq_tag, ch->dma.workrq_map, ch->dma.workrq, + MVS_WORKRQ_SIZE, mvs_dmasetupc_cb, &dcba, 0) || dcba.error) { + bus_dmamem_free(ch->dma.workrq_tag, ch->dma.workrq, ch->dma.workrq_map); + goto error; + } + ch->dma.workrq_bus = dcba.maddr; + /* EDMA command response area. */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), 256, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, MVS_WORKRP_SIZE, 1, MVS_WORKRP_SIZE, + 0, NULL, NULL, &ch->dma.workrp_tag)) + goto error; + if (bus_dmamem_alloc(ch->dma.workrp_tag, (void **)&ch->dma.workrp, 0, + &ch->dma.workrp_map)) + goto error; + if (bus_dmamap_load(ch->dma.workrp_tag, ch->dma.workrp_map, ch->dma.workrp, + MVS_WORKRP_SIZE, mvs_dmasetupc_cb, &dcba, 0) || dcba.error) { + bus_dmamem_free(ch->dma.workrp_tag, ch->dma.workrp, ch->dma.workrp_map); + goto error; + } + ch->dma.workrp_bus = dcba.maddr; + /* Data area. */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, MVS_EPRD_MAX, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, + MVS_SG_ENTRIES * PAGE_SIZE * MVS_MAX_SLOTS, + MVS_SG_ENTRIES, MVS_EPRD_MAX, + 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag)) { + goto error; + } + return; + +error: + device_printf(dev, "WARNING - DMA initialization failed\n"); + mvs_dmafini(dev); +} + +static void +mvs_dmasetupc_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct mvs_dc_cb_args *dcba = (struct mvs_dc_cb_args *)xsc; + + if (!(dcba->error = error)) + dcba->maddr = segs[0].ds_addr; +} + +static void +mvs_dmafini(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + + if (ch->dma.data_tag) { + bus_dma_tag_destroy(ch->dma.data_tag); + ch->dma.data_tag = NULL; + } + if (ch->dma.workrp_bus) { + bus_dmamap_unload(ch->dma.workrp_tag, ch->dma.workrp_map); + bus_dmamem_free(ch->dma.workrp_tag, ch->dma.workrp, ch->dma.workrp_map); + ch->dma.workrp_bus = 0; + ch->dma.workrp_map = NULL; + ch->dma.workrp = NULL; + } + if (ch->dma.workrp_tag) { + bus_dma_tag_destroy(ch->dma.workrp_tag); + ch->dma.workrp_tag = NULL; + } + if (ch->dma.workrq_bus) { + bus_dmamap_unload(ch->dma.workrq_tag, ch->dma.workrq_map); + bus_dmamem_free(ch->dma.workrq_tag, ch->dma.workrq, ch->dma.workrq_map); + ch->dma.workrq_bus = 0; + ch->dma.workrq_map = NULL; + ch->dma.workrq = NULL; + } + if (ch->dma.workrq_tag) { + bus_dma_tag_destroy(ch->dma.workrq_tag); + ch->dma.workrq_tag = NULL; + } +} + +static void +mvs_slotsalloc(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + int i; + + /* Alloc and setup command/dma slots */ + bzero(ch->slot, sizeof(ch->slot)); + for (i = 0; i < MVS_MAX_SLOTS; i++) { + struct mvs_slot *slot = &ch->slot[i]; + + slot->dev = dev; + slot->slot = i; + slot->state = MVS_SLOT_EMPTY; + slot->ccb = NULL; + callout_init_mtx(&slot->timeout, &ch->mtx, 0); + + if (bus_dmamap_create(ch->dma.data_tag, 0, &slot->dma.data_map)) + device_printf(ch->dev, "FAILURE - create data_map\n"); + } +} + +static void +mvs_slotsfree(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + int i; + + /* Free all dma slots */ + for (i = 0; i < MVS_MAX_SLOTS; i++) { + struct mvs_slot *slot = &ch->slot[i]; + + callout_drain(&slot->timeout); + if (slot->dma.data_map) { + bus_dmamap_destroy(ch->dma.data_tag, slot->dma.data_map); + slot->dma.data_map = NULL; + } + } +} + +static void +mvs_setup_edma_queues(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + uint64_t work; + + /* Requests queue. */ + work = ch->dma.workrq_bus; + ATA_OUTL(ch->r_mem, EDMA_REQQBAH, work >> 32); + ATA_OUTL(ch->r_mem, EDMA_REQQIP, work & 0xffffffff); + ATA_OUTL(ch->r_mem, EDMA_REQQOP, work & 0xffffffff); + bus_dmamap_sync(ch->dma.workrq_tag, ch->dma.workrq_map, BUS_DMASYNC_PREWRITE); + /* Reponses queue. */ + bzero(ch->dma.workrp, 256); + work = ch->dma.workrp_bus; + ATA_OUTL(ch->r_mem, EDMA_RESQBAH, work >> 32); + ATA_OUTL(ch->r_mem, EDMA_RESQIP, work & 0xffffffff); + ATA_OUTL(ch->r_mem, EDMA_RESQOP, work & 0xffffffff); + bus_dmamap_sync(ch->dma.workrp_tag, ch->dma.workrp_map, BUS_DMASYNC_PREREAD); + ch->out_idx = 0; + ch->in_idx = 0; +} + +static void +mvs_set_edma_mode(device_t dev, enum mvs_edma_mode mode) +{ + struct mvs_channel *ch = device_get_softc(dev); + int timeout; + uint32_t ecfg, fcfg, hc, ltm, unkn; + + if (mode == ch->curr_mode) + return; + /* If we are running, we should stop first. */ + if (ch->curr_mode != MVS_EDMA_OFF) { + ATA_OUTL(ch->r_mem, EDMA_CMD, EDMA_CMD_EDSEDMA); + timeout = 0; + while (ATA_INL(ch->r_mem, EDMA_CMD) & EDMA_CMD_EENEDMA) { + DELAY(1000); + if (timeout++ > 1000) { + device_printf(dev, "stopping EDMA engine failed\n"); + break; + } + }; + } + ch->curr_mode = mode; + ch->fbs_enabled = 0; + ch->fake_busy = 0; + /* Report mode to controller. Needed for correct CCC operation. */ + MVS_EDMA(device_get_parent(dev), dev, mode); + /* Configure new mode. */ + ecfg = EDMA_CFG_RESERVED | EDMA_CFG_RESERVED2 | EDMA_CFG_EHOSTQUEUECACHEEN; + if (ch->pm_present) { + ecfg |= EDMA_CFG_EMASKRXPM; + if (ch->quirks & MVS_Q_GENIIE) { + ecfg |= EDMA_CFG_EEDMAFBS; + ch->fbs_enabled = 1; + } + } + if (ch->quirks & MVS_Q_GENI) + ecfg |= EDMA_CFG_ERDBSZ; + else if (ch->quirks & MVS_Q_GENII) + ecfg |= EDMA_CFG_ERDBSZEXT | EDMA_CFG_EWRBUFFERLEN; + if (ch->quirks & MVS_Q_CT) + ecfg |= EDMA_CFG_ECUTTHROUGHEN; + if (mode != MVS_EDMA_OFF) + ecfg |= EDMA_CFG_EEARLYCOMPLETIONEN; + if (mode == MVS_EDMA_QUEUED) + ecfg |= EDMA_CFG_EQUE; + else if (mode == MVS_EDMA_NCQ) + ecfg |= EDMA_CFG_ESATANATVCMDQUE; + ATA_OUTL(ch->r_mem, EDMA_CFG, ecfg); + mvs_setup_edma_queues(dev); + if (ch->quirks & MVS_Q_GENIIE) { + /* Configure FBS-related registers */ + fcfg = ATA_INL(ch->r_mem, SATA_FISC); + ltm = ATA_INL(ch->r_mem, SATA_LTM); + hc = ATA_INL(ch->r_mem, EDMA_HC); + if (ch->fbs_enabled) { + fcfg |= SATA_FISC_FISDMAACTIVATESYNCRESP; + if (mode == MVS_EDMA_NCQ) { + fcfg &= ~SATA_FISC_FISWAIT4HOSTRDYEN_B0; + hc &= ~EDMA_IE_EDEVERR; + } else { + fcfg |= SATA_FISC_FISWAIT4HOSTRDYEN_B0; + hc |= EDMA_IE_EDEVERR; + } + ltm |= (1 << 8); + } else { + fcfg &= ~SATA_FISC_FISDMAACTIVATESYNCRESP; + fcfg &= ~SATA_FISC_FISWAIT4HOSTRDYEN_B0; + hc |= EDMA_IE_EDEVERR; + ltm &= ~(1 << 8); + } + ATA_OUTL(ch->r_mem, SATA_FISC, fcfg); + ATA_OUTL(ch->r_mem, SATA_LTM, ltm); + ATA_OUTL(ch->r_mem, EDMA_HC, hc); + /* This is some magic, required to handle several DRQs + * with basic DMA. */ + unkn = ATA_INL(ch->r_mem, EDMA_UNKN_RESD); + if (mode == MVS_EDMA_OFF) + unkn |= 1; + else + unkn &= ~1; + ATA_OUTL(ch->r_mem, EDMA_UNKN_RESD, unkn); + } + /* Run EDMA. */ + if (mode != MVS_EDMA_OFF) + ATA_OUTL(ch->r_mem, EDMA_CMD, EDMA_CMD_EENEDMA); +} + +devclass_t mvs_devclass; +devclass_t mvsch_devclass; +static device_method_t mvsch_methods[] = { + DEVMETHOD(device_probe, mvs_ch_probe), + DEVMETHOD(device_attach, mvs_ch_attach), + DEVMETHOD(device_detach, mvs_ch_detach), + DEVMETHOD(device_suspend, mvs_ch_suspend), + DEVMETHOD(device_resume, mvs_ch_resume), + { 0, 0 } +}; +static driver_t mvsch_driver = { + "mvsch", + mvsch_methods, + sizeof(struct mvs_channel) +}; +DRIVER_MODULE(mvsch, mvs, mvsch_driver, mvsch_devclass, 0, 0); +DRIVER_MODULE(mvsch, sata, mvsch_driver, mvsch_devclass, 0, 0); + +static void +mvs_phy_check_events(device_t dev, u_int32_t serr) +{ + struct mvs_channel *ch = device_get_softc(dev); + + if (ch->pm_level == 0) { + u_int32_t status = ATA_INL(ch->r_mem, SATA_SS); + union ccb *ccb; + + if (bootverbose) { + if (((status & SATA_SS_DET_MASK) == SATA_SS_DET_PHY_ONLINE) && + ((status & SATA_SS_SPD_MASK) != SATA_SS_SPD_NO_SPEED) && + ((status & SATA_SS_IPM_MASK) == SATA_SS_IPM_ACTIVE)) { + device_printf(dev, "CONNECT requested\n"); + } else + device_printf(dev, "DISCONNECT requested\n"); + } + mvs_reset(dev); + if ((ccb = xpt_alloc_ccb_nowait()) == NULL) + return; + if (xpt_create_path(&ccb->ccb_h.path, NULL, + cam_sim_path(ch->sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + xpt_free_ccb(ccb); + return; + } + xpt_rescan(ccb); + } +} + +static void +mvs_notify_events(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + struct cam_path *dpath; + uint32_t fis; + int d; + + /* Try to read PMP field from SDB FIS. Present only for Gen-IIe. */ + fis = ATA_INL(ch->r_mem, SATA_FISDW0); + if ((fis & 0x80ff) == 0x80a1) + d = (fis & 0x0f00) >> 8; + else + d = ch->pm_present ? 15 : 0; + if (bootverbose) + device_printf(dev, "SNTF %d\n", d); + if (xpt_create_path(&dpath, NULL, + xpt_path_path_id(ch->path), d, 0) == CAM_REQ_CMP) { + xpt_async(AC_SCSI_AEN, dpath, NULL); + xpt_free_path(dpath); + } +} + +static void +mvs_ch_intr_locked(void *data) +{ + struct mvs_intr_arg *arg = (struct mvs_intr_arg *)data; + device_t dev = (device_t)arg->arg; + struct mvs_channel *ch = device_get_softc(dev); + + mtx_lock(&ch->mtx); + mvs_ch_intr(data); + mtx_unlock(&ch->mtx); +} + +static void +mvs_ch_pm(void *arg) +{ + device_t dev = (device_t)arg; + struct mvs_channel *ch = device_get_softc(dev); + uint32_t work; + + if (ch->numrslots != 0) + return; + /* If we are idle - request power state transition. */ + work = ATA_INL(ch->r_mem, SATA_SC); + work &= ~SATA_SC_SPM_MASK; + if (ch->pm_level == 4) + work |= SATA_SC_SPM_PARTIAL; + else + work |= SATA_SC_SPM_SLUMBER; + ATA_OUTL(ch->r_mem, SATA_SC, work); +} + +static void +mvs_ch_pm_wake(device_t dev) +{ + struct mvs_channel *ch = device_get_softc(dev); + uint32_t work; + int timeout = 0; + + work = ATA_INL(ch->r_mem, SATA_SS); + if (work & SATA_SS_IPM_ACTIVE) + return; + /* If we are not in active state - request power state transition. */ + work = ATA_INL(ch->r_mem, SATA_SC); + work &= ~SATA_SC_SPM_MASK; + work |= SATA_SC_SPM_ACTIVE; + ATA_OUTL(ch->r_mem, SATA_SC, work); + /* Wait for transition to happen. */ + while ((ATA_INL(ch->r_mem, SATA_SS) & SATA_SS_IPM_ACTIVE) == 0 && + timeout++ < 100) { + DELAY(100); + } +} + +static void +mvs_ch_intr(void *data) +{ + struct mvs_intr_arg *arg = (struct mvs_intr_arg *)data; + device_t dev = (device_t)arg->arg; + struct mvs_channel *ch = device_get_softc(dev); + uint32_t iec, serr = 0, fisic = 0; + enum mvs_err_type et; + int i, ccs, port = -1, selfdis = 0; + int edma = (ch->numtslots != 0 || ch->numdslots != 0); + +//device_printf(dev, "irq cause %02x EDMA %d IEC %08x\n", +// arg->cause, edma, ATA_INL(ch->r_mem, EDMA_IEC)); + /* New item in response queue. */ + if ((arg->cause & 2) && edma) + mvs_crbq_intr(dev); + /* Some error or special event. */ + if (arg->cause & 1) { + iec = ATA_INL(ch->r_mem, EDMA_IEC); +//device_printf(dev, "irq cause %02x EDMA %d IEC %08x\n", +// arg->cause, edma, iec); + if (iec & EDMA_IE_SERRINT) { + serr = ATA_INL(ch->r_mem, SATA_SE); + ATA_OUTL(ch->r_mem, SATA_SE, serr); +//device_printf(dev, "SERR %08x\n", serr); + } + /* EDMA self-disabled due to error. */ + if (iec & EDMA_IE_ESELFDIS) + selfdis = 1; + /* Transport interrupt. */ + if (iec & EDMA_IE_ETRANSINT) { + /* For Gen-I this bit means self-disable. */ + if (ch->quirks & MVS_Q_GENI) + selfdis = 1; + /* For Gen-II this bit means SDB-N. */ + else if (ch->quirks & MVS_Q_GENII) + fisic = SATA_FISC_FISWAIT4HOSTRDYEN_B1; + else /* For Gen-IIe - read FIS interrupt cause. */ + fisic = ATA_INL(ch->r_mem, SATA_FISIC); +//device_printf(dev, "FISIC %08x\n", fisic); + } + if (selfdis) + ch->curr_mode = MVS_EDMA_UNKNOWN; + ATA_OUTL(ch->r_mem, EDMA_IEC, ~iec); + /* Interface errors or Device error. */ + if (iec & (0xfc1e9000 | EDMA_IE_EDEVERR)) { + port = -1; + if (ch->numpslots != 0) { + ccs = 0; + } else { + if (ch->quirks & MVS_Q_GENIIE) + ccs = EDMA_S_EIOID(ATA_INL(ch->r_mem, EDMA_S)); + else + ccs = EDMA_S_EDEVQUETAG(ATA_INL(ch->r_mem, EDMA_S)); + /* Check if error is one-PMP-port-specific, */ + if (ch->fbs_enabled) { + /* Which ports were active. */ + for (i = 0; i < 16; i++) { + if (ch->numrslotspd[i] == 0) + continue; + if (port == -1) + port = i; + else if (port != i) { + port = -2; + break; + } + } + /* If several ports were active and EDMA still enabled - + * other ports are probably unaffected and may continue. + */ + if (port == -2 && !selfdis) { + uint16_t p = ATA_INL(ch->r_mem, SATA_SATAITC) >> 16; + port = ffs(p) - 1; + if (port != (fls(p) - 1)) + port = -2; + } + } + } +//device_printf(dev, "err slot %d port %d\n", ccs, port); + mvs_requeue_frozen(dev); + for (i = 0; i < MVS_MAX_SLOTS; i++) { + /* XXX: reqests in loading state. */ + if (((ch->rslots >> i) & 1) == 0) + continue; + if (port >= 0 && + ch->slot[i].ccb->ccb_h.target_id != port) + continue; + if (iec & EDMA_IE_EDEVERR) { /* Device error. */ + if (port != -2) { + if (ch->numtslots == 0) { + /* Untagged operation. */ + if (i == ccs) + et = MVS_ERR_TFE; + else + et = MVS_ERR_INNOCENT; + } else { + /* Tagged operation. */ + et = MVS_ERR_NCQ; + } + } else { + et = MVS_ERR_TFE; + ch->fatalerr = 1; + } + } else if (iec & 0xfc1e9000) { + if (ch->numtslots == 0 && i != ccs && port != -2) + et = MVS_ERR_INNOCENT; + else + et = MVS_ERR_SATA; + } else + et = MVS_ERR_INVALID; + mvs_end_transaction(&ch->slot[i], et); + } + } + /* Process SDB-N. */ + if (fisic & SATA_FISC_FISWAIT4HOSTRDYEN_B1) + mvs_notify_events(dev); + if (fisic) + ATA_OUTL(ch->r_mem, SATA_FISIC, ~fisic); + /* Process hot-plug. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun May 2 19:38:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19E7A1065672; Sun, 2 May 2010 19:38:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 07D528FC13; Sun, 2 May 2010 19:38: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 o42JcIl8054220; Sun, 2 May 2010 19:38:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42JcHPD054205; Sun, 2 May 2010 19:38:17 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021938.o42JcHPD054205@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 19:38: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: r207537 - in head/sys: boot/sparc64/loader conf sparc64/include sparc64/sparc64 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, 02 May 2010 19:38:18 -0000 Author: marius Date: Sun May 2 19:38:17 2010 New Revision: 207537 URL: http://svn.freebsd.org/changeset/base/207537 Log: Add support for SPARC64 V (and where it already makes sense for other HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the MMU and cache handling, it doesn't add pmap optimizations possible with these CPU, yet, though. With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250 and likely also other models based on SPARC64 V like 450, 650 and 850. Thanks go to Michael Moll for providing access to a PRIMEPOWER 250. Added: head/sys/sparc64/include/mcntl.h (contents, props changed) head/sys/sparc64/sparc64/zeus.c (contents, props changed) Modified: head/sys/boot/sparc64/loader/main.c head/sys/conf/files.sparc64 head/sys/sparc64/include/asi.h head/sys/sparc64/include/cache.h head/sys/sparc64/sparc64/cache.c head/sys/sparc64/sparc64/cheetah.c head/sys/sparc64/sparc64/identcpu.c head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/mp_locore.S head/sys/sparc64/sparc64/mp_machdep.c head/sys/sparc64/sparc64/pmap.c head/sys/sparc64/sparc64/tick.c Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/boot/sparc64/loader/main.c Sun May 2 19:38:17 2010 (r207537) @@ -451,7 +451,8 @@ dtlb_va_to_pa_sun4u(vm_offset_t va) reg = dtlb_get_data_sun4u(i); wrpr(pstate, pstate, 0); reg >>= TD_PA_SHIFT; - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) return (reg & TD_PA_CH_MASK); return (reg & TD_PA_SF_MASK); } @@ -474,7 +475,8 @@ itlb_va_to_pa_sun4u(vm_offset_t va) reg = itlb_get_data_sun4u(i); wrpr(pstate, pstate, 0); reg >>= TD_PA_SHIFT; - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) return (reg & TD_PA_CH_MASK); return (reg & TD_PA_SF_MASK); } @@ -696,6 +698,7 @@ cpu_cpuid_prop_sun4u(void) switch (cpu_impl) { case CPU_IMPL_SPARC64: + case CPU_IMPL_SPARC64V: case CPU_IMPL_ULTRASPARCI: case CPU_IMPL_ULTRASPARCII: case CPU_IMPL_ULTRASPARCIIi: @@ -720,6 +723,7 @@ cpu_get_mid_sun4u(void) switch (cpu_impl) { case CPU_IMPL_SPARC64: + case CPU_IMPL_SPARC64V: case CPU_IMPL_ULTRASPARCI: case CPU_IMPL_ULTRASPARCII: case CPU_IMPL_ULTRASPARCIIi: Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Sun May 2 19:28:30 2010 (r207536) +++ head/sys/conf/files.sparc64 Sun May 2 19:38:17 2010 (r207537) @@ -138,3 +138,4 @@ sparc64/sparc64/tsb.c standard sparc64/sparc64/uio_machdep.c standard sparc64/sparc64/upa.c optional creator sparc64/sparc64/vm_machdep.c standard +sparc64/sparc64/zeus.c standard Modified: head/sys/sparc64/include/asi.h ============================================================================== --- head/sys/sparc64/include/asi.h Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/include/asi.h Sun May 2 19:38:17 2010 (r207537) @@ -82,7 +82,10 @@ #define ASI_DCACHE_SNOOP_TAG 0x44 /* US-III Cu */ /* Named ASI_DCUCR on US-III, but is mostly identical except for added bits. */ -#define ASI_LSU_CTL_REG 0x45 +#define ASI_LSU_CTL_REG 0x45 /* US only */ + +#define ASI_MCNTL 0x45 /* SPARC64 only */ +#define AA_MCNTL 0x08 #define ASI_DCACHE_DATA 0x46 #define ASI_DCACHE_TAG 0x47 @@ -167,6 +170,8 @@ #define ASI_ICACHE_PRE_DECODE 0x6e /* US-I, II */ #define ASI_ICACHE_PRE_NEXT_FIELD 0x6f /* US-I, II */ +#define ASI_FLUSH_L1I 0x67 /* SPARC64 only */ + #define ASI_BLK_AUIP 0x70 #define ASI_BLK_AIUS 0x71 Modified: head/sys/sparc64/include/cache.h ============================================================================== --- head/sys/sparc64/include/cache.h Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/include/cache.h Sun May 2 19:38:17 2010 (r207537) @@ -113,6 +113,10 @@ extern cache_flush_t *cache_flush; extern dcache_page_inval_t *dcache_page_inval; extern icache_page_inval_t *icache_page_inval; +cache_flush_t zeus_cache_flush; +dcache_page_inval_t zeus_dcache_page_inval; +icache_page_inval_t zeus_icache_page_inval; + #endif /* KERNEL */ #endif /* !LOCORE */ Added: head/sys/sparc64/include/mcntl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/include/mcntl.h Sun May 2 19:38:17 2010 (r207537) @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * 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$ + */ + +#ifndef _MACHINE_MCNTL_H +#define _MACHINE_MCNTL_H + +/* + * Definitions for the SPARC64 V, VI, VII and VIIIfx Memory Control Register + */ +#define MCNTL_JPS1_TSBP (1UL << 8) + +#define MCNTL_RMD_SHIFT 12 +#define MCNTL_RMD_BITS 2 +#define MCNTL_RMD_MASK \ + (((1UL << MCNTL_RMD_BITS) - 1) << MCNTL_RMD_SHIFT) +#define MCNTL_RMD_FULL (0UL << MCNTL_RMD_SHIFT) +#define MCNTL_RMD_1024 (2UL << MCNTL_RMD_SHIFT) +#define MCNTL_RMD_512 (3UL << MCNTL_RMD_SHIFT) + +#define MCNTL_FW_FDTLB (1UL << 14) +#define MCNTL_FW_FITLB (1UL << 15) +#define MCNTL_NC_CACHE (1UL << 16) + +/* The following bits are valid for the SPARC64 VI, VII and VIIIfx only. */ +#define MCNTL_MPG_SDTLB (1UL << 6) +#define MCNTL_MPG_SITLB (1UL << 7) + +/* The following bits are valid for the SPARC64 VIIIfx only. */ +#define MCNTL_HPF_SHIFT 18 +#define MCNTL_HPF_BITS 2 +#define MCNTL_HPF_MASK \ + (((1UL << MCNTL_HPF_BITS) - 1) << MCNTL_HPF_SHIFT) +#define MCNTL_HPF_STRONG (0UL << MCNTL_HPF_SHIFT) +#define MCNTL_HPF_NOT (1UL << MCNTL_HPF_SHIFT) +#define MCNTL_HPF_WEAK (2UL << MCNTL_HPF_SHIFT) + +#endif /* _MACHINE_MCNTL_H */ Modified: head/sys/sparc64/sparc64/cache.c ============================================================================== --- head/sys/sparc64/sparc64/cache.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/cache.c Sun May 2 19:38:17 2010 (r207537) @@ -141,7 +141,12 @@ cache_init(struct pcpu *pcpu) if ((pcpu->pc_cache.dc_size & ~(1UL << (ffs(pcpu->pc_cache.dc_size) - 1))) != 0) panic("cache_init: D$ size not a power of 2"); - if (((pcpu->pc_cache.dc_size / pcpu->pc_cache.dc_assoc) / + /* + * For CPUs which don't support unaliasing in hardware ensure that + * the data cache doesn't have too many virtual colors. + */ + if (pcpu->pc_impl != CPU_IMPL_SPARC64V && + ((pcpu->pc_cache.dc_size / pcpu->pc_cache.dc_assoc) / PAGE_SIZE) != DCACHE_COLORS) panic("cache_init: too many D$ colors"); set = pcpu->pc_cache.ec_size / pcpu->pc_cache.ec_assoc; @@ -155,12 +160,21 @@ cache_init(struct pcpu *pcpu) icache_page_inval = cheetah_icache_page_inval; tlb_flush_nonlocked = cheetah_tlb_flush_nonlocked; tlb_flush_user = cheetah_tlb_flush_user; - } else { + } else if (pcpu->pc_impl == CPU_IMPL_SPARC64V) { + cache_enable = cheetah_cache_enable; + cache_flush = zeus_cache_flush; + dcache_page_inval = zeus_dcache_page_inval; + icache_page_inval = zeus_icache_page_inval; + tlb_flush_nonlocked = cheetah_tlb_flush_nonlocked; + tlb_flush_user = cheetah_tlb_flush_user; + } else if (pcpu->pc_impl >= CPU_IMPL_ULTRASPARCI && + pcpu->pc_impl < CPU_IMPL_ULTRASPARCIII) { cache_enable = spitfire_cache_enable; cache_flush = spitfire_cache_flush; dcache_page_inval = spitfire_dcache_page_inval; icache_page_inval = spitfire_icache_page_inval; tlb_flush_nonlocked = spitfire_tlb_flush_nonlocked; tlb_flush_user = spitfire_tlb_flush_user; - } + } else + panic("cache_init: unknown CPU"); } Modified: head/sys/sparc64/sparc64/cheetah.c ============================================================================== --- head/sys/sparc64/sparc64/cheetah.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/cheetah.c Sun May 2 19:38:17 2010 (r207537) @@ -39,11 +39,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -52,7 +54,8 @@ __FBSDID("$FreeBSD$"); #define CHEETAH_ICACHE_TAG_LOWER 0x30 /* - * CPU-specific initialization + * CPU-specific initialization - this is used for both the Sun Cheetah and + * later as well as the Fujitsu Zeus and later CPUs. */ void cheetah_init(u_int cpu_impl) @@ -75,6 +78,14 @@ cheetah_init(u_int cpu_impl) stxa(AA_IMMU_TSB_NEXT_REG, ASI_IMMU, 0); membar(Sync); + if (cpu_impl == CPU_IMPL_SPARC64V) { + /* Ensure MCNTL_JPS1_TSBP is 0. */ + val = ldxa(AA_MCNTL, ASI_MCNTL); + val &= ~MCNTL_JPS1_TSBP; + stxa(AA_MCNTL, ASI_MCNTL, val); + return; + } + /* * Configure the first large dTLB to hold 4MB pages (e.g. for direct * mappings) for all three contexts and ensure the second one is set @@ -207,7 +218,7 @@ cheetah_dcache_page_inval(vm_paddr_t spa * consistency is maintained by hardware. */ void -cheetah_icache_page_inval(vm_paddr_t pa) +cheetah_icache_page_inval(vm_paddr_t pa __unused) { } Modified: head/sys/sparc64/sparc64/identcpu.c ============================================================================== --- head/sys/sparc64/sparc64/identcpu.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/identcpu.c Sun May 2 19:38:17 2010 (r207537) @@ -41,7 +41,7 @@ cpu_identify(u_long vers, u_int freq, u_ switch (VER_MANUF(vers)) { case 0x04: - manus = "HAL"; + manus = "HAL/Fujitsu"; break; case 0x13: case 0x17: @@ -57,6 +57,27 @@ cpu_identify(u_long vers, u_int freq, u_ case CPU_IMPL_SPARC64: impls = "SPARC64"; break; + case CPU_IMPL_SPARC64II: + impls = "SPARC64-II"; + break; + case CPU_IMPL_SPARC64III: + impls = "SPARC64-III"; + break; + case CPU_IMPL_SPARC64IV: + impls = "SPARC64-IV"; + break; + case CPU_IMPL_SPARC64V: + impls = "SPARC64-V"; + break; + case CPU_IMPL_SPARC64VI: + impls = "SPARC64-VI"; + break; + case CPU_IMPL_SPARC64VII: + impls = "SPARC64-VII"; + break; + case CPU_IMPL_SPARC64VIIIfx: + impls = "SPARC64-VIIIfx"; + break; case CPU_IMPL_ULTRASPARCI: impls = "UltraSparc-I"; break; @@ -67,7 +88,6 @@ cpu_identify(u_long vers, u_int freq, u_ impls = "UltraSparc-IIi"; break; case CPU_IMPL_ULTRASPARCIIe: - /* V9 Manual says `UltraSparc-e'. I assume this is wrong. */ impls = "UltraSparc-IIe"; break; case CPU_IMPL_ULTRASPARCIII: Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/machdep.c Sun May 2 19:38:17 2010 (r207537) @@ -276,6 +276,7 @@ cpu_cpuid_prop(u_int cpu_impl) switch (cpu_impl) { case CPU_IMPL_SPARC64: + case CPU_IMPL_SPARC64V: case CPU_IMPL_ULTRASPARCI: case CPU_IMPL_ULTRASPARCII: case CPU_IMPL_ULTRASPARCIIi: @@ -300,6 +301,7 @@ cpu_get_mid(u_int cpu_impl) switch (cpu_impl) { case CPU_IMPL_SPARC64: + case CPU_IMPL_SPARC64V: case CPU_IMPL_ULTRASPARCI: case CPU_IMPL_ULTRASPARCII: case CPU_IMPL_ULTRASPARCIIi: @@ -343,7 +345,8 @@ sparc64_init(caddr_t mdp, u_long o1, u_l /* * Do CPU-specific initialization. */ - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) cheetah_init(cpu_impl); /* @@ -491,6 +494,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l if (cpu_use_vis) { switch (cpu_impl) { case CPU_IMPL_SPARC64: + case CPU_IMPL_SPARC64V: case CPU_IMPL_ULTRASPARCI: case CPU_IMPL_ULTRASPARCII: case CPU_IMPL_ULTRASPARCIIi: Modified: head/sys/sparc64/sparc64/mp_locore.S ============================================================================== --- head/sys/sparc64/sparc64/mp_locore.S Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/mp_locore.S Sun May 2 19:38:17 2010 (r207537) @@ -200,19 +200,25 @@ ENTRY(mp_startup) srlx %l1, VER_IMPL_SHIFT, %l1 sll %l1, VER_IMPL_SIZE, %l1 srl %l1, VER_IMPL_SIZE, %l1 + cmp %l1, CPU_IMPL_SPARC64V + bl %icc, 4f + nop + cmp %l1, CPU_IMPL_ULTRASPARCI + bl %icc, 2f + nop cmp %l1, CPU_IMPL_ULTRASPARCIII bl %icc, 3f nop - mov CPU_STICKSYNC, %l2 +2: mov CPU_STICKSYNC, %l2 membar #StoreLoad stw %l2, [%l0 + CSA_STATE] -2: ldx [%l0 + CSA_STICK], %l2 - brz %l2, 2b +3: ldx [%l0 + CSA_STICK], %l2 + brz %l2, 3b nop wr %l2, 0, %asr24 -3: call cpu_get_mid +4: call cpu_get_mid mov %l1, %o0 /* @@ -225,9 +231,9 @@ ENTRY(mp_startup) /* * Wait till its our turn to bootstrap. */ -4: lduw [%l0 + CSA_MID], %l1 +5: lduw [%l0 + CSA_MID], %l1 cmp %l1, %o0 - bne %xcc, 4b + bne %xcc, 5b nop add %l0, CSA_TTES, %l1 @@ -236,7 +242,7 @@ ENTRY(mp_startup) /* * Map the per-CPU pages. */ -5: sllx %l2, TTE_SHIFT, %l3 +6: sllx %l2, TTE_SHIFT, %l3 add %l1, %l3, %l3 ldx [%l3 + TTE_VPN], %l4 @@ -251,7 +257,7 @@ ENTRY(mp_startup) add %l2, 1, %l2 cmp %l2, PCPU_PAGES - bne %xcc, 5b + bne %xcc, 6b nop /* Modified: head/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/mp_machdep.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/mp_machdep.c Sun May 2 19:38:17 2010 (r207537) @@ -164,7 +164,8 @@ mp_init(u_int cpu_impl) if (cpu_impl == CPU_IMPL_ULTRASPARCIIIi || cpu_impl == CPU_IMPL_ULTRASPARCIIIip) isjbus = 1; - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) cpu_ipi_selected = cheetah_ipi_selected; else cpu_ipi_selected = spitfire_ipi_selected; @@ -315,7 +316,8 @@ ap_start(phandle_t node, u_int mid, u_in ; membar(StoreLoad); csa->csa_tick = rd(tick); - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) { + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) { while (csa->csa_state != CPU_STICKSYNC) ; membar(StoreLoad); @@ -411,7 +413,8 @@ cpu_mp_bootstrap(struct pcpu *pc) csa = &cpu_start_args; /* Do CPU-specific initialization. */ - if (pc->pc_impl >= CPU_IMPL_ULTRASPARCIII) + if (pc->pc_impl == CPU_IMPL_SPARC64V || + pc->pc_impl >= CPU_IMPL_ULTRASPARCIII) cheetah_init(pc->pc_impl); /* * Enable the caches. Note that his may include applying workarounds. Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/pmap.c Sun May 2 19:38:17 2010 (r207537) @@ -528,7 +528,8 @@ pmap_bootstrap(u_int cpu_impl) tp->tte_data = ((translations[i].om_tte & ~((TD_SOFT2_MASK << TD_SOFT2_SHIFT) | - (cpu_impl < CPU_IMPL_ULTRASPARCIII ? + (cpu_impl >= CPU_IMPL_ULTRASPARCI && + cpu_impl < CPU_IMPL_ULTRASPARCIII ? (TD_DIAG_SF_MASK << TD_DIAG_SF_SHIFT) : (TD_RSVD_CH_MASK << TD_RSVD_CH_SHIFT)) | (TD_SOFT_MASK << TD_SOFT_SHIFT))) | TD_EXEC) + @@ -704,16 +705,16 @@ retry: if (va >= VM_MIN_DIRECT_ADDRESS) { tp = NULL; m = PHYS_TO_VM_PAGE(TLB_DIRECT_TO_PHYS(va)); - (void)vm_page_pa_tryrelock(pm, TLB_DIRECT_TO_PHYS(va), &pa); + (void)vm_page_pa_tryrelock(pm, TLB_DIRECT_TO_PHYS(va), + &pa); vm_page_hold(m); } else { tp = tsb_kvtotte(va); if ((tp->tte_data & TD_V) == 0) tp = NULL; } - } else { + } else tp = tsb_tte_lookup(pm, va); - } if (tp != NULL && ((tp->tte_data & TD_SW) || (prot & VM_PROT_WRITE) == 0)) { if (vm_page_pa_tryrelock(pm, TTE_GET_PA(tp), &pa)) Modified: head/sys/sparc64/sparc64/tick.c ============================================================================== --- head/sys/sparc64/sparc64/tick.c Sun May 2 19:28:30 2010 (r207536) +++ head/sys/sparc64/sparc64/tick.c Sun May 2 19:38:17 2010 (r207537) @@ -120,7 +120,8 @@ cpu_initclocks(void) */ } else { clock = PCPU_GET(clock); - intr_setup(PIL_TICK, PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? + intr_setup(PIL_TICK, PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCI && + PCPU_GET(impl) < CPU_IMPL_ULTRASPARCIII ? tick_hardclock_bbwar : tick_hardclock, -1, NULL, NULL); set_cputicker(tick_cputicks, clock, 0); } @@ -325,7 +326,8 @@ void tick_clear(u_int cpu_impl) { - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) wrstick(0, 0); wrpr(tick, 0, 0); } @@ -334,7 +336,8 @@ void tick_stop(u_int cpu_impl) { - if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) + if (cpu_impl == CPU_IMPL_SPARC64V || + cpu_impl >= CPU_IMPL_ULTRASPARCIII) wrstickcmpr(1L << 63, 0); wrtickcmpr(1L << 63, 0); } Added: head/sys/sparc64/sparc64/zeus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/sparc64/zeus.c Sun May 2 19:38:17 2010 (r207537) @@ -0,0 +1,65 @@ +/*- + * Copyright (c) 2010 Marius Strobl + * 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 + +/* + * Flush all lines from the level 1 caches. + */ +void +zeus_cache_flush(void) +{ + + stxa_sync(0, ASI_FLUSH_L1I, 0); +} + +/* + * Flush a physical page from the data cache. Data cache consistency is + * maintained by hardware. + */ +void +zeus_dcache_page_inval(vm_paddr_t spa __unused) +{ + +} + +/* + * Flush a physical page from the intsruction cache. Instruction cache + * consistency is maintained by hardware. + */ +void +zeus_icache_page_inval(vm_paddr_t pa __unused) +{ + +} From owner-svn-src-all@FreeBSD.ORG Sun May 2 20:12:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F38FE1065673; Sun, 2 May 2010 20:12:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E28468FC13; Sun, 2 May 2010 20: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 o42KCKxr061706; Sun, 2 May 2010 20:12:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42KCKq0061704; Sun, 2 May 2010 20:12:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005022012.o42KCKq0061704@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 20:12: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: r207538 - stable/7/lib/csu/i386-elf 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, 02 May 2010 20:12:21 -0000 Author: jilles Date: Sun May 2 20:12:20 2010 New Revision: 207538 URL: http://svn.freebsd.org/changeset/base/207538 Log: MFC r205398: Do not create *.gmon files for PIE executables on i386. Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o. This problem is i386-specific, the other architectures are OK. If you have problems with PIE executables such as samba and cups leaving behind gmon files, rebuild them after installing this change. PR: ports/143924 Modified: stable/7/lib/csu/i386-elf/Makefile Directory Properties: stable/7/lib/csu/ (props changed) Modified: stable/7/lib/csu/i386-elf/Makefile ============================================================================== --- stable/7/lib/csu/i386-elf/Makefile Sun May 2 19:38:17 2010 (r207537) +++ stable/7/lib/csu/i386-elf/Makefile Sun May 2 20:12:20 2010 (r207538) @@ -24,7 +24,7 @@ crt1.o: crt1_c.o crt1_s.o objcopy --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o From owner-svn-src-all@FreeBSD.ORG Sun May 2 20:24:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D0FD106566C; Sun, 2 May 2010 20:24:26 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2D16B8FC1B; Sun, 2 May 2010 20:24: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 o42KOQC8064365; Sun, 2 May 2010 20:24:26 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42KOQno064363; Sun, 2 May 2010 20:24:26 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005022024.o42KOQno064363@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 20:24: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: r207539 - 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: Sun, 02 May 2010 20:24:27 -0000 Author: alc Date: Sun May 2 20:24:25 2010 New Revision: 207539 URL: http://svn.freebsd.org/changeset/base/207539 Log: Simplify vm_fault(). The introduction of the new page lock renders a bit of cleverness by vm_fault() to avoid repeatedly releasing and reacquiring the page queues lock pointless. Reviewed by: kib, kmacy Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun May 2 20:12:20 2010 (r207538) +++ head/sys/vm/vm_fault.c Sun May 2 20:24:25 2010 (r207539) @@ -215,7 +215,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr { vm_prot_t prot; int is_first_object_locked, result; - boolean_t are_queues_locked, growstack, wired; + boolean_t growstack, wired; int map_generation; vm_object_t next_object; vm_page_t marray[VM_FAULT_READ]; @@ -478,7 +478,6 @@ readrest: else firstpindex = fs.first_pindex - 2 * VM_FAULT_READ; - are_queues_locked = FALSE; /* * note: partially valid pages cannot be * included in the lookahead - NFS piecemeal @@ -495,17 +494,11 @@ readrest: if (mt->busy || (mt->oflags & VPO_BUSY)) continue; - if (!are_queues_locked) { - are_queues_locked = TRUE; - vm_page_lock(mt); - vm_page_lock_queues(); - } else { - vm_page_unlock_queues(); - vm_page_lock(mt); - vm_page_lock_queues(); - } + vm_page_lock(mt); + vm_page_lock_queues(); if (mt->hold_count || mt->wire_count) { + vm_page_unlock_queues(); vm_page_unlock(mt); continue; } @@ -515,10 +508,9 @@ readrest: } else { vm_page_cache(mt); } + vm_page_unlock_queues(); vm_page_unlock(mt); } - if (are_queues_locked) - vm_page_unlock_queues(); ahead += behind; behind = 0; } From owner-svn-src-all@FreeBSD.ORG Sun May 2 20:46:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 822AC1065670; Sun, 2 May 2010 20:46:17 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7248F8FC16; Sun, 2 May 2010 20:46: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 o42KkHGi069180; Sun, 2 May 2010 20:46:17 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42KkHr4069178; Sun, 2 May 2010 20:46:17 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005022046.o42KkHr4069178@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 20:46: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: r207540 - 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: Sun, 02 May 2010 20:46:17 -0000 Author: alc Date: Sun May 2 20:46:17 2010 New Revision: 207540 URL: http://svn.freebsd.org/changeset/base/207540 Log: Defer the acquisition of the page and page queues locks in vm_pageout_object_deactivate_pages(). Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun May 2 20:24:25 2010 (r207539) +++ head/sys/vm/vm_pageout.c Sun May 2 20:46:17 2010 (r207540) @@ -540,6 +540,7 @@ vm_pageout_object_deactivate_pages(pmap, for (object = first_object;; object = backing_object) { if (pmap_resident_count(pmap) <= desired) goto unlock_return; + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); if (object->type == OBJT_PHYS || object->paging_in_progress) goto unlock_return; @@ -551,19 +552,18 @@ vm_pageout_object_deactivate_pages(pmap, */ p = TAILQ_FIRST(&object->memq); while (p != NULL) { - vm_page_lock(p); - vm_page_lock_queues(); - if (pmap_resident_count(pmap) <= desired) { - vm_page_unlock_queues(); - vm_page_unlock(p); + if (pmap_resident_count(pmap) <= desired) goto unlock_return; - } next = TAILQ_NEXT(p, listq); + if ((p->oflags & VPO_BUSY) != 0 || p->busy != 0) { + p = next; + continue; + } + vm_page_lock(p); + vm_page_lock_queues(); cnt.v_pdpages++; if (p->wire_count != 0 || p->hold_count != 0 || - p->busy != 0 || - (p->oflags & VPO_BUSY) || !pmap_page_exists_quick(pmap, p)) { vm_page_unlock_queues(); vm_page_unlock(p); From owner-svn-src-all@FreeBSD.ORG Sun May 2 21:05:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C1D2106566B; Sun, 2 May 2010 21:05:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1C2498FC1D; Sun, 2 May 2010 21:05: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 o42L4xcD073335; Sun, 2 May 2010 21:04:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42L4xXD073333; Sun, 2 May 2010 21:04:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005022104.o42L4xXD073333@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 21:04: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: r207541 - 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: Sun, 02 May 2010 21:05:00 -0000 Author: alc Date: Sun May 2 21:04:59 2010 New Revision: 207541 URL: http://svn.freebsd.org/changeset/base/207541 Log: Eliminate an assignment that was made redundant by r207410. Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun May 2 20:46:17 2010 (r207540) +++ head/sys/vm/vm_pageout.c Sun May 2 21:04:59 2010 (r207541) @@ -1370,8 +1370,6 @@ vm_pageout_page_stats() ("vm_pageout_page_stats: page %p isn't active", m)); next = TAILQ_NEXT(m, pageq); - object = m->object; - if ((m->flags & PG_MARKER) != 0) { m = next; continue; From owner-svn-src-all@FreeBSD.ORG Sun May 2 22:48:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54482106566C; Sun, 2 May 2010 22:48:28 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 446B98FC1B; Sun, 2 May 2010 22:48: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 o42MmSFL096113; Sun, 2 May 2010 22:48:28 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42MmS0E096111; Sun, 2 May 2010 22:48:28 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201005022248.o42MmS0E096111@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 May 2010 22:48: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: r207543 - head/sys/dev/mpt 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, 02 May 2010 22:48:28 -0000 Author: mjacob Date: Sun May 2 22:48:27 2010 New Revision: 207543 URL: http://svn.freebsd.org/changeset/base/207543 Log: Print IR_RESYNC updates informatively. Obtained from: pluknet MFC after: 1 week Modified: head/sys/dev/mpt/mpt_cam.c Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Sun May 2 21:11:47 2010 (r207542) +++ head/sys/dev/mpt/mpt_cam.c Sun May 2 22:48:27 2010 (r207543) @@ -2575,6 +2575,10 @@ mpt_cam_event(struct mpt_softc *mpt, req CAMLOCK_2_MPTLOCK(mpt); break; } + case MPI_EVENT_IR_RESYNC_UPDATE: + mpt_prt(mpt, "IR resync update %d completed\n", + (data0 >> 16) & 0xff); + break; case MPI_EVENT_EVENT_CHANGE: case MPI_EVENT_INTEGRATED_RAID: case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: From owner-svn-src-all@FreeBSD.ORG Sun May 2 23:33:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC8CF1065673; Sun, 2 May 2010 23:33:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BCC2E8FC12; Sun, 2 May 2010 23:33: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 o42NXALZ006057; Sun, 2 May 2010 23:33:10 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42NXAFO006055; Sun, 2 May 2010 23:33:10 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005022333.o42NXAFO006055@svn.freebsd.org> From: Alan Cox Date: Sun, 2 May 2010 23:33: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: r207544 - 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: Sun, 02 May 2010 23:33:10 -0000 Author: alc Date: Sun May 2 23:33:10 2010 New Revision: 207544 URL: http://svn.freebsd.org/changeset/base/207544 Log: Add page lock assertions where we access the page's hold_count. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun May 2 22:48:27 2010 (r207543) +++ head/sys/vm/vm_page.c Sun May 2 23:33:10 2010 (r207544) @@ -1657,6 +1657,7 @@ vm_page_try_to_cache(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); if (m->dirty || m->hold_count || m->busy || m->wire_count || (m->oflags & VPO_BUSY) || (m->flags & PG_UNMANAGED)) { @@ -1680,6 +1681,7 @@ vm_page_try_to_free(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); if (m->object != NULL) VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); if (m->dirty || m->hold_count || m->busy || m->wire_count || @@ -1707,6 +1709,7 @@ vm_page_cache(vm_page_t m) vm_page_t root; mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); object = m->object; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); if ((m->flags & PG_UNMANAGED) || (m->oflags & VPO_BUSY) || m->busy || From owner-svn-src-all@FreeBSD.ORG Mon May 3 00:56:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C45A0106566B; Mon, 3 May 2010 00:56:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B3DBB8FC18; Mon, 3 May 2010 00:56: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 o430uQ0A024168; Mon, 3 May 2010 00:56:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o430uQ8N024166; Mon, 3 May 2010 00:56:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005030056.o430uQ8N024166@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 3 May 2010 00:56: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: r207545 - head/sys/dev/sge 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, 03 May 2010 00:56:26 -0000 Author: yongari Date: Mon May 3 00:56:26 2010 New Revision: 207545 URL: http://svn.freebsd.org/changeset/base/207545 Log: Fix wrong dma tag usage. Previously it used TX descriptor ring dma tag which should be TX mbuf dma tag. Reported by: xclin cs dot nctu dot edu dot tw > Modified: head/sys/dev/sge/if_sge.c Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Sun May 2 23:33:10 2010 (r207544) +++ head/sys/dev/sge/if_sge.c Mon May 3 00:56:26 2010 (r207545) @@ -1421,7 +1421,7 @@ sge_encap(struct sge_softc *sc, struct m } *m_head = m; } - error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_tx_tag, map, + error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, map, *m_head, txsegs, &nsegs, 0); if (error != 0) { m_freem(*m_head); @@ -1430,10 +1430,11 @@ sge_encap(struct sge_softc *sc, struct m } /* Check descriptor overrun. */ if (sc->sge_cdata.sge_tx_cnt + nsegs >= SGE_TX_RING_CNT) { - bus_dmamap_unload(sc->sge_cdata.sge_tx_tag, map); + bus_dmamap_unload(sc->sge_cdata.sge_txmbuf_tag, map); return (ENOBUFS); } - bus_dmamap_sync(sc->sge_cdata.sge_tx_tag, map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->sge_cdata.sge_txmbuf_tag, map, + BUS_DMASYNC_PREWRITE); cflags = 0; if ((*m_head)->m_pkthdr.csum_flags & CSUM_IP) From owner-svn-src-all@FreeBSD.ORG Mon May 3 01:04:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94057106564A; Mon, 3 May 2010 01:04:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 431418FC0C; Mon, 3 May 2010 01:04: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 o4314jAa026032; Mon, 3 May 2010 01:04:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4314jFj026030; Mon, 3 May 2010 01:04:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005030104.o4314jFj026030@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 3 May 2010 01:04:45 +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: r207546 - stable/8/sys/dev/ale 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, 03 May 2010 01:04:45 -0000 Author: yongari Date: Mon May 3 01:04:44 2010 New Revision: 207546 URL: http://svn.freebsd.org/changeset/base/207546 Log: MFC r207251: It seems ale(4) controllers do not like to see TCP payload in the first descriptor in TSO case. Otherwise controller can generate bad frames during TSO. To address it, make sure to pull up ethernet + IP + TCP header with options in first buffer. Also ensure the buffer length of the first descriptor for TSO covers entire ethernet + IP + TCP with options and setup additional Tx descriptor if the first buffer includes TCP payload. Tested by: Amar Takhar darkbeer dot org > Modified: stable/8/sys/dev/ale/if_ale.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ale/if_ale.c ============================================================================== --- stable/8/sys/dev/ale/if_ale.c Mon May 3 00:56:26 2010 (r207545) +++ stable/8/sys/dev/ale/if_ale.c Mon May 3 01:04:44 2010 (r207546) @@ -1585,7 +1585,7 @@ ale_encap(struct ale_softc *sc, struct m struct tcphdr *tcp; bus_dma_segment_t txsegs[ALE_MAXTXSEGS]; bus_dmamap_t map; - uint32_t cflags, ip_off, poff, vtag; + uint32_t cflags, hdrlen, ip_off, poff, vtag; int error, i, nsegs, prod, si; ALE_LOCK_ASSERT(sc); @@ -1678,6 +1678,11 @@ ale_encap(struct ale_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); + m = m_pullup(m, poff + (tcp->th_off << 2)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } /* * AR81xx requires IP/TCP header size and offset as * well as TCP pseudo checksum which complicates @@ -1730,7 +1735,7 @@ ale_encap(struct ale_softc *sc, struct m } /* Check descriptor overrun. */ - if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 2) { + if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 3) { bus_dmamap_unload(sc->ale_cdata.ale_tx_tag, map); return (ENOBUFS); } @@ -1782,8 +1787,32 @@ ale_encap(struct ale_softc *sc, struct m cflags |= ALE_TD_INSERT_VLAN_TAG; } - desc = NULL; - for (i = 0; i < nsegs; i++) { + i = 0; + if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * Make sure the first fragment contains + * only ethernet and IP/TCP header with options. + */ + hdrlen = poff + (tcp->th_off << 2); + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr); + desc->len = htole32(ALE_TX_BYTES(hdrlen) | vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + if (m->m_len - hdrlen > 0) { + /* Handle remaining payload of the first fragment. */ + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr + hdrlen); + desc->len = htole32(ALE_TX_BYTES(m->m_len - hdrlen) | + vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + } + i = 1; + } + for (; i < nsegs; i++) { desc = &sc->ale_cdata.ale_tx_ring[prod]; desc->addr = htole64(txsegs[i].ds_addr); desc->len = htole32(ALE_TX_BYTES(txsegs[i].ds_len) | vtag); From owner-svn-src-all@FreeBSD.ORG Mon May 3 01:13:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6C7E106566B; Mon, 3 May 2010 01:13:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D58E98FC18; Mon, 3 May 2010 01:13: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 o431DbkG028011; Mon, 3 May 2010 01:13:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o431DbYf028009; Mon, 3 May 2010 01:13:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005030113.o431DbYf028009@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 3 May 2010 01:13: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: r207547 - stable/7/sys/dev/ale 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, 03 May 2010 01:13:38 -0000 Author: yongari Date: Mon May 3 01:13:37 2010 New Revision: 207547 URL: http://svn.freebsd.org/changeset/base/207547 Log: MFC r207251: It seems ale(4) controllers do not like to see TCP payload in the first descriptor in TSO case. Otherwise controller can generate bad frames during TSO. To address it, make sure to pull up ethernet + IP + TCP header with options in first buffer. Also ensure the buffer length of the first descriptor for TSO covers entire ethernet + IP + TCP with options and setup additional Tx descriptor if the first buffer includes TCP payload. Tested by: Amar Takhar darkbeer dot org > Modified: stable/7/sys/dev/ale/if_ale.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/dev/ale/if_ale.c ============================================================================== --- stable/7/sys/dev/ale/if_ale.c Mon May 3 01:04:44 2010 (r207546) +++ stable/7/sys/dev/ale/if_ale.c Mon May 3 01:13:37 2010 (r207547) @@ -1585,7 +1585,7 @@ ale_encap(struct ale_softc *sc, struct m struct tcphdr *tcp; bus_dma_segment_t txsegs[ALE_MAXTXSEGS]; bus_dmamap_t map; - uint32_t cflags, ip_off, poff, vtag; + uint32_t cflags, hdrlen, ip_off, poff, vtag; int error, i, nsegs, prod, si; ALE_LOCK_ASSERT(sc); @@ -1678,6 +1678,11 @@ ale_encap(struct ale_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); + m = m_pullup(m, poff + (tcp->th_off << 2)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } /* * AR81xx requires IP/TCP header size and offset as * well as TCP pseudo checksum which complicates @@ -1730,7 +1735,7 @@ ale_encap(struct ale_softc *sc, struct m } /* Check descriptor overrun. */ - if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 2) { + if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 3) { bus_dmamap_unload(sc->ale_cdata.ale_tx_tag, map); return (ENOBUFS); } @@ -1782,8 +1787,32 @@ ale_encap(struct ale_softc *sc, struct m cflags |= ALE_TD_INSERT_VLAN_TAG; } - desc = NULL; - for (i = 0; i < nsegs; i++) { + i = 0; + if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * Make sure the first fragment contains + * only ethernet and IP/TCP header with options. + */ + hdrlen = poff + (tcp->th_off << 2); + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr); + desc->len = htole32(ALE_TX_BYTES(hdrlen) | vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + if (m->m_len - hdrlen > 0) { + /* Handle remaining payload of the first fragment. */ + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr + hdrlen); + desc->len = htole32(ALE_TX_BYTES(m->m_len - hdrlen) | + vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + } + i = 1; + } + for (; i < nsegs; i++) { desc = &sc->ale_cdata.ale_tx_ring[prod]; desc->addr = htole64(txsegs[i].ds_addr); desc->len = htole32(ALE_TX_BYTES(txsegs[i].ds_len) | vtag); From owner-svn-src-all@FreeBSD.ORG Mon May 3 05:41:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 815F6106564A; Mon, 3 May 2010 05:41:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 712108FC08; Mon, 3 May 2010 05:41: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 o435fp1J086568; Mon, 3 May 2010 05:41:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o435fpou086565; Mon, 3 May 2010 05:41:51 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005030541.o435fpou086565@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 05:41: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: r207548 - in head/sys: kern 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, 03 May 2010 05:41:51 -0000 Author: alc Date: Mon May 3 05:41:50 2010 New Revision: 207548 URL: http://svn.freebsd.org/changeset/base/207548 Log: This is the first step in transitioning responsibility for synchronizing access to the page's wire_count from the page queues lock to the page lock. Submitted by: kmacy Modified: head/sys/kern/uipc_cow.c head/sys/kern/uipc_syscalls.c head/sys/net/bpf_zerocopy.c Modified: head/sys/kern/uipc_cow.c ============================================================================== --- head/sys/kern/uipc_cow.c Mon May 3 01:13:37 2010 (r207547) +++ head/sys/kern/uipc_cow.c Mon May 3 05:41:50 2010 (r207548) @@ -80,6 +80,7 @@ socow_iodone(void *addr, void *args) pp = sf_buf_page(sf); sf_buf_free(sf); /* remove COW mapping */ + vm_page_lock(pp); vm_page_lock_queues(); vm_page_cowclear(pp); vm_page_unwire(pp, 0); @@ -91,6 +92,7 @@ socow_iodone(void *addr, void *args) if (pp->wire_count == 0 && pp->object == NULL) vm_page_free(pp); vm_page_unlock_queues(); + vm_page_unlock(pp); socow_stats.iodone++; } @@ -149,6 +151,7 @@ socow_setup(struct mbuf *m0, struct uio */ sf = sf_buf_alloc(pp, SFB_CATCH); if (!sf) { + vm_page_lock(pp); vm_page_lock_queues(); vm_page_cowclear(pp); vm_page_unwire(pp, 0); @@ -160,6 +163,7 @@ socow_setup(struct mbuf *m0, struct uio if (pp->wire_count == 0 && pp->object == NULL) vm_page_free(pp); vm_page_unlock_queues(); + vm_page_unlock(pp); socow_stats.fail_sf_buf++; return(0); } Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon May 3 01:13:37 2010 (r207547) +++ head/sys/kern/uipc_syscalls.c Mon May 3 05:41:50 2010 (r207548) @@ -1715,6 +1715,7 @@ sf_buf_mext(void *addr, void *args) m = sf_buf_page(args); sf_buf_free(args); + vm_page_lock(m); vm_page_lock_queues(); vm_page_unwire(m, 0); /* @@ -1725,6 +1726,7 @@ sf_buf_mext(void *addr, void *args) if (m->wire_count == 0 && m->object == NULL) vm_page_free(m); vm_page_unlock_queues(); + vm_page_unlock(m); if (addr == NULL) return; sfs = addr; @@ -2136,6 +2138,7 @@ retry_space: if ((sf = sf_buf_alloc(pg, (mnw ? SFB_NOWAIT : SFB_CATCH))) == NULL) { mbstat.sf_allocfail++; + vm_page_lock(pg); vm_page_lock_queues(); vm_page_unwire(pg, 0); /* @@ -2144,6 +2147,7 @@ retry_space: if (pg->wire_count == 0 && pg->object == NULL) vm_page_free(pg); vm_page_unlock_queues(); + vm_page_unlock(pg); error = (mnw ? EAGAIN : EINTR); break; } Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Mon May 3 01:13:37 2010 (r207547) +++ head/sys/net/bpf_zerocopy.c Mon May 3 05:41:50 2010 (r207548) @@ -112,11 +112,13 @@ static void zbuf_page_free(vm_page_t pp) { + vm_page_lock(pp); vm_page_lock_queues(); vm_page_unwire(pp, 0); if (pp->wire_count == 0 && pp->object == NULL) vm_page_free(pp); vm_page_unlock_queues(); + vm_page_unlock(pp); } /* From owner-svn-src-all@FreeBSD.ORG Mon May 3 07:00:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 980E1106566C; Mon, 3 May 2010 07:00:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 887038FC19; Mon, 3 May 2010 07:00: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 o4370orW004042; Mon, 3 May 2010 07:00:50 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4370oIl004040; Mon, 3 May 2010 07:00:50 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005030700.o4370oIl004040@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 07:00: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: r207551 - 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: Mon, 03 May 2010 07:00:50 -0000 Author: alc Date: Mon May 3 07:00:50 2010 New Revision: 207551 URL: http://svn.freebsd.org/changeset/base/207551 Log: Assert that the page queues lock is held in vm_page_remove() and vm_page_unwire() only if the page is managed, i.e., pageable. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon May 3 06:26:52 2010 (r207550) +++ head/sys/vm/vm_page.c Mon May 3 07:00:50 2010 (r207551) @@ -790,6 +790,8 @@ vm_page_remove(vm_page_t m) vm_object_t object; vm_page_t root; + if ((m->flags & PG_UNMANAGED) == 0) + mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((object = m->object) == NULL) return; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -797,7 +799,6 @@ vm_page_remove(vm_page_t m) m->oflags &= ~VPO_BUSY; vm_page_flash(m); } - mtx_assert(&vm_page_queue_mtx, MA_OWNED); /* * Now remove from the object's list of backed pages. @@ -1586,7 +1587,8 @@ void vm_page_unwire(vm_page_t m, int activate) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if ((m->flags & PG_UNMANAGED) == 0) + mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->flags & PG_FICTITIOUS) return; if (m->wire_count > 0) { From owner-svn-src-all@FreeBSD.ORG Mon May 3 07:08:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EF521065670; Mon, 3 May 2010 07:08:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5F46B8FC16; Mon, 3 May 2010 07:08: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 o4378G5e005694; Mon, 3 May 2010 07:08:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4378GV3005691; Mon, 3 May 2010 07:08:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005030708.o4378GV3005691@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 07:08: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: r207552 - 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: Mon, 03 May 2010 07:08:16 -0000 Author: alc Date: Mon May 3 07:08:16 2010 New Revision: 207552 URL: http://svn.freebsd.org/changeset/base/207552 Log: The pages allocated by kmem_alloc_attr() and kmem_malloc() are unmanaged. Consequently, neither the page lock nor the page queues lock is needed to unwire and free them. Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Mon May 3 07:00:50 2010 (r207551) +++ head/sys/vm/vm_contig.c Mon May 3 07:08:16 2010 (r207552) @@ -268,11 +268,7 @@ retry: i -= PAGE_SIZE; m = vm_page_lookup(object, OFF_TO_IDX(offset + i)); - vm_page_lock(m); - vm_page_lock_queues(); vm_page_free(m); - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); vm_map_delete(map, addr, addr + size); Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Mon May 3 07:00:50 2010 (r207551) +++ head/sys/vm/vm_kern.c Mon May 3 07:08:16 2010 (r207552) @@ -380,12 +380,8 @@ retry: i -= PAGE_SIZE; m = vm_page_lookup(kmem_object, OFF_TO_IDX(offset + i)); - vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_free(m); - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(kmem_object); vm_map_delete(map, addr, addr + size); From owner-svn-src-all@FreeBSD.ORG Mon May 3 07:32:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE88E106566C; Mon, 3 May 2010 07:32:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id AE4338FC14; Mon, 3 May 2010 07:32: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 o437WOJH011012; Mon, 3 May 2010 07:32:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o437WOvN011009; Mon, 3 May 2010 07:32:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005030732.o437WOvN011009@svn.freebsd.org> From: Martin Matuska Date: Mon, 3 May 2010 07:32: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: r207553 - head/lib/libpam/modules/pam_krb5 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, 03 May 2010 07:32:24 -0000 Author: mm Date: Mon May 3 07:32:24 2010 New Revision: 207553 URL: http://svn.freebsd.org/changeset/base/207553 Log: Implement the no_user_check option to pam_krb5. This option is available in the Linux implementation of pam_krb5 and allows to authorize a user not known to the local system. Ccache is not used as we don't have a secure uid/gid for the cache file. Usable for authentication of external kerberos users (e.g Active Directory) via PAM from applications like Cyrus saslauthd, PHP or perl. PR: bin/146186 Submitted by: myself Approved by: deplhij (mentor) MFC after: 2 weeks Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.8 head/lib/libpam/modules/pam_krb5/pam_krb5.c Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.8 ============================================================================== --- head/lib/libpam/modules/pam_krb5/pam_krb5.8 Mon May 3 07:08:16 2010 (r207552) +++ head/lib/libpam/modules/pam_krb5/pam_krb5.8 Mon May 3 07:32:24 2010 (r207553) @@ -108,6 +108,10 @@ and .Ql %p , to designate the current process ID; can be used in .Ar name . +.It Cm no_user_check +Do not verify if a user exists on the local system. This option implies the +.Cm no_ccache +option because there is no secure local uid/gid for the cache file. .El .Ss Kerberos 5 Account Management Module The Kerberos 5 account management component Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- head/lib/libpam/modules/pam_krb5/pam_krb5.c Mon May 3 07:08:16 2010 (r207552) +++ head/lib/libpam/modules/pam_krb5/pam_krb5.c Mon May 3 07:32:24 2010 (r207553) @@ -89,6 +89,7 @@ static void compat_free_data_contents(kr #define PAM_OPT_DEBUG "debug" #define PAM_OPT_FORWARDABLE "forwardable" #define PAM_OPT_NO_CCACHE "no_ccache" +#define PAM_OPT_NO_USER_CHECK "no_user_check" #define PAM_OPT_REUSE_CCACHE "reuse_ccache" /* @@ -194,6 +195,10 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Got password"); + if (openpam_get_option(pamh, PAM_OPT_NO_USER_CHECK)) + PAM_LOG("Skipping local user check"); + else { + /* Verify the local user exists (AFTER getting the password) */ if (strchr(user, '@')) { /* get a local account name for this principal */ @@ -221,6 +226,7 @@ pam_sm_authenticate(pam_handle_t *pamh, } PAM_LOG("Done getpwnam()"); + } /* Get a TGT */ memset(&creds, 0, sizeof(krb5_creds)); @@ -366,7 +372,8 @@ pam_sm_setcred(pam_handle_t *pamh, int f return (PAM_SERVICE_ERR); /* If a persistent cache isn't desired, stop now. */ - if (openpam_get_option(pamh, PAM_OPT_NO_CCACHE)) + if (openpam_get_option(pamh, PAM_OPT_NO_CCACHE) || + openpam_get_option(pamh, PAM_OPT_NO_USER_CHECK)) return (PAM_SUCCESS); PAM_LOG("Establishing credentials"); From owner-svn-src-all@FreeBSD.ORG Mon May 3 07:32:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B909C1065678; Mon, 3 May 2010 07:32:51 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A433B8FC1A; Mon, 3 May 2010 07: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 o437WpJS011206; Mon, 3 May 2010 07:32:51 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o437WoqG011142; Mon, 3 May 2010 07:32:50 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201005030732.o437WoqG011142@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 3 May 2010 07:32: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: r207554 - in head/sys: arm/at91 arm/xscale/ixp425 dev/ae dev/an dev/ath dev/bwi dev/bwn dev/ce dev/cm dev/cp dev/cs dev/ctau dev/cx dev/cxgb dev/ed dev/ep dev/ex dev/fe dev/ie dev/iicbu... 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, 03 May 2010 07:32:51 -0000 Author: sobomax Date: Mon May 3 07:32:50 2010 New Revision: 207554 URL: http://svn.freebsd.org/changeset/base/207554 Log: Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Modified: head/sys/arm/at91/if_ate.c head/sys/arm/xscale/ixp425/if_npe.c head/sys/dev/ae/if_ae.c head/sys/dev/an/if_an.c head/sys/dev/ath/if_ath.c head/sys/dev/bwi/if_bwi.c head/sys/dev/bwn/if_bwn.c head/sys/dev/ce/if_ce.c head/sys/dev/cm/smc90cx6.c head/sys/dev/cp/if_cp.c head/sys/dev/cs/if_cs.c head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/ed/if_ed.c head/sys/dev/ep/if_ep.c head/sys/dev/ex/if_ex.c head/sys/dev/fe/if_fe.c head/sys/dev/ie/if_ie.c head/sys/dev/iicbus/if_ic.c head/sys/dev/ipw/if_ipw.c head/sys/dev/iwi/if_iwi.c head/sys/dev/iwn/if_iwn.c head/sys/dev/le/lance.c head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c head/sys/dev/my/if_my.c head/sys/dev/nxge/if_nxge.c head/sys/dev/pdq/pdq_ifsubr.c head/sys/dev/ppbus/if_plip.c head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2661.c head/sys/dev/sbni/if_sbni.c head/sys/dev/smc/if_smc.c head/sys/dev/sn/if_sn.c head/sys/dev/snc/dp83932.c head/sys/dev/usb/net/uhso.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c head/sys/dev/vx/if_vx.c head/sys/dev/wi/if_wi.c head/sys/dev/wl/if_wl.c head/sys/dev/wpi/if_wpi.c head/sys/dev/xe/if_xe.c head/sys/mips/adm5120/if_admsw.c head/sys/mips/atheros/if_arge.c head/sys/net/if.c head/sys/net/if_ef.c head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_stf.c head/sys/net80211/ieee80211.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_fec.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_tty.c head/sys/pci/if_rl.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/arm/at91/if_ate.c Mon May 3 07:32:50 2010 (r207554) @@ -272,8 +272,8 @@ ate_attach(device_t dev) ifp->if_ioctl = ateioctl; ifp->if_init = ateinit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); Modified: head/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- head/sys/arm/xscale/ixp425/if_npe.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/arm/xscale/ixp425/if_npe.c Mon May 3 07:32:50 2010 (r207554) @@ -360,7 +360,7 @@ npe_attach(device_t dev) ifp->if_ioctl = npeioctl; ifp->if_init = npeinit; IFQ_SET_MAXLEN(&ifp->if_snd, sc->txdma.nbuf - 1); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ae/if_ae.c Mon May 3 07:32:50 2010 (r207554) @@ -378,7 +378,7 @@ ae_attach(device_t dev) ifp->if_init = ae_init; ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; ifp->if_hwassist = 0; - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/an/if_an.c Mon May 3 07:32:50 2010 (r207554) @@ -767,8 +767,8 @@ an_attach(struct an_softc *sc, int flags ifp->if_start = an_start; ifp->if_init = an_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); bzero(sc->an_config.an_nodename, sizeof(sc->an_config.an_nodename)); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ath/if_ath.c Mon May 3 07:32:50 2010 (r207554) @@ -562,8 +562,8 @@ ath_attach(u_int16_t devid, struct ath_s ifp->if_start = ath_start; ifp->if_ioctl = ath_ioctl; ifp->if_init = ath_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/bwi/if_bwi.c Mon May 3 07:32:50 2010 (r207554) @@ -461,8 +461,8 @@ bwi_attach(struct bwi_softc *sc) ifp->if_init = bwi_init; ifp->if_ioctl = bwi_ioctl; ifp->if_start = bwi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); callout_init_mtx(&sc->sc_watchdog_timer, &sc->sc_mtx, 0); Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/bwn/if_bwn.c Mon May 3 07:32:50 2010 (r207554) @@ -1193,8 +1193,8 @@ bwn_attach_pre(struct bwn_softc *sc) ifp->if_init = bwn_init; ifp->if_ioctl = bwn_ioctl; ifp->if_start = bwn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); return (0); Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ce/if_ce.c Mon May 3 07:32:50 2010 (r207554) @@ -701,9 +701,9 @@ static int ce_attach (device_t dev) #endif continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->queue.ifq_mtx, "ce_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ce_queue_hi", NULL, MTX_DEF); @@ -732,7 +732,7 @@ static int ce_attach (device_t dev) d->ifp->if_ioctl = ce_sioctl; d->ifp->if_start = ce_ifstart; d->ifp->if_init = ce_initialize; - d->rqueue.ifq_maxlen = IFQ_MAXLEN; + d->rqueue.ifq_maxlen = ifqmaxlen; #if __FreeBSD_version >= 500000 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); #endif Modified: head/sys/dev/cm/smc90cx6.c ============================================================================== --- head/sys/dev/cm/smc90cx6.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/cm/smc90cx6.c Mon May 3 07:32:50 2010 (r207554) @@ -189,7 +189,7 @@ cm_attach(dev) ifp->if_ioctl = cm_ioctl; ifp->if_init = cm_init; /* XXX IFQ_SET_READY(&ifp->if_snd); */ - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; arc_ifattach(ifp, linkaddress); Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/cp/if_cp.c Mon May 3 07:32:50 2010 (r207554) @@ -505,8 +505,8 @@ static int cp_attach (device_t dev) NG_NODE_UNREF (d->node); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "cp_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cp_queue_hi", NULL, MTX_DEF); #else /*NETGRAPH*/ Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/cs/if_cs.c Mon May 3 07:32:50 2010 (r207554) @@ -500,7 +500,7 @@ cs_attach(device_t dev) ifp->if_start=cs_start; ifp->if_ioctl=cs_ioctl; ifp->if_init=cs_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_flags=(IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ctau/if_ct.c Mon May 3 07:32:50 2010 (r207554) @@ -722,8 +722,8 @@ static int ct_attach (device_t dev) ct_bus_dma_mem_free (&d->dmamem); continue; } - d->queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->queue.ifq_mtx, "ct_queue", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "ct_queue_hi", NULL, MTX_DEF); #else /*NETGRAPH*/ Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/cx/if_cx.c Mon May 3 07:32:50 2010 (r207554) @@ -831,8 +831,8 @@ static int cx_attach (device_t dev) cx_bus_dma_mem_free (&d->dmamem); continue; } - d->lo_queue.ifq_maxlen = IFQ_MAXLEN; - d->hi_queue.ifq_maxlen = IFQ_MAXLEN; + d->lo_queue.ifq_maxlen = ifqmaxlen; + d->hi_queue.ifq_maxlen = ifqmaxlen; mtx_init (&d->lo_queue.ifq_mtx, "cx_queue_lo", NULL, MTX_DEF); mtx_init (&d->hi_queue.ifq_mtx, "cx_queue_hi", NULL, MTX_DEF); #else /*NETGRAPH*/ Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/cxgb/cxgb_main.c Mon May 3 07:32:50 2010 (r207554) @@ -1012,7 +1012,7 @@ cxgb_port_attach(device_t dev) ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; + ifp->if_snd.ifq_drv_maxlen = max(cxgb_snd_queue_len, ifqmaxlen); IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ed/if_ed.c Mon May 3 07:32:50 2010 (r207554) @@ -283,8 +283,8 @@ ed_attach(device_t dev) ifp->if_start = ed_start; ifp->if_ioctl = ed_ioctl; ifp->if_init = ed_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof sc->mibdata; Modified: head/sys/dev/ep/if_ep.c ============================================================================== --- head/sys/dev/ep/if_ep.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ep/if_ep.c Mon May 3 07:32:50 2010 (r207554) @@ -306,8 +306,8 @@ ep_attach(struct ep_softc *sc) ifp->if_start = epstart; ifp->if_ioctl = epioctl; ifp->if_init = epinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); callout_init_mtx(&sc->watchdog_timer, &sc->sc_mtx, 0); Modified: head/sys/dev/ex/if_ex.c ============================================================================== --- head/sys/dev/ex/if_ex.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ex/if_ex.c Mon May 3 07:32:50 2010 (r207554) @@ -237,7 +237,7 @@ ex_attach(device_t dev) ifp->if_start = ex_start; ifp->if_ioctl = ex_ioctl; ifp->if_init = ex_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifmedia_init(&sc->ifmedia, 0, ex_ifmedia_upd, ex_ifmedia_sts); mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, Modified: head/sys/dev/fe/if_fe.c ============================================================================== --- head/sys/dev/fe/if_fe.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/fe/if_fe.c Mon May 3 07:32:50 2010 (r207554) @@ -766,7 +766,7 @@ fe_attach (device_t dev) * Set fixed interface flags. */ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); #if FE_SINGLE_TRANSMISSION /* Override txb config to allocate minimum. */ Modified: head/sys/dev/ie/if_ie.c ============================================================================== --- head/sys/dev/ie/if_ie.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ie/if_ie.c Mon May 3 07:32:50 2010 (r207554) @@ -318,7 +318,7 @@ ie_attach(device_t dev) ifp->if_start = iestart; ifp->if_ioctl = ieioctl; ifp->if_init = ieinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ether_ifattach(ifp, sc->enaddr); Modified: head/sys/dev/iicbus/if_ic.c ============================================================================== --- head/sys/dev/iicbus/if_ic.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/iicbus/if_ic.c Mon May 3 07:32:50 2010 (r207554) @@ -181,7 +181,7 @@ icattach(device_t dev) ifp->if_output = icoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ic_alloc_buffers(sc, ICMTU); Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ipw/if_ipw.c Mon May 3 07:32:50 2010 (r207554) @@ -289,8 +289,8 @@ ipw_attach(device_t dev) ifp->if_init = ipw_init; ifp->if_ioctl = ipw_ioctl; ifp->if_start = ipw_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/iwi/if_iwi.c Mon May 3 07:32:50 2010 (r207554) @@ -363,8 +363,8 @@ iwi_attach(device_t dev) ifp->if_init = iwi_init; ifp->if_ioctl = iwi_ioctl; ifp->if_start = iwi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/iwn/if_iwn.c Mon May 3 07:32:50 2010 (r207554) @@ -627,8 +627,8 @@ iwn_attach(device_t dev) ifp->if_init = iwn_init; ifp->if_ioctl = iwn_ioctl; ifp->if_start = iwn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic, macaddr); Modified: head/sys/dev/le/lance.c ============================================================================== --- head/sys/dev/le/lance.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/le/lance.c Mon May 3 07:32:50 2010 (r207554) @@ -133,8 +133,8 @@ lance_config(struct lance_softc *sc, con ifp->if_flags &= ~IFF_MULTICAST; #endif ifp->if_baudrate = IF_Mbps(10); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Initialize ifmedia structures. */ Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/malo/if_malo.c Mon May 3 07:32:50 2010 (r207554) @@ -275,8 +275,8 @@ malo_attach(uint16_t devid, struct malo_ ifp->if_start = malo_start; ifp->if_ioctl = malo_ioctl; ifp->if_init = malo_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/mwl/if_mwl.c Mon May 3 07:32:50 2010 (r207554) @@ -404,8 +404,8 @@ mwl_attach(uint16_t devid, struct mwl_so ifp->if_start = mwl_start; ifp->if_ioctl = mwl_ioctl; ifp->if_init = mwl_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/my/if_my.c ============================================================================== --- head/sys/dev/my/if_my.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/my/if_my.c Mon May 3 07:32:50 2010 (r207554) @@ -902,8 +902,8 @@ my_attach(device_t dev) ifp->if_start = my_start; ifp->if_init = my_init; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if (sc->my_info->my_did == MTD803ID) Modified: head/sys/dev/nxge/if_nxge.c ============================================================================== --- head/sys/dev/nxge/if_nxge.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/nxge/if_nxge.c Mon May 3 07:32:50 2010 (r207554) @@ -1190,7 +1190,7 @@ xge_interface_setup(device_t dev) ifnetp->if_start = xge_send; /* TODO: Check and assign optimal value */ - ifnetp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifnetp->if_snd.ifq_maxlen = ifqmaxlen; ifnetp->if_capabilities = IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM; Modified: head/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- head/sys/dev/pdq/pdq_ifsubr.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/pdq/pdq_ifsubr.c Mon May 3 07:32:50 2010 (r207554) @@ -471,7 +471,7 @@ pdq_ifattach(pdq_softc_t *sc, const pdq_ if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); ifp->if_softc = sc; ifp->if_init = pdq_ifinit; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST; ifp->if_ioctl = pdq_ifioctl; Modified: head/sys/dev/ppbus/if_plip.c ============================================================================== --- head/sys/dev/ppbus/if_plip.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ppbus/if_plip.c Mon May 3 07:32:50 2010 (r207554) @@ -262,7 +262,7 @@ lp_attach(device_t dev) ifp->if_output = lpoutput; ifp->if_hdrlen = 0; ifp->if_addrlen = 0; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ral/rt2560.c Mon May 3 07:32:50 2010 (r207554) @@ -267,8 +267,8 @@ rt2560_attach(device_t dev, int id) ifp->if_init = rt2560_init; ifp->if_ioctl = rt2560_ioctl; ifp->if_start = rt2560_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/ral/rt2661.c Mon May 3 07:32:50 2010 (r207554) @@ -269,8 +269,8 @@ rt2661_attach(device_t dev, int id) ifp->if_init = rt2661_init; ifp->if_ioctl = rt2661_ioctl; ifp->if_start = rt2661_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/sbni/if_sbni.c ============================================================================== --- head/sys/dev/sbni/if_sbni.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/sbni/if_sbni.c Mon May 3 07:32:50 2010 (r207554) @@ -235,7 +235,7 @@ sbni_attach(struct sbni_softc *sc, int u ifp->if_init = sbni_init; ifp->if_start = sbni_start; ifp->if_ioctl = sbni_ioctl; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); /* report real baud rate */ csr0 = sbni_inb(sc, CSR0); Modified: head/sys/dev/smc/if_smc.c ============================================================================== --- head/sys/dev/smc/if_smc.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/smc/if_smc.c Mon May 3 07:32:50 2010 (r207554) @@ -347,7 +347,7 @@ smc_attach(device_t dev) ifp->if_init = smc_init; ifp->if_ioctl = smc_ioctl; ifp->if_start = smc_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = ifp->if_capenable = 0; Modified: head/sys/dev/sn/if_sn.c ============================================================================== --- head/sys/dev/sn/if_sn.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/sn/if_sn.c Mon May 3 07:32:50 2010 (r207554) @@ -207,8 +207,8 @@ sn_attach(device_t dev) ifp->if_ioctl = snioctl; ifp->if_init = sninit; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ether_ifattach(ifp, eaddr); Modified: head/sys/dev/snc/dp83932.c ============================================================================== --- head/sys/dev/snc/dp83932.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/snc/dp83932.c Mon May 3 07:32:50 2010 (r207554) @@ -177,7 +177,7 @@ sncconfig(sc, media, nmedia, defmedia, m ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = sncinit; ifp->if_mtu = ETHERMTU; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); /* Initialize media goo. */ ifmedia_init(&sc->sc_media, 0, snc_mediachange, Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/net/uhso.c Mon May 3 07:32:50 2010 (r207554) @@ -1471,8 +1471,8 @@ static int uhso_attach_ifnet(struct uhso ifp->if_output = uhso_if_output; ifp->if_flags = 0; ifp->if_softc = sc; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); if_attach(ifp); Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/net/usb_ethernet.c Mon May 3 07:32:50 2010 (r207554) @@ -214,8 +214,8 @@ ue_attach_post_task(struct usb_proc_msg ifp->if_ioctl = uether_ioctl; ifp->if_start = ue_start; ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ue->ue_ifp = ifp; Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_rum.c Mon May 3 07:32:50 2010 (r207554) @@ -478,8 +478,8 @@ rum_attach(device_t self) ifp->if_init = rum_init; ifp->if_ioctl = rum_ioctl; ifp->if_start = rum_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_run.c Mon May 3 07:32:50 2010 (r207554) @@ -609,8 +609,8 @@ run_attach(device_t self) ifp->if_init = run_init; ifp->if_ioctl = run_ioctl; ifp->if_start = run_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_uath.c Mon May 3 07:32:50 2010 (r207554) @@ -438,8 +438,8 @@ uath_attach(device_t dev) ifp->if_ioctl = uath_ioctl; ifp->if_start = uath_start; /* XXX UATH_TX_DATA_LIST_COUNT */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_upgt.c Mon May 3 07:32:50 2010 (r207554) @@ -331,7 +331,7 @@ upgt_attach(device_t dev) ifp->if_init = upgt_init; ifp->if_ioctl = upgt_ioctl; ifp->if_start = upgt_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_ural.c Mon May 3 07:32:50 2010 (r207554) @@ -467,8 +467,8 @@ ural_attach(device_t self) ifp->if_init = ural_init; ifp->if_ioctl = ural_ioctl; ifp->if_start = ural_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_urtw.c Mon May 3 07:32:50 2010 (r207554) @@ -867,8 +867,8 @@ urtw_attach(device_t dev) ifp->if_ioctl = urtw_ioctl; ifp->if_start = urtw_start; /* XXX URTW_TX_DATA_LIST_COUNT */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/usb/wlan/if_zyd.c Mon May 3 07:32:50 2010 (r207554) @@ -381,7 +381,7 @@ zyd_attach(device_t dev) ifp->if_init = zyd_init; ifp->if_ioctl = zyd_ioctl; ifp->if_start = zyd_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ic = ifp->if_l2com; Modified: head/sys/dev/vx/if_vx.c ============================================================================== --- head/sys/dev/vx/if_vx.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/vx/if_vx.c Mon May 3 07:32:50 2010 (r207554) @@ -189,7 +189,7 @@ vx_attach(device_t dev) } ifp->if_mtu = ETHERMTU; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = vx_start; ifp->if_ioctl = vx_ioctl; Modified: head/sys/dev/wi/if_wi.c ============================================================================== --- head/sys/dev/wi/if_wi.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/wi/if_wi.c Mon May 3 07:32:50 2010 (r207554) @@ -333,8 +333,8 @@ wi_attach(device_t dev) ifp->if_ioctl = wi_ioctl; ifp->if_start = wi_start; ifp->if_init = wi_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; Modified: head/sys/dev/wl/if_wl.c ============================================================================== --- head/sys/dev/wl/if_wl.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/wl/if_wl.c Mon May 3 07:32:50 2010 (r207554) @@ -559,7 +559,7 @@ wlattach(device_t device) ifp->if_init = wlinit; ifp->if_start = wlstart; ifp->if_ioctl = wlioctl; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; /* no entries ifp->if_done ifp->if_reset Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/wpi/if_wpi.c Mon May 3 07:32:50 2010 (r207554) @@ -661,8 +661,8 @@ wpi_attach(device_t dev) ifp->if_init = wpi_init; ifp->if_ioctl = wpi_ioctl; ifp->if_start = wpi_start; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ieee80211_ifattach(ic, macaddr); Modified: head/sys/dev/xe/if_xe.c ============================================================================== --- head/sys/dev/xe/if_xe.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/dev/xe/if_xe.c Mon May 3 07:32:50 2010 (r207554) @@ -254,7 +254,7 @@ xe_attach(device_t dev) scp->ifp->if_ioctl = xe_ioctl; scp->ifp->if_init = xe_init; scp->ifp->if_baudrate = 100000000; - IFQ_SET_MAXLEN(&scp->ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&scp->ifp->if_snd, ifqmaxlen); /* Initialise the ifmedia structure */ ifmedia_init(scp->ifm, 0, xe_media_change, xe_media_status); Modified: head/sys/mips/adm5120/if_admsw.c ============================================================================== --- head/sys/mips/adm5120/if_admsw.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/mips/adm5120/if_admsw.c Mon May 3 07:32:50 2010 (r207554) @@ -540,8 +540,8 @@ admsw_attach(device_t dev) ifp->if_init = admsw_init; ifp->if_mtu = ETHERMTU; ifp->if_baudrate = IF_Mbps(100); - IFQ_SET_MAXLEN(&ifp->if_snd, max(ADMSW_NTXLDESC, IFQ_MAXLEN)); - ifp->if_snd.ifq_drv_maxlen = max(ADMSW_NTXLDESC, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, max(ADMSW_NTXLDESC, ifqmaxlen)); + ifp->if_snd.ifq_drv_maxlen = max(ADMSW_NTXLDESC, ifqmaxlen); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities |= IFCAP_VLAN_MTU; Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/mips/atheros/if_arge.c Mon May 3 07:32:50 2010 (r207554) @@ -312,8 +312,8 @@ arge_attach(device_t dev) sc->arge_if_flags = ifp->if_flags; /* XXX: add real size */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); ifp->if_capenable = ifp->if_capabilities; Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/net/if.c Mon May 3 07:32:50 2010 (r207554) @@ -104,6 +104,10 @@ struct ifindex_entry { SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); +TUNABLE_INT("net.link.ifqmaxlen", &ifqmaxlen); +SYSCTL_UINT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, + &ifqmaxlen, 0, "max send queue size"); + /* Log link state change events */ static int log_link_state_change = 1; Modified: head/sys/net/if_ef.c ============================================================================== --- head/sys/net/if_ef.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/net/if_ef.c Mon May 3 07:32:50 2010 (r207554) @@ -129,7 +129,7 @@ ef_attach(struct efnet *sc) ifp->if_start = ef_start; ifp->if_init = ef_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); /* * Attach the interface Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/net/if_gif.c Mon May 3 07:32:50 2010 (r207554) @@ -185,7 +185,7 @@ gif_clone_create(ifc, unit, params) GIF2IFP(sc)->if_ioctl = gif_ioctl; GIF2IFP(sc)->if_start = gif_start; GIF2IFP(sc)->if_output = gif_output; - GIF2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GIF2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/net/if_gre.c Mon May 3 07:32:50 2010 (r207554) @@ -184,7 +184,7 @@ gre_clone_create(ifc, unit, params) GRE2IFP(sc)->if_softc = sc; if_initname(GRE2IFP(sc), ifc->ifc_name, unit); - GRE2IFP(sc)->if_snd.ifq_maxlen = IFQ_MAXLEN; + GRE2IFP(sc)->if_snd.ifq_maxlen = ifqmaxlen; GRE2IFP(sc)->if_addrlen = 0; GRE2IFP(sc)->if_hdrlen = 24; /* IP + GRE */ GRE2IFP(sc)->if_mtu = GREMTU; Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/net/if_stf.c Mon May 3 07:32:50 2010 (r207554) @@ -252,7 +252,7 @@ stf_clone_create(struct if_clone *ifc, c ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl; ifp->if_output = stf_output; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); return (0); Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/net80211/ieee80211.c Mon May 3 07:32:50 2010 (r207554) @@ -394,8 +394,8 @@ ieee80211_vap_setup(struct ieee80211com ifp->if_ioctl = ieee80211_ioctl; ifp->if_init = ieee80211_init; /* NB: input+output filled in by ether_ifattach */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); vap->iv_ifp = ifp; Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/netgraph/ng_eiface.c Mon May 3 07:32:50 2010 (r207554) @@ -369,7 +369,7 @@ ng_eiface_constructor(node_p node) ifp->if_output = ether_output; ifp->if_start = ng_eiface_start; ifp->if_ioctl = ng_eiface_ioctl; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); /* Give this node the same name as the interface (if possible) */ Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/netgraph/ng_fec.c Mon May 3 07:32:50 2010 (r207554) @@ -1227,7 +1227,7 @@ ng_fec_constructor(node_p node) ifp->if_start = ng_fec_start; ifp->if_ioctl = ng_fec_ioctl; ifp->if_init = ng_fec_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_mtu = NG_FEC_MTU_DEFAULT; ifp->if_flags = (IFF_SIMPLEX|IFF_BROADCAST|IFF_MULTICAST); ifp->if_addrlen = 0; /* XXX */ Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/netgraph/ng_iface.c Mon May 3 07:32:50 2010 (r207554) @@ -564,8 +564,8 @@ ng_iface_constructor(node_p node) ifp->if_addrlen = 0; /* XXX */ ifp->if_hdrlen = 0; /* XXX */ ifp->if_baudrate = 64000; /* XXX */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* Give this node the same name as the interface (if possible) */ Modified: head/sys/netgraph/ng_tty.c ============================================================================== --- head/sys/netgraph/ng_tty.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/netgraph/ng_tty.c Mon May 3 07:32:50 2010 (r207554) @@ -164,7 +164,7 @@ ngt_constructor(node_p node) sc->node = node; mtx_init(&sc->outq.ifq_mtx, "ng_tty node+queue", NULL, MTX_DEF); - IFQ_SET_MAXLEN(&sc->outq, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&sc->outq, ifqmaxlen); return (0); } Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Mon May 3 07:32:24 2010 (r207553) +++ head/sys/pci/if_rl.c Mon May 3 07:32:50 2010 (r207554) @@ -942,8 +942,8 @@ rl_attach(device_t dev) #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_READY(&ifp->if_snd); /* From owner-svn-src-all@FreeBSD.ORG Mon May 3 07:39:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADC29106566B; Mon, 3 May 2010 07:39:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9D93C8FC16; Mon, 3 May 2010 07:39: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 o437dqbd012785; Mon, 3 May 2010 07:39:52 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o437dq0D012784; Mon, 3 May 2010 07:39:52 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005030739.o437dq0D012784@svn.freebsd.org> From: Martin Matuska Date: Mon, 3 May 2010 07:39: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: r207555 - head/lib/libpam/modules/pam_krb5 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, 03 May 2010 07:39:52 -0000 Author: mm Date: Mon May 3 07:39:51 2010 New Revision: 207555 URL: http://svn.freebsd.org/changeset/base/207555 Log: Code indent according to style(9). PR: bin/146186 Submitted by: myself Approved by: delphij (mentor) MFC after: 2 weeks Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- head/lib/libpam/modules/pam_krb5/pam_krb5.c Mon May 3 07:32:50 2010 (r207554) +++ head/lib/libpam/modules/pam_krb5/pam_krb5.c Mon May 3 07:39:51 2010 (r207555) @@ -199,33 +199,33 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Skipping local user check"); else { - /* Verify the local user exists (AFTER getting the password) */ - if (strchr(user, '@')) { - /* get a local account name for this principal */ - krbret = krb5_aname_to_localname(pam_context, princ, - sizeof(luser), luser); - if (krbret != 0) { - PAM_VERBOSE_ERROR("Kerberos 5 error"); - PAM_LOG("Error krb5_aname_to_localname(): %s", - krb5_get_err_text(pam_context, krbret)); - retval = PAM_USER_UNKNOWN; - goto cleanup2; - } + /* Verify the local user exists (AFTER getting the password) */ + if (strchr(user, '@')) { + /* get a local account name for this principal */ + krbret = krb5_aname_to_localname(pam_context, princ, + sizeof(luser), luser); + if (krbret != 0) { + PAM_VERBOSE_ERROR("Kerberos 5 error"); + PAM_LOG("Error krb5_aname_to_localname(): %s", + krb5_get_err_text(pam_context, krbret)); + retval = PAM_USER_UNKNOWN; + goto cleanup2; + } - retval = pam_set_item(pamh, PAM_USER, luser); - if (retval != PAM_SUCCESS) - goto cleanup2; + retval = pam_set_item(pamh, PAM_USER, luser); + if (retval != PAM_SUCCESS) + goto cleanup2; - PAM_LOG("PAM_USER Redone"); - } + PAM_LOG("PAM_USER Redone"); + } - pwd = getpwnam(user); - if (pwd == NULL) { - retval = PAM_USER_UNKNOWN; - goto cleanup2; - } + pwd = getpwnam(user); + if (pwd == NULL) { + retval = PAM_USER_UNKNOWN; + goto cleanup2; + } - PAM_LOG("Done getpwnam()"); + PAM_LOG("Done getpwnam()"); } /* Get a TGT */ From owner-svn-src-all@FreeBSD.ORG Mon May 3 09:31:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDD5B1065677; Mon, 3 May 2010 09:31:51 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CD4578FC2A; Mon, 3 May 2010 09:31: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 o439VpKT037311; Mon, 3 May 2010 09:31:51 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439Vpic037309; Mon, 3 May 2010 09:31:51 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201005030931.o439Vpic037309@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 3 May 2010 09:31: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: r207558 - stable/8/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, 03 May 2010 09:31:52 -0000 Author: bms Date: Mon May 3 09:31:51 2010 New Revision: 207558 URL: http://svn.freebsd.org/changeset/base/207558 Log: MFC r207275: Fix a regression where DVMRP diagnostic traffic, such as that used by mrinfo and mtrace, was dropped by the IGMP TTL check. IGMP control traffic must always have a TTL of 1. Submitted by: Matthew Luckie Modified: stable/8/sys/netinet/igmp.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/igmp.c ============================================================================== --- stable/8/sys/netinet/igmp.c Mon May 3 09:28:10 2010 (r207557) +++ stable/8/sys/netinet/igmp.c Mon May 3 09:31:51 2010 (r207558) @@ -1468,12 +1468,6 @@ igmp_input(struct mbuf *m, int off) } ip = mtod(m, struct ip *); - if (ip->ip_ttl != 1) { - IGMPSTAT_INC(igps_rcv_badttl); - m_freem(m); - return; - } - /* * Validate checksum. */ @@ -1488,6 +1482,17 @@ igmp_input(struct mbuf *m, int off) m->m_data -= iphlen; m->m_len += iphlen; + /* + * IGMP control traffic is link-scope, and must have a TTL of 1. + * DVMRP traffic (e.g. mrinfo, mtrace) is an exception; + * probe packets may come from beyond the LAN. + */ + if (igmp->igmp_type != IGMP_DVMRP && ip->ip_ttl != 1) { + IGMPSTAT_INC(igps_rcv_badttl); + m_freem(m); + return; + } + switch (igmp->igmp_type) { case IGMP_HOST_MEMBERSHIP_QUERY: if (igmplen == IGMP_MINLEN) { From owner-svn-src-all@FreeBSD.ORG Mon May 3 09:35:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15E9B106564A; Mon, 3 May 2010 09:35:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 04E258FC17; Mon, 3 May 2010 09:35: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 o439Zeen038198; Mon, 3 May 2010 09:35:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439Zeql038196; Mon, 3 May 2010 09:35:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005030935.o439Zeql038196@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 09:35: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: r207559 - stable/8/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: Mon, 03 May 2010 09:35:41 -0000 Author: delphij Date: Mon May 3 09:35:40 2010 New Revision: 207559 URL: http://svn.freebsd.org/changeset/base/207559 Log: MFC r207383: Add FreeBSD 8.1 to known list as it's being referenced by a couple of manpages already. Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 09:31:51 2010 (r207558) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 09:35:40 2010 (r207559) @@ -73,6 +73,7 @@ .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 +.ds doc-operating-system-FreeBSD-8.1 8.1 .ds doc-operating-system-FreeBSD-9.0 9.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-all@FreeBSD.ORG Mon May 3 09:46:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5DD11065679; Mon, 3 May 2010 09:46:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B4B238FC2D; Mon, 3 May 2010 09:46: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 o439klIp040689; Mon, 3 May 2010 09:46:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439klsv040687; Mon, 3 May 2010 09:46:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005030946.o439klsv040687@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 09:46: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: r207560 - stable/8/sys/cddl/compat/opensolaris/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: Mon, 03 May 2010 09:46:47 -0000 Author: delphij Date: Mon May 3 09:46:47 2010 New Revision: 207560 URL: http://svn.freebsd.org/changeset/base/207560 Log: MFC r206838: Partially MFp4 #176265 by pjd@: - Properly initialize and destroy system_taskq. - Add a dummy implementation of taskq_create_proc(). Note: We do not currently use system_taskq in ZFS so this is mostly a no-op at this time. Proper system_taskq initialization is required by newer ZFS code. Ok'ed by: pjd Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Mon May 3 09:35:40 2010 (r207559) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Mon May 3 09:46:47 2010 (r207560) @@ -52,9 +52,9 @@ static void system_taskq_init(void *arg) { - system_taskq = (taskq_t *)taskqueue_thread; taskq_zone = uma_zcreate("taskq_zone", sizeof(struct ostask), NULL, NULL, NULL, NULL, 0, 0); + system_taskq = taskq_create("system_taskq", mp_ncpus, 0, 0, 0, 0); } SYSINIT(system_taskq_init, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_init, NULL); @@ -62,6 +62,7 @@ static void system_taskq_fini(void *arg) { + taskq_destroy(system_taskq); uma_zdestroy(taskq_zone); } SYSUNINIT(system_taskq_fini, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_fini, NULL); @@ -72,10 +73,8 @@ taskq_create(const char *name, int nthre { taskq_t *tq; - if ((flags & TASKQ_THREADS_CPU_PCT) != 0) { - /* TODO: Calculate number od threads. */ - printf("%s: TASKQ_THREADS_CPU_PCT\n", __func__); - } + if ((flags & TASKQ_THREADS_CPU_PCT) != 0) + nthreads = MAX((mp_ncpus * nthreads) / 100, 1); tq = kmem_alloc(sizeof(*tq), KM_SLEEP); tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue, @@ -85,6 +84,14 @@ taskq_create(const char *name, int nthre return ((taskq_t *)tq); } +taskq_t * +taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, + int maxalloc, proc_t *proc __unused, uint_t flags) +{ + + return (taskq_create(name, nthreads, pri, minalloc, maxalloc, flags)); +} + void taskq_destroy(taskq_t *tq) { From owner-svn-src-all@FreeBSD.ORG Mon May 3 09:49:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C91EA1065676; Mon, 3 May 2010 09:49:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B89898FC20; Mon, 3 May 2010 09:49: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 o439ngMq041366; Mon, 3 May 2010 09:49:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439ngrZ041364; Mon, 3 May 2010 09:49:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005030949.o439ngrZ041364@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 09:49: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: r207561 - head/lib/libpam/modules/pam_krb5 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, 03 May 2010 09:49:42 -0000 Author: delphij Date: Mon May 3 09:49:42 2010 New Revision: 207561 URL: http://svn.freebsd.org/changeset/base/207561 Log: Bump .Dd date. Forgotten by: delphij Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.8 Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.8 ============================================================================== --- head/lib/libpam/modules/pam_krb5/pam_krb5.8 Mon May 3 09:46:47 2010 (r207560) +++ head/lib/libpam/modules/pam_krb5/pam_krb5.8 Mon May 3 09:49:42 2010 (r207561) @@ -1,7 +1,7 @@ .\" .\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $ .\" $FreeBSD$ -.Dd January 15, 1999 +.Dd May 3, 2010 .Dt PAM_KRB5 8 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon May 3 12:06:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55602106566B; Mon, 3 May 2010 12:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44F548FC13; Mon, 3 May 2010 12:06: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 o43C6feB073540; Mon, 3 May 2010 12:06:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43C6fox073538; Mon, 3 May 2010 12:06:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031206.o43C6fox073538@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:06:41 +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: r207563 - stable/7/sys/fs/msdosfs 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, 03 May 2010 12:06:41 -0000 Author: kib Date: Mon May 3 12:06:40 2010 New Revision: 207563 URL: http://svn.freebsd.org/changeset/base/207563 Log: MFC r203822: Remove unused macros. Modified: stable/7/sys/fs/msdosfs/denode.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/fs/msdosfs/denode.h ============================================================================== --- stable/7/sys/fs/msdosfs/denode.h Mon May 3 10:07:06 2010 (r207562) +++ stable/7/sys/fs/msdosfs/denode.h Mon May 3 12:06:40 2010 (r207563) @@ -215,9 +215,6 @@ struct denode { ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#define de_forw de_chain[0] -#define de_back de_chain[1] - #ifdef _KERNEL #define VTODE(vp) ((struct denode *)(vp)->v_data) From owner-svn-src-all@FreeBSD.ORG Mon May 3 12:36:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5F9910656F0; Mon, 3 May 2010 12:36:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 91E3C8FC1D; Mon, 3 May 2010 12:36: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 o43Ca61U080027; Mon, 3 May 2010 12:36:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43Ca6s3080024; Mon, 3 May 2010 12:36:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031236.o43Ca6s3080024@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:36:06 +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: r207564 - 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: Mon, 03 May 2010 12:36:06 -0000 Author: kib Date: Mon May 3 12:36:06 2010 New Revision: 207564 URL: http://svn.freebsd.org/changeset/base/207564 Log: MFC r203868: Some cleanups from NetBSD. Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 stable/8/sbin/newfs_msdos/newfs_msdos.c 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 Mon May 3 12:06:40 2010 (r207563) +++ stable/8/sbin/newfs_msdos/newfs_msdos.8 Mon May 3 12:36:06 2010 (r207564) @@ -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 128 through 32768. +in the range 512 through 32768. .It Fl a Ar FAT-size Number of sectors per FAT. .It Fl b Ar block-size Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:06:40 2010 (r207563) +++ stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:36:06 2010 (r207564) @@ -62,12 +62,12 @@ static const char rcsid[] = #define DEFBLK16 2048 /* default block size FAT16 */ #define DEFRDE 512 /* default root directory entries */ #define RESFTE 2 /* reserved FAT entries */ -#define MINCLS12 1 /* minimum FAT12 clusters */ -#define MINCLS16 0x1000 /* minimum FAT16 clusters */ -#define MINCLS32 2 /* minimum FAT32 clusters */ -#define MAXCLS12 0xfed /* maximum FAT12 clusters */ -#define MAXCLS16 0xfff5 /* maximum FAT16 clusters */ -#define MAXCLS32 0xffffff5 /* maximum FAT32 clusters */ +#define MINCLS12 1U /* minimum FAT12 clusters */ +#define MINCLS16 0x1000U /* minimum FAT16 clusters */ +#define MINCLS32 2U /* minimum FAT32 clusters */ +#define MAXCLS12 0xfedU /* maximum FAT12 clusters */ +#define MAXCLS16 0xfff5U /* maximum FAT16 clusters */ +#define MAXCLS32 0xffffff5U /* maximum FAT32 clusters */ #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ @@ -165,20 +165,23 @@ struct bpb { #define BPBGAP 0, 0, 0, 0, 0, 0 +#define INIT(a, b, c, d, e, f, g, h, i, j) \ + { .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \ + .sec = f, .mid = g, .spf = h, .spt = i, .hds = j, } static struct { const char *name; struct bpb bpb; } const stdfmt[] = { - {"160", {512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1, BPBGAP}}, - {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}}, - {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}}, - {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}}, - {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, - {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}}, - {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}}, - {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, - {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}}, - {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}} + {"160", INIT(512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1)}, + {"180", INIT(512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1)}, + {"320", INIT(512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2)}, + {"360", INIT(512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2)}, + {"640", INIT(512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2)}, + {"720", INIT(512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2)}, + {"1200", INIT(512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2)}, + {"1232", INIT(1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2)}, + {"1440", INIT(512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2)}, + {"2880", INIT(512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2)} }; static const u_int8_t bootcode[] = { @@ -533,7 +536,7 @@ main(int argc, char *argv[]) if (!bpb.res) bpb.res = fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x; else if (bpb.res < x) - errx(1, "too few reserved sectors"); + errx(1, "too few reserved sectors (need %d have %d)", x, bpb.res); if (fat != 32 && !bpb.rde) bpb.rde = DEFRDE; rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); @@ -657,7 +660,7 @@ main(int argc, char *argv[]) ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); mk4(bsx->volid, x); - mklabel(bsx->label, opt_L ? opt_L : "NO NAME"); + mklabel(bsx->label, opt_L ? opt_L : "NO_NAME"); sprintf(buf, "FAT%u", fat); setstr(bsx->type, buf, sizeof(bsx->type)); if (!opt_B) { @@ -666,7 +669,7 @@ main(int argc, char *argv[]) mk1(bs->jmp[0], 0xeb); mk1(bs->jmp[1], x1 - 2); mk1(bs->jmp[2], 0x90); - setstr(bs->oem, opt_O ? opt_O : "BSD 4.4", + setstr(bs->oem, opt_O ? opt_O : "BSD4.4 ", sizeof(bs->oem)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); From owner-svn-src-all@FreeBSD.ORG Mon May 3 12:37:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27AB81065673; Mon, 3 May 2010 12:37:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 15F4D8FC24; Mon, 3 May 2010 12:37: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 o43CbYVF080400; Mon, 3 May 2010 12:37:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43CbY2X080397; Mon, 3 May 2010 12:37:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031237.o43CbY2X080397@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:37: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: r207565 - 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: Mon, 03 May 2010 12:37:34 -0000 Author: kib Date: Mon May 3 12:37:33 2010 New Revision: 207565 URL: http://svn.freebsd.org/changeset/base/207565 Log: MFC r203869: Rename variables to match msdosfs headers. Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 stable/8/sbin/newfs_msdos/newfs_msdos.c 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 Mon May 3 12:36:06 2010 (r207564) +++ stable/8/sbin/newfs_msdos/newfs_msdos.8 Mon May 3 12:37:33 2010 (r207565) @@ -38,14 +38,14 @@ .Op Fl B Ar boot .Op Fl C Ar create-size .Op Fl F Ar FAT-type -.Op Fl I Ar volid +.Op Fl I Ar VolumeId .Op Fl L Ar label .Op Fl O Ar OEM .Op Fl S Ar sector-size .Op Fl a Ar FAT-size .Op Fl b Ar block-size .Op Fl c Ar cluster-size -.Op Fl e Ar dirents +.Op Fl e Ar DirEnts .Op Fl f Ar format .Op Fl h Ar heads .Op Fl i Ar info @@ -103,7 +103,7 @@ If the file system supports sparse files smaller than the size specified as parameter. .It Fl F Ar FAT-type FAT type (one of 12, 16, or 32). -.It Fl I Ar volid +.It Fl I Ar VolumeID Volume ID, a 32 bit number in decimal or hexadecimal (0x...) format. .It Fl L Ar label Volume label (up to 11 characters). @@ -130,7 +130,7 @@ Acceptable values are powers of 2 in the If the block or cluster size are not specified, the code uses a cluster between 512 bytes and 32K depending on the filesystem size. -.It Fl e Ar dirents +.It Fl e Ar DirEnts Number of root directory entries (FAT12 and FAT16 only). .It Fl f Ar format Specify a standard (floppy disk) format. Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:36:06 2010 (r207564) +++ stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:37:33 2010 (r207565) @@ -96,78 +96,78 @@ static const char rcsid[] = #define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg) struct bs { - u_int8_t jmp[3]; /* bootstrap entry point */ - u_int8_t oem[8]; /* OEM name and version */ + u_int8_t bsJump[3]; /* bootstrap entry point */ + u_int8_t bsOemName[8]; /* OEM name and version */ }; struct bsbpb { - u_int8_t bps[2]; /* bytes per sector */ - u_int8_t spc; /* sectors per cluster */ - u_int8_t res[2]; /* reserved sectors */ - u_int8_t nft; /* number of FATs */ - u_int8_t rde[2]; /* root directory entries */ - u_int8_t sec[2]; /* total sectors */ - u_int8_t mid; /* media descriptor */ - u_int8_t spf[2]; /* sectors per FAT */ - u_int8_t spt[2]; /* sectors per track */ - u_int8_t hds[2]; /* drive heads */ - u_int8_t hid[4]; /* hidden sectors */ - u_int8_t bsec[4]; /* big total sectors */ + u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ + u_int8_t bpbSecPerClust; /* sectors per cluster */ + u_int8_t bpbResSectors[2]; /* reserved sectors */ + u_int8_t bpbFATs; /* number of FATs */ + u_int8_t bpbRootDirEnts[2]; /* root directory entries */ + u_int8_t bpbSectors[2]; /* total sectors */ + u_int8_t bpbMedia; /* media descriptor */ + u_int8_t bpbFATsecs[2]; /* sectors per FAT */ + u_int8_t bpbSecPerTrack[2]; /* sectors per track */ + u_int8_t bpbHeads[2]; /* drive heads */ + u_int8_t bpbHiddenSecs[4]; /* hidden sectors */ + u_int8_t bpbHugeSectors[4]; /* big total sectors */ }; struct bsxbpb { - u_int8_t bspf[4]; /* big sectors per FAT */ - u_int8_t xflg[2]; /* FAT control flags */ - u_int8_t vers[2]; /* file system version */ - u_int8_t rdcl[4]; /* root directory start cluster */ - u_int8_t infs[2]; /* file system info sector */ - u_int8_t bkbs[2]; /* backup boot sector */ - u_int8_t rsvd[12]; /* reserved */ + u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */ + u_int8_t bpbExtFlags[2]; /* FAT control flags */ + u_int8_t bpbFSVers[2]; /* file system version */ + u_int8_t bpbRootClust[4]; /* root directory start cluster */ + u_int8_t bpbFSInfo[2]; /* file system info sector */ + u_int8_t bpbBackup[2]; /* backup boot sector */ + u_int8_t bpbReserved[12]; /* reserved */ }; struct bsx { - u_int8_t drv; /* drive number */ - u_int8_t rsvd; /* reserved */ - u_int8_t sig; /* extended boot signature */ - u_int8_t volid[4]; /* volume ID number */ - u_int8_t label[11]; /* volume label */ - u_int8_t type[8]; /* file system type */ + u_int8_t exDriveNumber; /* drive number */ + u_int8_t exReserved1; /* reserved */ + u_int8_t exBootSignature; /* extended boot signature */ + u_int8_t exVolumeID[4]; /* volume ID number */ + u_int8_t exVolumeLabel[11]; /* volume label */ + u_int8_t exFileSysType[8]; /* file system type */ }; struct de { - u_int8_t namext[11]; /* name and extension */ - u_int8_t attr; /* attributes */ + u_int8_t deName[11]; /* name and extension */ + u_int8_t deAttributes; /* attributes */ u_int8_t rsvd[10]; /* reserved */ - u_int8_t time[2]; /* creation time */ - u_int8_t date[2]; /* creation date */ - u_int8_t clus[2]; /* starting cluster */ - u_int8_t size[4]; /* size */ + u_int8_t deMTime[2]; /* creation time */ + u_int8_t deMDate[2]; /* creation date */ + u_int8_t deStartCluster[2]; /* starting cluster */ + u_int8_t deFileSize[4]; /* size */ }; struct bpb { - u_int bps; /* bytes per sector */ - u_int spc; /* sectors per cluster */ - u_int res; /* reserved sectors */ - u_int nft; /* number of FATs */ - u_int rde; /* root directory entries */ - u_int sec; /* total sectors */ - u_int mid; /* media descriptor */ - u_int spf; /* sectors per FAT */ - u_int spt; /* sectors per track */ - u_int hds; /* drive heads */ - u_int hid; /* hidden sectors */ - u_int bsec; /* big total sectors */ - u_int bspf; /* big sectors per FAT */ - u_int rdcl; /* root directory start cluster */ - u_int infs; /* file system info sector */ - u_int bkbs; /* backup boot sector */ + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* reserved sectors */ + u_int bpbFATs; /* number of FATs */ + u_int bpbRootDirEnts; /* root directory entries */ + u_int bpbSectors; /* total sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsecs; /* sectors per FAT */ + u_int bpbSecPerTrack; /* sectors per track */ + u_int bpbHeads; /* drive heads */ + u_int bpbHiddenSecs; /* hidden sectors */ + u_int bpbHugeSectors; /* big total sectors */ + u_int bpbBigFATsecs; /* big sectors per FAT */ + u_int bpbRootClust; /* root directory start cluster */ + u_int bpbFSInfo; /* file system info sector */ + u_int bpbBackup; /* backup boot sector */ }; #define BPBGAP 0, 0, 0, 0, 0, 0 #define INIT(a, b, c, d, e, f, g, h, i, j) \ - { .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \ - .sec = f, .mid = g, .spf = h, .spt = i, .hds = j, } + { .bpbBytesPerSec = a, .bpbSecPerClust = b, .bpbResSectors = c, .bpbFATs = d, .bpbRootDirEnts = e, \ + .bpbSectors = f, .bpbMedia = g, .bpbFATsecs = h, .bpbSecPerTrack = i, .bpbHeads = j, } static struct { const char *name; struct bpb bpb; @@ -384,49 +384,49 @@ main(int argc, char *argv[]) memset(&bpb, 0, sizeof(bpb)); if (opt_f) { getstdfmt(opt_f, &bpb); - bpb.bsec = bpb.sec; - bpb.sec = 0; - bpb.bspf = bpb.spf; - bpb.spf = 0; + bpb.bpbHugeSectors = bpb.bpbSectors; + bpb.bpbSectors = 0; + bpb.bpbBigFATsecs = bpb.bpbFATsecs; + bpb.bpbFATsecs = 0; } if (opt_h) - bpb.hds = opt_h; + bpb.bpbHeads = opt_h; if (opt_u) - bpb.spt = opt_u; + bpb.bpbSecPerTrack = opt_u; if (opt_S) - bpb.bps = opt_S; + bpb.bpbBytesPerSec = opt_S; if (opt_s) - bpb.bsec = opt_s; + bpb.bpbHugeSectors = opt_s; if (oflag) - bpb.hid = opt_o; + bpb.bpbHiddenSecs = opt_o; if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) { off_t delta; getdiskinfo(fd, fname, dtype, oflag, &bpb); - bpb.bsec -= (opt_ofs / bpb.bps); - delta = bpb.bsec % bpb.spt; + bpb.bpbHugeSectors -= (opt_ofs / bpb.bpbBytesPerSec); + delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack; if (delta != 0) { warnx("trim %d sectors to adjust to a multiple of %d", - (int)delta, bpb.spt); - bpb.bsec -= delta; + (int)delta, bpb.bpbSecPerTrack); + bpb.bpbHugeSectors -= delta; } - if (bpb.spc == 0) { /* set defaults */ - if (bpb.bsec <= 6000) /* about 3MB -> 512 bytes */ - bpb.spc = 1; - else if (bpb.bsec <= (1<<17)) /* 64M -> 4k */ - bpb.spc = 8; - else if (bpb.bsec <= (1<<19)) /* 256M -> 8k */ - bpb.spc = 16; - else if (bpb.bsec <= (1<<21)) /* 1G -> 16k */ - bpb.spc = 32; + if (bpb.bpbSecPerClust == 0) { /* set defaults */ + if (bpb.bpbHugeSectors <= 6000) /* about 3MB -> 512 bytes */ + bpb.bpbSecPerClust = 1; + else if (bpb.bpbHugeSectors <= (1<<17)) /* 64M -> 4k */ + bpb.bpbSecPerClust = 8; + else if (bpb.bpbHugeSectors <= (1<<19)) /* 256M -> 8k */ + bpb.bpbSecPerClust = 16; + else if (bpb.bpbHugeSectors <= (1<<21)) /* 1G -> 16k */ + bpb.bpbSecPerClust = 32; else - bpb.spc = 64; /* otherwise 32k */ + bpb.bpbSecPerClust = 64; /* otherwise 32k */ } } - if (!powerof2(bpb.bps)) - errx(1, "bytes/sector (%u) is not a power of 2", bpb.bps); - if (bpb.bps < MINBPS) + if (!powerof2(bpb.bpbBytesPerSec)) + errx(1, "bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); + if (bpb.bpbBytesPerSec < MINBPS) errx(1, "bytes/sector (%u) is too small; minimum is %u", - bpb.bps, MINBPS); + bpb.bpbBytesPerSec, MINBPS); if (!(fat = opt_F)) { if (opt_f) fat = 12; @@ -438,44 +438,44 @@ main(int argc, char *argv[]) fat == 32 ? 'e' : opt_i ? 'i' : 'k', fat == 32 ? "32" : "12/16"); if (opt_f && fat == 32) - bpb.rde = 0; + bpb.bpbRootDirEnts = 0; if (opt_b) { if (!powerof2(opt_b)) errx(1, "block size (%u) is not a power of 2", opt_b); - if (opt_b < bpb.bps) + if (opt_b < bpb.bpbBytesPerSec) errx(1, "block size (%u) is too small; minimum is %u", - opt_b, bpb.bps); - if (opt_b > bpb.bps * MAXSPC) + opt_b, bpb.bpbBytesPerSec); + if (opt_b > bpb.bpbBytesPerSec * MAXSPC) errx(1, "block size (%u) is too large; maximum is %u", - opt_b, bpb.bps * MAXSPC); - bpb.spc = opt_b / bpb.bps; + opt_b, bpb.bpbBytesPerSec * MAXSPC); + bpb.bpbSecPerClust = opt_b / bpb.bpbBytesPerSec; } if (opt_c) { if (!powerof2(opt_c)) errx(1, "sectors/cluster (%u) is not a power of 2", opt_c); - bpb.spc = opt_c; + bpb.bpbSecPerClust = opt_c; } if (opt_r) - bpb.res = opt_r; + bpb.bpbResSectors = opt_r; if (opt_n) { if (opt_n > MAXNFT) errx(1, "number of FATs (%u) is too large; maximum is %u", opt_n, MAXNFT); - bpb.nft = opt_n; + bpb.bpbFATs = opt_n; } if (opt_e) - bpb.rde = opt_e; + bpb.bpbRootDirEnts = opt_e; if (mflag) { if (opt_m < 0xf0) errx(1, "illegal media descriptor (%#x)", opt_m); - bpb.mid = opt_m; + bpb.bpbMedia = opt_m; } if (opt_a) - bpb.bspf = opt_a; + bpb.bpbBigFATsecs = opt_a; if (opt_i) - bpb.infs = opt_i; + bpb.bpbFSInfo = opt_i; if (opt_k) - bpb.bkbs = opt_k; + bpb.bpbBackup = opt_k; bss = 1; bname = NULL; fd1 = -1; @@ -488,87 +488,87 @@ main(int argc, char *argv[]) } if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) err(1, "%s", bname); - if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bps || - sb.st_size < bpb.bps || sb.st_size > bpb.bps * MAXU16) + if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec || + sb.st_size < bpb.bpbBytesPerSec || sb.st_size > bpb.bpbBytesPerSec * MAXU16) errx(1, "%s: inappropriate file type or format", bname); - bss = sb.st_size / bpb.bps; + bss = sb.st_size / bpb.bpbBytesPerSec; } - if (!bpb.nft) - bpb.nft = 2; + if (!bpb.bpbFATs) + bpb.bpbFATs = 2; if (!fat) { - if (bpb.bsec < (bpb.res ? bpb.res : bss) + - howmany((RESFTE + (bpb.spc ? MINCLS16 : MAXCLS12 + 1)) * - ((bpb.spc ? 16 : 12) / BPN), bpb.bps * NPB) * - bpb.nft + - howmany(bpb.rde ? bpb.rde : DEFRDE, - bpb.bps / sizeof(struct de)) + - (bpb.spc ? MINCLS16 : MAXCLS12 + 1) * - (bpb.spc ? bpb.spc : howmany(DEFBLK, bpb.bps))) + if (bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1)) * + ((bpb.bpbSecPerClust ? 16 : 12) / BPN), bpb.bpbBytesPerSec * NPB) * + bpb.bpbFATs + + howmany(bpb.bpbRootDirEnts ? bpb.bpbRootDirEnts : DEFRDE, + bpb.bpbBytesPerSec / sizeof(struct de)) + + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1) * + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(DEFBLK, bpb.bpbBytesPerSec))) fat = 12; - else if (bpb.rde || bpb.bsec < - (bpb.res ? bpb.res : bss) + - howmany((RESFTE + MAXCLS16) * 2, bpb.bps) * bpb.nft + - howmany(DEFRDE, bpb.bps / sizeof(struct de)) + + else if (bpb.bpbRootDirEnts || bpb.bpbHugeSectors < + (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * bpb.bpbFATs + + howmany(DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) + (MAXCLS16 + 1) * - (bpb.spc ? bpb.spc : howmany(8192, bpb.bps))) + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(8192, bpb.bpbBytesPerSec))) fat = 16; else fat = 32; } x = bss; if (fat == 32) { - if (!bpb.infs) { - if (x == MAXU16 || x == bpb.bkbs) + if (!bpb.bpbFSInfo) { + if (x == MAXU16 || x == bpb.bpbBackup) errx(1, "no room for info sector"); - bpb.infs = x; + bpb.bpbFSInfo = x; } - if (bpb.infs != MAXU16 && x <= bpb.infs) - x = bpb.infs + 1; - if (!bpb.bkbs) { + if (bpb.bpbFSInfo != MAXU16 && x <= bpb.bpbFSInfo) + x = bpb.bpbFSInfo + 1; + if (!bpb.bpbBackup) { if (x == MAXU16) errx(1, "no room for backup sector"); - bpb.bkbs = x; - } else if (bpb.bkbs != MAXU16 && bpb.bkbs == bpb.infs) + bpb.bpbBackup = x; + } else if (bpb.bpbBackup != MAXU16 && bpb.bpbBackup == bpb.bpbFSInfo) errx(1, "backup sector would overwrite info sector"); - if (bpb.bkbs != MAXU16 && x <= bpb.bkbs) - x = bpb.bkbs + 1; + if (bpb.bpbBackup != MAXU16 && x <= bpb.bpbBackup) + x = bpb.bpbBackup + 1; } - if (!bpb.res) - bpb.res = fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x; - else if (bpb.res < x) - errx(1, "too few reserved sectors (need %d have %d)", x, bpb.res); - if (fat != 32 && !bpb.rde) - bpb.rde = DEFRDE; - rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); - if (!bpb.spc) - for (bpb.spc = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bps); - bpb.spc < MAXSPC && - bpb.res + + if (!bpb.bpbResSectors) + bpb.bpbResSectors = fat == 32 ? MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; + else if (bpb.bpbResSectors < x) + errx(1, "too few reserved sectors (need %d have %d)", x, bpb.bpbResSectors); + if (fat != 32 && !bpb.bpbRootDirEnts) + bpb.bpbRootDirEnts = DEFRDE; + rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de)); + if (!bpb.bpbSecPerClust) + for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bpbBytesPerSec); + bpb.bpbSecPerClust < MAXSPC && + bpb.bpbResSectors + howmany((RESFTE + maxcls(fat)) * (fat / BPN), - bpb.bps * NPB) * bpb.nft + + bpb.bpbBytesPerSec * NPB) * bpb.bpbFATs + rds + - (u_int64_t)(maxcls(fat) + 1) * bpb.spc <= bpb.bsec; - bpb.spc <<= 1); - if (fat != 32 && bpb.bspf > MAXU16) + (u_int64_t)(maxcls(fat) + 1) * bpb.bpbSecPerClust <= bpb.bpbHugeSectors; + bpb.bpbSecPerClust <<= 1); + if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) errx(1, "too many sectors/FAT for FAT12/16"); - x1 = bpb.res + rds; - x = bpb.bspf ? bpb.bspf : 1; - if (x1 + (u_int64_t)x * bpb.nft > bpb.bsec) + x1 = bpb.bpbResSectors + rds; + x = bpb.bpbBigFATsecs ? bpb.bpbBigFATsecs : 1; + if (x1 + (u_int64_t)x * bpb.bpbFATs > bpb.bpbHugeSectors) errx(1, "meta data exceeds file system size"); - x1 += x * bpb.nft; - x = (u_int64_t)(bpb.bsec - x1) * bpb.bps * NPB / - (bpb.spc * bpb.bps * NPB + fat / BPN * bpb.nft); + x1 += x * bpb.bpbFATs; + x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB / + (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / BPN * bpb.bpbFATs); x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), - bpb.bps * NPB); - if (!bpb.bspf) { - bpb.bspf = x2; - x1 += (bpb.bspf - 1) * bpb.nft; + bpb.bpbBytesPerSec * NPB); + if (!bpb.bpbBigFATsecs) { + bpb.bpbBigFATsecs = x2; + x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs; } - cls = (bpb.bsec - x1) / bpb.spc; - x = (u_int64_t)bpb.bspf * bpb.bps * NPB / (fat / BPN) - RESFTE; + cls = (bpb.bpbHugeSectors - x1) / bpb.bpbSecPerClust; + x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - RESFTE; if (cls > x) cls = x; - if (bpb.bspf < x2) + if (bpb.bpbBigFATsecs < x2) warnx("warning: sectors/FAT limits file system to %u clusters", cls); if (cls < mincls(fat)) @@ -576,79 +576,79 @@ main(int argc, char *argv[]) mincls(fat)); if (cls > maxcls(fat)) { cls = maxcls(fat); - bpb.bsec = x1 + (cls + 1) * bpb.spc - 1; + bpb.bpbHugeSectors = x1 + (cls + 1) * bpb.bpbSecPerClust - 1; warnx("warning: FAT type limits file system to %u sectors", - bpb.bsec); + bpb.bpbHugeSectors); } printf("%s: %u sector%s in %u FAT%u cluster%s " - "(%u bytes/cluster)\n", fname, cls * bpb.spc, - cls * bpb.spc == 1 ? "" : "s", cls, fat, - cls == 1 ? "" : "s", bpb.bps * bpb.spc); - if (!bpb.mid) - bpb.mid = !bpb.hid ? 0xf0 : 0xf8; + "(%u bytes/cluster)\n", fname, cls * bpb.bpbSecPerClust, + cls * bpb.bpbSecPerClust == 1 ? "" : "s", cls, fat, + cls == 1 ? "" : "s", bpb.bpbBytesPerSec * bpb.bpbSecPerClust); + if (!bpb.bpbMedia) + bpb.bpbMedia = !bpb.bpbHiddenSecs ? 0xf0 : 0xf8; if (fat == 32) - bpb.rdcl = RESFTE; - if (bpb.hid + bpb.bsec <= MAXU16) { - bpb.sec = bpb.bsec; - bpb.bsec = 0; + bpb.bpbRootClust = RESFTE; + if (bpb.bpbHiddenSecs + bpb.bpbHugeSectors <= MAXU16) { + bpb.bpbSectors = bpb.bpbHugeSectors; + bpb.bpbHugeSectors = 0; } if (fat != 32) { - bpb.spf = bpb.bspf; - bpb.bspf = 0; + bpb.bpbFATsecs = bpb.bpbBigFATsecs; + bpb.bpbBigFATsecs = 0; } print_bpb(&bpb); if (!opt_N) { gettimeofday(&tv, NULL); now = tv.tv_sec; tm = localtime(&now); - if (!(img = malloc(bpb.bps))) + if (!(img = malloc(bpb.bpbBytesPerSec))) err(1, NULL); - dir = bpb.res + (bpb.spf ? bpb.spf : bpb.bspf) * bpb.nft; - for (lsn = 0; lsn < dir + (fat == 32 ? bpb.spc : rds); lsn++) { + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; + for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { x = lsn; if (opt_B && - fat == 32 && bpb.bkbs != MAXU16 && - bss <= bpb.bkbs && x >= bpb.bkbs) { - x -= bpb.bkbs; + fat == 32 && bpb.bpbBackup != MAXU16 && + bss <= bpb.bpbBackup && x >= bpb.bpbBackup) { + x -= bpb.bpbBackup; if (!x && lseek(fd1, opt_ofs, SEEK_SET)) err(1, "%s", bname); } if (opt_B && x < bss) { - if ((n = read(fd1, img, bpb.bps)) == -1) + if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", bname); - if ((unsigned)n != bpb.bps) + if ((unsigned)n != bpb.bpbBytesPerSec) errx(1, "%s: can't read sector %u", bname, x); } else - memset(img, 0, bpb.bps); + memset(img, 0, bpb.bpbBytesPerSec); if (!lsn || - (fat == 32 && bpb.bkbs != MAXU16 && lsn == bpb.bkbs)) { + (fat == 32 && bpb.bpbBackup != MAXU16 && lsn == bpb.bpbBackup)) { x1 = sizeof(struct bs); bsbpb = (struct bsbpb *)(img + x1); - mk2(bsbpb->bps, bpb.bps); - mk1(bsbpb->spc, bpb.spc); - mk2(bsbpb->res, bpb.res); - mk1(bsbpb->nft, bpb.nft); - mk2(bsbpb->rde, bpb.rde); - mk2(bsbpb->sec, bpb.sec); - mk1(bsbpb->mid, bpb.mid); - mk2(bsbpb->spf, bpb.spf); - mk2(bsbpb->spt, bpb.spt); - mk2(bsbpb->hds, bpb.hds); - mk4(bsbpb->hid, bpb.hid); - mk4(bsbpb->bsec, bpb.bsec); + mk2(bsbpb->bpbBytesPerSec, bpb.bpbBytesPerSec); + mk1(bsbpb->bpbSecPerClust, bpb.bpbSecPerClust); + mk2(bsbpb->bpbResSectors, bpb.bpbResSectors); + mk1(bsbpb->bpbFATs, bpb.bpbFATs); + mk2(bsbpb->bpbRootDirEnts, bpb.bpbRootDirEnts); + mk2(bsbpb->bpbSectors, bpb.bpbSectors); + mk1(bsbpb->bpbMedia, bpb.bpbMedia); + mk2(bsbpb->bpbFATsecs, bpb.bpbFATsecs); + mk2(bsbpb->bpbSecPerTrack, bpb.bpbSecPerTrack); + mk2(bsbpb->bpbHeads, bpb.bpbHeads); + mk4(bsbpb->bpbHiddenSecs, bpb.bpbHiddenSecs); + mk4(bsbpb->bpbHugeSectors, bpb.bpbHugeSectors); x1 += sizeof(struct bsbpb); if (fat == 32) { bsxbpb = (struct bsxbpb *)(img + x1); - mk4(bsxbpb->bspf, bpb.bspf); - mk2(bsxbpb->xflg, 0); - mk2(bsxbpb->vers, 0); - mk4(bsxbpb->rdcl, bpb.rdcl); - mk2(bsxbpb->infs, bpb.infs); - mk2(bsxbpb->bkbs, bpb.bkbs); + mk4(bsxbpb->bpbBigFATsecs, bpb.bpbBigFATsecs); + mk2(bsxbpb->bpbExtFlags, 0); + mk2(bsxbpb->bpbFSVers, 0); + mk4(bsxbpb->bpbRootClust, bpb.bpbRootClust); + mk2(bsxbpb->bpbFSInfo, bpb.bpbFSInfo); + mk2(bsxbpb->bpbBackup, bpb.bpbBackup); x1 += sizeof(struct bsxbpb); } bsx = (struct bsx *)(img + x1); - mk1(bsx->sig, 0x29); + mk1(bsx->exBootSignature, 0x29); if (Iflag) x = opt_I; else @@ -659,52 +659,52 @@ main(int argc, char *argv[]) ((u_int)(1900 + tm->tm_year) + ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); - mk4(bsx->volid, x); - mklabel(bsx->label, opt_L ? opt_L : "NO_NAME"); + mk4(bsx->exVolumeID, x); + mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO_NAME"); sprintf(buf, "FAT%u", fat); - setstr(bsx->type, buf, sizeof(bsx->type)); + setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); if (!opt_B) { x1 += sizeof(struct bsx); bs = (struct bs *)img; - mk1(bs->jmp[0], 0xeb); - mk1(bs->jmp[1], x1 - 2); - mk1(bs->jmp[2], 0x90); - setstr(bs->oem, opt_O ? opt_O : "BSD4.4 ", - sizeof(bs->oem)); + mk1(bs->bsJump[0], 0xeb); + mk1(bs->bsJump[1], x1 - 2); + mk1(bs->bsJump[2], 0x90); + setstr(bs->bsOemName, opt_O ? opt_O : "BSD4.4 ", + sizeof(bs->bsOemName)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); } - } else if (fat == 32 && bpb.infs != MAXU16 && - (lsn == bpb.infs || - (bpb.bkbs != MAXU16 && - lsn == bpb.bkbs + bpb.infs))) { + } else if (fat == 32 && bpb.bpbFSInfo != MAXU16 && + (lsn == bpb.bpbFSInfo || + (bpb.bpbBackup != MAXU16 && + lsn == bpb.bpbBackup + bpb.bpbFSInfo))) { mk4(img, 0x41615252); mk4(img + MINBPS - 28, 0x61417272); mk4(img + MINBPS - 24, 0xffffffff); - mk4(img + MINBPS - 20, bpb.rdcl); + mk4(img + MINBPS - 20, bpb.bpbRootClust); mk2(img + MINBPS - 2, DOSMAGIC); - } else if (lsn >= bpb.res && lsn < dir && - !((lsn - bpb.res) % - (bpb.spf ? bpb.spf : bpb.bspf))) { - mk1(img[0], bpb.mid); + } else if (lsn >= bpb.bpbResSectors && lsn < dir && + !((lsn - bpb.bpbResSectors) % + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs))) { + mk1(img[0], bpb.bpbMedia); for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); } else if (lsn == dir && opt_L) { de = (struct de *)img; - mklabel(de->namext, opt_L); - mk1(de->attr, 050); + mklabel(de->deName, opt_L); + mk1(de->deAttributes, 050); x = (u_int)tm->tm_hour << 11 | (u_int)tm->tm_min << 5 | (u_int)tm->tm_sec >> 1; - mk2(de->time, x); + mk2(de->deMTime, x); x = (u_int)(tm->tm_year - 80) << 9 | (u_int)(tm->tm_mon + 1) << 5 | (u_int)tm->tm_mday; - mk2(de->date, x); + mk2(de->deMDate, x); } - if ((n = write(fd, img, bpb.bps)) == -1) + if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", fname); - if ((unsigned)n != bpb.bps) + if ((unsigned)n != bpb.bpbBytesPerSec) errx(1, "%s: can't write sector %u", fname, lsn); } } @@ -797,18 +797,19 @@ getdiskinfo(int fd, const char *fname, c /* Maybe it's a fixed drive */ if (lp == NULL) { + if (bpb->bpbBytesPerSec) + dlp.d_secsize = bpb->bpbBytesPerSec; if (ioctl(fd, DIOCGDINFO, &dlp) == -1) { - if (bpb->bps == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) + if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) errx(1, "Cannot get sector size, %s", strerror(errno)); - /* XXX Should we use bpb->bps if it's set? */ dlp.d_secperunit = ms / dlp.d_secsize; - if (bpb->spt == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { + if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { warnx("Cannot get number of sectors per track, %s", strerror(errno)); dlp.d_nsectors = 63; } - if (bpb->hds == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { + if (bpb->bpbHeads == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { warnx("Cannot get number of heads, %s", strerror(errno)); if (dlp.d_secperunit <= 63*1*1024) dlp.d_ntracks = 1; @@ -823,16 +824,16 @@ getdiskinfo(int fd, const char *fname, c lp = &dlp; } - if (bpb->bps == 0) - bpb->bps = ckgeom(fname, lp->d_secsize, "bytes/sector"); - if (bpb->spt == 0) - bpb->spt = ckgeom(fname, lp->d_nsectors, "sectors/track"); - if (bpb->hds == 0) - bpb->hds = ckgeom(fname, lp->d_ntracks, "drive heads"); - if (bpb->bsec == 0) - bpb->bsec = lp->d_secperunit; - if (bpb->hid == 0) - bpb->hid = hs; + if (bpb->bpbBytesPerSec == 0) + bpb->bpbBytesPerSec = ckgeom(fname, lp->d_secsize, "bytes/sector"); + if (bpb->bpbSecPerTrack == 0) + bpb->bpbSecPerTrack = ckgeom(fname, lp->d_nsectors, "sectors/track"); + if (bpb->bpbHeads == 0) + bpb->bpbHeads = ckgeom(fname, lp->d_ntracks, "drive heads"); + if (bpb->bpbHugeSectors == 0) + bpb->bpbHugeSectors = lp->d_secperunit; + if (bpb->bpbHiddenSecs == 0) + bpb->bpbHiddenSecs = hs; } /* @@ -841,24 +842,24 @@ getdiskinfo(int fd, const char *fname, c static void print_bpb(struct bpb *bpb) { - printf("bps=%u spc=%u res=%u nft=%u", bpb->bps, bpb->spc, bpb->res, - bpb->nft); - if (bpb->rde) - printf(" rde=%u", bpb->rde); - if (bpb->sec) - printf(" sec=%u", bpb->sec); - printf(" mid=%#x", bpb->mid); - if (bpb->spf) - printf(" spf=%u", bpb->spf); - printf(" spt=%u hds=%u hid=%u", bpb->spt, bpb->hds, bpb->hid); - if (bpb->bsec) - printf(" bsec=%u", bpb->bsec); - if (!bpb->spf) { - printf(" bspf=%u rdcl=%u", bpb->bspf, bpb->rdcl); - printf(" infs="); - printf(bpb->infs == MAXU16 ? "%#x" : "%u", bpb->infs); - printf(" bkbs="); - printf(bpb->bkbs == MAXU16 ? "%#x" : "%u", bpb->bkbs); + printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors, + bpb->bpbFATs); + if (bpb->bpbRootDirEnts) + printf(" RootDirEnts=%u", bpb->bpbRootDirEnts); + if (bpb->bpbSectors) + printf(" Sectors=%u", bpb->bpbSectors); + printf(" Media=%#x", bpb->bpbMedia); + if (bpb->bpbFATsecs) + printf(" FATsecs=%u", bpb->bpbFATsecs); + printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, bpb->bpbHeads, bpb->bpbHiddenSecs); + if (bpb->bpbHugeSectors) + printf(" HugeSectors=%u", bpb->bpbHugeSectors); + if (!bpb->bpbFATsecs) { + printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, bpb->bpbRootClust); + printf(" FSInfo="); + printf(bpb->bpbFSInfo == MAXU16 ? "%#x" : "%u", bpb->bpbFSInfo); + printf(" Backup="); + printf(bpb->bpbBackup == MAXU16 ? "%#x" : "%u", bpb->bpbBackup); } printf("\n"); } From owner-svn-src-all@FreeBSD.ORG Mon May 3 12:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AC641065673; Mon, 3 May 2010 12:39:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 18EDA8FC25; Mon, 3 May 2010 12:39: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 o43CdSe4080858; Mon, 3 May 2010 12:39:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43CdS4t080849; Mon, 3 May 2010 12:39:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031239.o43CdS4t080849@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:39: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: r207566 - stable/8/sbin/fsck_msdosfs 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, 03 May 2010 12:39:29 -0000 Author: kib Date: Mon May 3 12:39:27 2010 New Revision: 207566 URL: http://svn.freebsd.org/changeset/base/207566 Log: MFC r203871: License changes from NetBSD. Move to 2 clause license, approved by Wolfgang Solfrank. Modified: stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/dosfs.h stable/8/sbin/fsck_msdosfs/ext.h stable/8/sbin/fsck_msdosfs/fat.c stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 stable/8/sbin/fsck_msdosfs/main.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:39:27 2010 (r207566) @@ -12,13 +12,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:39:27 2010 (r207566) @@ -12,13 +12,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/ext.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 ============================================================================== --- stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 Mon May 3 12:39:27 2010 (r207566) @@ -11,13 +11,6 @@ .\" 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 Martin Husemann -.\" and Wolfgang Solfrank. -.\" 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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 Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University 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 AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-svn-src-all@FreeBSD.ORG Mon May 3 12:41:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46C5C106564A; Mon, 3 May 2010 12:41:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 34E828FC19; Mon, 3 May 2010 12:41: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 o43CfSDc081375; Mon, 3 May 2010 12:41:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43CfSCG081367; Mon, 3 May 2010 12:41:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031241.o43CfSCG081367@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:41:28 +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: r207567 - stable/8/sbin/fsck_msdosfs 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, 03 May 2010 12:41:28 -0000 Author: kib Date: Mon May 3 12:41:27 2010 New Revision: 207567 URL: http://svn.freebsd.org/changeset/base/207567 Log: MFC r203872: Bug fixes from NetBSD. Modified: stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/dosfs.h stable/8/sbin/fsck_msdosfs/ext.h stable/8/sbin/fsck_msdosfs/fat.c stable/8/sbin/fsck_msdosfs/main.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:41:27 2010 (r207567) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include @@ -41,16 +40,15 @@ static const char rcsid[] = #include "fsutil.h" int -readboot(dosfs, boot) - int dosfs; - struct bootblock *boot; +readboot(int dosfs, struct bootblock *boot) { u_char block[DOSBOOTBLOCKSIZE]; u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; u_char backup[DOSBOOTBLOCKSIZE]; int ret = FSOK; + int i; - if (read(dosfs, block, sizeof block) < sizeof block) { + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perror("could not read boot block"); return FSFATAL; } @@ -154,12 +152,22 @@ readboot(dosfs, boot) } backup[65] = block[65]; /* XXX */ if (memcmp(block + 11, backup + 11, 79)) { - /* Correct? XXX */ - pfatal("backup doesn't compare to primary bootblock"); - if (alwaysno) - pfatal("\n"); - else - return FSFATAL; + /* + * XXX We require a reference that explains + * that these bytes need to match, or should + * drop the check. gdt@NetBSD has observed + * filesystems that work fine under Windows XP + * and NetBSD that do not match, so the + * requirement is suspect. For now, just + * print out useful information and continue. + */ + pfatal("backup (block %d) mismatch with primary bootblock:\n", + boot->Backup); + for (i = 11; i < 11 + 90; i++) { + if (block[i] != backup[i]) + pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", + i, block[i], backup[i]); + } } /* Check backup FSInfo? XXX */ } @@ -223,9 +231,7 @@ readboot(dosfs, boot) } int -writefsinfo(dosfs, boot) - int dosfs; - struct bootblock *boot; +writefsinfo(int dosfs, struct bootblock *boot) { u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:41:27 2010 (r207567) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include #include @@ -47,7 +46,8 @@ checkfilesys(const char *fname) int dosfs; struct bootblock boot; struct fatEntry *fat = NULL; - int i, finish_dosdirsection=0; + int finish_dosdirsection=0; + u_int i; int mod = 0; int ret = 8; Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:41:27 2010 (r207567) @@ -37,7 +37,6 @@ static const char rcsid[] = #include #include #include -#include #include #include @@ -223,12 +222,24 @@ resetDosDirSection(struct bootblock *boo b1 = boot->RootDirEnts * 32; b2 = boot->SecPerClust * boot->BytesPerSec; - if (!(buffer = malloc(b1 > b2 ? b1 : b2)) - || !(delbuf = malloc(b2)) - || !(rootDir = newDosDirEntry())) { - perror("No space for directory"); + if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { + perror("No space for directory buffer"); return FSFATAL; } + + if ((delbuf = malloc(b2)) == NULL) { + free(buffer); + perror("No space for directory delbuf"); + return FSFATAL; + } + + if ((rootDir = newDosDirEntry()) == NULL) { + free(buffer); + free(delbuf); + perror("No space for directory entry"); + return FSFATAL; + } + memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) { @@ -360,7 +371,8 @@ removede(int f, struct bootblock *boot, return FSFATAL; start = buffer; } - if (endcl == curcl) + /* startcl is < CLUST_FIRST for !fat32 root */ + if ((endcl == curcl) || (startcl < CLUST_FIRST)) for (; start < end; start += 32) *start = SLOT_DELETED; return FSDIRMOD; @@ -378,7 +390,7 @@ checksize(struct bootblock *boot, struct /* * Check size on ordinary files */ - int32_t physicalSize; + u_int32_t physicalSize; if (dir->head == CLUST_FREE) physicalSize = 0; @@ -637,7 +649,8 @@ readDosDirSection(int f, struct bootbloc dirent.head |= (p[20] << 16) | (p[21] << 24); dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24); if (vallfn) { - strcpy(dirent.lname, longName); + strlcpy(dirent.lname, longName, + sizeof(dirent.lname)); longName[0] = '\0'; shortSum = -1; } @@ -825,6 +838,10 @@ readDosDirSection(int f, struct bootbloc } boot->NumFiles++; } + + if (!(boot->flags & FAT32) && !dir->parent) + break; + if (mod & THISMOD) { last *= 32; if (lseek(f, off, SEEK_SET) != off @@ -840,6 +857,19 @@ readDosDirSection(int f, struct bootbloc invlfn ? invlfn : vallfn, p, invlfn ? invcl : valcl, -1, 0, fullpath(dir), 1); + + /* The root directory of non fat32 filesystems is in a special + * area and may have been modified above without being written out. + */ + if ((mod & FSDIRMOD) && !(boot->flags & FAT32) && !dir->parent) { + last *= 32; + if (lseek(f, off, SEEK_SET) != off + || write(f, buffer, last) != last) { + perror("Unable to write directory"); + return FSFATAL; + } + mod &= ~THISMOD; + } return mod & ~THISMOD; } @@ -929,7 +959,7 @@ reconnect(int dosfs, struct bootblock *b lfoff = lfcl * boot->ClusterSize + boot->ClusterOffset * boot->BytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff - || read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { + || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not read LOST.DIR"); return FSFATAL; } @@ -959,7 +989,7 @@ reconnect(int dosfs, struct bootblock *b p[31] = (u_char)(d.size >> 24); fat[head].flags |= FAT_USED; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff - || write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { + || (size_t)write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not write LOST.DIR"); return FSFATAL; } Modified: stable/8/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:41:27 2010 (r207567) @@ -48,8 +48,13 @@ struct bootblock { u_int FATsmall; /* number of sectors per FAT */ u_int SecPerTrack; /* sectors per track */ u_int Heads; /* number of heads */ - u_int32_t Sectors; /* total number of sectors */ u_int32_t HiddenSecs; /* # of hidden sectors */ + u_int32_t Sectors; /* total number of sectors */ +#define FAT32 1 /* this is a FAT32 file system */ + /* + * Maybe, we should separate out + * various parts of FAT32? XXX + */ u_int32_t HugeSectors; /* # of sectors if bpbSectors == 0 */ u_int FSInfo; /* FSInfo sector */ u_int Backup; /* Backup of Bootblocks */ @@ -59,11 +64,6 @@ struct bootblock { /* and some more calculated values */ u_int flags; /* some flags: */ -#define FAT32 1 /* this is a FAT32 file system */ - /* - * Maybe, we should separate out - * various parts of FAT32? XXX - */ int ValidFat; /* valid fat if FAT32 non-mirrored */ cl_t ClustMask; /* mask for entries in FAT */ cl_t NumClusters; /* # of entries in a FAT */ Modified: stable/8/sbin/fsck_msdosfs/ext.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:41:27 2010 (r207567) @@ -70,12 +70,12 @@ int checkfilesys(const char *); #define FSDIRMOD 2 /* Some directory was modified */ #define FSFATMOD 4 /* The FAT was modified */ #define FSERROR 8 /* Some unrecovered error remains */ -#define FSFATAL 16 /* Some unrecoverable error occured */ +#define FSFATAL 16 /* Some unrecoverable error occurred */ #define FSDIRTY 32 /* File system is dirty */ #define FSFIXFAT 64 /* Fix file system FAT */ /* - * read a boot block in a machine independend fashion and translate + * read a boot block in a machine independent fashion and translate * it into our struct bootblock. */ int readboot(int, struct bootblock *); @@ -89,13 +89,13 @@ int writefsinfo(int, struct bootblock *) * Read one of the FAT copies and return a pointer to the new * allocated array holding our description of it. */ -int readfat(int, struct bootblock *, int, struct fatEntry **); +int readfat(int, struct bootblock *, u_int, struct fatEntry **); /* * Check two FAT copies for consistency and merge changes into the - * first if neccessary. + * first if necessary. */ -int comparefat(struct bootblock *, struct fatEntry *, struct fatEntry *, int); +int comparefat(struct bootblock *, struct fatEntry *, struct fatEntry *, u_int); /* * Check a FAT Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:41:27 2010 (r207567) @@ -40,10 +40,10 @@ static const char rcsid[] = #include "ext.h" #include "fsutil.h" -static int checkclnum(struct bootblock *, int, cl_t, cl_t *); -static int clustdiffer(cl_t, cl_t *, cl_t *, int); +static int checkclnum(struct bootblock *, u_int, cl_t, cl_t *); +static int clustdiffer(cl_t, cl_t *, cl_t *, u_int); static int tryclear(struct bootblock *, struct fatEntry *, cl_t, cl_t *); -static int _readfat(int, struct bootblock *, int, u_char **); +static int _readfat(int, struct bootblock *, u_int, u_char **); /*- * The first 2 FAT entries contain pseudo-cluster numbers with the following @@ -128,7 +128,7 @@ err: * Check a cluster number for valid value */ static int -checkclnum(struct bootblock *boot, int fat, cl_t cl, cl_t *next) +checkclnum(struct bootblock *boot, u_int fat, cl_t cl, cl_t *next) { if (*next >= (CLUST_RSRVD&boot->ClustMask)) *next |= ~boot->ClustMask; @@ -159,7 +159,7 @@ checkclnum(struct bootblock *boot, int f * Read a FAT from disk. Returns 1 if successful, 0 otherwise. */ static int -_readfat(int fs, struct bootblock *boot, int no, u_char **buffer) +_readfat(int fs, struct bootblock *boot, u_int no, u_char **buffer) { off_t off; @@ -177,7 +177,7 @@ _readfat(int fs, struct bootblock *boot, goto err; } - if (read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) + if ((size_t)read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) != boot->FATsecs * boot->BytesPerSec) { perror("Unable to read FAT"); goto err; @@ -194,24 +194,26 @@ _readfat(int fs, struct bootblock *boot, * Read a FAT and decode it into internal format */ int -readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp) +readfat(int fs, struct bootblock *boot, u_int no, struct fatEntry **fp) { struct fatEntry *fat; u_char *buffer, *p; cl_t cl; int ret = FSOK; + size_t len; boot->NumFree = boot->NumBad = 0; if (!_readfat(fs, boot, no, &buffer)) return FSFATAL; - fat = calloc(boot->NumClusters, sizeof(struct fatEntry)); + fat = malloc(len = boot->NumClusters * sizeof(struct fatEntry)); if (fat == NULL) { perror("No space for FAT"); free(buffer); return FSFATAL; } + (void)memset(fat, 0, len); if (buffer[0] != boot->Media || buffer[1] != 0xff || buffer[2] != 0xff @@ -304,7 +306,11 @@ readfat(int fs, struct bootblock *boot, } free(buffer); - *fp = fat; + if (ret & FSFATAL) { + free(fat); + *fp = NULL; + } else + *fp = fat; return ret; } @@ -324,7 +330,7 @@ rsrvdcltype(cl_t cl) } static int -clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, int fatnum) +clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, u_int fatnum) { if (*cp1 == CLUST_FREE || *cp1 >= CLUST_RSRVD) { if (*cp2 == CLUST_FREE || *cp2 >= CLUST_RSRVD) { @@ -339,13 +345,13 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } return FSFATAL; } - pwarn("Cluster %u is marked %s in FAT 0, %s in FAT %d\n", + pwarn("Cluster %u is marked %s in FAT 0, %s in FAT %u\n", cl, rsrvdcltype(*cp1), rsrvdcltype(*cp2), fatnum); if (ask(0, "Use FAT 0's entry")) { *cp2 = *cp1; return FSFATMOD; } - if (ask(0, "Use FAT %d's entry", fatnum)) { + if (ask(0, "Use FAT %u's entry", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -353,7 +359,7 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } pwarn("Cluster %u is marked %s in FAT 0, but continues with cluster %u in FAT %d\n", cl, rsrvdcltype(*cp1), *cp2, fatnum); - if (ask(0, "Use continuation from FAT %d", fatnum)) { + if (ask(0, "Use continuation from FAT %u", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -364,7 +370,7 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp return FSFATAL; } if (*cp2 == CLUST_FREE || *cp2 >= CLUST_RSRVD) { - pwarn("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %d\n", + pwarn("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %u\n", cl, *cp1, rsrvdcltype(*cp2), fatnum); if (ask(0, "Use continuation from FAT 0")) { *cp2 = *cp1; @@ -376,13 +382,13 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } return FSERROR; } - pwarn("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %d\n", + pwarn("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %u\n", cl, *cp1, *cp2, fatnum); if (ask(0, "Use continuation from FAT 0")) { *cp2 = *cp1; return FSFATMOD; } - if (ask(0, "Use continuation from FAT %d", fatnum)) { + if (ask(0, "Use continuation from FAT %u", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -394,8 +400,8 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp * into the first one. */ int -comparefat(struct bootblock *boot, struct fatEntry *first, - struct fatEntry *second, int fatnum) +comparefat(struct bootblock *boot, struct fatEntry *first, + struct fatEntry *second, u_int fatnum) { cl_t cl; int ret = FSOK; @@ -535,8 +541,8 @@ writefat(int fs, struct bootblock *boot, { u_char *buffer, *p; cl_t cl; - int i; - u_int32_t fatsz; + u_int i; + size_t fatsz; off_t off; int ret = FSOK; @@ -626,7 +632,7 @@ writefat(int fs, struct bootblock *boot, off = boot->ResSectors + i * boot->FATsecs; off *= boot->BytesPerSec; if (lseek(fs, off, SEEK_SET) != off - || write(fs, buffer, fatsz) != fatsz) { + || (size_t)write(fs, buffer, fatsz) != fatsz) { perror("Unable to write FAT"); ret = FSFATAL; /* Return immediately? XXX */ } @@ -676,17 +682,6 @@ checklost(int dosfs, struct bootblock *b ret = 1; } } - if (boot->NumFree && fat[boot->FSNext].next != CLUST_FREE) { - pwarn("Next free cluster in FSInfo block (%u) not free\n", - boot->FSNext); - if (ask(1, "Fix")) - for (head = CLUST_FIRST; head < boot->NumClusters; head++) - if (fat[head].next == CLUST_FREE) { - boot->FSNext = head; - ret = 1; - break; - } - } if (ret) mod |= writefsinfo(dosfs, boot); } Modified: stable/8/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:41:27 2010 (r207567) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon May 3 12:43:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 405B91065674; Mon, 3 May 2010 12:43:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2028FC23; Mon, 3 May 2010 12:43: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 o43ChIXp081821; Mon, 3 May 2010 12:43:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43ChI1S081815; Mon, 3 May 2010 12:43:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031243.o43ChI1S081815@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:43: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: r207568 - stable/8/sbin/fsck_msdosfs 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, 03 May 2010 12:43:18 -0000 Author: kib Date: Mon May 3 12:43:17 2010 New Revision: 207568 URL: http://svn.freebsd.org/changeset/base/207568 Log: MFC r203874: Rename fields to match better the msdosfs headers. Modified: stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/dosfs.h stable/8/sbin/fsck_msdosfs/fat.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:43:17 2010 (r207568) @@ -62,22 +62,22 @@ readboot(int dosfs, struct bootblock *bo boot->ValidFat = -1; /* decode bios parameter block */ - boot->BytesPerSec = block[11] + (block[12] << 8); - boot->SecPerClust = block[13]; - boot->ResSectors = block[14] + (block[15] << 8); - boot->FATs = block[16]; - boot->RootDirEnts = block[17] + (block[18] << 8); - boot->Sectors = block[19] + (block[20] << 8); - boot->Media = block[21]; - boot->FATsmall = block[22] + (block[23] << 8); + boot->bpbBytesPerSec = block[11] + (block[12] << 8); + boot->bpbSecPerClust = block[13]; + boot->bpbResSectors = block[14] + (block[15] << 8); + boot->bpbFATs = block[16]; + boot->bpbRootDirEnts = block[17] + (block[18] << 8); + boot->bpbSectors = block[19] + (block[20] << 8); + boot->bpbMedia = block[21]; + boot->bpbFATsmall = block[22] + (block[23] << 8); boot->SecPerTrack = block[24] + (block[25] << 8); - boot->Heads = block[26] + (block[27] << 8); - boot->HiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); - boot->HugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); + boot->bpbHeads = block[26] + (block[27] << 8); + boot->bpbHiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); + boot->bpbHugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); - boot->FATsecs = boot->FATsmall; + boot->FATsecs = boot->bpbFATsmall; - if (!boot->RootDirEnts) + if (!boot->bpbRootDirEnts) boot->flags |= FAT32; if (boot->flags & FAT32) { boot->FATsecs = block[36] + (block[37] << 8) @@ -92,13 +92,13 @@ readboot(int dosfs, struct bootblock *bo block[43], block[42]); return FSFATAL; } - boot->RootCl = block[44] + (block[45] << 8) + boot->bpbRootClust = block[44] + (block[45] << 8) + (block[46] << 16) + (block[47] << 24); - boot->FSInfo = block[48] + (block[49] << 8); - boot->Backup = block[50] + (block[51] << 8); + boot->bpbFSInfo = block[48] + (block[49] << 8); + boot->bpbBackup = block[50] + (block[51] << 8); - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); @@ -124,18 +124,18 @@ readboot(int dosfs, struct bootblock *bo fsinfo[0x3fc] = fsinfo[0x3fd] = 0; fsinfo[0x3fe] = 0x55; fsinfo[0x3ff] = 0xaa; - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + perror("Unable to write bpbFSInfo"); return FSFATAL; } ret = FSBOOTMOD; } else - boot->FSInfo = 0; + boot->bpbFSInfo = 0; } - if (boot->FSInfo) { + if (boot->bpbFSInfo) { boot->FSFree = fsinfo[0x1e8] + (fsinfo[0x1e9] << 8) + (fsinfo[0x1ea] << 16) + (fsinfo[0x1eb] << 24); @@ -144,8 +144,8 @@ readboot(int dosfs, struct bootblock *bo + (fsinfo[0x1ef] << 24); } - if (lseek(dosfs, boot->Backup * boot->BytesPerSec, SEEK_SET) - != boot->Backup * boot->BytesPerSec + if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbBackup * boot->bpbBytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { perror("could not read backup bootblock"); return FSFATAL; @@ -162,36 +162,36 @@ readboot(int dosfs, struct bootblock *bo * print out useful information and continue. */ pfatal("backup (block %d) mismatch with primary bootblock:\n", - boot->Backup); + boot->bpbBackup); for (i = 11; i < 11 + 90; i++) { if (block[i] != backup[i]) pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", i, block[i], backup[i]); } } - /* Check backup FSInfo? XXX */ + /* Check backup bpbFSInfo? XXX */ } - boot->ClusterOffset = (boot->RootDirEnts * 32 + boot->BytesPerSec - 1) - / boot->BytesPerSec - + boot->ResSectors - + boot->FATs * boot->FATsecs - - CLUST_FIRST * boot->SecPerClust; + boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + boot->bpbBytesPerSec - 1) + / boot->bpbBytesPerSec + + boot->bpbResSectors + + boot->bpbFATs * boot->FATsecs + - CLUST_FIRST * boot->bpbSecPerClust; - if (boot->BytesPerSec % DOSBOOTBLOCKSIZE != 0) { - pfatal("Invalid sector size: %u", boot->BytesPerSec); + if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE != 0) { + pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); return FSFATAL; } - if (boot->SecPerClust == 0) { - pfatal("Invalid cluster size: %u", boot->SecPerClust); + if (boot->bpbSecPerClust == 0) { + pfatal("Invalid cluster size: %u", boot->bpbSecPerClust); return FSFATAL; } - if (boot->Sectors) { - boot->HugeSectors = 0; - boot->NumSectors = boot->Sectors; + if (boot->bpbSectors) { + boot->bpbHugeSectors = 0; + boot->NumSectors = boot->bpbSectors; } else - boot->NumSectors = boot->HugeSectors; - boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->SecPerClust; + boot->NumSectors = boot->bpbHugeSectors; + boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; if (boot->flags&FAT32) boot->ClustMask = CLUST32_MASK; @@ -207,13 +207,13 @@ readboot(int dosfs, struct bootblock *bo switch (boot->ClustMask) { case CLUST32_MASK: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 4; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec) / 4; break; case CLUST16_MASK: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 2; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec) / 2; break; default: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec * 2) / 3; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec * 2) / 3; break; } @@ -222,7 +222,7 @@ readboot(int dosfs, struct bootblock *bo boot->NumClusters, boot->FATsecs); return FSFATAL; } - boot->ClusterSize = boot->BytesPerSec * boot->SecPerClust; + boot->ClusterSize = boot->bpbBytesPerSec * boot->bpbSecPerClust; boot->NumFiles = 1; boot->NumFree = 0; @@ -235,8 +235,8 @@ writefsinfo(int dosfs, struct bootblock { u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); return FSFATAL; @@ -249,11 +249,11 @@ writefsinfo(int dosfs, struct bootblock fsinfo[0x1ed] = (u_char)(boot->FSNext >> 8); fsinfo[0x1ee] = (u_char)(boot->FSNext >> 16); fsinfo[0x1ef] = (u_char)(boot->FSNext >> 24); - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + perror("Unable to write bpbFSInfo"); return FSFATAL; } /* Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:43:17 2010 (r207568) @@ -98,7 +98,7 @@ checkfilesys(const char *fname) } if (boot.ValidFat < 0) - for (i = 1; i < (int)boot.FATs; i++) { + for (i = 1; i < (int)boot.bpbFATs; i++) { struct fatEntry *currentFat; mod |= readfat(dosfs, &boot, i, ¤tFat); Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:43:17 2010 (r207568) @@ -219,8 +219,8 @@ resetDosDirSection(struct bootblock *boo cl_t cl; int ret = FSOK; - b1 = boot->RootDirEnts * 32; - b2 = boot->SecPerClust * boot->BytesPerSec; + b1 = boot->bpbRootDirEnts * 32; + b2 = boot->bpbSecPerClust * boot->bpbBytesPerSec; if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { perror("No space for directory buffer"); @@ -242,15 +242,15 @@ resetDosDirSection(struct bootblock *boo memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { - if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) { + if (boot->bpbRootClust < CLUST_FIRST || boot->bpbRootClust >= boot->NumClusters) { pfatal("Root directory starts with cluster out of range(%u)", - boot->RootCl); + boot->bpbRootClust); return FSFATAL; } - cl = fat[boot->RootCl].next; + cl = fat[boot->bpbRootClust].next; if (cl < CLUST_FIRST || (cl >= CLUST_RSRVD && cl< CLUST_EOFS) - || fat[boot->RootCl].head != boot->RootCl) { + || fat[boot->bpbRootClust].head != boot->bpbRootClust) { if (cl == CLUST_FREE) pwarn("Root directory starts with free cluster\n"); else if (cl >= CLUST_RSRVD) @@ -261,14 +261,14 @@ resetDosDirSection(struct bootblock *boo return FSFATAL; } if (ask(1, "Fix")) { - fat[boot->RootCl].next = CLUST_FREE; + fat[boot->bpbRootClust].next = CLUST_FREE; ret = FSFATMOD; } else ret = FSFATAL; } - fat[boot->RootCl].flags |= FAT_USED; - rootDir->head = boot->RootCl; + fat[boot->bpbRootClust].flags |= FAT_USED; + rootDir->head = boot->bpbRootClust; } return ret; @@ -313,7 +313,7 @@ delete(int f, struct bootblock *boot, st { u_char *s, *e; off_t off; - int clsz = boot->SecPerClust * boot->BytesPerSec; + int clsz = boot->bpbSecPerClust * boot->bpbBytesPerSec; s = delbuf + startoff; e = delbuf + clsz; @@ -323,8 +323,8 @@ delete(int f, struct bootblock *boot, st break; e = delbuf + endoff; } - off = startcl * boot->SecPerClust + boot->ClusterOffset; - off *= boot->BytesPerSec; + off = startcl * boot->bpbSecPerClust + boot->ClusterOffset; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, delbuf, clsz) != clsz) { perror("Unable to read directory"); @@ -461,14 +461,14 @@ readDosDirSection(int f, struct bootbloc vallfn = invlfn = empty = NULL; do { if (!(boot->flags & FAT32) && !dir->parent) { - last = boot->RootDirEnts * 32; - off = boot->ResSectors + boot->FATs * boot->FATsecs; + last = boot->bpbRootDirEnts * 32; + off = boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; } else { - last = boot->SecPerClust * boot->BytesPerSec; - off = cl * boot->SecPerClust + boot->ClusterOffset; + last = boot->bpbSecPerClust * boot->bpbBytesPerSec; + off = cl * boot->bpbSecPerClust + boot->ClusterOffset; } - off *= boot->BytesPerSec; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, buffer, last) != last) { perror("Unable to read directory"); @@ -957,7 +957,7 @@ reconnect(int dosfs, struct bootblock *b return FSERROR; } lfoff = lfcl * boot->ClusterSize - + boot->ClusterOffset * boot->BytesPerSec; + + boot->ClusterOffset * boot->bpbBytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not read LOST.DIR"); Modified: stable/8/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:43:17 2010 (r207568) @@ -39,31 +39,31 @@ typedef u_int32_t cl_t; /* type holding * FAT boot block. */ struct bootblock { - u_int BytesPerSec; /* bytes per sector */ - u_int SecPerClust; /* sectors per cluster */ - u_int ResSectors; /* number of reserved sectors */ - u_int FATs; /* number of FATs */ - u_int RootDirEnts; /* number of root directory entries */ - u_int Media; /* media descriptor */ - u_int FATsmall; /* number of sectors per FAT */ + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* number of reserved sectors */ + u_int bpbFATs; /* number of bpbFATs */ + u_int bpbRootDirEnts; /* number of root directory entries */ + u_int32_t bpbSectors; /* total number of sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsmall; /* number of sectors per FAT */ u_int SecPerTrack; /* sectors per track */ - u_int Heads; /* number of heads */ - u_int32_t HiddenSecs; /* # of hidden sectors */ - u_int32_t Sectors; /* total number of sectors */ -#define FAT32 1 /* this is a FAT32 file system */ - /* - * Maybe, we should separate out - * various parts of FAT32? XXX - */ - u_int32_t HugeSectors; /* # of sectors if bpbSectors == 0 */ - u_int FSInfo; /* FSInfo sector */ - u_int Backup; /* Backup of Bootblocks */ - cl_t RootCl; /* Start of Root Directory */ + u_int bpbHeads; /* number of heads */ + u_int32_t bpbHiddenSecs; /* # of hidden sectors */ + u_int32_t bpbHugeSectors; /* # of sectors if bpbbpbSectors == 0 */ + cl_t bpbRootClust; /* Start of Root Directory */ + u_int bpbFSInfo; /* FSInfo sector */ + u_int bpbBackup; /* Backup of Bootblocks */ cl_t FSFree; /* Number of free clusters acc. FSInfo */ cl_t FSNext; /* Next free cluster acc. FSInfo */ /* and some more calculated values */ u_int flags; /* some flags: */ +#define FAT32 1 /* this is a FAT32 file system */ + /* + * Maybe, we should separate out + * various parts of FAT32? XXX + */ int ValidFat; /* valid fat if FAT32 non-mirrored */ cl_t ClustMask; /* mask for entries in FAT */ cl_t NumClusters; /* # of entries in a FAT */ Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:43:17 2010 (r207568) @@ -73,10 +73,10 @@ checkdirty(int fs, struct bootblock *boo if (boot->ClustMask != CLUST16_MASK && boot->ClustMask != CLUST32_MASK) return 0; - off = boot->ResSectors; - off *= boot->BytesPerSec; + off = boot->bpbResSectors; + off *= boot->bpbBytesPerSec; - buffer = malloc(boot->BytesPerSec); + buffer = malloc(boot->bpbBytesPerSec); if (buffer == NULL) { perror("No space for FAT"); return 1; @@ -87,7 +87,7 @@ checkdirty(int fs, struct bootblock *boo goto err; } - if (read(fs, buffer, boot->BytesPerSec) != boot->BytesPerSec) { + if (read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } @@ -96,7 +96,7 @@ checkdirty(int fs, struct bootblock *boo * If we don't understand the FAT, then the file system must be * assumed to be unclean. */ - if (buffer[0] != boot->Media || buffer[1] != 0xff) + if (buffer[0] != boot->bpbMedia || buffer[1] != 0xff) goto err; if (boot->ClustMask == CLUST16_MASK) { if ((buffer[2] & 0xf8) != 0xf8 || (buffer[3] & 0x3f) != 0x3f) @@ -163,22 +163,22 @@ _readfat(int fs, struct bootblock *boot, { off_t off; - *buffer = malloc(boot->FATsecs * boot->BytesPerSec); + *buffer = malloc(boot->FATsecs * boot->bpbBytesPerSec); if (*buffer == NULL) { perror("No space for FAT"); return 0; } - off = boot->ResSectors + no * boot->FATsecs; - off *= boot->BytesPerSec; + off = boot->bpbResSectors + no * boot->FATsecs; + off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off) { perror("Unable to read FAT"); goto err; } - if ((size_t)read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) - != boot->FATsecs * boot->BytesPerSec) { + if ((size_t)read(fs, *buffer, boot->FATsecs * boot->bpbBytesPerSec) + != boot->FATsecs * boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } @@ -215,7 +215,7 @@ readfat(int fs, struct bootblock *boot, } (void)memset(fat, 0, len); - if (buffer[0] != boot->Media + if (buffer[0] != boot->bpbMedia || buffer[1] != 0xff || buffer[2] != 0xff || (boot->ClustMask == CLUST16_MASK && buffer[3] != 0xff) || (boot->ClustMask == CLUST32_MASK @@ -229,7 +229,7 @@ readfat(int fs, struct bootblock *boot, * file system is dirty if it doesn't reboot cleanly. * Check this special condition before errorring out. */ - if (buffer[0] == boot->Media && buffer[1] == 0xff + if (buffer[0] == boot->bpbMedia && buffer[1] == 0xff && buffer[2] == 0xff && ((boot->ClustMask == CLUST16_MASK && buffer[3] == 0x7f) || (boot->ClustMask == CLUST32_MASK @@ -546,7 +546,7 @@ writefat(int fs, struct bootblock *boot, off_t off; int ret = FSOK; - buffer = malloc(fatsz = boot->FATsecs * boot->BytesPerSec); + buffer = malloc(fatsz = boot->FATsecs * boot->bpbBytesPerSec); if (buffer == NULL) { perror("No space for FAT"); return FSFATAL; @@ -555,7 +555,7 @@ writefat(int fs, struct bootblock *boot, boot->NumFree = 0; p = buffer; if (correct_fat) { - *p++ = (u_char)boot->Media; + *p++ = (u_char)boot->bpbMedia; *p++ = 0xff; *p++ = 0xff; switch (boot->ClustMask) { @@ -628,9 +628,9 @@ writefat(int fs, struct bootblock *boot, break; } } - for (i = 0; i < boot->FATs; i++) { - off = boot->ResSectors + i * boot->FATsecs; - off *= boot->BytesPerSec; + for (i = 0; i < boot->bpbFATs; i++) { + off = boot->bpbResSectors + i * boot->FATsecs; + off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off || (size_t)write(fs, buffer, fatsz) != fatsz) { perror("Unable to write FAT"); @@ -672,7 +672,7 @@ checklost(int dosfs, struct bootblock *b } finishlf(); - if (boot->FSInfo) { + if (boot->bpbFSInfo) { ret = 0; if (boot->FSFree != boot->NumFree) { pwarn("Free space in FSInfo block (%d) not correct (%d)\n", From owner-svn-src-all@FreeBSD.ORG Mon May 3 14:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D897106566B; Mon, 3 May 2010 14:19:59 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4788FC18; Mon, 3 May 2010 14:19: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 o43EJx49003479; Mon, 3 May 2010 14:19:59 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43EJwgV003478; Mon, 3 May 2010 14:19:58 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201005031419.o43EJwgV003478@svn.freebsd.org> From: Alexander Leidinger Date: Mon, 3 May 2010 14:19: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: r207569 - head/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: Mon, 03 May 2010 14:19:59 -0000 Author: netchild Date: Mon May 3 14:19:58 2010 New Revision: 207569 URL: http://svn.freebsd.org/changeset/base/207569 Log: - #ifdef out the cliplist part, skype seems like using an uninitialized variable and can cause problems, without the cliplist handling it works without problems - improve the cliplist error handling - fix VIDIOCGTUNER and VIDIOCSMICROCODE (still no hardware available to test) Submitted by: J.R. Oldroyd X-MFC after: soon (together with all the v4l stuff) Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Mon May 3 12:43:17 2010 (r207568) +++ head/sys/compat/linux/linux_ioctl.c Mon May 3 14:19:58 2010 (r207569) @@ -2628,6 +2628,7 @@ bsd_to_linux_v4l_tuner(struct video_tune return (0); } +#ifdef COMPAT_LINUX_V4L_CLIPLIST static int linux_to_bsd_v4l_clip(struct l_video_clip *lvc, struct video_clip *vc) { @@ -2638,6 +2639,7 @@ linux_to_bsd_v4l_clip(struct l_video_cli 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) @@ -2698,6 +2700,7 @@ linux_to_bsd_v4l_code(struct l_video_cod return (0); } +#ifdef COMPAT_LINUX_V4L_CLIPLIST static int linux_v4l_clip_copy(void *lvc, struct video_clip **ppvc) { @@ -2772,15 +2775,18 @@ linux_v4l_cliplist_copy(struct l_video_w * example of cliplist use. */ plvc = PTRIN(lvw->clips); + vw->clips = NULL; ppvc = &(vw->clips); while (clipcount-- > 0) { - if (plvc == 0) + if (plvc == 0) { error = EFAULT; - if (!error) - error = linux_v4l_clip_copy(plvc, ppvc); - if (error) { - linux_v4l_cliplist_free(vw); 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); @@ -2795,6 +2801,7 @@ linux_v4l_cliplist_copy(struct l_video_w } return (error); } +#endif static int linux_ioctl_v4l(struct thread *td, struct linux_ioctl_args *args) @@ -2818,6 +2825,12 @@ linux_ioctl_v4l(struct thread *td, struc 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); @@ -2836,7 +2849,7 @@ linux_ioctl_v4l(struct thread *td, struc return (error); } linux_to_bsd_v4l_tuner(&l_vtun, &vtun); - error = fo_ioctl(fp, VIDIOCSMICROCODE, &vtun, td->td_ucred, td); + error = fo_ioctl(fp, VIDIOCSTUNER, &vtun, td->td_ucred, td); fdrop(fp, td); return (error); @@ -2865,14 +2878,18 @@ linux_ioctl_v4l(struct thread *td, struc 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: @@ -2924,7 +2941,7 @@ linux_ioctl_v4l(struct thread *td, struc return (error); } linux_to_bsd_v4l_code(&l_vcode, &vcode); - error = fo_ioctl(fp, VIDIOCSTUNER, &vcode, td->td_ucred, td); + error = fo_ioctl(fp, VIDIOCSMICROCODE, &vcode, td->td_ucred, td); fdrop(fp, td); return (error); From owner-svn-src-all@FreeBSD.ORG Mon May 3 14:30:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8342C106566C; Mon, 3 May 2010 14:30:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 72F6C8FC12; Mon, 3 May 2010 14:30: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 o43EUnm4005863; Mon, 3 May 2010 14:30:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43EUnHB005861; Mon, 3 May 2010 14:30:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031430.o43EUnHB005861@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 14:30: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: r207570 - 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, 03 May 2010 14:30:49 -0000 Author: kib Date: Mon May 3 14:30:49 2010 New Revision: 207570 URL: http://svn.freebsd.org/changeset/base/207570 Log: Style and comment adjustements. Suggested and reviewed by: bde MFC after: 3 days Modified: head/sys/amd64/amd64/exception.S Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Mon May 3 14:19:58 2010 (r207569) +++ head/sys/amd64/amd64/exception.S Mon May 3 14:30:49 2010 (r207570) @@ -50,14 +50,14 @@ .bss .globl dtrace_invop_jump_addr .align 8 - .type dtrace_invop_jump_addr, @object - .size dtrace_invop_jump_addr, 8 + .type dtrace_invop_jump_addr,@object + .size dtrace_invop_jump_addr,8 dtrace_invop_jump_addr: .zero 8 .globl dtrace_invop_calltrap_addr .align 8 - .type dtrace_invop_calltrap_addr, @object - .size dtrace_invop_calltrap_addr, 8 + .type dtrace_invop_calltrap_addr,@object + .size dtrace_invop_calltrap_addr,8 dtrace_invop_calltrap_addr: .zero 8 #endif @@ -157,7 +157,6 @@ IDTVEC(align) * kernel from userland. Reenable interrupts if they were enabled * before the trap. This approximates SDT_SYS386TGT on the i386 port. */ - SUPERALIGN_TEXT .globl alltraps .type alltraps,@function @@ -211,16 +210,16 @@ alltraps_pushregs_no_rdi: * Set our jump address for the jump back in the event that * the breakpoint wasn't caused by DTrace at all. */ - movq $calltrap, dtrace_invop_calltrap_addr(%rip) + movq $calltrap,dtrace_invop_calltrap_addr(%rip) /* Jump to the code hooked in by DTrace. */ - movq dtrace_invop_jump_addr, %rax + movq dtrace_invop_jump_addr,%rax jmpq *dtrace_invop_jump_addr #endif .globl calltrap .type calltrap,@function calltrap: - movq %rsp, %rdi + movq %rsp,%rdi call trap MEXITCOUNT jmp doreti /* Handle any pending ASTs */ @@ -274,9 +273,11 @@ IDTVEC(dblfault) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs -1: movq %rsp, %rdi +1: + movq %rsp,%rdi call dblfault_handler -2: hlt +2: + hlt jmp 2b IDTVEC(page) @@ -369,7 +370,7 @@ IDTVEC(fast_syscall) movq %r15,TF_R15(%rsp) /* C preserved */ movl $TF_HASSEGS,TF_FLAGS(%rsp) FAKE_MCOUNT(TF_RIP(%rsp)) - movq %rsp, %rdi + movq %rsp,%rdi call syscall movq PCPU(CURPCB),%rax andq $~PCB_FULLCTX,PCB_FLAGS(%rax) @@ -456,7 +457,7 @@ nmi_fromuserspace: /* Note: this label is also used by ddb and gdb: */ nmi_calltrap: FAKE_MCOUNT(TF_RIP(%rsp)) - movq %rsp, %rdi + movq %rsp,%rdi call trap MEXITCOUNT #ifdef HWPMC_HOOKS @@ -555,9 +556,9 @@ nmi_restoreregs: iretq ENTRY(fork_trampoline) - movq %r12, %rdi /* function */ - movq %rbx, %rsi /* arg1 */ - movq %rsp, %rdx /* trapframe pointer */ + movq %r12,%rdi /* function */ + movq %rbx,%rsi /* arg1 */ + movq %rsp,%rdx /* trapframe pointer */ call fork_exit MEXITCOUNT jmp doreti /* Handle any ASTs */ @@ -628,7 +629,7 @@ doreti_ast: testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) je doreti_exit sti - movq %rsp, %rdi /* pass a pointer to the trapframe */ + movq %rsp,%rdi /* pass a pointer to the trapframe */ call ast jmp doreti_ast @@ -648,8 +649,8 @@ doreti_exit: * Do not reload segment registers for kernel. * Since we do not reload segments registers with sane * values on kernel entry, descriptors referenced by - * segments registers may be not valid. This is fatal - * for the usermode, but is innocent for the kernel. + * segments registers might be not valid. This is fatal + * for user mode, but is not a problem for the kernel. */ testb $SEL_RPL_MASK,TF_CS(%rsp) jz ld_regs @@ -662,14 +663,16 @@ do_segs: /* Restore %fs and fsbase */ movw TF_FS(%rsp),%ax .globl ld_fs -ld_fs: movw %ax,%fs +ld_fs: + movw %ax,%fs cmpw $KUF32SEL,%ax jne 1f movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx .globl ld_fsbase -ld_fsbase: wrmsr +ld_fsbase: + wrmsr 1: /* Restore %gs and gsbase */ movw TF_GS(%rsp),%si @@ -678,7 +681,8 @@ ld_fsbase: wrmsr movl $MSR_GSBASE,%ecx rdmsr .globl ld_gs -ld_gs: movw %si,%gs +ld_gs: + movw %si,%gs wrmsr popfq cmpw $KUG32SEL,%si @@ -687,12 +691,17 @@ ld_gs: movw %si,%gs movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx .globl ld_gsbase -ld_gsbase: wrmsr -1: .globl ld_es -ld_es: movw TF_ES(%rsp),%es +ld_gsbase: + wrmsr +1: + .globl ld_es +ld_es: + movw TF_ES(%rsp),%es .globl ld_ds -ld_ds: movw TF_DS(%rsp),%ds -ld_regs:movq TF_RDI(%rsp),%rdi +ld_ds: + movw TF_DS(%rsp),%ds +ld_regs: + movq TF_RDI(%rsp),%rdi movq TF_RSI(%rsp),%rsi movq TF_RDX(%rsp),%rdx movq TF_RCX(%rsp),%rcx @@ -711,7 +720,8 @@ ld_regs:movq TF_RDI(%rsp),%rdi jz 1f /* keep running with kernel GS.base */ cli swapgs -1: addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ +1: + addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ .globl doreti_iret doreti_iret: iretq @@ -738,7 +748,8 @@ doreti_iret_fault: testl $PSL_I,TF_RFLAGS(%rsp) jz 1f sti -1: movw %fs,TF_FS(%rsp) +1: + movw %fs,TF_FS(%rsp) movw %gs,TF_GS(%rsp) movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) @@ -768,7 +779,7 @@ doreti_iret_fault: .globl ds_load_fault ds_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUDSEL,TF_DS(%rsp) jmp doreti @@ -777,7 +788,7 @@ ds_load_fault: .globl es_load_fault es_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUDSEL,TF_ES(%rsp) jmp doreti @@ -786,7 +797,7 @@ es_load_fault: .globl fs_load_fault fs_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUF32SEL,TF_FS(%rsp) jmp doreti @@ -796,7 +807,7 @@ fs_load_fault: gs_load_fault: popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUG32SEL,TF_GS(%rsp) jmp doreti @@ -805,7 +816,7 @@ gs_load_fault: .globl fsbase_load_fault fsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 movq TD_PCB(%r8),%r8 @@ -816,7 +827,7 @@ fsbase_load_fault: .globl gsbase_load_fault gsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 movq TD_PCB(%r8),%r8 From owner-svn-src-all@FreeBSD.ORG Mon May 3 14:40:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75A8F106566B; Mon, 3 May 2010 14:40:21 +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 496898FC1A; Mon, 3 May 2010 14:40:21 +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 00D7946B0C; Mon, 3 May 2010 10:40:21 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1540A8A021; Mon, 3 May 2010 10:40:20 -0400 (EDT) From: John Baldwin To: Edwin Groothuis Date: Mon, 3 May 2010 10:15:33 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201005010905.o4195600065956@svn.freebsd.org> In-Reply-To: <201005010905.o4195600065956@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201005031015.33773.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 03 May 2010 10:40:20 -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, src-committers@freebsd.org Subject: Re: svn commit: r207462 - head/sbin/tunefs 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, 03 May 2010 14:40:21 -0000 On Saturday 01 May 2010 5:05:06 am Edwin Groothuis wrote: > Author: edwin > Date: Sat May 1 09:05:06 2010 > New Revision: 207462 > URL: http://svn.freebsd.org/changeset/base/207462 > > Log: > Improve usage of tunefs: > > Document -j switch in usage() to reflect recent SUJ work. > > Submitted by: Alastair Hogge > MFC after: 1 week -S is missing as well FWIW. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon May 3 14:40:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C21541065673; Mon, 3 May 2010 14:40:22 +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 926CE8FC2C; Mon, 3 May 2010 14:40:22 +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 466D046B2C; Mon, 3 May 2010 10:40:22 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7EB358A025; Mon, 3 May 2010 10:40:21 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Mon, 3 May 2010 10:21:03 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201005011636.o41GaFsK084343@svn.freebsd.org> <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> <20100501.194758.49280345204940330.imp@bsdimp.com> In-Reply-To: <20100501.194758.49280345204940330.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005031021.03746.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 03 May 2010 10:40:21 -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, doconnor@gsoft.com.au, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207472 - in head/sys: conf dev/ath/ath_hal/ar5212 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, 03 May 2010 14:40:22 -0000 On Saturday 01 May 2010 9:47:58 pm M. Warner Losh wrote: > In message: <9624CC6A-EEB1-4492-9E62-7ACD0BF6F39C@gsoft.com.au> > "Daniel O'Connor" writes: > : > : On 02/05/2010, at 2:06 AM, Warner Losh wrote: > : > Unfortunately, this condition is impossible to detect at runtime > : > without MIPS specific ifdefs. Rather than cast an overly-broad net > : > like Linux/OpenWRT dues (which enables this workaround all the time on > : > MIPS32 platforms), we put this option in the kernel for just the > : > affected machines. Sam didn't like this aspect of the patch when he > : > reviewed it, and I'd love to hear sane proposals on how to fix it :) > : > : Could you do TUNABLE_INT in the MIPS code and TUNABLE_INT_FETCH in ath_hal? > > How is that better than a kernel option? The only place this would > ever happen is atheros AR71xx SoC. It isn't like some of the Atheros > 71xx SoCs would have it and some wouldn't. > > And besides, kenv has to be compiled into the kernel on MIPS these > days... > > The only thing close to an idea I've had is to add: > > __weak int > ath_needs_dma_war() > { > return 0; > } > > and have this in the mips: > > int needs_ath_dma_war = 0; > __weak int ath_needs_dma_war() > { > return needs_ath_dma_war; > } > > and set it to 1 in the AR71xx CPU initialization. But that seemed > kind of lame... I think a kernel option is fine for this case. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon May 3 15:52:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39C251065670; Mon, 3 May 2010 15:52:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4588FC08; Mon, 3 May 2010 15:52: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 o43Fq0Z4023572; Mon, 3 May 2010 15:52:00 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43Fq06a023570; Mon, 3 May 2010 15:52:00 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005031552.o43Fq06a023570@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 15:52: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: r207571 - head/sys/dev/ti 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, 03 May 2010 15:52:00 -0000 Author: alc Date: Mon May 3 15:51:59 2010 New Revision: 207571 URL: http://svn.freebsd.org/changeset/base/207571 Log: Neither the page lock nor the page queues lock is required to unwire and free a VM_ALLOC_NOOBJ page. (Such pages are unmanaged.) Modified: head/sys/dev/ti/if_ti.c Modified: head/sys/dev/ti/if_ti.c ============================================================================== --- head/sys/dev/ti/if_ti.c Mon May 3 14:30:49 2010 (r207570) +++ head/sys/dev/ti/if_ti.c Mon May 3 15:51:59 2010 (r207571) @@ -1488,10 +1488,8 @@ ti_newbuf_jumbo(sc, idx, m_old) } sf[i] = sf_buf_alloc(frame, SFB_NOWAIT); if (sf[i] == NULL) { - vm_page_lock_queues(); vm_page_unwire(frame, 0); vm_page_free(frame); - vm_page_unlock_queues(); device_printf(sc->ti_dev, "buffer allocation " "failed -- packet dropped!\n"); printf(" index %d page %d\n", idx, i); From owner-svn-src-all@FreeBSD.ORG Mon May 3 16:08:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D113106564A; Mon, 3 May 2010 16:08:24 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5D3338FC19; Mon, 3 May 2010 16:08: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 o43G8OPi027242; Mon, 3 May 2010 16:08:24 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43G8OKA027240; Mon, 3 May 2010 16:08:24 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005031608.o43G8OKA027240@svn.freebsd.org> From: Marko Zec Date: Mon, 3 May 2010 16:08: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: r207572 - head/sys/netgraph 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, 03 May 2010 16:08:24 -0000 Author: zec Date: Mon May 3 16:08:24 2010 New Revision: 207572 URL: http://svn.freebsd.org/changeset/base/207572 Log: When destroying a vnet, shut down all netgraph nodes tied to that vnet before proceeding with dismantling other protocol domains. This change only affects options VIMAGE builds. Reviewed by: julian, bz MFC after: 3 days Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Mon May 3 15:51:59 2010 (r207571) +++ head/sys/netgraph/ng_base.c Mon May 3 16:08:24 2010 (r207572) @@ -3067,28 +3067,42 @@ ng_mod_event(module_t mod, int event, vo static void vnet_netgraph_uninit(const void *unused __unused) { -#if 0 - node_p node, last_killed = NULL; + node_p node = NULL, last_killed = NULL; + int i; + + do { + /* Find a node to kill */ + mtx_lock(&ng_namehash_mtx); + for (i = 0; i < NG_NAME_HASH_SIZE; i++) { + LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) { + if (node != &ng_deadnode) { + NG_NODE_REF(node); + break; + } + } + if (node != NULL) + break; + } + mtx_unlock(&ng_namehash_mtx); - /* XXXRW: utterly bogus. */ - while ((node = LIST_FIRST(&V_ng_allnodes)) != NULL) { - if (node == last_killed) { - /* This should never happen */ - node->nd_flags |= NGF_REALLY_DIE; - printf("netgraph node %s needs NGF_REALLY_DIE\n", - node->nd_name); + /* Attempt to kill it only if it is a regular node */ + if (node != NULL) { + if (node == last_killed) { + /* This should never happen */ + printf("ng node %s needs" + "NGF_REALLY_DIE\n", node->nd_name); + if (node->nd_flags & NGF_REALLY_DIE) + panic("ng node %s won't die", + node->nd_name); + node->nd_flags |= NGF_REALLY_DIE; + } ng_rmnode(node, NULL, NULL, 0); - /* This must never happen */ - if (node == LIST_FIRST(&V_ng_allnodes)) - panic("netgraph node %s won't die", - node->nd_name); + NG_NODE_UNREF(node); + last_killed = node; } - ng_rmnode(node, NULL, NULL, 0); - last_killed = node; - } -#endif + } while (node != NULL); } -VNET_SYSUNINIT(vnet_netgraph_uninit, SI_SUB_NETGRAPH, SI_ORDER_ANY, +VNET_SYSUNINIT(vnet_netgraph_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, vnet_netgraph_uninit, NULL); #endif /* VIMAGE */ From owner-svn-src-all@FreeBSD.ORG Mon May 3 16:41:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04F7E106566C; Mon, 3 May 2010 16:41:12 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D10838FC29; Mon, 3 May 2010 16:41: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 o43GfBmE034430; Mon, 3 May 2010 16:41:11 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43GfBjj034427; Mon, 3 May 2010 16:41:11 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005031641.o43GfBjj034427@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 16:41: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: r207573 - in head/sys: fs/tmpfs 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: Mon, 03 May 2010 16:41:12 -0000 Author: alc Date: Mon May 3 16:41:11 2010 New Revision: 207573 URL: http://svn.freebsd.org/changeset/base/207573 Log: Acquire the page lock around vm_page_unwire() and vm_page_wire(). Reviewed by: kib Modified: head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/vfs_bio.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Mon May 3 16:08:24 2010 (r207572) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Mon May 3 16:41:11 2010 (r207573) @@ -460,9 +460,11 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p error = uiomove_fromphys(&m, offset, tlen, uio); VM_OBJECT_LOCK(tobj); out: + vm_page_lock(m); vm_page_lock_queues(); vm_page_unwire(m, TRUE); vm_page_unlock_queues(); + vm_page_unlock(m); vm_page_wakeup(m); vm_object_pip_subtract(tobj, 1); VM_OBJECT_UNLOCK(tobj); @@ -691,6 +693,7 @@ nocache: out: if (vobj != NULL) VM_OBJECT_LOCK(vobj); + vm_page_lock(tpg); vm_page_lock_queues(); if (error == 0) { KASSERT(tpg->valid == VM_PAGE_BITS_ALL, @@ -699,6 +702,7 @@ out: } vm_page_unwire(tpg, TRUE); vm_page_unlock_queues(); + vm_page_unlock(tpg); vm_page_wakeup(tpg); if (vpg != NULL) vm_page_wakeup(vpg); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon May 3 16:08:24 2010 (r207572) +++ head/sys/kern/vfs_bio.c Mon May 3 16:41:11 2010 (r207573) @@ -2942,7 +2942,6 @@ allocbuf(struct buf *bp, int size) vm_page_t m; VM_OBJECT_LOCK(bp->b_bufobj->bo_object); - vm_page_lock_queues(); for (i = desiredpages; i < bp->b_npages; i++) { /* * the page is not freed here -- it @@ -2952,13 +2951,17 @@ allocbuf(struct buf *bp, int size) m = bp->b_pages[i]; KASSERT(m != bogus_page, ("allocbuf: bogus page found")); - while (vm_page_sleep_if_busy(m, TRUE, "biodep")) - vm_page_lock_queues(); + while (vm_page_sleep_if_busy(m, TRUE, + "biodep")) + continue; bp->b_pages[i] = NULL; + vm_page_lock(m); + vm_page_lock_queues(); vm_page_unwire(m, 0); + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); pmap_qremove((vm_offset_t) trunc_page((vm_offset_t)bp->b_data) + (desiredpages << PAGE_SHIFT), (bp->b_npages - desiredpages)); @@ -3039,9 +3042,11 @@ allocbuf(struct buf *bp, int size) /* * We have a good page. */ + vm_page_lock(m); vm_page_lock_queues(); vm_page_wire(m); vm_page_unlock_queues(); + vm_page_unlock(m); bp->b_pages[bp->b_npages] = m; ++bp->b_npages; } From owner-svn-src-all@FreeBSD.ORG Mon May 3 16:55:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30ABA106566C; Mon, 3 May 2010 16:55:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 20DB78FC29; Mon, 3 May 2010 16:55: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 o43GtpVX037714; Mon, 3 May 2010 16:55:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43GtoYK037710; Mon, 3 May 2010 16:55:50 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005031655.o43GtoYK037710@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 16:55: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: r207574 - in head/sys/dev: agp drm 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, 03 May 2010 16:55:51 -0000 Author: alc Date: Mon May 3 16:55:50 2010 New Revision: 207574 URL: http://svn.freebsd.org/changeset/base/207574 Log: Acquire the page lock around vm_page_unwire(). For consistency, extend the scope of the object lock in agp_i810.c. (In this specific case, the scope of the object lock shouldn't matter, but I don't want to create a bad example that might be copied to a case where it did matter.) Reviewed by: kib Modified: head/sys/dev/agp/agp.c head/sys/dev/agp/agp_i810.c head/sys/dev/drm/via_dmablit.c Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Mon May 3 16:41:11 2010 (r207573) +++ head/sys/dev/agp/agp.c Mon May 3 16:55:50 2010 (r207574) @@ -623,9 +623,11 @@ bad: m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); if (k >= i) vm_page_wakeup(m); + vm_page_lock(m); vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_unlock_queues(); + vm_page_unlock(m); } VM_OBJECT_UNLOCK(mem->am_obj); @@ -657,9 +659,11 @@ agp_generic_unbind_memory(device_t dev, VM_OBJECT_LOCK(mem->am_obj); for (i = 0; i < mem->am_size; i += PAGE_SIZE) { m = vm_page_lookup(mem->am_obj, atop(i)); + vm_page_lock(m); vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_unlock_queues(); + vm_page_unlock(m); } VM_OBJECT_UNLOCK(mem->am_obj); Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Mon May 3 16:41:11 2010 (r207573) +++ head/sys/dev/agp/agp_i810.c Mon May 3 16:55:50 2010 (r207574) @@ -1010,10 +1010,12 @@ agp_i810_free_memory(device_t dev, struc VM_OBJECT_LOCK(mem->am_obj); m = vm_page_lookup(mem->am_obj, 0); - VM_OBJECT_UNLOCK(mem->am_obj); + vm_page_lock(m); vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_unlock_queues(); + vm_page_unlock(m); + VM_OBJECT_UNLOCK(mem->am_obj); } else { contigfree(sc->argb_cursor, mem->am_size, M_AGP); sc->argb_cursor = NULL; Modified: head/sys/dev/drm/via_dmablit.c ============================================================================== --- head/sys/dev/drm/via_dmablit.c Mon May 3 16:41:11 2010 (r207573) +++ head/sys/dev/drm/via_dmablit.c Mon May 3 16:55:50 2010 (r207574) @@ -178,9 +178,11 @@ via_free_sg_info(drm_via_sg_info_t *vsg) case dr_via_pages_locked: for (i=0; i < vsg->num_pages; ++i) { if ( NULL != (page = vsg->pages[i])) { + vm_page_lock(page); vm_page_lock_queues(); vm_page_unwire(page, 0); vm_page_unlock_queues(); + vm_page_unlock(page); } } case dr_via_pages_alloc: From owner-svn-src-all@FreeBSD.ORG Mon May 3 17:34:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B52E106566B; Mon, 3 May 2010 17:34:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9E08FC19; Mon, 3 May 2010 17:34: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 o43HYCC0046218; Mon, 3 May 2010 17:34:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43HYC0t046216; Mon, 3 May 2010 17:34:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005031734.o43HYC0t046216@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 17:34:12 +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: r207575 - stable/7/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: Mon, 03 May 2010 17:34:12 -0000 Author: delphij Date: Mon May 3 17:34:12 2010 New Revision: 207575 URL: http://svn.freebsd.org/changeset/base/207575 Log: MFC r196432 (partial, kensmith@) and 207383: Add definition for FreeBSD 8.1 and 9.0. Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local (contents, props changed) Directory Properties: stable/7/gnu/usr.bin/groff/ (props changed) Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/7/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 16:55:50 2010 (r207574) +++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 17:34:12 2010 (r207575) @@ -73,6 +73,8 @@ .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 +.ds doc-operating-system-FreeBSD-8.1 8.1 +.ds doc-operating-system-FreeBSD-9.0 9.0 . .ec . From owner-svn-src-all@FreeBSD.ORG Mon May 3 17:35:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03CB9106566B; Mon, 3 May 2010 17:35:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E846F8FC12; Mon, 3 May 2010 17:35:31 +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 o43HZVc7046525; Mon, 3 May 2010 17:35:31 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43HZV6V046523; Mon, 3 May 2010 17:35:31 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005031735.o43HZV6V046523@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 17:35:31 +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: r207576 - 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: Mon, 03 May 2010 17:35:32 -0000 Author: alc Date: Mon May 3 17:35:31 2010 New Revision: 207576 URL: http://svn.freebsd.org/changeset/base/207576 Log: It makes more sense for the object-based backend allocator to use OBJT_PHYS objects instead of OBJT_DEFAULT objects because we never reclaim or pageout the allocated pages. Moreover, they are mapped with pmap_qenter(), which creates unmanaged mappings. Reviewed by: kib Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon May 3 17:34:12 2010 (r207575) +++ head/sys/vm/uma_core.c Mon May 3 17:35:31 2010 (r207576) @@ -1022,12 +1022,8 @@ obj_alloc(uma_zone_t zone, int bytes, u_ while (pages != startpages) { pages--; p = TAILQ_LAST(&object->memq, pglist); - vm_page_lock(p); - vm_page_lock_queues(); vm_page_unwire(p, 0); vm_page_free(p); - vm_page_unlock_queues(); - vm_page_unlock(p); } retkva = 0; goto done; @@ -2893,13 +2889,11 @@ uma_zone_set_obj(uma_zone_t zone, struct if (kva == 0) return (0); - if (obj == NULL) { - obj = vm_object_allocate(OBJT_DEFAULT, - pages); - } else { + if (obj == NULL) + obj = vm_object_allocate(OBJT_PHYS, pages); + else { VM_OBJECT_LOCK_INIT(obj, "uma object"); - _vm_object_allocate(OBJT_DEFAULT, - pages, obj); + _vm_object_allocate(OBJT_PHYS, pages, obj); } ZONE_LOCK(zone); keg->uk_kva = kva; From owner-svn-src-all@FreeBSD.ORG Mon May 3 17:55:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C11D4106566B; Mon, 3 May 2010 17:55:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B1BF48FC1F; Mon, 3 May 2010 17:55: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 o43HtW2Q050923; Mon, 3 May 2010 17:55:32 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43HtWBZ050921; Mon, 3 May 2010 17:55:32 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005031755.o43HtWBZ050921@svn.freebsd.org> From: Alan Cox Date: Mon, 3 May 2010 17:55: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: r207577 - 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: Mon, 03 May 2010 17:55:32 -0000 Author: alc Date: Mon May 3 17:55:32 2010 New Revision: 207577 URL: http://svn.freebsd.org/changeset/base/207577 Log: Acquire the page lock around vm_page_wire() in vm_page_grab(). Assert that the page lock is held in vm_page_wire(). Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon May 3 17:35:31 2010 (r207576) +++ head/sys/vm/vm_page.c Mon May 3 17:55:32 2010 (r207577) @@ -1544,6 +1544,7 @@ vm_page_wire(vm_page_t m) * it is already off the queues). */ mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); if (m->flags & PG_FICTITIOUS) return; if (m->wire_count == 0) { @@ -1914,9 +1915,11 @@ retrylookup: goto retrylookup; } else { if ((allocflags & VM_ALLOC_WIRED) != 0) { + vm_page_lock(m); vm_page_lock_queues(); vm_page_wire(m); vm_page_unlock_queues(); + vm_page_unlock(m); } if ((allocflags & VM_ALLOC_NOBUSY) == 0) vm_page_busy(m); From owner-svn-src-all@FreeBSD.ORG Mon May 3 18:04:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E74171065676; Mon, 3 May 2010 18:04:17 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D70DB8FC14; Mon, 3 May 2010 18:04: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 o43I4HDK052913; Mon, 3 May 2010 18:04:17 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43I4HYV052911; Mon, 3 May 2010 18:04:17 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201005031804.o43I4HYV052911@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 3 May 2010 18:04: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: r207578 - head/cddl/contrib/opensolaris/tools/ctf/cvt 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, 03 May 2010 18:04:18 -0000 Author: kan Date: Mon May 3 18:04:17 2010 New Revision: 207578 URL: http://svn.freebsd.org/changeset/base/207578 Log: Do not encode more than CTF_MAX_VLEN(1023) enum members. CTF can not represent enums with more than CTF_MAX_VLEN members, but ctfconvert will happily ignore that limitation and create CTF section no other tool can interpret. This change is different from similar change from upstream, which just returns an error if big enum is encountered. Doing that means that every FreeBSD kernel with compiled in hwpmc will have no useable CTF information due to pmc_event enum having 1236+ members. Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Mon May 3 17:55:32 2010 (r207577) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c Mon May 3 18:04:17 2010 (r207578) @@ -355,14 +355,21 @@ write_type(void *arg1, void *arg2) for (i = 0, ep = tp->t_emem; ep != NULL; ep = ep->el_next) i++; /* count up enum members */ + if (i > CTF_MAX_VLEN) { + warning("enum %s has too many values: %d > %d\n", + tdesc_name(tp), i, CTF_MAX_VLEN); + i = CTF_MAX_VLEN; + } + ctt.ctt_info = CTF_TYPE_INFO(CTF_K_ENUM, isroot, i); write_sized_type_rec(b, &ctt, tp->t_size); - for (ep = tp->t_emem; ep != NULL; ep = ep->el_next) { + for (ep = tp->t_emem; ep != NULL && i > 0; ep = ep->el_next) { offset = strtab_insert(&b->ctb_strtab, ep->el_name); cte.cte_name = CTF_TYPE_NAME(CTF_STRTAB_0, offset); cte.cte_value = ep->el_number; ctf_buf_write(b, &cte, sizeof (cte)); + i--; } break; From owner-svn-src-all@FreeBSD.ORG Mon May 3 18:39:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E03AA1065674; Mon, 3 May 2010 18:39:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D03868FC13; Mon, 3 May 2010 18:39: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 o43Ide5U060701; Mon, 3 May 2010 18:39:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43IdeNa060700; Mon, 3 May 2010 18:39:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005031839.o43IdeNa060700@svn.freebsd.org> From: Marius Strobl Date: Mon, 3 May 2010 18:39: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: r207579 - head/sys/dev/isp 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, 03 May 2010 18:39:41 -0000 Author: marius Date: Mon May 3 18:39:40 2010 New Revision: 207579 URL: http://svn.freebsd.org/changeset/base/207579 Log: On sparc64 obtain the initiator ID from the Open Firmware device tree in order to match what the PROM built-in driver uses. Approved by: mjacob Modified: head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Mon May 3 18:04:17 2010 (r207578) +++ head/sys/dev/isp/isp_pci.c Mon May 3 18:39:40 2010 (r207579) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __sparc64__ +#include +#include +#endif + #include static uint32_t isp_pci_rd_reg(ispsoftc_t *, int); @@ -517,7 +522,11 @@ isp_get_specific_options(device_t dev, i if (IS_FC(isp)) { ISP_FC_PC(isp, chan)->default_id = 109 - chan; } else { +#ifdef __sparc64__ + ISP_SPI_PC(isp, chan)->iid = OF_getscsinitid(dev); +#else ISP_SPI_PC(isp, chan)->iid = 7; +#endif } } else { if (IS_FC(isp)) { Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Mon May 3 18:04:17 2010 (r207578) +++ head/sys/dev/isp/isp_sbus.c Mon May 3 18:39:40 2010 (r207579) @@ -41,8 +41,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include @@ -264,11 +266,7 @@ isp_sbus_attach(device_t dev) isp->isp_confopts |= ISP_CFG_OWNLOOPID; } if (default_id == -1) { - /* - * XXX: should be a way to get properties w/o having - * XXX: to call OF_xxx functions - */ - default_id = 7; + default_id = OF_getscsinitid(dev); } ISP_SPI_PC(isp, 0)->iid = default_id; From owner-svn-src-all@FreeBSD.ORG Mon May 3 19:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3413D1065670; Mon, 3 May 2010 19:19:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 241B98FC1C; Mon, 3 May 2010 19:19: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 o43JJxSB069646; Mon, 3 May 2010 19:19:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43JJxu5069644; Mon, 3 May 2010 19:19:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031919.o43JJxu5069644@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 19:19: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: r207580 - 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: Mon, 03 May 2010 19:19:59 -0000 Author: kib Date: Mon May 3 19:19:58 2010 New Revision: 207580 URL: http://svn.freebsd.org/changeset/base/207580 Log: Handle busy status of the page in a way expected for pager_getpage(). Flush requested page, unbusy other pages, do not clear m->busy. Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/phys_pager.c Modified: head/sys/vm/phys_pager.c ============================================================================== --- head/sys/vm/phys_pager.c Mon May 3 18:39:40 2010 (r207579) +++ head/sys/vm/phys_pager.c Mon May 3 19:19:58 2010 (r207580) @@ -152,10 +152,10 @@ phys_pager_getpages(vm_object_t object, KASSERT(m[i]->dirty == 0, ("phys_pager_getpages: dirty page %p", m[i])); /* The requested page must remain busy, the others not. */ - if (reqpage != i) { - m[i]->oflags &= ~VPO_BUSY; - m[i]->busy = 0; - } + if (i == reqpage) + vm_page_flash(m[i]); + else + vm_page_wakeup(m[i]); } return (VM_PAGER_OK); } From owner-svn-src-all@FreeBSD.ORG Mon May 3 19:39:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04925106568F; Mon, 3 May 2010 19:39:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6F198FC1B; Mon, 3 May 2010 19:38: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 o43Jcx6q073853; Mon, 3 May 2010 19:38:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43JcxeA073851; Mon, 3 May 2010 19:38:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201005031938.o43JcxeA073851@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 3 May 2010 19:38:59 +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: r207581 - in stable/8/release: picobsd/floppy.tree/sbin powerpc 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, 03 May 2010 19:39:00 -0000 Author: nwhitehorn Date: Mon May 3 19:38:59 2010 New Revision: 207581 URL: http://svn.freebsd.org/changeset/base/207581 Log: MFC r206881: Add gpart and glabel to the release CD mfsroot. Even if sysinstall cannot partition disks on powerpc, this will allow the user to. PR: powerpc/93203 Obtained from: ia64 Modified: stable/8/release/powerpc/boot_crunch.conf Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/powerpc/boot_crunch.conf ============================================================================== --- stable/8/release/powerpc/boot_crunch.conf Mon May 3 19:19:58 2010 (r207580) +++ stable/8/release/powerpc/boot_crunch.conf Mon May 3 19:38:59 2010 (r207581) @@ -15,6 +15,7 @@ srcdirs /usr/src/sbin progs camcontrol progs dhclient progs fsck_ffs +progs geom progs ifconfig progs mount_msdosfs progs mount_nfs @@ -25,6 +26,8 @@ progs rtsol progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs +ln geom glabel +ln geom gpart srcdirs /usr/src/usr.bin progs cpio @@ -43,4 +46,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -libs -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail From owner-svn-src-all@FreeBSD.ORG Mon May 3 19:48:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC98A106566B; Mon, 3 May 2010 19:48:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D0F448FC08; Mon, 3 May 2010 19:48: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 o43JmLv2075989; Mon, 3 May 2010 19:48:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43JmL5D075986; Mon, 3 May 2010 19:48:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005031948.o43JmL5D075986@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 19:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207582 - stable/6/usr.sbin/daemon 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, 03 May 2010 19:48:22 -0000 Author: delphij Date: Mon May 3 19:48:21 2010 New Revision: 207582 URL: http://svn.freebsd.org/changeset/base/207582 Log: MFC r147906-201389, this sync'ed daemon(8) with -HEAD except the WARNS change. The most important change is the newly added privilege dropping feature by trhodes and others. Requested by: glarkin PR: bin/146266 Modified: stable/6/usr.sbin/daemon/daemon.8 stable/6/usr.sbin/daemon/daemon.c Directory Properties: stable/6/usr.sbin/daemon/ (props changed) Modified: stable/6/usr.sbin/daemon/daemon.8 ============================================================================== --- stable/6/usr.sbin/daemon/daemon.8 Mon May 3 19:38:59 2010 (r207581) +++ stable/6/usr.sbin/daemon/daemon.8 Mon May 3 19:48:21 2010 (r207582) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2001 +.Dd March 19, 2007 .Dt DAEMON 8 .Os .Sh NAME @@ -36,12 +36,14 @@ .Nm .Op Fl cf .Op Fl p Ar pidfile +.Op Fl u Ar user .Ar command arguments ... .Sh DESCRIPTION The .Nm utility detaches itself from the controlling terminal and executes the program specified by its arguments. +Privileges may be lowered to the specified user. .Pp The options are as follows: .Bl -tag -width indent @@ -54,12 +56,14 @@ Redirect standard input, standard output .It Fl p Ar file Write the ID of the created process into the .Ar file -using +using the .Xr pidfile 3 functionality. Note, that the file will be created shortly before the process is actually executed, and will remain after the process exits (although it will be removed if the execution fails). +.It Fl u Ar user +Run the program with the rights of user specified, requires privilege. .El .Sh EXIT STATUS The @@ -77,6 +81,8 @@ standard error unless the .Fl f flag is specified. .Sh SEE ALSO +.Xr setregid 2 , +.Xr setreuid 2 , .Xr daemon 3 , .Xr exec 3 , .Xr pidfile 3 , Modified: stable/6/usr.sbin/daemon/daemon.c ============================================================================== --- stable/6/usr.sbin/daemon/daemon.c Mon May 3 19:38:59 2010 (r207581) +++ stable/6/usr.sbin/daemon/daemon.c Mon May 3 19:48:21 2010 (r207582) @@ -35,24 +35,27 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include +static void restrict_process(const char *); static void usage(void); int main(int argc, char *argv[]) { - struct pidfh *pfh; + struct pidfh *pfh = NULL; int ch, nochdir, noclose, errcode; - const char *pidfile; + const char *pidfile, *user; pid_t otherpid; nochdir = noclose = 1; - pidfile = NULL; - while ((ch = getopt(argc, argv, "-cfp:")) != -1) { + pidfile = user = NULL; + while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -63,6 +66,9 @@ main(int argc, char *argv[]) case 'p': pidfile = optarg; break; + case 'u': + user = optarg; + break; default: usage(); } @@ -72,6 +78,10 @@ main(int argc, char *argv[]) if (argc == 0) usage(); + + if (user != NULL) + restrict_process(user); + /* * Try to open the pidfile before calling daemon(3), * to be able to report the error intelligently @@ -109,9 +119,23 @@ main(int argc, char *argv[]) } static void +restrict_process(const char *user) +{ + struct passwd *pw = NULL; + + pw = getpwnam(user); + if (pw == NULL) + errx(1, "unknown user: %s", user); + + if (setusercontext(NULL, pw, pw->pw_uid, LOGIN_SETALL) != 0) + errx(1, "failed to set user environment"); +} + +static void usage(void) { (void)fprintf(stderr, - "usage: daemon [-cf] [-p pidfile] command arguments ...\n"); + "usage: daemon [-cf] [-p pidfile] [-u user] command " + "arguments ...\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Mon May 3 19:56:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 336401065670; Mon, 3 May 2010 19:56:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 214158FC16; Mon, 3 May 2010 19:56: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 o43JurlS077886; Mon, 3 May 2010 19:56:53 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43Jurfi077884; Mon, 3 May 2010 19:56:53 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201005031956.o43Jurfi077884@svn.freebsd.org> From: Brooks Davis Date: Mon, 3 May 2010 19:56:53 +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: r207583 - stable/8/share/misc 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, 03 May 2010 19:56:53 -0000 Author: brooks Date: Mon May 3 19:56:52 2010 New Revision: 207583 URL: http://svn.freebsd.org/changeset/base/207583 Log: MFC r205073 Regen: * Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y). * Boemler: vendors.txt (2010-03126) PR: kern/133733 Modified: stable/8/share/misc/pci_vendors Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/pci_vendors ============================================================================== --- stable/8/share/misc/pci_vendors Mon May 3 19:48:21 2010 (r207582) +++ stable/8/share/misc/pci_vendors Mon May 3 19:56:52 2010 (r207583) @@ -18,7 +18,7 @@ 4001 WinTV PVR-250 (v1) 4009 WinTV PVR-250 4801 WinTV PVR-250 MCE - 6800 Hauppage Nova -TD-500 DVB-T Tuner Device + 6800 Hauppage Nova -TD-500 DVB-T Tuner Device ( PCIVEN_1131&DEV_7130&SUBSYS_40510000&REV_014&3B) 0071 Nebula Electronics Ltd 0100 Ncipher Corp Ltd 0123 General Dynamics @@ -44,6 +44,10 @@ 8519 OV519 series 05E3 CyberDoor 0701 CBD516 +064E SUYIN Corporation + A101 Acer Crystal Eye Webcam (suYin) + A103 WebCam (SuYin) + D101 Web Cam (SuYin) 066F Sigmatel Inc 3410 SMTP3410 3500 SMTP3500 @@ -54,6 +58,8 @@ 1704 ISDN Adapter (PCI Bus, D, C) 067B Prolific Technology Inc 2303 PL-2303 USB-to-Serial Converter + 2305 USB-to-Printer Bridge Controller (PL-2305) + 2393 prolific (prolific) 3507 PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller 069D Hughes Network Systems (HNS) 0700 Stream Machine @@ -70,7 +76,7 @@ 09C1 Arris 0704 CM 200E Cable Modem 0A5C Broadcom Corporation - 0201 Broadcom USB iLine10(tm) Network Adapter + 0201 Broadcom USB iLine10(tm) Network Adapter (Broadcom NetXtreme BCM5782 Gigabie Ethernet Contro) 2000 Broadcom Bluetooth Firmware Upgrade Device 2009 Broadcom Bluetooth Controller 200A Broadcom Bluetooth Controller @@ -84,17 +90,17 @@ 2038 Broadcom Blutonium Device Firmware Downloader (BCM2038) 2039 BROADCOM Bluetooth Device 2045 Broadcom Bluetooth Controller - 2046 Broadcom USB Bluetooth Device + 2046 Broadcom USB Bluetooth Device ( 5738z) 2047 Broadcom USB Bluetooth Device 205E Broadcom Bluetooth Firmware Upgrade Device - 2100 Broadcom Bluetooth 2.0+eDR USB dongle - 2101 Broadcom Bluetooth 2.0+EDR USB dongle - 2102 ANYCOM Blue USB-200/250 + 2100 Broadcom Bluetooth 2.0+eDR USB dongle (BT 50) + 2101 Broadcom Bluetooth 2.0+EDR USB dongle ( 5&11BBCF3F&0&2) + 2102 ANYCOM Blue USB-200/250 ( USBVID_04B4&PID_21025&38CD4C16&0&6) 2110 Broadcom Bluetooth Controller 2111 ANYCOM Blue USB-UHE 200/250 2120 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 2045) 2121 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter - 2122 Broadcom Bluetooth 2.0+EDR USB dongle + 2122 Broadcom Bluetooth 2.0+EDR USB dongle ( BCM92045B3) 2124 2045B3ROM Bluetooth Dongle 2130 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter 2131 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter @@ -104,7 +110,7 @@ 2143 2046 Flash non UHE Class 1 2144 2046 Flash non UHE module Class 2 2145 Broadcom BCM9204MD LENO Module - 2146 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2146 Broadcom 2045 Bluetooth 2.1 USB UHE Dongle 2147 Broadcom 2046 Bluetooth 2.1 USB Dongle 2148 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle 2149 Broadcom 2046 Bluetooth 2.1 USB Dongle @@ -122,8 +128,9 @@ 2155 Broadcom Bluetooth USB Dongle 2157 BCM2046 B1 USB 500 2158 Broadcom 2046 Bluetooth 2.1 Device - 4502 USB Human Interface Device - 4503 USB Human Interface Device + 4500 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4502 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4503 Broadcom 2046 Bluetooth 2.1 USB Dongle ( BCM2046B1) 5800 Unified Security Hub 6300 Pirelli ISB Remote NDIS Device 0A89 BREA Technologies Inc @@ -144,17 +151,22 @@ 0A06 RCB672FXX 672-channel modular analog telphony card 0B49 ASCII Corporation 064F Trance Vibrator +0C45 Microdia Ltd. + 602D USB Webcam (7&2BE7B8E3&0&4) + 6130 USB CAMERA (5&3512B308&0&1) 0E11 Compaq Computer Corp (Now owned by Hewlett-Packard) 0001 PCI to EISA Bridge - 0002 PCI to ISA Bridge + 0002 PCI to ISA Bridge (ISA Bridge) 000F StorageWorks Library Adapter (HVD) (CPQB1A9) 0012 686P7 (686P7) - 0046 Smart Array 64xx/6i Controller + 0046 Smart Array 6400 Controller (N/A) 0049 Gigabit Upgrade Module (NC7132) 004A Gigabit Server Adapter (NC6136) + 005A HP Remote Insight Lights-Out II Board (PowerPC 405GP processor at 200MHz [3305103C]) 007C NC7770 1000BaseTX 007D NC6770 1000BaseTX 0085 NC7780 1000BaseTX + 00B1 HP Remote Insight Lights-Out II PCI Device (3305103C) 00BB NC7760 00C0 AIC-7899G 64-bit, 66MHz Dual Channel Wide Ultra3 SCSI Controller 00CA NC7771 @@ -201,8 +213,8 @@ AE29 PCI to ISA Bridge (MIS-L) AE2A CPU to PCI Bridge (MPC) AE2B PCI to ISA PnP Bridge (MIS-E) - AE31 System Management Controller (1002&DEV-4385&SUBSY) - AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 + AE31 System Management Controller (1002&DEV-5653&SUBSYS) + AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 (950) AE33 Dual EIDE Controller (Triflex) AE34 Netelligent 10 T PCI UTP TLAN 2.3 AE35 Integrated NetFlex-3/P TLAN 2.3 @@ -321,70 +333,70 @@ 0017 PROTO-3 PCI, digital I/O with chipselect (ispLSI1032E) 0020 Universal digital I/O PCI-Interface (ispLSI1032E) 1002 ATI Technologies Inc. / Advanced Micro Devices, Inc. - 0B12 ati 1900 (ati 1900) + 0B12 ATI Radeon X1900 (R580) 1002 0F2A1787 (0F2A1787) - 3150 Radeon Mobility X600 (M24 1P) - 3151 FIREMV 2400 - 3152 Mobility Radeon X300 - 3154 Mobility FireGL V3200 - 3171 FireMV 2400 Secondary - 3E50 Radeon X600/X650 Series - 3E54 FireGL V3200 (RV380) - 3E70 Radeon X600 Series Secondary - 3E74 FIREGL V3200 Secondary + 3150 ATI MOBILITY /ATI RADEON X600 (M24) + 3151 ATI FireMV 2400 (RV380) + 3152 ATI MOBILITY /ATI RADEON X300 (M24) + 3154 ATI MOBILITY FireGL V3200 (M24GL) + 3171 ATI FireMV 2400 Secondary (RV380) + 3E50 ATI RADEON X600/X550 Series (RV380) + 3E54 ATI FireGL V3200 (RV380GL) + 3E70 ATI RADEON X600/X550 Series Secondary (RV380) + 3E74 ATI FireGL V3200 Secondary (RV380GL) 4136 Radeon IGP 320 (A3) 4137 Radeon IGP 340 (RS200) 4144 Radeon 9500 Series (R300) 4145 Radeon 9200 (M+X) (R300) - 4146 Radeon 9700 (R300) + 4146 ATI RADEON 9600TX (R300) 4147 Fire GL Z1 AGP/Pro Video Accelerator (128 MB, 4P) - 4148 Radeon 9800 SE (R350) - 4149 Radeon 9500 Family + 4148 ATI RADEON 9800 SE (R350) + 4149 ATI RADEON 9500 (R350) 414A Radeon 9800 Family 414B Fire GL X2 - 4150 Radeon 9600 Series (V350) - 4151 Radeon 9600 (RV350) - 4152 Radeon 9600 XT (RV360) - 4153 Radeon 9550 (RV350) - 4154 Fire GL T2 - 4155 Fire GL T2 + 4150 ATI RADEON 9600 Series (RV350) + 4151 ATI RADEON 9600 Series (RV350) + 4152 ATI RADEON 9600 Series (RV360) + 4153 ATI RADEON 9550/X1050 Series (RV350) + 4154 ATI FireGL T2 (RV350GL) + 4155 ATI RADEON 9600 Series (RV350) 4156 Fire GL T2 4157 Fire GL T2 - 4158 vga video (4c59h) - 4164 R300 (128bit mem bus) (Radeon 9500 Series, secondary) + 4158 Mach32 (68800AX) + 4164 Radeon 9500 Series (R300) - Secondary 4165 Radeon 9700 Pro (R300 AE) - Secondary - 4166 Radeon 9600TX - Secondary + 4166 ATI RADEON 9600TX Secondary (R300) 4167 Fire GL Z1 AGP/Pro Secondary Video Accelerator (128 MB, 4P) - 4168 Radeon 9800 SE - Secondary (R350) - 4169 Radeon 9500 Family - Secondary - 4170 Radeon 9600 - Secondary (RV350) - 4171 Radeon 9600 (RV350) - Secondary - 4172 Radeon 9600 XT - Secondary (RV360) - 4173 Radeon 9550 - Secondary (RV350) - 4174 FireGL T2 - Seocndary - 4175 Radeon 9600 Series Secondary + 4168 ATI RADEON 9800 SE Secondary (R350) + 4169 ATI RADEON 9500 Secondary (R350) + 4170 ATI RADEON 9600 Series Secondary (RV350) + 4171 ATI RADEON 9600 Series Secondary (RV350) + 4172 ATI RADEON 9600 Series Secondary (RV360) + 4173 ATI RADEON 9550/X1050 Series Secondary (RV350) + 4174 ATI FireGL T2 Secondary (RV350GL) + 4175 ATI RADEON 9600 Series Secondary (RV350) 4237 Radeon 7000 IGP 4242 All-In-Wonder 8500DV (R200AIW) 4243 Radeon 8500 DV OHCI FireWire Controller 4336 Radeon IGP 320M (rs200) 4337 Mobility M6 (U2) (RS200M) - 4341 AC'97 Audio Controller (AD1981) - 4342 HUB Bridge (IXP 150) - 4345 EHCI USB Controller (IXP 150) - 4347 OHCI USB Controller *1 (IXP 150) - 4348 OHCI USB Controller *2 (IXP 150) - 4349 PATA 100 Controller (IXP 1xx/2xx) - 434C LPC Controller (IXP 150) - 434D Agere Systems AC'97 Modem device (a75-s226) + 4341 AC'97 Audio Controller (SB200) + 4342 PCI-PCI Bridge (SB200) + 4345 EHCI USB Controller (SB200) + 4347 OHCI USB Controller *1 + 4348 OHCI USB Controller *2 + 4349 PATA-100 IDE Controller (SB200) + 434C PCI-ISA Bridge (SB200) + 434D AC'97 Modem Controller (SB200) 4353 IXP SB200 SMBUS Controller - 4354 mach64 ct pci (215r2qzua21) - 4358 Mach64 CX (216l0sas25) + 4354 Mach64 CT (215CT222) + 4358 Mach64 CX (210888CX) 4361 AC'97 Audio Controller 4363 IXP SB300 SMBUS Controller 4369 PATA 133 Controller (IXP 3xx) 436D IXP SB300 AC'97 Modem Controller 436E IXP SB300 Serial ATA Controller - 4370 IXP AC'97 Audio Controller (IXP_AUDIO_400) + 4370 IXP SB400 AC'97 Audio Controller 4371 IXP SB400 PCI-PCI Bridge 4372 ATI SMBus (x200) 4373 IXP SB400 EHCI USB 2.0 Controller @@ -395,7 +407,7 @@ 4378 IXP SB400 AC'97 Modem Controller 4379 IXP SB400 Serial ATA Controller 437A IXP SB400 Serial ATA Controller - 437B IXP SB450 High Definition Audio Controller (Intel Corporation) + 437B IXP SB450 High Definition Audio Controller 4380 IXP SB600 Serial ATA Controller 4381 IXP SB600 Serial ATA RAID Controller 4382 IXP SB600 AC'97 Audio Controller @@ -409,9 +421,9 @@ 438A IXP SB600 USB Controller (OHCI3) 438B IXP SB600 USB Controller (OHCI4) 438C ATI RD600/RS600 IDE Controller (RD600/RS600) - 438D ATK0110 ACPI Utility (1043.4.0.0) + 438D IXP SB600 PCI to LPC Bridge 438E IXP SB600 AC'97 Modem Controller - 4390 SB700 SATA Controller [IDE mode] + 4390 Integrated SATA II Controller (SB700) 4391 SB700 SATA Controller [AHCI mode] 4392 SB700 SATA Controller [Non-RAID5 mode] 4393 SB700 SATA Controller [RAID5 mode] @@ -419,16 +431,16 @@ 4395 SB SATA Controller [AHCI mode with HyperFlash-PCIE] 4396 SB700 USB EHCI Controller 4397 SB700 USB OHCI0 Controller - 4398 SB700 USB OHCI1 Controller + 4398 Standard OpenHCD USB-Hostcontroller (SB700) 4399 SB700 USB OHCI2 Controller 439C PATA 133 Controller (SB7xx) 439D SB700 LPC host controller 4437 Radeon Mobility 7000 IGP 4554 Mach64 ET 4654 113--34004-104 (Mach64 VT) - 4742 ATI 3D Rage Pro AGP 2X 8mb (gt-c2u2) ((GT-C2U2)) + 4742 3D Rage Pro AGP 1X/2X ((GT-C2U2)) 4744 Rage 3D Pro AGP 2x (Rage 3D Pro AGP 2x) - 4747 GT-C2U2 (Rage 3D Pro) + 4747 Rage 3D Pro (GT-C2U2) 4749 ATI ALL IN WONDER PRO (8MB) (RAGE PRO TURBO AGP 2X) 474C k7 som+ (Rage XC PCI-66) 474D SLAT (Rage XL AGP 2x) @@ -442,7 +454,7 @@ 4755 3d rage 2 + dvd (Rage 3D II+pci) 4756 Rage 3D IIC PCI [Mach64 GT IIC] (PQFP Package) 4757 Rage 3D IIC AGP (BGA Package) - 4758 Mach 64 GT (210888GXControladores ATI 210888GX [Mach64 GX]) + 4758 Mach64 GX (210888GX) 4759 m3d agp card on agp slot (215r2qzua21) 475A Rage 3D IIC AGP (PQFP Package) 4964 Radeon 9000 Series (RV250 Id) @@ -451,33 +463,33 @@ 4967 Radeon 9000 (RV250) 496E Radeon 9000/9000 Pro - Secondary (RV250) 496F Radeon 9000 (RV250) - Secondary - 4A48 Radeon X800 Series (R420 JH) - 4A49 Radeon X800 gt (R423) - 4A4A Radeon X800 Series - 4A4B RADEON X800 XT (R420) - 4A4C Radeon X800 Series (R420 JL) - 4A4D FireGL X3 (R420 JM) - 4A4E Radeon Mobility 9800 (M18 JN) - 4A4F Radeon X800 SE - 4A50 Radeon X800 XT Platinum - 4A54 Radeon X800 VE (R420) - 4A68 Radeon X800 Series Secondary - 4A69 Radeon X800 Series - Secondary - 4A6A Radeon X800 Series - Secondary - 4A6B RADEON X800 XT Secondary (R420) - 4A6C Radeon X800 Series Secondary - 4A6D FIREGL X3-256 Secondary - 4A6F Radeon X800 SE Secondary - 4A70 Radeon X800 XT Platinum - Secondary - 4A74 Radeon X800 VE (R420) (Secondary) - 4B49 Radeon X850XT + 4A48 ATI RADEON X800 Series (R420) + 4A49 ATI RADEON X800 PRO (R420) + 4A4A ATI RADEON X800 Series (R420) + 4A4B ATI RADEON X800 XT (R420) + 4A4C ATI RADEON X800 Series (R420) + 4A4D ATI FireGL X3-256 (R420GL) + 4A4E ATI MOBILITY /ATI RADEON 9800 (M18) + 4A4F ATI RADEON X800 SE (R420) + 4A50 ATI RADEON X800 XT Platinum Edition (R420) + 4A54 ATI RADEON X800 VE (R420) + 4A68 ATI RADEON X800 Series Secondary (R420) + 4A69 ATI RADEON X800 PRO Secondary (R420) + 4A6A ATI RADEON X800 Series Secondary (R420) + 4A6B ATI RADEON X800 XT Secondary (R420) + 4A6C ATI RADEON X800 Series Secondary (R420) + 4A6D ATI FireGL X3-256 Secondary (R420GL) + 4A6F ATI RADEON X800 SE Secondary (R420) + 4A70 ATI RADEON X800 XT Platinum Edition Secondary (R420) + 4A74 ATI RADEON X800 VE Secondary (R420) + 4B49 ATI RADEON X850 XT (R481) 4B4A Radeon X850 SE - 4B4B Radeon X850 PRO - 4B4C Radeon X850XT-PE - 4B69 Radeon X850XT secondary - 4B6A Radeon X850 SE Secondary - 4B6B Radeon X850 PRO secondary - 4B6C Radeon X850XT-PE Secondary + 4B4B ATI RADEON X850 PRO (R481) + 4B4C ATI RADEON X850 XT Platinum Edition (R481) + 4B69 ATI RADEON X850 XT Secondary (R481) + 4B6A ATI RADEON X850 SE Secondary (R481) + 4B6B ATI RADEON X850 PRO Secondary (R481) + 4B6C ATI RADEON X850 XT Platinum Edition Secondary (R481) 4C42 Rage 3D LT Pro AGP 133MHz (BGA-312 Package) 4C44 Rage 3D LT Pro AGP 133 MHz (Rage 3D LT Pro AGP) 4C45 Rage Mobility M3 AGP @@ -486,18 +498,18 @@ 4C49 Rage 3D LT Pro PCI (BGA-312 Package) 4C4D Rage P/M Mobility AGP 2x (01541014) 4C4E Rage Mobility l (216lo sasa25) - 4C50 Rage 3D LT Pro PCI (VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC) + 4C50 Rage 3D LT Pro PCI (BGA-256 Package) 4C51 Rage 3D LT Pro PCI (BGA-256 Package, Limited 3D) 4C52 Rage P/M Mobility PCI 4C53 Rage L Mobility PCI (216L0SASA25) 4C54 Mach64 LT (264LT) - 4C57 Mobility Radeon 7500 (fdds) + 4C57 Mobility Radeon 7500 (M7 [LW]) 4C58 FireGL Mobility 4C59 Radeon Mobility M6 Series (Mobility 6) 4C5A Radeon Mobility M6 LZ 4C64 Radeon Mobility M9-GL 4C65 Radeon Mobility 9000 (R250 Le) - 4C66 Radeon Mobility 9000 series (ATI MOBILITY RADEON 9000 (Microsoft Corporation -) + 4C66 MOBILITY RADEON 9000 (M9) (R250) 4C67 Radeon Mobility 9000 (R250 Lg) 4C6E Radeon Mobility 9000 - Secondary (R250 Ln) 4D46 Rage Mobility 128 AGP 4x (ATI mobility128) @@ -507,27 +519,27 @@ 4D52 ATI Theater 550 Pro (ATI Theater 550 Pro) 4D53 Unified AVStream Driver 4E44 Radeon 9700/Pro, 9500 Series (R300) - 4E45 Radeon 9700/9500 Series (R300) - 4E46 Radeon 9600TX (R300) + 4E45 ATI RADEON 9500 PRO / 9700 (R300) + 4E46 ATI RADEON 9600 TX (R300) 4E47 Fire GL X1/Z1 AGP/Pro Video Accelerator (R300-WS) - 4E48 Radeon 9800 Pro (R350) + 4E48 ATI RADEON 9800 PRO (R350) 4E49 Radeon 9800 (R350) (??) - 4E4A Radeon 9800 XT (R350) - 4E4B ATI FIREGL X2-256T (FGL9800XT) - 4E50 Mobility Radeon 9700 (M10 NP) (RV350) - 4E51 Mobility Radeon 9600 (M10 NQ) + 4E4A ATI RADEON 9800 XT (R360) + 4E4B ATI FireGL X2-256/X2-256t (R350GL) + 4E50 ATI MOBILITY /ATI RADEON 9600/9700 Series (M10) + 4E51 ATI RADEON 9600 Series (RV350) 4E52 Mobility Radeon 9500/9600 (M10) (RV350) 4E53 Radeon Mobility 9600 (M10 NS) - 4E54 Radeon Mobility M10 NT (RV350-WS) - 4E56 FireGL Mobility T2e (M11 NV) + 4E54 ATI MOBILITY FIRE GL T2/T2e (M10GL) + 4E56 ATI MOBILITY /ATI RADEON 9550 (M12) 4E64 Radeon 9700/Pro, 9500 (R300) Series - Secondary - 4E65 Radeon 9700/9500 Series (R300) - Secondary - 4E66 Radeon 9600TX (R300) - Secondary + 4E65 ATI RADEON 9500 PRO / 9700 Secondary (R300) + 4E66 ATI RADEON 9600 TX Secondary (R300) 4E67 Fire GL X1/Z1 AGP/Pro Secondary Video Accelerator - 4E68 Radeon 9800 Pro (R350) - Secondary - 4E69 Radeon 9800 (R350) - Secondary - 4E6A Radeon 9800 XT (R350) - Secondary - 4E6B ATI FIREGL X2-256T Secondary (FGL9800XT) + 4E68 ATI RADEON 9800 PRO Secondary (R350) + 4E69 ATI RADEON 9800 Secondary (R350) + 4E6A ATI RADEON 9800 XT Secondary (R360) + 4E6B ATI FireGL X2-256/X2-256t Secondary (R350GL) 4E71 Radeon Mobility 9600 (M10 NQ) (secondary) 4F72 Radeon 9000 Series (RV250) 4F73 Radeon 9000 Series (RV250) (Secondary) @@ -538,8 +550,8 @@ 5045 Rage 128 PE/Pro AGP 2x (TMDS) 5046 Rage 128 PF/Pro AGP 4x (TMDS) 5047 3d Rage pro agp 2x (215R3BUA22) - 5048 Rage 128 Pro PH AGP 2x (Rage 128 Pro PH AGP) - 5049 Rage 128 Pro PI AGP 4x (bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t) + 5048 Rage 128 Pro PH AGP 2x (8212104D) + 5049 Rage 128 Pro PI AGP 4x (R128) 504A Rage 128 Pro PJ PCI (TMDS) (Rage 128 Pro PJ PCI) 504B Rage 128 Pro PK AGP 2x (TMDS) (Rage 128 Pro PK AGP) 504C 4x (TMDS) (Rage 128 Pro PL AGP) @@ -583,7 +595,7 @@ 516D Radeon 9100 Series (R200) - Secondary 5245 Rage 128 GL PCI (215R46ASA22) 5246 Rage 32MB (Rage 128 PRO) - 5247 Rage 128 RG + 5247 Rage 128 RG (Rage 32MB) 524B Rage 128 VR RK PCI (g01080-108) 524C Rage 128 RL/VR AGP 2x 5345 Rage 128 SE/4x PCI @@ -595,68 +607,68 @@ 534D Rage 128 4x SM AGP 4x (Rage 128 SM AGP 4x) 534E Rage 128 4x 5354 Mach 64 ST - 5446 Video Controller (VGA Compatible) (ewmewm) + 5446 Rage 128 Pro Ultra TF (unknown) 544C Rage 128 Pro TL 5452 Rage 128 Pro TR 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT 5455 Rade 128 Pro Ultra TU - 5460 Radeon X300 Mobility (M22) (RV370) - 5461 Mobility Radeon X300 - 5462 Mobility Radeon X600 SE - 5464 FireGL GL (M22) - 5548 Radeon X800 (R423 UH) - 5549 Radeon X800 Pro - 554A Radeon X800 XT Platinum - 554B Primary (X800GT) + 5460 ATI MOBILITY /ATI RADEON X300 (M22) + 5461 ATI MOBILITY /ATI RADEON X300 (M22) + 5462 ATI MOBILITY /ATI RADEON X600 SE (M24C) + 5464 ATI MOBILITY FireGL V3100 (M22GL) + 5548 ATI RADEON X800 Series (R423) + 5549 ATI RADEON X800 GTO (R423) + 554A ATI RADEON X800 XT Platinum Edition (R423) + 554B ATI RADEON X800 GT (R423) 554C R430 XTP - 554D Radeon X800 XL (R430) - 554E Radeon X800 Series - 554F Radeon X800 Series - 5550 FireGL V7100 (R423) - 5551 ATI FIREGL V5100 PCI-EX Primary (R423GL-SE) + 554D ATI RADEON X800 CrossFire Edition (R430) + 554E ATI RADEON X800 GT (R430) + 554F ATI RADEON X800 GTO (R430) + 5550 ATI FireGL V7100 (R423GL) + 5551 ATI FireGL V5100 (R423GL) 5552 FireGL V5100 (R423 UR) 5554 FireGL V7100 (R423 UT) - 5568 Radeon X800 Series Secondary - 5569 Radeon X800 Pro - Secondary - 556A Radeon X800 XT Platinum - Secondary - 556B Radeon X800 SE - Secondary + 5568 ATI RADEON X800 Series Secondary (R423) + 5569 ATI RADEON X800 GTO Secondary (R423) + 556A ATI RADEON X800 XT Platinum Edition Secondary (R423) + 556B ATI RADEON X800 GT Secondary (R423) 556C R430 XTP Secondary - 556D Radeon X800 XL - Secondary (R430) - 556E Radeon X800 Series - Secondary - 556F Radeon X800 Series - Secondary - 5570 FIREGL V7100 Secondary - 5571 ATI FIREGL V5100 PCI-EX Secondary (R423GL-SE) - 564A Mobility FIREGL V5000 (M26) - 564B Mobility FIREGL V5000 - 564F Mobility Radeon X700 XL PCIe (M26) - 5652 Mobility Radeon X700 - 5653 Mobility Radeon X700 - 5654 Mach 64 VT VIDEO XPRESSION (215VT2CA42) + 556D ATI RADEON X800 CrossFire Edition Secondary (R430) + 556E ATI RADEON X800 GT Secondary (R430) + 556F ATI RADEON X800 GTO Secondary (R430) + 5570 ATI FireGL V7100 Secondary (R423GL) + 5571 FireGL V5100 PCIe (R423GL-SE) - Secondary + 564A ATI MOBILITY FireGL V5000 (M26GL) + 564B ATI MOBILITY FireGL V5000 (M26GL) + 564F ATI MOBILITY /ATI RADEON X700 XL (M26) + 5652 ATI MOBILITY /ATI RADEON X700 (M26) + 5653 ATI MOBILITY/ATI RADEON X700 (RV410) + 5654 Mach64 VT (215VT22200) 5655 Mach 64 VT3 5656 Mach 64 VT4 PCI (Mach 64 VT4 PCI) - 5657 Radeon X550/X700 Series + 5657 ATI RADEON X550/X700 Series (RV410) 566F RADEON X700 SERIES SECONDARY - 5673 Mobility Radeon X700 Secondary - 5677 Radeon X550/X700 Series Secondary + 5673 ATI MOBILITY /ATI RADEON X700 Secondary (M26) + 5677 ATI RADEON X550/X700 Series Secondary (RV410) 5830 RS300/100 Host Bridge 5831 RS300/133 Host Bridge 5832 RS300/166 Host Bridge - 5833 Radeon IGP9100 RS300/200 Host Bridge + 5833 ATI Radeon 9000/9100 IGP Chipset - Host-PCI Bridge (RS300M) 5834 Radeon 9100 IGP (RS300) - 5835 Mobility Radeon 9100 IGP (RS300M AGP) - 5838 AGP Bridge (Radeon 9100 IGP) + 5835 Mobilitiy Radeon 9100 IGP AGP (RS300M) + 5838 ATI Radeon 9000/9100 IGP Chipset - AGP Controller (RS300M) 5854 Radeon XPRESS 200 Series Secondary 5874 Radeon XPRESS 200 Series Secondary - 5940 www.ati.comRadeon 9200 Pro - Secondary (RV280) + 5940 Radeon 9200 Pro Secondary (RV280) 5941 ATI Radeon 9200 - Secondary (RV280) 5942 Radeon 9000U Family - Secondary 5944 Radeon 9200SE PCI (RV280) 5950 RS480 Host Bridge 5951 Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge 5952 CrossFire Xpress 3200 (RD580) Chipset Host Bridge - 5954 ATI Radeon Xpress 200 Series - RS480 (na) - 5955 Mobility Radeon XPRESS 200 + 5954 ATI RADEON Xpress Series (RS480) + 5955 ATI RADEON Xpress Series (RS480M) 5956 RD790 GFX Dual Slot 5957 RX790 GFX Single Slot 5958 RD780 GFX Dual Slot @@ -664,10 +676,10 @@ 5961 ATI RADEON 9200 se agp (RV280) 5962 Radeon 9000U Family 5964 Radeon 9200 SE Series (Radeon 9200) - 5965 FireMV 2200 (Nvidia) + 5965 FireMV 2200 (unknown) 5969 ES1000 - 5974 Radeon XPRESS 200 Series - 5975 ATI Radeon X1100 (Radeon Xpress 1100) + 5974 ATI RADEON Xpress Series (RS482) + 5975 ATI RADEON Xpress Series (RS482M) 5978 RD790 PCI to PCI bridge (external gfx0 port A) 5979 RD790 PCI to PCI bridge (external gfx0 port B) 597A RD790 PCI to PCI bridge (PCIe gpp port A) @@ -696,7 +708,7 @@ 5A1E RD890 PCI to PCI bridge (external gfx1 port B) 5A1F RD890 PCI to PCI bridge (NB-SB link) 5A30 RS400/100 Host Bridge - 5A31 RS400/133 Host Bridge + 5A31 Host Bridge (RS400/133) 5A32 RS400/166 Host Bridge 5A33 Northbridge: Radeon Xpress 200 (RC410) 5A34 RS480 PCI-X Root Port @@ -705,211 +717,220 @@ 5A38 RS480 PCI Bridge 5A39 RS480 PCI Bridge 5A3F RS480 PCI Bridge - 5A41 Radeon XPRESS 200 - 5A42 SUBSYS_11821043&REV_004&1CF2FBB4&0&2808 (X200M) + 5A41 ATI RADEON Xpress Series (RS400) + 5A42 ATI RADEON Xpress Series (RS400M) 5A43 Radeon XPRESS 200 Series Secondary - 5A61 Radeon Xpress 200 (RC410) VGA card (Radeon XPress 200 (RC410)) - 5A62 ATI RADEON XPRESS 1100 (RC410M) + 5A61 ATI RADEON Xpress Series (RC410) + 5A62 ATI RADEON Xpress Series (RC410M) 5A63 Radeon XPRESS 200 Series Secondary - 5B60 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] (Radeon X300) + 5B60 ATI RADEON X300/X550/X1050 Series (RV370) 5B61 RV371 - 5B62 RADEON X600 Series 265MB (RV380) - 5B63 ATI Radoen X1050 (Unknown) - 5B64 FireGL V3100 (RV370 5B64) + 5B62 ATI RADEON X600 Series (RV380x) + 5B63 ATI RADEON X300/X550/X1050 Series (RV370) + 5B64 ATI FireGL V3100 (RV370GL) 5B65 FireGL D1100 (RV370 5B65) 5B66 RV370X - 5B70 Radeon X300/X550/X1050 Series - Secondary + 5B70 ATI RADEON X300/X550/X1050 Series Secondary (RV370) 5B71 RV371 Secondary - 5B72 Radeon X600 Series - Secondary - 5B73 Radeon X550 Series - Secondary - 5B74 ATI 128MB PCI Express x16 ATI FireGL V3100 (FireGL V3100) - 5B75 FIREMV 2200 Secondary + 5B72 ATI RADEON X600 Series Secondary (RV380x) + 5B73 ATI RADEON X300/X550/X1050 Series Secondary (RV370) + 5B74 ATI FireGL V3100 Secondary (RV370GL) + 5B75 ATI FireMV 2200 Secondary (RV370) 5B76 RV370X Secondary 5C61 Mobility Radeon 9200 (bk-ati ver008.016m.085.006) 5C63 Mobility Radeon 9200 (RV280 (M9+)) 5D44 Radeon 9200 SE Series - Secondary (RV280) 5D45 ATI FireMV 2200 PCI Secondary (RV280) - 5D48 Mobility Radeon X800 XT - 5D49 Mobility FireGL V5100 - 5D4A PCI-E Graphics adapter from Clevo D900T notebook (Mobility Radeon X800) + 5D48 ATI MOBILITY/ATI RADEON X800 XT (M28) + 5D49 ATI MOBILITY FireGL V5100 (M28GL) + 5D4A ATI MOBILITY /ATI RADEON X800 (M28) 5D4C R480 CONSUMER 4P - 5D4D Radeon XT850 (Radeon XT850) + 5D4D ATI RADEON X850 XT Platinum Edition (R480) 5D4E Radeon X800 GT - 5D4F x800gto 256 pci-e (r480) - 5D50 FIREGL V7200 - 5D52 Radeon X850XT (PCIE) Primary (R480) - 5D57 Radeon X800 XT + 5D4F ATI RADEON X800 GTO (R480) + 5D50 ATI FireGL V7200 (R480GL) + 5D52 ATI RADEON X850 XT (R480) + 5D57 ATI RADEON X800 XT (R423) 5D6C R480 CONSUMER 4P Secondary - 5D6D Radeon X850 Series - Secondary + 5D6D ATI RADEON X850 XT Platinum Edition Secondary (R480) 5D6E Radeon X800 GT Secondary - 5D6F Radeon X850 Pro 256M (01131002) - 5D70 FIREGL V7200 Secondary - 5D72 Radeon X850 Series - Secondary - 5D77 Radeon X800 XT - Secondary - 5E48 FireGL V5000 (RV410) + 5D6F ATI RADEON X800 GTO Secondary (R480) + 5D70 ATI FireGL V7200 Secondary (R480GL) + 5D72 ATI RADEON X850 XT Secondary (R480) + 5D77 ATI RADEON X800 XT Secondary (R423) + 5E48 ATI FireGL V5000 (RV410GL) 5E49 FireGL V3300 (RV410) - 5E4A Radeon X700 Series - 5E4B Radeon X700 Series - 5E4C Radeon X700 Series - 5E4D Radeon X700 Series - 5E4F Radeon X700 SE - 5E68 FIREGL V5000 Secondary - 5E6A Radeon X700 Series - Secondary - 5E6B Radeon X700 Series - Secondary - 5E6C Radeon X700 Series - Secondary - 5E6D Radeon X700 Series - Secondary - 5E6F Radeon X700 SE - Secondary + 5E4A ATI RADEON X700 XT (RV410) + 5E4B ATI RADEON X700 PRO (RV410) + 5E4C ATI RADEON X700 SE (RV410) + 5E4D ATI RADEON X700 (RV410) + 5E4F ATI RADEON X700/X550 Series (RV410) + 5E68 ATI FireGL V5000 Secondary (RV410GL) + 5E6A ATI RADEON X700 XT Secondary (RV410) + 5E6B ATI RADEON X700 PRO Secondary (RV410) + 5E6C ATI RADEON X700 SE Secondary (RV410) + 5E6D ATI RADEON X700 Secondary (RV410) + 5E6F ATI RADEON X700/X550 Series Secondary (RV410) 5F57 Radeon X800XT PCIe (R423) + 6898 ATI Radeon HD 5800 Series (EG CYPRESS XT) + 6899 ATI Radeon HD 5800 Series (EG CYPRESS PRO) + 68A0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68A1 ATI Mobility Radeon HD 5800 Series (EG BROADWAY PRO/LP) + 68B0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68B8 ATI Radeon HD 5700 Series (EG JUNIPER XT) + 68BE ATI Radeon HD 5700 Series (EG JUNIPER LE) 700F PCI to AGP Bridge (A3/U1) 7010 PCI to AGP Bridge (RS200) - 7100 Radeon X1800 Series - 7101 Mobility Radeon X1800 XT - 7102 Radeon Mobility X1800 - 7103 Mobility FireGL V7200 - 7104 ATI FireGL 7200 or 3200 - 7105 R520 [FireGL] - 7106 Mobility FireGL V7100 - 7108 Radeon Mobility X1800 + 7100 ATI RADEON X1800 Series (R520) + 7101 ATI MOBILITY /ATI RADEON X1800 XT (M58) + 7102 ATI MOBILITY /ATI RADEON X1800 (M58) + 7103 ATI MOBILITY FireGL V7200 (M58GL) + 7104 ATI FireGL V7200 (R520GL) + 7105 ATI FireGL V5300 (R520GL) + 7106 ATI MOBILITY FireGL V7100 (M58GL) + 7108 ATI RADEON X1800 Series (R520) 7109 Radeon X1800 Series - Secondary - 710A Radeon X1800 GTO - 710B Radeon X1800 - 710C Radeon X1800 - 710E FIREGL V7300 - 710F ATI FireGL (V7350) - 7120 Radeon X1800 Series Secondary - 7124 FireGL V7200 (R520 GL) - Secondary - 7125 Radeon X1800 Series Secondary - 7128 Radeon X1800 Series Secondary - 7129 Radeon X1800 Series - Secondary - 712A Radeon X1800 GTO - Secondary - 712B Radeon X1800 Series Secondary - 712C Radeon X1800 Series Secondary - 712E FIREGL V7300 Secondary - 712F ATI FireGL (V 7350 Secondary) - 7140 Radeon X1300 Series + 710A ATI RADEON X1800 Series (R520) + 710B ATI RADEON X1800 Series (R520) + 710C ATI RADEON X1800 Series (R520) + 710E ATI FireGL V7300 (R520GL) + 710F ATI FireGL V7350 (R520GL) + 7120 ATI RADEON X1800 Series Secondary (R520) + 7124 ATI FireGL V7200 Secondary (R520GL) + 7125 ATI FireGL V5300 Secondary (R520GL) + 7128 ATI RADEON X1800 Series Secondary (R520) + 7129 ATI RADEON X1800 Series Secondary (R520) + 712A ATI RADEON X1800 Series Secondary (R520) + 712B ATI RADEON X1800 Series Secondary (R520) + 712C ATI RADEON X1800 Series Secondary (R520) + 712E ATI FireGL V7300 Secondary (R520GL) + 712F ATI FireGL V7350 Secondary (R520GL) + 7140 ATI RADEON X1600 Series (RV515) 7141 RV505 - 7142 Radeon X1300 Pro or X1550 (rv515) - 7143 Radeon X1550 Series (RV505) - 7145 PCIVEN_104C&DEV_803B&SUBSYS_FF101179&REV_00 (x1400) - 7146 Radeon X1300 XGE (N/A) - 7147 Radeon X1550 64-bit (RV505) - 7149 ATI Mobility Radeon X1300, M52-64 (216CZJAKA12FAG) - 714A Mobility Radeon X1300 - 714B Mobility Radeon X1300 - 714C Mobility Radeon X1300 - 714D Radeon X1300 (RV515) - 714E Radeon X1300 (RV515) + 7142 ATI RADEON X1300/X1550 Series (RV515) + 7143 ATI RADEON X1550 Series (RV515) + 7145 ATI MOBILITY /ATI RADEON X1400 (M54) + 7146 ATI RADEON X1300 / X1550 Series (RV515) + 7147 ATI RADEON X1550 64-bit (RV515) + 7149 ATI MOBILITY /ATI RADEON X1300 (M52) + 714A ATI MOBILITY /ATI RADEON X1300 (M52) + 714B ATI MOBILITY /ATI RADEON X1300 (M52) + 714C ATI MOBILITY /ATI RADEON X1300 (M52) + 714D ATI RADEON X1300 Series (RV515) + 714E ATI RADEON X1300 Series (RV515PCI) 714F RV505 7151 RV505 - 7152 HP Fire GL v3300 (Fire GL v3300) - 7153 FireGL V3350 (RV515GL) - 715E Radeon X1300 Series - 715F Radeon X1300 Series - 7160 Radeon X1300 Series - Secondary + 7152 ATI FireGL V3300 (RV515GL) + 7153 ATI FireGL V3350 (RV515GL) + 715E ATI RADEON X1300 Series (RV515) + 715F ATI RADEON X1550 64-bit (RV515) + 7160 ATI RADEON X1600 Series Secondary (RV515) 7161 RV505 Secondary - 7162 Radeon X1300 Series - Secondary - 7163 Radeon X1300 PRO Secondary - 7166 Radeon X1300 Series - Secondary - 7167 Radeon X1300 Series Secondary + 7162 ATI RADEON X1300/X1550 Series Secondary (RV515) + 7163 ATI RADEON X1550 Series Secondary (RV515) + 7166 ATI RADEON X1300 / X1550 Series Secondary (RV515) + 7167 ATI RADEON X1550 64-bit Secondary (RV515) 7169 M52 Secondary - 716D Radeon X1300 Series Secondary - 716E Radeon X1300 Series Secondary + 716D ATI RADEON X1300 Series Secondary (RV515) + 716E ATI RADEON X1300 Series Secondary (RV515PCI) 716F RV505 Secondary 7171 RV505 Secondary - 7172 FireGL V3300 (RV515GL) Secondary - 7173 FireGL V3350 (RV515GL) Secondary - 717E Radeon X1300 Series Secondary - 717F Radeon X1300 Series Secondary - 7180 Radeon X1300 Series - 7181 Radeon X1600 Series (RV516XT) - 7183 Radeon X1300/X1550 Series (RV505) - 7186 PCIVEN_1002&DEV_7186&SUBSYS_12311043&REV_004&2D404BB6&0&0008 (Mobility Radeon X1450) - 7187 Radeon 1300 (Radeon 1300) - 7188 ATI Mobility Radeon X2300 (Mobility X2300) - 718A Mobility Radeon X2300 Series - 718B Mobility Radeon X1350 - 718C Mobility Radeon X1350 - 718D Mobility Radeon X1450 - 718F Radeon X1300 Series - 7193 Radeon X1550 Series - 7196 Mobility Radeon X1350 - 719B FireMV 2250 - 719F Radeon X1550 Series - 71A0 Radeon X1300 Series Secondary - 71A1 Radeon X1600 Series (RV516XT) Secondary - 71A3 Radeon X1300 Series Secondary - 71A7 Radeon 1300 Secondary (Radeon 1300) - 71B3 Radeon X1550 Series Secondary - 71BB FireMV 2250 Secondary - 71C0 Radeon X1600 Series - 71C1 Radeon X1650 Pro (RV535) - 71C2 ATI X1600 Pro PCI-E (ATI X1600 Pro PCI-E) - 71C3 Radeon X1600 Series - 71C4 Mobility FIREGL V5200 - 71C5 Radeon X1600 Mobility (RV530?) - 71C6 Radeon X1650 Series (RV530 LE) - 71C7 RADEON X1650 SERIES - 71CD Radeon X1600 Series - 71CE Radeon X1600 PRO / X1300XT (RV530 VE) - 71D2 FireGL V3400 (RV530GL) - 71D4 Mobility FireGL V5250 (M56GL) - 71D5 Mobility Radeon X1700 (M66-P) - 71D6 Mobility Radeon X1700 (M66-XT) - 71DA FIREGL V5200 - 71DE Ati Radeon X2500 (Uknown) - 71E0 Radeon X1600 Series Secondary - 71E1 Radeon X1650 Series Secondary - 71E2 Radeon X1600 Series Secondary - 71E3 Radeon X1600 Series Secondary + 7172 ATI FireGL V3300 Secondary (RV515GL) + 7173 ATI FireGL V3350 Secondary (RV515GL) + 717E ATI RADEON X1300 Series Secondary (RV515) + 717F ATI RADEON X1550 64-bit Secondary (RV515) + 7180 ATI RADEON X1300/X1550 Series (RV515) + 7181 ATI RADEON X1600 Series (RV515) + 7183 ATI RADEON X1300/X1550 Series (RV515) + 7186 ATI MOBILITY /ATI RADEON X1450 (M54) + 7187 ATI RADEON X1300/X1550 Series (RV515) + 7188 ATI MOBILITY /ATI RADEON X2300 (M54) + 718A ATI MOBILITY /ATI RADEON X2300 (M54) + 718B ATI MOBILITY /ATI RADEON X1350 (M52) + 718C ATI MOBILITY /ATI RADEON X1350 (M52) + 718D ATI MOBILITY /ATI RADEON X1450 (M54) + 718F ATI RADEON X1300 Series (RV515PCI) + 7193 ATI RADEON X1550 Series (RV515) + 7196 ATI MOBILITY /ATI RADEON X1350 (M52) + 719B ATI FireMV 2250 (RV515) + 719F ATI RADEON X1550 64-bit (RV515) + 71A0 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A1 ATI RADEON X1600 Series Secondary (RV515) + 71A3 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A7 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71AF ATI RADEON X1300 Series Secondary (RV515PCI) + 71B3 ATI RADEON X1550 Series Secondary (RV515) + 71BB ATI FireMV 2250 Secondary (RV515) + 71C0 ATI RADEON X1600 Series (RV530) + 71C1 ATI RADEON X1650 Series (RV535) + 71C2 ATI RADEON X1600 Series (RV530) + 71C3 ATI RADEON X1300 Series (RV535) + 71C4 ATI MOBILITY FireGL V5200 (M56GL) + 71C5 ATI MOBILITY /ATI RADEON X1600 (M56) + 71C6 ATI RADEON X1650 Series (RV530) + 71C7 ATI RADEON X1650 Series (RV535) + 71CD ATI RADEON X1600 Series (RV530) + 71CE ATI RADEON X1600 Pro / ATI RADEON X1300 XT (RV530) + 71D2 ATI FireGL V3400 (RV530GL) + 71D4 ATI MOBILITY FireGL V5250 (M56GL) + 71D5 ATI MOBILITY /ATI RADEON X1700 (M56) + 71D6 ATI MOBILITY /ATI RADEON X1700 XT (M56) + 71DA ATI FireGL V5200 (RV530GL) + 71DE ATI MOBILITY /ATI RADEON X1700 (M56) + 71E0 ATI RADEON X1600 Series Secondary (RV530) + 71E1 ATI RADEON X1650 Series Secondary (RV535) + 71E2 ATI RADEON X1600 Series Secondary (RV530) + 71E3 ATI RADEON X1300 Series Secondary (RV535) 71E5 M56 Secondary - 71E6 Radeon X1650 Series Secondary (RV530 LE) - 71E7 RADEON X1650 SERIES SECONDARY - 71ED Radeon X1600 Series Secondary - 71EE Radeon X1600 PRO / X1300XT Secondary (RV530 VE) + 71E6 ATI RADEON X1600 Series Secondary (RV530) + 71E7 ATI RADEON X1650 Series Secondary (RV535) + 71ED ATI RADEON X1600 Series Secondary (RV530) + 71EE ATI RADEON X1600 Pro / ATI RADEON X1300 XT Secondary (RV530) 71F2 ATI FireGL V3400 Secondary (RV530GL) - 71FA FIREGL V5200 Secondary + 71FA ATI FireGL V5200 Secondary (RV530GL) 71FE RV530 SE Secondary 7205 S3G Unichrome IGP KM400/KN400 (1106) - 7210 Mobility Radeon X2100 - 7211 Mobility Radeon X2100 Secondary - 7240 Radeon X1900 (R580) + 7210 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7211 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7240 ATI RADEON X1950 Series (R580) 7241 Radeon X1900 (R580) 7242 Radeon X1900 (R580) - 7243 Radeon X1900 (R580) - 7244 Radeon X1950XT Series - 7245 Radeon X1900 (R580) - 7246 Radeon X1900 (R580) - 7247 Radeon X1900 (R580) - 7248 Radeon X1900 (R580) - 7249 Radeon X1900 Series - 724A Radeon X1900 (R580) - 724B R580LE (180636911721) - 724C Radeon X1900 (R580) - 724D Radeon X1900 (R580) + 7243 ATI RADEON X1900 Series (R580) + 7244 ATI RADEON X1950 Series (R580) + 7245 ATI RADEON X1900 Series (R580) + 7246 ATI RADEON X1900 Series (R580) + 7247 ATI RADEON X1900 Series (R580) + 7248 ATI RADEON X1900 Series (R580) + 7249 ATI RADEON X1900 Series (R580) + 724A ATI RADEON X1900 Series (R580) + 724B ATI RADEON X1900 Series (R580) + 724C ATI RADEON X1900 Series (R580) + 724D ATI RADEON X1900 Series (R580) 724E FireGL V7300/V7350 PCIe (R580) - 724F Radeon X1900 Series - 7260 Radeon X1950 Series Secondary - 7263 Radeon X1900 Series Secondary - 7264 Radeon X1950XT Series Secondary - 7265 Radeon X1900 Series Secondary - 7266 Radeon X1900 Series Secondary - 7267 Radeon X1900 Series Secondary - 7268 Radeon X1950 Series Secondary - 7269 Radeon X1900 Series Secondary - 726A Radeon X1900 Series Secondary - 726B Radeon X1900 Secondary - 726C Radeon X1900 Series Secondary - 726D Radeon X1900 Series Secondary + 724F ATI RADEON X1900 Series (R580) + 7260 ATI RADEON X1950 Series Secondary (R580) + 7263 ATI RADEON X1900 Series Secondary (R580) + 7264 ATI RADEON X1950 Series Secondary (R580) + 7265 ATI RADEON X1900 Series Secondary (R580) + 7266 ATI RADEON X1900 Series Secondary (R580) + 7267 ATI RADEON X1900 Series Secondary (R580) + 7268 ATI RADEON X1900 Series Secondary (R580) + 7269 ATI RADEON X1900 Series Secondary (R580) + 726A ATI RADEON X1900 Series Secondary (R580) + 726B ATI RADEON X1900 Series Secondary (R580) + 726C ATI RADEON X1900 Series Secondary (R580) + 726D ATI RADEON X1900 Series Secondary (R580) 726E FireGL V7300/V7350 PCIe (R580) - Secondary - 726F Radeon X1900 Series Secondary - 7280 Radeon X1950 Pro Series AGP (0x7280) (Radeon X1950 Pro) - 7288 Radeon X1950 GT - 7291 Radeon X1650 XT (PCIe) - 7293 Radeon X1650 Series - 72A0 Radeon X1950 Pro Series AGP (0x72A0) (Radeon X1950 Pro Secondary) - 72A8 Radeon X1950 GT (Secondary) - 72B1 Radeon X1650 XT (Secondary) (PCIe) - 72B3 Radeon X1650 Series (Secondary) + 726F ATI RADEON X1900 Series Secondary (R580) + 7280 ATI RADEON X1950 Series (R580) + 7284 ATI MOBILITY /ATI RADEON X1900 (M58) + 7288 ATI RADEON X1950 GT (R580) + 7291 ATI RADEON X1650 Series (R580) + 7293 ATI RADEON X1650 Series (R580) + 72A0 ATI RADEON X1950 Series Secondary (R580) + 72A8 ATI RADEON X1950 GT Secondary (R580) + 72B1 ATI RADEON X1650 Series Secondary (R580) + 72B3 ATI RADEON X1650 Series Secondary (R580) 7800 ? 7830 RS350/100 Host Bridge 7831 RS350/133 Host Bridge @@ -923,60 +944,136 @@ 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) 7917 RS690 PCI to PCI Bridge (PCI Express Port 3) 7919 Radeon X1200 Series Audio Controller - 791E ATI xpress 1250 (303017AA) - 791F ATI Mobility Radeon x1250 (RS690) + 791A HDMI Audio (791A) + 791E ATI RADEON X1200 Series (RS690) + 791F ATI Mobility Radeon x1100 (RS690M) 7930 RS600(M) Chipset - Host Bridge 7933 RS600(M) Chipset - PCI Express Graphics Port 0 7935 RS600(M) Chipset - PCI Express Port 1 7937 ATI Technoligies Inc (Samsung R25P) - 793F Radeon X1200 Series (Secondary) - 7941 Radeon XPRESS 1300 - 7942 ATI XPress 1250M (1002) - 796E ATI RADEON 2100 (RS740) + 793F ATI RADEON Xpress 1200 Series (RS600) + 7941 ATI RADEON Xpress 1200 Series (RS600) + 7942 ATI RADEON Xpress 1200 Series (RS600M) + 796E ATI RADEON 2100 (RS690) 7C37 Radeon 9600 SE (RV350 AQ) 9400 ATI Radeon HD 2900 XT (R600) - 9401 Radeon HD 2900 XT - 9402 Radeon HD 2900 XT - 9403 Radeon HD 2900 PRO - 9405 Radeon HD 2900 GT - 940A FireGL V8650 - 940B FireGL V8600 - 940F FireGL V7600 - 9440 Graphics adapter (Radeon 4870) - 94C1 ATI Radeon HD 2400 PRO (REV_00) - 94C3 ATI Radeon HD 2400 PRO (RV610) - 94C4 ATI Radeon HD 3470 PRO AGP (RV610) - 94C5 RADEON HD 2400 LE - 94C7 RADEON HD 2350 - 94C8 Mobility Radeon HD 2400 XT - 94C9 Mobility Radeon HD 2400 - 94CB Radeon E2400 - 94CC ATI Radeon HD 2400 Series (ATI Radeon HD 4670 Series) - 9501 ATI Radeon HD 3870 (RV670) - 9505 Radeon HD 3850 - 9515 ATI Radeon HD3850 AGP - 9581 ATI Mobility Radeon HD2600 (600458) - 9583 Mobility Radeon HD 2600 XT - 9586 Radeon HD 2600 XT AGP - 9587 Radeon hd 2600 pro (agp) ( Radeon hd 2600 pro (agp)) - 9588 ATI Radeon HD 2600 XT (RV530) - 9589 ATI Radeon HD 2600 PRO (RV630) + 9401 ATI RADEON HD 2900 XT (R600) + 9402 ATI RADEON HD 2900 XT (R600) + 9403 ATI RADEON HD 2900 PRO (R600) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 3 20:31:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 366E61065676; Mon, 3 May 2010 20:31:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 24E1C8FC1D; Mon, 3 May 2010 20:31: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 o43KVECC085474; Mon, 3 May 2010 20:31:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43KVD43085468; Mon, 3 May 2010 20:31:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005032031.o43KVD43085468@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 20:31: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: r207584 - in head/sys: dev/md fs/nfsclient fs/nwfs fs/smbfs 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, 03 May 2010 20:31:14 -0000 Author: kib Date: Mon May 3 20:31:13 2010 New Revision: 207584 URL: http://svn.freebsd.org/changeset/base/207584 Log: Lock the page around vm_page_activate() and vm_page_deactivate() calls where it was missed. The wrapped fragments now protect wire_count with page lock. Reviewed by: alc Modified: head/sys/dev/md/md.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/nfsclient/nfs_bio.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Mon May 3 19:56:52 2010 (r207583) +++ head/sys/dev/md/md.c Mon May 3 20:31:13 2010 (r207584) @@ -665,11 +665,13 @@ mdstart_swap(struct md_s *sc, struct bio sf_buf_free(sf); sched_unpin(); vm_page_wakeup(m); + vm_page_lock(m); vm_page_lock_queues(); vm_page_activate(m); if (bp->bio_cmd == BIO_WRITE) vm_page_dirty(m); vm_page_unlock_queues(); + vm_page_unlock(m); /* Actions on further pages start at offset 0 */ p += PAGE_SIZE - offs; Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Mon May 3 19:56:52 2010 (r207583) +++ head/sys/fs/nfsclient/nfs_clbio.c Mon May 3 20:31:13 2010 (r207584) @@ -192,12 +192,14 @@ ncl_getpages(struct vop_getpages_args *a size = count - uio.uio_resid; VM_OBJECT_LOCK(object); - vm_page_lock_queues(); for (i = 0, toff = 0; i < npages; i++, toff = nextoff) { vm_page_t m; nextoff = toff + PAGE_SIZE; m = pages[i]; + vm_page_lock(m); + vm_page_lock_queues(); + if (nextoff <= size) { /* * Read operation filled an entire page @@ -244,8 +246,10 @@ ncl_getpages(struct vop_getpages_args *a vm_page_free(m); } } + + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return (0); } Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Mon May 3 19:56:52 2010 (r207583) +++ head/sys/fs/nwfs/nwfs_io.c Mon May 3 20:31:13 2010 (r207584) @@ -449,12 +449,14 @@ nwfs_getpages(ap) size = count - uio.uio_resid; - vm_page_lock_queues(); for (i = 0, toff = 0; i < npages; i++, toff = nextoff) { vm_page_t m; nextoff = toff + PAGE_SIZE; m = pages[i]; + vm_page_lock(m); + vm_page_lock_queues(); + if (nextoff <= size) { m->valid = VM_PAGE_BITS_ALL; KASSERT(m->dirty == 0, @@ -489,8 +491,10 @@ nwfs_getpages(ap) vm_page_free(m); } } + + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return 0; #endif /* NWFS_RWCACHE */ Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Mon May 3 19:56:52 2010 (r207583) +++ head/sys/fs/smbfs/smbfs_io.c Mon May 3 20:31:13 2010 (r207584) @@ -500,12 +500,14 @@ smbfs_getpages(ap) size = count - uio.uio_resid; - vm_page_lock_queues(); for (i = 0, toff = 0; i < npages; i++, toff = nextoff) { vm_page_t m; nextoff = toff + PAGE_SIZE; m = pages[i]; + vm_page_lock(m); + vm_page_lock_queues(); + if (nextoff <= size) { /* * Read operation filled an entire page @@ -553,8 +555,10 @@ smbfs_getpages(ap) vm_page_free(m); } } + + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return 0; #endif /* SMBFS_RWGENERIC */ Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Mon May 3 19:56:52 2010 (r207583) +++ head/sys/nfsclient/nfs_bio.c Mon May 3 20:31:13 2010 (r207584) @@ -189,12 +189,14 @@ nfs_getpages(struct vop_getpages_args *a size = count - uio.uio_resid; VM_OBJECT_LOCK(object); - vm_page_lock_queues(); for (i = 0, toff = 0; i < npages; i++, toff = nextoff) { vm_page_t m; nextoff = toff + PAGE_SIZE; m = pages[i]; + vm_page_lock(m); + vm_page_lock_queues(); + if (nextoff <= size) { /* * Read operation filled an entire page @@ -241,8 +243,10 @@ nfs_getpages(struct vop_getpages_args *a vm_page_free(m); } } + + vm_page_unlock_queues(); + vm_page_unlock(m); } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon May 3 20:57:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D77FB106566C; Mon, 3 May 2010 20:57:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C5B518FC12; Mon, 3 May 2010 20:57: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 o43KvGYg091476; Mon, 3 May 2010 20:57:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43KvGaF091473; Mon, 3 May 2010 20:57:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005032057.o43KvGaF091473@svn.freebsd.org> From: Marius Strobl Date: Mon, 3 May 2010 20:57: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: r207585 - head/sys/dev/cas 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, 03 May 2010 20:57:17 -0000 Author: marius Date: Mon May 3 20:57:16 2010 New Revision: 207585 URL: http://svn.freebsd.org/changeset/base/207585 Log: - Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES on Cassini using the external PCS SERDES otherwise unaligned access traps and other strange effects happen with some machines. Don't touch the MIF which is unused in that case either. These changes require the PHY type to use to be determined via the OFW device tree or from the VPD in machines without the former. - Disable the SERDES pins of Saturn when not used in order to save power and ensure they are enabled otherwise. - In cas_attach() use the correct register offset for CAS_PCS_CONF_EN. - Add some bus space barriers missing in the PCS code path. These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as the on-board interfaces found in Sun Fire B100s Blade Server work. PR: 144867 Modified: head/sys/dev/cas/if_cas.c head/sys/dev/cas/if_casreg.h Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Mon May 3 20:31:13 2010 (r207584) +++ head/sys/dev/cas/if_cas.c Mon May 3 20:57:16 2010 (r207585) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__powerpc__) || defined(__sparc64__) +#include #include #include #endif @@ -321,55 +322,82 @@ cas_attach(struct cas_softc *sc) } } - CAS_WRITE_4(sc, CAS_PCS_DATAPATH, CAS_PCS_DATAPATH_MII); - - cas_mifinit(sc); - - /* - * Look for an external PHY. - */ - error = ENXIO; - v = CAS_READ_4(sc, CAS_MIF_CONF); - if ((v & CAS_MIF_CONF_MDI1) != 0) { - v |= CAS_MIF_CONF_PHY_SELECT; - CAS_WRITE_4(sc, CAS_MIF_CONF, v); - switch (sc->sc_variant) { - default: - sc->sc_phyad = -1; - break; + if ((sc->sc_flags & CAS_SERDES) == 0) { + CAS_WRITE_4(sc, CAS_PCS_DATAPATH, CAS_PCS_DATAPATH_MII); + CAS_BARRIER(sc, CAS_PCS_DATAPATH, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + cas_mifinit(sc); + /* + * Look for an external PHY. + */ + error = ENXIO; + v = CAS_READ_4(sc, CAS_MIF_CONF); + if ((v & CAS_MIF_CONF_MDI1) != 0) { + v |= CAS_MIF_CONF_PHY_SELECT; + CAS_WRITE_4(sc, CAS_MIF_CONF, v); + CAS_BARRIER(sc, CAS_MIF_CONF, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + /* Enable/unfreeze the GMII pins of Saturn. */ + if (sc->sc_variant == CAS_SATURN) { + CAS_WRITE_4(sc, CAS_SATURN_PCFG, 0); + CAS_BARRIER(sc, CAS_SATURN_PCFG, 4, + BUS_SPACE_BARRIER_READ | + BUS_SPACE_BARRIER_WRITE); + } + switch (sc->sc_variant) { + default: + sc->sc_phyad = -1; + break; + } + error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, + cas_mediachange, cas_mediastatus); } - error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, - cas_mediachange, cas_mediastatus); - } - - /* - * Fall back on an internal PHY if no external PHY was found. - */ - if (error != 0 && (v & CAS_MIF_CONF_MDI0) != 0) { - v &= ~CAS_MIF_CONF_PHY_SELECT; - CAS_WRITE_4(sc, CAS_MIF_CONF, v); - switch (sc->sc_variant) { - default: - sc->sc_phyad = -1; - break; + /* + * Fall back on an internal PHY if no external PHY was found. + */ + if (error != 0 && (v & CAS_MIF_CONF_MDI0) != 0) { + v &= ~CAS_MIF_CONF_PHY_SELECT; + CAS_WRITE_4(sc, CAS_MIF_CONF, v); + CAS_BARRIER(sc, CAS_MIF_CONF, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + /* Freeze the GMII pins of Saturn for saving power. */ + if (sc->sc_variant == CAS_SATURN) { + CAS_WRITE_4(sc, CAS_SATURN_PCFG, + CAS_SATURN_PCFG_FSI); + CAS_BARRIER(sc, CAS_SATURN_PCFG, 4, + BUS_SPACE_BARRIER_READ | + BUS_SPACE_BARRIER_WRITE); + } + switch (sc->sc_variant) { + default: + sc->sc_phyad = -1; + break; + } + error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, + cas_mediachange, cas_mediastatus); } - error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, - cas_mediachange, cas_mediastatus); - } - - /* - * Try the external PCS SERDES if we didn't find any PHYs. - */ - if (error != 0) { + } else { + /* + * Use the external PCS SERDES. + */ CAS_WRITE_4(sc, CAS_PCS_DATAPATH, CAS_PCS_DATAPATH_SERDES); + CAS_BARRIER(sc, CAS_PCS_DATAPATH, 4, BUS_SPACE_BARRIER_WRITE); + /* Enable/unfreeze the SERDES pins of Saturn. */ + if (sc->sc_variant == CAS_SATURN) { + CAS_WRITE_4(sc, CAS_SATURN_PCFG, 0); + CAS_BARRIER(sc, CAS_SATURN_PCFG, 4, + BUS_SPACE_BARRIER_WRITE); + } CAS_WRITE_4(sc, CAS_PCS_SERDES_CTRL, CAS_PCS_SERDES_CTRL_ESD); - CAS_WRITE_4(sc, CAS_PCS_CONF_EN, CAS_PCS_CONF_EN); - sc->sc_flags |= CAS_SERDES; + CAS_BARRIER(sc, CAS_PCS_SERDES_CTRL, 4, + BUS_SPACE_BARRIER_WRITE); + CAS_WRITE_4(sc, CAS_PCS_CONF, CAS_PCS_CONF_EN); + CAS_BARRIER(sc, CAS_PCS_CONF, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); sc->sc_phyad = CAS_PHYAD_EXTERNAL; error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, cas_mediachange, cas_mediastatus); } - if (error != 0) { device_printf(sc->sc_dev, "PHY probe failed: %d\n", error); goto fail_rxmap; @@ -956,8 +984,9 @@ cas_init_locked(struct cas_softc *sc) __func__); #endif - /* Re-initialize the MIF. */ - cas_mifinit(sc); + if ((sc->sc_flags & CAS_SERDES) == 0) + /* Re-initialize the MIF. */ + cas_mifinit(sc); /* step 3. Setup data structures in host memory. */ cas_meminit(sc); @@ -2105,6 +2134,8 @@ cas_mifinit(struct cas_softc *sc) /* Configure the MIF in frame mode. */ CAS_WRITE_4(sc, CAS_MIF_CONF, CAS_READ_4(sc, CAS_MIF_CONF) & ~CAS_MIF_CONF_BB_MODE); + CAS_BARRIER(sc, CAS_MIF_CONF, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } /* @@ -2219,10 +2250,16 @@ cas_mii_writereg(device_t dev, int phy, CAS_BARRIER(sc, CAS_PCS_CONF, 4, BUS_SPACE_BARRIER_WRITE); CAS_WRITE_4(sc, CAS_PCS_ANAR, val); + CAS_BARRIER(sc, CAS_PCS_ANAR, 4, + BUS_SPACE_BARRIER_WRITE); CAS_WRITE_4(sc, CAS_PCS_SERDES_CTRL, CAS_PCS_SERDES_CTRL_ESD); + CAS_BARRIER(sc, CAS_PCS_CONF, 4, + BUS_SPACE_BARRIER_WRITE); CAS_WRITE_4(sc, CAS_PCS_CONF, CAS_PCS_CONF_EN); + CAS_BARRIER(sc, CAS_PCS_CONF, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); return (0); case MII_ANLPAR: reg = CAS_PCS_ANLPAR; @@ -2233,6 +2270,8 @@ cas_mii_writereg(device_t dev, int phy, return (0); } CAS_WRITE_4(sc, reg, val); + CAS_BARRIER(sc, reg, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); return (0); } @@ -2630,15 +2669,20 @@ static struct resource_spec cas_pci_res_ { -1, 0 } }; +#define CAS_LOCAL_MAC_ADDRESS "local-mac-address" +#define CAS_PHY_INTERFACE "phy-interface" +#define CAS_PHY_TYPE "phy-type" +#define CAS_PHY_TYPE_PCS "pcs" + static int cas_pci_attach(device_t dev) { + char buf[sizeof(CAS_LOCAL_MAC_ADDRESS)]; struct cas_softc *sc; int i; #if !(defined(__powerpc__) || defined(__sparc64__)) u_char enaddr[4][ETHER_ADDR_LEN]; - char lma[sizeof("local-mac-address")]; - int found, j; + u_int j, k, lma, pcs[4], phy; #endif sc = device_get_softc(dev); @@ -2679,13 +2723,20 @@ cas_pci_attach(device_t dev) #if defined(__powerpc__) || defined(__sparc64__) OF_getetheraddr(dev, sc->sc_enaddr); + if (OF_getprop(ofw_bus_get_node(dev), CAS_PHY_INTERFACE, buf, + sizeof(buf)) > 0 || OF_getprop(ofw_bus_get_node(dev), + CAS_PHY_TYPE, buf, sizeof(buf)) > 0) { + buf[sizeof(buf) - 1] = '\0'; + if (strcmp(buf, CAS_PHY_TYPE_PCS) == 0) + sc->sc_flags |= CAS_SERDES; + } #else /* - * Dig out VPD (vital product data) and read the MAX address. - * The VPD resides in the PCI Expansion ROM (PCI FCode) and - * can't be accessed via the PCI capability pointer. - * SUNW,pci-ce and SUNW,pci-qge use the Enhanced VPD format - * described in US Patent 7149820. + * Dig out VPD (vital product data) and read the MAC address as well + * as the PHY type. The VPD resides in the PCI Expansion ROM (PCI + * FCode) and can't be accessed via the PCI capability pointer. + * SUNW,pci-ce and SUNW,pci-qge use the Enhanced VPD format described + * in the free US Patent 7149820. */ #define PCI_ROMHDR_SIZE 0x1c @@ -2719,7 +2770,10 @@ cas_pci_attach(device_t dev) #define CAS_ROM_READ_4(sc, offs) \ CAS_READ_4((sc), CAS_PCI_ROM_OFFSET + (offs)) - found = 0; + lma = phy = 0; + memset(enaddr, 0, sizeof(enaddr)); + memset(pcs, 0, sizeof(pcs)); + /* Enable PCI Expansion ROM access. */ CAS_WRITE_4(sc, CAS_BIM_LDEV_OEN, CAS_BIM_LDEV_OEN_PAD | CAS_BIM_LDEV_OEN_PROM); @@ -2768,23 +2822,51 @@ cas_pci_attach(device_t dev) if (CAS_ROM_READ_1(sc, j + PCI_VPD_SIZE) != 'I') /* no instance property */ continue; - if (CAS_ROM_READ_1(sc, j + PCI_VPD_SIZE + 3) != 'B') - /* no byte array */ - continue; - if (CAS_ROM_READ_1(sc, j + PCI_VPD_SIZE + 4) != - ETHER_ADDR_LEN) - continue; - bus_read_region_1(sc->sc_res[CAS_RES_MEM], - CAS_PCI_ROM_OFFSET + j + PCI_VPD_SIZE + 5, - lma, sizeof(lma)); - if (strcmp(lma, "local-mac-address") != 0) - continue; - bus_read_region_1(sc->sc_res[CAS_RES_MEM], - CAS_PCI_ROM_OFFSET + j + PCI_VPD_SIZE + 5 + - sizeof(lma), enaddr[found], - sizeof(enaddr[found])); - if (found++ == 4) - break; + if (CAS_ROM_READ_1(sc, j + PCI_VPD_SIZE + 3) == 'B') { + /* byte array */ + if (CAS_ROM_READ_1(sc, + j + PCI_VPD_SIZE + 4) != ETHER_ADDR_LEN) + continue; + bus_read_region_1(sc->sc_res[CAS_RES_MEM], + CAS_PCI_ROM_OFFSET + j + PCI_VPD_SIZE + 5, + buf, sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + if (strcmp(buf, CAS_LOCAL_MAC_ADDRESS) != 0) + continue; + bus_read_region_1(sc->sc_res[CAS_RES_MEM], + CAS_PCI_ROM_OFFSET + j + PCI_VPD_SIZE + + 5 + sizeof(CAS_LOCAL_MAC_ADDRESS), + enaddr[lma], sizeof(enaddr[lma])); + lma++; + if (lma == 4 && phy == 4) + break; + } else if (CAS_ROM_READ_1(sc, j + PCI_VPD_SIZE + 3) == + 'S') { + /* string */ + if (CAS_ROM_READ_1(sc, + j + PCI_VPD_SIZE + 4) != + sizeof(CAS_PHY_TYPE_PCS)) + continue; + bus_read_region_1(sc->sc_res[CAS_RES_MEM], + CAS_PCI_ROM_OFFSET + j + PCI_VPD_SIZE + 5, + buf, sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + if (strcmp(buf, CAS_PHY_INTERFACE) == 0) + k = sizeof(CAS_PHY_INTERFACE); + else if (strcmp(buf, CAS_PHY_TYPE) == 0) + k = sizeof(CAS_PHY_TYPE); + else + continue; + bus_read_region_1(sc->sc_res[CAS_RES_MEM], + CAS_PCI_ROM_OFFSET + j + PCI_VPD_SIZE + + 5 + k, buf, sizeof(buf)); + buf[sizeof(buf) - 1] = '\0'; + if (strcmp(buf, CAS_PHY_TYPE_PCS) == 0) + pcs[phy] = 1; + phy++; + if (lma == 4 && phy == 4) + break; + } } break; default: @@ -2795,14 +2877,24 @@ cas_pci_attach(device_t dev) fail_prom: CAS_WRITE_4(sc, CAS_BIM_LDEV_OEN, 0); - if (found == 0) { + if (lma == 0) { device_printf(dev, "could not determine Ethernet address\n"); goto fail; } i = 0; - if (found > 1 && pci_get_slot(dev) < sizeof(enaddr) / sizeof(*enaddr)) + if (lma > 1 && pci_get_slot(dev) < sizeof(enaddr) / sizeof(*enaddr)) i = pci_get_slot(dev); memcpy(sc->sc_enaddr, enaddr[i], ETHER_ADDR_LEN); + + if (phy == 0) { + device_printf(dev, "could not determine PHY type\n"); + goto fail; + } + i = 0; + if (phy > 1 && pci_get_slot(dev) < sizeof(pcs) / sizeof(*pcs)) + i = pci_get_slot(dev); + if (pcs[i] != 0) + sc->sc_flags |= CAS_SERDES; #endif if (cas_attach(sc) != 0) { Modified: head/sys/dev/cas/if_casreg.h ============================================================================== --- head/sys/dev/cas/if_casreg.h Mon May 3 20:31:13 2010 (r207584) +++ head/sys/dev/cas/if_casreg.h Mon May 3 20:57:16 2010 (r207585) @@ -68,6 +68,7 @@ #define CAS_STATUS4 0x105c /* interrupt status 4 for INTD */ #define CAS_CLEAR_ALIAS4 0x1060 /* clear mask alias 4 for INTD */ #define CAS_STATUS_ALIAS4 0x1064 /* interrupt status alias 4 for INTD */ +#define CAS_SATURN_PCFG 0x106c /* internal MACPHY pin configuration */ #define CAS_CAW_RX_WGHT_MASK 0x00000003 /* RX DMA factor for... */ #define CAS_CAW_RX_WGHT_SHFT 0 /* ...weighted round robin */ @@ -171,6 +172,17 @@ /* INTn enable bit for CAS_INTMASK[2-4] */ #define CAS_INTMASKN_EN 0x00000080 /* INT[B-D] enable */ +#define CAS_SATURN_PCFG_TLA 0x00000001 /* PHY activity LED */ +#define CAS_SATURN_PCFG_FLA 0x00000002 /* PHY 10MBit/sec LED */ +#define CAS_SATURN_PCFG_CLA 0x00000004 /* PHY 100MBit/sec LED */ +#define CAS_SATURN_PCFG_LLA 0x00000008 /* PHY 1000MBit/sec LED */ +#define CAS_SATURN_PCFG_RLA 0x00000010 /* PHY full-duplex LED */ +#define CAS_SATURN_PCFG_PDS 0x00000020 /* PHY debug mode */ +#define CAS_SATURN_PCFG_MTP 0x00000080 /* test point select */ +#define CAS_SATURN_PCFG_GMO 0x00000100 /* GMII observe */ +#define CAS_SATURN_PCFG_FSI 0x00000200 /* freeze GMII/SERDES */ +#define CAS_SATURN_PCFG_LAD 0x00000800 /* MAC LED control active low */ + /* TX DMA registers */ #define CAS_TX_CONF 0x2004 /* TX configuration */ #define CAS_TX_FIFO_WR 0x2014 /* FIFO write pointer */ From owner-svn-src-all@FreeBSD.ORG Mon May 3 20:59:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A047A1065670; Mon, 3 May 2010 20:59:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8658FC18; Mon, 3 May 2010 20:59: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 o43KxRlI092007; Mon, 3 May 2010 20:59:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43KxRma092005; Mon, 3 May 2010 20:59:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005032059.o43KxRma092005@svn.freebsd.org> From: Marius Strobl Date: Mon, 3 May 2010 20:59: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: r207586 - head/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: Mon, 03 May 2010 20:59:27 -0000 Author: marius Date: Mon May 3 20:59:27 2010 New Revision: 207586 URL: http://svn.freebsd.org/changeset/base/207586 Log: Sun GigaSwift Ethernet 1.0 MMF work with r207585 in place. Modified: head/share/man/man4/cas.4 Modified: head/share/man/man4/cas.4 ============================================================================== --- head/share/man/man4/cas.4 Mon May 3 20:57:16 2010 (r207585) +++ head/share/man/man4/cas.4 Mon May 3 20:59:27 2010 (r207586) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2009 +.Dd May 3, 2010 .Dt CAS 4 .Os .Sh NAME @@ -91,6 +91,9 @@ driver at this time: .Pp .Bl -bullet -compact .It +Sun GigaSwift Ethernet 1.0 MMF (Cassini Kuheen) +(part no.\& 501-5524) +.It Sun GigaSwift Ethernet 1.0 UTP (Cassini) (part no.\& 501-5902) .It From owner-svn-src-all@FreeBSD.ORG Mon May 3 22:09:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64572106566C; Mon, 3 May 2010 22:09:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 493ED8FC1C; Mon, 3 May 2010 22:09: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 o43M96rB014903; Mon, 3 May 2010 22:09:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43M96UF014900; Mon, 3 May 2010 22:09:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005032209.o43M96UF014900@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 22:09: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: r207587 - stable/7/usr.sbin/newsyslog 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, 03 May 2010 22:09:06 -0000 Author: delphij Date: Mon May 3 22:09:06 2010 New Revision: 207587 URL: http://svn.freebsd.org/changeset/base/207587 Log: MFC r202668 and r200806 [1]: Add a new option, -P, which reverts newsyslog(8) to the old behavior, which stops to proceed further, as it is possible that processes which fails to create PID file get screwed by rotation. ---- Don't consider non-existence of a PID file an error, we should be able to proceed anyway as this most likely mean that the process has been terminated. PR: bin/140397 Submitted by: Dan Lukes Modified: stable/7/usr.sbin/newsyslog/newsyslog.8 stable/7/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/7/usr.sbin/newsyslog/ (props changed) stable/7/usr.sbin/newsyslog/newsyslog.conf.5 (props changed) Modified: stable/7/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.8 Mon May 3 20:59:27 2010 (r207586) +++ stable/7/usr.sbin/newsyslog/newsyslog.8 Mon May 3 22:09:06 2010 (r207587) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 24, 2005 +.Dd January 19, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -25,7 +25,7 @@ .Nd maintain system log files to manageable sizes .Sh SYNOPSIS .Nm -.Op Fl CFNnrsv +.Op Fl CFNPnrsv .Op Fl R Ar tagname .Op Fl a Ar directory .Op Fl d Ar directory @@ -169,6 +169,10 @@ This option is intended to be used with or .Fl CC options when creating log files is the only objective. +.It Fl P +Prevent further action if we should send signal but the +.Dq pidfile +is empty or does not exist. .It Fl R Ar tagname Specify that .Nm Modified: stable/7/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.c Mon May 3 20:59:27 2010 (r207586) +++ stable/7/usr.sbin/newsyslog/newsyslog.c Mon May 3 22:09:06 2010 (r207587) @@ -167,6 +167,7 @@ int needroot = 1; /* Root privs are nec int noaction = 0; /* Don't do anything, just show it */ int norotate = 0; /* Don't rotate */ int nosignal; /* Do not send any signals */ +int enforcepid = 0; /* If PID file does not exist or empty, do nothing */ int force = 0; /* Force the trim no matter what */ int rotatereq = 0; /* -R = Always rotate the file(s) as given */ /* on the command (this also requires */ @@ -580,7 +581,7 @@ parse_args(int argc, char **argv) *p = '\0'; /* Parse command line options. */ - while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNR:")) != -1) + while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNPR:")) != -1) switch (ch) { case 'a': archtodir++; @@ -624,6 +625,9 @@ parse_args(int argc, char **argv) case 'N': norotate++; break; + case 'P': + enforcepid++; + break; case 'R': rotatereq++; requestor = strdup(optarg); @@ -1779,7 +1783,18 @@ set_swpid(struct sigwork_entry *swork, c f = fopen(ent->pid_file, "r"); if (f == NULL) { - warn("can't open pid file: %s", ent->pid_file); + if (errno == ENOENT && enforcepid == 0) { + /* + * Warn if the PID file doesn't exist, but do + * not consider it an error. Most likely it + * means the process has been terminated, + * so it should be safe to rotate any log + * files that the process would have been using. + */ + swork->sw_pidok = 1; + warnx("pid file doesn't exist: %s", ent->pid_file); + } else + warn("can't open pid file: %s", ent->pid_file); return; } @@ -1790,7 +1805,7 @@ set_swpid(struct sigwork_entry *swork, c * has terminated, so it should be safe to rotate any * log files that the process would have been using. */ - if (feof(f)) { + if (feof(f) && enforcepid == 0) { swork->sw_pidok = 1; warnx("pid file is empty: %s", ent->pid_file); } else From owner-svn-src-all@FreeBSD.ORG Mon May 3 22:32:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0AA4106564A; Mon, 3 May 2010 22:32:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 900C68FC0A; Mon, 3 May 2010 22:32: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 o43MWQC2021683; Mon, 3 May 2010 22:32:26 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43MWQhN021681; Mon, 3 May 2010 22:32:26 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201005032232.o43MWQhN021681@svn.freebsd.org> From: Ed Maste Date: Mon, 3 May 2010 22:32: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: r207590 - head/contrib/tzcode/zic 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, 03 May 2010 22:32:26 -0000 Author: emaste Date: Mon May 3 22:32:26 2010 New Revision: 207590 URL: http://svn.freebsd.org/changeset/base/207590 Log: Update GRANDPARENTED text to match the contents of tzdata/factory r19879. This eliminates "warning: time zone abbreviation differs from POSIX" on installworld to an empty filesystem. Reviewed by: edwin MFC after: 1 week Modified: head/contrib/tzcode/zic/private.h Modified: head/contrib/tzcode/zic/private.h ============================================================================== --- head/contrib/tzcode/zic/private.h Mon May 3 22:14:06 2010 (r207589) +++ head/contrib/tzcode/zic/private.h Mon May 3 22:32:26 2010 (r207590) @@ -34,7 +34,7 @@ static const char privatehid[] = "@(#)pr #endif /* !defined NOID */ #endif /* !defined lint */ -#define GRANDPARENTED "Local time zone must be set--see zic manual page" +#define GRANDPARENTED "Local time zone must be set--use tzsetup" /* ** Defaults for preprocessor symbols. From owner-svn-src-all@FreeBSD.ORG Tue May 4 00:42:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCE83106564A; Tue, 4 May 2010 00:42:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CC2F18FC12; Tue, 4 May 2010 00:42: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 o440g33t050429; Tue, 4 May 2010 00:42:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o440g3ZX050427; Tue, 4 May 2010 00:42:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005040042.o440g3ZX050427@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 00:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207591 - stable/6/sys/dev/ata 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, 04 May 2010 00:42:04 -0000 Author: delphij Date: Tue May 4 00:42:03 2010 New Revision: 207591 URL: http://svn.freebsd.org/changeset/base/207591 Log: MFC r195724 (mav): Limit IOCATAREQUEST ioctl data size to controller's maximum I/O size. It fixes kernel panic when requested size is too large (0xffffffff), PR: kern/136726 Modified: stable/6/sys/dev/ata/ata-all.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Mon May 3 22:32:26 2010 (r207590) +++ stable/6/sys/dev/ata/ata-all.c Tue May 4 00:42:03 2010 (r207591) @@ -438,6 +438,7 @@ int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data) { struct ata_device *atadev = device_get_softc(dev); + struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_ioc_request *ioc_request = (struct ata_ioc_request *)data; struct ata_params *params = (struct ata_params *)data; int *mode = (int *)data; @@ -447,6 +448,10 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: + if (ioc_request->count > + (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + return (EFBIG); + } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { return ENOMEM; } From owner-svn-src-all@FreeBSD.ORG Tue May 4 01:46:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90589106564A; Tue, 4 May 2010 01:46:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 80BF48FC14; Tue, 4 May 2010 01:46: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 o441kwun064572; Tue, 4 May 2010 01:46:58 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o441kwg0064570; Tue, 4 May 2010 01:46:58 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005040146.o441kwg0064570@svn.freebsd.org> From: Doug Barton Date: Tue, 4 May 2010 01:46: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: r207592 - 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: Tue, 04 May 2010 01:46:58 -0000 Author: dougb Date: Tue May 4 01:46:58 2010 New Revision: 207592 URL: http://svn.freebsd.org/changeset/base/207592 Log: Make address assignment via ipv6_prefix_IF work again Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Tue May 4 00:42:03 2010 (r207591) +++ head/etc/network.subr Tue May 4 01:46:58 2010 (r207592) @@ -399,6 +399,8 @@ ipv6if() $_if|"$_if "*|*" $_if"|*" $_if "*|[Aa][Uu][Tt][Oo]) # True if $ifconfig_IF_ipv6 is defined. _tmpargs=`_ifconfig_getargs $_if ipv6` + # Also true if ipv6_prefix_IF is defined + [ -n "$_tmpargs" ] || _tmpargs=`get_if_var $_if ipv6_prefix_IF` ;; esac From owner-svn-src-all@FreeBSD.ORG Tue May 4 03:56:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A173106566B; Tue, 4 May 2010 03:56:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 858588FC16; Tue, 4 May 2010 03:56: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 o443uPwJ093033; Tue, 4 May 2010 03:56:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o443uPvV093032; Tue, 4 May 2010 03:56:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040356.o443uPvV093032@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 03:56:25 +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: r207593 - stable/8/usr.sbin/config 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, 04 May 2010 03:56:25 -0000 Author: imp Date: Tue May 4 03:56:25 2010 New Revision: 207593 URL: http://svn.freebsd.org/changeset/base/207593 Log: MFC: r207461 sparc64, and possibly other architectures, pads the length of the section holding the config file to sh_addralign bytes using NULs. This bogusly triggers an assert. Break out of the loop when we hit an NUL within that many bytes of the end. Modified: stable/8/usr.sbin/config/main.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Tue May 4 01:46:58 2010 (r207592) +++ stable/8/usr.sbin/config/main.c Tue May 4 03:56:25 2010 (r207593) @@ -670,7 +670,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, len, osz, r; - unsigned int i, off, size; + unsigned int i, off, size, t1, t2, align; char *cmd, *o; r = open(file, O_RDONLY); @@ -689,8 +689,8 @@ kernconfdump(const char *file) if (o == NULL) err(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ - asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" - "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); + asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 8 kern_conf" + "| tail -5 | cut -d ' ' -f 2 | paste - - - - -", file); if (cmd == NULL) errx(EXIT_FAILURE, "asprintf() failed"); pp = popen(cmd, "r"); @@ -699,24 +699,28 @@ kernconfdump(const char *file) free(cmd); len = fread(o, osz, 1, pp); pclose(pp); - r = sscanf(o, "%d\t%d", &off, &size); + r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); free(o); - if (r != 2) + if (r != 5) errx(EXIT_FAILURE, "File %s doesn't contain configuration " "file. Either unsupported, or not compiled with " "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) err(EXIT_FAILURE, "fseek() failed"); - for (i = 0; i < size - 1; i++) { + for (i = 0; i < size; i++) { r = fgetc(fp); if (r == EOF) break; /* * If '\0' is present in the middle of the configuration * string, this means something very weird is happening. - * Make such case very visible. + * Make such case very visible. However, some architectures + * pad the length of the section with NULs to a multiple of + * sh_addralign, allow a NUL in that part of the section. */ + if (r == '\0' && (size - i) < align) + break; assert(r != '\0' && ("Char present in the configuration " "string mustn't be equal to 0")); fputc(r, stdout); From owner-svn-src-all@FreeBSD.ORG Tue May 4 04:02:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A5A4106566C; Tue, 4 May 2010 04:02:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 488D58FC14; Tue, 4 May 2010 04:02: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 o4442hx9094477; Tue, 4 May 2010 04:02:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4442hZQ094475; Tue, 4 May 2010 04:02:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040402.o4442hZQ094475@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 04:02:43 +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: r207594 - stable/7/usr.sbin/config 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, 04 May 2010 04:02:43 -0000 Author: imp Date: Tue May 4 04:02:43 2010 New Revision: 207594 URL: http://svn.freebsd.org/changeset/base/207594 Log: MFC r188214 (by wkoszek): Make config -x only return non-zero characters, so that: config -x | grep just works. Reported by: Danny Braniss Modified: stable/7/usr.sbin/config/main.c Directory Properties: stable/7/usr.sbin/config/ (props changed) Modified: stable/7/usr.sbin/config/main.c ============================================================================== --- stable/7/usr.sbin/config/main.c Tue May 4 03:56:25 2010 (r207593) +++ stable/7/usr.sbin/config/main.c Tue May 4 04:02:43 2010 (r207594) @@ -667,7 +667,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, len, osz, r; - unsigned int off, size; + unsigned int i, off, size; char *cmd, *o; r = open(file, O_RDONLY); @@ -705,7 +705,18 @@ kernconfdump(const char *file) r = fseek(fp, off, SEEK_CUR); if (r != 0) errx(EXIT_FAILURE, "fseek() failed"); - while ((r = fgetc(fp)) != EOF && size-- > 0) + for (i = 0; i < size - 1; i++) { + r = fgetc(fp); + if (r == EOF) + break; + /* + * If '\0' is present in the middle of the configuration + * string, this means something very weird is happening. + * Make such case very visible. + */ + assert(r != '\0' && ("Char present in the configuration " + "string mustn't be equal to 0")); fputc(r, stdout); + } fclose(fp); } From owner-svn-src-all@FreeBSD.ORG Tue May 4 04:04:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C49E4106564A; Tue, 4 May 2010 04:04:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B28498FC14; Tue, 4 May 2010 04:04: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 o4444bA2094949; Tue, 4 May 2010 04:04:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4444bRM094947; Tue, 4 May 2010 04:04:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040404.o4444bRM094947@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 04:04: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: r207595 - stable/7/usr.sbin/config 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, 04 May 2010 04:04:37 -0000 Author: imp Date: Tue May 4 04:04:37 2010 New Revision: 207595 URL: http://svn.freebsd.org/changeset/base/207595 Log: MFC r207461: sparc64, and possibly other architectures, pads the length of the section holding the config file to sh_addralign bytes using NULs. This bogusly triggers an assert. Break out of the loop when we hit a NUL within that many bytes of the end. Modified: stable/7/usr.sbin/config/main.c Directory Properties: stable/7/usr.sbin/config/ (props changed) Modified: stable/7/usr.sbin/config/main.c ============================================================================== --- stable/7/usr.sbin/config/main.c Tue May 4 04:02:43 2010 (r207594) +++ stable/7/usr.sbin/config/main.c Tue May 4 04:04:37 2010 (r207595) @@ -667,7 +667,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, len, osz, r; - unsigned int i, off, size; + unsigned int i, off, size, t1, t2, align; char *cmd, *o; r = open(file, O_RDONLY); @@ -686,8 +686,8 @@ kernconfdump(const char *file) if (o == NULL) errx(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ - asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" - "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); + asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 8 kern_conf" + "| tail -5 | cut -d ' ' -f 2 | paste - - - - -", file); if (cmd == NULL) errx(EXIT_FAILURE, "asprintf() failed"); pp = popen(cmd, "r"); @@ -696,24 +696,28 @@ kernconfdump(const char *file) free(cmd); len = fread(o, osz, 1, pp); pclose(pp); - r = sscanf(o, "%d\t%d", &off, &size); + r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); free(o); - if (r != 2) + if (r != 5) errx(EXIT_FAILURE, "File %s doesn't contain configuration " "file. Either unsupported, or not compiled with " "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) errx(EXIT_FAILURE, "fseek() failed"); - for (i = 0; i < size - 1; i++) { + for (i = 0; i < size; i++) { r = fgetc(fp); if (r == EOF) break; /* * If '\0' is present in the middle of the configuration * string, this means something very weird is happening. - * Make such case very visible. + * Make such case very visible. However, some architectures + * pad the length of the section with NULs to a multiple of + * sh_addralign, allow a NUL in that part of the section. */ + if (r == '\0' && (size - i) < align) + break; assert(r != '\0' && ("Char present in the configuration " "string mustn't be equal to 0")); fputc(r, stdout); From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:14:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 084811065672; Tue, 4 May 2010 05:14:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E961D8FC17; Tue, 4 May 2010 05:14: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 o445EiBv010461; Tue, 4 May 2010 05:14:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445EhKd010456; Tue, 4 May 2010 05:14:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040514.o445EhKd010456@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:14:43 +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: r207596 - in stable/8/sys: 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, 04 May 2010 05:14:45 -0000 Author: kib Date: Tue May 4 05:14:43 2010 New Revision: 207596 URL: http://svn.freebsd.org/changeset/base/207596 Log: MFC r206264: When OOM searches for a process to kill, ignore the processes already killed by OOM. When killed process waits for a page allocation, try to satisfy the request as fast as possible. Modified: stable/8/sys/kern/kern_sig.c stable/8/sys/sys/proc.h stable/8/sys/vm/vm_fault.c stable/8/sys/vm/vm_pageout.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/kern/kern_sig.c Tue May 4 05:14:43 2010 (r207596) @@ -2801,6 +2801,7 @@ killproc(p, why) p, p->p_pid, p->p_comm); log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, why); + p->p_flag |= P_WKILLED; psignal(p, SIGKILL); } Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/sys/proc.h Tue May 4 05:14:43 2010 (r207596) @@ -575,7 +575,7 @@ struct proc { #define P_WAITED 0x01000 /* Someone is waiting for us. */ #define P_WEXIT 0x02000 /* Working on exiting. */ #define P_EXEC 0x04000 /* Process called exec. */ -#define P_UNUSED8000 0x08000 /* available. */ +#define P_WKILLED 0x08000 /* Killed, go to kernel/user boundary ASAP. */ #define P_CONTINUED 0x10000 /* Proc has continued from a stopped state. */ #define P_STOPPED_SIG 0x20000 /* Stopped due to SIGSTOP/SIGTSTP. */ #define P_STOPPED_TRACE 0x40000 /* Stopped because of tracing. */ @@ -594,6 +594,7 @@ struct proc { #define P_STOPPED (P_STOPPED_SIG|P_STOPPED_SINGLE|P_STOPPED_TRACE) #define P_SHOULDSTOP(p) ((p)->p_flag & P_STOPPED) +#define P_KILLED(p) ((p)->p_flag & P_WKILLED) /* * These were process status values (p_stat), now they are only used in Modified: stable/8/sys/vm/vm_fault.c ============================================================================== --- stable/8/sys/vm/vm_fault.c Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/vm/vm_fault.c Tue May 4 05:14:43 2010 (r207596) @@ -217,7 +217,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr vm_object_t next_object; vm_page_t marray[VM_FAULT_READ]; int hardfault; - int faultcount, ahead, behind; + int faultcount, ahead, behind, alloc_req; struct faultstate fs; struct vnode *vp; int locked, error; @@ -414,9 +414,14 @@ RetryFault:; /* * Allocate a new page for this object/offset pair. + * + * Unlocked read of the p_flag is harmless. At + * worst, the P_KILLED might be not observed + * there, and allocation can fail, causing + * restart and new reading of the p_flag. */ fs.m = NULL; - if (!vm_page_count_severe()) { + if (!vm_page_count_severe() || P_KILLED(curproc)) { #if VM_NRESERVLEVEL > 0 if ((fs.object->flags & OBJ_COLORED) == 0) { fs.object->flags |= OBJ_COLORED; @@ -424,10 +429,13 @@ RetryFault:; fs.pindex; } #endif + alloc_req = P_KILLED(curproc) ? + VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL; + if (fs.object->type != OBJT_VNODE && + fs.object->backing_object == NULL) + alloc_req |= VM_ALLOC_ZERO; fs.m = vm_page_alloc(fs.object, fs.pindex, - (fs.object->type == OBJT_VNODE || - fs.object->backing_object != NULL) ? - VM_ALLOC_NORMAL : VM_ALLOC_ZERO); + alloc_req); } if (fs.m == NULL) { unlock_and_deallocate(&fs); @@ -452,7 +460,8 @@ readrest: int reqpage = 0; u_char behavior = vm_map_entry_behavior(fs.entry); - if (behavior == MAP_ENTRY_BEHAV_RANDOM) { + if (behavior == MAP_ENTRY_BEHAV_RANDOM || + P_KILLED(curproc)) { ahead = 0; behind = 0; } else { Modified: stable/8/sys/vm/vm_pageout.c ============================================================================== --- stable/8/sys/vm/vm_pageout.c Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/vm/vm_pageout.c Tue May 4 05:14:43 2010 (r207596) @@ -1206,10 +1206,10 @@ vm_pageout_oom(int shortage) if (PROC_TRYLOCK(p) == 0) continue; /* - * If this is a system or protected process, skip it. + * If this is a system, protected or killed process, skip it. */ if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || - (p->p_pid == 1) || + (p->p_pid == 1) || P_KILLED(p) || ((p->p_pid < 48) && (swap_pager_avail != 0))) { PROC_UNLOCK(p); continue; From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:17:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81CC9106566B; Tue, 4 May 2010 05:17:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8858FC16; Tue, 4 May 2010 05:17: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 o445HBX0011039; Tue, 4 May 2010 05:17:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445HB6e011037; Tue, 4 May 2010 05:17:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005040517.o445HB6e011037@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 05:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207597 - stable/6/sys/dev/ata 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, 04 May 2010 05:17:11 -0000 Author: delphij Date: Tue May 4 05:17:11 2010 New Revision: 207597 URL: http://svn.freebsd.org/changeset/base/207597 Log: Fixup MFC. I should have done test build before committing this. Pointy hat to: delphij Modified: stable/6/sys/dev/ata/ata-all.c Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Tue May 4 05:14:43 2010 (r207596) +++ stable/6/sys/dev/ata/ata-all.c Tue May 4 05:17:11 2010 (r207597) @@ -449,7 +449,7 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: if (ioc_request->count > - (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + (ch->dma->max_iosize ? ch->dma->max_iosize : DFLTPHYS)) { return (EFBIG); } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:25:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66E551065672; Tue, 4 May 2010 05:25:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 542C88FC1F; Tue, 4 May 2010 05:25:48 +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 o445PmEC012933; Tue, 4 May 2010 05:25:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445PmuP012929; Tue, 4 May 2010 05:25:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040525.o445PmuP012929@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:25:48 +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: r207598 - in stable/8/sys: fs/pseudofs kern ufs/ufs 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, 04 May 2010 05:25:48 -0000 Author: kib Date: Tue May 4 05:25:48 2010 New Revision: 207598 URL: http://svn.freebsd.org/changeset/base/207598 Log: MFC r206894: The cache_enter(9) function shall not be called for doomed dvp. Assert this. Verify that dvp is not reclaimed before calling cache_enter(). Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c stable/8/sys/kern/vfs_cache.c stable/8/sys/ufs/ufs/ufs_lookup.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/8/sys/fs/pseudofs/pseudofs_vnops.c Tue May 4 05:17:11 2010 (r207597) +++ stable/8/sys/fs/pseudofs/pseudofs_vnops.c Tue May 4 05:25:48 2010 (r207598) @@ -542,7 +542,7 @@ pfs_lookup(struct vop_cachedlookup_args if (cnp->cn_flags & ISDOTDOT) vn_lock(vn, LK_EXCLUSIVE|LK_RETRY); - if (cnp->cn_flags & MAKEENTRY) + if (cnp->cn_flags & MAKEENTRY && !(vn->v_iflag & VI_DOOMED)) cache_enter(vn, *vpp, cnp); PFS_RETURN (0); failed: Modified: stable/8/sys/kern/vfs_cache.c ============================================================================== --- stable/8/sys/kern/vfs_cache.c Tue May 4 05:17:11 2010 (r207597) +++ stable/8/sys/kern/vfs_cache.c Tue May 4 05:25:48 2010 (r207598) @@ -611,6 +611,8 @@ cache_enter(dvp, vp, cnp) CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr); VNASSERT(vp == NULL || (vp->v_iflag & VI_DOOMED) == 0, vp, ("cache_enter: Adding a doomed vnode")); + VNASSERT(dvp == NULL || (dvp->v_iflag & VI_DOOMED) == 0, dvp, + ("cache_enter: Doomed vnode used as src")); if (!doingcache) return; Modified: stable/8/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_lookup.c Tue May 4 05:17:11 2010 (r207597) +++ stable/8/sys/ufs/ufs/ufs_lookup.c Tue May 4 05:25:48 2010 (r207598) @@ -704,6 +704,14 @@ found: vn_lock(vdp, LK_UPGRADE | LK_RETRY); else /* if (ltype == LK_SHARED) */ vn_lock(vdp, LK_DOWNGRADE | LK_RETRY); + /* + * Relock for the "." case may left us with + * reclaimed vnode. + */ + if (vdp->v_iflag & VI_DOOMED) { + vrele(vdp); + return (ENOENT); + } } *vpp = vdp; } else { From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:34:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69DB1106564A; Tue, 4 May 2010 05:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5645D8FC12; Tue, 4 May 2010 05:34: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 o445YIjs014861; Tue, 4 May 2010 05:34:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445YIkG014857; Tue, 4 May 2010 05:34:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040534.o445YIkG014857@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:34: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: r207599 - in stable/8: include lib/libc/stdlib 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, 04 May 2010 05:34:18 -0000 Author: kib Date: Tue May 4 05:34:18 2010 New Revision: 207599 URL: http://svn.freebsd.org/changeset/base/207599 Log: MFC r206893: Slightly modernize realpath(3). SUSv4 requires that implementation returns EINVAL if supplied path is NULL, and ENOENT if path is empty string [1]. Bring prototype in conformance with SUSv4, adding restrict keywords. Allow the resolved path buffer pointer be NULL, in which case realpath(3) allocates storage with malloc(). MFC r206898: Free() is not allowed to modify errno, remove safety brackets around it. Add small optimization, do not copy a string to the buffer that is to be freed immediately after. MFC r206997: Move realpath(3) prototype to a POSIX section. MFC r206998: Add standards section, improve wording, taking into account the handling of NULL and changed type in declaration. Modified: stable/8/include/stdlib.h stable/8/lib/libc/stdlib/realpath.3 stable/8/lib/libc/stdlib/realpath.c Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/include/stdlib.h ============================================================================== --- stable/8/include/stdlib.h Tue May 4 05:25:48 2010 (r207598) +++ stable/8/include/stdlib.h Tue May 4 05:34:18 2010 (r207599) @@ -159,6 +159,7 @@ void _Exit(int) __dead2; #if __POSIX_VISIBLE /* >= ??? */ int posix_memalign(void **, size_t, size_t); /* (ADV) */ int rand_r(unsigned *); /* (TSF) */ +char *realpath(const char * __restrict, char * __restrict); int setenv(const char *, const char *, int); int unsetenv(const char *); #endif @@ -205,7 +206,6 @@ int posix_openpt(int); char *ptsname(int); int putenv(char *); long random(void); -char *realpath(const char *, char resolved_path[]); unsigned short *seed48(unsigned short[3]); #ifndef _SETKEY_DECLARED Modified: stable/8/lib/libc/stdlib/realpath.3 ============================================================================== --- stable/8/lib/libc/stdlib/realpath.3 Tue May 4 05:25:48 2010 (r207598) +++ stable/8/lib/libc/stdlib/realpath.3 Tue May 4 05:34:18 2010 (r207599) @@ -31,7 +31,7 @@ .\" @(#)realpath.3 8.2 (Berkeley) 2/16/94 .\" $FreeBSD$ .\" -.Dd February 16, 1994 +.Dd April 19, 2010 .Dt REALPATH 3 .Os .Sh NAME @@ -43,7 +43,7 @@ .In sys/param.h .In stdlib.h .Ft "char *" -.Fn realpath "const char *pathname" "char resolved_path[PATH_MAX]" +.Fn realpath "const char *pathname" "char *resolved_path" .Sh DESCRIPTION The .Fn realpath @@ -64,7 +64,8 @@ argument .Em must refer to a buffer capable of storing at least .Dv PATH_MAX -characters. +characters, or be +.Dv NULL . .Pp The .Fn realpath @@ -82,13 +83,22 @@ The function returns .Fa resolved_path on success. +If the function was supplied +.Dv NULL +as +.Fa resolved_path , +and operation did not cause errors, the returned value is +a null-terminated string in a buffer allocated by a call to +.Fn malloc 3 . If an error occurs, .Fn realpath returns .Dv NULL , -and +and if .Fa resolved_path -contains the pathname which caused the problem. +is not +.Dv NULL , +the array that it points to contains the pathname which caused the problem. .Sh ERRORS The function .Fn realpath @@ -113,6 +123,11 @@ when given a relative .Fa pathname . .Sh "SEE ALSO" .Xr getcwd 3 +.Sh STANDARDS +The +.Fn realpath +function conforms to +.St -p1003.1-2001 . .Sh HISTORY The .Fn realpath Modified: stable/8/lib/libc/stdlib/realpath.c ============================================================================== --- stable/8/lib/libc/stdlib/realpath.c Tue May 4 05:25:48 2010 (r207598) +++ stable/8/lib/libc/stdlib/realpath.c Tue May 4 05:34:18 2010 (r207599) @@ -43,23 +43,37 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" /* - * char *realpath(const char *path, char resolved[PATH_MAX]); - * * Find the real name of path, by removing all ".", ".." and symlink * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ char * -realpath(const char *path, char resolved[PATH_MAX]) +realpath(const char * __restrict path, char * __restrict resolved) { struct stat sb; char *p, *q, *s; size_t left_len, resolved_len; unsigned symlinks; - int serrno, slen; + int serrno, slen, m; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; + if (path == NULL) { + errno = EINVAL; + return (NULL); + } + if (path[0] == '\0') { + errno = ENOENT; + return (NULL); + } serrno = errno; + if (resolved == NULL) { + resolved = malloc(PATH_MAX); + if (resolved == NULL) + return (NULL); + m = 1; + } else + m = 0; + symlinks = 0; if (path[0] == '/') { resolved[0] = '/'; @@ -70,13 +84,18 @@ realpath(const char *path, char resolved left_len = strlcpy(left, path + 1, sizeof(left)); } else { if (getcwd(resolved, PATH_MAX) == NULL) { - strlcpy(resolved, ".", PATH_MAX); + if (m) + free(resolved); + else + strlcpy(resolved, ".", PATH_MAX); return (NULL); } resolved_len = strlen(resolved); left_len = strlcpy(left, path, sizeof(left)); } if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -92,6 +111,8 @@ realpath(const char *path, char resolved p = strchr(left, '/'); s = p ? p : left + left_len; if (s - left >= sizeof(next_token)) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -102,6 +123,8 @@ realpath(const char *path, char resolved memmove(left, s + 1, left_len + 1); if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -133,6 +156,8 @@ realpath(const char *path, char resolved */ resolved_len = strlcat(resolved, next_token, PATH_MAX); if (resolved_len >= PATH_MAX) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -141,16 +166,23 @@ realpath(const char *path, char resolved errno = serrno; return (resolved); } + if (m) + free(resolved); return (NULL); } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { + if (m) + free(resolved); errno = ELOOP; return (NULL); } slen = readlink(resolved, symlink, sizeof(symlink) - 1); - if (slen < 0) + if (slen < 0) { + if (m) + free(resolved); return (NULL); + } symlink[slen] = '\0'; if (symlink[0] == '/') { resolved[1] = 0; @@ -171,6 +203,8 @@ realpath(const char *path, char resolved if (p != NULL) { if (symlink[slen - 1] != '/') { if (slen + 1 >= sizeof(symlink)) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -179,6 +213,8 @@ realpath(const char *path, char resolved } left_len = strlcat(symlink, left, sizeof(left)); if (left_len >= sizeof(left)) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:47:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4042106566C; Tue, 4 May 2010 05:47:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A25148FC21; Tue, 4 May 2010 05:47: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 o445lHrv017718; Tue, 4 May 2010 05:47:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445lHbm017716; Tue, 4 May 2010 05:47:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040547.o445lHbm017716@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:47: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: r207600 - 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: Tue, 04 May 2010 05:47:17 -0000 Author: kib Date: Tue May 4 05:47:17 2010 New Revision: 207600 URL: http://svn.freebsd.org/changeset/base/207600 Log: Move definition of struct rusage_ext before struct thread. MFC after: 1 week Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue May 4 05:34:18 2010 (r207599) +++ head/sys/sys/proc.h Tue May 4 05:47:17 2010 (r207600) @@ -173,6 +173,27 @@ struct kdtrace_thread; struct cpuset; /* + * XXX: Does this belong in resource.h or resourcevar.h instead? + * Resource usage extension. The times in rusage structs in the kernel are + * never up to date. The actual times are kept as runtimes and tick counts + * (with control info in the "previous" times), and are converted when + * userland asks for rusage info. Backwards compatibility prevents putting + * this directly in the user-visible rusage struct. + * + * Locking for p_rux: (cj) means (j) for p_rux and (c) for p_crux. + * Locking for td_rux: (t) for all fields. + */ +struct rusage_ext { + u_int64_t rux_runtime; /* (cj) Real time. */ + u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */ + u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ + u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ + u_int64_t rux_uu; /* (c) Previous user time in usec. */ + u_int64_t rux_su; /* (c) Previous sys time in usec. */ + u_int64_t rux_tu; /* (c) Previous total time in usec. */ +}; + +/* * Kernel runnable context (thread). * This is what is put to sleep and reactivated. * Thread context. Processes may have multiple threads. @@ -426,26 +447,6 @@ do { \ #define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN /* - * XXX: Does this belong in resource.h or resourcevar.h instead? - * Resource usage extension. The times in rusage structs in the kernel are - * never up to date. The actual times are kept as runtimes and tick counts - * (with control info in the "previous" times), and are converted when - * userland asks for rusage info. Backwards compatibility prevents putting - * this directly in the user-visible rusage struct. - * - * Locking: (cj) means (j) for p_rux and (c) for p_crux. - */ -struct rusage_ext { - u_int64_t rux_runtime; /* (cj) Real time. */ - u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */ - u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ - u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ - u_int64_t rux_uu; /* (c) Previous user time in usec. */ - u_int64_t rux_su; /* (c) Previous sys time in usec. */ - u_int64_t rux_tu; /* (c) Previous total time in usec. */ -}; - -/* * Process structure. */ struct proc { From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:55:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9243A1065670; Tue, 4 May 2010 05:55:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 812518FC17; Tue, 4 May 2010 05:55: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 o445tJPm019530; Tue, 4 May 2010 05:55:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445tJ33019528; Tue, 4 May 2010 05:55:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005040555.o445tJ33019528@svn.freebsd.org> From: Alan Cox Date: Tue, 4 May 2010 05:55: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: r207601 - 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, 04 May 2010 05:55:19 -0000 Author: alc Date: Tue May 4 05:55:19 2010 New Revision: 207601 URL: http://svn.freebsd.org/changeset/base/207601 Log: Add lock assertions. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue May 4 05:47:17 2010 (r207600) +++ head/sys/vm/vm_page.c Tue May 4 05:55:19 2010 (r207601) @@ -1385,6 +1385,7 @@ vm_page_activate(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); if (VM_PAGE_GETKNOWNQUEUE2(m) != PQ_ACTIVE) { vm_pageq_remove(m); if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { @@ -1588,8 +1589,10 @@ void vm_page_unwire(vm_page_t m, int activate) { - if ((m->flags & PG_UNMANAGED) == 0) + if ((m->flags & PG_UNMANAGED) == 0) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); + } if (m->flags & PG_FICTITIOUS) return; if (m->wire_count > 0) { @@ -1626,6 +1629,7 @@ _vm_page_deactivate(vm_page_t m, int ath { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); /* * Ignore if already inactive. @@ -1845,6 +1849,8 @@ vm_page_dontneed(vm_page_t m) int head; mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); dnw = ++dnweight; /* From owner-svn-src-all@FreeBSD.ORG Tue May 4 05:55:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2CD21065740; Tue, 4 May 2010 05:55:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 90AD48FC14; Tue, 4 May 2010 05:55: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 o445tbK0019637; Tue, 4 May 2010 05:55:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445tbrh019631; Tue, 4 May 2010 05:55:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040555.o445tbrh019631@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:55: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: r207602 - in head/sys: 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: Tue, 04 May 2010 05:55:37 -0000 Author: kib Date: Tue May 4 05:55:37 2010 New Revision: 207602 URL: http://svn.freebsd.org/changeset/base/207602 Log: Implement RUSAGE_THREAD. Add td_rux to keep extended runtime and ticks information for thread to allow calcru1() (re)use. Rename ruxagg()->ruxagg_locked(), ruxagg_tlock()->ruxagg() [1]. The ruxagg_locked() function no longer clears thread ticks nor td_incruntime. Requested by: attilio [1] Discussed with: attilio, bde Reviewed by: bde Based on submission by: Alexander Krizhanovsky MFC after: 1 week X-MFC-Note: td_rux shall be moved to the end of struct thread Modified: head/sys/kern/kern_resource.c head/sys/kern/kern_thread.c head/sys/sys/proc.h head/sys/sys/resource.h head/sys/sys/resourcevar.h Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Tue May 4 05:55:19 2010 (r207601) +++ head/sys/kern/kern_resource.c Tue May 4 05:55:37 2010 (r207602) @@ -76,7 +76,7 @@ static void calcru1(struct proc *p, stru struct timeval *up, struct timeval *sp); static int donice(struct thread *td, struct proc *chgp, int n); static struct uidinfo *uilookup(uid_t uid); -static void ruxagg_tlock(struct proc *p, struct thread *td); +static void ruxagg(struct proc *p, struct thread *td); /* * Resource controls and accounting. @@ -630,7 +630,7 @@ lim_cb(void *arg) return; PROC_SLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { - ruxagg_tlock(p, td); + ruxagg(p, td); } PROC_SUNLOCK(p); if (p->p_rux.rux_runtime > p->p_cpulimit * cpu_tickrate()) { @@ -841,7 +841,7 @@ calcru(struct proc *p, struct timeval *u FOREACH_THREAD_IN_PROC(p, td) { if (td->td_incruntime == 0) continue; - ruxagg_tlock(p, td); + ruxagg(p, td); } calcru1(p, &p->p_rux, up, sp); } @@ -961,6 +961,16 @@ kern_getrusage(struct thread *td, int wh calccru(p, &rup->ru_utime, &rup->ru_stime); break; + case RUSAGE_THREAD: + PROC_SLOCK(p); + ruxagg(p, td); + PROC_SUNLOCK(p); + thread_lock(td); + *rup = td->td_ru; + calcru1(p, &td->td_rux, &rup->ru_utime, &rup->ru_stime); + thread_unlock(td); + break; + default: error = EINVAL; } @@ -1001,7 +1011,7 @@ ruadd(struct rusage *ru, struct rusage_e * Aggregate tick counts into the proc's rusage_ext. */ void -ruxagg(struct rusage_ext *rux, struct thread *td) +ruxagg_locked(struct rusage_ext *rux, struct thread *td) { THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -1010,18 +1020,19 @@ ruxagg(struct rusage_ext *rux, struct th rux->rux_uticks += td->td_uticks; rux->rux_sticks += td->td_sticks; rux->rux_iticks += td->td_iticks; - td->td_incruntime = 0; - td->td_uticks = 0; - td->td_iticks = 0; - td->td_sticks = 0; } static void -ruxagg_tlock(struct proc *p, struct thread *td) +ruxagg(struct proc *p, struct thread *td) { thread_lock(td); - ruxagg(&p->p_rux, td); + ruxagg_locked(&p->p_rux, td); + ruxagg_locked(&td->td_rux, td); + td->td_incruntime = 0; + td->td_uticks = 0; + td->td_iticks = 0; + td->td_sticks = 0; thread_unlock(td); } @@ -1039,7 +1050,7 @@ rufetch(struct proc *p, struct rusage *r *ru = p->p_ru; if (p->p_numthreads > 0) { FOREACH_THREAD_IN_PROC(p, td) { - ruxagg_tlock(p, td); + ruxagg(p, td); rucollect(ru, &td->td_ru); } } Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue May 4 05:55:19 2010 (r207601) +++ head/sys/kern/kern_thread.c Tue May 4 05:55:37 2010 (r207602) @@ -432,7 +432,7 @@ thread_exit(void) PROC_UNLOCK(p); thread_lock(td); /* Save our tick information with both the thread and proc locked */ - ruxagg(&p->p_rux, td); + ruxagg_locked(&p->p_rux, td); PROC_SUNLOCK(p); td->td_state = TDS_INACTIVE; #ifdef WITNESS Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue May 4 05:55:19 2010 (r207601) +++ head/sys/sys/proc.h Tue May 4 05:55:37 2010 (r207602) @@ -240,7 +240,8 @@ struct thread { u_int td_estcpu; /* (t) estimated cpu utilization */ int td_slptick; /* (t) Time at sleep. */ int td_blktick; /* (t) Time spent blocked. */ - struct rusage td_ru; /* (t) rusage information */ + struct rusage td_ru; /* (t) rusage information. */ + struct rusage_ext td_rux; /* (t) Internal rusage information. */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ u_int td_pticks; /* (t) Statclock hits for profiling */ Modified: head/sys/sys/resource.h ============================================================================== --- head/sys/sys/resource.h Tue May 4 05:55:19 2010 (r207601) +++ head/sys/sys/resource.h Tue May 4 05:55:37 2010 (r207602) @@ -56,6 +56,7 @@ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN -1 +#define RUSAGE_THREAD 1 struct rusage { struct timeval ru_utime; /* user time used */ Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Tue May 4 05:55:19 2010 (r207601) +++ head/sys/sys/resourcevar.h Tue May 4 05:55:37 2010 (r207602) @@ -131,7 +131,7 @@ void rucollect(struct rusage *ru, struc void rufetch(struct proc *p, struct rusage *ru); void rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up, struct timeval *sp); -void ruxagg(struct rusage_ext *rux, struct thread *td); +void ruxagg_locked(struct rusage_ext *rux, struct thread *td); int suswintr(void *base, int word); struct uidinfo *uifind(uid_t uid); From owner-svn-src-all@FreeBSD.ORG Tue May 4 06:00:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB8331065670; Tue, 4 May 2010 06:00:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id AA5D18FC2B; Tue, 4 May 2010 06:00: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 o4460dBM020788; Tue, 4 May 2010 06:00:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4460dRK020786; Tue, 4 May 2010 06:00:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040600.o4460dRK020786@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 06:00: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: r207603 - 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: Tue, 04 May 2010 06:00:39 -0000 Author: kib Date: Tue May 4 06:00:39 2010 New Revision: 207603 URL: http://svn.freebsd.org/changeset/base/207603 Log: Use td_rux.rux_runtime for ki_runtime instead of redoing calculation. Submitted by: bde MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue May 4 05:55:37 2010 (r207602) +++ head/sys/kern/kern_proc.c Tue May 4 06:00:39 2010 (r207603) @@ -901,7 +901,7 @@ fill_kinfo_thread(struct thread *td, str kp->ki_pri.pri_user = td->td_user_pri; if (preferthread) { - kp->ki_runtime = cputick2usec(td->td_runtime); + kp->ki_runtime = td->td_rux.rux_runtime; kp->ki_pctcpu = sched_pctcpu(td); kp->ki_estcpu = td->td_estcpu; } From owner-svn-src-all@FreeBSD.ORG Tue May 4 06:01:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B537106566B; Tue, 4 May 2010 06:01:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 09E378FC12; Tue, 4 May 2010 06:01: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 o4461Pbn020993; Tue, 4 May 2010 06:01:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4461P9v020991; Tue, 4 May 2010 06:01:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040601.o4461P9v020991@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 06:01:25 +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: r207604 - 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, 04 May 2010 06:01:26 -0000 Author: kib Date: Tue May 4 06:01:25 2010 New Revision: 207604 URL: http://svn.freebsd.org/changeset/base/207604 Log: Document RUSAGE_THREAD. Reviewed by: bde MFC after: 1 week Modified: head/lib/libc/sys/getrusage.2 Modified: head/lib/libc/sys/getrusage.2 ============================================================================== --- head/lib/libc/sys/getrusage.2 Tue May 4 06:00:39 2010 (r207603) +++ head/lib/libc/sys/getrusage.2 Tue May 4 06:01:25 2010 (r207604) @@ -28,7 +28,7 @@ .\" @(#)getrusage.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd May 1, 2010 .Dt GETRUSAGE 2 .Os .Sh NAME @@ -42,6 +42,7 @@ .In sys/resource.h .Fd "#define RUSAGE_SELF 0" .Fd "#define RUSAGE_CHILDREN -1" +.Fd "#define RUSAGE_THREAD 1" .Ft int .Fn getrusage "int who" "struct rusage *rusage" .Sh DESCRIPTION @@ -49,11 +50,12 @@ The .Fn getrusage system call returns information describing the resources utilized by the current -process, or all its terminated child processes. +thread, the current process, or all its terminated child processes. The .Fa who argument is either -.Dv RUSAGE_SELF +.Dv RUSAGE_THREAD , +.Dv RUSAGE_SELF , or .Dv RUSAGE_CHILDREN . The buffer to which @@ -175,6 +177,10 @@ The .Fn getrusage system call appeared in .Bx 4.2 . +The +.Dv RUSAGE_THREAD +facility first appeared in +.Fx 8.1 . .Sh BUGS There is no way to obtain information about a child process that has not yet terminated. From owner-svn-src-all@FreeBSD.ORG Tue May 4 06:04:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 227381065672; Tue, 4 May 2010 06:04:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1142E8FC0C; Tue, 4 May 2010 06:04: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 o4464Xw8021718; Tue, 4 May 2010 06:04:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4464X6a021716; Tue, 4 May 2010 06:04:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040604.o4464X6a021716@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 06:04: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: r207605 - 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: Tue, 04 May 2010 06:04:34 -0000 Author: kib Date: Tue May 4 06:04:33 2010 New Revision: 207605 URL: http://svn.freebsd.org/changeset/base/207605 Log: Remove a comment that merely repeats code. Submitted by: bde MFC after: 1 week Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue May 4 06:01:25 2010 (r207604) +++ head/sys/kern/kern_thread.c Tue May 4 06:04:33 2010 (r207605) @@ -431,7 +431,6 @@ thread_exit(void) #endif PROC_UNLOCK(p); thread_lock(td); - /* Save our tick information with both the thread and proc locked */ ruxagg_locked(&p->p_rux, td); PROC_SUNLOCK(p); td->td_state = TDS_INACTIVE; From owner-svn-src-all@FreeBSD.ORG Tue May 4 06:06:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9C5B1065678; Tue, 4 May 2010 06:06:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 989E38FC24; Tue, 4 May 2010 06:06:01 +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 o44661Dm022080; Tue, 4 May 2010 06:06:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44661d6022078; Tue, 4 May 2010 06:06:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040606.o44661d6022078@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 06:06: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: r207606 - 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: Tue, 04 May 2010 06:06:01 -0000 Author: kib Date: Tue May 4 06:06:01 2010 New Revision: 207606 URL: http://svn.freebsd.org/changeset/base/207606 Log: Fix typo in comment. MFC after: 3 days Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue May 4 06:04:33 2010 (r207605) +++ head/sys/kern/kern_thread.c Tue May 4 06:06:01 2010 (r207606) @@ -398,7 +398,7 @@ thread_exit(void) /* * The test below is NOT true if we are the - * sole exiting thread. P_STOPPED_SNGL is unset + * sole exiting thread. P_STOPPED_SINGLE is unset * in exit1() after it is the only survivor. */ if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { From owner-svn-src-all@FreeBSD.ORG Tue May 4 06:13:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39214106564A; Tue, 4 May 2010 06:13:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 268CA8FC12; Tue, 4 May 2010 06:13: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 o446DIb1023754; Tue, 4 May 2010 06:13:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o446DI8m023750; Tue, 4 May 2010 06:13:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040613.o446DI8m023750@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 06:13: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: r207607 - head/usr.bin/tftp 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, 04 May 2010 06:13:18 -0000 Author: imp Date: Tue May 4 06:13:17 2010 New Revision: 207607 URL: http://svn.freebsd.org/changeset/base/207607 Log: Go ahead and merge the work edwin@ on tftpd into the tree. It is a lot better than what's in the tree now. Edwin tested it at a prior employer, but can't test it today. I've found that it works a lot better with the various uboot versions that I've used in my embedded work. Here's the pkg-descr from the port that describes the changes: It all started when we got some new routers, which told me the following when trying to upload configuration or download images from it: The TFTP server doesn't support the blocksize option. My curiousity was triggered, it took me some reading of RFCs and other documentation to find out what was possible and what could be done. Was plain TFTP very simple in its handshake, TFTP with options was kind of messy because of its backwards capability: The first packet returned could either be an acknowledgement of options, or the first data packet. Going through the source code of src/libexec/tftpd and going through the code of src/usr.bin/tftp showed that there was a lot of duplicate code, and the addition of options would only increase the amount of duplicate code. After all, both the client and the server can act as a sender and receiver. At the end, it ended up with a nearly complete rewrite of the tftp client and server. It has been tested against the following TFTP clients and servers: - Itself (yay!) - The standard FreeBSD tftp client and server - The Fedora Core 6 tftp client and server - Cisco router tftp client - Extreme Networks tftp client It supports the following RFCs: RFC1350 - THE TFTP PROTOCOL (REVISION 2) RFC2347 - TFTP Option Extension RFC2348 - TFTP Blocksize Option RFC2349 - TFTP Timeout Interval and Transfer Size Options RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) It supports the following unofficial TFTP Options as described at http://www.compuphase.com/tftp.htm: blksize2 - Block size restricted to powers of 2, excluding protocol headers rollover - Block counter roll-over (roll back to zero or to one) From the tftp program point of view the following things are changed: - New commands: "blocksize", "blocksize2", "rollover" and "options" - Development features: "debug" and "packetdrop" If you try this tftp/tftpd implementation, please let me know if it works (or doesn't work) and against which implementaion so I can get a list of confirmed working systems. Author: Edwin Groothuis Modified: head/usr.bin/tftp/Makefile head/usr.bin/tftp/main.c head/usr.bin/tftp/tftp.1 head/usr.bin/tftp/tftp.c Modified: head/usr.bin/tftp/Makefile ============================================================================== --- head/usr.bin/tftp/Makefile Tue May 4 06:06:01 2010 (r207606) +++ head/usr.bin/tftp/Makefile Tue May 4 06:13:17 2010 (r207607) @@ -1,9 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +CFLAGS=-g -Wall +WARNS= 3 PROG= tftp -SRCS= main.c tftp.c tftpsubs.c +SRCS= main.c tftp.c tftp-utils.c tftp-io.c tftp-file.c tftp-transfer.c tftp-options.c DPADD= ${LIBEDIT} ${LIBTERMCAP} LDADD= -ledit -ltermcap +CFLAGS+=-I${.CURDIR}/../../libexec/tftpd -I${.CURDIR}/../../usr.bin/tftp +.PATH: ${.CURDIR}/../../libexec/tftpd .include Modified: head/usr.bin/tftp/main.c ============================================================================== --- head/usr.bin/tftp/main.c Tue May 4 06:06:01 2010 (r207606) +++ head/usr.bin/tftp/main.c Tue May 4 06:13:17 2010 (r207607) @@ -54,12 +54,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include - #include +#include #include #include @@ -72,119 +74,212 @@ __FBSDID("$FreeBSD$"); #include #include -#include "extern.h" +#include "tftp-utils.h" +#include "tftp-io.h" +#include "tftp-options.h" +#include "tftp.h" #define MAXLINE 200 #define TIMEOUT 5 /* secs between rexmt's */ -struct sockaddr_storage peeraddr; -int f; -int trace; -int verbose; -int connected; -char mode[32]; -char line[MAXLINE]; -int margc; +static struct sockaddr_storage peeraddr; +static int connected; +static char mode[32]; +jmp_buf toplevel; +volatile int txrx_error; +static int peer; + #define MAX_MARGV 20 -char *margv[MAX_MARGV]; -jmp_buf toplevel; -volatile int txrx_error; - -void get(int, char **); -void help(int, char **); -void intr(int); -void modecmd(int, char **); -void put(int, char **); -void quit(int, char **); -void setascii(int, char **); -void setbinary(int, char **); -void setpeer0(char *, const char *); -void setpeer(int, char **); -void setrexmt(int, char **); -void settimeout(int, char **); -void settrace(int, char **); -void setverbose(int, char **); -void status(int, char **); +static int margc; +static char *margv[MAX_MARGV]; + +int verbose; +char *port = NULL; + +static void get(int, char **); +static void help(int, char **); +static void intr(int); +static void modecmd(int, char **); +static void put(int, char **); +static void quit(int, char **); +static void setascii(int, char **); +static void setbinary(int, char **); +static void setpeer0(char *, const char *); +static void setpeer(int, char **); +static void settimeoutpacket(int, char **); +static void settimeoutnetwork(int, char **); +static void setdebug(int, char **); +static void setverbose(int, char **); +static void showstatus(int, char **); +static void setblocksize(int, char **); +static void setblocksize2(int, char **); +static void setoptions(int, char **); +static void setrollover(int, char **); +static void setpacketdrop(int, char **); static void command(void) __dead2; static const char *command_prompt(void); -static void getusage(const char *); -static void makeargv(void); -static void putusage(const char *); +static void urihandling(char *URI); +static void getusage(char *); +static void makeargv(char *line); +static void putusage(char *); static void settftpmode(const char *); -char *tail(char *); -struct cmd *getcmd(char *); +static char *tail(char *); +static struct cmd *getcmd(char *); #define HELPINDENT (sizeof("connect")) struct cmd { const char *name; - char *help; void (*handler)(int, char **); + const char *help; }; -char vhelp[] = "toggle verbose mode"; -char thelp[] = "toggle packet tracing"; -char chelp[] = "connect to remote tftp"; -char qhelp[] = "exit tftp"; -char hhelp[] = "print help information"; -char shelp[] = "send file"; -char rhelp[] = "receive file"; -char mhelp[] = "set file transfer mode"; -char sthelp[] = "show current status"; -char xhelp[] = "set per-packet retransmission timeout"; -char ihelp[] = "set total retransmission timeout"; -char ashelp[] = "set mode to netascii"; -char bnhelp[] = "set mode to octet"; - -struct cmd cmdtab[] = { - { "connect", chelp, setpeer }, - { "mode", mhelp, modecmd }, - { "put", shelp, put }, - { "get", rhelp, get }, - { "quit", qhelp, quit }, - { "verbose", vhelp, setverbose }, - { "trace", thelp, settrace }, - { "status", sthelp, status }, - { "binary", bnhelp, setbinary }, - { "ascii", ashelp, setascii }, - { "rexmt", xhelp, setrexmt }, - { "timeout", ihelp, settimeout }, - { "?", hhelp, help }, - { NULL, NULL, NULL } +static struct cmd cmdtab[] = { + { "connect", setpeer, "connect to remote tftp" }, + { "mode", modecmd, "set file transfer mode" }, + { "put", put, "send file" }, + { "get", get, "receive file" }, + { "quit", quit, "exit tftp" }, + { "verbose", setverbose, "toggle verbose mode" }, + { "status", showstatus, "show current status" }, + { "binary", setbinary, "set mode to octet" }, + { "ascii", setascii, "set mode to netascii" }, + { "rexmt", settimeoutpacket, + "set per-packet retransmission timeout[-]" }, + { "timeout", settimeoutnetwork, + "set total retransmission timeout" }, + { "trace", setdebug, "enable 'debug packet'[-]" }, + { "debug", setdebug, "enable verbose output" }, + { "blocksize", setblocksize, "set blocksize[*]" }, + { "blocksize2", setblocksize2, "set blocksize as a power of 2[**]" }, + { "rollover", setrollover, "rollover after 64K packets[**]" }, + { "options", setoptions, + "enable or disable RFC2347 style options" }, + { "help", help, "print help information" }, + { "packetdrop", setpacketdrop, "artifical packetloss feature" }, + { "?", help, "print help information" }, + { NULL, NULL, NULL } +}; + +static struct modes { + const char *m_name; + const char *m_mode; +} modes[] = { + { "ascii", "netascii" }, + { "netascii", "netascii" }, + { "binary", "octet" }, + { "image", "octet" }, + { "octet", "octet" }, + { NULL, NULL } }; int main(int argc, char *argv[]) { - f = -1; + + acting_as_client = 1; + peer = -1; strcpy(mode, "netascii"); signal(SIGINT, intr); if (argc > 1) { if (setjmp(toplevel) != 0) exit(txrx_error); + + if (strncmp(argv[1], "tftp://", 7) == 0) { + urihandling(argv[1]); + exit(txrx_error); + } + setpeer(argc, argv); } if (setjmp(toplevel) != 0) (void)putchar('\n'); + + init_options(); command(); } -char hostname[MAXHOSTNAMELEN]; +/* + * RFC3617 handling of TFTP URIs: + * + * tftpURI = "tftp://" host "/" file [ mode ] + * mode = ";" "mode=" ( "netascii" / "octet" ) + * file = *( unreserved / escaped ) + * host = + * unreserved = + * escaped = + * + * We are cheating a little bit by allowing any mode as specified in the + * modes table defined earlier on in this file and mapping it on the real + * mode. + */ +static void +urihandling(char *URI) +{ + char uri[ARG_MAX]; + char *host = NULL; + char *path = NULL; + char *options = NULL; + char *mode = "octet"; + char *s; + char line[MAXLINE]; + int i; + + strncpy(uri, URI, ARG_MAX); + host = uri + 7; + + if ((s = strchr(host, '/')) == NULL) { + fprintf(stderr, + "Invalid URI: Couldn't find / after hostname\n"); + exit(1); + } + *s = '\0'; + path = s + 1; + + if ((s = strchr(path, ';')) != NULL) { + *s = '\0'; + options = s + 1; + + if (strncmp(options, "mode=", 5) == 0) { + mode = options; + mode += 5; + + for (i = 0; modes[i].m_name != NULL; i++) { + if (strcmp(modes[i].m_name, mode) == 0) + break; + } + if (modes[i].m_name == NULL) { + fprintf(stderr, "Invalid mode: '%s'\n", mode); + exit(1); + } + settftpmode(modes[i].m_mode); + } + } else { + settftpmode("octet"); + } + + setpeer0(host, NULL); + + sprintf(line, "get %s", path); + makeargv(line); + get(margc, margv); +} + +static char hostname[MAXHOSTNAMELEN]; -void -setpeer0(char *host, const char *port) +static void +setpeer0(char *host, const char *lport) { struct addrinfo hints, *res0, *res; int error; - struct sockaddr_storage ss; const char *cause = "unknown"; if (connected) { - close(f); - f = -1; + close(peer); + peer = -1; } connected = 0; @@ -193,9 +288,9 @@ setpeer0(char *host, const char *port) hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; hints.ai_flags = AI_CANONNAME; - if (!port) - port = "tftp"; - error = getaddrinfo(host, port, &hints, &res0); + if (!lport) + lport = "tftp"; + error = getaddrinfo(host, lport, &hints, &res0); if (error) { warnx("%s", gai_strerror(error)); return; @@ -204,50 +299,53 @@ setpeer0(char *host, const char *port) for (res = res0; res; res = res->ai_next) { if (res->ai_addrlen > sizeof(peeraddr)) continue; - f = socket(res->ai_family, res->ai_socktype, res->ai_protocol); - if (f < 0) { + peer = socket(res->ai_family, res->ai_socktype, + res->ai_protocol); + if (peer < 0) { cause = "socket"; continue; } - memset(&ss, 0, sizeof(ss)); - ss.ss_family = res->ai_family; - ss.ss_len = res->ai_addrlen; - if (bind(f, (struct sockaddr *)&ss, ss.ss_len) < 0) { + memset(&peer_sock, 0, sizeof(peer_sock)); + peer_sock.ss_family = res->ai_family; + peer_sock.ss_len = res->ai_addrlen; + if (bind(peer, (struct sockaddr *)&peer_sock, peer_sock.ss_len) < 0) { cause = "bind"; - close(f); - f = -1; + close(peer); + peer = -1; continue; } break; } - if (f < 0) + if (peer < 0) warn("%s", cause); else { /* res->ai_addr <= sizeof(peeraddr) is guaranteed */ - memcpy(&peeraddr, res->ai_addr, res->ai_addrlen); + memcpy(&peer_sock, res->ai_addr, res->ai_addrlen); if (res->ai_canonname) { - (void) strlcpy(hostname, res->ai_canonname, + (void) strncpy(hostname, res->ai_canonname, sizeof(hostname)); } else - (void) strlcpy(hostname, host, sizeof(hostname)); + (void) strncpy(hostname, host, sizeof(hostname)); + hostname[sizeof(hostname)-1] = 0; connected = 1; } freeaddrinfo(res0); } -void +static void setpeer(int argc, char *argv[]) { + char line[MAXLINE]; if (argc < 2) { strcpy(line, "Connect "); printf("(to) "); fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(); + makeargv(line); argc = margc; argv = margv; } @@ -255,26 +353,14 @@ setpeer(int argc, char *argv[]) printf("usage: %s [host [port]]\n", argv[0]); return; } - if (argc == 3) + if (argc == 3) { + port = argv[2]; setpeer0(argv[1], argv[2]); - else + } else setpeer0(argv[1], NULL); } -struct modes { - const char *m_name; - const char *m_mode; -} modes[] = { - { "ascii", "netascii" }, - { "netascii", "netascii" }, - { "binary", "octet" }, - { "image", "octet" }, - { "octet", "octet" }, -/* { "mail", "mail" }, */ - { 0, 0 } -}; - -void +static void modecmd(int argc, char *argv[]) { struct modes *p; @@ -298,7 +384,7 @@ modecmd(int argc, char *argv[]) printf("usage: %s [", argv[0]); sep = " "; - for (p = modes; p->m_name; p++) { + for (p = modes; p->m_name != NULL; p++) { printf("%s%s", sep, p->m_name); if (*sep == ' ') sep = " | "; @@ -307,14 +393,14 @@ modecmd(int argc, char *argv[]) return; } -void +static void setbinary(int argc __unused, char *argv[] __unused) { settftpmode("octet"); } -void +static void setascii(int argc __unused, char *argv[] __unused) { @@ -324,6 +410,7 @@ setascii(int argc __unused, char *argv[] static void settftpmode(const char *newmode) { + strcpy(mode, newmode); if (verbose) printf("mode set to %s\n", mode); @@ -333,18 +420,20 @@ settftpmode(const char *newmode) /* * Send file(s). */ -void +static void put(int argc, char *argv[]) { - int fd; - int n; - char *cp, *targ; + int fd; + int n; + char *cp, *targ; + char line[MAXLINE]; + struct stat sb; if (argc < 2) { strcpy(line, "send "); printf("(file) "); fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(); + makeargv(line); argc = margc; argv = margv; } @@ -381,10 +470,14 @@ put(int argc, char *argv[]) warn("%s", cp); return; } + + stat(cp, &sb); + asprintf(&options[OPT_TSIZE].o_request, "%ju", sb.st_size); + if (verbose) printf("putting %s to %s:%s [%s]\n", - cp, hostname, targ, mode); - xmitfile(fd, targ, mode); + cp, hostname, targ, mode); + xmitfile(peer, port, fd, targ, mode); return; } /* this assumes the target is a directory */ @@ -398,36 +491,43 @@ put(int argc, char *argv[]) warn("%s", argv[n]); continue; } + + stat(cp, &sb); + asprintf(&options[OPT_TSIZE].o_request, "%ju", sb.st_size); + if (verbose) printf("putting %s to %s:%s [%s]\n", - argv[n], hostname, targ, mode); - xmitfile(fd, targ, mode); + argv[n], hostname, targ, mode); + xmitfile(peer, port, fd, targ, mode); } } static void -putusage(const char *s) +putusage(char *s) { - printf("usage: %s file [[host:]remotename]\n", s); + + printf("usage: %s file [remotename]\n", s); + printf(" %s file host:remotename\n", s); printf(" %s file1 file2 ... fileN [[host:]remote-directory]\n", s); } /* * Receive file(s). */ -void +static void get(int argc, char *argv[]) { int fd; int n; char *cp; char *src; + char line[MAXLINE]; if (argc < 2) { strcpy(line, "get "); printf("(files) "); fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(); + makeargv(line); argc = margc; argv = margv; } @@ -438,6 +538,8 @@ get(int argc, char *argv[]) if (!connected) { for (n = 1; n < argc ; n++) if (rindex(argv[n], ':') == 0) { + printf("No remote host specified and " + "no host given for file '%s'\n", argv[n]); getusage(argv[0]); return; } @@ -468,8 +570,8 @@ get(int argc, char *argv[]) } if (verbose) printf("getting from %s:%s to %s [%s]\n", - hostname, src, cp, mode); - recvfile(fd, src, mode); + hostname, src, cp, mode); + recvfile(peer, port, fd, src, mode); break; } cp = tail(src); /* new .. jdg */ @@ -480,30 +582,31 @@ get(int argc, char *argv[]) } if (verbose) printf("getting from %s:%s to %s [%s]\n", - hostname, src, cp, mode); - recvfile(fd, src, mode); + hostname, src, cp, mode); + recvfile(peer, port, fd, src, mode); } } static void -getusage(const char *s) +getusage(char *s) { - printf("usage: %s [host:]file [localname]\n", s); + + printf("usage: %s file [localname]\n", s); + printf(" %s [host:]file [localname]\n", s); printf(" %s [host1:]file1 [host2:]file2 ... [hostN:]fileN\n", s); } -int rexmtval = TIMEOUT; - -void -setrexmt(int argc, char *argv[]) +static void +settimeoutpacket(int argc, char *argv[]) { int t; + char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Rexmt-timeout "); + strcpy(line, "Packet timeout "); printf("(value) "); fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(); + makeargv(line); argc = margc; argv = margv; } @@ -512,24 +615,25 @@ setrexmt(int argc, char *argv[]) return; } t = atoi(argv[1]); - if (t < 0) + if (t < 0) { printf("%s: bad value\n", argv[1]); - else - rexmtval = t; -} + return; + } -int maxtimeout = 5 * TIMEOUT; + settimeouts(t, timeoutnetwork, maxtimeouts); +} -void -settimeout(int argc, char *argv[]) +static void +settimeoutnetwork(int argc, char *argv[]) { int t; + char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Maximum-timeout "); + strcpy(line, "Network timeout "); printf("(value) "); fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(); + makeargv(line); argc = margc; argv = margv; } @@ -538,26 +642,36 @@ settimeout(int argc, char *argv[]) return; } t = atoi(argv[1]); - if (t < 0) + if (t < 0) { printf("%s: bad value\n", argv[1]); - else - maxtimeout = t; + return; + } + + settimeouts(timeoutpacket, t, maxtimeouts); } -void -status(int argc __unused, char *argv[] __unused) +static void +showstatus(int argc __unused, char *argv[] __unused) { - if (connected) - printf("Connected to %s.\n", hostname); - else - printf("Not connected.\n"); - printf("Mode: %s Verbose: %s Tracing: %s\n", mode, - verbose ? "on" : "off", trace ? "on" : "off"); - printf("Rexmt-interval: %d seconds, Max-timeout: %d seconds\n", - rexmtval, maxtimeout); + + printf("Remote host: %s\n", + connected ? hostname : "none specified yet"); + printf("RFC2347 Options support: %s\n", + options_rfc_enabled ? "enabled" : "disabled"); + printf("Non-RFC defined options support: %s\n", + options_extra_enabled ? "enabled" : "disabled"); + printf("Mode: %s\n", mode); + printf("Verbose: %s\n", verbose ? "on" : "off"); + printf("Debug: %s\n", debug_show(debug)); + printf("Artificial packetloss: %d in 100 packets\n", + packetdroppercentage); + printf("Segment size: %d bytes\n", segsize); + printf("Network timeout: %d seconds\n", timeoutpacket); + printf("Maximum network timeout: %d seconds\n", timeoutnetwork); + printf("Maximum timeouts: %d \n", maxtimeouts); } -void +static void intr(int dummy __unused) { @@ -566,7 +680,7 @@ intr(int dummy __unused) longjmp(toplevel, -1); } -char * +static char * tail(char *filename) { char *s; @@ -583,7 +697,7 @@ tail(char *filename) } static const char * -command_prompt(void) +command_prompt() { return ("tftp> "); @@ -602,6 +716,7 @@ command(void) const char *bp; char *cp; int len, num, vrbose; + char line[MAXLINE]; vrbose = isatty(0); if (vrbose) { @@ -623,6 +738,7 @@ command(void) line[len] = '\0'; history(hist, &he, H_ENTER, bp); } else { + line[0] = 0; if (fgets(line, sizeof line , stdin) == 0) { if (feof(stdin)) { exit(txrx_error); @@ -635,7 +751,7 @@ command(void) *cp = '\0'; if (line[0] == 0) continue; - makeargv(); + makeargv(line); if (margc == 0) continue; c = getcmd(margv[0]); @@ -651,7 +767,7 @@ command(void) } } -struct cmd * +static struct cmd * getcmd(char *name) { const char *p, *q; @@ -683,15 +799,15 @@ getcmd(char *name) * Slice a string up into argc/argv. */ static void -makeargv(void) +makeargv(char *line) { char *cp; char **argp = margv; margc = 0; - if ((cp = strchr(line, '\n'))) + if ((cp = strchr(line, '\n')) != NULL) *cp = '\0'; - for (cp = line; margc < MAX_MARGV - 1 && *cp;) { + for (cp = line; margc < MAX_MARGV - 1 && *cp != '\0';) { while (isspace(*cp)) cp++; if (*cp == '\0') @@ -707,16 +823,17 @@ makeargv(void) *argp++ = 0; } -void +static void quit(int argc __unused, char *argv[] __unused) { + exit(txrx_error); } /* * Help command. */ -void +static void help(int argc, char *argv[]) { struct cmd *c; @@ -725,6 +842,10 @@ help(int argc, char *argv[]) printf("Commands may be abbreviated. Commands are:\n\n"); for (c = cmdtab; c->name; c++) printf("%-*s\t%s\n", (int)HELPINDENT, c->name, c->help); + + printf("\n[-] : You shouldn't use these ones anymore.\n"); + printf("[*] : RFC2834 options support required.\n"); + printf("[**] : Non-standard RFC2834 option.\n"); return; } while (--argc > 0) { @@ -732,24 +853,211 @@ help(int argc, char *argv[]) arg = *++argv; c = getcmd(arg); if (c == (struct cmd *)-1) - printf("?Ambiguous help command %s\n", arg); + printf("?Ambiguous help command: %s\n", arg); else if (c == (struct cmd *)0) - printf("?Invalid help command %s\n", arg); + printf("?Invalid help command: %s\n", arg); else printf("%s\n", c->help); } } -void -settrace(int argc __unused, char **argv __unused) +static void +setverbose(int argc __unused, char *argv[] __unused) { - trace = !trace; - printf("Packet tracing %s.\n", trace ? "on" : "off"); -} -void -setverbose(int argc __unused, char **argv __unused) -{ verbose = !verbose; printf("Verbose mode %s.\n", verbose ? "on" : "off"); } + +static void +setoptions(int argc, char *argv[]) +{ + + if (argc == 2) { + if (strcasecmp(argv[1], "enable") == 0 || + strcasecmp(argv[1], "on") == 0) { + options_extra_enabled = 1; + options_rfc_enabled = 1; + } + if (strcasecmp(argv[1], "disable") == 0 || + strcasecmp(argv[1], "off") == 0) { + options_extra_enabled = 0; + options_rfc_enabled = 0; + } + if (strcasecmp(argv[1], "extra") == 0) + options_extra_enabled = !options_extra_enabled; + } + printf("Support for RFC2347 style options are now %s.\n", + options_rfc_enabled ? "enabled" : "disabled"); + printf("Support for non-RFC defined options are now %s.\n", + options_extra_enabled ? "enabled" : "disabled"); + + printf("\nThe following options are available:\n" + "\toptions on : enable support for RFC2347 style options\n" + "\toptions off : disable support for RFC2347 style options\n" + "\toptions extra : toggle support for non-RFC defined options\n" + ); +} + +static void +setrollover(int argc, char *argv[]) +{ + + if (argc == 2) { + if (strcasecmp(argv[1], "never") == 0 || + strcasecmp(argv[1], "none") == 0) { + free(options[OPT_ROLLOVER].o_request); + options[OPT_ROLLOVER].o_request = NULL; + } + if (strcasecmp(argv[1], "1") == 0) { + free(options[OPT_ROLLOVER].o_request); + options[OPT_ROLLOVER].o_request = strdup("1"); + } + if (strcasecmp(argv[1], "0") == 0) { + free(options[OPT_ROLLOVER].o_request); + options[OPT_ROLLOVER].o_request = strdup("0"); + } + } + printf("Support for the rollover options is %s.\n", + options[OPT_ROLLOVER].o_request != NULL ? "enabled" : "disabled"); + if (options[OPT_ROLLOVER].o_request != NULL) + printf("Block rollover will be to block %s.\n", + options[OPT_ROLLOVER].o_request); + + + printf("\nThe following rollover options are available:\n" + "\trollover 0 : rollover to block zero (default)\n" + "\trollover 1 : rollover to block one\n" + "\trollover never : do not support the rollover option\n" + "\trollover none : do not support the rollover option\n" + ); +} + +static void +setdebug(int argc, char *argv[]) +{ + int i; + + if (argc != 1) { + i = 1; + while (i < argc) + debug ^= debug_find(argv[i++]); + } + printf("The following debugging is enabled: %s\n", debug_show(debug)); + + printf("\nThe following debugs are available:\n"); + i = 0; + while (debugs[i].name != NULL) { + printf("\t%s\t%s\n", debugs[i].name, debugs[i].desc); + i++; + } +} + +static void +setblocksize(int argc, char *argv[]) +{ + + if (!options_rfc_enabled) + printf("RFC2347 style options are not enabled " + "(but proceding anyway)\n"); + + if (argc != 1) { + int size = atoi(argv[1]); + size_t max; + char maxbuffer[100]; + int *maxdgram; + + max = sizeof(maxbuffer); + if (sysctlbyname("net.inet.udp.maxdgram", + maxbuffer, &max, NULL, 0) < 0) { + perror("sysctl: net.inet.udp.maxdgram"); + return; + } + maxdgram = (int *)maxbuffer; + + if (size < BLKSIZE_MIN || size > BLKSIZE_MAX) { + printf("Blocksize should be between %d and %d bytes.\n", + BLKSIZE_MIN, BLKSIZE_MAX); + return; + } else if (size > *maxdgram - 4) { + printf("Blocksize can't be bigger than %d bytes due " + "to the net.inet.udp.maxdgram sysctl limitation.\n", + *maxdgram - 4); + asprintf(&options[OPT_BLKSIZE].o_request, + "%d", *maxdgram - 4); + } else { + asprintf(&options[OPT_BLKSIZE].o_request, "%d", size); + } + } + printf("Blocksize is now %s bytes.\n", options[OPT_BLKSIZE].o_request); +} + +static void +setblocksize2(int argc, char *argv[]) +{ + + if (!options_rfc_enabled || !options_extra_enabled) + printf( + "RFC2347 style or non-RFC defined options are not enabled " + "(but proceding anyway)\n"); + + if (argc != 1) { + int size = atoi(argv[1]); + int i; + size_t max; + char maxbuffer[100]; + int *maxdgram; + + int sizes[] = { + 8, 16, 32, 64, 128, 256, 512, 1024, + 2048, 4096, 8192, 16384, 32768, 0 + }; + + max = sizeof(maxbuffer); + if (sysctlbyname("net.inet.udp.maxdgram", + maxbuffer, &max, NULL, 0) < 0) { + perror("sysctl: net.inet.udp.maxdgram"); + return; + } + maxdgram = (int *)maxbuffer; + + for (i = 0; sizes[i] != 0; i++) { + if (sizes[i] == size) break; + } + if (sizes[i] == 0) { + printf("Blocksize2 should be a power of two between " + "8 and 32768.\n"); + return; + } + + if (size < BLKSIZE_MIN || size > BLKSIZE_MAX) { + printf("Blocksize2 should be between " *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 4 06:19:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 603D7106566B; Tue, 4 May 2010 06:19:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8E78FC08; Tue, 4 May 2010 06:19: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 o446JKnU025089; Tue, 4 May 2010 06:19:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o446JKZU025085; Tue, 4 May 2010 06:19:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040619.o446JKZU025085@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 06:19: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: r207608 - head/libexec/tftpd 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, 04 May 2010 06:19:20 -0000 Author: imp Date: Tue May 4 06:19:19 2010 New Revision: 207608 URL: http://svn.freebsd.org/changeset/base/207608 Log: Go ahead and merge the work edwin@ on tftpd into the tree. It is a lot better than what's in the tree now. Edwin tested it at a prior employer, but can't test it today. I've found that it works a lot better with the various uboot versions that I've used in my embedded work. Here's the pkg-descr from the port that describes the changes: It all started when we got some new routers, which told me the following when trying to upload configuration or download images from it: The TFTP server doesn't support the blocksize option. My curiousity was triggered, it took me some reading of RFCs and other documentation to find out what was possible and what could be done. Was plain TFTP very simple in its handshake, TFTP with options was kind of messy because of its backwards capability: The first packet returned could either be an acknowledgement of options, or the first data packet. Going through the source code of src/libexec/tftpd and going through the code of src/usr.bin/tftp showed that there was a lot of duplicate code, and the addition of options would only increase the amount of duplicate code. After all, both the client and the server can act as a sender and receiver. At the end, it ended up with a nearly complete rewrite of the tftp client and server. It has been tested against the following TFTP clients and servers: - Itself (yay!) - The standard FreeBSD tftp client and server - The Fedora Core 6 tftp client and server - Cisco router tftp client - Extreme Networks tftp client It supports the following RFCs: RFC1350 - THE TFTP PROTOCOL (REVISION 2) RFC2347 - TFTP Option Extension RFC2348 - TFTP Blocksize Option RFC2349 - TFTP Timeout Interval and Transfer Size Options RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) It supports the following unofficial TFTP Options as described at http://www.compuphase.com/tftp.htm: blksize2 - Block size restricted to powers of 2, excluding protocol headers rollover - Block counter roll-over (roll back to zero or to one) From the tftp program point of view the following things are changed: - New commands: "blocksize", "blocksize2", "rollover" and "options" - Development features: "debug" and "packetdrop" If you try this tftp/tftpd implementation, please let me know if it works (or doesn't work) and against which implementaion so I can get a list of confirmed working systems. Author: Edwin Groothuis Modified: head/libexec/tftpd/Makefile head/libexec/tftpd/tftpd.8 head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/Makefile ============================================================================== --- head/libexec/tftpd/Makefile Tue May 4 06:13:17 2010 (r207607) +++ head/libexec/tftpd/Makefile Tue May 4 06:19:19 2010 (r207608) @@ -2,15 +2,14 @@ # $FreeBSD$ PROG= tftpd -SRCS= tftpd.c tftpsubs.c -DPADD= ${LIBUTIL} -LDADD= -lutil - -WARNS?= 1 +SRCS= tftpd.c tftp-io.c tftp-utils.c tftp-file.c tftp-transfer.c tftp-options.c +WARNS= 3 WFORMAT=0 - MAN= tftpd.8 -CFLAGS+=-I${.CURDIR}/../../usr.bin/tftp +CFLAGS=-g -Wall +CFLAGS+=-I${.CURDIR}/../../usr.bin/tftp -I${.CURDIR}/../../libexec/tftpd .PATH: ${.CURDIR}/../../usr.bin/tftp +COPTFLAGS = -O +LDFLAGS= -lwrap .include Modified: head/libexec/tftpd/tftpd.8 ============================================================================== --- head/libexec/tftpd/tftpd.8 Tue May 4 06:13:17 2010 (r207607) +++ head/libexec/tftpd/tftpd.8 Tue May 4 06:19:19 2010 (r207608) @@ -40,7 +40,7 @@ .Nd Internet Trivial File Transfer Protocol server .Sh SYNOPSIS .Nm tftpd -.Op Fl cClnwW +.Op Fl cdClnow .Op Fl F Ar strftime-format .Op Fl s Ar directory .Op Fl u Ar user @@ -150,6 +150,9 @@ compatible format string for the creatio .Fl W is specified. By default the string "%Y%m%d" is used. +.It Fl d +Enables debug output. +If specified twice, it will log DATA and ACK packets too. .It Fl l Log all requests using .Xr syslog 3 @@ -164,6 +167,8 @@ must also be enabled in the syslog confi .It Fl n Suppress negative acknowledgement of requests for nonexistent relative filenames. +.It Fl o +Disable support for RFC2347 style TFTP Options. .It Fl s Ar directory Cause .Nm @@ -240,10 +245,16 @@ and the and .Fl W options were introduced in -.Fx 8.0 . +.Fx 7 . .Pp +Support for Timeout Interval and Transfer Size Options (RFC2349) +was introduced in +.Fx 5.0 , +support for the TFTP Blocksize Option (RFC2348) and the blksize2 option +was introduced in +.Fx 7 . .Sh BUGS Files larger than 33488896 octets (65535 blocks) cannot be transferred -without client and server supporting blocksize negotiation (RFC1783). +without client and server supporting blocksize negotiation (RFC2348). .Pp Many tftp clients will not transfer files over 16744448 octets (32767 blocks). Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Tue May 4 06:13:17 2010 (r207607) +++ head/libexec/tftpd/tftpd.c Tue May 4 06:19:19 2010 (r207608) @@ -41,9 +41,9 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); /* * Trivial file transfer protocol server. @@ -56,43 +56,30 @@ static const char rcsid[] = #include #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include -#include -#include #include #include #include #include +#include #include -#include "tftpsubs.h" +#include "tftp-file.h" +#include "tftp-io.h" +#include "tftp-utils.h" +#include "tftp-transfer.h" +#include "tftp-options.h" -#define TIMEOUT 5 -#define MAX_TIMEOUTS 5 - -int peer; -int rexmtval = TIMEOUT; -int max_rexmtval = 2*TIMEOUT; - -#define PKTSIZE SEGSIZE+4 -char buf[PKTSIZE]; -char ackbuf[PKTSIZE]; -struct sockaddr_storage from; - -void tftp(struct tftphdr *, int); -static void unmappedaddr(struct sockaddr_in6 *); +static void tftp_wrq(int peer, char *, ssize_t); +static void tftp_rrq(int peer, char *, ssize_t); /* * Null-terminated directory prefix list for absolute pathname requests and @@ -112,31 +99,44 @@ static int ipchroot; static int create_new = 0; static char *newfile_format = "%Y%m%d"; static int increase_name = 0; -static mode_t mask = S_IWGRP|S_IWOTH; +static mode_t mask = S_IWGRP | S_IWOTH; + +struct formats; +static void tftp_recvfile(int peer, const char *mode); +static void tftp_xmitfile(int peer, const char *mode); +static int validate_access(int peer, char **, int); +static char peername[NI_MAXHOST]; -static const char *errtomsg(int); -static void nak(int); -static void oack(void); +FILE *file; -static void timer(int); -static void justquit(int); +struct formats { + const char *f_mode; + int f_convert; +} formats[] = { + { "netascii", 1 }, + { "octet", 0 }, + { NULL, 0 } +}; int main(int argc, char *argv[]) { struct tftphdr *tp; - socklen_t fromlen, len; - int n; - int ch, on; - struct sockaddr_storage me; - char *chroot_dir = NULL; - struct passwd *nobody; - const char *chuser = "nobody"; + int peer; + socklen_t peerlen, len; + ssize_t n; + int ch; + char *chroot_dir = NULL; + struct passwd *nobody; + const char *chuser = "nobody"; + char recvbuffer[MAXPKTSIZE]; + int allow_ro = 1, allow_wo = 1; tzset(); /* syslog in localtime */ + acting_as_client = 0; - openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP); - while ((ch = getopt(argc, argv, "cCF:lns:u:U:wW")) != -1) { + tftp_openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP); + while ((ch = getopt(argc, argv, "cCd:F:lnoOp:s:u:U:wW")) != -1) { switch (ch) { case 'c': ipchroot = 1; @@ -144,6 +144,12 @@ main(int argc, char *argv[]) case 'C': ipchroot = 2; break; + case 'd': + if (atoi(optarg) != 0) + debug += atoi(optarg); + else + debug |= debug_finds(optarg); + break; case 'F': newfile_format = optarg; break; @@ -153,6 +159,18 @@ main(int argc, char *argv[]) case 'n': suppress_naks = 1; break; + case 'o': + options_rfc_enabled = 0; + break; + case 'O': + options_extra_enabled = 0; + break; + case 'p': + packetdroppercentage = atoi(optarg); + tftp_log(LOG_INFO, + "Randomly dropping %d out of 100 packets", + packetdroppercentage); + break; case 's': chroot_dir = optarg; break; @@ -170,7 +188,8 @@ main(int argc, char *argv[]) increase_name = 1; break; default: - syslog(LOG_WARNING, "ignoring unknown option -%c", ch); + tftp_log(LOG_WARNING, + "ignoring unknown option -%c", ch); } } if (optind < argc) { @@ -191,24 +210,31 @@ main(int argc, char *argv[]) dirs->len = 1; } if (ipchroot > 0 && chroot_dir == NULL) { - syslog(LOG_ERR, "-c requires -s"); + tftp_log(LOG_ERR, "-c requires -s"); exit(1); } umask(mask); - on = 1; - if (ioctl(0, FIONBIO, &on) < 0) { - syslog(LOG_ERR, "ioctl(FIONBIO): %m"); - exit(1); + { + int on = 1; + if (ioctl(0, FIONBIO, &on) < 0) { + tftp_log(LOG_ERR, "ioctl(FIONBIO): %s", strerror(errno)); + exit(1); + } } - fromlen = sizeof (from); - n = recvfrom(0, buf, sizeof (buf), 0, - (struct sockaddr *)&from, &fromlen); + + /* Find out who we are talking to and what we are going to do */ + peerlen = sizeof(peer_sock); + n = recvfrom(0, recvbuffer, MAXPKTSIZE, 0, + (struct sockaddr *)&peer_sock, &peerlen); if (n < 0) { - syslog(LOG_ERR, "recvfrom: %m"); + tftp_log(LOG_ERR, "recvfrom: %s", strerror(errno)); exit(1); } + getnameinfo((struct sockaddr *)&peer_sock, peer_sock.ss_len, + peername, sizeof(peername), NULL, 0, NI_NUMERICHOST); + /* * Now that we have read the message out of the UDP * socket, we fork and exit. Thus, inetd will go back @@ -240,9 +266,9 @@ main(int argc, char *argv[]) * than one tftpd being started up to service * a single request from a single client. */ - fromlen = sizeof from; - i = recvfrom(0, buf, sizeof (buf), 0, - (struct sockaddr *)&from, &fromlen); + peerlen = sizeof peer_sock; + i = recvfrom(0, recvbuffer, MAXPKTSIZE, 0, + (struct sockaddr *)&peer_sock, &peerlen); if (i > 0) { n = i; } @@ -251,7 +277,7 @@ main(int argc, char *argv[]) } } if (pid < 0) { - syslog(LOG_ERR, "fork: %m"); + tftp_log(LOG_ERR, "fork: %s", strerror(errno)); exit(1); } else if (pid != 0) { exit(0); @@ -259,6 +285,55 @@ main(int argc, char *argv[]) } /* + * See if the client is allowed to talk to me. + * (This needs to be done before the chroot()) + */ + { + struct request_info req; + + request_init(&req, RQ_CLIENT_ADDR, peername, 0); + request_set(&req, RQ_DAEMON, "tftpd", 0); + + if (hosts_access(&req) == 0) { + if (debug&DEBUG_ACCESS) + tftp_log(LOG_WARNING, + "Access denied by 'tftpd' entry " + "in /etc/hosts.allow"); + + /* + * Full access might be disabled, but maybe the + * client is allowed to do read-only access. + */ + request_set(&req, RQ_DAEMON, "tftpd-ro", 0); + allow_ro = hosts_access(&req); + + request_set(&req, RQ_DAEMON, "tftpd-wo", 0); + allow_wo = hosts_access(&req); + + if (allow_ro == 0 && allow_wo == 0) { + tftp_log(LOG_WARNING, + "Unauthorized access from %s", peername); + exit(1); + } + + if (debug&DEBUG_ACCESS) { + if (allow_ro) + tftp_log(LOG_WARNING, + "But allowed readonly access " + "via 'tftpd-ro' entry"); + if (allow_wo) + tftp_log(LOG_WARNING, + "But allowed writeonly access " + "via 'tftpd-wo' entry"); + } + } else + if (debug&DEBUG_ACCESS) + tftp_log(LOG_WARNING, + "Full access allowed" + "in /etc/hosts.allow"); + } + + /* * Since we exit here, we should do that only after the above * recvfrom to keep inetd from constantly forking should there * be a problem. See the above comment about system clogging. @@ -271,7 +346,8 @@ main(int argc, char *argv[]) struct sockaddr_storage ss; char hbuf[NI_MAXHOST]; - memcpy(&ss, &from, from.ss_len); + statret = -1; + memcpy(&ss, &peer_sock, peer_sock.ss_len); unmappedaddr((struct sockaddr_in6 *)&ss); getnameinfo((struct sockaddr *)&ss, ss.ss_len, hbuf, sizeof(hbuf), NULL, 0, @@ -285,11 +361,12 @@ main(int argc, char *argv[]) } /* Must get this before chroot because /etc might go away */ if ((nobody = getpwnam(chuser)) == NULL) { - syslog(LOG_ERR, "%s: no such user", chuser); + tftp_log(LOG_ERR, "%s: no such user", chuser); exit(1); } if (chroot(chroot_dir)) { - syslog(LOG_ERR, "chroot: %s: %m", chroot_dir); + tftp_log(LOG_ERR, "chroot: %s: %s", + chroot_dir, strerror(errno)); exit(1); } chdir("/"); @@ -297,44 +374,56 @@ main(int argc, char *argv[]) setuid(nobody->pw_uid); } - len = sizeof(me); - if (getsockname(0, (struct sockaddr *)&me, &len) == 0) { - switch (me.ss_family) { + len = sizeof(me_sock); + if (getsockname(0, (struct sockaddr *)&me_sock, &len) == 0) { + switch (me_sock.ss_family) { case AF_INET: - ((struct sockaddr_in *)&me)->sin_port = 0; + ((struct sockaddr_in *)&me_sock)->sin_port = 0; break; case AF_INET6: - ((struct sockaddr_in6 *)&me)->sin6_port = 0; + ((struct sockaddr_in6 *)&me_sock)->sin6_port = 0; break; default: /* unsupported */ break; } } else { - memset(&me, 0, sizeof(me)); - me.ss_family = from.ss_family; - me.ss_len = from.ss_len; + memset(&me_sock, 0, sizeof(me_sock)); + me_sock.ss_family = peer_sock.ss_family; + me_sock.ss_len = peer_sock.ss_len; } - alarm(0); close(0); close(1); - peer = socket(from.ss_family, SOCK_DGRAM, 0); + peer = socket(peer_sock.ss_family, SOCK_DGRAM, 0); if (peer < 0) { - syslog(LOG_ERR, "socket: %m"); + tftp_log(LOG_ERR, "socket: %s", strerror(errno)); exit(1); } - if (bind(peer, (struct sockaddr *)&me, me.ss_len) < 0) { - syslog(LOG_ERR, "bind: %m"); + if (bind(peer, (struct sockaddr *)&me_sock, me_sock.ss_len) < 0) { + tftp_log(LOG_ERR, "bind: %s", strerror(errno)); exit(1); } - if (connect(peer, (struct sockaddr *)&from, from.ss_len) < 0) { - syslog(LOG_ERR, "connect: %m"); - exit(1); - } - tp = (struct tftphdr *)buf; + + tp = (struct tftphdr *)recvbuffer; tp->th_opcode = ntohs(tp->th_opcode); - if (tp->th_opcode == RRQ || tp->th_opcode == WRQ) - tftp(tp, n); + if (tp->th_opcode == RRQ) { + if (allow_ro) + tftp_rrq(peer, tp->th_stuff, n - 1); + else { + tftp_log(LOG_WARNING, + "%s read access denied", peername); + exit(1); + } + } + if (tp->th_opcode == WRQ) { + if (allow_wo) + tftp_wrq(peer, tp->th_stuff, n - 1); + else { + tftp_log(LOG_WARNING, + "%s write access denied", peername); + exit(1); + } + } exit(1); } @@ -369,138 +458,145 @@ reduce_path(char *fn) } } -struct formats; -int validate_access(char **, int); -void xmitfile(struct formats *); -void recvfile(struct formats *); +static char * +parse_header(int peer, char *recvbuffer, ssize_t size, + char **filename, char **mode) +{ + char *cp; + int i; + struct formats *pf; -struct formats { - const char *f_mode; - int (*f_validate)(char **, int); - void (*f_send)(struct formats *); - void (*f_recv)(struct formats *); - int f_convert; -} formats[] = { - { "netascii", validate_access, xmitfile, recvfile, 1 }, - { "octet", validate_access, xmitfile, recvfile, 0 }, -#ifdef notdef - { "mail", validate_user, sendmail, recvmail, 1 }, -#endif - { 0, NULL, NULL, NULL, 0 } -}; + *mode = NULL; + cp = recvbuffer; -struct options { - const char *o_type; - char *o_request; - int o_reply; /* turn into union if need be */ -} options[] = { - { "tsize", NULL, 0 }, /* OPT_TSIZE */ - { "timeout", NULL, 0 }, /* OPT_TIMEOUT */ - { NULL, NULL, 0 } -}; + i = get_field(peer, recvbuffer, size); + if (i >= PATH_MAX) { + tftp_log(LOG_ERR, "Bad option - filename too long"); + send_error(peer, EBADOP); + exit(1); + } + *filename = recvbuffer; + tftp_log(LOG_INFO, "Filename: '%s'", *filename); + cp += i; -enum opt_enum { - OPT_TSIZE = 0, - OPT_TIMEOUT, -}; + i = get_field(peer, cp, size); + *mode = cp; + cp += i; + + /* Find the file transfer mode */ + for (cp = *mode; *cp; cp++) + if (isupper(*cp)) + *cp = tolower(*cp); + for (pf = formats; pf->f_mode; pf++) + if (strcmp(pf->f_mode, *mode) == 0) + break; + if (pf->f_mode == NULL) { + tftp_log(LOG_ERR, + "Bad option - Unknown transfer mode (%s)", *mode); + send_error(peer, EBADOP); + exit(1); + } + tftp_log(LOG_INFO, "Mode: '%s'", *mode); + + return (cp + 1); +} /* - * Handle initial connection protocol. + * WRQ - receive a file from the client */ void -tftp(struct tftphdr *tp, int size) +tftp_wrq(int peer, char *recvbuffer, ssize_t size) { char *cp; - int i, first = 1, has_options = 0, ecode; - struct formats *pf; - char *filename, *mode, *option, *ccp; + int has_options = 0, ecode; + char *filename, *mode; char fnbuf[PATH_MAX]; - cp = tp->th_stuff; -again: - while (cp < buf + size) { - if (*cp == '\0') - break; - cp++; + cp = parse_header(peer, recvbuffer, size, &filename, &mode); + size -= (cp - recvbuffer) + 1; + + strcpy(fnbuf, filename); + reduce_path(fnbuf); + filename = fnbuf; + + if (size > 0) { + if (options_rfc_enabled) + has_options = !parse_options(peer, cp, size); + else + tftp_log(LOG_INFO, "Options found but not enabled"); } - if (*cp != '\0') { - nak(EBADOP); - exit(1); + + ecode = validate_access(peer, &filename, WRQ); + if (ecode == 0) { + if (has_options) + send_oack(peer); + else + send_ack(peer, 0); } - i = cp - tp->th_stuff; - if (i >= sizeof(fnbuf)) { - nak(EBADOP); - exit(1); + if (logging) { + tftp_log(LOG_INFO, "%s: write request for %s: %s", peername, + filename, errtomsg(ecode)); } - memcpy(fnbuf, tp->th_stuff, i); - fnbuf[i] = '\0'; + + tftp_recvfile(peer, mode); + exit(0); +} + +/* + * RRQ - send a file to the client + */ +void +tftp_rrq(int peer, char *recvbuffer, ssize_t size) +{ + char *cp; + int has_options = 0, ecode; + char *filename, *mode; + char fnbuf[PATH_MAX]; + + cp = parse_header(peer, recvbuffer, size, &filename, &mode); + size -= (cp - recvbuffer) + 1; + + strcpy(fnbuf, filename); reduce_path(fnbuf); filename = fnbuf; - if (first) { - mode = ++cp; - first = 0; - goto again; - } - for (cp = mode; *cp; cp++) - if (isupper(*cp)) - *cp = tolower(*cp); - for (pf = formats; pf->f_mode; pf++) - if (strcmp(pf->f_mode, mode) == 0) - break; - if (pf->f_mode == 0) { - nak(EBADOP); - exit(1); - } - while (++cp < buf + size) { - for (i = 2, ccp = cp; i > 0; ccp++) { - if (ccp >= buf + size) { - /* - * Don't reject the request, just stop trying - * to parse the option and get on with it. - * Some Apple Open Firmware versions have - * trailing garbage on the end of otherwise - * valid requests. - */ - goto option_fail; - } else if (*ccp == '\0') - i--; - } - for (option = cp; *cp; cp++) - if (isupper(*cp)) - *cp = tolower(*cp); - for (i = 0; options[i].o_type != NULL; i++) - if (strcmp(option, options[i].o_type) == 0) { - options[i].o_request = ++cp; - has_options = 1; - } - cp = ccp-1; + + if (size > 0) { + if (options_rfc_enabled) + has_options = !parse_options(peer, cp, size); + else + tftp_log(LOG_INFO, "Options found but not enabled"); } -option_fail: - if (options[OPT_TIMEOUT].o_request) { - int to = atoi(options[OPT_TIMEOUT].o_request); - if (to < 1 || to > 255) { - nak(EBADOP); - exit(1); + ecode = validate_access(peer, &filename, RRQ); + if (ecode == 0) { + if (has_options) { + int n; + char lrecvbuffer[MAXPKTSIZE]; + struct tftphdr *rp = (struct tftphdr *)lrecvbuffer; + + send_oack(peer); + n = receive_packet(peer, lrecvbuffer, MAXPKTSIZE, + NULL, timeoutpacket); + if (n < 0) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, "Aborting: %s", + rp_strerror(n)); + return; + } + if (rp->th_opcode != ACK) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Expected ACK, got %s on OACK", + packettype(rp->th_opcode)); + return; + } } - else if (to <= max_rexmtval) - options[OPT_TIMEOUT].o_reply = rexmtval = to; - else - options[OPT_TIMEOUT].o_request = NULL; } - ecode = (*pf->f_validate)(&filename, tp->th_opcode); - if (has_options && ecode == 0) - oack(); - if (logging) { - char hbuf[NI_MAXHOST]; + if (logging) + tftp_log(LOG_INFO, "%s: read request for %s: %s", peername, + filename, errtomsg(ecode)); - getnameinfo((struct sockaddr *)&from, from.ss_len, - hbuf, sizeof(hbuf), NULL, 0, 0); - syslog(LOG_INFO, "%s: %s request for %s: %s", hbuf, - tp->th_opcode == WRQ ? "write" : "read", - filename, errtomsg(ecode)); - } if (ecode) { /* * Avoid storms of naks to a RRQ broadcast for a relative @@ -508,19 +604,13 @@ option_fail: */ if (suppress_naks && *filename != '/' && ecode == ENOTFOUND) exit(0); - nak(ecode); + tftp_log(LOG_ERR, "Prevent NAK storm"); + send_error(peer, ecode); exit(1); } - if (tp->th_opcode == WRQ) - (*pf->f_recv)(pf); - else - (*pf->f_send)(pf); - exit(0); + tftp_xmitfile(peer, mode); } - -FILE *file; - /* * Find the next value for YYYYMMDD.nn when the file to be written should * be unique. Due to the limitations of nn, we will fail if nn reaches 100. @@ -536,8 +626,6 @@ find_next_name(char *filename, int *fd) struct tm lt; char yyyymmdd[MAXPATHLEN]; char newname[MAXPATHLEN]; - struct stat sb; - int ret; /* Create the YYYYMMDD part of the filename */ time(&tval); @@ -553,7 +641,7 @@ find_next_name(char *filename, int *fd) /* Make sure the new filename is not too long */ if (strlen(filename) > MAXPATHLEN - len - 5) { syslog(LOG_WARNING, - "Filename too long (%d characters, %d maximum)", + "Filename too long (%zd characters, %zd maximum)", strlen(filename), MAXPATHLEN - len - 5); return (EACCESS); } @@ -584,7 +672,7 @@ find_next_name(char *filename, int *fd) * given as we have no login directory. */ int -validate_access(char **filep, int mode) +validate_access(int peer, char **filep, int mode) { struct stat stbuf; int fd; @@ -660,14 +748,13 @@ validate_access(char **filep, int mode) else if (mode == RRQ) return (err); } - if (options[OPT_TSIZE].o_request) { - if (mode == RRQ) - options[OPT_TSIZE].o_reply = stbuf.st_size; - else - /* XXX Allows writes of all sizes. */ - options[OPT_TSIZE].o_reply = - atoi(options[OPT_TSIZE].o_request); - } + + /* + * This option is handled here because it (might) require(s) the + * size of the file. + */ + option_tsize(peer, NULL, mode, &stbuf); + if (mode == RRQ) fd = open(filename, O_RDONLY); else { @@ -694,305 +781,60 @@ validate_access(char **filep, int mode) return (0); } -int timeouts; -jmp_buf timeoutbuf; - -void -timer(int sig __unused) +static void +tftp_xmitfile(int peer, const char *mode) { - if (++timeouts > MAX_TIMEOUTS) - exit(1); - longjmp(timeoutbuf, 1); -} + uint16_t block; + uint32_t amount; + time_t now; + struct tftp_stats ts; + + now = time(NULL); + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, "Transmitting file"); -/* - * Send the requested file. - */ -void -xmitfile(struct formats *pf) -{ - struct tftphdr *dp; - struct tftphdr *ap; /* ack packet */ - int size, n; - volatile unsigned short block; - - signal(SIGALRM, timer); - dp = r_init(); - ap = (struct tftphdr *)ackbuf; + read_init(0, file, mode); block = 1; - do { - size = readit(file, &dp, pf->f_convert); - if (size < 0) { - nak(errno + 100); - goto abort; - } - dp->th_opcode = htons((u_short)DATA); - dp->th_block = htons((u_short)block); - timeouts = 0; - (void)setjmp(timeoutbuf); - -send_data: - { - int i, t = 1; - for (i = 0; ; i++){ - if (send(peer, dp, size + 4, 0) != size + 4) { - sleep(t); - t = (t < 32) ? t<< 1 : t; - if (i >= 12) { - syslog(LOG_ERR, "write: %m"); - goto abort; - } - } - break; - } - } - read_ahead(file, pf->f_convert); - for ( ; ; ) { - alarm(rexmtval); /* read the ack */ - n = recv(peer, ackbuf, sizeof (ackbuf), 0); - alarm(0); - if (n < 0) { - syslog(LOG_ERR, "read: %m"); - goto abort; - } - ap->th_opcode = ntohs((u_short)ap->th_opcode); - ap->th_block = ntohs((u_short)ap->th_block); - - if (ap->th_opcode == ERROR) - goto abort; - - if (ap->th_opcode == ACK) { - if (ap->th_block == block) - break; - /* Re-synchronize with the other side */ - (void) synchnet(peer); - if (ap->th_block == (block -1)) - goto send_data; - } - - } - block++; - } while (size == SEGSIZE); -abort: - (void) fclose(file); + tftp_send(peer, &block, &ts); + read_close(); + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_INFO, "Sent %d bytes in %d seconds", + amount, time(NULL) - now); } -void -justquit(int sig __unused) +static void +tftp_recvfile(int peer, const char *mode) { - exit(0); -} + uint32_t filesize; + uint16_t block; + struct timeval now1, now2; + struct tftp_stats ts; + + gettimeofday(&now1, NULL); + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, "Receiving file"); + write_init(0, file, mode); -/* - * Receive a file. - */ -void -recvfile(struct formats *pf) -{ - struct tftphdr *dp; - struct tftphdr *ap; /* ack buffer */ - int n, size; - volatile unsigned short block; - - signal(SIGALRM, timer); - dp = w_init(); - ap = (struct tftphdr *)ackbuf; block = 0; - do { - timeouts = 0; - ap->th_opcode = htons((u_short)ACK); - ap->th_block = htons((u_short)block); - block++; - (void) setjmp(timeoutbuf); -send_ack: - if (send(peer, ackbuf, 4, 0) != 4) { - syslog(LOG_ERR, "write: %m"); - goto abort; - } - write_behind(file, pf->f_convert); - for ( ; ; ) { - alarm(rexmtval); - n = recv(peer, dp, PKTSIZE, 0); - alarm(0); - if (n < 0) { /* really? */ - syslog(LOG_ERR, "read: %m"); - goto abort; - } - dp->th_opcode = ntohs((u_short)dp->th_opcode); - dp->th_block = ntohs((u_short)dp->th_block); - if (dp->th_opcode == ERROR) - goto abort; - if (dp->th_opcode == DATA) { - if (dp->th_block == block) { - break; /* normal */ - } - /* Re-synchronize with the other side */ - (void) synchnet(peer); - if (dp->th_block == (block-1)) - goto send_ack; /* rexmit */ - } - } - /* size = write(file, dp->th_data, n - 4); */ - size = writeit(file, &dp, n - 4, pf->f_convert); - if (size != (n-4)) { /* ahem */ - if (size < 0) nak(errno + 100); - else nak(ENOSPACE); - goto abort; - } - } while (size == SEGSIZE); - write_behind(file, pf->f_convert); - (void) fclose(file); /* close data file */ - - ap->th_opcode = htons((u_short)ACK); /* send the "final" ack */ - ap->th_block = htons((u_short)(block)); - (void) send(peer, ackbuf, 4, 0); - - signal(SIGALRM, justquit); /* just quit on timeout */ - alarm(rexmtval); - n = recv(peer, buf, sizeof (buf), 0); /* normally times out and quits */ - alarm(0); - if (n >= 4 && /* if read some data */ - dp->th_opcode == DATA && /* and got a data block */ - block == dp->th_block) { /* then my last ack was lost */ - (void) send(peer, ackbuf, 4, 0); /* resend final ack */ - } -abort: - return; -} - -struct errmsg { - int e_code; - const char *e_msg; -} errmsgs[] = { - { EUNDEF, "Undefined error code" }, - { ENOTFOUND, "File not found" }, - { EACCESS, "Access violation" }, - { ENOSPACE, "Disk full or allocation exceeded" }, - { EBADOP, "Illegal TFTP operation" }, - { EBADID, "Unknown transfer ID" }, - { EEXISTS, "File already exists" }, - { ENOUSER, "No such user" }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 4 08:06:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40DF11065672; Tue, 4 May 2010 08:06:54 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF738FC17; Tue, 4 May 2010 08:06: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 o4486sfx048826; Tue, 4 May 2010 08:06:54 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4486sYU048823; Tue, 4 May 2010 08:06:54 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201005040806.o4486sYU048823@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 4 May 2010 08:06: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: r207609 - stable/8/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: Tue, 04 May 2010 08:06:54 -0000 Author: edwin Date: Tue May 4 08:06:53 2010 New Revision: 207609 URL: http://svn.freebsd.org/changeset/base/207609 Log: MFC of r201613, r201627 Be able to specify a certain date and/or time for which to calculate the phase of the moon. While not worlds best improvements, it will help calendar(1) later on. Also closed bin/79008 PR: bin/79008 Modified: stable/8/games/pom/pom.6 stable/8/games/pom/pom.c Directory Properties: stable/8/games/pom/ (props changed) Modified: stable/8/games/pom/pom.6 ============================================================================== --- stable/8/games/pom/pom.6 Tue May 4 06:19:19 2010 (r207608) +++ stable/8/games/pom/pom.6 Tue May 4 08:06:53 2010 (r207609) @@ -32,15 +32,34 @@ .\" @(#)pom.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.TH POM 6 "May 31, 1993" +.Dd May 31, 1993 +.Dt POM 6 .UC 7 -.SH NAME -pom \- display the phase of the moon -.SH SYNOPSIS -.B pom -.SH DESCRIPTION +.Sh NAME +.Nm pom +.Nd display the phase of the moon +.Sh SYNOPSIS +.Nm +.Op Fl d Ar yyyy.mm.dd +.Op Fl t Ar hh:mm:ss +.Sh DESCRIPTION The -.I pom +.Nm utility displays the current phase of the moon. Useful for selecting software completion target dates and predicting managerial behavior. +.Pp +Use the arguments +.Fl d +and +.Fl o +to specify a specific date and time for which the phase of the moon +has to be calculated. +If +.Fl d +but not +.Fl t +has been specified, it will calculate the phase of the moon on that +day at midnight. +.Sh SEE ALSO +`Practical Astronomy with Your Calculator' by Duffett-Smith. Modified: stable/8/games/pom/pom.c ============================================================================== --- stable/8/games/pom/pom.c Tue May 4 06:19:19 2010 (r207608) +++ stable/8/games/pom/pom.c Tue May 4 08:06:53 2010 (r207609) @@ -57,9 +57,13 @@ __FBSDID("$FreeBSD$"); * */ -#include #include +#include #include +#include +#include +#include +#include #ifndef PI #define PI 3.14159265358979323846 @@ -76,20 +80,62 @@ __FBSDID("$FreeBSD$"); static void adj360(double *); static double dtor(double); static double potm(double); +static void usage(char *progname); int -main(void) +main(int argc, char **argv) { time_t tt; - struct tm *GMT; + struct tm GMT, tmd; double days, today, tomorrow; - int cnt; + int ch, cnt; + char *odate = NULL, *otime = NULL; + + while ((ch = getopt(argc, argv, "d:t:")) != -1) + switch (ch) { + case 'd': + odate = optarg; + break; + case 't': + otime = optarg; + break; + default: + usage(argv[0]); + } + + argc -= optind; + argv += optind; + + if (argc) + usage(argv[0]); - (void) time(&tt); - GMT = gmtime(&tt); - days = (GMT->tm_yday + 1) + ((GMT->tm_hour + - (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0); - for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt) + /* Adjust based on users preferences */ + time(&tt); + if (otime != NULL || odate != NULL) { + /* Save today in case -d isn't specified */ + localtime_r(&tt, &tmd); + + if (odate != NULL) { + tmd.tm_year = strtol(odate, NULL, 10) - 1900; + tmd.tm_mon = strtol(odate + 5, NULL, 10) - 1; + tmd.tm_mday = strtol(odate + 8, NULL, 10); + /* Use midnight as the middle of the night */ + tmd.tm_hour = 0; + tmd.tm_min = 0; + tmd.tm_sec = 0; + } + if (otime != NULL) { + tmd.tm_hour = strtol(otime, NULL, 10); + tmd.tm_min = strtol(otime + 3, NULL, 10); + tmd.tm_sec = strtol(otime + 6, NULL, 10); + } + tt = mktime(&tmd); + } + + gmtime_r(&tt, &GMT); + days = (GMT.tm_yday + 1) + ((GMT.tm_hour + + (GMT.tm_min / 60.0) + (GMT.tm_sec / 3600.0)) / 24.0); + for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) days += isleap(1900 + cnt) ? 366 : 365; today = potm(days) + .5; (void)printf("The Moon is "); @@ -160,6 +206,7 @@ potm(double days) static double dtor(double deg) { + return(deg * PI / 180); } @@ -170,6 +217,7 @@ dtor(double deg) static void adj360(double *deg) { + for (;;) if (*deg < 0) *deg += 360; @@ -178,3 +226,11 @@ adj360(double *deg) else break; } + +static void +usage(char *progname) +{ + + fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname); + exit(EX_USAGE); +} From owner-svn-src-all@FreeBSD.ORG Tue May 4 08:37:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C6EF1065672; Tue, 4 May 2010 08:37:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0BDFA8FC12; Tue, 4 May 2010 08:37: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 o448bSTj055607; Tue, 4 May 2010 08:37:28 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o448bS5f055605; Tue, 4 May 2010 08:37:28 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005040837.o448bS5f055605@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 May 2010 08:37:28 +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: r207610 - 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, 04 May 2010 08:37:29 -0000 Author: mm Date: Tue May 4 08:37:28 2010 New Revision: 207610 URL: http://svn.freebsd.org/changeset/base/207610 Log: MFC r207480: Change description of tunable group vfs.zfs.txg to be more understandable. Approved by: pjd, delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue May 4 08:06:53 2010 (r207609) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue May 4 08:37:28 2010 (r207610) @@ -40,7 +40,8 @@ int zfs_txg_timeout = 30; /* max seconds extern int zfs_txg_synctime; SYSCTL_DECL(_vfs_zfs); -SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, "ZFS TXG"); +SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, + "ZFS transaction groups (TXG)"); TUNABLE_INT("vfs.zfs.txg.timeout", &zfs_txg_timeout); SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RDTUN, &zfs_txg_timeout, 0, "Maximum seconds worth of delta per txg"); From owner-svn-src-all@FreeBSD.ORG Tue May 4 10:14:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57573106566C; Tue, 4 May 2010 10:14:06 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44D618FC16; Tue, 4 May 2010 10: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 o44AE6kX076886; Tue, 4 May 2010 10:14:06 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44AE6A6076880; Tue, 4 May 2010 10:14:06 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201005041014.o44AE6A6076880@svn.freebsd.org> From: Kevin Lo Date: Tue, 4 May 2010 10: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: r207611 - in head/sys: arm/arm arm/include 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: Tue, 04 May 2010 10:14:06 -0000 Author: kevlo Date: Tue May 4 10:14:05 2010 New Revision: 207611 URL: http://svn.freebsd.org/changeset/base/207611 Log: Add support for FA626TE. Tested on GM8181 development board. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/identcpu.c head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue May 4 08:37:28 2010 (r207610) +++ head/sys/arm/arm/cpufunc.c Tue May 4 10:14:05 2010 (r207611) @@ -783,69 +783,66 @@ struct cpu_functions xscalec3_cpufuncs = #endif /* CPU_XSCALE_81342 */ -#if defined(CPU_FA526) +#if defined(CPU_FA526) || defined(CPU_FA626TE) struct cpu_functions fa526_cpufuncs = { /* CPU functions */ - .cf_id = cpufunc_id, - .cf_cpwait = cpufunc_nullop, + cpufunc_id, /* id */ + cpufunc_nullop, /* cpwait */ /* MMU functions */ - .cf_control = cpufunc_control, - .cf_domains = cpufunc_domains, - .cf_setttb = fa526_setttb, - .cf_faultstatus = cpufunc_faultstatus, - .cf_faultaddress = cpufunc_faultaddress, + cpufunc_control, /* control */ + cpufunc_domains, /* domain */ + fa526_setttb, /* setttb */ + cpufunc_faultstatus, /* faultstatus */ + cpufunc_faultaddress, /* faultaddress */ /* TLB functions */ - .cf_tlb_flushID = armv4_tlb_flushID, - .cf_tlb_flushID_SE = fa526_tlb_flushID_SE, - .cf_tlb_flushI = armv4_tlb_flushI, - .cf_tlb_flushI_SE = fa526_tlb_flushI_SE, - .cf_tlb_flushD = armv4_tlb_flushD, - .cf_tlb_flushD_SE = armv4_tlb_flushD_SE, + armv4_tlb_flushID, /* tlb_flushID */ + fa526_tlb_flushID_SE, /* tlb_flushID_SE */ + armv4_tlb_flushI, /* tlb_flushI */ + fa526_tlb_flushI_SE, /* tlb_flushI_SE */ + armv4_tlb_flushD, /* tlb_flushD */ + armv4_tlb_flushD_SE, /* tlb_flushD_SE */ /* Cache operations */ - .cf_icache_sync_all = fa526_icache_sync_all, - .cf_icache_sync_range = fa526_icache_sync_range, - - .cf_dcache_wbinv_all = fa526_dcache_wbinv_all, - .cf_dcache_wbinv_range = fa526_dcache_wbinv_range, - .cf_dcache_inv_range = fa526_dcache_inv_range, - .cf_dcache_wb_range = fa526_dcache_wb_range, - - .cf_idcache_wbinv_all = fa526_idcache_wbinv_all, - .cf_idcache_wbinv_range = fa526_idcache_wbinv_range, - - - .cf_l2cache_wbinv_all = cpufunc_nullop, - .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, - .cf_l2cache_inv_range = (void *)cpufunc_nullop, - .cf_l2cache_wb_range = (void *)cpufunc_nullop, + fa526_icache_sync_all, /* icache_sync_all */ + fa526_icache_sync_range, /* icache_sync_range */ + fa526_dcache_wbinv_all, /* dcache_wbinv_all */ + fa526_dcache_wbinv_range, /* dcache_wbinv_range */ + fa526_dcache_inv_range, /* dcache_inv_range */ + fa526_dcache_wb_range, /* dcache_wb_range */ + + fa526_idcache_wbinv_all, /* idcache_wbinv_all */ + fa526_idcache_wbinv_range, /* idcache_wbinv_range */ + cpufunc_nullop, /* l2cache_wbinv_all */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ - .cf_flush_prefetchbuf = fa526_flush_prefetchbuf, - .cf_drain_writebuf = armv4_drain_writebuf, - .cf_flush_brnchtgt_C = cpufunc_nullop, - .cf_flush_brnchtgt_E = fa526_flush_brnchtgt_E, + fa526_flush_prefetchbuf, /* flush_prefetchbuf */ + armv4_drain_writebuf, /* drain_writebuf */ + cpufunc_nullop, /* flush_brnchtgt_C */ + fa526_flush_brnchtgt_E, /* flush_brnchtgt_E */ - .cf_sleep = fa526_cpu_sleep, + fa526_cpu_sleep, /* sleep */ /* Soft functions */ - .cf_dataabt_fixup = cpufunc_null_fixup, - .cf_prefetchabt_fixup = cpufunc_null_fixup, + cpufunc_null_fixup, /* dataabt_fixup */ + cpufunc_null_fixup, /* prefetchabt_fixup */ - .cf_context_switch = fa526_context_switch, + fa526_context_switch, /* context_switch */ - .cf_setup = fa526_setup -}; -#endif /* CPU_FA526 */ + fa526_setup /* cpu setup */ +}; +#endif /* CPU_FA526 || CPU_FA626TE */ /* @@ -856,11 +853,11 @@ struct cpu_functions cpufuncs; u_int cputype; u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */ -#if defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined(CPU_ARM9) || \ - defined (CPU_ARM9E) || defined (CPU_ARM10) || \ - defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ - defined(CPU_FA526) || \ +#if defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined(CPU_ARM9) || \ + defined (CPU_ARM9E) || defined (CPU_ARM10) || \ + defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ + defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_FA526) || defined(CPU_FA626TE) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) static void get_cachetype_cp15(void); @@ -1141,8 +1138,8 @@ set_cpufuncs() goto out; } #endif /* CPU_SA1110 */ -#ifdef CPU_FA526 - if (cputype == CPU_ID_FA526) { +#if defined(CPU_FA526) || defined(CPU_FA626TE) + if (cputype == CPU_ID_FA526 || cputype == CPU_ID_FA626TE) { cpufuncs = fa526_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ get_cachetype_cp15(); @@ -1153,7 +1150,7 @@ set_cpufuncs() goto out; } -#endif /* CPU_FA526 */ +#endif /* CPU_FA526 || CPU_FA626TE */ #ifdef CPU_IXP12X0 if (cputype == CPU_ID_IXP1200) { cpufuncs = ixp12x0_cpufuncs; @@ -1629,7 +1626,7 @@ late_abort_fixup(arg) defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ defined(CPU_ARM10) || defined(CPU_ARM11) || \ - defined(CPU_FA526) + defined(CPU_FA526) || defined(CPU_FA626TE) #define IGN 0 #define OR 1 @@ -2095,7 +2092,7 @@ sa11x0_setup(args) } #endif /* CPU_SA1100 || CPU_SA1110 */ -#if defined(CPU_FA526) +#if defined(CPU_FA526) || defined(CPU_FA626TE) struct cpu_option fa526_options[] = { #ifdef COMPAT_12 { "nocache", IGN, BIC, (CPU_CONTROL_IC_ENABLE | @@ -2149,7 +2146,7 @@ fa526_setup(char *args) ctrl = cpuctrl; cpu_control(0xffffffff, cpuctrl); } -#endif /* CPU_FA526 */ +#endif /* CPU_FA526 || CPU_FA626TE */ #if defined(CPU_IXP12X0) Modified: head/sys/arm/arm/cpufunc_asm_fa526.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_fa526.S Tue May 4 08:37:28 2010 (r207610) +++ head/sys/arm/arm/cpufunc_asm_fa526.S Tue May 4 10:14:05 2010 (r207611) @@ -32,7 +32,11 @@ #include __FBSDID("$FreeBSD$"); +#ifdef CPU_FA526 #define CACHELINE_SIZE 16 +#else +#define CACHELINE_SIZE 32 +#endif ENTRY(fa526_setttb) mov r1, #0 Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Tue May 4 08:37:28 2010 (r207610) +++ head/sys/arm/arm/elf_trampoline.c Tue May 4 10:14:05 2010 (r207611) @@ -57,7 +57,7 @@ void __startC(void); #define cpu_idcache_wbinv_all arm8_cache_purgeID #elif defined(CPU_ARM9) #define cpu_idcache_wbinv_all arm9_idcache_wbinv_all -#elif defined(CPU_FA526) +#elif defined(CPU_FA526) || defined(CPU_FA626TE) #define cpu_idcache_wbinv_all fa526_idcache_wbinv_all #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Tue May 4 08:37:28 2010 (r207610) +++ head/sys/arm/arm/identcpu.c Tue May 4 10:14:05 2010 (r207611) @@ -220,7 +220,9 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_ARM966ESR1, CPU_CLASS_ARM9ES, "ARM966E-S", generic_steppings }, - { CPU_ID_FA526, CPU_CLASS_ARM9, "FA526", + { CPU_ID_FA526, CPU_CLASS_ARM9, "FA526", + generic_steppings }, + { CPU_ID_FA626TE, CPU_CLASS_ARM9ES, "FA626TE", generic_steppings }, { CPU_ID_TI925T, CPU_CLASS_ARM9TDMI, "TI ARM925T", Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Tue May 4 08:37:28 2010 (r207610) +++ head/sys/arm/include/cpuconf.h Tue May 4 10:14:05 2010 (r207611) @@ -62,6 +62,7 @@ defined(CPU_XSCALE_80321) + \ defined(CPU_XSCALE_PXA2X0) + \ defined(CPU_FA526) + \ + defined(CPU_FA626TE) + \ defined(CPU_XSCALE_IXP425)) /* @@ -78,7 +79,7 @@ #if (defined(CPU_ARM9E) || defined(CPU_ARM10) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_XSCALE_PXA2X0)) + defined(CPU_XSCALE_PXA2X0) || defined(CPU_FA626TE)) #define ARM_ARCH_5 1 #else #define ARM_ARCH_5 0 @@ -126,7 +127,8 @@ #if (defined(CPU_ARM6) || defined(CPU_ARM7) || defined(CPU_ARM7TDMI) || \ defined(CPU_ARM8) || defined(CPU_ARM9) || defined(CPU_ARM9E) || \ - defined(CPU_ARM10) || defined(CPU_ARM11) || defined(CPU_FA526)) + defined(CPU_ARM10) || defined(CPU_ARM11) || defined(CPU_FA526) || \ + defined(CPU_FA626TE)) #define ARM_MMU_GENERIC 1 #else #define ARM_MMU_GENERIC 0 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Tue May 4 08:37:28 2010 (r207610) +++ head/sys/arm/include/cpufunc.h Tue May 4 10:14:05 2010 (r207611) @@ -284,7 +284,7 @@ u_int arm8_clock_config (u_int, u_int); #endif -#ifdef CPU_FA526 +#if defined(CPU_FA526) || defined(CPU_FA626TE) void fa526_setup (char *arg); void fa526_setttb (u_int ttb); void fa526_context_switch (void); @@ -464,11 +464,11 @@ extern unsigned armv5_dcache_index_max; extern unsigned armv5_dcache_index_inc; #endif -#if defined(CPU_ARM9) || defined(CPU_ARM9E) || defined(CPU_ARM10) || \ - defined(CPU_SA110) || defined(CPU_SA1100) || defined(CPU_SA1110) || \ - defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ - defined(CPU_FA526) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ +#if defined(CPU_ARM9) || defined(CPU_ARM9E) || defined(CPU_ARM10) || \ + defined(CPU_SA110) || defined(CPU_SA1100) || defined(CPU_SA1110) || \ + defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ + defined(CPU_FA526) || defined(CPU_FA626TE) || \ + defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) void armv4_tlb_flushID (void); Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Tue May 4 08:37:28 2010 (r207610) +++ head/sys/conf/options.arm Tue May 4 10:14:05 2010 (r207611) @@ -37,3 +37,4 @@ AT91_BWCT opt_at91.h AT91_TSC opt_at91.h AT91_KWIKBYTE opt_at91.h CPU_FA526 opt_global.h +CPU_FA626TE opt_global.h From owner-svn-src-all@FreeBSD.ORG Tue May 4 11:25:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 956661065670; Tue, 4 May 2010 11:25:05 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 867058FC1D; Tue, 4 May 2010 11: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 o44BP5fv098018; Tue, 4 May 2010 11:25:05 GMT (envelope-from nork@svn.freebsd.org) Received: (from nork@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44BP5eW098015; Tue, 4 May 2010 11:25:05 GMT (envelope-from nork@svn.freebsd.org) Message-Id: <201005041125.o44BP5eW098015@svn.freebsd.org> From: Norikatsu Shigemura Date: Tue, 4 May 2010 11: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: r207612 - head/usr.sbin/mergemaster 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, 04 May 2010 11:25:05 -0000 Author: nork Date: Tue May 4 11:25:04 2010 New Revision: 207612 URL: http://svn.freebsd.org/changeset/base/207612 Log: Add support run services_mkdb(8). Approved by: dougb, imp (mentor) Reviewed by: ume MFC after: 2 weeks Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Tue May 4 10:14:05 2010 (r207611) +++ head/usr.sbin/mergemaster/mergemaster.sh Tue May 4 11:25:04 2010 (r207612) @@ -849,6 +849,9 @@ mm_install () { /etc/login.conf) NEED_CAP_MKDB=yes ;; + /etc/services) + NEED_SERVICES_MKDB=yes + ;; /etc/master.passwd) do_install_and_rm 600 "${1}" "${DESTDIR}${INSTALL_DIR}" NEED_PWD_MKDB=yes @@ -1278,6 +1281,17 @@ case "${NEED_CAP_MKDB}" in ;; esac +case "${NEED_SERVICES_MKDB}" in +'') ;; +*) + echo '' + echo "*** You installed a services file, so make sure that you run" + echo " '/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db ${DESTDIR}/etc/services'" + echo " to rebuild your services database" + run_it_now "/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db ${DESTDIR}/etc/services" + ;; +esac + case "${NEED_PWD_MKDB}" in '') ;; *) From owner-svn-src-all@FreeBSD.ORG Tue May 4 11:34:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E05151065676; Tue, 4 May 2010 11:34:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C91078FC1B; Tue, 4 May 2010 11:34: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 o44BYE77000727; Tue, 4 May 2010 11:34:14 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44BYENg000724; Tue, 4 May 2010 11:34:14 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201005041134.o44BYENg000724@svn.freebsd.org> From: Ed Maste Date: Tue, 4 May 2010 11:34: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: r207613 - head/usr.bin/chpass 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, 04 May 2010 11:34:15 -0000 Author: emaste Date: Tue May 4 11:34:13 2010 New Revision: 207613 URL: http://svn.freebsd.org/changeset/base/207613 Log: Restore historical behaviour of only executing chflags on files that exist. This eliminates cosmetic errors of the form "chflags: ...: No such file or directory" during an installworld to an empty destination. Modified: head/usr.bin/chpass/Makefile Modified: head/usr.bin/chpass/Makefile ============================================================================== --- head/usr.bin/chpass/Makefile Tue May 4 11:25:04 2010 (r207612) +++ head/usr.bin/chpass/Makefile Tue May 4 11:34:13 2010 (r207613) @@ -38,7 +38,9 @@ MLINKS+= chpass.1 ypchpass.1 chpass.1 yp beforeinstall: .for i in chpass chfn chsh ypchpass ypchfn ypchsh +.if exists(${DESTDIR}${BINDIR}/$i) -chflags noschg ${DESTDIR}${BINDIR}/$i +.endif .endfor .if !defined(NO_FSCHG) From owner-svn-src-all@FreeBSD.ORG Tue May 4 13:07:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D77961065673; Tue, 4 May 2010 13:07:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C5E498FC19; Tue, 4 May 2010 13:07: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 o44D7eGj025795; Tue, 4 May 2010 13:07:40 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44D7eHn025794; Tue, 4 May 2010 13:07:40 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005041307.o44D7eHn025794@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 13:07: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: r207614 - head/libexec/tftpd 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, 04 May 2010 13:07:40 -0000 Author: imp Date: Tue May 4 13:07:40 2010 New Revision: 207614 URL: http://svn.freebsd.org/changeset/base/207614 Log: Bring in new files from edwin's tftp Added: head/libexec/tftpd/tftp-file.c (contents, props changed) head/libexec/tftpd/tftp-file.h (contents, props changed) head/libexec/tftpd/tftp-io.c (contents, props changed) head/libexec/tftpd/tftp-io.h (contents, props changed) head/libexec/tftpd/tftp-options.c (contents, props changed) head/libexec/tftpd/tftp-options.h (contents, props changed) head/libexec/tftpd/tftp-transfer.c (contents, props changed) head/libexec/tftpd/tftp-transfer.h (contents, props changed) head/libexec/tftpd/tftp-utils.c (contents, props changed) head/libexec/tftpd/tftp-utils.h (contents, props changed) Added: head/libexec/tftpd/tftp-file.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tftp-file.c Tue May 4 13:07:40 2010 (r207614) @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2008 Edwin Groothuis. 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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "tftp-file.h" +#include "tftp-utils.h" + +static FILE *file; +static int convert; + +static char convbuffer[66000]; +static int gotcr = 0; + +static size_t +convert_from_net(char *buffer, size_t count) +{ + size_t i, n; + + /* + * Convert all CR/LF to LF and all CR,NUL to CR + */ + + n = 0; + for (i = 0; i < count; i++) { + + if (gotcr == 0) { + convbuffer[n++] = buffer[i]; + gotcr = (buffer[i] == '\r'); + continue; + } + + /* CR, NULL -> CR */ + if (buffer[i] == '\0') { + gotcr = 0; + continue; + } + + /* CR, LF -> LF */ + if (buffer[i] == '\n') { + if (n == 0) { + if (ftell(file) != 0) { + fseek(file, -1, SEEK_END); + convbuffer[n++] = '\n'; + } else { + /* This shouldn't happen */ + tftp_log(LOG_ERR, + "Received LF as first character"); + abort(); + } + } else + convbuffer[n-1] = '\n'; + gotcr = 0; + continue; + } + + /* Everything else just accept as is */ + convbuffer[n++] = buffer[i]; + gotcr = (buffer[i] == '\r'); + continue; + } + + return fwrite(convbuffer, 1, n, file); +} + +static size_t +convert_to_net(char *buffer, size_t count, int init) +{ + size_t i; + static size_t n = 0, read = 0; + static int newline = 0; + + if (init) { + newline = 0; + n = 0; + read = 0; + return 0 ; + } + + /* + * Convert all LF to CR,LF and all CR to CR,NUL + */ + i = 0; + + if (newline) { + buffer[i++] = newline; + newline = 0; + } + + while (i < count) { + if (n == read) { + /* When done we're done */ + if (feof(file)) break; + + /* Otherwise read another bunch */ + read = fread(convbuffer, 1, count, file); + if (read == 0) break; + n = 0; + } + + /* CR -> CR,NULL */ + if (convbuffer[n] == '\r') { + buffer[i++] = '\r'; + buffer[i++] = '\0'; + n++; + continue; + } + + /* LF -> CR,LF */ + if (convbuffer[n] == '\n') { + buffer[i++] = '\r'; + buffer[i++] = '\n'; + n++; + continue; + } + + buffer[i++] = convbuffer[n++]; + } + + if (i > count) { + /* + * Whoops... that isn't alllowed (but it will happen + * when there is a CR or LF at the end of the buffer) + */ + newline = buffer[i-1]; + } + + if (i < count) { + /* We are done! */ + return i; + } else + return count; + +} + +int +write_init(int fd, FILE *f, const char *mode) +{ + + if (f == NULL) { + file = fdopen(fd, "w"); + if (file == NULL) { + int en = errno; + tftp_log(LOG_ERR, "fdopen() failed: %s", + strerror(errno)); + return en; + } + } else + file = f; + convert = !strcmp(mode, "netascii"); + return 0; +} + +size_t +write_file(char *buffer, int count) +{ + + if (convert == 0) + return fwrite(buffer, 1, count, file); + + return convert_from_net(buffer, count); +} + +int +write_close(void) +{ + + if (fclose(file) != 0) { + tftp_log(LOG_ERR, "fclose() failed: %s", strerror(errno)); + return 1; + } + return 0; +} + +int +read_init(int fd, FILE *f, const char *mode) +{ + + convert_to_net(NULL, 0, 1); + if (f == NULL) { + file = fdopen(fd, "r"); + if (file == NULL) { + int en = errno; + tftp_log(LOG_ERR, "fdopen() failed: %s", + strerror(errno)); + return en; + } + } else + file = f; + convert = !strcmp(mode, "netascii"); + return 0; +} + +size_t +read_file(char *buffer, int count) +{ + + if (convert == 0) + return fread(buffer, 1, count, file); + + return convert_to_net(buffer, count, 0); +} + +int +read_close(void) +{ + + if (fclose(file) != 0) { + tftp_log(LOG_ERR, "fclose() failed: %s", strerror(errno)); + return 1; + } + return 0; +} + + +int +synchnet(int peer) +{ + + return 0; +} Added: head/libexec/tftpd/tftp-file.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tftp-file.h Tue May 4 13:07:40 2010 (r207614) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2008 Edwin Groothuis. 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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +int write_init(int fd, FILE *f, const char *mode); +size_t write_file(char *buffer, int count); +int write_close(void); + +int read_init(int fd, FILE *f, const char *mode); +size_t read_file(char *buffer, int count); +int read_close(void); + +int synchnet(int peer); Added: head/libexec/tftpd/tftp-io.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tftp-io.c Tue May 4 13:07:40 2010 (r207614) @@ -0,0 +1,478 @@ +/* + * Copyright (C) 2008 Edwin Groothuis. 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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tftp-file.h" +#include "tftp-io.h" +#include "tftp-utils.h" +#include "tftp-options.h" + +struct sockaddr_storage peer_sock; +struct sockaddr_storage me_sock; + +static int send_packet(int peer, uint16_t block, char *pkt, int size); + +struct errmsg { + int e_code; + const char *e_msg; +} errmsgs[] = { + { EUNDEF, "Undefined error code" }, + { ENOTFOUND, "File not found" }, + { EACCESS, "Access violation" }, + { ENOSPACE, "Disk full or allocation exceeded" }, + { EBADOP, "Illegal TFTP operation" }, + { EBADID, "Unknown transfer ID" }, + { EEXISTS, "File already exists" }, + { ENOUSER, "No such user" }, + { EOPTNEG, "Option negotiation" }, + { -1, NULL } +}; + +#define DROPPACKET(s) \ + if (packetdroppercentage != 0 && \ + random()%100 < packetdroppercentage) { \ + tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s); \ + return; \ + } +#define DROPPACKETn(s,n) \ + if (packetdroppercentage != 0 && \ + random()%100 < packetdroppercentage) { \ + tftp_log(LOG_DEBUG, "Artifical packet drop in %s", s); \ + return (n); \ + } + +const char * +errtomsg(int error) +{ + static char ebuf[40]; + struct errmsg *pe; + char buf[MAXPKTSIZE]; + + if (error == 0) + return ("success"); + for (pe = errmsgs; pe->e_code >= 0; pe++) + if (pe->e_code == error) + return (pe->e_msg); + snprintf(ebuf, sizeof(buf), "error %d", error); + return (ebuf); +} + +static int +send_packet(int peer, uint16_t block, char *pkt, int size) +{ + int i; + int t = 1; + + for (i = 0; i < 12 ; i++) { + DROPPACKETn("send_packet", 0); + + if (sendto(peer, pkt, size, 0, + (struct sockaddr *)&peer_sock, peer_sock.ss_len) + == size) { + if (i) + tftp_log(LOG_ERR, + "%s block %d, attempt %d successful", + block, i); + return (0); + } + tftp_log(LOG_ERR, + "%s block %d, attempt %d failed (Error %d: %s)", + packettype(ntohs(((struct tftphdr *)(pkt))->th_opcode)), + block, i, errno, strerror(errno)); + sleep(t); + if (t < 32) + t <<= 1; + } + tftp_log(LOG_ERR, "send_packet: %s", strerror(errno)); + return (1); +} + +/* + * Send an ERROR packet (error message). + * Error code passed in is one of the + * standard TFTP codes, or a UNIX errno + * offset by 100. + */ +void +send_error(int peer, int error) +{ + struct tftphdr *tp; + int length; + struct errmsg *pe; + char buf[MAXPKTSIZE]; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending ERROR %d: %s", error); + + DROPPACKET("send_error"); + + tp = (struct tftphdr *)buf; + tp->th_opcode = htons((u_short)ERROR); + tp->th_code = htons((u_short)error); + for (pe = errmsgs; pe->e_code >= 0; pe++) + if (pe->e_code == error) + break; + if (pe->e_code < 0) { + pe->e_msg = strerror(error - 100); + tp->th_code = EUNDEF; /* set 'undef' errorcode */ + } + strcpy(tp->th_msg, pe->e_msg); + length = strlen(pe->e_msg); + tp->th_msg[length] = '\0'; + length += 5; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending ERROR %d: %s", error, tp->th_msg); + + if (sendto(peer, buf, length, 0, + (struct sockaddr *)&peer_sock, peer_sock.ss_len) != length) + tftp_log(LOG_ERR, "send_error: %s", strerror(errno)); +} + +/* + * Send an WRQ packet (write request). + */ +int +send_wrq(int peer, char *filename, char *mode) +{ + int n; + struct tftphdr *tp; + char *bp; + char buf[MAXPKTSIZE]; + int size; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", + filename, mode + ); + + DROPPACKETn("send_wrq", 1); + + tp = (struct tftphdr *)buf; + tp->th_opcode = htons((u_short)WRQ); + size = 2; + + bp = tp->th_stuff; + strcpy(bp, filename); + bp += strlen(filename); + *bp = 0; + bp++; + size += strlen(filename) + 1; + + strcpy(bp, mode); + bp += strlen(mode); + *bp = 0; + bp++; + size += strlen(mode) + 1; + + if (options_rfc_enabled) + size += make_options(peer, bp, sizeof(buf) - size); + + n = sendto(peer, buf, size, 0, + (struct sockaddr *)&peer_sock, peer_sock.ss_len); + if (n != size) { + tftp_log(LOG_ERR, "send_wrq: %s", strerror(errno)); + return (1); + } + return (0); +} + +/* + * Send an RRQ packet (write request). + */ +int +send_rrq(int peer, char *filename, char *mode) +{ + int n; + struct tftphdr *tp; + char *bp; + char buf[MAXPKTSIZE]; + int size; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", + filename, mode + ); + + DROPPACKETn("send_rrq", 1); + + tp = (struct tftphdr *)buf; + tp->th_opcode = htons((u_short)RRQ); + size = 2; + + bp = tp->th_stuff; + strcpy(bp, filename); + bp += strlen(filename); + *bp = 0; + bp++; + size += strlen(filename) + 1; + + strcpy(bp, mode); + bp += strlen(mode); + *bp = 0; + bp++; + size += strlen(mode) + 1; + + if (options_rfc_enabled) { + options[OPT_TSIZE].o_request = strdup("0"); + size += make_options(peer, bp, sizeof(buf) - size); + } + + n = sendto(peer, buf, size, 0, + (struct sockaddr *)&peer_sock, peer_sock.ss_len); + if (n != size) { + tftp_log(LOG_ERR, "send_rrq: %s", n, strerror(errno)); + return (1); + } + return (0); +} + +/* + * Send an OACK packet (option acknowledgement). + */ +int +send_oack(int peer) +{ + struct tftphdr *tp; + int size, i, n; + char *bp; + char buf[MAXPKTSIZE]; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending OACK"); + + DROPPACKETn("send_oack", 0); + + /* + * Send back an options acknowledgement (only the ones with + * a reply for) + */ + tp = (struct tftphdr *)buf; + bp = buf + 2; + size = sizeof(buf) - 2; + tp->th_opcode = htons((u_short)OACK); + for (i = 0; options[i].o_type != NULL; i++) { + if (options[i].o_reply != NULL) { + n = snprintf(bp, size, "%s%c%s", options[i].o_type, + 0, options[i].o_reply); + bp += n+1; + size -= n+1; + if (size < 0) { + tftp_log(LOG_ERR, "oack: buffer overflow"); + exit(1); + } + } + } + size = bp - buf; + + if (sendto(peer, buf, size, 0, + (struct sockaddr *)&peer_sock, peer_sock.ss_len) != size) { + tftp_log(LOG_INFO, "send_oack: %s", strerror(errno)); + return (1); + } + + return (0); +} + +/* + * Send an ACK packet (acknowledgement). + */ +int +send_ack(int fp, uint16_t block) +{ + struct tftphdr *tp; + int size; + char *bp; + char buf[MAXPKTSIZE]; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending ACK for block %d", block); + + DROPPACKETn("send_ack", 0); + + tp = (struct tftphdr *)buf; + bp = buf + 2; + size = sizeof(buf) - 2; + tp->th_opcode = htons((u_short)ACK); + tp->th_block = htons((u_short)block); + size = 4; + + if (sendto(fp, buf, size, 0, + (struct sockaddr *)&peer_sock, peer_sock.ss_len) != size) { + tftp_log(LOG_INFO, "send_ack: %s", strerror(errno)); + return (1); + } + + return (0); +} + +/* + * Send a DATA packet + */ +int +send_data(int peer, uint16_t block, char *data, int size) +{ + char buf[MAXPKTSIZE]; + struct tftphdr *pkt; + int n; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Sending DATA packet %d of %d bytes", + block, size); + + DROPPACKETn("send_data", 0); + + pkt = (struct tftphdr *)buf; + + pkt->th_opcode = htons((u_short)DATA); + pkt->th_block = htons((u_short)block); + memcpy(pkt->th_data, data, size); + + n = send_packet(peer, block, (char *)pkt, size + 4); + return (n); +} + + +/* + * Receive a packet + */ +jmp_buf timeoutbuf; + +static void +timeout(int sig __unused) +{ + + /* tftp_log(LOG_DEBUG, "Timeout\n"); Inside a signal handler... */ + longjmp(timeoutbuf, 1); +} + +int +receive_packet(int peer, char *data, int size, struct sockaddr_storage *from, + int thistimeout) +{ + struct tftphdr *pkt; + struct sockaddr_storage from_local; + struct sockaddr_storage *pfrom; + socklen_t fromlen; + int n; + static int waiting; + + pfrom = (from == NULL) ? &from_local : from; + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, + "Waiting %d seconds for packet", timeoutpacket); + + pkt = (struct tftphdr *)data; + + waiting = 0; + signal(SIGALRM, timeout); + setjmp(timeoutbuf); + alarm(thistimeout); + + if (waiting > 0) { + alarm(0); + return (RP_TIMEOUT); + } + + if (waiting > 0) { + tftp_log(LOG_ERR, "receive_packet: timeout"); + alarm(0); + return (RP_TIMEOUT); + } + + waiting++; + fromlen = sizeof(*pfrom); + n = recvfrom(peer, data, size, 0, (struct sockaddr *)pfrom, &fromlen); + + alarm(0); + + DROPPACKETn("receive_packet", RP_TIMEOUT); + + if (n < 0) { + tftp_log(LOG_ERR, "receive_packet: timeout"); + return (RP_TIMEOUT); + } + + alarm(0); + + if (n < 0) { + /* No idea what could have happened if it isn't a timeout */ + tftp_log(LOG_ERR, "receive_packet: %s", strerror(errno)); + return (RP_RECVFROM); + } + if (n < 4) { + tftp_log(LOG_ERR, + "receive_packet: packet too small (%d bytes)", n); + return (RP_TOOSMALL); + } + + pkt->th_opcode = ntohs((u_short)pkt->th_opcode); + if (pkt->th_opcode == DATA || + pkt->th_opcode == ACK) + pkt->th_block = ntohs((u_short)pkt->th_block); + + if (pkt->th_opcode == DATA && n > pktsize) { + tftp_log(LOG_ERR, "receive_packet: packet too big"); + return (RP_TOOBIG); + } + + if (((struct sockaddr_in *)(pfrom))->sin_addr.s_addr != + ((struct sockaddr_in *)(&peer_sock))->sin_addr.s_addr) { + tftp_log(LOG_ERR, + "receive_packet: received packet from wrong source"); + return (RP_WRONGSOURCE); + } + + if (pkt->th_opcode == ERROR) { + tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg); + return (RP_ERROR); + } + + if (debug&DEBUG_PACKETS) + tftp_log(LOG_DEBUG, "Received %d bytes in a %s packet", + n, packettype(pkt->th_opcode)); + + return n - 4; +} Added: head/libexec/tftpd/tftp-io.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tftp-io.h Tue May 4 13:07:40 2010 (r207614) @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008 Edwin Groothuis. 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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define RP_NONE 0 +#define RP_RECVFROM -1 +#define RP_TOOSMALL -2 +#define RP_ERROR -3 +#define RP_WRONGSOURCE -4 +#define RP_TIMEOUT -5 +#define RP_TOOBIG -6 + +const char *errtomsg(int); +void send_error(int peer, int); +int send_wrq(int peer, char *, char *); +int send_rrq(int peer, char *, char *); +int send_oack(int peer); +int send_ack(int peer, unsigned short); +int send_data(int peer, uint16_t, char *, int); +int receive_packet(int peer, char *, int, struct sockaddr_storage *, int); + +extern struct sockaddr_storage peer_sock; +extern struct sockaddr_storage me_sock; Added: head/libexec/tftpd/tftp-options.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tftpd/tftp-options.c Tue May 4 13:07:40 2010 (r207614) @@ -0,0 +1,390 @@ +/* + * Copyright (C) 2008 Edwin Groothuis. 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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "tftp-utils.h" +#include "tftp-io.h" +#include "tftp-options.h" + +/* + * Option handlers + */ + +struct options options[] = { + { "tsize", NULL, NULL, NULL /* option_tsize */, 1 }, + { "timeout", NULL, NULL, option_timeout, 1 }, + { "blksize", NULL, NULL, option_blksize, 1 }, + { "blksize2", NULL, NULL, option_blksize2, 0 }, + { "rollover", NULL, NULL, option_rollover, 0 }, + { NULL, NULL, NULL, NULL, 0 } +}; + +/* By default allow them */ +int options_rfc_enabled = 1; +int options_extra_enabled = 1; + +/* + * Rules for the option handlers: + * - If there is no o_request, there will be no processing. + * + * For servers + * - Logging is done as warnings. + * - The handler exit()s if there is a serious problem with the + * values submitted in the option. + * + * For clients + * - Logging is done as errors. After all, the server shouldn't + * return rubbish. + * - The handler returns if there is a serious problem with the + * values submitted in the option. + * - Sending the EBADOP packets is done by the handler. + */ + +int +option_tsize(int peer, struct tftphdr *tp, int mode, struct stat *stbuf) +{ + + if (options[OPT_TSIZE].o_request == NULL) + return (0); + + if (mode == RRQ) + asprintf(&options[OPT_TSIZE].o_reply, + "%ju", stbuf->st_size); + else + /* XXX Allows writes of all sizes. */ + options[OPT_TSIZE].o_reply = + strdup(options[OPT_TSIZE].o_request); + return (0); +} + +int +option_timeout(int peer) +{ + + if (options[OPT_TIMEOUT].o_request == NULL) + return (0); + + int to = atoi(options[OPT_TIMEOUT].o_request); + if (to < TIMEOUT_MIN || to > TIMEOUT_MAX) { + tftp_log(acting_as_client ? LOG_ERR : LOG_WARNING, + "Received bad value for timeout. " + "Should be between %d and %d, received %s", + TIMEOUT_MIN, TIMEOUT_MAX); + send_error(peer, EBADOP); + if (acting_as_client) + return (1); + exit(1); + } else { + timeoutpacket = to; + options[OPT_TIMEOUT].o_reply = + strdup(options[OPT_TIMEOUT].o_request); + } + settimeouts(timeoutpacket, timeoutnetwork, maxtimeouts); + + if (debug&DEBUG_OPTIONS) + tftp_log(LOG_DEBUG, "Setting timeout to '%s'", + options[OPT_TIMEOUT].o_reply); + + return (0); +} + +int +option_rollover(int peer) +{ + + if (options[OPT_ROLLOVER].o_request == NULL) + return (0); + + if (strcmp(options[OPT_ROLLOVER].o_request, "0") != 0 + && strcmp(options[OPT_ROLLOVER].o_request, "1") != 0) { + tftp_log(acting_as_client ? LOG_ERR : LOG_WARNING, + "Bad value for rollover, " + "should be either 0 or 1, received '%s', " + "ignoring request", + options[OPT_ROLLOVER].o_request); + if (acting_as_client) { + send_error(peer, EBADOP); + return (1); + } + return (0); + } + options[OPT_ROLLOVER].o_reply = + strdup(options[OPT_ROLLOVER].o_request); + + if (debug&DEBUG_OPTIONS) + tftp_log(LOG_DEBUG, "Setting rollover to '%s'", + options[OPT_ROLLOVER].o_reply); + + return (0); +} + +int +option_blksize(int peer) +{ + int *maxdgram; + char maxbuffer[100]; + size_t len; + + if (options[OPT_BLKSIZE].o_request == NULL) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 4 14:03:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F9EA106564A; Tue, 4 May 2010 14:03:12 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6B518FC1C; Tue, 4 May 2010 14:03:11 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2D0FC.dip.t-dialin.net [217.226.208.252]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 04293844109; Tue, 4 May 2010 16:03:02 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 95EA85056; Tue, 4 May 2010 16:02:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1272981776; bh=ENp7P23eseMbqKGE1J8KwOITMg1YMKsl0SkAd2F04sY=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=MuwcUuXlHeMiLqxdvPt1axmLUjl+OsbfSNLCKz5yA9UUCLtk4mW4ANc9+Pe6Y2kEM PAHVzLrH0Yfths0evEqCH+J0umA6NZWT/YJ9CfuB1HmnIsG+QwI23Pnz2MA6xv5/wT ZMChKmpmeTn3UFukfSv7ns4fUkCvMS0OUmA1JqPSII+R1gC+5aDAsskTRFU/I68uk2 zxWXU/5/s8gN/l9vHVDWZZXR0kgsxJJgVwhoa6c+Ex9B5rV/iyBl8d16j0vt8+DilD muYkSvGwn7iuUfUaxmufPTtSfJFMaEX8SjqjgRJwkI1eVD2Rhx/xPsygam4U9ce/JV 36hnyAAKOLrXA== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o44E2tVA088817; Tue, 4 May 2010 16:02:55 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 04 May 2010 16:02:55 +0200 Message-ID: <20100504160255.83302gi3jcftvoys@webmail.leidinger.net> Date: Tue, 04 May 2010 16:02:55 +0200 From: Alexander Leidinger To: Norikatsu Shigemura , dougb@FreeBSD.org References: <201005041125.o44BP5eW098015@svn.freebsd.org> In-Reply-To: <201005041125.o44BP5eW098015@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 04293844109.5C5FA X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1273586586.13426@hdyAcU2+lGBF/I//3A7HCQ X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r207612 - head/usr.sbin/mergemaster 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, 04 May 2010 14:03:12 -0000 Quoting Norikatsu Shigemura (from Tue, 4 May 2010 11:25:04 +0000 (UTC)): > Author: nork > Date: Tue May 4 11:25:04 2010 > New Revision: 207612 > URL: http://svn.freebsd.org/changeset/base/207612 > > Log: > Add support run services_mkdb(8). Shouldn't this (and similar messages) only be done if there is a corresponding DB file? Everything is working just fine without the DB files, and the man-pages only recommend to create DB files for performance reasons. By default the DB files are not created, and as such it looks a bit strange to tell to "make sure" to create the DB file(s). Bye, Alexander. -- The best laid plans of mice and men are held up in the legal department. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Tue May 4 14:08:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 390F51065673; Tue, 4 May 2010 14:08:05 +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 0AE0A8FC16; Tue, 4 May 2010 14:08:05 +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 8FD1146B39; Tue, 4 May 2010 10:08:04 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 00BF28A01F; Tue, 4 May 2010 10:08:03 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Tue, 4 May 2010 09:31:23 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201005040613.o446DI8m023750@svn.freebsd.org> In-Reply-To: <201005040613.o446DI8m023750@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201005040931.23960.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 04 May 2010 10:08:04 -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, src-committers@freebsd.org Subject: Re: svn commit: r207607 - head/usr.bin/tftp 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, 04 May 2010 14:08:05 -0000 On Tuesday 04 May 2010 2:13:18 am Warner Losh wrote: > Author: imp > Date: Tue May 4 06:13:17 2010 > New Revision: 207607 > URL: http://svn.freebsd.org/changeset/base/207607 > > Log: > Go ahead and merge the work edwin@ on tftpd into the tree. It is a > lot better than what's in the tree now. Edwin tested it at a prior > employer, but can't test it today. I've found that it works a lot > better with the various uboot versions that I've used in my embedded > work. Here's the pkg-descr from the port that describes the changes: bin/67550 and bin/118874 perhaps? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue May 4 14:22:48 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 13BA51065673; Tue, 4 May 2010 14:22:46 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Tue, 4 May 2010 23:22:46 +0900 From: Norikatsu Shigemura To: Alexander Leidinger Message-Id: <20100504232246.4a29424f.nork@FreeBSD.org> In-Reply-To: <20100504160255.83302gi3jcftvoys@webmail.leidinger.net> References: <201005041125.o44BP5eW098015@svn.freebsd.org> <20100504160255.83302gi3jcftvoys@webmail.leidinger.net> X-Mailer: Sylpheed 3.0.0 (GTK+ 2.18.7; i386-portbld-freebsd8.0) 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, dougb@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r207612 - head/usr.sbin/mergemaster 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, 04 May 2010 14:22:48 -0000 Hi netchild. On Tue, 04 May 2010 16:02:55 +0200 Alexander Leidinger wrote: > > URL: http://svn.freebsd.org/changeset/base/207612 > > Log: > > Add support run services_mkdb(8). > Shouldn't this (and similar messages) only be done if there is a > corresponding DB file? > Everything is working just fine without the DB files, and the > man-pages only recommend to create DB files for performance reasons. > By default the DB files are not created, and as such it looks a bit > strange to tell to "make sure" to create the DB file(s). My first patch has a test code '[ -f /var/db/services.db ] &&', However, as the result, I discussed with dougb, he said that existing /var/db/services.db is harmless. So I don't have any objection, and remove a test code. From owner-svn-src-all@FreeBSD.ORG Tue May 4 14:46:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 349121065672; Tue, 4 May 2010 14:46:06 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id B31C08FC1D; Tue, 4 May 2010 14:46:05 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2D0FC.dip.t-dialin.net [217.226.208.252]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 5AAB4844217; Tue, 4 May 2010 16:45:59 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 26018507A; Tue, 4 May 2010 16:45:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1272984355; bh=V1wShdoR41gHTz76EoaQzP70CBUZhTd1SWIhEAR/JZs=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=syRfCizkiyXaqNabogZnzDMZGYt/HYmnPqz56J/EjzXt1vtenr7VXjKAqOC1mGilp 9ck5kOOS7IAPSzQZZ0wzQ6ulY0ABBFODHnjxatmv5UKxqQpLjgHv2cc8/J8q0ZdkG+ 4XWm1gLqBCjXr9oP9p02tGyqOweFzzMeZ0Ye/RwdQCRp25wagtaYZ7owcSzRdl6pIp gvVFztRimkETAMz/CwlPnBXZD7sI4AIzkbk5G3V0qipsexAONLoVmDkTLimNiUjH77 zTuVz2tUbyO0ofEezUruVgD4WwM7DSbw49WpeugLVVLpTRAm8ZKgj0qDNtOqHd/Kp5 5xjdsEfAN63JQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o44Ejsi0004690; Tue, 4 May 2010 16:45:54 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 04 May 2010 16:45:53 +0200 Message-ID: <20100504164553.55334ng6l4o6afms@webmail.leidinger.net> Date: Tue, 04 May 2010 16:45:53 +0200 From: Alexander Leidinger To: Norikatsu Shigemura References: <201005041125.o44BP5eW098015@svn.freebsd.org> <20100504160255.83302gi3jcftvoys@webmail.leidinger.net> <20100504232246.4a29424f.nork@FreeBSD.org> In-Reply-To: <20100504232246.4a29424f.nork@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 5AAB4844217.B32D4 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1273589160.95797@y1XUcf1phRFoooAjBkRKlA X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, dougb@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r207612 - head/usr.sbin/mergemaster 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, 04 May 2010 14:46:06 -0000 Quoting Norikatsu Shigemura (from Tue, 4 May 2010 23:22:46 +0900): > Hi netchild. > > On Tue, 04 May 2010 16:02:55 +0200 > Alexander Leidinger wrote: >> > URL: http://svn.freebsd.org/changeset/base/207612 >> > Log: >> > Add support run services_mkdb(8). >> Shouldn't this (and similar messages) only be done if there is a >> corresponding DB file? >> Everything is working just fine without the DB files, and the >> man-pages only recommend to create DB files for performance reasons. >> By default the DB files are not created, and as such it looks a bit >> strange to tell to "make sure" to create the DB file(s). > > My first patch has a test code '[ -f /var/db/services.db ] &&', > However, as the result, I discussed with dougb, he said that > existing /var/db/services.db is harmless. So I don't have any > objection, and remove a test code. I do not complain about your patch, you just had the bad luck that I noticed an extension of something which I think is not user friendly. I just used your commit to tell Doug (and others) about it. I would print such a message only (for login.conf, services or whatever), if the DB file exists. Because if it exists, not updating the DB file is harmful (it does not contain what people would expect). If the file does not exist, there is nothing to do. The user does not want or does not know how to use this feature, so do not tell him to do or use something he doesn't want or doesn't understand (lack of knowledge, not lack of capability). Bye, Alexander. -- Sometime in 1993 NANCY SINATRA will lead a BLOODLESS COUP on GUAM!! http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Tue May 4 15:29:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1B1B1065670; Tue, 4 May 2010 15:29:08 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B11078FC12; Tue, 4 May 2010 15:29: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 o44FT8L0058334; Tue, 4 May 2010 15:29:08 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44FT8BE058333; Tue, 4 May 2010 15:29:08 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <201005041529.o44FT8BE058333@svn.freebsd.org> From: "Christian S.J. Peron" Date: Tue, 4 May 2010 15:29: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: r207615 - head/sys/security/audit 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, 04 May 2010 15:29:08 -0000 Author: csjp Date: Tue May 4 15:29:07 2010 New Revision: 207615 URL: http://svn.freebsd.org/changeset/base/207615 Log: Add a case to make sure that internal audit records get converted to BSM format for lpathconf(2) events. MFC after: 2 weeks Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Tue May 4 13:07:40 2010 (r207614) +++ head/sys/security/audit/audit_bsm.c Tue May 4 15:29:07 2010 (r207615) @@ -740,6 +740,7 @@ kaudit_to_bsm(struct kaudit_record *kar, case AUE_LUTIMES: case AUE_NFS_GETFH: case AUE_LSTAT: + case AUE_LPATHCONF: case AUE_PATHCONF: case AUE_READLINK: case AUE_REVOKE: From owner-svn-src-all@FreeBSD.ORG Tue May 4 15:52:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A1BA1065674; Tue, 4 May 2010 15:52:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 67F768FC0C; Tue, 4 May 2010 15:52: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 o44FqHmA063429; Tue, 4 May 2010 15:52:17 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44FqHlj063427; Tue, 4 May 2010 15:52:17 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201005041552.o44FqHlj063427@svn.freebsd.org> From: Brooks Davis Date: Tue, 4 May 2010 15:52:17 +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: r207616 - stable/7/share/misc 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, 04 May 2010 15:52:17 -0000 Author: brooks Date: Tue May 4 15:52:17 2010 New Revision: 207616 URL: http://svn.freebsd.org/changeset/base/207616 Log: MFC r205073 Regen: * Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y). * Boemler: vendors.txt (2010-03126) PR: kern/133733 Modified: stable/7/share/misc/pci_vendors (contents, props changed) Directory Properties: stable/7/share/misc/ (props changed) stable/7/share/misc/iso639 (props changed) Modified: stable/7/share/misc/pci_vendors ============================================================================== --- stable/7/share/misc/pci_vendors Tue May 4 15:29:07 2010 (r207615) +++ stable/7/share/misc/pci_vendors Tue May 4 15:52:17 2010 (r207616) @@ -18,7 +18,7 @@ 4001 WinTV PVR-250 (v1) 4009 WinTV PVR-250 4801 WinTV PVR-250 MCE - 6800 Hauppage Nova -TD-500 DVB-T Tuner Device + 6800 Hauppage Nova -TD-500 DVB-T Tuner Device ( PCIVEN_1131&DEV_7130&SUBSYS_40510000&REV_014&3B) 0071 Nebula Electronics Ltd 0100 Ncipher Corp Ltd 0123 General Dynamics @@ -44,6 +44,10 @@ 8519 OV519 series 05E3 CyberDoor 0701 CBD516 +064E SUYIN Corporation + A101 Acer Crystal Eye Webcam (suYin) + A103 WebCam (SuYin) + D101 Web Cam (SuYin) 066F Sigmatel Inc 3410 SMTP3410 3500 SMTP3500 @@ -54,6 +58,8 @@ 1704 ISDN Adapter (PCI Bus, D, C) 067B Prolific Technology Inc 2303 PL-2303 USB-to-Serial Converter + 2305 USB-to-Printer Bridge Controller (PL-2305) + 2393 prolific (prolific) 3507 PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller 069D Hughes Network Systems (HNS) 0700 Stream Machine @@ -70,7 +76,7 @@ 09C1 Arris 0704 CM 200E Cable Modem 0A5C Broadcom Corporation - 0201 Broadcom USB iLine10(tm) Network Adapter + 0201 Broadcom USB iLine10(tm) Network Adapter (Broadcom NetXtreme BCM5782 Gigabie Ethernet Contro) 2000 Broadcom Bluetooth Firmware Upgrade Device 2009 Broadcom Bluetooth Controller 200A Broadcom Bluetooth Controller @@ -84,17 +90,17 @@ 2038 Broadcom Blutonium Device Firmware Downloader (BCM2038) 2039 BROADCOM Bluetooth Device 2045 Broadcom Bluetooth Controller - 2046 Broadcom USB Bluetooth Device + 2046 Broadcom USB Bluetooth Device ( 5738z) 2047 Broadcom USB Bluetooth Device 205E Broadcom Bluetooth Firmware Upgrade Device - 2100 Broadcom Bluetooth 2.0+eDR USB dongle - 2101 Broadcom Bluetooth 2.0+EDR USB dongle - 2102 ANYCOM Blue USB-200/250 + 2100 Broadcom Bluetooth 2.0+eDR USB dongle (BT 50) + 2101 Broadcom Bluetooth 2.0+EDR USB dongle ( 5&11BBCF3F&0&2) + 2102 ANYCOM Blue USB-200/250 ( USBVID_04B4&PID_21025&38CD4C16&0&6) 2110 Broadcom Bluetooth Controller 2111 ANYCOM Blue USB-UHE 200/250 2120 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 2045) 2121 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter - 2122 Broadcom Bluetooth 2.0+EDR USB dongle + 2122 Broadcom Bluetooth 2.0+EDR USB dongle ( BCM92045B3) 2124 2045B3ROM Bluetooth Dongle 2130 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter 2131 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter @@ -104,7 +110,7 @@ 2143 2046 Flash non UHE Class 1 2144 2046 Flash non UHE module Class 2 2145 Broadcom BCM9204MD LENO Module - 2146 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2146 Broadcom 2045 Bluetooth 2.1 USB UHE Dongle 2147 Broadcom 2046 Bluetooth 2.1 USB Dongle 2148 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle 2149 Broadcom 2046 Bluetooth 2.1 USB Dongle @@ -122,8 +128,9 @@ 2155 Broadcom Bluetooth USB Dongle 2157 BCM2046 B1 USB 500 2158 Broadcom 2046 Bluetooth 2.1 Device - 4502 USB Human Interface Device - 4503 USB Human Interface Device + 4500 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4502 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4503 Broadcom 2046 Bluetooth 2.1 USB Dongle ( BCM2046B1) 5800 Unified Security Hub 6300 Pirelli ISB Remote NDIS Device 0A89 BREA Technologies Inc @@ -144,17 +151,22 @@ 0A06 RCB672FXX 672-channel modular analog telphony card 0B49 ASCII Corporation 064F Trance Vibrator +0C45 Microdia Ltd. + 602D USB Webcam (7&2BE7B8E3&0&4) + 6130 USB CAMERA (5&3512B308&0&1) 0E11 Compaq Computer Corp (Now owned by Hewlett-Packard) 0001 PCI to EISA Bridge - 0002 PCI to ISA Bridge + 0002 PCI to ISA Bridge (ISA Bridge) 000F StorageWorks Library Adapter (HVD) (CPQB1A9) 0012 686P7 (686P7) - 0046 Smart Array 64xx/6i Controller + 0046 Smart Array 6400 Controller (N/A) 0049 Gigabit Upgrade Module (NC7132) 004A Gigabit Server Adapter (NC6136) + 005A HP Remote Insight Lights-Out II Board (PowerPC 405GP processor at 200MHz [3305103C]) 007C NC7770 1000BaseTX 007D NC6770 1000BaseTX 0085 NC7780 1000BaseTX + 00B1 HP Remote Insight Lights-Out II PCI Device (3305103C) 00BB NC7760 00C0 AIC-7899G 64-bit, 66MHz Dual Channel Wide Ultra3 SCSI Controller 00CA NC7771 @@ -201,8 +213,8 @@ AE29 PCI to ISA Bridge (MIS-L) AE2A CPU to PCI Bridge (MPC) AE2B PCI to ISA PnP Bridge (MIS-E) - AE31 System Management Controller (1002&DEV-4385&SUBSY) - AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 + AE31 System Management Controller (1002&DEV-5653&SUBSYS) + AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 (950) AE33 Dual EIDE Controller (Triflex) AE34 Netelligent 10 T PCI UTP TLAN 2.3 AE35 Integrated NetFlex-3/P TLAN 2.3 @@ -321,70 +333,70 @@ 0017 PROTO-3 PCI, digital I/O with chipselect (ispLSI1032E) 0020 Universal digital I/O PCI-Interface (ispLSI1032E) 1002 ATI Technologies Inc. / Advanced Micro Devices, Inc. - 0B12 ati 1900 (ati 1900) + 0B12 ATI Radeon X1900 (R580) 1002 0F2A1787 (0F2A1787) - 3150 Radeon Mobility X600 (M24 1P) - 3151 FIREMV 2400 - 3152 Mobility Radeon X300 - 3154 Mobility FireGL V3200 - 3171 FireMV 2400 Secondary - 3E50 Radeon X600/X650 Series - 3E54 FireGL V3200 (RV380) - 3E70 Radeon X600 Series Secondary - 3E74 FIREGL V3200 Secondary + 3150 ATI MOBILITY /ATI RADEON X600 (M24) + 3151 ATI FireMV 2400 (RV380) + 3152 ATI MOBILITY /ATI RADEON X300 (M24) + 3154 ATI MOBILITY FireGL V3200 (M24GL) + 3171 ATI FireMV 2400 Secondary (RV380) + 3E50 ATI RADEON X600/X550 Series (RV380) + 3E54 ATI FireGL V3200 (RV380GL) + 3E70 ATI RADEON X600/X550 Series Secondary (RV380) + 3E74 ATI FireGL V3200 Secondary (RV380GL) 4136 Radeon IGP 320 (A3) 4137 Radeon IGP 340 (RS200) 4144 Radeon 9500 Series (R300) 4145 Radeon 9200 (M+X) (R300) - 4146 Radeon 9700 (R300) + 4146 ATI RADEON 9600TX (R300) 4147 Fire GL Z1 AGP/Pro Video Accelerator (128 MB, 4P) - 4148 Radeon 9800 SE (R350) - 4149 Radeon 9500 Family + 4148 ATI RADEON 9800 SE (R350) + 4149 ATI RADEON 9500 (R350) 414A Radeon 9800 Family 414B Fire GL X2 - 4150 Radeon 9600 Series (V350) - 4151 Radeon 9600 (RV350) - 4152 Radeon 9600 XT (RV360) - 4153 Radeon 9550 (RV350) - 4154 Fire GL T2 - 4155 Fire GL T2 + 4150 ATI RADEON 9600 Series (RV350) + 4151 ATI RADEON 9600 Series (RV350) + 4152 ATI RADEON 9600 Series (RV360) + 4153 ATI RADEON 9550/X1050 Series (RV350) + 4154 ATI FireGL T2 (RV350GL) + 4155 ATI RADEON 9600 Series (RV350) 4156 Fire GL T2 4157 Fire GL T2 - 4158 vga video (4c59h) - 4164 R300 (128bit mem bus) (Radeon 9500 Series, secondary) + 4158 Mach32 (68800AX) + 4164 Radeon 9500 Series (R300) - Secondary 4165 Radeon 9700 Pro (R300 AE) - Secondary - 4166 Radeon 9600TX - Secondary + 4166 ATI RADEON 9600TX Secondary (R300) 4167 Fire GL Z1 AGP/Pro Secondary Video Accelerator (128 MB, 4P) - 4168 Radeon 9800 SE - Secondary (R350) - 4169 Radeon 9500 Family - Secondary - 4170 Radeon 9600 - Secondary (RV350) - 4171 Radeon 9600 (RV350) - Secondary - 4172 Radeon 9600 XT - Secondary (RV360) - 4173 Radeon 9550 - Secondary (RV350) - 4174 FireGL T2 - Seocndary - 4175 Radeon 9600 Series Secondary + 4168 ATI RADEON 9800 SE Secondary (R350) + 4169 ATI RADEON 9500 Secondary (R350) + 4170 ATI RADEON 9600 Series Secondary (RV350) + 4171 ATI RADEON 9600 Series Secondary (RV350) + 4172 ATI RADEON 9600 Series Secondary (RV360) + 4173 ATI RADEON 9550/X1050 Series Secondary (RV350) + 4174 ATI FireGL T2 Secondary (RV350GL) + 4175 ATI RADEON 9600 Series Secondary (RV350) 4237 Radeon 7000 IGP 4242 All-In-Wonder 8500DV (R200AIW) 4243 Radeon 8500 DV OHCI FireWire Controller 4336 Radeon IGP 320M (rs200) 4337 Mobility M6 (U2) (RS200M) - 4341 AC'97 Audio Controller (AD1981) - 4342 HUB Bridge (IXP 150) - 4345 EHCI USB Controller (IXP 150) - 4347 OHCI USB Controller *1 (IXP 150) - 4348 OHCI USB Controller *2 (IXP 150) - 4349 PATA 100 Controller (IXP 1xx/2xx) - 434C LPC Controller (IXP 150) - 434D Agere Systems AC'97 Modem device (a75-s226) + 4341 AC'97 Audio Controller (SB200) + 4342 PCI-PCI Bridge (SB200) + 4345 EHCI USB Controller (SB200) + 4347 OHCI USB Controller *1 + 4348 OHCI USB Controller *2 + 4349 PATA-100 IDE Controller (SB200) + 434C PCI-ISA Bridge (SB200) + 434D AC'97 Modem Controller (SB200) 4353 IXP SB200 SMBUS Controller - 4354 mach64 ct pci (215r2qzua21) - 4358 Mach64 CX (216l0sas25) + 4354 Mach64 CT (215CT222) + 4358 Mach64 CX (210888CX) 4361 AC'97 Audio Controller 4363 IXP SB300 SMBUS Controller 4369 PATA 133 Controller (IXP 3xx) 436D IXP SB300 AC'97 Modem Controller 436E IXP SB300 Serial ATA Controller - 4370 IXP AC'97 Audio Controller (IXP_AUDIO_400) + 4370 IXP SB400 AC'97 Audio Controller 4371 IXP SB400 PCI-PCI Bridge 4372 ATI SMBus (x200) 4373 IXP SB400 EHCI USB 2.0 Controller @@ -395,7 +407,7 @@ 4378 IXP SB400 AC'97 Modem Controller 4379 IXP SB400 Serial ATA Controller 437A IXP SB400 Serial ATA Controller - 437B IXP SB450 High Definition Audio Controller (Intel Corporation) + 437B IXP SB450 High Definition Audio Controller 4380 IXP SB600 Serial ATA Controller 4381 IXP SB600 Serial ATA RAID Controller 4382 IXP SB600 AC'97 Audio Controller @@ -409,9 +421,9 @@ 438A IXP SB600 USB Controller (OHCI3) 438B IXP SB600 USB Controller (OHCI4) 438C ATI RD600/RS600 IDE Controller (RD600/RS600) - 438D ATK0110 ACPI Utility (1043.4.0.0) + 438D IXP SB600 PCI to LPC Bridge 438E IXP SB600 AC'97 Modem Controller - 4390 SB700 SATA Controller [IDE mode] + 4390 Integrated SATA II Controller (SB700) 4391 SB700 SATA Controller [AHCI mode] 4392 SB700 SATA Controller [Non-RAID5 mode] 4393 SB700 SATA Controller [RAID5 mode] @@ -419,16 +431,16 @@ 4395 SB SATA Controller [AHCI mode with HyperFlash-PCIE] 4396 SB700 USB EHCI Controller 4397 SB700 USB OHCI0 Controller - 4398 SB700 USB OHCI1 Controller + 4398 Standard OpenHCD USB-Hostcontroller (SB700) 4399 SB700 USB OHCI2 Controller 439C PATA 133 Controller (SB7xx) 439D SB700 LPC host controller 4437 Radeon Mobility 7000 IGP 4554 Mach64 ET 4654 113--34004-104 (Mach64 VT) - 4742 ATI 3D Rage Pro AGP 2X 8mb (gt-c2u2) ((GT-C2U2)) + 4742 3D Rage Pro AGP 1X/2X ((GT-C2U2)) 4744 Rage 3D Pro AGP 2x (Rage 3D Pro AGP 2x) - 4747 GT-C2U2 (Rage 3D Pro) + 4747 Rage 3D Pro (GT-C2U2) 4749 ATI ALL IN WONDER PRO (8MB) (RAGE PRO TURBO AGP 2X) 474C k7 som+ (Rage XC PCI-66) 474D SLAT (Rage XL AGP 2x) @@ -442,7 +454,7 @@ 4755 3d rage 2 + dvd (Rage 3D II+pci) 4756 Rage 3D IIC PCI [Mach64 GT IIC] (PQFP Package) 4757 Rage 3D IIC AGP (BGA Package) - 4758 Mach 64 GT (210888GXControladores ATI 210888GX [Mach64 GX]) + 4758 Mach64 GX (210888GX) 4759 m3d agp card on agp slot (215r2qzua21) 475A Rage 3D IIC AGP (PQFP Package) 4964 Radeon 9000 Series (RV250 Id) @@ -451,33 +463,33 @@ 4967 Radeon 9000 (RV250) 496E Radeon 9000/9000 Pro - Secondary (RV250) 496F Radeon 9000 (RV250) - Secondary - 4A48 Radeon X800 Series (R420 JH) - 4A49 Radeon X800 gt (R423) - 4A4A Radeon X800 Series - 4A4B RADEON X800 XT (R420) - 4A4C Radeon X800 Series (R420 JL) - 4A4D FireGL X3 (R420 JM) - 4A4E Radeon Mobility 9800 (M18 JN) - 4A4F Radeon X800 SE - 4A50 Radeon X800 XT Platinum - 4A54 Radeon X800 VE (R420) - 4A68 Radeon X800 Series Secondary - 4A69 Radeon X800 Series - Secondary - 4A6A Radeon X800 Series - Secondary - 4A6B RADEON X800 XT Secondary (R420) - 4A6C Radeon X800 Series Secondary - 4A6D FIREGL X3-256 Secondary - 4A6F Radeon X800 SE Secondary - 4A70 Radeon X800 XT Platinum - Secondary - 4A74 Radeon X800 VE (R420) (Secondary) - 4B49 Radeon X850XT + 4A48 ATI RADEON X800 Series (R420) + 4A49 ATI RADEON X800 PRO (R420) + 4A4A ATI RADEON X800 Series (R420) + 4A4B ATI RADEON X800 XT (R420) + 4A4C ATI RADEON X800 Series (R420) + 4A4D ATI FireGL X3-256 (R420GL) + 4A4E ATI MOBILITY /ATI RADEON 9800 (M18) + 4A4F ATI RADEON X800 SE (R420) + 4A50 ATI RADEON X800 XT Platinum Edition (R420) + 4A54 ATI RADEON X800 VE (R420) + 4A68 ATI RADEON X800 Series Secondary (R420) + 4A69 ATI RADEON X800 PRO Secondary (R420) + 4A6A ATI RADEON X800 Series Secondary (R420) + 4A6B ATI RADEON X800 XT Secondary (R420) + 4A6C ATI RADEON X800 Series Secondary (R420) + 4A6D ATI FireGL X3-256 Secondary (R420GL) + 4A6F ATI RADEON X800 SE Secondary (R420) + 4A70 ATI RADEON X800 XT Platinum Edition Secondary (R420) + 4A74 ATI RADEON X800 VE Secondary (R420) + 4B49 ATI RADEON X850 XT (R481) 4B4A Radeon X850 SE - 4B4B Radeon X850 PRO - 4B4C Radeon X850XT-PE - 4B69 Radeon X850XT secondary - 4B6A Radeon X850 SE Secondary - 4B6B Radeon X850 PRO secondary - 4B6C Radeon X850XT-PE Secondary + 4B4B ATI RADEON X850 PRO (R481) + 4B4C ATI RADEON X850 XT Platinum Edition (R481) + 4B69 ATI RADEON X850 XT Secondary (R481) + 4B6A ATI RADEON X850 SE Secondary (R481) + 4B6B ATI RADEON X850 PRO Secondary (R481) + 4B6C ATI RADEON X850 XT Platinum Edition Secondary (R481) 4C42 Rage 3D LT Pro AGP 133MHz (BGA-312 Package) 4C44 Rage 3D LT Pro AGP 133 MHz (Rage 3D LT Pro AGP) 4C45 Rage Mobility M3 AGP @@ -486,18 +498,18 @@ 4C49 Rage 3D LT Pro PCI (BGA-312 Package) 4C4D Rage P/M Mobility AGP 2x (01541014) 4C4E Rage Mobility l (216lo sasa25) - 4C50 Rage 3D LT Pro PCI (VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC) + 4C50 Rage 3D LT Pro PCI (BGA-256 Package) 4C51 Rage 3D LT Pro PCI (BGA-256 Package, Limited 3D) 4C52 Rage P/M Mobility PCI 4C53 Rage L Mobility PCI (216L0SASA25) 4C54 Mach64 LT (264LT) - 4C57 Mobility Radeon 7500 (fdds) + 4C57 Mobility Radeon 7500 (M7 [LW]) 4C58 FireGL Mobility 4C59 Radeon Mobility M6 Series (Mobility 6) 4C5A Radeon Mobility M6 LZ 4C64 Radeon Mobility M9-GL 4C65 Radeon Mobility 9000 (R250 Le) - 4C66 Radeon Mobility 9000 series (ATI MOBILITY RADEON 9000 (Microsoft Corporation -) + 4C66 MOBILITY RADEON 9000 (M9) (R250) 4C67 Radeon Mobility 9000 (R250 Lg) 4C6E Radeon Mobility 9000 - Secondary (R250 Ln) 4D46 Rage Mobility 128 AGP 4x (ATI mobility128) @@ -507,27 +519,27 @@ 4D52 ATI Theater 550 Pro (ATI Theater 550 Pro) 4D53 Unified AVStream Driver 4E44 Radeon 9700/Pro, 9500 Series (R300) - 4E45 Radeon 9700/9500 Series (R300) - 4E46 Radeon 9600TX (R300) + 4E45 ATI RADEON 9500 PRO / 9700 (R300) + 4E46 ATI RADEON 9600 TX (R300) 4E47 Fire GL X1/Z1 AGP/Pro Video Accelerator (R300-WS) - 4E48 Radeon 9800 Pro (R350) + 4E48 ATI RADEON 9800 PRO (R350) 4E49 Radeon 9800 (R350) (??) - 4E4A Radeon 9800 XT (R350) - 4E4B ATI FIREGL X2-256T (FGL9800XT) - 4E50 Mobility Radeon 9700 (M10 NP) (RV350) - 4E51 Mobility Radeon 9600 (M10 NQ) + 4E4A ATI RADEON 9800 XT (R360) + 4E4B ATI FireGL X2-256/X2-256t (R350GL) + 4E50 ATI MOBILITY /ATI RADEON 9600/9700 Series (M10) + 4E51 ATI RADEON 9600 Series (RV350) 4E52 Mobility Radeon 9500/9600 (M10) (RV350) 4E53 Radeon Mobility 9600 (M10 NS) - 4E54 Radeon Mobility M10 NT (RV350-WS) - 4E56 FireGL Mobility T2e (M11 NV) + 4E54 ATI MOBILITY FIRE GL T2/T2e (M10GL) + 4E56 ATI MOBILITY /ATI RADEON 9550 (M12) 4E64 Radeon 9700/Pro, 9500 (R300) Series - Secondary - 4E65 Radeon 9700/9500 Series (R300) - Secondary - 4E66 Radeon 9600TX (R300) - Secondary + 4E65 ATI RADEON 9500 PRO / 9700 Secondary (R300) + 4E66 ATI RADEON 9600 TX Secondary (R300) 4E67 Fire GL X1/Z1 AGP/Pro Secondary Video Accelerator - 4E68 Radeon 9800 Pro (R350) - Secondary - 4E69 Radeon 9800 (R350) - Secondary - 4E6A Radeon 9800 XT (R350) - Secondary - 4E6B ATI FIREGL X2-256T Secondary (FGL9800XT) + 4E68 ATI RADEON 9800 PRO Secondary (R350) + 4E69 ATI RADEON 9800 Secondary (R350) + 4E6A ATI RADEON 9800 XT Secondary (R360) + 4E6B ATI FireGL X2-256/X2-256t Secondary (R350GL) 4E71 Radeon Mobility 9600 (M10 NQ) (secondary) 4F72 Radeon 9000 Series (RV250) 4F73 Radeon 9000 Series (RV250) (Secondary) @@ -538,8 +550,8 @@ 5045 Rage 128 PE/Pro AGP 2x (TMDS) 5046 Rage 128 PF/Pro AGP 4x (TMDS) 5047 3d Rage pro agp 2x (215R3BUA22) - 5048 Rage 128 Pro PH AGP 2x (Rage 128 Pro PH AGP) - 5049 Rage 128 Pro PI AGP 4x (bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t) + 5048 Rage 128 Pro PH AGP 2x (8212104D) + 5049 Rage 128 Pro PI AGP 4x (R128) 504A Rage 128 Pro PJ PCI (TMDS) (Rage 128 Pro PJ PCI) 504B Rage 128 Pro PK AGP 2x (TMDS) (Rage 128 Pro PK AGP) 504C 4x (TMDS) (Rage 128 Pro PL AGP) @@ -583,7 +595,7 @@ 516D Radeon 9100 Series (R200) - Secondary 5245 Rage 128 GL PCI (215R46ASA22) 5246 Rage 32MB (Rage 128 PRO) - 5247 Rage 128 RG + 5247 Rage 128 RG (Rage 32MB) 524B Rage 128 VR RK PCI (g01080-108) 524C Rage 128 RL/VR AGP 2x 5345 Rage 128 SE/4x PCI @@ -595,68 +607,68 @@ 534D Rage 128 4x SM AGP 4x (Rage 128 SM AGP 4x) 534E Rage 128 4x 5354 Mach 64 ST - 5446 Video Controller (VGA Compatible) (ewmewm) + 5446 Rage 128 Pro Ultra TF (unknown) 544C Rage 128 Pro TL 5452 Rage 128 Pro TR 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT 5455 Rade 128 Pro Ultra TU - 5460 Radeon X300 Mobility (M22) (RV370) - 5461 Mobility Radeon X300 - 5462 Mobility Radeon X600 SE - 5464 FireGL GL (M22) - 5548 Radeon X800 (R423 UH) - 5549 Radeon X800 Pro - 554A Radeon X800 XT Platinum - 554B Primary (X800GT) + 5460 ATI MOBILITY /ATI RADEON X300 (M22) + 5461 ATI MOBILITY /ATI RADEON X300 (M22) + 5462 ATI MOBILITY /ATI RADEON X600 SE (M24C) + 5464 ATI MOBILITY FireGL V3100 (M22GL) + 5548 ATI RADEON X800 Series (R423) + 5549 ATI RADEON X800 GTO (R423) + 554A ATI RADEON X800 XT Platinum Edition (R423) + 554B ATI RADEON X800 GT (R423) 554C R430 XTP - 554D Radeon X800 XL (R430) - 554E Radeon X800 Series - 554F Radeon X800 Series - 5550 FireGL V7100 (R423) - 5551 ATI FIREGL V5100 PCI-EX Primary (R423GL-SE) + 554D ATI RADEON X800 CrossFire Edition (R430) + 554E ATI RADEON X800 GT (R430) + 554F ATI RADEON X800 GTO (R430) + 5550 ATI FireGL V7100 (R423GL) + 5551 ATI FireGL V5100 (R423GL) 5552 FireGL V5100 (R423 UR) 5554 FireGL V7100 (R423 UT) - 5568 Radeon X800 Series Secondary - 5569 Radeon X800 Pro - Secondary - 556A Radeon X800 XT Platinum - Secondary - 556B Radeon X800 SE - Secondary + 5568 ATI RADEON X800 Series Secondary (R423) + 5569 ATI RADEON X800 GTO Secondary (R423) + 556A ATI RADEON X800 XT Platinum Edition Secondary (R423) + 556B ATI RADEON X800 GT Secondary (R423) 556C R430 XTP Secondary - 556D Radeon X800 XL - Secondary (R430) - 556E Radeon X800 Series - Secondary - 556F Radeon X800 Series - Secondary - 5570 FIREGL V7100 Secondary - 5571 ATI FIREGL V5100 PCI-EX Secondary (R423GL-SE) - 564A Mobility FIREGL V5000 (M26) - 564B Mobility FIREGL V5000 - 564F Mobility Radeon X700 XL PCIe (M26) - 5652 Mobility Radeon X700 - 5653 Mobility Radeon X700 - 5654 Mach 64 VT VIDEO XPRESSION (215VT2CA42) + 556D ATI RADEON X800 CrossFire Edition Secondary (R430) + 556E ATI RADEON X800 GT Secondary (R430) + 556F ATI RADEON X800 GTO Secondary (R430) + 5570 ATI FireGL V7100 Secondary (R423GL) + 5571 FireGL V5100 PCIe (R423GL-SE) - Secondary + 564A ATI MOBILITY FireGL V5000 (M26GL) + 564B ATI MOBILITY FireGL V5000 (M26GL) + 564F ATI MOBILITY /ATI RADEON X700 XL (M26) + 5652 ATI MOBILITY /ATI RADEON X700 (M26) + 5653 ATI MOBILITY/ATI RADEON X700 (RV410) + 5654 Mach64 VT (215VT22200) 5655 Mach 64 VT3 5656 Mach 64 VT4 PCI (Mach 64 VT4 PCI) - 5657 Radeon X550/X700 Series + 5657 ATI RADEON X550/X700 Series (RV410) 566F RADEON X700 SERIES SECONDARY - 5673 Mobility Radeon X700 Secondary - 5677 Radeon X550/X700 Series Secondary + 5673 ATI MOBILITY /ATI RADEON X700 Secondary (M26) + 5677 ATI RADEON X550/X700 Series Secondary (RV410) 5830 RS300/100 Host Bridge 5831 RS300/133 Host Bridge 5832 RS300/166 Host Bridge - 5833 Radeon IGP9100 RS300/200 Host Bridge + 5833 ATI Radeon 9000/9100 IGP Chipset - Host-PCI Bridge (RS300M) 5834 Radeon 9100 IGP (RS300) - 5835 Mobility Radeon 9100 IGP (RS300M AGP) - 5838 AGP Bridge (Radeon 9100 IGP) + 5835 Mobilitiy Radeon 9100 IGP AGP (RS300M) + 5838 ATI Radeon 9000/9100 IGP Chipset - AGP Controller (RS300M) 5854 Radeon XPRESS 200 Series Secondary 5874 Radeon XPRESS 200 Series Secondary - 5940 www.ati.comRadeon 9200 Pro - Secondary (RV280) + 5940 Radeon 9200 Pro Secondary (RV280) 5941 ATI Radeon 9200 - Secondary (RV280) 5942 Radeon 9000U Family - Secondary 5944 Radeon 9200SE PCI (RV280) 5950 RS480 Host Bridge 5951 Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge 5952 CrossFire Xpress 3200 (RD580) Chipset Host Bridge - 5954 ATI Radeon Xpress 200 Series - RS480 (na) - 5955 Mobility Radeon XPRESS 200 + 5954 ATI RADEON Xpress Series (RS480) + 5955 ATI RADEON Xpress Series (RS480M) 5956 RD790 GFX Dual Slot 5957 RX790 GFX Single Slot 5958 RD780 GFX Dual Slot @@ -664,10 +676,10 @@ 5961 ATI RADEON 9200 se agp (RV280) 5962 Radeon 9000U Family 5964 Radeon 9200 SE Series (Radeon 9200) - 5965 FireMV 2200 (Nvidia) + 5965 FireMV 2200 (unknown) 5969 ES1000 - 5974 Radeon XPRESS 200 Series - 5975 ATI Radeon X1100 (Radeon Xpress 1100) + 5974 ATI RADEON Xpress Series (RS482) + 5975 ATI RADEON Xpress Series (RS482M) 5978 RD790 PCI to PCI bridge (external gfx0 port A) 5979 RD790 PCI to PCI bridge (external gfx0 port B) 597A RD790 PCI to PCI bridge (PCIe gpp port A) @@ -696,7 +708,7 @@ 5A1E RD890 PCI to PCI bridge (external gfx1 port B) 5A1F RD890 PCI to PCI bridge (NB-SB link) 5A30 RS400/100 Host Bridge - 5A31 RS400/133 Host Bridge + 5A31 Host Bridge (RS400/133) 5A32 RS400/166 Host Bridge 5A33 Northbridge: Radeon Xpress 200 (RC410) 5A34 RS480 PCI-X Root Port @@ -705,211 +717,220 @@ 5A38 RS480 PCI Bridge 5A39 RS480 PCI Bridge 5A3F RS480 PCI Bridge - 5A41 Radeon XPRESS 200 - 5A42 SUBSYS_11821043&REV_004&1CF2FBB4&0&2808 (X200M) + 5A41 ATI RADEON Xpress Series (RS400) + 5A42 ATI RADEON Xpress Series (RS400M) 5A43 Radeon XPRESS 200 Series Secondary - 5A61 Radeon Xpress 200 (RC410) VGA card (Radeon XPress 200 (RC410)) - 5A62 ATI RADEON XPRESS 1100 (RC410M) + 5A61 ATI RADEON Xpress Series (RC410) + 5A62 ATI RADEON Xpress Series (RC410M) 5A63 Radeon XPRESS 200 Series Secondary - 5B60 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] (Radeon X300) + 5B60 ATI RADEON X300/X550/X1050 Series (RV370) 5B61 RV371 - 5B62 RADEON X600 Series 265MB (RV380) - 5B63 ATI Radoen X1050 (Unknown) - 5B64 FireGL V3100 (RV370 5B64) + 5B62 ATI RADEON X600 Series (RV380x) + 5B63 ATI RADEON X300/X550/X1050 Series (RV370) + 5B64 ATI FireGL V3100 (RV370GL) 5B65 FireGL D1100 (RV370 5B65) 5B66 RV370X - 5B70 Radeon X300/X550/X1050 Series - Secondary + 5B70 ATI RADEON X300/X550/X1050 Series Secondary (RV370) 5B71 RV371 Secondary - 5B72 Radeon X600 Series - Secondary - 5B73 Radeon X550 Series - Secondary - 5B74 ATI 128MB PCI Express x16 ATI FireGL V3100 (FireGL V3100) - 5B75 FIREMV 2200 Secondary + 5B72 ATI RADEON X600 Series Secondary (RV380x) + 5B73 ATI RADEON X300/X550/X1050 Series Secondary (RV370) + 5B74 ATI FireGL V3100 Secondary (RV370GL) + 5B75 ATI FireMV 2200 Secondary (RV370) 5B76 RV370X Secondary 5C61 Mobility Radeon 9200 (bk-ati ver008.016m.085.006) 5C63 Mobility Radeon 9200 (RV280 (M9+)) 5D44 Radeon 9200 SE Series - Secondary (RV280) 5D45 ATI FireMV 2200 PCI Secondary (RV280) - 5D48 Mobility Radeon X800 XT - 5D49 Mobility FireGL V5100 - 5D4A PCI-E Graphics adapter from Clevo D900T notebook (Mobility Radeon X800) + 5D48 ATI MOBILITY/ATI RADEON X800 XT (M28) + 5D49 ATI MOBILITY FireGL V5100 (M28GL) + 5D4A ATI MOBILITY /ATI RADEON X800 (M28) 5D4C R480 CONSUMER 4P - 5D4D Radeon XT850 (Radeon XT850) + 5D4D ATI RADEON X850 XT Platinum Edition (R480) 5D4E Radeon X800 GT - 5D4F x800gto 256 pci-e (r480) - 5D50 FIREGL V7200 - 5D52 Radeon X850XT (PCIE) Primary (R480) - 5D57 Radeon X800 XT + 5D4F ATI RADEON X800 GTO (R480) + 5D50 ATI FireGL V7200 (R480GL) + 5D52 ATI RADEON X850 XT (R480) + 5D57 ATI RADEON X800 XT (R423) 5D6C R480 CONSUMER 4P Secondary - 5D6D Radeon X850 Series - Secondary + 5D6D ATI RADEON X850 XT Platinum Edition Secondary (R480) 5D6E Radeon X800 GT Secondary - 5D6F Radeon X850 Pro 256M (01131002) - 5D70 FIREGL V7200 Secondary - 5D72 Radeon X850 Series - Secondary - 5D77 Radeon X800 XT - Secondary - 5E48 FireGL V5000 (RV410) + 5D6F ATI RADEON X800 GTO Secondary (R480) + 5D70 ATI FireGL V7200 Secondary (R480GL) + 5D72 ATI RADEON X850 XT Secondary (R480) + 5D77 ATI RADEON X800 XT Secondary (R423) + 5E48 ATI FireGL V5000 (RV410GL) 5E49 FireGL V3300 (RV410) - 5E4A Radeon X700 Series - 5E4B Radeon X700 Series - 5E4C Radeon X700 Series - 5E4D Radeon X700 Series - 5E4F Radeon X700 SE - 5E68 FIREGL V5000 Secondary - 5E6A Radeon X700 Series - Secondary - 5E6B Radeon X700 Series - Secondary - 5E6C Radeon X700 Series - Secondary - 5E6D Radeon X700 Series - Secondary - 5E6F Radeon X700 SE - Secondary + 5E4A ATI RADEON X700 XT (RV410) + 5E4B ATI RADEON X700 PRO (RV410) + 5E4C ATI RADEON X700 SE (RV410) + 5E4D ATI RADEON X700 (RV410) + 5E4F ATI RADEON X700/X550 Series (RV410) + 5E68 ATI FireGL V5000 Secondary (RV410GL) + 5E6A ATI RADEON X700 XT Secondary (RV410) + 5E6B ATI RADEON X700 PRO Secondary (RV410) + 5E6C ATI RADEON X700 SE Secondary (RV410) + 5E6D ATI RADEON X700 Secondary (RV410) + 5E6F ATI RADEON X700/X550 Series Secondary (RV410) 5F57 Radeon X800XT PCIe (R423) + 6898 ATI Radeon HD 5800 Series (EG CYPRESS XT) + 6899 ATI Radeon HD 5800 Series (EG CYPRESS PRO) + 68A0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68A1 ATI Mobility Radeon HD 5800 Series (EG BROADWAY PRO/LP) + 68B0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68B8 ATI Radeon HD 5700 Series (EG JUNIPER XT) + 68BE ATI Radeon HD 5700 Series (EG JUNIPER LE) 700F PCI to AGP Bridge (A3/U1) 7010 PCI to AGP Bridge (RS200) - 7100 Radeon X1800 Series - 7101 Mobility Radeon X1800 XT - 7102 Radeon Mobility X1800 - 7103 Mobility FireGL V7200 - 7104 ATI FireGL 7200 or 3200 - 7105 R520 [FireGL] - 7106 Mobility FireGL V7100 - 7108 Radeon Mobility X1800 + 7100 ATI RADEON X1800 Series (R520) + 7101 ATI MOBILITY /ATI RADEON X1800 XT (M58) + 7102 ATI MOBILITY /ATI RADEON X1800 (M58) + 7103 ATI MOBILITY FireGL V7200 (M58GL) + 7104 ATI FireGL V7200 (R520GL) + 7105 ATI FireGL V5300 (R520GL) + 7106 ATI MOBILITY FireGL V7100 (M58GL) + 7108 ATI RADEON X1800 Series (R520) 7109 Radeon X1800 Series - Secondary - 710A Radeon X1800 GTO - 710B Radeon X1800 - 710C Radeon X1800 - 710E FIREGL V7300 - 710F ATI FireGL (V7350) - 7120 Radeon X1800 Series Secondary - 7124 FireGL V7200 (R520 GL) - Secondary - 7125 Radeon X1800 Series Secondary - 7128 Radeon X1800 Series Secondary - 7129 Radeon X1800 Series - Secondary - 712A Radeon X1800 GTO - Secondary - 712B Radeon X1800 Series Secondary - 712C Radeon X1800 Series Secondary - 712E FIREGL V7300 Secondary - 712F ATI FireGL (V 7350 Secondary) - 7140 Radeon X1300 Series + 710A ATI RADEON X1800 Series (R520) + 710B ATI RADEON X1800 Series (R520) + 710C ATI RADEON X1800 Series (R520) + 710E ATI FireGL V7300 (R520GL) + 710F ATI FireGL V7350 (R520GL) + 7120 ATI RADEON X1800 Series Secondary (R520) + 7124 ATI FireGL V7200 Secondary (R520GL) + 7125 ATI FireGL V5300 Secondary (R520GL) + 7128 ATI RADEON X1800 Series Secondary (R520) + 7129 ATI RADEON X1800 Series Secondary (R520) + 712A ATI RADEON X1800 Series Secondary (R520) + 712B ATI RADEON X1800 Series Secondary (R520) + 712C ATI RADEON X1800 Series Secondary (R520) + 712E ATI FireGL V7300 Secondary (R520GL) + 712F ATI FireGL V7350 Secondary (R520GL) + 7140 ATI RADEON X1600 Series (RV515) 7141 RV505 - 7142 Radeon X1300 Pro or X1550 (rv515) - 7143 Radeon X1550 Series (RV505) - 7145 PCIVEN_104C&DEV_803B&SUBSYS_FF101179&REV_00 (x1400) - 7146 Radeon X1300 XGE (N/A) - 7147 Radeon X1550 64-bit (RV505) - 7149 ATI Mobility Radeon X1300, M52-64 (216CZJAKA12FAG) - 714A Mobility Radeon X1300 - 714B Mobility Radeon X1300 - 714C Mobility Radeon X1300 - 714D Radeon X1300 (RV515) - 714E Radeon X1300 (RV515) + 7142 ATI RADEON X1300/X1550 Series (RV515) + 7143 ATI RADEON X1550 Series (RV515) + 7145 ATI MOBILITY /ATI RADEON X1400 (M54) + 7146 ATI RADEON X1300 / X1550 Series (RV515) + 7147 ATI RADEON X1550 64-bit (RV515) + 7149 ATI MOBILITY /ATI RADEON X1300 (M52) + 714A ATI MOBILITY /ATI RADEON X1300 (M52) + 714B ATI MOBILITY /ATI RADEON X1300 (M52) + 714C ATI MOBILITY /ATI RADEON X1300 (M52) + 714D ATI RADEON X1300 Series (RV515) + 714E ATI RADEON X1300 Series (RV515PCI) 714F RV505 7151 RV505 - 7152 HP Fire GL v3300 (Fire GL v3300) - 7153 FireGL V3350 (RV515GL) - 715E Radeon X1300 Series - 715F Radeon X1300 Series - 7160 Radeon X1300 Series - Secondary + 7152 ATI FireGL V3300 (RV515GL) + 7153 ATI FireGL V3350 (RV515GL) + 715E ATI RADEON X1300 Series (RV515) + 715F ATI RADEON X1550 64-bit (RV515) + 7160 ATI RADEON X1600 Series Secondary (RV515) 7161 RV505 Secondary - 7162 Radeon X1300 Series - Secondary - 7163 Radeon X1300 PRO Secondary - 7166 Radeon X1300 Series - Secondary - 7167 Radeon X1300 Series Secondary + 7162 ATI RADEON X1300/X1550 Series Secondary (RV515) + 7163 ATI RADEON X1550 Series Secondary (RV515) + 7166 ATI RADEON X1300 / X1550 Series Secondary (RV515) + 7167 ATI RADEON X1550 64-bit Secondary (RV515) 7169 M52 Secondary - 716D Radeon X1300 Series Secondary - 716E Radeon X1300 Series Secondary + 716D ATI RADEON X1300 Series Secondary (RV515) + 716E ATI RADEON X1300 Series Secondary (RV515PCI) 716F RV505 Secondary 7171 RV505 Secondary - 7172 FireGL V3300 (RV515GL) Secondary - 7173 FireGL V3350 (RV515GL) Secondary - 717E Radeon X1300 Series Secondary - 717F Radeon X1300 Series Secondary - 7180 Radeon X1300 Series - 7181 Radeon X1600 Series (RV516XT) - 7183 Radeon X1300/X1550 Series (RV505) - 7186 PCIVEN_1002&DEV_7186&SUBSYS_12311043&REV_004&2D404BB6&0&0008 (Mobility Radeon X1450) - 7187 Radeon 1300 (Radeon 1300) - 7188 ATI Mobility Radeon X2300 (Mobility X2300) - 718A Mobility Radeon X2300 Series - 718B Mobility Radeon X1350 - 718C Mobility Radeon X1350 - 718D Mobility Radeon X1450 - 718F Radeon X1300 Series - 7193 Radeon X1550 Series - 7196 Mobility Radeon X1350 - 719B FireMV 2250 - 719F Radeon X1550 Series - 71A0 Radeon X1300 Series Secondary - 71A1 Radeon X1600 Series (RV516XT) Secondary - 71A3 Radeon X1300 Series Secondary - 71A7 Radeon 1300 Secondary (Radeon 1300) - 71B3 Radeon X1550 Series Secondary - 71BB FireMV 2250 Secondary - 71C0 Radeon X1600 Series - 71C1 Radeon X1650 Pro (RV535) - 71C2 ATI X1600 Pro PCI-E (ATI X1600 Pro PCI-E) - 71C3 Radeon X1600 Series - 71C4 Mobility FIREGL V5200 - 71C5 Radeon X1600 Mobility (RV530?) - 71C6 Radeon X1650 Series (RV530 LE) - 71C7 RADEON X1650 SERIES - 71CD Radeon X1600 Series - 71CE Radeon X1600 PRO / X1300XT (RV530 VE) - 71D2 FireGL V3400 (RV530GL) - 71D4 Mobility FireGL V5250 (M56GL) - 71D5 Mobility Radeon X1700 (M66-P) - 71D6 Mobility Radeon X1700 (M66-XT) - 71DA FIREGL V5200 - 71DE Ati Radeon X2500 (Uknown) - 71E0 Radeon X1600 Series Secondary - 71E1 Radeon X1650 Series Secondary - 71E2 Radeon X1600 Series Secondary - 71E3 Radeon X1600 Series Secondary + 7172 ATI FireGL V3300 Secondary (RV515GL) + 7173 ATI FireGL V3350 Secondary (RV515GL) + 717E ATI RADEON X1300 Series Secondary (RV515) + 717F ATI RADEON X1550 64-bit Secondary (RV515) + 7180 ATI RADEON X1300/X1550 Series (RV515) + 7181 ATI RADEON X1600 Series (RV515) + 7183 ATI RADEON X1300/X1550 Series (RV515) + 7186 ATI MOBILITY /ATI RADEON X1450 (M54) + 7187 ATI RADEON X1300/X1550 Series (RV515) + 7188 ATI MOBILITY /ATI RADEON X2300 (M54) + 718A ATI MOBILITY /ATI RADEON X2300 (M54) + 718B ATI MOBILITY /ATI RADEON X1350 (M52) + 718C ATI MOBILITY /ATI RADEON X1350 (M52) + 718D ATI MOBILITY /ATI RADEON X1450 (M54) + 718F ATI RADEON X1300 Series (RV515PCI) + 7193 ATI RADEON X1550 Series (RV515) + 7196 ATI MOBILITY /ATI RADEON X1350 (M52) + 719B ATI FireMV 2250 (RV515) + 719F ATI RADEON X1550 64-bit (RV515) + 71A0 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A1 ATI RADEON X1600 Series Secondary (RV515) + 71A3 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A7 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71AF ATI RADEON X1300 Series Secondary (RV515PCI) + 71B3 ATI RADEON X1550 Series Secondary (RV515) + 71BB ATI FireMV 2250 Secondary (RV515) + 71C0 ATI RADEON X1600 Series (RV530) + 71C1 ATI RADEON X1650 Series (RV535) + 71C2 ATI RADEON X1600 Series (RV530) + 71C3 ATI RADEON X1300 Series (RV535) + 71C4 ATI MOBILITY FireGL V5200 (M56GL) + 71C5 ATI MOBILITY /ATI RADEON X1600 (M56) + 71C6 ATI RADEON X1650 Series (RV530) + 71C7 ATI RADEON X1650 Series (RV535) + 71CD ATI RADEON X1600 Series (RV530) + 71CE ATI RADEON X1600 Pro / ATI RADEON X1300 XT (RV530) + 71D2 ATI FireGL V3400 (RV530GL) + 71D4 ATI MOBILITY FireGL V5250 (M56GL) + 71D5 ATI MOBILITY /ATI RADEON X1700 (M56) + 71D6 ATI MOBILITY /ATI RADEON X1700 XT (M56) + 71DA ATI FireGL V5200 (RV530GL) + 71DE ATI MOBILITY /ATI RADEON X1700 (M56) + 71E0 ATI RADEON X1600 Series Secondary (RV530) + 71E1 ATI RADEON X1650 Series Secondary (RV535) + 71E2 ATI RADEON X1600 Series Secondary (RV530) + 71E3 ATI RADEON X1300 Series Secondary (RV535) 71E5 M56 Secondary - 71E6 Radeon X1650 Series Secondary (RV530 LE) - 71E7 RADEON X1650 SERIES SECONDARY - 71ED Radeon X1600 Series Secondary - 71EE Radeon X1600 PRO / X1300XT Secondary (RV530 VE) + 71E6 ATI RADEON X1600 Series Secondary (RV530) + 71E7 ATI RADEON X1650 Series Secondary (RV535) + 71ED ATI RADEON X1600 Series Secondary (RV530) + 71EE ATI RADEON X1600 Pro / ATI RADEON X1300 XT Secondary (RV530) 71F2 ATI FireGL V3400 Secondary (RV530GL) - 71FA FIREGL V5200 Secondary + 71FA ATI FireGL V5200 Secondary (RV530GL) 71FE RV530 SE Secondary 7205 S3G Unichrome IGP KM400/KN400 (1106) - 7210 Mobility Radeon X2100 - 7211 Mobility Radeon X2100 Secondary - 7240 Radeon X1900 (R580) + 7210 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7211 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7240 ATI RADEON X1950 Series (R580) 7241 Radeon X1900 (R580) 7242 Radeon X1900 (R580) - 7243 Radeon X1900 (R580) - 7244 Radeon X1950XT Series - 7245 Radeon X1900 (R580) - 7246 Radeon X1900 (R580) - 7247 Radeon X1900 (R580) - 7248 Radeon X1900 (R580) - 7249 Radeon X1900 Series - 724A Radeon X1900 (R580) - 724B R580LE (180636911721) - 724C Radeon X1900 (R580) - 724D Radeon X1900 (R580) + 7243 ATI RADEON X1900 Series (R580) + 7244 ATI RADEON X1950 Series (R580) + 7245 ATI RADEON X1900 Series (R580) + 7246 ATI RADEON X1900 Series (R580) + 7247 ATI RADEON X1900 Series (R580) + 7248 ATI RADEON X1900 Series (R580) + 7249 ATI RADEON X1900 Series (R580) + 724A ATI RADEON X1900 Series (R580) + 724B ATI RADEON X1900 Series (R580) + 724C ATI RADEON X1900 Series (R580) + 724D ATI RADEON X1900 Series (R580) 724E FireGL V7300/V7350 PCIe (R580) - 724F Radeon X1900 Series - 7260 Radeon X1950 Series Secondary - 7263 Radeon X1900 Series Secondary - 7264 Radeon X1950XT Series Secondary - 7265 Radeon X1900 Series Secondary - 7266 Radeon X1900 Series Secondary - 7267 Radeon X1900 Series Secondary - 7268 Radeon X1950 Series Secondary - 7269 Radeon X1900 Series Secondary - 726A Radeon X1900 Series Secondary - 726B Radeon X1900 Secondary - 726C Radeon X1900 Series Secondary - 726D Radeon X1900 Series Secondary + 724F ATI RADEON X1900 Series (R580) + 7260 ATI RADEON X1950 Series Secondary (R580) + 7263 ATI RADEON X1900 Series Secondary (R580) + 7264 ATI RADEON X1950 Series Secondary (R580) + 7265 ATI RADEON X1900 Series Secondary (R580) + 7266 ATI RADEON X1900 Series Secondary (R580) + 7267 ATI RADEON X1900 Series Secondary (R580) + 7268 ATI RADEON X1900 Series Secondary (R580) + 7269 ATI RADEON X1900 Series Secondary (R580) + 726A ATI RADEON X1900 Series Secondary (R580) + 726B ATI RADEON X1900 Series Secondary (R580) + 726C ATI RADEON X1900 Series Secondary (R580) + 726D ATI RADEON X1900 Series Secondary (R580) 726E FireGL V7300/V7350 PCIe (R580) - Secondary - 726F Radeon X1900 Series Secondary - 7280 Radeon X1950 Pro Series AGP (0x7280) (Radeon X1950 Pro) - 7288 Radeon X1950 GT - 7291 Radeon X1650 XT (PCIe) - 7293 Radeon X1650 Series - 72A0 Radeon X1950 Pro Series AGP (0x72A0) (Radeon X1950 Pro Secondary) - 72A8 Radeon X1950 GT (Secondary) - 72B1 Radeon X1650 XT (Secondary) (PCIe) - 72B3 Radeon X1650 Series (Secondary) + 726F ATI RADEON X1900 Series Secondary (R580) + 7280 ATI RADEON X1950 Series (R580) + 7284 ATI MOBILITY /ATI RADEON X1900 (M58) + 7288 ATI RADEON X1950 GT (R580) + 7291 ATI RADEON X1650 Series (R580) + 7293 ATI RADEON X1650 Series (R580) + 72A0 ATI RADEON X1950 Series Secondary (R580) + 72A8 ATI RADEON X1950 GT Secondary (R580) + 72B1 ATI RADEON X1650 Series Secondary (R580) + 72B3 ATI RADEON X1650 Series Secondary (R580) 7800 ? 7830 RS350/100 Host Bridge 7831 RS350/133 Host Bridge @@ -923,60 +944,136 @@ 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) 7917 RS690 PCI to PCI Bridge (PCI Express Port 3) 7919 Radeon X1200 Series Audio Controller - 791E ATI xpress 1250 (303017AA) - 791F ATI Mobility Radeon x1250 (RS690) + 791A HDMI Audio (791A) + 791E ATI RADEON X1200 Series (RS690) + 791F ATI Mobility Radeon x1100 (RS690M) 7930 RS600(M) Chipset - Host Bridge 7933 RS600(M) Chipset - PCI Express Graphics Port 0 7935 RS600(M) Chipset - PCI Express Port 1 7937 ATI Technoligies Inc (Samsung R25P) - 793F Radeon X1200 Series (Secondary) - 7941 Radeon XPRESS 1300 - 7942 ATI XPress 1250M (1002) - 796E ATI RADEON 2100 (RS740) + 793F ATI RADEON Xpress 1200 Series (RS600) + 7941 ATI RADEON Xpress 1200 Series (RS600) + 7942 ATI RADEON Xpress 1200 Series (RS600M) + 796E ATI RADEON 2100 (RS690) 7C37 Radeon 9600 SE (RV350 AQ) 9400 ATI Radeon HD 2900 XT (R600) - 9401 Radeon HD 2900 XT - 9402 Radeon HD 2900 XT - 9403 Radeon HD 2900 PRO - 9405 Radeon HD 2900 GT - 940A FireGL V8650 - 940B FireGL V8600 - 940F FireGL V7600 - 9440 Graphics adapter (Radeon 4870) - 94C1 ATI Radeon HD 2400 PRO (REV_00) - 94C3 ATI Radeon HD 2400 PRO (RV610) - 94C4 ATI Radeon HD 3470 PRO AGP (RV610) - 94C5 RADEON HD 2400 LE - 94C7 RADEON HD 2350 - 94C8 Mobility Radeon HD 2400 XT - 94C9 Mobility Radeon HD 2400 - 94CB Radeon E2400 - 94CC ATI Radeon HD 2400 Series (ATI Radeon HD 4670 Series) - 9501 ATI Radeon HD 3870 (RV670) - 9505 Radeon HD 3850 - 9515 ATI Radeon HD3850 AGP - 9581 ATI Mobility Radeon HD2600 (600458) - 9583 Mobility Radeon HD 2600 XT - 9586 Radeon HD 2600 XT AGP - 9587 Radeon hd 2600 pro (agp) ( Radeon hd 2600 pro (agp)) - 9588 ATI Radeon HD 2600 XT (RV530) - 9589 ATI Radeon HD 2600 PRO (RV630) + 9401 ATI RADEON HD 2900 XT (R600) + 9402 ATI RADEON HD 2900 XT (R600) + 9403 ATI RADEON HD 2900 PRO (R600) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 4 15:55:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C9F71065679; Tue, 4 May 2010 15:55:42 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1B8248FC26; Tue, 4 May 2010 15:55: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 o44FtfUi064237; Tue, 4 May 2010 15:55:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44FtfE0064230; Tue, 4 May 2010 15:55:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005041555.o44FtfE0064230@svn.freebsd.org> From: Alan Cox Date: Tue, 4 May 2010 15:55: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: r207617 - in head/sys: dev/drm kern net 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, 04 May 2010 15:55:42 -0000 Author: alc Date: Tue May 4 15:55:41 2010 New Revision: 207617 URL: http://svn.freebsd.org/changeset/base/207617 Log: Add page locking to the vm_page_cow* functions. Push down the acquisition and release of the page queues lock into vm_page_wire(). Reviewed by: kib Modified: head/sys/dev/drm/via_dmablit.c head/sys/kern/uipc_cow.c head/sys/kern/vfs_bio.c head/sys/net/bpf_zerocopy.c head/sys/vm/vm_fault.c head/sys/vm/vm_page.c Modified: head/sys/dev/drm/via_dmablit.c ============================================================================== --- head/sys/dev/drm/via_dmablit.c Tue May 4 15:52:17 2010 (r207616) +++ head/sys/dev/drm/via_dmablit.c Tue May 4 15:55:41 2010 (r207617) @@ -251,10 +251,8 @@ via_lock_all_dma_pages(drm_via_sg_info_t if (m == NULL) break; vm_page_lock(m); - vm_page_lock_queues(); vm_page_wire(m); vm_page_unhold(m); - vm_page_unlock_queues(); vm_page_unlock(m); vsg->pages[i] = m; } Modified: head/sys/kern/uipc_cow.c ============================================================================== --- head/sys/kern/uipc_cow.c Tue May 4 15:52:17 2010 (r207616) +++ head/sys/kern/uipc_cow.c Tue May 4 15:55:41 2010 (r207617) @@ -131,10 +131,8 @@ socow_setup(struct mbuf *m0, struct uio * set up COW */ vm_page_lock(pp); - vm_page_lock_queues(); if (vm_page_cowsetup(pp) != 0) { vm_page_unhold(pp); - vm_page_unlock_queues(); vm_page_unlock(pp); return (0); } @@ -144,7 +142,6 @@ socow_setup(struct mbuf *m0, struct uio */ vm_page_wire(pp); vm_page_unhold(pp); - vm_page_unlock_queues(); vm_page_unlock(pp); /* * Allocate an sf buf Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue May 4 15:52:17 2010 (r207616) +++ head/sys/kern/vfs_bio.c Tue May 4 15:55:41 2010 (r207617) @@ -3043,9 +3043,7 @@ allocbuf(struct buf *bp, int size) * We have a good page. */ vm_page_lock(m); - vm_page_lock_queues(); vm_page_wire(m); - vm_page_unlock_queues(); vm_page_unlock(m); bp->b_pages[bp->b_npages] = m; ++bp->b_npages; Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Tue May 4 15:52:17 2010 (r207616) +++ head/sys/net/bpf_zerocopy.c Tue May 4 15:55:41 2010 (r207617) @@ -171,10 +171,8 @@ zbuf_sfbuf_get(struct vm_map *map, vm_of if (pp == NULL) return (NULL); vm_page_lock(pp); - vm_page_lock_queues(); vm_page_wire(pp); vm_page_unhold(pp); - vm_page_unlock_queues(); vm_page_unlock(pp); sf = sf_buf_alloc(pp, SFB_NOWAIT); if (sf == NULL) { Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Tue May 4 15:52:17 2010 (r207616) +++ head/sys/vm/vm_fault.c Tue May 4 15:55:41 2010 (r207617) @@ -315,8 +315,6 @@ RetryFault:; (fault_type & VM_PROT_WRITE) && (fs.object == fs.first_object)) { vm_page_cowfault(fs.m); - vm_page_unlock_queues(); - vm_page_unlock(fs.m); unlock_and_deallocate(&fs); goto RetryFault; } @@ -797,9 +795,7 @@ vnode_locked: if (wired && (fault_flags & VM_FAULT_CHANGE_WIRING) == 0) { vm_page_lock(fs.first_m); - vm_page_lock_queues(); vm_page_wire(fs.first_m); - vm_page_unlock_queues(); vm_page_unlock(fs.first_m); vm_page_lock(fs.m); @@ -1285,9 +1281,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm vm_page_unlock(src_m); vm_page_lock(dst_m); - vm_page_lock_queues(); vm_page_wire(dst_m); - vm_page_unlock_queues(); vm_page_unlock(dst_m); } else { vm_page_lock(dst_m); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue May 4 15:52:17 2010 (r207616) +++ head/sys/vm/vm_page.c Tue May 4 15:55:41 2010 (r207617) @@ -1544,13 +1544,15 @@ vm_page_wire(vm_page_t m) * and only unqueue the page if it is on some queue (if it is unmanaged * it is already off the queues). */ - mtx_assert(&vm_page_queue_mtx, MA_OWNED); vm_page_lock_assert(m, MA_OWNED); if (m->flags & PG_FICTITIOUS) return; if (m->wire_count == 0) { - if ((m->flags & PG_UNMANAGED) == 0) + if ((m->flags & PG_UNMANAGED) == 0) { + vm_page_lock_queues(); vm_pageq_remove(m); + vm_page_unlock_queues(); + } atomic_add_int(&cnt.v_wire_count, 1); } m->wire_count++; @@ -1922,9 +1924,7 @@ retrylookup: } else { if ((allocflags & VM_ALLOC_WIRED) != 0) { vm_page_lock(m); - vm_page_lock_queues(); vm_page_wire(m); - vm_page_unlock_queues(); vm_page_unlock(m); } if ((allocflags & VM_ALLOC_NOBUSY) == 0) @@ -2224,6 +2224,7 @@ vm_page_cowfault(vm_page_t m) vm_object_t object; vm_pindex_t pindex; + vm_page_lock_assert(m, MA_OWNED); object = m->object; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); KASSERT(object->paging_in_progress != 0, @@ -2238,17 +2239,18 @@ vm_page_cowfault(vm_page_t m) if (mnew == NULL) { vm_page_insert(m, object, pindex); vm_page_unlock_queues(); + vm_page_unlock(m); VM_OBJECT_UNLOCK(object); VM_WAIT; VM_OBJECT_LOCK(object); if (m == vm_page_lookup(object, pindex)) { + vm_page_lock(m); vm_page_lock_queues(); goto retry_alloc; } else { /* * Page disappeared during the wait. */ - vm_page_lock_queues(); return; } } @@ -2269,13 +2271,15 @@ vm_page_cowfault(vm_page_t m) mnew->wire_count = m->wire_count - m->cow; m->wire_count = m->cow; } + vm_page_unlock_queues(); + vm_page_unlock(m); } void vm_page_cowclear(vm_page_t m) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); if (m->cow) { m->cow--; /* @@ -2291,11 +2295,13 @@ int vm_page_cowsetup(vm_page_t m) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); if (m->cow == USHRT_MAX - 1) return (EBUSY); m->cow++; + vm_page_lock_queues(); pmap_remove_write(m); + vm_page_unlock_queues(); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue May 4 16:00:37 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 76DA11065676 for ; Tue, 4 May 2010 16:00:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 04B898FC26 for ; Tue, 4 May 2010 16:00:36 +0000 (UTC) Received: (qmail 11786 invoked by uid 399); 4 May 2010 16:00:36 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 4 May 2010 16:00:36 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BE044A1.1060804@FreeBSD.org> Date: Tue, 04 May 2010 09:00:33 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Alexander Leidinger References: <201005041125.o44BP5eW098015@svn.freebsd.org> <20100504160255.83302gi3jcftvoys@webmail.leidinger.net> In-Reply-To: <20100504160255.83302gi3jcftvoys@webmail.leidinger.net> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Norikatsu Shigemura Subject: Re: svn commit: r207612 - head/usr.sbin/mergemaster 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, 04 May 2010 16:00:37 -0000 On 5/4/2010 7:02 AM, Alexander Leidinger wrote: > Quoting Norikatsu Shigemura (from Tue, 4 May 2010 > 11:25:04 +0000 (UTC)): > >> Author: nork >> Date: Tue May 4 11:25:04 2010 >> New Revision: 207612 >> URL: http://svn.freebsd.org/changeset/base/207612 >> >> Log: >> Add support run services_mkdb(8). > > Shouldn't this (and similar messages) only be done if there is a > corresponding DB file? This is the first case where the db file is "optional." All the others have been created by default for ages now, and nork was simply copying the existing code (including the "make sure" bit). As he pointed out, I asked him to make the prompt unconditional since the db file is small, and harmless if not being used. Making it conditional now is a pointless micro-optimization that will have to be removed down the road when having/needing it becomes the default. hth, Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Tue May 4 16:11:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 147981065672; Tue, 4 May 2010 16:11:04 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F2EC28FC12; Tue, 4 May 2010 16:11: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 o44GB3Is067696; Tue, 4 May 2010 16:11:03 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44GB3l3067680; Tue, 4 May 2010 16:11:03 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201005041611.o44GB3l3067680@svn.freebsd.org> From: Roman Divacky Date: Tue, 4 May 2010 16:11:03 +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: r207618 - in vendor/llvm/dist: . autoconf autoconf/m4 bindings/ocaml/llvm docs docs/CommandGuide examples/ExceptionDemo include/llvm include/llvm-c include/llvm-c/Transforms include/llv... 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, 04 May 2010 16:11:04 -0000 Author: rdivacky Date: Tue May 4 16:11:02 2010 New Revision: 207618 URL: http://svn.freebsd.org/changeset/base/207618 Log: Update LLVM to r103004. Added: vendor/llvm/dist/include/llvm/ADT/Optional.h vendor/llvm/dist/include/llvm/Analysis/Lint.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionNormalization.h vendor/llvm/dist/include/llvm/CodeGen/Analysis.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/MC/EDInstInfo.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAGInfo.h vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionNormalization.cpp vendor/llvm/dist/lib/CodeGen/Analysis.cpp vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMScheduleA8.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleA9.td vendor/llvm/dist/lib/Target/ARM/ARMSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMSelectionDAGInfo.h vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile vendor/llvm/dist/lib/Target/Alpha/AlphaSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinSelectionDAGInfo.h vendor/llvm/dist/lib/Target/CellSPU/SPUSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUSelectionDAGInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeSelectionDAGInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430SelectionDAGInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsSelectionDAGInfo.h vendor/llvm/dist/lib/Target/PIC16/PIC16MachineFunctionInfo.h vendor/llvm/dist/lib/Target/PIC16/PIC16SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16SelectionDAGInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcSelectionDAGInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZSelectionDAGInfo.h vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreSelectionDAGInfo.h vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.h vendor/llvm/dist/test/Analysis/BasicAA/empty.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sle.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/undefined.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/unsimplified-loop.ll vendor/llvm/dist/test/Bitcode/ssse3_palignr.ll vendor/llvm/dist/test/Bitcode/ssse3_palignr.ll.bc (contents, props changed) vendor/llvm/dist/test/CodeGen/ARM/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-09-NeonSelect.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-13-v2f64SplitArg.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-14-SplitVector.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll vendor/llvm/dist/test/CodeGen/ARM/bfx.ll vendor/llvm/dist/test/CodeGen/Alpha/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/CellSPU/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/CellSPU/crash.ll vendor/llvm/dist/test/CodeGen/Generic/crash.ll vendor/llvm/dist/test/CodeGen/MBlaze/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/MSP430/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/MSP430/2010-05-01-CombinerAnd.ll vendor/llvm/dist/test/CodeGen/MSP430/indirectbr.ll vendor/llvm/dist/test/CodeGen/MSP430/indirectbr2.ll vendor/llvm/dist/test/CodeGen/Mips/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll vendor/llvm/dist/test/CodeGen/SPARC/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/SystemZ/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll vendor/llvm/dist/test/CodeGen/Thumb2/bfx.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-08-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-13-AnalyzeBranchCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-21-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-29-CoalescerCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll vendor/llvm/dist/test/CodeGen/X86/MachineSink-CritEdge.ll vendor/llvm/dist/test/CodeGen/X86/alignment.ll vendor/llvm/dist/test/CodeGen/X86/dbg-byval-parameter.ll vendor/llvm/dist/test/CodeGen/X86/fp-elim.ll vendor/llvm/dist/test/CodeGen/X86/lsr-delayed-fold.ll vendor/llvm/dist/test/CodeGen/X86/multiple-loop-post-inc.ll vendor/llvm/dist/test/CodeGen/X86/optimize-max-3.ll vendor/llvm/dist/test/CodeGen/X86/or-address.ll vendor/llvm/dist/test/CodeGen/X86/postra-licm.ll vendor/llvm/dist/test/CodeGen/X86/promote-i16.ll vendor/llvm/dist/test/CodeGen/X86/sibcall-2.ll vendor/llvm/dist/test/CodeGen/X86/store-narrow.ll vendor/llvm/dist/test/CodeGen/XCore/2010-04-07-DbgValueOtherTargets.ll vendor/llvm/dist/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll vendor/llvm/dist/test/DebugInfo/2010-04-13-PubType.ll vendor/llvm/dist/test/DebugInfo/2010-04-19-FramePtr.ll vendor/llvm/dist/test/DebugInfo/2010-04-25-CU-entry_pc.ll vendor/llvm/dist/test/DebugInfo/2010-05-03-DisableFramePtr.ll vendor/llvm/dist/test/DebugInfo/2010-05-03-OriginDIE.ll vendor/llvm/dist/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp vendor/llvm/dist/test/FrontendC/crash-invalid-array.c vendor/llvm/dist/test/FrontendC/inline-asm-function.c vendor/llvm/dist/test/Other/lint.ll vendor/llvm/dist/test/Transforms/ArgumentPromotion/crash.ll vendor/llvm/dist/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll vendor/llvm/dist/test/Transforms/DeadArgElim/deadexternal.ll vendor/llvm/dist/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/eliminate-comparison.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/eliminate-max.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/eliminate-rem.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/udiv.ll vendor/llvm/dist/test/Transforms/Inline/crash2.ll vendor/llvm/dist/test/Transforms/Inline/devirtualize-2.ll vendor/llvm/dist/test/Transforms/Inline/devirtualize-3.ll vendor/llvm/dist/test/Transforms/Inline/devirtualize.ll vendor/llvm/dist/test/Transforms/Inline/gvn-inline-iteration.ll vendor/llvm/dist/test/Transforms/Inline/noinline-recursive-fn.ll vendor/llvm/dist/test/Transforms/LoopIndexSplit/PR4174-2.ll vendor/llvm/dist/test/Transforms/LoopIndexSplit/PR4174.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/insert-positions.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/uglygep.ll vendor/llvm/dist/test/Transforms/SCCP/undef-resolve.ll vendor/llvm/dist/test/Transforms/ScalarRepl/memcpy-align.ll vendor/llvm/dist/tools/edis/CMakeLists.txt vendor/llvm/dist/tools/edis/EDInfo.td vendor/llvm/dist/tools/gold/gold.exports Deleted: vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/lib/Target/ARM/ARMScheduleV7.td vendor/llvm/dist/lib/Target/XCore/MCSectionXCore.cpp vendor/llvm/dist/lib/Target/XCore/MCSectionXCore.h vendor/llvm/dist/lib/Transforms/Scalar/SCCVN.cpp vendor/llvm/dist/test/CodeGen/X86/fast-isel-phys.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-trunc.ll vendor/llvm/dist/test/DebugInfo/2010-03-22-CU-HighLow.ll vendor/llvm/dist/test/Transforms/GlobalOpt/malloc-promote-3.ll vendor/llvm/dist/test/Transforms/Inline/2009-01-12-RecursiveInline.ll vendor/llvm/dist/test/Transforms/Inline/indirect_resolve.ll Modified: vendor/llvm/dist/Makefile vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/Makefile.rules vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/autoconf/m4/link_options.m4 vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c vendor/llvm/dist/configure vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/CommandGuide/lli.pod vendor/llvm/dist/docs/GoldPlugin.html vendor/llvm/dist/docs/HowToSubmitABug.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/LinkTimeOptimization.html vendor/llvm/dist/docs/Passes.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/docs/WritingAnLLVMPass.html vendor/llvm/dist/examples/ExceptionDemo/ExceptionDemo.cpp vendor/llvm/dist/examples/ExceptionDemo/Makefile vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/EnhancedDisassembly.h vendor/llvm/dist/include/llvm-c/Target.h vendor/llvm/dist/include/llvm-c/Transforms/IPO.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/BitVector.h vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h vendor/llvm/dist/include/llvm/ADT/ImmutableSet.h vendor/llvm/dist/include/llvm/ADT/SCCIterator.h vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/StringRef.h vendor/llvm/dist/include/llvm/Analysis/CallGraph.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h vendor/llvm/dist/include/llvm/Analysis/PointerTracking.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/Analysis/Verifier.h vendor/llvm/dist/include/llvm/Bitcode/Archive.h vendor/llvm/dist/include/llvm/CallGraphSCCPass.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadata.h vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/LinkAllCodegenComponents.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineSSAUpdater.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/InlineAsm.h vendor/llvm/dist/include/llvm/IntrinsicInst.h vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/LLVMContext.h vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCDisassembler.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCSectionELF.h vendor/llvm/dist/include/llvm/MC/MCSectionMachO.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/CallSite.h vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/ELF.h vendor/llvm/dist/include/llvm/Support/ErrorHandling.h vendor/llvm/dist/include/llvm/Support/GraphWriter.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/IRReader.h vendor/llvm/dist/include/llvm/Support/RecyclingAllocator.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/ValueHandle.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/System/DataTypes.h.in vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetInstrItineraries.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetSchedule.td vendor/llvm/dist/include/llvm/Transforms/IPO/InlinerPass.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/DomPrinter.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraph.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/PointerTracking.cpp vendor/llvm/dist/lib/Analysis/PostDominators.cpp vendor/llvm/dist/lib/Analysis/README.txt vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Archive/Archive.cpp vendor/llvm/dist/lib/Archive/ArchiveInternals.h vendor/llvm/dist/lib/Archive/ArchiveReader.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/Archive/CMakeLists.txt vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.h vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.cpp vendor/llvm/dist/lib/CodeGen/ExactHazardRecognizer.h vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShadowStackGC.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.h vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.h vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Execution.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.h vendor/llvm/dist/lib/ExecutionEngine/JIT/Intercept.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITMemoryManager.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCSectionELF.cpp vendor/llvm/dist/lib/MC/MCSectionMachO.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/Support/Allocator.cpp vendor/llvm/dist/lib/Support/Debug.cpp vendor/llvm/dist/lib/Support/Dwarf.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/GraphWriter.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/circular_raw_ostream.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/Support/regengine.inc vendor/llvm/dist/lib/System/DynamicLibrary.cpp vendor/llvm/dist/lib/System/Program.cpp vendor/llvm/dist/lib/System/Unix/Path.inc vendor/llvm/dist/lib/System/Unix/Program.inc vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.h vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMJITInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMSchedule.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleV6.td vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaCodeEmitter.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.h vendor/llvm/dist/lib/Target/Alpha/AlphaJITInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaMachineFunctionInfo.h vendor/llvm/dist/lib/Target/Alpha/AlphaRegisterInfo.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaSchedule.td vendor/llvm/dist/lib/Target/Alpha/AlphaTargetMachine.h vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Alpha/CMakeLists.txt vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.h vendor/llvm/dist/lib/Target/Blackfin/BlackfinRegisterInfo.cpp vendor/llvm/dist/lib/Target/Blackfin/BlackfinTargetMachine.h vendor/llvm/dist/lib/Target/Blackfin/CMakeLists.txt vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.h vendor/llvm/dist/lib/Target/CellSPU/SPUMCAsmInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUMachineFunction.h vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUSchedule.td vendor/llvm/dist/lib/Target/CellSPU/SPUTargetMachine.h vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp vendor/llvm/dist/lib/Target/MBlaze/CMakeLists.txt vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelLowering.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelLowering.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeMachineFunction.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeTargetMachine.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.h vendor/llvm/dist/lib/Target/MSP430/CMakeLists.txt vendor/llvm/dist/lib/Target/MSP430/MSP430BranchSelector.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.h vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/Mips/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsMachineFunction.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsSchedule.td vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.h vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h vendor/llvm/dist/lib/Target/PIC16/CMakeLists.txt vendor/llvm/dist/lib/Target/PIC16/PIC16.h vendor/llvm/dist/lib/Target/PIC16/PIC16ISelDAGToDAG.h vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.h vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16TargetMachine.h vendor/llvm/dist/lib/Target/PIC16/PIC16TargetObjectFile.cpp vendor/llvm/dist/lib/Target/PIC16/PIC16TargetObjectFile.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/CMakeLists.txt vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCMachineFunctionInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleG3.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleG4.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleG4Plus.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleG5.td vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/Sparc/CMakeLists.txt vendor/llvm/dist/lib/Target/Sparc/SparcISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcMachineFunctionInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.h vendor/llvm/dist/lib/Target/SystemZ/CMakeLists.txt vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrBuilder.h vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZMCAsmInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.h vendor/llvm/dist/lib/Target/TargetData.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.h vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86ELFWriterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrBuilder.h vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.h vendor/llvm/dist/lib/Target/X86/X86MachineFunctionInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/CMakeLists.txt vendor/llvm/dist/lib/Target/XCore/XCoreISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetObjectFile.cpp vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/CMakeLists.txt vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/IPO.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/IPO/StructRetPromotion.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/Makefile vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/AddrModeMatcher.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicInliner.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerInvoke.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/Dominators.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContext.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp vendor/llvm/dist/lib/VMCore/LeaksContext.h vendor/llvm/dist/lib/VMCore/Makefile vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Pass.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/TypeSymbolTable.cpp vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/runtime/Makefile vendor/llvm/dist/runtime/libprofile/exported_symbols.lst vendor/llvm/dist/test/Analysis/BasicAA/cas.ll vendor/llvm/dist/test/Analysis/CallGraph/2008-09-09-DirectCall.ll vendor/llvm/dist/test/Analysis/CallGraph/2008-09-09-UsedByGlobal.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2008-12-11-SMaxOverflow.ll vendor/llvm/dist/test/Assembler/metadata.ll vendor/llvm/dist/test/Bitcode/memcpy.ll vendor/llvm/dist/test/Bitcode/sse41_pmulld.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll vendor/llvm/dist/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll vendor/llvm/dist/test/CodeGen/ARM/arguments7.ll vendor/llvm/dist/test/CodeGen/ARM/arguments8.ll vendor/llvm/dist/test/CodeGen/ARM/globals.ll vendor/llvm/dist/test/CodeGen/ARM/hidden-vis-3.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt2.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt5.ll vendor/llvm/dist/test/CodeGen/ARM/sbfx.ll vendor/llvm/dist/test/CodeGen/ARM/vadd.ll vendor/llvm/dist/test/CodeGen/ARM/vld1.ll vendor/llvm/dist/test/CodeGen/ARM/vld2.ll vendor/llvm/dist/test/CodeGen/ARM/vld3.ll vendor/llvm/dist/test/CodeGen/ARM/vld4.ll vendor/llvm/dist/test/CodeGen/ARM/vldlane.ll vendor/llvm/dist/test/CodeGen/ARM/vmla.ll vendor/llvm/dist/test/CodeGen/ARM/vmls.ll vendor/llvm/dist/test/CodeGen/ARM/vmul.ll vendor/llvm/dist/test/CodeGen/ARM/vneg.ll vendor/llvm/dist/test/CodeGen/ARM/vst1.ll vendor/llvm/dist/test/CodeGen/ARM/vst2.ll vendor/llvm/dist/test/CodeGen/ARM/vst3.ll vendor/llvm/dist/test/CodeGen/ARM/vst4.ll vendor/llvm/dist/test/CodeGen/ARM/vstlane.ll vendor/llvm/dist/test/CodeGen/ARM/vsub.ll vendor/llvm/dist/test/CodeGen/ARM/vtrn.ll vendor/llvm/dist/test/CodeGen/ARM/vuzp.ll vendor/llvm/dist/test/CodeGen/ARM/vzip.ll vendor/llvm/dist/test/CodeGen/Blackfin/jumptable.ll vendor/llvm/dist/test/CodeGen/CellSPU/bss.ll vendor/llvm/dist/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll vendor/llvm/dist/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll vendor/llvm/dist/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll vendor/llvm/dist/test/CodeGen/MSP430/2009-05-17-Rot.ll vendor/llvm/dist/test/CodeGen/MSP430/2009-05-17-Shift.ll vendor/llvm/dist/test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll vendor/llvm/dist/test/CodeGen/PIC16/2009-11-20-NewNode.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll vendor/llvm/dist/test/CodeGen/PowerPC/indirectbr.ll vendor/llvm/dist/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll vendor/llvm/dist/test/CodeGen/SystemZ/00-RetVoid.ll vendor/llvm/dist/test/CodeGen/SystemZ/01-RetArg.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetAdd.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetAddImm.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetAnd.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetNeg.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetOr.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetSub.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetSubImm.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetXor.ll vendor/llvm/dist/test/CodeGen/SystemZ/02-RetXorImm.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-11-FloatBitConvert.ll vendor/llvm/dist/test/CodeGen/Thumb/machine-licm.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll vendor/llvm/dist/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll vendor/llvm/dist/test/CodeGen/Thumb2/load-global.ll vendor/llvm/dist/test/CodeGen/Thumb2/lsr-deficiency.ll vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-branch.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ifcvt3.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-08-InstrSched.ll vendor/llvm/dist/test/CodeGen/X86/2007-05-05-Personality.ll vendor/llvm/dist/test/CodeGen/X86/2007-05-07-InvokeSRet.ll vendor/llvm/dist/test/CodeGen/X86/2007-06-04-tailmerge4.ll vendor/llvm/dist/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll vendor/llvm/dist/test/CodeGen/X86/2008-01-25-EmptyFunction.ll vendor/llvm/dist/test/CodeGen/X86/2008-07-11-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-10-16-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll vendor/llvm/dist/test/CodeGen/X86/2009-05-28-DAGCombineCrash.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-16-MachineLICM.ll vendor/llvm/dist/test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-07-UAMemFeature.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-08-Atomic64Bug.ll vendor/llvm/dist/test/CodeGen/X86/abi-isel.ll vendor/llvm/dist/test/CodeGen/X86/atomic_add.ll vendor/llvm/dist/test/CodeGen/X86/avoid-loop-align.ll vendor/llvm/dist/test/CodeGen/X86/brcond.ll vendor/llvm/dist/test/CodeGen/X86/const-select.ll vendor/llvm/dist/test/CodeGen/X86/constant-pool-sharing.ll vendor/llvm/dist/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll vendor/llvm/dist/test/CodeGen/X86/crash.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-constpool.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/field-extract-use-trunc.ll vendor/llvm/dist/test/CodeGen/X86/fold-pcmpeqd-0.ll vendor/llvm/dist/test/CodeGen/X86/global-sections.ll vendor/llvm/dist/test/CodeGen/X86/h-registers-0.ll vendor/llvm/dist/test/CodeGen/X86/ins_subreg_coalesce-1.ll vendor/llvm/dist/test/CodeGen/X86/loop-blocks.ll vendor/llvm/dist/test/CodeGen/X86/loop-hoist.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce8.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse.ll vendor/llvm/dist/test/CodeGen/X86/memcpy-2.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/pic_jumptable.ll vendor/llvm/dist/test/CodeGen/X86/rot16.ll vendor/llvm/dist/test/CodeGen/X86/rot32.ll vendor/llvm/dist/test/CodeGen/X86/shl_elim.ll vendor/llvm/dist/test/CodeGen/X86/sibcall.ll vendor/llvm/dist/test/CodeGen/X86/sink-hoist.ll vendor/llvm/dist/test/CodeGen/X86/sse41.ll vendor/llvm/dist/test/CodeGen/X86/stack-align.ll vendor/llvm/dist/test/CodeGen/X86/stack-color-with-reg.ll vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll vendor/llvm/dist/test/CodeGen/X86/tls11.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-load.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-36.ll vendor/llvm/dist/test/CodeGen/X86/vec_ss_load_fold.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-2.ll vendor/llvm/dist/test/CodeGen/X86/xor.ll vendor/llvm/dist/test/CodeGen/XCore/constants.ll vendor/llvm/dist/test/DebugInfo/2009-10-16-Phi.ll vendor/llvm/dist/test/DebugInfo/2010-01-18-DbgValue.ll vendor/llvm/dist/test/FrontendC++/2009-07-16-Using.cpp vendor/llvm/dist/test/FrontendC++/2009-10-27-crash.cpp vendor/llvm/dist/test/FrontendC/2007-05-16-EmptyStruct.c vendor/llvm/dist/test/FrontendC/2008-11-02-WeakAlias.c vendor/llvm/dist/test/FrontendC/2009-01-20-k8.c vendor/llvm/dist/test/FrontendC/2009-01-21-InvalidIterator.c vendor/llvm/dist/test/FrontendC/2009-04-22-UnknownSize.c vendor/llvm/dist/test/FrontendC/2009-06-14-HighlyAligned.c vendor/llvm/dist/test/FrontendC/2009-12-07-BitFieldAlignment.c vendor/llvm/dist/test/FrontendC/cstring-align.c vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_operands.s vendor/llvm/dist/test/MC/AsmParser/exprs.s vendor/llvm/dist/test/MC/Disassembler/arm-tests.txt vendor/llvm/dist/test/MC/Disassembler/dg.exp vendor/llvm/dist/test/MC/Disassembler/neon-tests.txt vendor/llvm/dist/test/MC/Disassembler/simple-tests.txt vendor/llvm/dist/test/MC/Disassembler/thumb-tests.txt vendor/llvm/dist/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/crash.ll vendor/llvm/dist/test/Transforms/GVN/invariant-simple.ll vendor/llvm/dist/test/Transforms/GVN/lifetime-simple.ll vendor/llvm/dist/test/Transforms/GlobalOpt/crash.ll vendor/llvm/dist/test/Transforms/GlobalOpt/malloc-promote-2.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/casted-argument.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/crash.ll vendor/llvm/dist/test/Transforms/Inline/crash.ll vendor/llvm/dist/test/Transforms/Inline/externally_available.ll vendor/llvm/dist/test/Transforms/InstCombine/2007-12-28-IcmpSub2.ll vendor/llvm/dist/test/Transforms/InstCombine/invariant.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll vendor/llvm/dist/test/Transforms/InstCombine/odr-linkage.ll vendor/llvm/dist/test/Transforms/InstCombine/strcpy_chk.ll vendor/llvm/dist/test/Transforms/InstCombine/vec_shuffle.ll vendor/llvm/dist/test/Transforms/JumpThreading/crash.ll vendor/llvm/dist/test/Transforms/LoopIndexSplit/2008-02-08-Crash.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/pr2537.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll vendor/llvm/dist/test/Transforms/LoopUnswitch/crash.ll vendor/llvm/dist/test/Transforms/PruneEH/2008-09-05-CGUpdate.ll vendor/llvm/dist/test/Transforms/SCCP/ipsccp-basic.ll vendor/llvm/dist/test/Transforms/TailCallElim/inf-recursion.ll vendor/llvm/dist/tools/CMakeLists.txt vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/bugpoint/CMakeLists.txt vendor/llvm/dist/tools/bugpoint/CrashDebugger.cpp vendor/llvm/dist/tools/bugpoint/ExecutionDriver.cpp vendor/llvm/dist/tools/bugpoint/FindBugs.cpp vendor/llvm/dist/tools/bugpoint/ListReducer.h vendor/llvm/dist/tools/bugpoint/Makefile vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.h vendor/llvm/dist/tools/bugpoint/bugpoint.cpp vendor/llvm/dist/tools/edis/EDDisassembler.cpp vendor/llvm/dist/tools/edis/EDDisassembler.h vendor/llvm/dist/tools/edis/EDInst.cpp vendor/llvm/dist/tools/edis/EDInst.h vendor/llvm/dist/tools/edis/EDMain.cpp vendor/llvm/dist/tools/edis/EDOperand.cpp vendor/llvm/dist/tools/edis/EDToken.cpp vendor/llvm/dist/tools/edis/EnhancedDisassembly.exports vendor/llvm/dist/tools/edis/Makefile vendor/llvm/dist/tools/gold/Makefile vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-mc/CMakeLists.txt vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.h vendor/llvm/dist/tools/llvm-mc/Makefile vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/lto/lto.exports vendor/llvm/dist/tools/opt/AnalysisWrappers.cpp vendor/llvm/dist/tools/opt/GraphPrinters.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/BitVectorTest.cpp vendor/llvm/dist/unittests/ADT/SmallBitVectorTest.cpp vendor/llvm/dist/unittests/ADT/ValueMapTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.h vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/buildit/GNUmakefile vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/fpcmp/fpcmp.cpp vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/pct-S.ll vendor/llvm/dist/utils/lit/lit/TestFormats.py vendor/llvm/dist/utils/llvm.grm vendor/llvm/dist/utils/unittest/googletest/gtest-filepath.cc vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-port.h Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/Makefile Tue May 4 16:11:02 2010 (r207618) @@ -69,6 +69,14 @@ ifeq ($(MAKECMDGOALS),install-clang) NO_INSTALL = 1 endif +ifeq ($(MAKECMDGOALS),install-clang-c) + DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ + tools/clang/tools/libclang tools/clang/tools/c-index-test \ + tools/clang/include/clang-c + OPTIONAL_DIRS := + NO_INSTALL = 1 +endif + ifeq ($(MAKECMDGOALS),clang-only) DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) tools/clang OPTIONAL_DIRS := @@ -110,6 +118,8 @@ cross-compile-build-tools: ENABLE_COVERAGE=$(ENABLE_COVERAGE) \ DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \ ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \ + CFLAGS= \ + CXXFLAGS= \ ) || exit 1; endif @@ -143,6 +153,7 @@ clang-only: all tools-only: all libs-only: all install-clang: install +install-clang-c: install install-libs: install #------------------------------------------------------------------------ Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/Makefile.config.in Tue May 4 16:11:02 2010 (r207618) @@ -337,3 +337,7 @@ ENABLE_LLVMC_DYNAMIC_PLUGINS = 1 NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@ # -Wno-variadic-macros NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@ + +# Flags supported by the linker. +# bfd ld / gold -retain-symbols-file file +HAVE_LINK_RETAIN_SYMBOLS_FILE = @HAVE_LINK_RETAIN_SYMBOLS_FILE@ Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/Makefile.rules Tue May 4 16:11:02 2010 (r207618) @@ -388,7 +388,6 @@ endif # If REQUIRES_RTTI=1 is specified then don't disable run-time type id. ifneq ($(REQUIRES_RTTI), 1) CXX.Flags += -fno-rtti - CXXFLAGS += -fno-rtti endif ifdef ENABLE_COVERAGE @@ -561,7 +560,7 @@ ifeq ($(HOST_OS),Darwin) # Get "4" out of 10.4 for later pieces in the makefile. DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/') - SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress \ + SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined,suppress \ -dynamiclib ifneq ($(ARCH),ARM) SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) @@ -581,13 +580,6 @@ ifeq ($(TARGET_OS),Darwin) endif endif -# Adjust LD.Flags depending on the kind of library that is to be built. Note -# that if LOADABLE_MODULE is specified then the resulting shared library can -# be opened with dlopen. -ifdef LOADABLE_MODULE - LD.Flags += -module -endif - ifdef SHARED_LIBRARY ifneq ($(DARWIN_MAJVERS),4) LD.Flags += $(RPATH) -Wl,$(LibDir) @@ -640,6 +632,8 @@ CompileCommonOpts += -pedantic -Wno-long endif CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \ $(EXTRA_OPTIONS) +# Enable cast-qual for C++; the workaround is to use const_cast. +CXX.Flags += -Wcast-qual ifeq ($(HOST_OS),HP-UX) CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE @@ -970,6 +964,36 @@ endif endif endif +# Set up the library exports file. +ifdef EXPORTED_SYMBOL_FILE + +# First, set up the native export file, which may differ from the source +# export file. + +ifeq ($(HOST_OS),Darwin) +# Darwin convention prefixes symbols with underscores. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).sed +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Verb) sed -e 's/[[:<:]]/_/' < $< > $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +NativeExportsFile := $(EXPORTED_SYMBOL_FILE) +endif + +# Now add the linker command-line options to use the native export file. + +ifeq ($(HOST_OS),Darwin) +LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) +endif + +# gold, bfd ld, etc. +ifeq ($(HAVE_LINK_RETAIN_SYMBOLS_FILE),1) +LLVMLibsOptions += -Wl,-retain-symbols-file,$(NativeExportsFile) +endif + +endif + ############################################################################### # Library Build Rules: Four ways to build a library ############################################################################### @@ -1060,6 +1084,10 @@ ifdef SHARED_LIBRARY all-local:: $(LibName.SO) +ifdef EXPORTED_SYMBOL_FILE +$(LibName.SO): $(NativeExportsFile) +endif + ifdef LINK_LIBS_IN_SHARED ifdef LOADABLE_MODULE SharedLibKindMessage := "Loadable Module" @@ -1207,6 +1235,12 @@ install-local:: uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else +ifdef NO_INSTALL_ARCHIVES +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) Uninstall circumvented with NO_INSTALL +else DestArchiveLib := $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).a install-local:: $(DestArchiveLib) @@ -1221,6 +1255,7 @@ uninstall-local:: -$(Verb) $(RM) -f $(DestArchiveLib) endif endif +endif # endif LIBRARYNAME endif @@ -1262,7 +1297,7 @@ ifeq ($(HOST_OS),Darwin) # Tiger tools don't support this. ifneq ($(DARWIN_MAJVERS),4) -LD.Flags += -Wl,-exported_symbol -Wl,_main +LD.Flags += -Wl,-exported_symbol,_main endif endif @@ -1331,7 +1366,7 @@ DestToolAlias = $(DESTDIR)$(PROJ_bindir) install-local:: $(DestToolAlias) -$(DestToolAlias): $(DestTool) $(PROJ_bindir) +$(DestToolAlias): $(DestTool) $(Echo) Installing $(BuildMode) $(DestToolAlias) $(Verb) $(RM) -f $(DestToolAlias) $(Verb) $(AliasTool) $(TOOLEXENAME) $(DestToolAlias) Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/autoconf/configure.ac Tue May 4 16:11:02 2010 (r207618) @@ -159,6 +159,11 @@ AC_CACHE_CHECK([type of operating system llvm_cv_no_link_all_option="-Wl,-noall_load" llvm_cv_os_type="Darwin" llvm_cv_platform_type="Unix" ;; + *-*-minix*) + llvm_cv_link_all_option="-Wl,-all_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Minix" + llvm_cv_platform_type="Unix" ;; *-*-freebsd*) llvm_cv_link_all_option="-Wl,--whole-archive" llvm_cv_no_link_all_option="-Wl,--no-whole-archive" @@ -247,6 +252,8 @@ AC_CACHE_CHECK([type of operating system llvm_cv_target_os_type="Cygwin" ;; *-*-darwin*) llvm_cv_target_os_type="Darwin" ;; + *-*-minix*) + llvm_cv_target_os_type="Minix" ;; *-*-freebsd*) llvm_cv_target_os_type="FreeBSD" ;; *-*-openbsd*) @@ -721,8 +728,9 @@ AC_MSG_CHECKING([optimization flags]) case "$withval" in default) case "$llvm_cv_os_type" in - MingW) optimize_option=-O3 ;; - *) optimize_option=-O2 ;; + FreeBSD) optimize_option=-O2 ;; + MingW) optimize_option=-O2 ;; + *) optimize_option=-O3 ;; esac ;; *) optimize_option="$withval" ;; esac @@ -1015,6 +1023,9 @@ AC_LINK_USE_R dnl Determine whether the linker supports the -export-dynamic option. AC_LINK_EXPORT_DYNAMIC +dnl Determine whether the linker supports the -retain-symbols-file option. +AC_LINK_RETAIN_SYMBOLS_FILE + dnl Check for libtool and the library that has dlopen function (which must come dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with dnl libtool). @@ -1283,7 +1294,7 @@ AC_CHECK_FUNCS([backtrace ceilf floorf r AC_CHECK_FUNCS([powf fmodf strtof round ]) AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ]) AC_CHECK_FUNCS([isatty mkdtemp mkstemp ]) -AC_CHECK_FUNCS([mktemp realpath sbrk setrlimit strdup ]) +AC_CHECK_FUNCS([mktemp posix_spawn realpath sbrk setrlimit strdup ]) AC_CHECK_FUNCS([strerror strerror_r strerror_s setenv ]) AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ]) AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp]) Modified: vendor/llvm/dist/autoconf/m4/link_options.m4 ============================================================================== --- vendor/llvm/dist/autoconf/m4/link_options.m4 Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/autoconf/m4/link_options.m4 Tue May 4 16:11:02 2010 (r207618) @@ -8,7 +8,7 @@ AC_DEFUN([AC_LINK_USE_R], [ AC_LANG_PUSH([C]) oldcflags="$CFLAGS" CFLAGS="$CFLAGS -Wl,-R." - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[int main() { return 0; }]])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], [llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no]) CFLAGS="$oldcflags" AC_LANG_POP([C]) @@ -29,7 +29,7 @@ AC_DEFUN([AC_LINK_EXPORT_DYNAMIC], [ AC_LANG_PUSH([C]) oldcflags="$CFLAGS" CFLAGS="$CFLAGS -Wl,-export-dynamic" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[int main() { return 0; }]])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], [llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no]) CFLAGS="$oldcflags" AC_LANG_POP([C]) @@ -39,3 +39,46 @@ if test "$llvm_cv_link_use_export_dynami fi ]) +# +# Determine if the system can handle the -retain-symbols-file option being +# passed to the linker. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE], +[AC_CACHE_CHECK([for compiler -Wl,-retain-symbols-file option], + [llvm_cv_link_use_retain_symbols_file], +[ AC_LANG_PUSH([C]) + oldcflags="$CFLAGS" + + # The following code is from the autoconf manual, + # "11.13: Limitations of Usual Tools". + # Create a temporary directory $tmp in $TMPDIR (default /tmp). + # Use mktemp if possible; otherwise fall back on mkdir, + # with $RANDOM to make collisions less likely. + : ${TMPDIR=/tmp} + { + tmp=` + (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null + ` && + test -n "$tmp" && test -d "$tmp" + } || { + tmp=$TMPDIR/foo$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || exit $? + + echo "main" > "$tmp/exports" + + CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], + [llvm_cv_link_use_retain_symbols_file=yes],[llvm_cv_link_use_retain_symbols_file=no]) + rm "$tmp/exports" + rmdir "$tmp" + CFLAGS="$oldcflags" + AC_LANG_POP([C]) +]) +if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then + AC_SUBST(HAVE_LINK_RETAIN_SYMBOLS_FILE,1) + fi +]) + Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml Tue May 4 16:11:02 2010 (r207618) @@ -90,13 +90,13 @@ module Attribute = struct | Optsize | Ssp | Sspreq - | Alignment + | Alignment of int | Nocapture | Noredzone | Noimplicitfloat | Naked | Inlinehint - | Stackalignment + | Stackalignment of int end module Icmp = struct @@ -170,6 +170,8 @@ external delete_type_name : string -> ll external type_by_name : llmodule -> string -> lltype option = "llvm_type_by_name" external dump_module : llmodule -> unit = "llvm_dump_module" +external set_module_inline_asm : llmodule -> string -> unit + = "llvm_set_module_inline_asm" (*===-- Types -------------------------------------------------------------===*) external classify_type : lltype -> TypeKind.t = "llvm_classify_type" @@ -548,10 +550,42 @@ let rec fold_right_function_range f i e let fold_right_functions f m init = fold_right_function_range f (function_end m) (At_start m) init -external add_function_attr : llvalue -> Attribute.t -> unit - = "llvm_add_function_attr" -external remove_function_attr : llvalue -> Attribute.t -> unit - = "llvm_remove_function_attr" +external llvm_add_function_attr : llvalue -> int -> unit + = "llvm_add_function_attr" +external llvm_remove_function_attr : llvalue -> int -> unit + = "llvm_remove_function_attr" + +let pack_attr (attr:Attribute.t) : int = + match attr with + Attribute.Zext -> 1 lsl 0 + | Attribute.Sext -> 1 lsl 1 + | Attribute.Noreturn -> 1 lsl 2 + | Attribute.Inreg -> 1 lsl 3 + | Attribute.Structret -> 1 lsl 4 + | Attribute.Nounwind -> 1 lsl 5 + | Attribute.Noalias -> 1 lsl 6 + | Attribute.Byval -> 1 lsl 7 + | Attribute.Nest -> 1 lsl 8 + | Attribute.Readnone -> 1 lsl 9 + | Attribute.Readonly -> 1 lsl 10 + | Attribute.Noinline -> 1 lsl 11 + | Attribute.Alwaysinline -> 1 lsl 12 + | Attribute.Optsize -> 1 lsl 13 + | Attribute.Ssp -> 1 lsl 14 + | Attribute.Sspreq -> 1 lsl 15 + | Attribute.Alignment n -> n lsl 16 + | Attribute.Nocapture -> 1 lsl 21 + | Attribute.Noredzone -> 1 lsl 22 + | Attribute.Noimplicitfloat -> 1 lsl 23 + | Attribute.Naked -> 1 lsl 24 + | Attribute.Inlinehint -> 1 lsl 25 + | Attribute.Stackalignment n -> n lsl 26 + +let add_function_attr llval attr = + llvm_add_function_attr llval (pack_attr attr) + +let remove_function_attr llval attr = + llvm_remove_function_attr llval (pack_attr attr) (*--... Operations on params ...............................................--*) external params : llvalue -> llvalue array = "llvm_params" @@ -602,10 +636,17 @@ let rec fold_right_param_range f init i let fold_right_params f fn init = fold_right_param_range f init (param_end fn) (At_start fn) -external add_param_attr : llvalue -> Attribute.t -> unit - = "llvm_add_param_attr" -external remove_param_attr : llvalue -> Attribute.t -> unit - = "llvm_remove_param_attr" +external llvm_add_param_attr : llvalue -> int -> unit + = "llvm_add_param_attr" +external llvm_remove_param_attr : llvalue -> int -> unit + = "llvm_remove_param_attr" + +let add_param_attr llval attr = + llvm_add_param_attr llval (pack_attr attr) + +let remove_param_attr llval attr = + llvm_remove_param_attr llval (pack_attr attr) + external set_param_alignment : llvalue -> int -> unit = "llvm_set_param_alignment" @@ -727,10 +768,17 @@ external instruction_call_conv: llvalue = "llvm_instruction_call_conv" external set_instruction_call_conv: int -> llvalue -> unit = "llvm_set_instruction_call_conv" -external add_instruction_param_attr : llvalue -> int -> Attribute.t -> unit - = "llvm_add_instruction_param_attr" -external remove_instruction_param_attr : llvalue -> int -> Attribute.t -> unit - = "llvm_remove_instruction_param_attr" + +external llvm_add_instruction_param_attr : llvalue -> int -> int -> unit + = "llvm_add_instruction_param_attr" +external llvm_remove_instruction_param_attr : llvalue -> int -> int -> unit + = "llvm_remove_instruction_param_attr" + +let add_instruction_param_attr llval i attr = + llvm_add_instruction_param_attr llval i (pack_attr attr) + +let remove_instruction_param_attr llval i attr = + llvm_remove_instruction_param_attr llval i (pack_attr attr) (*--... Operations on call instructions (only) .............................--*) external is_tail_call : llvalue -> bool = "llvm_is_tail_call" Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli Tue May 4 16:11:02 2010 (r207618) @@ -139,13 +139,13 @@ module Attribute : sig | Optsize | Ssp | Sspreq - | Alignment + | Alignment of int | Nocapture | Noredzone | Noimplicitfloat | Naked | Inlinehint - | Stackalignment + | Stackalignment of int end (** The predicate for an integer comparison ([icmp]) instruction. @@ -284,6 +284,11 @@ external type_by_name : llmodule -> stri error. See the method [llvm::Module::dump]. *) external dump_module : llmodule -> unit = "llvm_dump_module" +(** [set_module_inline_asm m asm] sets the inline assembler for the module. See + the method [llvm::Module::setModuleInlineAsm]. *) +external set_module_inline_asm : llmodule -> string -> unit + = "llvm_set_module_inline_asm" + (** {6 Types} *) @@ -1282,13 +1287,11 @@ external set_gc : string option -> llval (** [add_function_attr f a] adds attribute [a] to the return type of function [f]. *) -external add_function_attr : llvalue -> Attribute.t -> unit - = "llvm_add_function_attr" +val add_function_attr : llvalue -> Attribute.t -> unit (** [remove_function_attr f a] removes attribute [a] from the return type of function [f]. *) -external remove_function_attr : llvalue -> Attribute.t -> unit - = "llvm_remove_function_attr" +val remove_function_attr : llvalue -> Attribute.t -> unit (** {7 Operations on params} *) @@ -1343,11 +1346,10 @@ val rev_iter_params : (llvalue -> unit) val fold_right_params : (llvalue -> 'a -> 'a) -> llvalue -> 'a -> 'a (** [add_param p a] adds attribute [a] to parameter [p]. *) -external add_param_attr : llvalue -> Attribute.t -> unit = "llvm_add_param_attr" +val add_param_attr : llvalue -> Attribute.t -> unit (** [remove_param_attr p a] removes attribute [a] from parameter [p]. *) -external remove_param_attr : llvalue -> Attribute.t -> unit - = "llvm_remove_param_attr" +val remove_param_attr : llvalue -> Attribute.t -> unit (** [set_param_alignment p a] set the alignment of parameter [p] to [a]. *) external set_param_alignment : llvalue -> int -> unit @@ -1499,14 +1501,12 @@ external set_instruction_call_conv: int (** [add_instruction_param_attr ci i a] adds attribute [a] to the [i]th parameter of the call or invoke instruction [ci]. [i]=0 denotes the return value. *) -external add_instruction_param_attr : llvalue -> int -> Attribute.t -> unit - = "llvm_add_instruction_param_attr" +val add_instruction_param_attr : llvalue -> int -> Attribute.t -> unit (** [remove_instruction_param_attr ci i a] removes attribute [a] from the [i]th parameter of the call or invoke instruction [ci]. [i]=0 denotes the return value. *) -external remove_instruction_param_attr : llvalue -> int -> Attribute.t -> unit - = "llvm_remove_instruction_param_attr" +val remove_instruction_param_attr : llvalue -> int -> Attribute.t -> unit (** {Operations on call instructions (only)} *) Modified: vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c ============================================================================== --- vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c Tue May 4 16:11:02 2010 (r207618) @@ -182,6 +182,11 @@ CAMLprim value llvm_dump_module(LLVMModu return Val_unit; } +/* llmodule -> string -> unit */ +CAMLprim value llvm_set_module_inline_asm(LLVMModuleRef M, value Asm) { + LLVMSetModuleInlineAsm(M, String_val(Asm)); + return Val_unit; +} /*===-- Types -------------------------------------------------------------===*/ @@ -941,13 +946,13 @@ CAMLprim value llvm_set_gc(value GC, LLV /* llvalue -> Attribute.t -> unit */ CAMLprim value llvm_add_function_attr(LLVMValueRef Arg, value PA) { - LLVMAddFunctionAttr(Arg, 1< Attribute.t -> unit */ CAMLprim value llvm_remove_function_attr(LLVMValueRef Arg, value PA) { - LLVMRemoveFunctionAttr(Arg, 1< Attribute.t -> unit */ CAMLprim value llvm_add_param_attr(LLVMValueRef Arg, value PA) { - LLVMAddAttribute(Arg, 1< Attribute.t -> unit */ CAMLprim value llvm_remove_param_attr(LLVMValueRef Arg, value PA) { - LLVMRemoveAttribute(Arg, 1<>conftest.$ac_ext <<_ACEOF int main () { -int main() { return 0; } + ; return 0; } @@ -8718,7 +8727,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -int main() { return 0; } + ; return 0; } @@ -8787,6 +8796,116 @@ _ACEOF fi +{ echo "$as_me:$LINENO: checking for compiler -Wl,-retain-symbols-file option" >&5 +echo $ECHO_N "checking for compiler -Wl,-retain-symbols-file option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_retain_symbols_file+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + oldcflags="$CFLAGS" + + # The following code is from the autoconf manual, + # "11.13: Limitations of Usual Tools". + # Create a temporary directory $tmp in $TMPDIR (default /tmp). + # Use mktemp if possible; otherwise fall back on mkdir, + # with $RANDOM to make collisions less likely. + : ${TMPDIR=/tmp} + { + tmp=` + (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null + ` && + test -n "$tmp" && test -d "$tmp" + } || { + tmp=$TMPDIR/foo$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || exit $? + + echo "main" > "$tmp/exports" + + CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_link_use_retain_symbols_file=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_link_use_retain_symbols_file=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + rm "$tmp/exports" + rmdir "$tmp" + CFLAGS="$oldcflags" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_retain_symbols_file" >&5 +echo "${ECHO_T}$llvm_cv_link_use_retain_symbols_file" >&6; } +if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then + HAVE_LINK_RETAIN_SYMBOLS_FILE=1 + + fi + + { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 @@ -11156,7 +11275,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 @@ -21069,6 +21189,7 @@ OCAMLOPT!$OCAMLOPT$ac_delim OCAMLDEP!$OCAMLDEP$ac_delim OCAMLDOC!$OCAMLDOC$ac_delim GAS!$GAS$ac_delim +HAVE_LINK_RETAIN_SYMBOLS_FILE!$HAVE_LINK_RETAIN_SYMBOLS_FILE$ac_delim INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim @@ -21112,7 +21233,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Modified: vendor/llvm/dist/docs/CodeGenerator.html ============================================================================== --- vendor/llvm/dist/docs/CodeGenerator.html Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/docs/CodeGenerator.html Tue May 4 16:11:02 2010 (r207618) @@ -1430,7 +1430,7 @@ bool RegMapping_Fer::compatible_class(Ma instruction, use TargetInstrInfo::get(opcode)::ImplicitUses. Pre-colored registers impose constraints on any register allocation algorithm. The - register allocator must make sure that none of them is been overwritten by + register allocator must make sure that none of them are overwritten by the values of virtual registers while still alive.

@@ -2162,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-25 01:03:04 +0100 (Thu, 25 Mar 2010) $ + Last modified: $Date: 2010-04-09 20:39:54 +0200 (Fri, 09 Apr 2010) $ Modified: vendor/llvm/dist/docs/CommandGuide/lli.pod ============================================================================== --- vendor/llvm/dist/docs/CommandGuide/lli.pod Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/docs/CommandGuide/lli.pod Tue May 4 16:11:02 2010 (r207618) @@ -145,9 +145,9 @@ Disable fusing of spill code into instru Make the -lowerinvoke pass insert expensive, but correct, EH code. -=item B<-enable-eh> +=item B<-jit-enable-eh> -Exception handling should be emitted. +Exception handling should be enabled in the just-in-time compiler. =item B<-join-liveintervals> Modified: vendor/llvm/dist/docs/GoldPlugin.html ============================================================================== --- vendor/llvm/dist/docs/GoldPlugin.html Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/docs/GoldPlugin.html Tue May 4 16:11:02 2010 (r207618) @@ -27,7 +27,7 @@

Building with link time optimization requires cooperation from the system linker. LTO support on Linux systems requires that you use the gold linker which supports -LTO via plugins. This is the same system used by the upcoming +LTO via plugins. This is the same mechanism used by the GCC LTO project.

The LLVM gold plugin implements the @@ -41,10 +41,15 @@ The same plugin can also be used by othe

-

You need to build gold with plugin support and build the LLVMgold -plugin.

+

You need to have gold with plugin support and build the LLVMgold +plugin. Check whether you have gold running /usr/bin/ld -v. It will +report “GNU gold” or else “GNU ld” if not. If you have +gold, check for plugin support by running /usr/bin/ld -plugin. If it +complains “missing argument” then you have plugin support. If not, +such as an “unknown option” error then you will either need to +build gold or install a version with plugin support.

    -
  • Build gold with plugin support: +
  • To build gold with plugin support:
     mkdir binutils
     cd binutils
    @@ -56,9 +61,11 @@ cd build
     ../src/configure --enable-gold --enable-plugins
     make all-gold
     
    - That should leave you with binutils/build/gold/ld-new which supports the --plugin option. - + That should leave you with binutils/build/gold/ld-new which supports the -plugin option. It also built would have +binutils/build/binutils/ar and nm-new which support plugins +but don't have a visible -plugin option, instead relying on the gold plugin +being present in ../lib/bfd-plugins relative to where the binaries are +placed.
  • Build the LLVMgold plugin: Configure LLVM with --with-binutils-include=/path/to/binutils/src/include and run make. @@ -72,7 +79,7 @@ make all-gold the plugin .so file. To find out what link command gcc would run in a given situation, run gcc -v [...] and look for the line where it runs collect2. Replace that with - ld-new -plugin /path/to/LLVMgold.so to test it out. Once you're + ld-new -plugin /path/to/libLLVMgold.so to test it out. Once you're ready to switch to using gold, backup your existing /usr/bin/ld then replace it with ld-new.

    You can produce bitcode files from llvm-gcc using @@ -83,6 +90,11 @@ make all-gold passes the -plugin option to ld. It will not look for an alternate linker, which is why you need gold to be the installed system linker in your path.

    +

    If you want ar and nm to work seamlessly as well, install + libLLVMgold.so to /usr/lib/bfd-plugins. If you built your + own gold, be sure to install the ar and nm-new you built to + /usr/bin. +

@@ -141,8 +153,9 @@ $ llvm-gcc -use-gold-plugin a.a b.o -o m
-

gold, ar and nm all support plugins now, so everything should be - in place for an easy to use LTO build of autotooled projects:

+

Once your system ld, ar and nm all support LLVM + bitcode, everything is in place for an easy to use LTO build of autotooled + projects:

  • Follow the instructions on how to build libLLVMgold.so.
  • Install the newly built binutils to $PREFIX
  • @@ -194,7 +207,7 @@ as much as gold could without the plugin src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Nick Lewycky
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-01-01 23:10:51 -0800 (Thu, 01 Jan 2009) $ + Last modified: $Date: 2010-04-16 23:58:21 -0800 (Fri, 16 Apr 2010) $ Modified: vendor/llvm/dist/docs/HowToSubmitABug.html ============================================================================== --- vendor/llvm/dist/docs/HowToSubmitABug.html Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/docs/HowToSubmitABug.html Tue May 4 16:11:02 2010 (r207618) @@ -186,9 +186,6 @@ foo.bc, one of the following commands sh
  • llc foo.bc
  • llc foo.bc -relocation-model=pic
  • llc foo.bc -relocation-model=static
  • -
  • llc foo.bc -enable-eh
  • -
  • llc foo.bc -relocation-model=pic -enable-eh
  • -
  • llc foo.bc -relocation-model=static -enable-eh
  • If none of these crash, please follow the instructions for a @@ -202,11 +199,6 @@ the one corresponding to the command abo -relocation-model=pic

  • bugpoint -run-llc foo.bc --tool-args -relocation-model=static
  • -
  • bugpoint -run-llc foo.bc --tool-args -enable-eh
  • -
  • bugpoint -run-llc foo.bc --tool-args - -relocation-model=pic -enable-eh
  • -
  • bugpoint -run-llc foo.bc --tool-args - -relocation-model=static -enable-eh
  • Please run this, then file a bug with the instructions and reduced .bc file @@ -348,7 +340,7 @@ the following:

    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ + Last modified: $Date: 2010-05-02 17:36:26 +0200 (Sun, 02 May 2010) $ Modified: vendor/llvm/dist/docs/LangRef.html ============================================================================== --- vendor/llvm/dist/docs/LangRef.html Tue May 4 15:55:41 2010 (r207617) +++ vendor/llvm/dist/docs/LangRef.html Tue May 4 16:11:02 2010 (r207618) @@ -50,6 +50,7 @@
  • Module-Level Inline Assembly
  • Data Layout
  • Pointer Aliasing Rules
  • +
  • Volatile Memory Accesses
  • Type System @@ -89,6 +90,7 @@
  • Complex Constants
  • Global Variable and Function Addresses
  • Undefined Values
  • +
  • Trap Values
  • Addresses of Basic Blocks
  • Constant Expressions
  • @@ -849,11 +851,15 @@ define i32 @main() {

    LLVM allows an explicit section to be specified for globals. If the target supports it, it will emit globals to the section specified.

    -

    An explicit alignment may be specified for a global. If not present, or if - the alignment is set to zero, the alignment of the global is set by the - target to whatever it feels convenient. If an explicit alignment is - specified, the global is forced to have at least that much alignment. All - alignments must be a power of 2.

    +

    An explicit alignment may be specified for a global, which must be a power + of 2. If not present, or if the alignment is set to zero, the alignment of + the global is set by the target to whatever it feels convenient. If an + explicit alignment is specified, the global is forced to have exactly that + alignment. Targets and optimizers are not allowed to over-align the global + if the global has an assigned section. In this case, the extra alignment + could be observable: for example, code could assume that the globals are + densely packed in their section and try to iterate over them as an array, + alignment padding would break this iteration.

    For example, the following defines a global in a numbered address space with an initializer, section, and alignment:

    @@ -1297,7 +1303,7 @@ target datalayout = "layout specifica

    When constructing the data layout for a given target, LLVM starts with a - default set of specifications which are then (possibly) overriden by the + default set of specifications which are then (possibly) overridden by the specifications in the datalayout keyword. The default specifications are given in this list:

    @@ -1393,6 +1399,24 @@ to implement type-based alias analysis.<
+ + + +
+ +

Certain memory accesses, such as loads, stores, and llvm.memcpys may be marked volatile. +The optimizers must not change the number of volatile operations or change their +order of execution relative to other volatile operations. The optimizers +may change the order of volatile operations relative to non-volatile +operations. This is not Java's "volatile" and has no cross-thread +synchronization behavior.

+ +
+ @@ -2303,6 +2327,114 @@ has undefined behavior.

+ +
*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 4 16:12:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EE93106564A; Tue, 4 May 2010 16:12:49 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 58B0F8FC15; Tue, 4 May 2010 16:12: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 o44GCnbw068103; Tue, 4 May 2010 16:12:49 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44GCna2068093; Tue, 4 May 2010 16:12:49 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201005041612.o44GCna2068093@svn.freebsd.org> From: Roman Divacky Date: Tue, 4 May 2010 16:12:49 +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: r207619 - in vendor/clang/dist: . bindings/python bindings/python/clang clang.xcodeproj docs examples/clang-interpreter include include/clang include/clang-c include/clang/AST include/c... 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, 04 May 2010 16:12:49 -0000 Author: rdivacky Date: Tue May 4 16:12:48 2010 New Revision: 207619 URL: http://svn.freebsd.org/changeset/base/207619 Log: Update clang to r103004. Added: vendor/clang/dist/include/clang-c/Makefile vendor/clang/dist/include/clang/AST/ASTVector.h vendor/clang/dist/include/clang/AST/DeclAccessPair.h vendor/clang/dist/include/clang/AST/UsuallyTinyPtrVector.h vendor/clang/dist/lib/Checker/GRCXXExprEngine.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CGVTables.h vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/arm_neon.h vendor/clang/dist/test/Analysis/method-call.cpp vendor/clang/dist/test/Analysis/new.cpp vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.elab/p2.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p2-cxx03.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p3-cxx0x.cpp vendor/clang/dist/test/CXX/class.access/class.protected/p1.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p16-cxx0x-no-extra-copy.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp vendor/clang/dist/test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.user/p3-0x.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p3.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.inst/p11.cpp vendor/clang/dist/test/CodeGen/asm-errors.c vendor/clang/dist/test/CodeGen/asm_arm.c vendor/clang/dist/test/CodeGen/bitfield-2.c vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c vendor/clang/dist/test/CodeGen/catch-undef-behavior.c vendor/clang/dist/test/CodeGen/const-unordered-compare.c vendor/clang/dist/test/CodeGenCXX/PR6747.cpp vendor/clang/dist/test/CodeGenCXX/arm.cpp vendor/clang/dist/test/CodeGenCXX/bitfield-layout.cpp vendor/clang/dist/test/CodeGenCXX/block-destruct.cpp vendor/clang/dist/test/CodeGenCXX/c-linkage.cpp vendor/clang/dist/test/CodeGenCXX/destructor-debug-info.cpp vendor/clang/dist/test/CodeGenCXX/empty-classes.cpp vendor/clang/dist/test/CodeGenCXX/exceptions-no-rtti.cpp vendor/clang/dist/test/CodeGenCXX/field-access-debug-info.cpp vendor/clang/dist/test/CodeGenCXX/implicit-copy-assign-operator.cpp vendor/clang/dist/test/CodeGenCXX/reference-in-blocks.cpp vendor/clang/dist/test/CodeGenCXX/static-local-in-local-class.cpp vendor/clang/dist/test/CodeGenObjC/atomic-aggregate-property.m vendor/clang/dist/test/CodeGenObjC/encode-cstyle-method.m vendor/clang/dist/test/CodeGenObjC/exceptions.m vendor/clang/dist/test/CodeGenObjC/next-objc-dispatch.m vendor/clang/dist/test/CodeGenObjC/ns-constant-strings.m vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm vendor/clang/dist/test/Driver/darwin-objc-defaults.m vendor/clang/dist/test/Driver/darwin-objc-gc.m vendor/clang/dist/test/Driver/darwin-objc-options.m vendor/clang/dist/test/FixIt/fixit-suffix.c vendor/clang/dist/test/FixIt/fixit-unrecoverable.c vendor/clang/dist/test/FixIt/fixit-unrecoverable.cpp vendor/clang/dist/test/Index/Inputs/complete-pch.h vendor/clang/dist/test/Index/complete-exprs.c vendor/clang/dist/test/Index/complete-method-decls.m vendor/clang/dist/test/Index/complete-objc-message-id.m vendor/clang/dist/test/Index/complete-pch.m vendor/clang/dist/test/Index/invalid-code-rdar_7833619.m vendor/clang/dist/test/Index/local-symbols.m vendor/clang/dist/test/Index/usrs.m vendor/clang/dist/test/Lexer/gnu_keywords.c vendor/clang/dist/test/Lexer/utf-16.c vendor/clang/dist/test/Lexer/utf-16.c.txt (contents, props changed) vendor/clang/dist/test/Misc/verify.c vendor/clang/dist/test/PCH/objc_stmts.h vendor/clang/dist/test/PCH/objc_stmts.m vendor/clang/dist/test/Preprocessor/line-directive-output.c vendor/clang/dist/test/Sema/x86-builtin-palignr.c vendor/clang/dist/test/SemaCXX/bitfield-layout.cpp vendor/clang/dist/test/SemaCXX/inc-decrement-qualifiers.cpp vendor/clang/dist/test/SemaCXX/libstdcxx_map_base_hack.cpp vendor/clang/dist/test/SemaCXX/missing-header.cpp vendor/clang/dist/test/SemaCXX/no-exceptions.cpp vendor/clang/dist/test/SemaCXX/storage-class.cpp vendor/clang/dist/test/SemaCXX/typeid-ref.cpp vendor/clang/dist/test/SemaCXX/unused-functions.cpp vendor/clang/dist/test/SemaCXX/warn-unused-parameters.cpp vendor/clang/dist/test/SemaObjC/compound-init.m vendor/clang/dist/test/SemaObjC/ibaction.m vendor/clang/dist/test/SemaObjC/objc-cstyle-args-in-methods.m vendor/clang/dist/test/SemaObjC/pedantic-dynamic-test.m vendor/clang/dist/test/SemaObjC/super-class-protocol-conformance.m vendor/clang/dist/test/SemaObjC/transparent-union.m vendor/clang/dist/test/SemaObjC/warn-unused-exception-param.m vendor/clang/dist/test/SemaObjCXX/instantiate-expr.mm vendor/clang/dist/test/SemaObjCXX/instantiate-message.mm vendor/clang/dist/test/SemaObjCXX/instantiate-stmt.mm vendor/clang/dist/test/SemaObjCXX/ivar-lookup.mm vendor/clang/dist/test/SemaObjCXX/ivar-reference-type.mm vendor/clang/dist/test/SemaObjCXX/overload-1.mm vendor/clang/dist/test/SemaObjCXX/parameters.mm vendor/clang/dist/test/SemaTemplate/default-expr-arguments-2.cpp vendor/clang/dist/test/SemaTemplate/elaborated-type-specifier.cpp vendor/clang/dist/tools/CIndex/CIndex.darwin.exports vendor/clang/dist/tools/libclang/ vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.h vendor/clang/dist/tools/libclang/CIndexInclusionStack.cpp vendor/clang/dist/tools/libclang/CIndexUSRs.cpp vendor/clang/dist/tools/libclang/CIndexer.cpp vendor/clang/dist/tools/libclang/CIndexer.h vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/libclang/CXCursor.h vendor/clang/dist/tools/libclang/CXSourceLocation.h vendor/clang/dist/tools/libclang/Makefile vendor/clang/dist/tools/libclang/libclang.darwin.exports vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/utils/CIndex/ vendor/clang/dist/utils/CIndex/completion_logger_server.py (contents, props changed) Deleted: vendor/clang/dist/include/clang/Analysis/Support/Optional.h vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/test/CodeGen/arm_asm_clobber.c vendor/clang/dist/test/CodeGenCXX/virt.cpp vendor/clang/dist/test/CodeGenObjC/objc-gc-aggr-assign.m vendor/clang/dist/test/FixIt/fixit-at.c Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/Makefile vendor/clang/dist/VER vendor/clang/dist/bindings/python/README.txt vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/docs/Block-ABI-Apple.txt vendor/clang/dist/docs/InternalsManual.html vendor/clang/dist/docs/LanguageExtensions.html vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/include/Makefile vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/APValue.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclContextInternals.h vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/include/clang/AST/DeclNodes.def vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/DependentDiagnostic.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExprObjC.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtNodes.def vendor/clang/dist/include/clang/AST/StmtObjC.h vendor/clang/dist/include/clang/AST/TemplateName.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeNodes.def vendor/clang/dist/include/clang/AST/UnresolvedSet.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/Version.h vendor/clang/dist/include/clang/Checker/BugReporter/BugReporter.h vendor/clang/dist/include/clang/Checker/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRCoreEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Checker/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Checker/PathSensitive/Store.h vendor/clang/dist/include/clang/Checker/PathSensitive/ValueManager.h vendor/clang/dist/include/clang/CodeGen/CodeGenOptions.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/Tool.h vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/Analyses.def vendor/clang/dist/include/clang/Frontend/AnalysisConsumer.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/FixItRewriter.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/PCHBitCodes.h vendor/clang/dist/include/clang/Frontend/PCHReader.h vendor/clang/dist/include/clang/Frontend/StmtXML.def vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/VerifyDiagnosticsClient.h vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/TokenConcatenation.h vendor/clang/dist/include/clang/Makefile vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/AttributeList.h vendor/clang/dist/include/clang/Parse/DeclSpec.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Parse/Scope.h vendor/clang/dist/include/clang/Rewrite/Rewriter.h vendor/clang/dist/lib/AST/APValue.cpp vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/DeclarationName.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.h vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateName.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Checker/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/Checker/BasicStore.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/BugReporterVisitors.cpp vendor/clang/dist/lib/Checker/CFRefCount.cpp vendor/clang/dist/lib/Checker/CMakeLists.txt vendor/clang/dist/lib/Checker/CallAndMessageChecker.cpp vendor/clang/dist/lib/Checker/CastToStructChecker.cpp vendor/clang/dist/lib/Checker/CheckObjCDealloc.cpp vendor/clang/dist/lib/Checker/CheckObjCInstMethSignature.cpp vendor/clang/dist/lib/Checker/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/Checker/GRCoreEngine.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/MemRegion.cpp vendor/clang/dist/lib/Checker/NSAutoreleasePoolChecker.cpp vendor/clang/dist/lib/Checker/NSErrorChecker.cpp vendor/clang/dist/lib/Checker/ObjCUnusedIVarsChecker.cpp vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/Checker/SVals.cpp vendor/clang/dist/lib/Checker/SimpleSValuator.cpp vendor/clang/dist/lib/Checker/Store.cpp vendor/clang/dist/lib/Checker/UnixAPIChecker.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGTemporaries.cpp vendor/clang/dist/lib/CodeGen/CGVTT.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/Mangle.h vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/Frontend/CacheTokens.cpp vendor/clang/dist/lib/Frontend/CodeGenAction.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FixItRewriter.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/LangStandards.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHReaderStmt.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriterStmt.cpp vendor/clang/dist/lib/Frontend/PrintParserCallbacks.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/RewriteMacros.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/StmtXML.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/VerifyDiagnosticsClient.cpp vendor/clang/dist/lib/Frontend/Warnings.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/nmmintrin.h vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Headers/tmmintrin.h vendor/clang/dist/lib/Index/ASTLocation.cpp vendor/clang/dist/lib/Index/Analyzer.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/TokenConcatenation.cpp vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/DeclSpec.cpp vendor/clang/dist/lib/Parse/MinimalAction.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Runtime/Makefile vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.h vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/Lookup.h vendor/clang/dist/lib/Sema/ParseAST.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaInit.h vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaOverload.h vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/ASTMerge/category.m vendor/clang/dist/test/ASTMerge/enum.c vendor/clang/dist/test/ASTMerge/function.c vendor/clang/dist/test/ASTMerge/interface.m vendor/clang/dist/test/ASTMerge/property.m vendor/clang/dist/test/ASTMerge/struct.c vendor/clang/dist/test/ASTMerge/typedef.c vendor/clang/dist/test/ASTMerge/var.c vendor/clang/dist/test/Analysis/inline.c vendor/clang/dist/test/Analysis/inline2.c vendor/clang/dist/test/Analysis/inline3.c vendor/clang/dist/test/Analysis/inline4.c vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/override-werror.c vendor/clang/dist/test/Analysis/unix-fns.c vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p1.cpp vendor/clang/dist/test/CXX/class.access/class.access.base/p5.cpp vendor/clang/dist/test/CXX/class.access/class.access.nest/p1.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/class.access/p6.cpp vendor/clang/dist/test/CXX/class/class.friend/p2.cpp vendor/clang/dist/test/CXX/class/class.local/p2.cpp vendor/clang/dist/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp vendor/clang/dist/test/CXX/conv/conv.mem/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.def/namespace.memdef/p3.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.elab/p3.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p5.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp vendor/clang/dist/test/CXX/except/except.handle/p16.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.delete/p5.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.new/p19.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.new/p20.cpp vendor/clang/dist/test/CXX/stmt.stmt/stmt.select/p3.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.class.spec/temp.class.order/p2.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p1.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p3.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.mem/p1.cpp vendor/clang/dist/test/CXX/temp/temp.param/p3.cpp vendor/clang/dist/test/CXX/temp/temp.spec/p5.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p3.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p4.cpp vendor/clang/dist/test/CodeCompletion/call.cpp vendor/clang/dist/test/CodeCompletion/macros.c vendor/clang/dist/test/CodeCompletion/ordinary-name.cpp vendor/clang/dist/test/CodeGen/2009-10-20-GlobalDebug.c vendor/clang/dist/test/CodeGen/arm-arguments.c vendor/clang/dist/test/CodeGen/asm.c vendor/clang/dist/test/CodeGen/blocks.c vendor/clang/dist/test/CodeGen/decl.c vendor/clang/dist/test/CodeGen/designated-initializers.c vendor/clang/dist/test/CodeGen/functions.c vendor/clang/dist/test/CodeGen/global-init.c vendor/clang/dist/test/CodeGen/init.c vendor/clang/dist/test/CodeGen/libcalls.c vendor/clang/dist/test/CodeGen/palignr.c vendor/clang/dist/test/CodeGen/struct-passing.c vendor/clang/dist/test/CodeGen/union-init2.c vendor/clang/dist/test/CodeGen/x86_32-arguments.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/address-of-fntemplate.cpp vendor/clang/dist/test/CodeGenCXX/anonymous-union-member-initializer.cpp vendor/clang/dist/test/CodeGenCXX/assign-operator.cpp vendor/clang/dist/test/CodeGenCXX/constructor-init-reference.cpp vendor/clang/dist/test/CodeGenCXX/constructors.cpp vendor/clang/dist/test/CodeGenCXX/default-arg-temps.cpp vendor/clang/dist/test/CodeGenCXX/default-destructor-nested.cpp vendor/clang/dist/test/CodeGenCXX/delete.cpp vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/instantiate-init-list.cpp vendor/clang/dist/test/CodeGenCXX/mangle-template.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointer-calls.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/member-initializers.cpp vendor/clang/dist/test/CodeGenCXX/namespace-aliases.cpp vendor/clang/dist/test/CodeGenCXX/new-operator-phi.cpp vendor/clang/dist/test/CodeGenCXX/new.cpp vendor/clang/dist/test/CodeGenCXX/operator-new.cpp vendor/clang/dist/test/CodeGenCXX/rtti-fundamental.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/CodeGenCXX/template-anonymous-union-member-initializer.cpp vendor/clang/dist/test/CodeGenCXX/template-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/value-init.cpp vendor/clang/dist/test/CodeGenCXX/virt-template-vtable.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp vendor/clang/dist/test/CodeGenCXX/x86_32-arguments.cpp vendor/clang/dist/test/CodeGenObjC/blocks.m vendor/clang/dist/test/CodeGenObjC/image-info.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-64.m vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/CodeGenObjC/non-lazy-classes.m vendor/clang/dist/test/CodeGenObjC/objc2-legacy-dispatch.m vendor/clang/dist/test/CodeGenObjC/x86_64-struct-return-gc.m vendor/clang/dist/test/CodeGenObjCXX/mangle.mm vendor/clang/dist/test/Coverage/ast-printing.cpp vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/FixIt/fixit-c90.c vendor/clang/dist/test/FixIt/fixit-cxx0x.cpp vendor/clang/dist/test/FixIt/fixit-errors-1.c vendor/clang/dist/test/FixIt/fixit-errors.c vendor/clang/dist/test/FixIt/fixit-objc.m vendor/clang/dist/test/FixIt/fixit-pmem.cpp vendor/clang/dist/test/FixIt/fixit.c vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/FixIt/typo.c vendor/clang/dist/test/FixIt/typo.cpp vendor/clang/dist/test/FixIt/typo.m vendor/clang/dist/test/Index/annotate-tokens.m vendor/clang/dist/test/Index/complete-at-directives.m vendor/clang/dist/test/Index/complete-at-exprstmt.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Index/load-exprs.c vendor/clang/dist/test/Index/print-usrs.c vendor/clang/dist/test/Misc/message-length.c vendor/clang/dist/test/Misc/tabstop.c vendor/clang/dist/test/PCH/exprs.c vendor/clang/dist/test/PCH/exprs.h vendor/clang/dist/test/PCH/functions.c vendor/clang/dist/test/PCH/functions.h vendor/clang/dist/test/PCH/pr4489.c vendor/clang/dist/test/PCH/types.c vendor/clang/dist/test/Parser/altivec.c vendor/clang/dist/test/Parser/attributes.c vendor/clang/dist/test/Parser/builtin_types_compatible.c vendor/clang/dist/test/Parser/check-syntax-1.m vendor/clang/dist/test/Parser/cxx-altivec.cpp vendor/clang/dist/test/Parser/cxx-casting.cpp vendor/clang/dist/test/Parser/cxx-class.cpp vendor/clang/dist/test/Parser/cxx-friend.cpp vendor/clang/dist/test/Parser/cxx-template-decl.cpp vendor/clang/dist/test/Parser/declarators.c vendor/clang/dist/test/Parser/implicit-casts.c vendor/clang/dist/test/Parser/objc-init.m vendor/clang/dist/test/Parser/objc-quirks.m vendor/clang/dist/test/Preprocessor/expr_usual_conversions.c vendor/clang/dist/test/Preprocessor/if_warning.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/non_fragile_feature.m vendor/clang/dist/test/Preprocessor/output_paste_avoid.c vendor/clang/dist/test/Rewriter/dllimport-typedef.c vendor/clang/dist/test/Rewriter/missing-dllimport.c vendor/clang/dist/test/Rewriter/rewrite-super-message.mm vendor/clang/dist/test/Sema/address_spaces.c vendor/clang/dist/test/Sema/altivec-init.c vendor/clang/dist/test/Sema/anonymous-struct-union.c vendor/clang/dist/test/Sema/arm-layout.c vendor/clang/dist/test/Sema/array-constraint.c vendor/clang/dist/test/Sema/array-init.c vendor/clang/dist/test/Sema/attr-format.c vendor/clang/dist/test/Sema/attr-noreturn.c vendor/clang/dist/test/Sema/attr-section.c vendor/clang/dist/test/Sema/bitfield.c vendor/clang/dist/test/Sema/block-call.c vendor/clang/dist/test/Sema/block-misc.c vendor/clang/dist/test/Sema/block-return.c vendor/clang/dist/test/Sema/builtin-prefetch.c vendor/clang/dist/test/Sema/builtin-stackaddress.c vendor/clang/dist/test/Sema/builtins.c vendor/clang/dist/test/Sema/cast-to-union.c vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/compound-literal.c vendor/clang/dist/test/Sema/conditional-expr.c vendor/clang/dist/test/Sema/conditional.c vendor/clang/dist/test/Sema/decl-invalid.c vendor/clang/dist/test/Sema/declspec.c vendor/clang/dist/test/Sema/enum.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/ext_vector_casts.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/function-ptr.c vendor/clang/dist/test/Sema/function-redecl.c vendor/clang/dist/test/Sema/incompatible-sign.c vendor/clang/dist/test/Sema/invalid-init-diag.c vendor/clang/dist/test/Sema/offsetof.c vendor/clang/dist/test/Sema/parentheses.c vendor/clang/dist/test/Sema/pointer-conversion.c vendor/clang/dist/test/Sema/predef.c vendor/clang/dist/test/Sema/predefined-function.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/Sema/statements.c vendor/clang/dist/test/Sema/struct-compat.c vendor/clang/dist/test/Sema/transparent-union.c vendor/clang/dist/test/Sema/typedef-retain.c vendor/clang/dist/test/Sema/unused-expr.c vendor/clang/dist/test/Sema/vector-assign.c vendor/clang/dist/test/Sema/vector-cast.c vendor/clang/dist/test/Sema/warn-missing-braces.c vendor/clang/dist/test/Sema/warn-unused-function.c vendor/clang/dist/test/Sema/warn-unused-parameters.c vendor/clang/dist/test/Sema/warn-unused-value.c vendor/clang/dist/test/Sema/warn-write-strings.c vendor/clang/dist/test/SemaCXX/abstract.cpp vendor/clang/dist/test/SemaCXX/access-base-class.cpp vendor/clang/dist/test/SemaCXX/access-control-check.cpp vendor/clang/dist/test/SemaCXX/addr-of-overloaded-function.cpp vendor/clang/dist/test/SemaCXX/aggregate-initialization.cpp vendor/clang/dist/test/SemaCXX/anonymous-union.cpp vendor/clang/dist/test/SemaCXX/class-base-member-init.cpp vendor/clang/dist/test/SemaCXX/class.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/constant-expression.cpp vendor/clang/dist/test/SemaCXX/constructor-initializer.cpp vendor/clang/dist/test/SemaCXX/conversion-function.cpp vendor/clang/dist/test/SemaCXX/copy-assignment.cpp vendor/clang/dist/test/SemaCXX/copy-initialization.cpp vendor/clang/dist/test/SemaCXX/cstyle-cast.cpp vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp vendor/clang/dist/test/SemaCXX/default-constructor-initializers.cpp vendor/clang/dist/test/SemaCXX/default1.cpp vendor/clang/dist/test/SemaCXX/default2.cpp vendor/clang/dist/test/SemaCXX/derived-to-base-ambig.cpp vendor/clang/dist/test/SemaCXX/direct-initializer.cpp vendor/clang/dist/test/SemaCXX/elaborated-type-specifier.cpp vendor/clang/dist/test/SemaCXX/exceptions.cpp vendor/clang/dist/test/SemaCXX/functional-cast.cpp vendor/clang/dist/test/SemaCXX/illegal-member-initialization.cpp vendor/clang/dist/test/SemaCXX/implicit-member-functions.cpp vendor/clang/dist/test/SemaCXX/libstdcxx_is_pod_hack.cpp vendor/clang/dist/test/SemaCXX/local-classes.cpp vendor/clang/dist/test/SemaCXX/member-expr.cpp vendor/clang/dist/test/SemaCXX/member-location.cpp vendor/clang/dist/test/SemaCXX/member-pointer.cpp vendor/clang/dist/test/SemaCXX/namespace-alias.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaCXX/new-delete.cpp vendor/clang/dist/test/SemaCXX/offsetof.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/qual-id-test.cpp vendor/clang/dist/test/SemaCXX/qualified-id-lookup.cpp vendor/clang/dist/test/SemaCXX/ref-init-ambiguous.cpp vendor/clang/dist/test/SemaCXX/references.cpp vendor/clang/dist/test/SemaCXX/static-cast.cpp vendor/clang/dist/test/SemaCXX/typedef-redecl.cpp vendor/clang/dist/test/SemaCXX/typeid.cpp vendor/clang/dist/test/SemaCXX/user-defined-conversions.cpp vendor/clang/dist/test/SemaCXX/value-initialization.cpp vendor/clang/dist/test/SemaCXX/virtual-override.cpp vendor/clang/dist/test/SemaCXX/warn-assignment-condition.cpp vendor/clang/dist/test/SemaCXX/warn-missing-noreturn.cpp vendor/clang/dist/test/SemaCXX/warn-reorder-ctor-initialization.cpp vendor/clang/dist/test/SemaCXX/warn-unused-variables.cpp vendor/clang/dist/test/SemaCXX/warn-weak-vtables.cpp vendor/clang/dist/test/SemaObjC/argument-checking.m vendor/clang/dist/test/SemaObjC/block-type-safety.m vendor/clang/dist/test/SemaObjC/blocks.m vendor/clang/dist/test/SemaObjC/call-super-2.m vendor/clang/dist/test/SemaObjC/catch-stmt.m vendor/clang/dist/test/SemaObjC/class-bitfield.m vendor/clang/dist/test/SemaObjC/class-method-lookup.m vendor/clang/dist/test/SemaObjC/class-method-self.m vendor/clang/dist/test/SemaObjC/compatible-protocol-qualified-types.m vendor/clang/dist/test/SemaObjC/comptypes-1.m vendor/clang/dist/test/SemaObjC/comptypes-3.m vendor/clang/dist/test/SemaObjC/comptypes-6.m vendor/clang/dist/test/SemaObjC/comptypes-7.m vendor/clang/dist/test/SemaObjC/comptypes-legal.m vendor/clang/dist/test/SemaObjC/conditional-expr-2.m vendor/clang/dist/test/SemaObjC/conditional-expr-3.m vendor/clang/dist/test/SemaObjC/conditional-expr-4.m vendor/clang/dist/test/SemaObjC/conditional-expr.m vendor/clang/dist/test/SemaObjC/continuation-class-err.m vendor/clang/dist/test/SemaObjC/default-synthesize.m vendor/clang/dist/test/SemaObjC/id.m vendor/clang/dist/test/SemaObjC/incompatible-protocol-qualified-types.m vendor/clang/dist/test/SemaObjC/invalid-code.m vendor/clang/dist/test/SemaObjC/invalid-objc-decls-1.m vendor/clang/dist/test/SemaObjC/invalid-receiver.m vendor/clang/dist/test/SemaObjC/ivar-in-class-extension-error.m vendor/clang/dist/test/SemaObjC/ivar-in-class-extension.m vendor/clang/dist/test/SemaObjC/ivar-lookup.m vendor/clang/dist/test/SemaObjC/message.m vendor/clang/dist/test/SemaObjC/method-arg-qualifier-warning.m vendor/clang/dist/test/SemaObjC/method-bad-param.m vendor/clang/dist/test/SemaObjC/property-9.m vendor/clang/dist/test/SemaObjC/property-typecheck-1.m vendor/clang/dist/test/SemaObjC/protocol-id-test-3.m vendor/clang/dist/test/SemaObjC/protocol-typecheck.m vendor/clang/dist/test/SemaObjC/protocol-warn.m vendor/clang/dist/test/SemaObjC/stmts.m vendor/clang/dist/test/SemaObjC/super.m vendor/clang/dist/test/SemaObjC/synthesized-ivar.m vendor/clang/dist/test/SemaObjC/unused.m vendor/clang/dist/test/SemaObjC/warn-incompatible-builtin-types.m vendor/clang/dist/test/SemaObjC/warn-selector-selection.m vendor/clang/dist/test/SemaObjC/warn-superclass-method-mismatch.m vendor/clang/dist/test/SemaObjC/warn-write-strings.m vendor/clang/dist/test/SemaObjCXX/blocks.mm vendor/clang/dist/test/SemaObjCXX/linkage-spec.mm vendor/clang/dist/test/SemaObjCXX/message.mm vendor/clang/dist/test/SemaObjCXX/objc-pointer-conv.mm vendor/clang/dist/test/SemaObjCXX/void_to_obj.mm vendor/clang/dist/test/SemaTemplate/class-template-decl.cpp vendor/clang/dist/test/SemaTemplate/constructor-template.cpp vendor/clang/dist/test/SemaTemplate/default-expr-arguments.cpp vendor/clang/dist/test/SemaTemplate/dependent-names.cpp vendor/clang/dist/test/SemaTemplate/destructor-template.cpp vendor/clang/dist/test/SemaTemplate/explicit-specialization-member.cpp vendor/clang/dist/test/SemaTemplate/friend-template.cpp vendor/clang/dist/test/SemaTemplate/friend.cpp vendor/clang/dist/test/SemaTemplate/fun-template-def.cpp vendor/clang/dist/test/SemaTemplate/injected-class-name.cpp vendor/clang/dist/test/SemaTemplate/instantiate-complete.cpp vendor/clang/dist/test/SemaTemplate/instantiate-default-assignment-operator.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-2.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-5.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp vendor/clang/dist/test/SemaTemplate/instantiate-local-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-expr.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-initializers.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-method.cpp vendor/clang/dist/test/SemaTemplate/instantiate-non-type-template-parameter.cpp vendor/clang/dist/test/SemaTemplate/instantiate-typedef.cpp vendor/clang/dist/test/SemaTemplate/instantiate-using-decl.cpp vendor/clang/dist/test/SemaTemplate/instantiation-depth.cpp vendor/clang/dist/test/SemaTemplate/nested-name-spec-template.cpp vendor/clang/dist/test/SemaTemplate/qualified-id.cpp vendor/clang/dist/test/SemaTemplate/temp_arg.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_type.cpp vendor/clang/dist/test/SemaTemplate/template-decl-fail.cpp vendor/clang/dist/test/SemaTemplate/typename-specifier-4.cpp vendor/clang/dist/test/SemaTemplate/typename-specifier.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.h vendor/clang/dist/tools/CIndex/CIndexInclusionStack.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/CIndexer.cpp vendor/clang/dist/tools/CIndex/CIndexer.h vendor/clang/dist/tools/CIndex/CMakeLists.txt vendor/clang/dist/tools/CIndex/CXCursor.cpp vendor/clang/dist/tools/CIndex/CXSourceLocation.h vendor/clang/dist/tools/CIndex/Makefile vendor/clang/dist/tools/CMakeLists.txt vendor/clang/dist/tools/Makefile vendor/clang/dist/tools/c-index-test/CMakeLists.txt vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/clang_video-05-25-2007.html vendor/clang/dist/www/clang_video-07-25-2007.html vendor/clang/dist/www/cxx_compatibility.html vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/menu.css Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/CMakeLists.txt Tue May 4 16:12:48 2010 (r207619) @@ -8,6 +8,26 @@ configure_file( set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) +if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) + message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite " +"the makefiles distributed with LLVM. Please create a directory and run cmake " +"from there, passing the path to this source directory as the last argument. " +"This process created the file `CMakeCache.txt' and the directory " +"`CMakeFiles'. Please delete them.") +endif() + +if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR ) + file(GLOB_RECURSE + tablegenned_files_on_include_dir + "${CLANG_SOURCE_DIR}/include/clang/*.inc") + if( tablegenned_files_on_include_dir ) + message(FATAL_ERROR "Apparently there is a previous in-source build, " +"probably as the result of running `configure' and `make' on " +"${CLANG_SOURCE_DIR}. This may cause problems. The suspicious files are:\n" +"${tablegenned_files_on_include_dir}\nPlease clean the source directory.") + endif() +endif() + # Compute the Clang version from the contents of VER file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VER CLANG_VERSION_DATA) string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION @@ -95,6 +115,7 @@ install(DIRECTORY include/ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ DESTINATION include FILES_MATCHING + PATTERN "CMakeFiles" EXCLUDE PATTERN "*.inc" ) Modified: vendor/clang/dist/Makefile ============================================================================== --- vendor/clang/dist/Makefile Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/Makefile Tue May 4 16:12:48 2010 (r207619) @@ -37,30 +37,3 @@ cscope.files: -or -name '*.h' > cscope.files .PHONY: test report clean cscope.files - -install-local:: - $(Echo) Installing include files - $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir) - $(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \ - cd $(PROJ_SRC_ROOT)/tools/clang/include && \ - for hdr in `find . -type f '!' '(' -name '*~' \ - -o -name '.#*' -o -name '*.in' -o -name '*.txt' \ - -o -name 'Makefile' -o -name '*.td' ')' -print \ - | grep -v CVS | grep -v .svn | grep -v .dir` ; do \ - instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \ - if test \! -d "$$instdir" ; then \ - $(EchoCmd) Making install directory $$instdir ; \ - $(MKDIR) $$instdir ;\ - fi ; \ - $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ - done ; \ - fi -ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) - $(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include" ; then \ - cd $(PROJ_OBJ_ROOT)/tools/clang/include && \ - for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \ - | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \ - $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ - done ; \ - fi -endif Modified: vendor/clang/dist/VER ============================================================================== --- vendor/clang/dist/VER Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/VER Tue May 4 16:12:48 2010 (r207619) @@ -1 +1 @@ -1.5 +2.0 Modified: vendor/clang/dist/bindings/python/README.txt ============================================================================== --- vendor/clang/dist/bindings/python/README.txt Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/bindings/python/README.txt Tue May 4 16:12:48 2010 (r207619) @@ -2,10 +2,9 @@ // Clang Python Bindings //===----------------------------------------------------------------------===// -This directory implements Python bindings for Clang. Currently, only bindings -for the CIndex C API exist. +This directory implements Python bindings for Clang. -You may need to alter LD_LIBRARY_PATH so that the CIndex library can be +You may need to alter LD_LIBRARY_PATH so that the Clang library can be found. The unit tests are designed to be run with 'nosetests'. For example: -- $ env PYTHONPATH=$(echo ~/llvm/tools/clang/bindings/python/) \ Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/bindings/python/clang/cindex.py Tue May 4 16:12:48 2010 (r207619) @@ -71,11 +71,11 @@ def get_cindex_library(): import platform name = platform.system() if name == 'Darwin': - return cdll.LoadLibrary('libCIndex.dylib') + return cdll.LoadLibrary('libclang.dylib') elif name == 'Windows': - return cdll.LoadLibrary('libCIndex.dll') + return cdll.LoadLibrary('libclang.dll') else: - return cdll.LoadLibrary('libCIndex.so') + return cdll.LoadLibrary('libclang.so') # ctypes doesn't implicitly convert c_void_p to the appropriate wrapper # object. This is a problem, because it means that from_parameter will see an Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Tue May 4 16:12:48 2010 (r207619) @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 03F50AC50D416EAA00B9CF60 /* Targets.cpp */; }; - 1A14D3A70FD78A3F00DA2835 /* DeclPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A14D3A60FD78A3F00DA2835 /* DeclPrinter.cpp */; }; 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2193CC0F45EEB700C0713D /* Mangle.cpp */; }; 1A2A54B50FD1DD1C00F4CE45 /* AnalysisConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A40FD1DD1C00F4CE45 /* AnalysisConsumer.cpp */; }; 1A2A54B60FD1DD1C00F4CE45 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */; }; @@ -26,11 +25,9 @@ 1A2A54C40FD1DD1C00F4CE45 /* StmtXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B30FD1DD1C00F4CE45 /* StmtXML.cpp */; }; 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */; }; 1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A30A9E80B93A4C800201A91 /* ExprCXX.h */; }; - 1A32C17F0E1C87AD00A6B483 /* ExprConstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A32C17E0E1C87AD00A6B483 /* ExprConstant.cpp */; }; 1A376A2D0D4AED9B002A1C52 /* CGExprConstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */; }; 1A471AB50F437BC500753CE8 /* CGBlocks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */; }; 1A4C41BF105B4C0B0047B5E7 /* CGClass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4C41BE105B4C0B0047B5E7 /* CGClass.cpp */; }; - 1A535ED9107BC45E000C3AE7 /* CXXInheritance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A535ED8107BC45E000C3AE7 /* CXXInheritance.cpp */; }; 1A5D5E580E5E81010023C059 /* CGCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5D5E570E5E81010023C059 /* CGCXX.cpp */; }; 1A621BB7110FE6AA009E6834 /* TargetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621BB5110FE6AA009E6834 /* TargetInfo.cpp */; }; 1A621C4211111D61009E6834 /* CIndexCodeCompletion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A621C3A11111D61009E6834 /* CIndexCodeCompletion.cpp */; }; @@ -45,15 +42,48 @@ 1A6FE7090FD6F85800E00CA9 /* CGTemporaries.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */; }; 1A701B640F7C8FE400FEC4D1 /* SemaAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */; }; 1A7342480C7B57D500122F56 /* CGObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7342470C7B57D500122F56 /* CGObjC.cpp */; }; - 1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A81AA18108144F40094E50B /* CGVtable.cpp */; }; + 1A81AA19108144F40094E50B /* CGVTables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A81AA18108144F40094E50B /* CGVTables.cpp */; }; 1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */; }; 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */; }; - 1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A96785111486FDC00F24372 /* RecordLayout.cpp */; }; 1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97825A1108BA18002B98FC /* CGVTT.cpp */; }; 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */; }; - 1AA1D91810125DE30078DEBC /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */; }; - 1AA963C410D85A7300786C86 /* FullExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA963C310D85A7300786C86 /* FullExpr.cpp */; }; 1ABC36940C7A4BDC006DB0AB /* CGBuiltin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */; }; + 1ABD23D61182449800A48E65 /* APValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B11182449800A48E65 /* APValue.cpp */; }; + 1ABD23D71182449800A48E65 /* ASTConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B21182449800A48E65 /* ASTConsumer.cpp */; }; + 1ABD23D81182449800A48E65 /* ASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B31182449800A48E65 /* ASTContext.cpp */; }; + 1ABD23D91182449800A48E65 /* ASTDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B41182449800A48E65 /* ASTDiagnostic.cpp */; }; + 1ABD23DA1182449800A48E65 /* ASTImporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B51182449800A48E65 /* ASTImporter.cpp */; }; + 1ABD23DB1182449800A48E65 /* AttrImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B61182449800A48E65 /* AttrImpl.cpp */; }; + 1ABD23DC1182449800A48E65 /* CXXInheritance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B71182449800A48E65 /* CXXInheritance.cpp */; }; + 1ABD23DD1182449800A48E65 /* Decl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B81182449800A48E65 /* Decl.cpp */; }; + 1ABD23DE1182449800A48E65 /* DeclarationName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23B91182449800A48E65 /* DeclarationName.cpp */; }; + 1ABD23DF1182449800A48E65 /* DeclBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BA1182449800A48E65 /* DeclBase.cpp */; }; + 1ABD23E01182449800A48E65 /* DeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BB1182449800A48E65 /* DeclCXX.cpp */; }; + 1ABD23E11182449800A48E65 /* DeclFriend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BC1182449800A48E65 /* DeclFriend.cpp */; }; + 1ABD23E21182449800A48E65 /* DeclGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BD1182449800A48E65 /* DeclGroup.cpp */; }; + 1ABD23E31182449800A48E65 /* DeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BE1182449800A48E65 /* DeclObjC.cpp */; }; + 1ABD23E41182449800A48E65 /* DeclPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23BF1182449800A48E65 /* DeclPrinter.cpp */; }; + 1ABD23E51182449800A48E65 /* DeclTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C01182449800A48E65 /* DeclTemplate.cpp */; }; + 1ABD23E61182449800A48E65 /* Expr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C11182449800A48E65 /* Expr.cpp */; }; + 1ABD23E71182449800A48E65 /* ExprConstant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C21182449800A48E65 /* ExprConstant.cpp */; }; + 1ABD23E81182449800A48E65 /* ExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C31182449800A48E65 /* ExprCXX.cpp */; }; + 1ABD23E91182449800A48E65 /* FullExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C41182449800A48E65 /* FullExpr.cpp */; }; + 1ABD23EA1182449800A48E65 /* InheritViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C51182449800A48E65 /* InheritViz.cpp */; }; + 1ABD23EB1182449800A48E65 /* NestedNameSpecifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C61182449800A48E65 /* NestedNameSpecifier.cpp */; }; + 1ABD23EC1182449800A48E65 /* ParentMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C71182449800A48E65 /* ParentMap.cpp */; }; + 1ABD23ED1182449800A48E65 /* RecordLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C81182449800A48E65 /* RecordLayout.cpp */; }; + 1ABD23EE1182449800A48E65 /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23C91182449800A48E65 /* RecordLayoutBuilder.cpp */; }; + 1ABD23EF1182449800A48E65 /* Stmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CB1182449800A48E65 /* Stmt.cpp */; }; + 1ABD23F01182449800A48E65 /* StmtDumper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CC1182449800A48E65 /* StmtDumper.cpp */; }; + 1ABD23F11182449800A48E65 /* StmtIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CD1182449800A48E65 /* StmtIterator.cpp */; }; + 1ABD23F21182449800A48E65 /* StmtPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CE1182449800A48E65 /* StmtPrinter.cpp */; }; + 1ABD23F31182449800A48E65 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23CF1182449800A48E65 /* StmtProfile.cpp */; }; + 1ABD23F41182449800A48E65 /* StmtViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D01182449800A48E65 /* StmtViz.cpp */; }; + 1ABD23F51182449800A48E65 /* TemplateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D11182449800A48E65 /* TemplateBase.cpp */; }; + 1ABD23F61182449800A48E65 /* TemplateName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D21182449800A48E65 /* TemplateName.cpp */; }; + 1ABD23F71182449800A48E65 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D31182449800A48E65 /* Type.cpp */; }; + 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D41182449800A48E65 /* TypeLoc.cpp */; }; + 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABD23D51182449800A48E65 /* TypePrinter.cpp */; }; 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */; }; 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */; }; 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57DD1105820D0047B991 /* DeclXML.cpp */; }; @@ -63,11 +93,7 @@ 1ACB57EA1105820D0047B991 /* LangStandards.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E11105820D0047B991 /* LangStandards.cpp */; }; 1ACB57EB1105820D0047B991 /* TypeXML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E21105820D0047B991 /* TypeXML.cpp */; }; 1ACB57EC1105820D0047B991 /* VerifyDiagnosticsClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */; }; - 1ADD795410A90C6100741BBA /* TypePrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795110A90C6100741BBA /* TypePrinter.cpp */; }; - 1ADD795510A90C6100741BBA /* TypeLoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795210A90C6100741BBA /* TypeLoc.cpp */; }; - 1ADD795610A90C6100741BBA /* TemplateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADD795310A90C6100741BBA /* TemplateBase.cpp */; }; 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */; }; - 1AE4EE3E103B89ED00888A23 /* StmtProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */; }; 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */; }; 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8701161085D00AE030A /* ASTMerge.cpp */; }; 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */; }; @@ -78,12 +104,10 @@ 352246EA0F5C6BE000D0D279 /* PlistDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */; }; 352246EB0F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */; }; 352246EC0F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */; }; - 35260CA50C7F75C000D66CE9 /* ExprCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35260CA40C7F75C000D66CE9 /* ExprCXX.cpp */; }; 352712510DAFE54700C76352 /* IdentifierResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 352712500DAFE54700C76352 /* IdentifierResolver.cpp */; }; 3534A01D0E129849002709B2 /* ParseCXXInlineMethods.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3534A01C0E129849002709B2 /* ParseCXXInlineMethods.cpp */; }; 3536456B0E23EBF7009C6509 /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3536456A0E23EBF7009C6509 /* Environment.cpp */; }; 3537AA0E0ECD08A4008F7CDC /* PreprocessorLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3537AA0D0ECD08A4008F7CDC /* PreprocessorLexer.cpp */; }; - 3538FDB80ED24A4E005EC283 /* DeclarationName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3538FDB70ED24A4E005EC283 /* DeclarationName.cpp */; }; 353959D50EE5F88A00E82461 /* ParseTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 353959D40EE5F88A00E82461 /* ParseTemplate.cpp */; }; 35475B200E79973F0000BFE4 /* CGCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35475B1F0E79973F0000BFE4 /* CGCall.cpp */; }; 355106860E9A8507006A4E44 /* MemRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 355106850E9A8507006A4E44 /* MemRegion.cpp */; }; @@ -94,17 +118,14 @@ 35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B850F5C7FD700D92AA9 /* RangeConstraintManager.cpp */; }; 35544B890F5C7FD700D92AA9 /* SimpleConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */; }; 35544B8C0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */; }; - 3557D1A90EB136B100C59739 /* InheritViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3557D1A80EB136B100C59739 /* InheritViz.cpp */; }; 35585DC00EAFBC4500D0A97A /* SemaOverload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */; }; 3558F76D0E267C8300A5B0DF /* BasicStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3558F76C0E267C8300A5B0DF /* BasicStore.cpp */; }; 356EF9B50C8F7DDF006650F5 /* LiveVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */; }; 35707EFE0CD0F5CC000B2204 /* SourceLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35707EFD0CD0F5CC000B2204 /* SourceLocation.cpp */; }; 357EA27D0F2526F300439B60 /* SemaLookup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 357EA27C0F2526F300439B60 /* SemaLookup.cpp */; }; - 35847BE50CC7DBAF00C40FFF /* StmtIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35847BE40CC7DBAF00C40FFF /* StmtIterator.cpp */; }; 35862B0D0E3628CB0009F542 /* CheckDeadStores.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */; }; 35862B120E3629850009F542 /* GRExprEngineInternalChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */; }; 358CFBB80E65AB04002A8E19 /* BasicConstraintManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */; }; - 358D230B0E8BEB9D0003DDCC /* DeclGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358D230A0E8BEB9D0003DDCC /* DeclGroup.cpp */; }; 358F51520E529AA4007F2102 /* GRState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 358F51510E529AA4007F2102 /* GRState.cpp */; }; 3591853F0EFB1088000039AF /* SemaTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3591853E0EFB1088000039AF /* SemaTemplate.cpp */; }; 3593790A0DA48ABA0043B19C /* BugReporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 359379090DA48ABA0043B19C /* BugReporter.cpp */; }; @@ -115,20 +136,15 @@ 35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */; }; 35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */; }; 35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */; }; - 35BB2D7F0D19954000944DB5 /* ASTConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BB2D7E0D19954000944DB5 /* ASTConsumer.cpp */; }; - 35CFFE000CA1CBCB00E6F2BE /* StmtViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */; }; 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */; }; 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B250D81D8C60092E734 /* CFRefCount.cpp */; }; 35E194690ECB82FB00F21733 /* SemaCXXScopeSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E194670ECB82FB00F21733 /* SemaCXXScopeSpec.cpp */; }; 35E1946A0ECB82FB00F21733 /* SemaCXXCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E194680ECB82FB00F21733 /* SemaCXXCast.cpp */; }; 35E1946D0ECB83C100F21733 /* PTHLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35E1946C0ECB83C100F21733 /* PTHLexer.cpp */; }; - 35EE48B10E0C4CCA00715C54 /* DeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EE48AF0E0C4CCA00715C54 /* DeclCXX.cpp */; }; - 35EE48B20E0C4CCA00715C54 /* ParentMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EE48B00E0C4CCA00715C54 /* ParentMap.cpp */; }; 35EF67700DAD1D2C00B19414 /* SemaDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */; }; 35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */; }; 35F2A01E0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F2A01D0E36AFF100D17527 /* CheckObjCUnusedIVars.cpp */; }; 35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */; }; - 35FE6BCF0DF6EE1F00739712 /* DeclBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35FE6BCE0DF6EE1F00739712 /* DeclBase.cpp */; }; 72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */; }; 84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */; }; 84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */; }; @@ -162,8 +178,6 @@ DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE06D42F0A8BB52D0050E87E /* Parser.cpp */; }; DE06E8140A8FF9330050E87E /* Action.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE06E8130A8FF9330050E87E /* Action.h */; }; DE0FCA630A95859D00248FD5 /* Expr.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE0FCA620A95859D00248FD5 /* Expr.h */; }; - DE0FCB340A9C21F100248FD5 /* Expr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE0FCB330A9C21F100248FD5 /* Expr.cpp */; }; - DE1733000B068B700080B521 /* ASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE1732FF0B068B700080B521 /* ASTContext.cpp */; }; DE17336E0B068DC20080B521 /* DeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE17336D0B068DC20080B521 /* DeclSpec.cpp */; }; DE1733700B068DC60080B521 /* DeclSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE17336F0B068DC60080B521 /* DeclSpec.h */; }; DE1F22030A7D852A00FBF588 /* Parser.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE1F22020A7D852A00FBF588 /* Parser.h */; }; @@ -174,7 +188,6 @@ DE344AB80AE5DF6D00DBC861 /* HeaderSearch.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE344AB70AE5DF6D00DBC861 /* HeaderSearch.h */; }; DE344B540AE5E46C00DBC861 /* HeaderSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */; }; DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3450D60AEB543100DBC861 /* DirectoryLookup.h */; }; - DE3452410AEF1A2D00DBC861 /* Stmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3452400AEF1A2D00DBC861 /* Stmt.cpp */; }; DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3452800AEF1B1800DBC861 /* Stmt.h */; }; DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345C190AFC658B00DBC861 /* StmtVisitor.h */; }; DE345F220AFD347900DBC861 /* StmtNodes.def in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345F210AFD347900DBC861 /* StmtNodes.def */; }; @@ -184,11 +197,9 @@ DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */; }; DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */; }; DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */; }; - DE34621D0AFEB19B00DBC861 /* StmtPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34621C0AFEB19B00DBC861 /* StmtPrinter.cpp */; }; DE3464220B03040900DBC861 /* Type.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3464210B03040900DBC861 /* Type.h */; }; DE37252E0FE481AD00CF2CC2 /* Builtins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE37252D0FE481AD00CF2CC2 /* Builtins.cpp */; }; DE38CD500D794D0100A273B6 /* CGObjCGNU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */; }; - DE38CF270D8C9E6C00A273B6 /* DeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE38CF260D8C9E6C00A273B6 /* DeclObjC.cpp */; }; DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3986EF0CB8D4B300223765 /* IdentifierTable.h */; }; DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */; }; DE4121350D7F1C1C0080F80A /* SymbolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */; }; @@ -218,13 +229,11 @@ DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; }; DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704DD10D1668A4009C7762 /* HeaderMap.cpp */; }; DE75ED290B044DC90020CF81 /* ASTContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE75ED280B044DC90020CF81 /* ASTContext.h */; }; - DE75EDF10B06880E0020CF81 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE75EDF00B06880E0020CF81 /* Type.cpp */; }; DE85CD810D8380B10070E26E /* TokenLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CD800D8380B10070E26E /* TokenLexer.cpp */; }; DE85CDA30D8383B20070E26E /* MacroArgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDA20D8383B20070E26E /* MacroArgs.cpp */; }; DE85CDAC0D838C120070E26E /* PPMacroExpansion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDAB0D838C120070E26E /* PPMacroExpansion.cpp */; }; DE85CDB00D838C390070E26E /* PPDirectives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDAF0D838C390070E26E /* PPDirectives.cpp */; }; DE85CDB60D839BAE0070E26E /* PPLexerChange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE85CDB50D839BAE0070E26E /* PPLexerChange.cpp */; }; - DE8823CB0ED0046600CBC30A /* APValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE8823CA0ED0046600CBC30A /* APValue.cpp */; }; DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE928B120C05659200231DA4 /* ModuleBuilder.cpp */; }; DE928B200C0565B000231DA4 /* ModuleBuilder.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE928B1F0C0565B000231DA4 /* ModuleBuilder.h */; }; DE928B7D0C0A615100231DA4 /* CodeGenModule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE928B7C0C0A615100231DA4 /* CodeGenModule.h */; }; @@ -233,7 +242,6 @@ DE928B830C0A616000231DA4 /* CodeGenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE928B820C0A616000231DA4 /* CodeGenFunction.cpp */; }; DEAEE98B0A5A2B970045101B /* MultipleIncludeOpt.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEAEE98A0A5A2B970045101B /* MultipleIncludeOpt.h */; }; DEAEED4B0A5AF89A0045101B /* NOTES.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEAEED4A0A5AF89A0045101B /* NOTES.txt */; }; - DEB076CF0F3A222200F5A2BE /* DeclTemplate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEB076CE0F3A222200F5A2BE /* DeclTemplate.cpp */; }; DEB077990F44F97800F5A2BE /* TokenConcatenation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEB077980F44F97800F5A2BE /* TokenConcatenation.cpp */; }; DEB07AC80F4A427E00F5A2BE /* SemaAttr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */; }; DEC8D9910A9433CD00353FCA /* Decl.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEC8D9900A9433CD00353FCA /* Decl.h */; }; @@ -246,7 +254,6 @@ DECB77F70FA5850200F5FBC7 /* PCHWriterDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */; }; DECB78170FA5882F00F5FBC7 /* PCHWriterStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */; }; DED626C90AE0C065001E80A4 /* TargetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED626C80AE0C065001E80A4 /* TargetInfo.cpp */; }; - DED62ABB0AE2EDF1001E80A4 /* Decl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED62ABA0AE2EDF1001E80A4 /* Decl.cpp */; }; DED7D7410A524295003AD0FB /* Diagnostic.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7310A524295003AD0FB /* Diagnostic.h */; }; DED7D7430A524295003AD0FB /* FileManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7330A524295003AD0FB /* FileManager.h */; }; DED7D7450A524295003AD0FB /* SourceLocation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7350A524295003AD0FB /* SourceLocation.h */; }; @@ -269,7 +276,6 @@ DED7D7D80A524302003AD0FB /* README.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7D70A524302003AD0FB /* README.txt */; }; DED7D9180A52518C003AD0FB /* ScratchBuffer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D9170A52518C003AD0FB /* ScratchBuffer.h */; }; DED7D9E50A5257F6003AD0FB /* ScratchBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D9E40A5257F6003AD0FB /* ScratchBuffer.cpp */; }; - DEDFE5CF0F7206E40035BD10 /* NestedNameSpecifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE5CE0F7206E40035BD10 /* NestedNameSpecifier.cpp */; }; DEDFE6460F7B3B4E0035BD10 /* driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6450F7B3B4E0035BD10 /* driver.cpp */; }; DEDFE65A0F7B3B830035BD10 /* Types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6480F7B3B830035BD10 /* Types.cpp */; }; DEDFE65B0F7B3B830035BD10 /* Tools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE64A0F7B3B830035BD10 /* Tools.cpp */; }; @@ -286,7 +292,6 @@ DEDFE6660F7B3B830035BD10 /* Tool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6570F7B3B830035BD10 /* Tool.cpp */; }; DEDFE6670F7B3B830035BD10 /* HostInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6580F7B3B830035BD10 /* HostInfo.cpp */; }; DEDFE6680F7B3B830035BD10 /* Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFE6590F7B3B830035BD10 /* Driver.cpp */; }; - DEDFF8880F848CF80035BD10 /* TemplateName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEDFF8870F848CF80035BD10 /* TemplateName.cpp */; }; DEEBBD440C19C5D200A9FE82 /* TODO.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBBD430C19C5D200A9FE82 /* TODO.txt */; }; DEEBC3BA0C2363B800A9FE82 /* CodeGenTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */; }; DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */; }; @@ -294,7 +299,6 @@ DEF165750F8FB3510098507F /* PCHReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF165740F8FB3510098507F /* PCHReader.cpp */; }; DEF168400F9548DC0098507F /* FixItRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */; }; DEF2E95F0C5FBD74000C4259 /* InternalsManual.html in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */; }; - DEF2EDA70C6A4252000C4259 /* StmtDumper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2EDA60C6A4252000C4259 /* StmtDumper.cpp */; }; DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2EFF20C6CDD74000C4259 /* CGExprAgg.cpp */; }; DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */; }; DEF7D9F70C9C8B1A0001F598 /* Rewriter.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEF7D9F60C9C8B1A0001F598 /* Rewriter.h */; }; @@ -365,7 +369,15 @@ /* Begin PBXFileReference section */ 035611470DA6A45C00D2EF2A /* DeclBase.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclBase.h; path = clang/AST/DeclBase.h; sourceTree = ""; tabWidth = 2; }; 03F50AC50D416EAA00B9CF60 /* Targets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = Targets.cpp; sourceTree = ""; tabWidth = 2; }; - 1A14D3A60FD78A3F00DA2835 /* DeclPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclPrinter.cpp; path = lib/AST/DeclPrinter.cpp; sourceTree = ""; tabWidth = 2; }; + 1A15C407118226980092260D /* ASTImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTImporter.h; path = clang/AST/ASTImporter.h; sourceTree = ""; tabWidth = 2; }; + 1A15C408118226980092260D /* ASTVector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTVector.h; path = clang/AST/ASTVector.h; sourceTree = ""; tabWidth = 2; }; + 1A15C409118226980092260D /* CharUnits.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CharUnits.h; path = clang/AST/CharUnits.h; sourceTree = ""; tabWidth = 2; }; + 1A15C40A118226980092260D /* DeclAccessPair.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclAccessPair.h; path = clang/AST/DeclAccessPair.h; sourceTree = ""; tabWidth = 2; }; + 1A15C40B118226980092260D /* DeclFriend.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclFriend.h; path = clang/AST/DeclFriend.h; sourceTree = ""; tabWidth = 2; }; + 1A15C40C118226980092260D /* DependentDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DependentDiagnostic.h; path = clang/AST/DependentDiagnostic.h; sourceTree = ""; tabWidth = 2; }; + 1A15C40D118226980092260D /* TemplateBase.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TemplateBase.h; path = clang/AST/TemplateBase.h; sourceTree = ""; tabWidth = 2; }; + 1A15C40E118226980092260D /* UnresolvedSet.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = UnresolvedSet.h; path = clang/AST/UnresolvedSet.h; sourceTree = ""; tabWidth = 2; }; + 1A15C40F118226980092260D /* UsuallyTinyPtrVector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = UsuallyTinyPtrVector.h; path = clang/AST/UsuallyTinyPtrVector.h; sourceTree = ""; tabWidth = 2; }; 1A2193CB0F45EEB700C0713D /* ABIInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ABIInfo.h; path = lib/CodeGen/ABIInfo.h; sourceTree = ""; tabWidth = 2; }; 1A2193CC0F45EEB700C0713D /* Mangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Mangle.cpp; path = lib/CodeGen/Mangle.cpp; sourceTree = ""; tabWidth = 2; }; 1A2193CD0F45EEB700C0713D /* Mangle.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Mangle.h; path = lib/CodeGen/Mangle.h; sourceTree = ""; tabWidth = 2; }; @@ -386,12 +398,10 @@ 1A2A54B40FD1DD1C00F4CE45 /* Warnings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Warnings.cpp; path = lib/Frontend/Warnings.cpp; sourceTree = ""; }; 1A30A9E80B93A4C800201A91 /* ExprCXX.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprCXX.h; path = clang/AST/ExprCXX.h; sourceTree = ""; tabWidth = 2; }; 1A31B27210ACE6DA009E0C8B /* GlobalDecl.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = GlobalDecl.h; path = lib/CodeGen/GlobalDecl.h; sourceTree = ""; tabWidth = 2; }; - 1A32C17E0E1C87AD00A6B483 /* ExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ExprConstant.cpp; path = lib/AST/ExprConstant.cpp; sourceTree = ""; tabWidth = 2; }; 1A376A2C0D4AED9B002A1C52 /* CGExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprConstant.cpp; path = lib/CodeGen/CGExprConstant.cpp; sourceTree = ""; tabWidth = 2; }; 1A471AB40F437BC500753CE8 /* CGBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBlocks.cpp; path = lib/CodeGen/CGBlocks.cpp; sourceTree = ""; tabWidth = 2; }; 1A4C41BE105B4C0B0047B5E7 /* CGClass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGClass.cpp; path = lib/CodeGen/CGClass.cpp; sourceTree = ""; tabWidth = 2; }; - 1A535ED8107BC45E000C3AE7 /* CXXInheritance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CXXInheritance.cpp; path = lib/AST/CXXInheritance.cpp; sourceTree = ""; }; - 1A535EDB107BC47B000C3AE7 /* CanonicalType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanonicalType.h; path = clang/AST/CanonicalType.h; sourceTree = ""; }; + 1A535EDB107BC47B000C3AE7 /* CanonicalType.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CanonicalType.h; path = clang/AST/CanonicalType.h; sourceTree = ""; tabWidth = 2; }; 1A5D5E570E5E81010023C059 /* CGCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGCXX.cpp; path = lib/CodeGen/CGCXX.cpp; sourceTree = ""; tabWidth = 2; }; 1A621BB5110FE6AA009E6834 /* TargetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = TargetInfo.cpp; path = lib/CodeGen/TargetInfo.cpp; sourceTree = ""; tabWidth = 2; }; 1A621BB6110FE6AA009E6834 /* TargetInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TargetInfo.h; path = lib/CodeGen/TargetInfo.h; sourceTree = ""; tabWidth = 2; }; @@ -422,19 +432,52 @@ 1A701B630F7C8FE400FEC4D1 /* SemaAccess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaAccess.cpp; path = lib/Sema/SemaAccess.cpp; sourceTree = ""; tabWidth = 2; }; 1A72BEAC0D641E9400B085E9 /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Attr.h; path = clang/AST/Attr.h; sourceTree = ""; tabWidth = 2; }; 1A7342470C7B57D500122F56 /* CGObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjC.cpp; path = lib/CodeGen/CGObjC.cpp; sourceTree = ""; tabWidth = 2; }; - 1A81AA18108144F40094E50B /* CGVtable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGVtable.cpp; path = lib/CodeGen/CGVtable.cpp; sourceTree = ""; tabWidth = 2; }; - 1A81AA5D108278A20094E50B /* CGVtable.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGVtable.h; path = lib/CodeGen/CGVtable.h; sourceTree = ""; tabWidth = 2; }; + 1A81AA18108144F40094E50B /* CGVTables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGVTables.cpp; path = lib/CodeGen/CGVTables.cpp; sourceTree = ""; tabWidth = 2; }; + 1A81AA5D108278A20094E50B /* CGVTables.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGVTables.h; path = lib/CodeGen/CGVTables.h; sourceTree = ""; tabWidth = 2; }; 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiteralSupport.h; sourceTree = ""; }; 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralSupport.cpp; sourceTree = ""; }; - 1A96785111486FDC00F24372 /* RecordLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayout.cpp; path = lib/AST/RecordLayout.cpp; sourceTree = ""; tabWidth = 2; }; 1A97825A1108BA18002B98FC /* CGVTT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGVTT.cpp; path = lib/CodeGen/CGVTT.cpp; sourceTree = ""; tabWidth = 2; }; 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDeclCXX.cpp; path = lib/CodeGen/CGDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; - 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayoutBuilder.cpp; path = lib/AST/RecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; - 1AA1D91710125DE30078DEBC /* RecordLayoutBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = RecordLayoutBuilder.h; path = lib/AST/RecordLayoutBuilder.h; sourceTree = ""; tabWidth = 2; }; 1AA963AB10D8576800786C86 /* FullExpr.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = FullExpr.h; path = clang/AST/FullExpr.h; sourceTree = ""; tabWidth = 2; }; - 1AA963C310D85A7300786C86 /* FullExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = FullExpr.cpp; path = lib/AST/FullExpr.cpp; sourceTree = ""; tabWidth = 2; }; 1AB290021045858B00FE33D8 /* PartialDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = PartialDiagnostic.h; sourceTree = ""; tabWidth = 2; }; 1ABC36930C7A4BDC006DB0AB /* CGBuiltin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGBuiltin.cpp; path = lib/CodeGen/CGBuiltin.cpp; sourceTree = ""; tabWidth = 2; }; + 1ABD23B11182449800A48E65 /* APValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APValue.cpp; sourceTree = ""; }; + 1ABD23B21182449800A48E65 /* ASTConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTConsumer.cpp; sourceTree = ""; }; + 1ABD23B31182449800A48E65 /* ASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTContext.cpp; sourceTree = ""; }; + 1ABD23B41182449800A48E65 /* ASTDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTDiagnostic.cpp; sourceTree = ""; }; + 1ABD23B51182449800A48E65 /* ASTImporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASTImporter.cpp; sourceTree = ""; }; + 1ABD23B61182449800A48E65 /* AttrImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttrImpl.cpp; sourceTree = ""; }; + 1ABD23B71182449800A48E65 /* CXXInheritance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CXXInheritance.cpp; sourceTree = ""; }; + 1ABD23B81182449800A48E65 /* Decl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decl.cpp; sourceTree = ""; }; + 1ABD23B91182449800A48E65 /* DeclarationName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclarationName.cpp; sourceTree = ""; }; + 1ABD23BA1182449800A48E65 /* DeclBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclBase.cpp; sourceTree = ""; }; + 1ABD23BB1182449800A48E65 /* DeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclCXX.cpp; sourceTree = ""; }; + 1ABD23BC1182449800A48E65 /* DeclFriend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclFriend.cpp; sourceTree = ""; }; + 1ABD23BD1182449800A48E65 /* DeclGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclGroup.cpp; sourceTree = ""; }; + 1ABD23BE1182449800A48E65 /* DeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclObjC.cpp; sourceTree = ""; }; + 1ABD23BF1182449800A48E65 /* DeclPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclPrinter.cpp; sourceTree = ""; }; + 1ABD23C01182449800A48E65 /* DeclTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclTemplate.cpp; sourceTree = ""; }; + 1ABD23C11182449800A48E65 /* Expr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Expr.cpp; sourceTree = ""; }; + 1ABD23C21182449800A48E65 /* ExprConstant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprConstant.cpp; sourceTree = ""; }; + 1ABD23C31182449800A48E65 /* ExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExprCXX.cpp; sourceTree = ""; }; + 1ABD23C41182449800A48E65 /* FullExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FullExpr.cpp; sourceTree = ""; }; + 1ABD23C51182449800A48E65 /* InheritViz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InheritViz.cpp; sourceTree = ""; }; + 1ABD23C61182449800A48E65 /* NestedNameSpecifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NestedNameSpecifier.cpp; sourceTree = ""; }; + 1ABD23C71182449800A48E65 /* ParentMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParentMap.cpp; sourceTree = ""; }; + 1ABD23C81182449800A48E65 /* RecordLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordLayout.cpp; sourceTree = ""; }; + 1ABD23C91182449800A48E65 /* RecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordLayoutBuilder.cpp; sourceTree = ""; }; + 1ABD23CA1182449800A48E65 /* RecordLayoutBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordLayoutBuilder.h; sourceTree = ""; }; + 1ABD23CB1182449800A48E65 /* Stmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Stmt.cpp; sourceTree = ""; }; + 1ABD23CC1182449800A48E65 /* StmtDumper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StmtDumper.cpp; sourceTree = ""; }; + 1ABD23CD1182449800A48E65 /* StmtIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StmtIterator.cpp; sourceTree = ""; }; + 1ABD23CE1182449800A48E65 /* StmtPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StmtPrinter.cpp; sourceTree = ""; }; + 1ABD23CF1182449800A48E65 /* StmtProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StmtProfile.cpp; sourceTree = ""; }; + 1ABD23D01182449800A48E65 /* StmtViz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StmtViz.cpp; sourceTree = ""; }; + 1ABD23D11182449800A48E65 /* TemplateBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemplateBase.cpp; sourceTree = ""; }; + 1ABD23D21182449800A48E65 /* TemplateName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemplateName.cpp; sourceTree = ""; }; + 1ABD23D31182449800A48E65 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Type.cpp; sourceTree = ""; }; + 1ABD23D41182449800A48E65 /* TypeLoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypeLoc.cpp; sourceTree = ""; }; + 1ABD23D51182449800A48E65 /* TypePrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypePrinter.cpp; sourceTree = ""; }; 1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInstance.cpp; path = lib/Frontend/CompilerInstance.cpp; sourceTree = ""; }; 1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerInvocation.cpp; path = lib/Frontend/CompilerInvocation.cpp; sourceTree = ""; }; 1ACB57DD1105820D0047B991 /* DeclXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclXML.cpp; path = lib/Frontend/DeclXML.cpp; sourceTree = ""; }; @@ -444,12 +487,8 @@ 1ACB57E11105820D0047B991 /* LangStandards.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LangStandards.cpp; path = lib/Frontend/LangStandards.cpp; sourceTree = ""; }; 1ACB57E21105820D0047B991 /* TypeXML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeXML.cpp; path = lib/Frontend/TypeXML.cpp; sourceTree = ""; }; 1ACB57E31105820D0047B991 /* VerifyDiagnosticsClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDiagnosticsClient.cpp; path = lib/Frontend/VerifyDiagnosticsClient.cpp; sourceTree = ""; }; - 1ADD795110A90C6100741BBA /* TypePrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypePrinter.cpp; path = lib/AST/TypePrinter.cpp; sourceTree = ""; }; - 1ADD795210A90C6100741BBA /* TypeLoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeLoc.cpp; path = lib/AST/TypeLoc.cpp; sourceTree = ""; }; - 1ADD795310A90C6100741BBA /* TemplateBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateBase.cpp; path = lib/AST/TemplateBase.cpp; sourceTree = ""; }; 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiateDecl.cpp; path = lib/Sema/SemaTemplateInstantiateDecl.cpp; sourceTree = ""; tabWidth = 2; }; 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TreeTransform.h; path = lib/Sema/TreeTransform.h; sourceTree = ""; tabWidth = 2; }; - 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtProfile.cpp; path = lib/AST/StmtProfile.cpp; sourceTree = ""; tabWidth = 2; }; 1AF1B50E109A4FB800AFAFAC /* CGException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGException.cpp; path = lib/CodeGen/CGException.cpp; sourceTree = ""; tabWidth = 2; }; 1AFDD8701161085D00AE030A /* ASTMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTMerge.cpp; path = lib/Frontend/ASTMerge.cpp; sourceTree = ""; }; 1AFDD8711161085D00AE030A /* CodeGenAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenAction.cpp; path = lib/Frontend/CodeGenAction.cpp; sourceTree = ""; }; @@ -460,7 +499,6 @@ 352246E40F5C6BE000D0D279 /* PlistDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlistDiagnostics.cpp; path = lib/Frontend/PlistDiagnostics.cpp; sourceTree = ""; }; 352246E50F5C6BE000D0D279 /* TextDiagnosticBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticBuffer.cpp; path = lib/Frontend/TextDiagnosticBuffer.cpp; sourceTree = ""; }; 352246E60F5C6BE000D0D279 /* TextDiagnosticPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextDiagnosticPrinter.cpp; path = lib/Frontend/TextDiagnosticPrinter.cpp; sourceTree = ""; }; - 35260CA40C7F75C000D66CE9 /* ExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ExprCXX.cpp; path = lib/AST/ExprCXX.cpp; sourceTree = ""; tabWidth = 2; }; 3527124F0DAFE54700C76352 /* IdentifierResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = IdentifierResolver.h; path = lib/Sema/IdentifierResolver.h; sourceTree = ""; tabWidth = 2; }; 352712500DAFE54700C76352 /* IdentifierResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = IdentifierResolver.cpp; path = lib/Sema/IdentifierResolver.cpp; sourceTree = ""; tabWidth = 2; }; 352C19DC0CA321C80045DB98 /* CFGRecStmtDeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFGRecStmtDeclVisitor.h; path = clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h; sourceTree = ""; }; @@ -473,7 +511,6 @@ 3537AA0C0ECD088F008F7CDC /* BlkExprDeclBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlkExprDeclBitVector.h; path = clang/Analysis/Support/BlkExprDeclBitVector.h; sourceTree = ""; }; 3537AA0D0ECD08A4008F7CDC /* PreprocessorLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreprocessorLexer.cpp; sourceTree = ""; }; 3538FDB60ED24A2C005EC283 /* DeclarationName.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclarationName.h; path = clang/AST/DeclarationName.h; sourceTree = ""; tabWidth = 2; }; - 3538FDB70ED24A4E005EC283 /* DeclarationName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclarationName.cpp; path = lib/AST/DeclarationName.cpp; sourceTree = ""; }; 353959D40EE5F88A00E82461 /* ParseTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseTemplate.cpp; path = lib/Parse/ParseTemplate.cpp; sourceTree = ""; tabWidth = 2; }; 3547129D0C88881300B3E1D5 /* PrettyPrinter.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = PrettyPrinter.h; path = clang/AST/PrettyPrinter.h; sourceTree = ""; tabWidth = 2; }; 35475B1F0E79973F0000BFE4 /* CGCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGCall.cpp; path = lib/CodeGen/CGCall.cpp; sourceTree = ""; tabWidth = 2; }; @@ -492,7 +529,6 @@ 35544B860F5C7FD700D92AA9 /* SimpleConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleConstraintManager.cpp; path = lib/Analysis/SimpleConstraintManager.cpp; sourceTree = ""; }; 35544B870F5C7FD700D92AA9 /* SimpleConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleConstraintManager.h; path = lib/Analysis/SimpleConstraintManager.h; sourceTree = ""; }; 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplateInstantiate.cpp; path = lib/Sema/SemaTemplateInstantiate.cpp; sourceTree = ""; tabWidth = 2; }; - 3557D1A80EB136B100C59739 /* InheritViz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = InheritViz.cpp; path = lib/AST/InheritViz.cpp; sourceTree = ""; tabWidth = 2; }; 35585DBD0EAFBC4500D0A97A /* CXXFieldCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CXXFieldCollector.h; path = lib/Sema/CXXFieldCollector.h; sourceTree = ""; tabWidth = 2; }; 35585DBE0EAFBC4500D0A97A /* SemaOverload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaOverload.cpp; path = lib/Sema/SemaOverload.cpp; sourceTree = ""; tabWidth = 2; }; 35585DBF0EAFBC4500D0A97A /* SemaOverload.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = SemaOverload.h; path = lib/Sema/SemaOverload.h; sourceTree = ""; tabWidth = 2; }; @@ -504,12 +540,10 @@ 35707EFD0CD0F5CC000B2204 /* SourceLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = SourceLocation.cpp; sourceTree = ""; tabWidth = 2; }; 357EA27C0F2526F300439B60 /* SemaLookup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaLookup.cpp; path = lib/Sema/SemaLookup.cpp; sourceTree = ""; tabWidth = 2; }; 35847BE30CC7DB9000C40FFF /* StmtIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtIterator.h; path = clang/AST/StmtIterator.h; sourceTree = ""; tabWidth = 2; }; - 35847BE40CC7DBAF00C40FFF /* StmtIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtIterator.cpp; path = lib/AST/StmtIterator.cpp; sourceTree = ""; tabWidth = 2; }; 35862B0C0E3628CB0009F542 /* CheckDeadStores.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckDeadStores.cpp; path = lib/Analysis/CheckDeadStores.cpp; sourceTree = ""; }; 35862B110E3629850009F542 /* GRExprEngineInternalChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRExprEngineInternalChecks.cpp; path = lib/Analysis/GRExprEngineInternalChecks.cpp; sourceTree = ""; }; 358CFBB70E65AB04002A8E19 /* BasicConstraintManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicConstraintManager.cpp; path = lib/Analysis/BasicConstraintManager.cpp; sourceTree = ""; }; 358D23090E8BEB850003DDCC /* DeclGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclGroup.h; path = clang/AST/DeclGroup.h; sourceTree = ""; tabWidth = 2; }; - 358D230A0E8BEB9D0003DDCC /* DeclGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclGroup.cpp; path = lib/AST/DeclGroup.cpp; sourceTree = ""; tabWidth = 2; }; 358F514F0E529A87007F2102 /* GRState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRState.h; path = clang/Analysis/PathSensitive/GRState.h; sourceTree = ""; }; 358F51510E529AA4007F2102 /* GRState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRState.cpp; path = lib/Analysis/GRState.cpp; sourceTree = ""; }; 3591853E0EFB1088000039AF /* SemaTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaTemplate.cpp; path = lib/Sema/SemaTemplate.cpp; sourceTree = ""; tabWidth = 2; }; @@ -528,10 +562,8 @@ 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathDiagnostic.cpp; path = lib/Analysis/PathDiagnostic.cpp; sourceTree = ""; }; 35B820740ECB811A0020BEC0 /* PreprocessorLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreprocessorLexer.h; sourceTree = ""; }; 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckNSError.cpp; path = lib/Analysis/CheckNSError.cpp; sourceTree = ""; }; - 35BB2D7E0D19954000944DB5 /* ASTConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumer.cpp; path = lib/AST/ASTConsumer.cpp; sourceTree = ""; tabWidth = 2; }; 35BFBD2B0C9EDE1E006CB644 /* ASTConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTConsumer.h; path = clang/AST/ASTConsumer.h; sourceTree = ""; tabWidth = 2; }; 35CEA05A0DF9E82700A41296 /* ExprObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprObjC.h; path = clang/AST/ExprObjC.h; sourceTree = ""; tabWidth = 2; }; - 35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtViz.cpp; path = lib/AST/StmtViz.cpp; sourceTree = ""; tabWidth = 2; }; 35CFFE010CA1CBDD00E6F2BE /* StmtGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtGraphTraits.h; path = clang/AST/StmtGraphTraits.h; sourceTree = ""; tabWidth = 2; }; 35D1DDD10CA9C6D50096E967 /* DataflowSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowSolver.h; path = clang/Analysis/FlowSensitive/DataflowSolver.h; sourceTree = ""; }; 35D1DDD20CA9C6D50096E967 /* DataflowValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowValues.h; path = clang/Analysis/FlowSensitive/DataflowValues.h; sourceTree = ""; }; @@ -543,8 +575,6 @@ 35E1946C0ECB83C100F21733 /* PTHLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PTHLexer.cpp; sourceTree = ""; }; 35EE48AD0E0C4CB200715C54 /* DeclCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclCXX.h; path = clang/AST/DeclCXX.h; sourceTree = ""; tabWidth = 2; }; 35EE48AE0E0C4CB200715C54 /* ParentMap.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ParentMap.h; path = clang/AST/ParentMap.h; sourceTree = ""; tabWidth = 2; }; - 35EE48AF0E0C4CCA00715C54 /* DeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclCXX.cpp; path = lib/AST/DeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; - 35EE48B00E0C4CCA00715C54 /* ParentMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParentMap.cpp; path = lib/AST/ParentMap.cpp; sourceTree = ""; tabWidth = 2; }; 35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclCXX.cpp; path = lib/Sema/SemaDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; 35EFEFB50DB67ED60020783D /* GRTransferFuncs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRTransferFuncs.cpp; path = lib/Analysis/GRTransferFuncs.cpp; sourceTree = ""; }; 35F1ACE60E66166C001F4532 /* ConstraintManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConstraintManager.h; path = clang/Analysis/PathSensitive/ConstraintManager.h; sourceTree = ""; }; @@ -555,7 +585,6 @@ 35F8D0D50D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicObjCFoundationChecks.cpp; path = lib/Analysis/BasicObjCFoundationChecks.cpp; sourceTree = ""; }; 35F9B1550D1C6B2E00DDFDAE /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LiveVariables.h; path = clang/Analysis/Analyses/LiveVariables.h; sourceTree = ""; }; 35F9B1560D1C6B2E00DDFDAE /* UninitializedValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UninitializedValues.h; path = clang/Analysis/Analyses/UninitializedValues.h; sourceTree = ""; }; - 35FE6BCE0DF6EE1F00739712 /* DeclBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclBase.cpp; path = lib/AST/DeclBase.cpp; sourceTree = ""; tabWidth = 2; }; 72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLRewrite.cpp; path = lib/Rewrite/HTMLRewrite.cpp; sourceTree = ""; }; 7F270AFE107A90010031B377 /* CodeCompleteConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeCompleteConsumer.h; path = clang/Sema/CodeCompleteConsumer.h; sourceTree = ""; }; 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclObjC.h; path = clang/AST/DeclObjC.h; sourceTree = ""; tabWidth = 2; }; @@ -565,13 +594,13 @@ 9012911510470FCE0083456D /* Index.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Index.h; path = "clang-c/Index.h"; sourceTree = ""; }; 9012911C1048068D0083456D /* ASTUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTUnit.cpp; path = lib/Frontend/ASTUnit.cpp; sourceTree = ""; }; 9012911F104812F90083456D /* CIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CIndex.cpp; path = tools/CIndex/CIndex.cpp; sourceTree = ""; }; - 904753791096376F00CBDDDD /* CXXInheritance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CXXInheritance.h; path = clang/AST/CXXInheritance.h; sourceTree = ""; }; - 9047537A1096376F00CBDDDD /* Redeclarable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Redeclarable.h; path = clang/AST/Redeclarable.h; sourceTree = ""; }; - 9047537B1096376F00CBDDDD /* TypeLoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeLoc.h; path = clang/AST/TypeLoc.h; sourceTree = ""; }; - 9047537C1096376F00CBDDDD /* TypeLocBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeLocBuilder.h; path = clang/AST/TypeLocBuilder.h; sourceTree = ""; }; - 9047537D1096376F00CBDDDD /* TypeLocNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeLocNodes.def; path = clang/AST/TypeLocNodes.def; sourceTree = ""; }; - 9047537E1096376F00CBDDDD /* TypeLocVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeLocVisitor.h; path = clang/AST/TypeLocVisitor.h; sourceTree = ""; }; - 9047537F1096376F00CBDDDD /* TypeVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeVisitor.h; path = clang/AST/TypeVisitor.h; sourceTree = ""; }; + 904753791096376F00CBDDDD /* CXXInheritance.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CXXInheritance.h; path = clang/AST/CXXInheritance.h; sourceTree = ""; tabWidth = 2; }; + 9047537A1096376F00CBDDDD /* Redeclarable.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Redeclarable.h; path = clang/AST/Redeclarable.h; sourceTree = ""; tabWidth = 2; }; + 9047537B1096376F00CBDDDD /* TypeLoc.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeLoc.h; path = clang/AST/TypeLoc.h; sourceTree = ""; tabWidth = 2; }; + 9047537C1096376F00CBDDDD /* TypeLocBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeLocBuilder.h; path = clang/AST/TypeLocBuilder.h; sourceTree = ""; tabWidth = 2; }; + 9047537D1096376F00CBDDDD /* TypeLocNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeLocNodes.def; path = clang/AST/TypeLocNodes.def; sourceTree = ""; tabWidth = 2; }; + 9047537E1096376F00CBDDDD /* TypeLocVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeLocVisitor.h; path = clang/AST/TypeLocVisitor.h; sourceTree = ""; tabWidth = 2; }; + 9047537F1096376F00CBDDDD /* TypeVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeVisitor.h; path = clang/AST/TypeVisitor.h; sourceTree = ""; tabWidth = 2; }; 9063F2210F9E8BDF002F7251 /* ExternalSemaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalSemaSource.h; path = clang/Sema/ExternalSemaSource.h; sourceTree = ""; }; 9063F2220F9E8BDF002F7251 /* SemaConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaConsumer.h; path = clang/Sema/SemaConsumer.h; sourceTree = ""; }; 9063F2280F9E911F002F7251 /* OnDiskHashTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnDiskHashTable.h; sourceTree = ""; }; @@ -580,9 +609,9 @@ 906BF4AE0F83BA16001071FA /* ConvertUTF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvertUTF.h; sourceTree = ""; }; 906BF4AF0F83BA2E001071FA /* ConvertUTF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ConvertUTF.c; sourceTree = ""; }; 90F9EFA9104ABDED00D09A15 /* c-index-test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "c-index-test.c"; path = "tools/c-index-test/c-index-test.c"; sourceTree = ""; }; - 90FB99DE0F98FB1D008F9415 /* DeclContextInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeclContextInternals.h; path = clang/AST/DeclContextInternals.h; sourceTree = ""; }; - 90FB99DF0F98FB1D008F9415 /* DeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeclVisitor.h; path = clang/AST/DeclVisitor.h; sourceTree = ""; }; - 90FB99E00F98FB1D008F9415 /* ExternalASTSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalASTSource.h; path = clang/AST/ExternalASTSource.h; sourceTree = ""; }; + 90FB99DE0F98FB1D008F9415 /* DeclContextInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclContextInternals.h; path = clang/AST/DeclContextInternals.h; sourceTree = ""; tabWidth = 2; }; + 90FB99DF0F98FB1D008F9415 /* DeclVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclVisitor.h; path = clang/AST/DeclVisitor.h; sourceTree = ""; tabWidth = 2; }; + 90FB99E00F98FB1D008F9415 /* ExternalASTSource.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExternalASTSource.h; path = clang/AST/ExternalASTSource.h; sourceTree = ""; tabWidth = 2; }; 90FD6D5F103C3D21005F5B73 /* Analyzer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Analyzer.h; path = clang/Index/Analyzer.h; sourceTree = ""; }; 90FD6D60103C3D21005F5B73 /* ASTLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTLocation.h; path = clang/Index/ASTLocation.h; sourceTree = ""; }; 90FD6D61103C3D21005F5B73 /* DeclReferenceMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeclReferenceMap.h; path = clang/Index/DeclReferenceMap.h; sourceTree = ""; }; @@ -640,9 +669,7 @@ DE06D42F0A8BB52D0050E87E /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = lib/Parse/Parser.cpp; sourceTree = ""; tabWidth = 2; }; DE06E8130A8FF9330050E87E /* Action.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Action.h; path = clang/Parse/Action.h; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; DE0FCA620A95859D00248FD5 /* Expr.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Expr.h; path = clang/AST/Expr.h; sourceTree = ""; tabWidth = 2; }; - DE0FCB330A9C21F100248FD5 /* Expr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Expr.cpp; path = lib/AST/Expr.cpp; sourceTree = ""; tabWidth = 2; }; DE1263C20EF2341900F56D2B /* Ownership.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Ownership.h; path = clang/Parse/Ownership.h; sourceTree = ""; tabWidth = 2; }; - DE1732FF0B068B700080B521 /* ASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTContext.cpp; path = lib/AST/ASTContext.cpp; sourceTree = ""; tabWidth = 2; }; DE17336D0B068DC20080B521 /* DeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclSpec.cpp; path = lib/Parse/DeclSpec.cpp; sourceTree = ""; tabWidth = 2; }; DE17336F0B068DC60080B521 /* DeclSpec.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclSpec.h; path = clang/Parse/DeclSpec.h; sourceTree = ""; tabWidth = 2; }; DE1F22020A7D852A00FBF588 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Parser.h; path = clang/Parse/Parser.h; sourceTree = ""; tabWidth = 2; }; @@ -653,7 +680,6 @@ DE344AB70AE5DF6D00DBC861 /* HeaderSearch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HeaderSearch.h; sourceTree = ""; }; DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HeaderSearch.cpp; sourceTree = ""; }; DE3450D60AEB543100DBC861 /* DirectoryLookup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DirectoryLookup.h; sourceTree = ""; }; - DE3452400AEF1A2D00DBC861 /* Stmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Stmt.cpp; path = lib/AST/Stmt.cpp; sourceTree = ""; tabWidth = 2; }; DE3452800AEF1B1800DBC861 /* Stmt.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Stmt.h; path = clang/AST/Stmt.h; sourceTree = ""; tabWidth = 2; }; DE345C190AFC658B00DBC861 /* StmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtVisitor.h; path = clang/AST/StmtVisitor.h; sourceTree = ""; tabWidth = 2; }; DE345F210AFD347900DBC861 /* StmtNodes.def */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = text; name = StmtNodes.def; path = clang/AST/StmtNodes.def; sourceTree = ""; tabWidth = 2; }; @@ -663,7 +689,6 @@ DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseDecl.cpp; path = lib/Parse/ParseDecl.cpp; sourceTree = ""; tabWidth = 2; }; DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExpr.cpp; path = lib/Parse/ParseExpr.cpp; sourceTree = ""; tabWidth = 2; }; DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = MinimalAction.cpp; path = lib/Parse/MinimalAction.cpp; sourceTree = ""; tabWidth = 2; }; - DE34621C0AFEB19B00DBC861 /* StmtPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtPrinter.cpp; path = lib/AST/StmtPrinter.cpp; sourceTree = ""; tabWidth = 2; }; DE3464210B03040900DBC861 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = Type.h; path = clang/AST/Type.h; sourceTree = ""; tabWidth = 2; }; DE37251C0FE4818000CF2CC2 /* Builtins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Builtins.h; sourceTree = ""; }; DE37252A0FE4818F00CF2CC2 /* Builtins.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Builtins.def; sourceTree = ""; }; @@ -673,7 +698,6 @@ DE3725330FE4827200CF2CC2 /* BuiltinsPPC.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BuiltinsPPC.def; sourceTree = ""; }; DE38CD4E0D794CF900A273B6 /* CGObjCRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGObjCRuntime.h; path = lib/CodeGen/CGObjCRuntime.h; sourceTree = ""; tabWidth = 2; }; DE38CD4F0D794D0100A273B6 /* CGObjCGNU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGObjCGNU.cpp; path = lib/CodeGen/CGObjCGNU.cpp; sourceTree = ""; tabWidth = 2; }; - DE38CF260D8C9E6C00A273B6 /* DeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclObjC.cpp; path = lib/AST/DeclObjC.cpp; sourceTree = ""; tabWidth = 2; }; DE3986EF0CB8D4B300223765 /* IdentifierTable.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = IdentifierTable.h; sourceTree = ""; tabWidth = 2; }; DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifierTable.cpp; sourceTree = ""; tabWidth = 2; }; DE3B90DE0EAC5EF200D01046 /* ExtensionRAIIObject.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExtensionRAIIObject.h; path = lib/Parse/ExtensionRAIIObject.h; sourceTree = ""; tabWidth = 2; }; @@ -717,7 +741,6 @@ DE704BD10D1647E7009C7762 /* HeaderMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderMap.h; sourceTree = ""; }; DE704DD10D1668A4009C7762 /* HeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeaderMap.cpp; sourceTree = ""; }; DE75ED280B044DC90020CF81 /* ASTContext.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTContext.h; path = clang/AST/ASTContext.h; sourceTree = ""; tabWidth = 2; }; - DE75EDF00B06880E0020CF81 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = lib/AST/Type.cpp; sourceTree = ""; tabWidth = 2; }; DE85CD800D8380B10070E26E /* TokenLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TokenLexer.cpp; sourceTree = ""; }; DE85CD840D8380F20070E26E /* TokenLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TokenLexer.h; sourceTree = ""; }; DE85CD9E0D8382DD0070E26E /* MacroArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroArgs.h; sourceTree = ""; }; @@ -726,7 +749,6 @@ DE85CDAF0D838C390070E26E /* PPDirectives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPDirectives.cpp; sourceTree = ""; }; DE85CDB50D839BAE0070E26E /* PPLexerChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPLexerChange.cpp; sourceTree = ""; }; DE8822350EC80C0A00CBC30A /* CGBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGBuilder.h; path = lib/CodeGen/CGBuilder.h; sourceTree = ""; tabWidth = 2; }; - DE8823CA0ED0046600CBC30A /* APValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = APValue.cpp; path = lib/AST/APValue.cpp; sourceTree = ""; }; DE8823DE0ED0B78600CBC30A /* PTHLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTHLexer.h; sourceTree = ""; }; DE8824530ED1243E00CBC30A /* OperatorKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OperatorKinds.h; sourceTree = ""; }; DE8824560ED1244600CBC30A /* OperatorKinds.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OperatorKinds.def; sourceTree = ""; }; @@ -744,7 +766,6 @@ DEAEE98A0A5A2B970045101B /* MultipleIncludeOpt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MultipleIncludeOpt.h; sourceTree = ""; }; DEAEED4A0A5AF89A0045101B /* NOTES.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NOTES.txt; sourceTree = ""; }; DEB076C90F3A221200F5A2BE /* DeclTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = DeclTemplate.h; path = clang/AST/DeclTemplate.h; sourceTree = ""; tabWidth = 2; }; - DEB076CE0F3A222200F5A2BE /* DeclTemplate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = DeclTemplate.cpp; path = lib/AST/DeclTemplate.cpp; sourceTree = ""; tabWidth = 2; }; DEB077930F44F96000F5A2BE /* TokenConcatenation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TokenConcatenation.h; sourceTree = ""; }; DEB077980F44F97800F5A2BE /* TokenConcatenation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TokenConcatenation.cpp; sourceTree = ""; }; DEB07AC70F4A427E00F5A2BE /* SemaAttr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaAttr.cpp; path = lib/Sema/SemaAttr.cpp; sourceTree = ""; tabWidth = 2; }; @@ -755,15 +776,13 @@ DECB6D640F9AE26600F5FBC7 /* JumpDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = JumpDiagnostics.cpp; path = lib/Sema/JumpDiagnostics.cpp; sourceTree = ""; tabWidth = 2; }; DECB6F030F9D939A00F5FBC7 /* InitPreprocessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitPreprocessor.h; path = clang/Frontend/InitPreprocessor.h; sourceTree = ""; }; DECB6F060F9D93A800F5FBC7 /* InitPreprocessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitPreprocessor.cpp; path = lib/Frontend/InitPreprocessor.cpp; sourceTree = ""; }; - DECB734E0FA3ED8400F5FBC7 /* StmtObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StmtObjC.h; path = clang/AST/StmtObjC.h; sourceTree = ""; }; - DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StmtCXX.h; path = clang/AST/StmtCXX.h; sourceTree = ""; }; + DECB734E0FA3ED8400F5FBC7 /* StmtObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtObjC.h; path = clang/AST/StmtObjC.h; sourceTree = ""; tabWidth = 2; }; + DECB73550FA3EE5A00F5FBC7 /* StmtCXX.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = StmtCXX.h; path = clang/AST/StmtCXX.h; sourceTree = ""; tabWidth = 2; }; DECB77120FA5752300F5FBC7 /* PCHReaderStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReaderStmt.cpp; path = lib/Frontend/PCHReaderStmt.cpp; sourceTree = ""; tabWidth = 2; }; DECB77780FA579B000F5FBC7 /* PCHReaderDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHReaderDecl.cpp; path = lib/Frontend/PCHReaderDecl.cpp; sourceTree = ""; }; DECB77F60FA5850200F5FBC7 /* PCHWriterDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriterDecl.cpp; path = lib/Frontend/PCHWriterDecl.cpp; sourceTree = ""; }; DECB78160FA5882F00F5FBC7 /* PCHWriterStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCHWriterStmt.cpp; path = lib/Frontend/PCHWriterStmt.cpp; sourceTree = ""; }; - DECB78540FA58F5500F5FBC7 /* AccessSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AccessSpecifier.h; path = clang/Parse/AccessSpecifier.h; sourceTree = ""; }; DED626C80AE0C065001E80A4 /* TargetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInfo.cpp; sourceTree = ""; tabWidth = 2; }; - DED62ABA0AE2EDF1001E80A4 /* Decl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = Decl.cpp; path = lib/AST/Decl.cpp; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; DED7D7310A524295003AD0FB /* Diagnostic.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = Diagnostic.h; sourceTree = ""; tabWidth = 2; }; DED7D7330A524295003AD0FB /* FileManager.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = FileManager.h; sourceTree = ""; tabWidth = 2; }; DED7D7350A524295003AD0FB /* SourceLocation.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = SourceLocation.h; sourceTree = ""; tabWidth = 2; }; @@ -787,8 +806,7 @@ DED7D9170A52518C003AD0FB /* ScratchBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScratchBuffer.h; sourceTree = ""; }; DED7D9E40A5257F6003AD0FB /* ScratchBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScratchBuffer.cpp; sourceTree = ""; }; DEDFE5270F63A9230035BD10 /* DeclNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = DeclNodes.def; path = clang/AST/DeclNodes.def; sourceTree = ""; tabWidth = 2; }; - DEDFE5CB0F7206CC0035BD10 /* NestedNameSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NestedNameSpecifier.h; path = clang/AST/NestedNameSpecifier.h; sourceTree = ""; }; - DEDFE5CE0F7206E40035BD10 /* NestedNameSpecifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NestedNameSpecifier.cpp; path = lib/AST/NestedNameSpecifier.cpp; sourceTree = ""; }; + DEDFE5CB0F7206CC0035BD10 /* NestedNameSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = NestedNameSpecifier.h; path = clang/AST/NestedNameSpecifier.h; sourceTree = ""; tabWidth = 2; }; DEDFE6450F7B3B4E0035BD10 /* driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = driver.cpp; path = tools/driver/driver.cpp; sourceTree = ""; }; DEDFE6480F7B3B830035BD10 /* Types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Types.cpp; path = lib/Driver/Types.cpp; sourceTree = ""; }; DEDFE6490F7B3B830035BD10 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Tools.h; path = lib/Driver/Tools.h; sourceTree = ""; }; @@ -808,8 +826,7 @@ DEDFE6570F7B3B830035BD10 /* Tool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tool.cpp; path = lib/Driver/Tool.cpp; sourceTree = ""; }; DEDFE6580F7B3B830035BD10 /* HostInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfo.cpp; path = lib/Driver/HostInfo.cpp; sourceTree = ""; }; DEDFE6590F7B3B830035BD10 /* Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Driver.cpp; path = lib/Driver/Driver.cpp; sourceTree = ""; }; - DEDFF87F0F848CE30035BD10 /* TemplateName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemplateName.h; path = clang/AST/TemplateName.h; sourceTree = ""; }; - DEDFF8870F848CF80035BD10 /* TemplateName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateName.cpp; path = lib/AST/TemplateName.cpp; sourceTree = ""; }; + DEDFF87F0F848CE30035BD10 /* TemplateName.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TemplateName.h; path = clang/AST/TemplateName.h; sourceTree = ""; tabWidth = 2; }; DEDFFF070F959EE60035BD10 /* Diagnostic.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Diagnostic.td; sourceTree = ""; }; DEDFFF530F9704580035BD10 /* DiagnosticGroups.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticGroups.td; sourceTree = ""; }; DEEBBD430C19C5D200A9FE82 /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TODO.txt; sourceTree = ""; }; @@ -847,10 +864,9 @@ DEF168620F9549250098507F /* FixItRewriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FixItRewriter.h; path = clang/Frontend/FixItRewriter.h; sourceTree = ""; }; DEF169220F9645960098507F /* FrontendDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendDiagnostic.h; path = clang/Frontend/FrontendDiagnostic.h; sourceTree = ""; }; DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = ""; }; - DEF16BE40FA13A5B0098507F /* TypeNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = TypeNodes.def; path = clang/AST/TypeNodes.def; sourceTree = ""; }; - DEF16BE50FA13A650098507F /* TypeOrdering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeOrdering.h; path = clang/AST/TypeOrdering.h; sourceTree = ""; }; + DEF16BE40FA13A5B0098507F /* TypeNodes.def */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; name = TypeNodes.def; path = clang/AST/TypeNodes.def; sourceTree = ""; tabWidth = 2; }; + DEF16BE50FA13A650098507F /* TypeOrdering.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TypeOrdering.h; path = clang/AST/TypeOrdering.h; sourceTree = ""; tabWidth = 2; }; DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; name = InternalsManual.html; path = docs/InternalsManual.html; sourceTree = ""; }; - DEF2EDA60C6A4252000C4259 /* StmtDumper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = StmtDumper.cpp; path = lib/AST/StmtDumper.cpp; sourceTree = ""; tabWidth = 2; }; DEF2EFF20C6CDD74000C4259 /* CGExprAgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGExprAgg.cpp; path = lib/CodeGen/CGExprAgg.cpp; sourceTree = ""; tabWidth = 2; }; DEF2F00F0C6CFED5000C4259 /* SemaChecking.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaChecking.cpp; path = lib/Sema/SemaChecking.cpp; sourceTree = ""; tabWidth = 2; }; DEF7D9F60C9C8B1A0001F598 /* Rewriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Rewriter.h; path = clang/Rewrite/Rewriter.h; sourceTree = ""; }; @@ -1363,8 +1379,8 @@ DE4772F90C10EAE5002239E8 /* CGStmt.cpp */, 1A6FE7080FD6F85800E00CA9 /* CGTemporaries.cpp */, 35475B230E7997680000BFE4 /* CGValue.h */, - 1A81AA18108144F40094E50B /* CGVtable.cpp */, - 1A81AA5D108278A20094E50B /* CGVtable.h */, + 1A81AA18108144F40094E50B /* CGVTables.cpp */, + 1A81AA5D108278A20094E50B /* CGVTables.h */, 1A97825A1108BA18002B98FC /* CGVTT.cpp */, DE928B800C0A615B00231DA4 /* CodeGenFunction.h */, DE928B820C0A616000231DA4 /* CodeGenFunction.cpp */, @@ -1393,6 +1409,15 @@ DEC8D98B0A9433BC00353FCA /* AST */ = { isa = PBXGroup; children = ( + 1A15C407118226980092260D /* ASTImporter.h */, + 1A15C408118226980092260D /* ASTVector.h */, + 1A15C409118226980092260D /* CharUnits.h */, + 1A15C40A118226980092260D /* DeclAccessPair.h */, + 1A15C40B118226980092260D /* DeclFriend.h */, + 1A15C40C118226980092260D /* DependentDiagnostic.h */, + 1A15C40D118226980092260D /* TemplateBase.h */, + 1A15C40E118226980092260D /* UnresolvedSet.h */, + 1A15C40F118226980092260D /* UsuallyTinyPtrVector.h */, 904753791096376F00CBDDDD /* CXXInheritance.h */, 9047537A1096376F00CBDDDD /* Redeclarable.h */, 9047537B1096376F00CBDDDD /* TypeLoc.h */, @@ -1400,7 +1425,6 @@ 9047537D1096376F00CBDDDD /* TypeLocNodes.def */, 9047537E1096376F00CBDDDD /* TypeLocVisitor.h */, 9047537F1096376F00CBDDDD /* TypeVisitor.h */, - DECB78540FA58F5500F5FBC7 /* AccessSpecifier.h */, DE613EF30E0E148D00B05B79 /* APValue.h */, DEC8D9A30A94346E00353FCA /* AST.h */, 35BFBD2B0C9EDE1E006CB644 /* ASTConsumer.h */, @@ -1445,41 +1469,46 @@ DEC8D9920A9433F400353FCA /* AST */ = { isa = PBXGroup; children = ( - DE8823CA0ED0046600CBC30A /* APValue.cpp */, - 35BB2D7E0D19954000944DB5 /* ASTConsumer.cpp */, - DE1732FF0B068B700080B521 /* ASTContext.cpp */, - 1A535ED8107BC45E000C3AE7 /* CXXInheritance.cpp */, - 35FE6BCE0DF6EE1F00739712 /* DeclBase.cpp */, - DED62ABA0AE2EDF1001E80A4 /* Decl.cpp */, - 3538FDB70ED24A4E005EC283 /* DeclarationName.cpp */, - 35EE48AF0E0C4CCA00715C54 /* DeclCXX.cpp */, - 358D230A0E8BEB9D0003DDCC /* DeclGroup.cpp */, - 1A14D3A60FD78A3F00DA2835 /* DeclPrinter.cpp */, - DE38CF260D8C9E6C00A273B6 /* DeclObjC.cpp */, - DEB076CE0F3A222200F5A2BE /* DeclTemplate.cpp */, - DE0FCB330A9C21F100248FD5 /* Expr.cpp */, - 1A32C17E0E1C87AD00A6B483 /* ExprConstant.cpp */, - 35260CA40C7F75C000D66CE9 /* ExprCXX.cpp */, - 1AA963C310D85A7300786C86 /* FullExpr.cpp */, - 3557D1A80EB136B100C59739 /* InheritViz.cpp */, - DEDFE5CE0F7206E40035BD10 /* NestedNameSpecifier.cpp */, - 35EE48B00E0C4CCA00715C54 /* ParentMap.cpp */, - 1A96785111486FDC00F24372 /* RecordLayout.cpp */, - 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */, - 1AA1D91710125DE30078DEBC /* RecordLayoutBuilder.h */, - DE3452400AEF1A2D00DBC861 /* Stmt.cpp */, - DEF2EDA60C6A4252000C4259 /* StmtDumper.cpp */, - 35847BE40CC7DBAF00C40FFF /* StmtIterator.cpp */, - DE34621C0AFEB19B00DBC861 /* StmtPrinter.cpp */, - 1AE4EE3D103B89ED00888A23 /* StmtProfile.cpp */, - 35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */, - 1ADD795310A90C6100741BBA /* TemplateBase.cpp */, - DEDFF8870F848CF80035BD10 /* TemplateName.cpp */, - DE75EDF00B06880E0020CF81 /* Type.cpp */, - 1ADD795210A90C6100741BBA /* TypeLoc.cpp */, - 1ADD795110A90C6100741BBA /* TypePrinter.cpp */, + 1ABD23B11182449800A48E65 /* APValue.cpp */, + 1ABD23B21182449800A48E65 /* ASTConsumer.cpp */, + 1ABD23B31182449800A48E65 /* ASTContext.cpp */, + 1ABD23B41182449800A48E65 /* ASTDiagnostic.cpp */, + 1ABD23B51182449800A48E65 /* ASTImporter.cpp */, + 1ABD23B61182449800A48E65 /* AttrImpl.cpp */, + 1ABD23B71182449800A48E65 /* CXXInheritance.cpp */, + 1ABD23B81182449800A48E65 /* Decl.cpp */, + 1ABD23B91182449800A48E65 /* DeclarationName.cpp */, + 1ABD23BA1182449800A48E65 /* DeclBase.cpp */, + 1ABD23BB1182449800A48E65 /* DeclCXX.cpp */, + 1ABD23BC1182449800A48E65 /* DeclFriend.cpp */, + 1ABD23BD1182449800A48E65 /* DeclGroup.cpp */, + 1ABD23BE1182449800A48E65 /* DeclObjC.cpp */, + 1ABD23BF1182449800A48E65 /* DeclPrinter.cpp */, + 1ABD23C01182449800A48E65 /* DeclTemplate.cpp */, + 1ABD23C11182449800A48E65 /* Expr.cpp */, + 1ABD23C21182449800A48E65 /* ExprConstant.cpp */, + 1ABD23C31182449800A48E65 /* ExprCXX.cpp */, + 1ABD23C41182449800A48E65 /* FullExpr.cpp */, + 1ABD23C51182449800A48E65 /* InheritViz.cpp */, + 1ABD23C61182449800A48E65 /* NestedNameSpecifier.cpp */, + 1ABD23C71182449800A48E65 /* ParentMap.cpp */, + 1ABD23C81182449800A48E65 /* RecordLayout.cpp */, + 1ABD23C91182449800A48E65 /* RecordLayoutBuilder.cpp */, + 1ABD23CA1182449800A48E65 /* RecordLayoutBuilder.h */, + 1ABD23CB1182449800A48E65 /* Stmt.cpp */, + 1ABD23CC1182449800A48E65 /* StmtDumper.cpp */, + 1ABD23CD1182449800A48E65 /* StmtIterator.cpp */, + 1ABD23CE1182449800A48E65 /* StmtPrinter.cpp */, + 1ABD23CF1182449800A48E65 /* StmtProfile.cpp */, + 1ABD23D01182449800A48E65 /* StmtViz.cpp */, + 1ABD23D11182449800A48E65 /* TemplateBase.cpp */, + 1ABD23D21182449800A48E65 /* TemplateName.cpp */, + 1ABD23D31182449800A48E65 /* Type.cpp */, + 1ABD23D41182449800A48E65 /* TypeLoc.cpp */, + 1ABD23D51182449800A48E65 /* TypePrinter.cpp */, ); name = AST; + path = lib/AST; sourceTree = ""; }; DED7D72E0A524295003AD0FB /* include */ = { @@ -1791,20 +1820,14 @@ DED7D7C90A5242E6003AD0FB /* Preprocessor.cpp in Sources */, DED7D9E50A5257F6003AD0FB /* ScratchBuffer.cpp in Sources */, DE06D4310A8BB52D0050E87E /* Parser.cpp in Sources */, - DE0FCB340A9C21F100248FD5 /* Expr.cpp in Sources */, DED626C90AE0C065001E80A4 /* TargetInfo.cpp in Sources */, - DED62ABB0AE2EDF1001E80A4 /* Decl.cpp in Sources */, DE344B540AE5E46C00DBC861 /* HeaderSearch.cpp in Sources */, - DE3452410AEF1A2D00DBC861 /* Stmt.cpp in Sources */, DE3460000AFDCC1900DBC861 /* ParseObjc.cpp in Sources */, DE3460050AFDCC6500DBC861 /* ParseInit.cpp in Sources */, DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */, DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */, DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */, DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */, - DE34621D0AFEB19B00DBC861 /* StmtPrinter.cpp in Sources */, - DE75EDF10B06880E0020CF81 /* Type.cpp in Sources */, - DE1733000B068B700080B521 /* ASTContext.cpp in Sources */, DE17336E0B068DC20080B521 /* DeclSpec.cpp in Sources */, 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */, DE67E70B0C020EC500F66BC5 /* SemaType.cpp in Sources */, @@ -1823,24 +1846,19 @@ DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */, 84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */, DEEBC3BC0C2363BC00A9FE82 /* CodeGenTypes.cpp in Sources */, - DEF2EDA70C6A4252000C4259 /* StmtDumper.cpp in Sources */, DEF2EFF30C6CDD74000C4259 /* CGExprAgg.cpp in Sources */, DEF2F0100C6CFED5000C4259 /* SemaChecking.cpp in Sources */, 1ABC36940C7A4BDC006DB0AB /* CGBuiltin.cpp in Sources */, DE224FF80C7AA98800D370A5 /* CGExprComplex.cpp in Sources */, 1A7342480C7B57D500122F56 /* CGObjC.cpp in Sources */, DE2252700C7E82D000D370A5 /* CGExprScalar.cpp in Sources */, - 35260CA50C7F75C000D66CE9 /* ExprCXX.cpp in Sources */, DE2255FC0C8004E600D370A5 /* ParseDeclCXX.cpp in Sources */, 356EF9B50C8F7DDF006650F5 /* LiveVariables.cpp in Sources */, DEF7D9F90C9C8B1D0001F598 /* Rewriter.cpp in Sources */, - 35CFFE000CA1CBCB00E6F2BE /* StmtViz.cpp in Sources */, DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */, - 35847BE50CC7DBAF00C40FFF /* StmtIterator.cpp in Sources */, 35707EFE0CD0F5CC000B2204 /* SourceLocation.cpp in Sources */, DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */, DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */, - 35BB2D7F0D19954000944DB5 /* ASTConsumer.cpp in Sources */, DE47999C0D2EBE1A00706D2D /* SemaExprObjC.cpp in Sources */, 03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */, 1A376A2D0D4AED9B002A1C52 /* CGExprConstant.cpp in Sources */, @@ -1859,7 +1877,6 @@ DE85CDAC0D838C120070E26E /* PPMacroExpansion.cpp in Sources */, DE85CDB00D838C390070E26E /* PPDirectives.cpp in Sources */, DE85CDB60D839BAE0070E26E /* PPLexerChange.cpp in Sources */, - DE38CF270D8C9E6C00A273B6 /* DeclObjC.cpp in Sources */, 72D16C1F0D9975C400E6DA4A /* HTMLRewrite.cpp in Sources */, 35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */, 35F8D0D60D9B82CD00D91C5E /* BasicObjCFoundationChecks.cpp in Sources */, @@ -1871,12 +1888,8 @@ 35EFEFB60DB67ED60020783D /* GRTransferFuncs.cpp in Sources */, 35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */, 3599299B0DE2425300A8A33E /* SemaInit.cpp in Sources */, - 35FE6BCF0DF6EE1F00739712 /* DeclBase.cpp in Sources */, - 35EE48B10E0C4CCA00715C54 /* DeclCXX.cpp in Sources */, - 35EE48B20E0C4CCA00715C54 /* ParentMap.cpp in Sources */, 3534A01D0E129849002709B2 /* ParseCXXInlineMethods.cpp in Sources */, DE22BCF20E14197E0094DC60 /* SemaDeclAttr.cpp in Sources */, - 1A32C17F0E1C87AD00A6B483 /* ExprConstant.cpp in Sources */, 3595AFB80E1C8D62004CDF09 /* CheckObjCDealloc.cpp in Sources */, 3536456B0E23EBF7009C6509 /* Environment.cpp in Sources */, 3558F76D0E267C8300A5B0DF /* BasicStore.cpp in Sources */, @@ -1891,7 +1904,6 @@ 358CFBB80E65AB04002A8E19 /* BasicConstraintManager.cpp in Sources */, 35475B200E79973F0000BFE4 /* CGCall.cpp in Sources */, 35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */, - 358D230B0E8BEB9D0003DDCC /* DeclGroup.cpp in Sources */, 355106860E9A8507006A4E44 /* MemRegion.cpp in Sources */, 3551068C0E9A8546006A4E44 /* ParsePragma.cpp in Sources */, 3551068D0E9A8546006A4E44 /* ParseTentative.cpp in Sources */, @@ -1899,17 +1911,13 @@ 35A057E20EAE2D950069249F /* RegionStore.cpp in Sources */, 35A057E30EAE2D950069249F /* SVals.cpp in Sources */, 35585DC00EAFBC4500D0A97A /* SemaOverload.cpp in Sources */, - 3557D1A90EB136B100C59739 /* InheritViz.cpp in Sources */, 35E194690ECB82FB00F21733 /* SemaCXXScopeSpec.cpp in Sources */, 35E1946A0ECB82FB00F21733 /* SemaCXXCast.cpp in Sources */, 35E1946D0ECB83C100F21733 /* PTHLexer.cpp in Sources */, 3537AA0E0ECD08A4008F7CDC /* PreprocessorLexer.cpp in Sources */, - DE8823CB0ED0046600CBC30A /* APValue.cpp in Sources */, - 3538FDB80ED24A4E005EC283 /* DeclarationName.cpp in Sources */, 353959D50EE5F88A00E82461 /* ParseTemplate.cpp in Sources */, 3591853F0EFB1088000039AF /* SemaTemplate.cpp in Sources */, 357EA27D0F2526F300439B60 /* SemaLookup.cpp in Sources */, - DEB076CF0F3A222200F5A2BE /* DeclTemplate.cpp in Sources */, 1A471AB50F437BC500753CE8 /* CGBlocks.cpp in Sources */, DEB077990F44F97800F5A2BE /* TokenConcatenation.cpp in Sources */, 1A2193CE0F45EEB700C0713D /* Mangle.cpp in Sources */, @@ -1922,7 +1930,6 @@ 35544B880F5C7FD700D92AA9 /* RangeConstraintManager.cpp in Sources */, 35544B890F5C7FD700D92AA9 /* SimpleConstraintManager.cpp in Sources */, 35544B8C0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp in Sources */, - DEDFE5CF0F7206E40035BD10 /* NestedNameSpecifier.cpp in Sources */, 1ADF47AF0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp in Sources */, DEDFE6460F7B3B4E0035BD10 /* driver.cpp in Sources */, DEDFE65A0F7B3B830035BD10 /* Types.cpp in Sources */, @@ -1942,7 +1949,6 @@ DEDFE6680F7B3B830035BD10 /* Driver.cpp in Sources */, 1A701B640F7C8FE400FEC4D1 /* SemaAccess.cpp in Sources */, 906BF4B00F83BA2E001071FA /* ConvertUTF.c in Sources */, - DEDFF8880F848CF80035BD10 /* TemplateName.cpp in Sources */, DEF165710F8FB34D0098507F /* PCHWriter.cpp in Sources */, DEF165750F8FB3510098507F /* PCHReader.cpp in Sources */, DEF168400F9548DC0098507F /* FixItRewriter.cpp in Sources */, @@ -1969,11 +1975,8 @@ 1A2A54C50FD1DD1C00F4CE45 /* Warnings.cpp in Sources */, 1A6FE7090FD6F85800E00CA9 /* CGTemporaries.cpp in Sources */, BDF87CF70FD746F300BBF872 /* SemaTemplateDeduction.cpp in Sources */, - 1A14D3A70FD78A3F00DA2835 /* DeclPrinter.cpp in Sources */, DE37252E0FE481AD00CF2CC2 /* Builtins.cpp in Sources */, - 1AA1D91810125DE30078DEBC /* RecordLayoutBuilder.cpp in Sources */, 1AFF8AE31012BFC900D248DA /* CGRecordLayoutBuilder.cpp in Sources */, - 1AE4EE3E103B89ED00888A23 /* StmtProfile.cpp in Sources */, 90FD6D7B103C3D49005F5B73 /* Analyzer.cpp in Sources */, 90FD6D7C103C3D49005F5B73 /* ASTLocation.cpp in Sources */, 90FD6D7D103C3D49005F5B73 /* DeclReferenceMap.cpp in Sources */, @@ -1993,16 +1996,11 @@ 1A6B6CD410693FC900BB4A8F /* CodeCompleteConsumer.cpp in Sources */, 1A6B6CD510693FC900BB4A8F /* SemaCodeComplete.cpp in Sources */, 1A6B6E9A1069833600BB4A8F /* CGExprCXX.cpp in Sources */, - 1A535ED9107BC45E000C3AE7 /* CXXInheritance.cpp in Sources */, 1A6C01F7108128710072DEE4 /* CGRTTI.cpp in Sources */, - 1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */, + 1A81AA19108144F40094E50B /* CGVTables.cpp in Sources */, 1AF1B50F109A4FB800AFAFAC /* CGException.cpp in Sources */, - 1ADD795410A90C6100741BBA /* TypePrinter.cpp in Sources */, - 1ADD795510A90C6100741BBA /* TypeLoc.cpp in Sources */, - 1ADD795610A90C6100741BBA /* TemplateBase.cpp in Sources */, 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */, E16B523510D30B2400430AC9 /* cc1_main.cpp in Sources */, - 1AA963C410D85A7300786C86 /* FullExpr.cpp in Sources */, 1ACB57E41105820D0047B991 /* CompilerInstance.cpp in Sources */, 1ACB57E51105820D0047B991 /* CompilerInvocation.cpp in Sources */, 1ACB57E61105820D0047B991 /* DeclXML.cpp in Sources */, @@ -2019,7 +2017,6 @@ 1A621C4411111D61009E6834 /* CIndexInclusionStack.cpp in Sources */, 1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */, 1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */, - 1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */, BF89C3E211595818001C2D68 /* AnalysisBasedWarnings.cpp in Sources */, BF89C3E91159594A001C2D68 /* SemaObjCProperty.cpp in Sources */, BF89C3F911595A01001C2D68 /* SemaType.cpp in Sources */, @@ -2027,6 +2024,42 @@ BF89C3FD11595A5D001C2D68 /* SemaExceptionSpec.cpp in Sources */, 1AFDD8721161085D00AE030A /* ASTMerge.cpp in Sources */, 1AFDD8731161085D00AE030A /* CodeGenAction.cpp in Sources */, + 1ABD23D61182449800A48E65 /* APValue.cpp in Sources */, + 1ABD23D71182449800A48E65 /* ASTConsumer.cpp in Sources */, + 1ABD23D81182449800A48E65 /* ASTContext.cpp in Sources */, + 1ABD23D91182449800A48E65 /* ASTDiagnostic.cpp in Sources */, + 1ABD23DA1182449800A48E65 /* ASTImporter.cpp in Sources */, + 1ABD23DB1182449800A48E65 /* AttrImpl.cpp in Sources */, + 1ABD23DC1182449800A48E65 /* CXXInheritance.cpp in Sources */, + 1ABD23DD1182449800A48E65 /* Decl.cpp in Sources */, + 1ABD23DE1182449800A48E65 /* DeclarationName.cpp in Sources */, + 1ABD23DF1182449800A48E65 /* DeclBase.cpp in Sources */, + 1ABD23E01182449800A48E65 /* DeclCXX.cpp in Sources */, + 1ABD23E11182449800A48E65 /* DeclFriend.cpp in Sources */, + 1ABD23E21182449800A48E65 /* DeclGroup.cpp in Sources */, + 1ABD23E31182449800A48E65 /* DeclObjC.cpp in Sources */, + 1ABD23E41182449800A48E65 /* DeclPrinter.cpp in Sources */, + 1ABD23E51182449800A48E65 /* DeclTemplate.cpp in Sources */, + 1ABD23E61182449800A48E65 /* Expr.cpp in Sources */, + 1ABD23E71182449800A48E65 /* ExprConstant.cpp in Sources */, + 1ABD23E81182449800A48E65 /* ExprCXX.cpp in Sources */, + 1ABD23E91182449800A48E65 /* FullExpr.cpp in Sources */, + 1ABD23EA1182449800A48E65 /* InheritViz.cpp in Sources */, + 1ABD23EB1182449800A48E65 /* NestedNameSpecifier.cpp in Sources */, + 1ABD23EC1182449800A48E65 /* ParentMap.cpp in Sources */, + 1ABD23ED1182449800A48E65 /* RecordLayout.cpp in Sources */, + 1ABD23EE1182449800A48E65 /* RecordLayoutBuilder.cpp in Sources */, + 1ABD23EF1182449800A48E65 /* Stmt.cpp in Sources */, + 1ABD23F01182449800A48E65 /* StmtDumper.cpp in Sources */, + 1ABD23F11182449800A48E65 /* StmtIterator.cpp in Sources */, + 1ABD23F21182449800A48E65 /* StmtPrinter.cpp in Sources */, + 1ABD23F31182449800A48E65 /* StmtProfile.cpp in Sources */, + 1ABD23F41182449800A48E65 /* StmtViz.cpp in Sources */, + 1ABD23F51182449800A48E65 /* TemplateBase.cpp in Sources */, + 1ABD23F61182449800A48E65 /* TemplateName.cpp in Sources */, + 1ABD23F71182449800A48E65 /* Type.cpp in Sources */, + 1ABD23F81182449800A48E65 /* TypeLoc.cpp in Sources */, + 1ABD23F91182449800A48E65 /* TypePrinter.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/docs/Block-ABI-Apple.txt ============================================================================== --- vendor/clang/dist/docs/Block-ABI-Apple.txt Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/docs/Block-ABI-Apple.txt Tue May 4 16:12:48 2010 (r207619) @@ -31,10 +31,11 @@ THE SOFTWARE. 2008/10/30 - add __weak support 2010/3/16 - rev for stret return, signature field +2010/4/6 - improved wording This document describes the Apple ABI implementation specification of Blocks. -The first shipping version of this ABI is found in Mac OS X 10.6, and shall be referred to as 10.6.ABI. Proposals have been made to enhance the blocks compiler and runtime, and these changes would form a new ABI called post-10.6.ABI if these changes were ever shipped in a product, which is purely speculative. +The first shipping version of this ABI is found in Mac OS X 10.6, and shall be referred to as 10.6.ABI. As of 2010/3/16, the following describes the ABI contract with the runtime and the compiler, and, as necessary, will be referred to as ABI.2010.3.16. Since the Apple ABI references symbols from other elements of the system, any attempt to use this ABI on systems prior to SnowLeopard is undefined. @@ -54,13 +55,13 @@ struct Block_literal_1 { // optional helper functions void (*copy_helper)(void *dst, void *src); // IFF (1<<25) void (*dispose_helper)(void *src); // IFF (1<<25) - // required post 10.6.ABI + // required ABI.2010.3.16 const char *signature; // IFF (1<<30) } *descriptor; // imported variables }; -The following flags bits are in use thusly for a possible post.10.6.ABI: +The following flags bits are in use thusly for a possible ABI.2010.3.16: enum { BLOCK_HAS_COPY_DISPOSE = (1 << 25), @@ -75,8 +76,8 @@ In 10.6.ABI the (1<<29) was unconditiona switch (flags & (3<<29)) { case (0<<29): , error case (1<<29): 10.6.ABI, no signature field available - case (2<<29): post-10.6.ABI, regular calling convention, presence of signature field - case (3<<29): post-10.6.ABI, stret calling convention, presence of signature field, + case (2<<29): ABI.2010.3.16, regular calling convention, presence of signature field + case (3<<29): ABI.2010.3.16, stret calling convention, presence of signature field, } The following discussions are presented as 10.6.ABI otherwise. Modified: vendor/clang/dist/docs/InternalsManual.html ============================================================================== --- vendor/clang/dist/docs/InternalsManual.html Tue May 4 16:11:02 2010 (r207618) +++ vendor/clang/dist/docs/InternalsManual.html Tue May 4 16:12:48 2010 (r207619) @@ -145,13 +145,13 @@ diagnostic :).

pieces, this section describes them and talks about best practices when adding a new diagnostic.

- -

The DiagnosticKinds.def file

- - -

Diagnostics are created by adding an entry to the DiagnosticKinds.def file. This file encodes the unique ID of the *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 4 16:57:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 625261065672; Tue, 4 May 2010 16:57:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 519868FC08; Tue, 4 May 2010 16:57: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 o44Gv0RX077894; Tue, 4 May 2010 16:57:00 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44Gv0gC077891; Tue, 4 May 2010 16:57:00 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201005041657.o44Gv0gC077891@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 4 May 2010 16:57: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: r207620 - head/sys/dev/sound/pcm 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, 04 May 2010 16:57:00 -0000 Author: jkim Date: Tue May 4 16:56:59 2010 New Revision: 207620 URL: http://svn.freebsd.org/changeset/base/207620 Log: - Remove more dead code[1]. Since r207330, we only need to check division by zero of the second argument 'from'. - Prefer u_int32_t over unsigned int to make its intention more clearer. - Move the function to a header file and make it a static inline function. Pointed out by: Andrew Reilly (areilly at bigpond dot net dot au)[1] MFC after: 3 days Modified: head/sys/dev/sound/pcm/buffer.c head/sys/dev/sound/pcm/buffer.h Modified: head/sys/dev/sound/pcm/buffer.c ============================================================================== --- head/sys/dev/sound/pcm/buffer.c Tue May 4 16:12:48 2010 (r207619) +++ head/sys/dev/sound/pcm/buffer.c Tue May 4 16:56:59 2010 (r207620) @@ -566,19 +566,6 @@ sndbuf_updateprevtotal(struct snd_dbuf * } unsigned int -snd_xbytes(unsigned int v, unsigned int from, unsigned int to) -{ - - if (from == to) - return v; - - if (from == 0 || to == 0 || v == 0) - return 0; - - return (unsigned int)(((u_int64_t)v * to) / from); -} - -unsigned int sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct snd_dbuf *to) { if (from == NULL || to == NULL || v == 0) Modified: head/sys/dev/sound/pcm/buffer.h ============================================================================== --- head/sys/dev/sound/pcm/buffer.h Tue May 4 16:12:48 2010 (r207619) +++ head/sys/dev/sound/pcm/buffer.h Tue May 4 16:56:59 2010 (r207620) @@ -111,7 +111,6 @@ u_int64_t sndbuf_getblocks(struct snd_db u_int64_t sndbuf_getprevblocks(struct snd_dbuf *b); u_int64_t sndbuf_gettotal(struct snd_dbuf *b); u_int64_t sndbuf_getprevtotal(struct snd_dbuf *b); -unsigned int snd_xbytes(unsigned int v, unsigned int from, unsigned int to); unsigned int sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct snd_dbuf *to); u_int8_t sndbuf_zerodata(u_int32_t fmt); void sndbuf_updateprevtotal(struct snd_dbuf *b); @@ -132,3 +131,14 @@ void sndbuf_dmabounce(struct snd_dbuf *b #ifdef OSSV4_EXPERIMENT void sndbuf_getpeaks(struct snd_dbuf *b, int *lp, int *rp); #endif + +static inline u_int32_t +snd_xbytes(u_int32_t v, u_int32_t from, u_int32_t to) +{ + + if (from == to) + return (v); + if (from == 0) + return (0); + return ((u_int64_t)v * to / from); +} From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:00:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 903D2106566B; Tue, 4 May 2010 17:00:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7F4928FC08; Tue, 4 May 2010 17:00: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 o44H0I0u078673; Tue, 4 May 2010 17:00:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44H0IVt078672; Tue, 4 May 2010 17:00:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005041700.o44H0IVt078672@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 17:00: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: r207621 - head/usr.bin/tftp 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, 04 May 2010 17:00:18 -0000 Author: imp Date: Tue May 4 17:00:18 2010 New Revision: 207621 URL: http://svn.freebsd.org/changeset/base/207621 Log: Doh! Add another new file forgotten by the importer of edwin@'s tftp improvements. MFC after: 1 week Pointy Hat: imp-o-rama... Added: head/usr.bin/tftp/tftp.h (contents, props changed) Added: head/usr.bin/tftp/tftp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tftp/tftp.h Tue May 4 17:00:18 2010 (r207621) @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1993 + * The Regents of the University of California. 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * @(#)extern.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ + */ + +void recvfile(int peer, char *port, int fd, char *name, char *mode); +void xmitfile(int peer, char *port, int fd, char *name, char *mode); + +extern int verbose; +extern int maxtimeout; +extern volatile int txrx_error; From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:02:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E17E106566B; Tue, 4 May 2010 17:02:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6A58FC17; Tue, 4 May 2010 17:02: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 o44H2Y7u079197; Tue, 4 May 2010 17:02:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44H2Ygm079195; Tue, 4 May 2010 17:02:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005041702.o44H2Ygm079195@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 May 2010 17:02: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: r207622 - head/sys/dev/msk 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, 04 May 2010 17:02:34 -0000 Author: yongari Date: Tue May 4 17:02:34 2010 New Revision: 207622 URL: http://svn.freebsd.org/changeset/base/207622 Log: Drop driver lock before exiting from interrupt handler. Submitted by: jhb MFC after: 3 days Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Tue May 4 17:00:18 2010 (r207621) +++ head/sys/dev/msk/if_msk.c Tue May 4 17:02:34 2010 (r207622) @@ -3594,6 +3594,7 @@ msk_intr(void *xsc) (sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 || (status & sc->msk_intrmask) == 0) { CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); + MSK_UNLOCK(sc); return; } From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:12:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30444106564A; Tue, 4 May 2010 17:12:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1F67F8FC12; Tue, 4 May 2010 17:12: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 o44HCaBi081415; Tue, 4 May 2010 17:12:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44HCash081413; Tue, 4 May 2010 17:12:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005041712.o44HCash081413@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 May 2010 17:12: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: r207623 - head/sys/dev/msk 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, 04 May 2010 17:12:37 -0000 Author: yongari Date: Tue May 4 17:12:36 2010 New Revision: 207623 URL: http://svn.freebsd.org/changeset/base/207623 Log: Make sure to check whether driver is running before processing received frames. Also check driver has valid ifp pointer before calling msk_stop() in device_shutdown handler. While I'm here remove unnecessary accesses to interrupt mask registers in device_shutdown handler because driver puts the controller into reset state. With these changes, msk(4) now survive from heavy RX traffic(1byte UDP frame) while reboot is in progress. Reported by: Mark Atkinson < atkin901 <> gmail dot com > Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Tue May 4 17:02:34 2010 (r207622) +++ head/sys/dev/msk/if_msk.c Tue May 4 17:12:36 2010 (r207623) @@ -2904,20 +2904,15 @@ mskc_shutdown(device_t dev) sc = device_get_softc(dev); MSK_LOCK(sc); for (i = 0; i < sc->msk_num_port; i++) { - if (sc->msk_if[i] != NULL) + if (sc->msk_if[i] != NULL && sc->msk_if[i]->msk_ifp != NULL && + ((sc->msk_if[i]->msk_ifp->if_drv_flags & + IFF_DRV_RUNNING) != 0)) msk_stop(sc->msk_if[i]); } - - /* Disable all interrupts. */ - CSR_WRITE_4(sc, B0_IMSK, 0); - CSR_READ_4(sc, B0_IMSK); - CSR_WRITE_4(sc, B0_HWE_IMSK, 0); - CSR_READ_4(sc, B0_HWE_IMSK); + MSK_UNLOCK(sc); /* Put hardware reset. */ CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); - - MSK_UNLOCK(sc); return (0); } @@ -3525,6 +3520,8 @@ msk_handle_events(struct msk_softc *sc) sc_if->msk_csum = status; break; case OP_RXSTAT: + if (!(sc_if->msk_ifp->if_drv_flags & IFF_DRV_RUNNING)) + break; if (sc_if->msk_framesize > (MCLBYTES - MSK_RX_BUF_ALIGN)) msk_jumbo_rxeof(sc_if, status, control, len); From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:30:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1C751065673; Tue, 4 May 2010 17:30:07 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8908FC0C; Tue, 4 May 2010 17:30: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 o44HU705085265; Tue, 4 May 2010 17:30:07 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44HU7XQ085262; Tue, 4 May 2010 17:30:07 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005041730.o44HU7XQ085262@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 May 2010 17:30: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: r207624 - 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: Tue, 04 May 2010 17:30:07 -0000 Author: mm Date: Tue May 4 17:30:07 2010 New Revision: 207624 URL: http://svn.freebsd.org/changeset/base/207624 Log: Fix deadlock during zfs receive. OpenSolaris onnv revision: 9299:8809e849f63e PR: kern/146296 Submitted by: myself Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6783818, 6826836) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue May 4 17:12:36 2010 (r207623) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue May 4 17:30:07 2010 (r207624) @@ -464,15 +464,15 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t ASSERT(db->db_buf == NULL); if (db->db_blkid == DB_BONUS_BLKID) { - int bonuslen = dn->dn_bonuslen; + int bonuslen = MIN(dn->dn_bonuslen, dn->dn_phys->dn_bonuslen); ASSERT3U(bonuslen, <=, db->db.db_size); db->db.db_data = zio_buf_alloc(DN_MAX_BONUSLEN); arc_space_consume(DN_MAX_BONUSLEN); if (bonuslen < DN_MAX_BONUSLEN) bzero(db->db.db_data, DN_MAX_BONUSLEN); - bcopy(DN_BONUS(dn->dn_phys), db->db.db_data, - bonuslen); + if (bonuslen) + bcopy(DN_BONUS(dn->dn_phys), db->db.db_data, bonuslen); dbuf_update_data(db); db->db_state = DB_CACHED; mutex_exit(&db->db_mtx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Tue May 4 17:12:36 2010 (r207623) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Tue May 4 17:30:07 2010 (r207624) @@ -128,15 +128,6 @@ dmu_object_reclaim(objset_t *os, uint64_ return (0); } - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, object); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err) { - dmu_tx_abort(tx); - dnode_rele(dn, FTAG); - return (err); - } - nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT); /* @@ -144,16 +135,27 @@ dmu_object_reclaim(objset_t *os, uint64_ * be a new file instance. We must clear out the previous file * contents before we can change this type of metadata in the dnode. */ - if (dn->dn_nblkptr > nblkptr || dn->dn_datablksz != blocksize) - dmu_free_long_range(os, object, 0, DMU_OBJECT_END); + if (dn->dn_nblkptr > nblkptr || dn->dn_datablksz != blocksize) { + err = dmu_free_long_range(os, object, 0, DMU_OBJECT_END); + if (err) + goto out; + } + + tx = dmu_tx_create(os); + dmu_tx_hold_bonus(tx, object); + err = dmu_tx_assign(tx, TXG_WAIT); + if (err) { + dmu_tx_abort(tx); + goto out; + } dnode_reallocate(dn, ot, blocksize, bonustype, bonuslen, tx); dmu_tx_commit(tx); - +out: dnode_rele(dn, FTAG); - return (0); + return (err); } int From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:34:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B7DD1065672; Tue, 4 May 2010 17:34:01 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2AA478FC0C; Tue, 4 May 2010 17:34:01 +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 o44HY1Hx086164; Tue, 4 May 2010 17:34:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44HY1X7086162; Tue, 4 May 2010 17:34:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005041734.o44HY1X7086162@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 May 2010 17:34: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: r207625 - head/sys/dev/sge 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, 04 May 2010 17:34:01 -0000 Author: yongari Date: Tue May 4 17:34:00 2010 New Revision: 207625 URL: http://svn.freebsd.org/changeset/base/207625 Log: Remove clearing RxHashTable2 register. The register is reprogrammed in sge_rxfilter(). Modified: head/sys/dev/sge/if_sge.c Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Tue May 4 17:30:07 2010 (r207624) +++ head/sys/dev/sge/if_sge.c Tue May 4 17:34:00 2010 (r207625) @@ -1577,7 +1577,6 @@ sge_init_locked(struct sge_softc *sc) CSR_WRITE_4(sc, RX_DESC, SGE_ADDR_LO(sc->sge_ldata.sge_rx_paddr)); CSR_WRITE_4(sc, TxMacControl, 0x60); - CSR_WRITE_4(sc, 0x6c, 0); CSR_WRITE_4(sc, RxWakeOnLan, 0); CSR_WRITE_4(sc, RxWakeOnLanData, 0); /* Allow receiving VLAN frames. */ From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:40:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A36AF1065670; Tue, 4 May 2010 17:40:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8838C8FC1E; Tue, 4 May 2010 17:40: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 o44HeONg087570; Tue, 4 May 2010 17:40:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44HeOOj087566; Tue, 4 May 2010 17:40:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005041740.o44HeOOj087566@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 May 2010 17:40: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: r207626 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . 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, 04 May 2010 17:40:24 -0000 Author: mm Date: Tue May 4 17:40:24 2010 New Revision: 207626 URL: http://svn.freebsd.org/changeset/base/207626 Log: Speed up ZFS list operation with objset prefetching. Partial import of OpenSolaris onnv revisions: 8415:8809e849f63e, 10474:0e96dd3b905a PR: kern/146297 Submitted by: myself Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6386929, 6755389, 6847118) MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue May 4 17:34:00 2010 (r207625) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue May 4 17:40:24 2010 (r207626) @@ -1213,6 +1213,39 @@ dmu_objset_find_spa(spa_t *spa, const ch return (err); } +/* ARGSUSED */ +int +dmu_objset_prefetch(char *name, void *arg) +{ + dsl_dataset_t *ds; + + if (dsl_dataset_hold(name, FTAG, &ds)) + return (0); + + if (!BP_IS_HOLE(&ds->ds_phys->ds_bp)) { + mutex_enter(&ds->ds_opening_lock); + if (!dsl_dataset_get_user_ptr(ds)) { + uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; + zbookmark_t zb; + + zb.zb_objset = ds->ds_object; + zb.zb_object = 0; + zb.zb_level = -1; + zb.zb_blkid = 0; + + (void) arc_read_nolock(NULL, dsl_dataset_get_spa(ds), + &ds->ds_phys->ds_bp, NULL, NULL, + ZIO_PRIORITY_ASYNC_READ, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, + &aflags, &zb); + } + mutex_exit(&ds->ds_opening_lock); + } + + dsl_dataset_rele(ds, FTAG); + return (0); +} + void dmu_objset_set_user(objset_t *os, void *user_ptr) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue May 4 17:34:00 2010 (r207625) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue May 4 17:40:24 2010 (r207626) @@ -26,8 +26,6 @@ #ifndef _SYS_DMU_OBJSET_H #define _SYS_DMU_OBJSET_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -118,6 +116,7 @@ int dmu_objset_find(char *name, int func int flags); int dmu_objset_find_spa(spa_t *spa, const char *name, int func(spa_t *, uint64_t, const char *, void *), void *arg, int flags); +int dmu_objset_prefetch(char *name, void *arg); void dmu_objset_byteswap(void *buf, size_t size); int dmu_objset_evict_dbufs(objset_t *os); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 4 17:34:00 2010 (r207625) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 4 17:40:24 2010 (r207626) @@ -1349,6 +1349,14 @@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc) (void) strlcat(zc->zc_name, "/", sizeof (zc->zc_name)); p = zc->zc_name + strlen(zc->zc_name); + if (zc->zc_cookie == 0) { + uint64_t cookie = 0; + int len = sizeof (zc->zc_name) - (p - zc->zc_name); + + while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0) + dmu_objset_prefetch(p, NULL); + } + do { error = dmu_dir_list_next(os, sizeof (zc->zc_name) - (p - zc->zc_name), p, @@ -1387,6 +1395,9 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc objset_t *os; int error; + if (zc->zc_cookie == 0) + dmu_objset_find(zc->zc_name, dmu_objset_prefetch, + NULL, DS_FIND_SNAPSHOTS); error = dmu_objset_open(zc->zc_name, DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os); if (error) From owner-svn-src-all@FreeBSD.ORG Tue May 4 17:44:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4C8E1065672; Tue, 4 May 2010 17:44:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B41148FC0C; Tue, 4 May 2010 17:44: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 o44HieIv088583; Tue, 4 May 2010 17:44:40 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44HieS4088581; Tue, 4 May 2010 17:44:40 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005041744.o44HieS4088581@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 May 2010 17:44: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: r207627 - head/cddl/contrib/opensolaris/cmd/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, 04 May 2010 17:44:40 -0000 Author: mm Date: Tue May 4 17:44:40 2010 New Revision: 207627 URL: http://svn.freebsd.org/changeset/base/207627 Log: Enable "zfs list" to list explicitly requested snapshots. Partial import of OpenSolaris onnv revision: 8415:8809e849f63e PR: kern/146297 Submitted by: myself Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6758338) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue May 4 17:40:24 2010 (r207626) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue May 4 17:44:40 2010 (r207627) @@ -1790,7 +1790,7 @@ zfs_do_list(int argc, char **argv) boolean_t scripted = B_FALSE; static char default_fields[] = "name,used,available,referenced,mountpoint"; - int types = ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME; + int types = ZFS_TYPE_DATASET; boolean_t types_specified = B_FALSE; char *fields = NULL; list_cbdata_t cb = { 0 }; From owner-svn-src-all@FreeBSD.ORG Tue May 4 19:04:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00975106566B; Tue, 4 May 2010 19:04:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E35838FC12; Tue, 4 May 2010 19:04: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 o44J4pI3006445; Tue, 4 May 2010 19:04:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44J4pFA006442; Tue, 4 May 2010 19:04:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005041904.o44J4pFA006442@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 May 2010 19:04: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: r207628 - head/sys/dev/sge 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, 04 May 2010 19:04:52 -0000 Author: yongari Date: Tue May 4 19:04:51 2010 New Revision: 207628 URL: http://svn.freebsd.org/changeset/base/207628 Log: Enable multi-descriptor transmisstion for fragmented mbufs. There is no more need to defragment mbufs. After transmitting the multi-fragmented frame, the controller updates only the first descriptor of multi-descriptor transmission so it's driver's responsibility to clear OWN bits of remaining descriptor of multi-descriptor transmission. It seems the controller behaves much like jme(4) controllers in descriptor handling. Tested by: xclin cs dot nctu dot edu dot tw > Modified: head/sys/dev/sge/if_sge.c head/sys/dev/sge/if_sgereg.h Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Tue May 4 17:44:40 2010 (r207627) +++ head/sys/dev/sge/if_sge.c Tue May 4 19:04:51 2010 (r207628) @@ -756,6 +756,8 @@ sge_dma_alloc(struct sge_softc *sc) { struct sge_chain_data *cd; struct sge_list_data *ld; + struct sge_rxdesc *rxd; + struct sge_txdesc *txd; int error, i; cd = &sc->sge_cdata; @@ -869,8 +871,12 @@ sge_dma_alloc(struct sge_softc *sc) /* Create DMA maps for Tx buffers. */ for (i = 0; i < SGE_TX_RING_CNT; i++) { + txd = &cd->sge_txdesc[i]; + txd->tx_m = NULL; + txd->tx_dmamap = NULL; + txd->tx_ndesc = 0; error = bus_dmamap_create(cd->sge_txmbuf_tag, 0, - &cd->sge_tx_map[i]); + &txd->tx_dmamap); if (error != 0) { device_printf(sc->sge_dev, "could not create Tx DMA map.\n"); @@ -886,8 +892,11 @@ sge_dma_alloc(struct sge_softc *sc) } /* Create DMA maps for Rx buffers. */ for (i = 0; i < SGE_RX_RING_CNT; i++) { + rxd = &cd->sge_rxdesc[i]; + rxd->rx_m = NULL; + rxd->rx_dmamap = NULL; error = bus_dmamap_create(cd->sge_rxmbuf_tag, 0, - &cd->sge_rx_map[i]); + &rxd->rx_dmamap); if (error) { device_printf(sc->sge_dev, "could not create Rx DMA map.\n"); @@ -903,6 +912,8 @@ sge_dma_free(struct sge_softc *sc) { struct sge_chain_data *cd; struct sge_list_data *ld; + struct sge_rxdesc *rxd; + struct sge_txdesc *txd; int i; cd = &sc->sge_cdata; @@ -934,10 +945,11 @@ sge_dma_free(struct sge_softc *sc) /* Rx buffers. */ if (cd->sge_rxmbuf_tag != NULL) { for (i = 0; i < SGE_RX_RING_CNT; i++) { - if (cd->sge_rx_map[i] != NULL) { + rxd = &cd->sge_rxdesc[i]; + if (rxd->rx_dmamap != NULL) { bus_dmamap_destroy(cd->sge_rxmbuf_tag, - cd->sge_rx_map[i]); - cd->sge_rx_map[i] = NULL; + rxd->rx_dmamap); + rxd->rx_dmamap = NULL; } } if (cd->sge_rx_spare_map != NULL) { @@ -951,10 +963,11 @@ sge_dma_free(struct sge_softc *sc) /* Tx buffers. */ if (cd->sge_txmbuf_tag != NULL) { for (i = 0; i < SGE_TX_RING_CNT; i++) { - if (cd->sge_tx_map[i] != NULL) { + txd = &cd->sge_txdesc[i]; + if (txd->tx_dmamap != NULL) { bus_dmamap_destroy(cd->sge_txmbuf_tag, - cd->sge_tx_map[i]); - cd->sge_tx_map[i] = NULL; + txd->tx_dmamap); + txd->tx_dmamap = NULL; } } bus_dma_tag_destroy(cd->sge_txmbuf_tag); @@ -991,18 +1004,20 @@ static int sge_list_tx_free(struct sge_softc *sc) { struct sge_chain_data *cd; + struct sge_txdesc *txd; int i; SGE_LOCK_ASSERT(sc); cd = &sc->sge_cdata; for (i = 0; i < SGE_TX_RING_CNT; i++) { - if (cd->sge_tx_mbuf[i] != NULL) { - bus_dmamap_sync(cd->sge_txmbuf_tag, - cd->sge_tx_map[i], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(cd->sge_txmbuf_tag, - cd->sge_tx_map[i]); - m_free(cd->sge_tx_mbuf[i]); - cd->sge_tx_mbuf[i] = NULL; + txd = &cd->sge_txdesc[i]; + if (txd->tx_m != NULL) { + bus_dmamap_sync(cd->sge_txmbuf_tag, txd->tx_dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(cd->sge_txmbuf_tag, txd->tx_dmamap); + m_free(txd->tx_m); + txd->tx_m = NULL; + txd->tx_ndesc = 0; } } @@ -1037,18 +1052,20 @@ static int sge_list_rx_free(struct sge_softc *sc) { struct sge_chain_data *cd; + struct sge_rxdesc *rxd; int i; SGE_LOCK_ASSERT(sc); cd = &sc->sge_cdata; for (i = 0; i < SGE_RX_RING_CNT; i++) { - if (cd->sge_rx_mbuf[i] != NULL) { - bus_dmamap_sync(cd->sge_rxmbuf_tag, cd->sge_rx_map[i], + rxd = &cd->sge_rxdesc[i]; + if (rxd->rx_m != NULL) { + bus_dmamap_sync(cd->sge_rxmbuf_tag, rxd->rx_dmamap, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(cd->sge_rxmbuf_tag, - cd->sge_rx_map[i]); - m_free(cd->sge_rx_mbuf[i]); - cd->sge_rx_mbuf[i] = NULL; + rxd->rx_dmamap); + m_free(rxd->rx_m); + rxd->rx_m = NULL; } } return (0); @@ -1063,6 +1080,7 @@ sge_newbuf(struct sge_softc *sc, int pro struct mbuf *m; struct sge_desc *desc; struct sge_chain_data *cd; + struct sge_rxdesc *rxd; bus_dma_segment_t segs[1]; bus_dmamap_t map; int error, nsegs; @@ -1082,17 +1100,18 @@ sge_newbuf(struct sge_softc *sc, int pro return (error); } KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); - if (cd->sge_rx_mbuf[prod] != NULL) { - bus_dmamap_sync(cd->sge_rxmbuf_tag, cd->sge_rx_map[prod], + rxd = &cd->sge_rxdesc[prod]; + if (rxd->rx_m != NULL) { + bus_dmamap_sync(cd->sge_rxmbuf_tag, rxd->rx_dmamap, BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(cd->sge_rxmbuf_tag, cd->sge_rx_map[prod]); + bus_dmamap_unload(cd->sge_rxmbuf_tag, rxd->rx_dmamap); } - map = cd->sge_rx_map[prod]; - cd->sge_rx_map[prod] = cd->sge_rx_spare_map; + map = rxd->rx_dmamap; + rxd->rx_dmamap = cd->sge_rx_spare_map; cd->sge_rx_spare_map = map; - bus_dmamap_sync(cd->sge_rxmbuf_tag, cd->sge_rx_map[prod], + bus_dmamap_sync(cd->sge_rxmbuf_tag, rxd->rx_dmamap, BUS_DMASYNC_PREREAD); - cd->sge_rx_mbuf[prod] = m; + rxd->rx_m = m; desc = &sc->sge_ldata.sge_rx_ring[prod]; desc->sge_sts_size = 0; @@ -1178,7 +1197,7 @@ sge_rxeof(struct sge_softc *sc) ifp->if_ierrors++; continue; } - m = cd->sge_rx_mbuf[cons]; + m = cd->sge_rxdesc[cons].rx_m; if (sge_newbuf(sc, cons) != 0) { sge_discard_rxbuf(sc, cons); ifp->if_iqdrops++; @@ -1245,8 +1264,9 @@ sge_txeof(struct sge_softc *sc) struct ifnet *ifp; struct sge_list_data *ld; struct sge_chain_data *cd; + struct sge_txdesc *txd; uint32_t txstat; - int cons, prod; + int cons, nsegs, prod; SGE_LOCK_ASSERT(sc); @@ -1260,33 +1280,47 @@ sge_txeof(struct sge_softc *sc) BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); cons = cd->sge_tx_cons; prod = cd->sge_tx_prod; - for (; cons != prod; SGE_INC(cons, SGE_TX_RING_CNT)) { + for (; cons != prod;) { txstat = le32toh(ld->sge_tx_ring[cons].sge_cmdsts); if ((txstat & TDC_OWN) != 0) break; - cd->sge_tx_cnt--; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - if (cd->sge_tx_mbuf[cons] != NULL) { - bus_dmamap_sync(cd->sge_txmbuf_tag, - cd->sge_tx_map[cons], BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(cd->sge_txmbuf_tag, - cd->sge_tx_map[cons]); - m_freem(cd->sge_tx_mbuf[cons]); - cd->sge_tx_mbuf[cons] = NULL; - if (SGE_TX_ERROR(txstat) != 0) { + /* + * Only the first descriptor of multi-descriptor transmission + * is updated by controller. Driver should skip entire + * chained buffers for the transmitted frame. In other words + * TDC_OWN bit is valid only at the first descriptor of a + * multi-descriptor transmission. + */ + if (SGE_TX_ERROR(txstat) != 0) { #ifdef SGE_SHOW_ERRORS - device_printf(sc->sge_dev, "Tx error : 0x%b\n", - txstat, TX_ERR_BITS); + device_printf(sc->sge_dev, "Tx error : 0x%b\n", + txstat, TX_ERR_BITS); #endif - ifp->if_oerrors++; - } else { + ifp->if_oerrors++; + } else { #ifdef notyet - ifp->if_collisions += (txstat & 0xFFFF) - 1; + ifp->if_collisions += (txstat & 0xFFFF) - 1; #endif - ifp->if_opackets++; - } + ifp->if_opackets++; } - + txd = &cd->sge_txdesc[cons]; + for (nsegs = 0; nsegs < txd->tx_ndesc; nsegs++) { + ld->sge_tx_ring[cons].sge_cmdsts = 0; + SGE_INC(cons, SGE_TX_RING_CNT); + } + /* Reclaim transmitted mbuf. */ + KASSERT(txd->tx_m != NULL, + ("%s: freeing NULL mbuf\n", __func__)); + bus_dmamap_sync(cd->sge_txmbuf_tag, txd->tx_dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(cd->sge_txmbuf_tag, txd->tx_dmamap); + m_freem(txd->tx_m); + txd->tx_m = NULL; + cd->sge_tx_cnt -= txd->tx_ndesc; + KASSERT(cd->sge_tx_cnt >= 0, + ("%s: Active Tx desc counter was garbled\n", __func__)); + txd->tx_ndesc = 0; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } cd->sge_tx_cons = cons; if (cd->sge_tx_cnt == 0) @@ -1388,73 +1422,78 @@ sge_encap(struct sge_softc *sc, struct m { struct mbuf *m; struct sge_desc *desc; + struct sge_txdesc *txd; bus_dma_segment_t txsegs[SGE_MAXTXSEGS]; - bus_dmamap_t map; uint32_t cflags; - int error, nsegs, prod; + int error, i, nsegs, prod, si; SGE_LOCK_ASSERT(sc); - prod = sc->sge_cdata.sge_tx_prod; - map = sc->sge_cdata.sge_tx_map[prod]; - /* - * Reading Windows inf file indicates SiS controller supports - * TSO, VLAN hardware tag insertion/stripping, interrupt - * moderation and Tx/Rx checksum offloading. Unfortunately - * vendor didn't release these information so we're guessing - * descriptor usage with trial and errors. - * - * Controller seems to support multi-fragmented buffers but - * don't know how to enable that feature so limit number of - * fragmented Tx buffers to single buffer until we understand - * the controller internals. - * I assume the controller can pad zero bytes if frame length - * is less than 60 bytes and I also think the controller has - * no Tx buffer alignment limitation. - Need testing! - */ - if ((*m_head)->m_next != NULL) { - m = m_defrag(*m_head, M_DONTWAIT); + si = prod = sc->sge_cdata.sge_tx_prod; + txd = &sc->sge_cdata.sge_txdesc[prod]; + error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, + txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); + if (error == EFBIG) { + m = m_collapse(*m_head, M_DONTWAIT, SGE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; return (ENOBUFS); } *m_head = m; - } - error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, map, - *m_head, txsegs, &nsegs, 0); - if (error != 0) { - m_freem(*m_head); - *m_head = NULL; + error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, + txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); + if (error != 0) { + m_freem(*m_head); + *m_head = NULL; + return (error); + } + } else if (error != 0) return (error); - } + + KASSERT(nsegs != 0, ("zero segment returned")); /* Check descriptor overrun. */ if (sc->sge_cdata.sge_tx_cnt + nsegs >= SGE_TX_RING_CNT) { - bus_dmamap_unload(sc->sge_cdata.sge_txmbuf_tag, map); + bus_dmamap_unload(sc->sge_cdata.sge_txmbuf_tag, txd->tx_dmamap); return (ENOBUFS); } - bus_dmamap_sync(sc->sge_cdata.sge_txmbuf_tag, map, + bus_dmamap_sync(sc->sge_cdata.sge_txmbuf_tag, txd->tx_dmamap, BUS_DMASYNC_PREWRITE); + m = *m_head; cflags = 0; - if ((*m_head)->m_pkthdr.csum_flags & CSUM_IP) + if (m->m_pkthdr.csum_flags & CSUM_IP) cflags |= TDC_IP_CSUM; - if ((*m_head)->m_pkthdr.csum_flags & CSUM_TCP) + if (m->m_pkthdr.csum_flags & CSUM_TCP) cflags |= TDC_TCP_CSUM; - if ((*m_head)->m_pkthdr.csum_flags & CSUM_UDP) + if (m->m_pkthdr.csum_flags & CSUM_UDP) cflags |= TDC_UDP_CSUM; - desc = &sc->sge_ldata.sge_tx_ring[prod]; - desc->sge_sts_size = htole32((*m_head)->m_pkthdr.len); - desc->sge_ptr = htole32(SGE_ADDR_LO(txsegs[0].ds_addr)); - desc->sge_flags = htole32(txsegs[0].ds_len); - if (prod == SGE_TX_RING_CNT - 1) - desc->sge_flags |= htole32(RING_END); + for (i = 0; i < nsegs; i++) { + desc = &sc->sge_ldata.sge_tx_ring[prod]; + if (i == 0) { + desc->sge_sts_size = htole32(m->m_pkthdr.len); + desc->sge_cmdsts = 0; + } else { + desc->sge_sts_size = 0; + desc->sge_cmdsts = htole32(TDC_OWN); + } + desc->sge_ptr = htole32(SGE_ADDR_LO(txsegs[i].ds_addr)); + desc->sge_flags = htole32(txsegs[i].ds_len); + if (prod == SGE_TX_RING_CNT - 1) + desc->sge_flags |= htole32(RING_END); + sc->sge_cdata.sge_tx_cnt++; + SGE_INC(prod, SGE_TX_RING_CNT); + } + /* Update producer index. */ + sc->sge_cdata.sge_tx_prod = prod; + + desc = &sc->sge_ldata.sge_tx_ring[si]; /* Configure VLAN. */ - if(((*m_head)->m_flags & M_VLANTAG) != 0) { - cflags |= (*m_head)->m_pkthdr.ether_vtag; + if((m->m_flags & M_VLANTAG) != 0) { + cflags |= m->m_pkthdr.ether_vtag; desc->sge_sts_size |= htole32(TDS_INS_VLAN); } - desc->sge_cmdsts = htole32(TDC_DEF | TDC_CRC | TDC_PAD | cflags); + desc->sge_cmdsts |= htole32(TDC_DEF | TDC_CRC | TDC_PAD | cflags); #if 1 if ((sc->sge_flags & SGE_FLAG_SPEED_1000) != 0) desc->sge_cmdsts |= htole32(TDC_BST); @@ -1466,13 +1505,9 @@ sge_encap(struct sge_softc *sc, struct m } #endif /* Request interrupt and give ownership to controller. */ - if ((prod % SGE_TX_INTR_FRAMES) == 0) - desc->sge_cmdsts |= htole32(TDC_OWN | TDC_INTR); - else - desc->sge_cmdsts |= htole32(TDC_OWN); - sc->sge_cdata.sge_tx_mbuf[prod] = *m_head; - sc->sge_cdata.sge_tx_cnt++; - SGE_INC(sc->sge_cdata.sge_tx_prod, SGE_TX_RING_CNT); + desc->sge_cmdsts |= htole32(TDC_OWN | TDC_INTR); + txd->tx_m = m; + txd->tx_ndesc = nsegs; return (0); } @@ -1503,7 +1538,8 @@ sge_start_locked(struct ifnet *ifp) return; for (queued = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd); ) { - if (sc->sge_cdata.sge_tx_cnt == SGE_TX_RING_CNT - 1) { + if (sc->sge_cdata.sge_tx_cnt > (SGE_TX_RING_CNT - + SGE_MAXTXSEGS)) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } Modified: head/sys/dev/sge/if_sgereg.h ============================================================================== --- head/sys/dev/sge/if_sgereg.h Tue May 4 17:44:40 2010 (r207627) +++ head/sys/dev/sge/if_sgereg.h Tue May 4 19:04:51 2010 (r207628) @@ -283,7 +283,7 @@ struct sge_desc { #define SGE_RX_RING_CNT 256 /* [8, 1024] */ #define SGE_TX_RING_CNT 256 /* [8, 8192] */ #define SGE_DESC_ALIGN 16 -#define SGE_MAXTXSEGS 1 +#define SGE_MAXTXSEGS 16 #define SGE_RX_BUF_ALIGN sizeof(uint64_t) #define SGE_RX_RING_SZ (SGE_RX_RING_CNT * sizeof(struct sge_desc)) @@ -298,6 +298,17 @@ struct sge_list_data { bus_addr_t sge_tx_paddr; }; +struct sge_txdesc { + struct mbuf *tx_m; + bus_dmamap_t tx_dmamap; + int tx_ndesc; +}; + +struct sge_rxdesc { + struct mbuf *rx_m; + bus_dmamap_t rx_dmamap; +}; + struct sge_chain_data { bus_dma_tag_t sge_tag; bus_dma_tag_t sge_rx_tag; @@ -306,11 +317,9 @@ struct sge_chain_data { bus_dmamap_t sge_tx_dmamap; bus_dma_tag_t sge_txmbuf_tag; bus_dma_tag_t sge_rxmbuf_tag; - struct mbuf *sge_rx_mbuf[SGE_RX_RING_CNT]; - struct mbuf *sge_tx_mbuf[SGE_TX_RING_CNT]; - bus_dmamap_t sge_rx_map[SGE_RX_RING_CNT]; + struct sge_txdesc sge_txdesc[SGE_TX_RING_CNT]; + struct sge_rxdesc sge_rxdesc[SGE_RX_RING_CNT]; bus_dmamap_t sge_rx_spare_map; - bus_dmamap_t sge_tx_map[SGE_TX_RING_CNT]; int sge_rx_cons; int sge_tx_prod; int sge_tx_cons; From owner-svn-src-all@FreeBSD.ORG Tue May 4 19:18:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CCE61065670; Tue, 4 May 2010 19:18:01 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EE4458FC25; Tue, 4 May 2010 19:18: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 o44JI0tS009326; Tue, 4 May 2010 19:18:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44JI0xh009322; Tue, 4 May 2010 19:18:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005041918.o44JI0xh009322@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 19:18:00 +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: r207629 - stable/8/usr.bin/unzip 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, 04 May 2010 19:18:01 -0000 Author: delphij Date: Tue May 4 19:18:00 2010 New Revision: 207629 URL: http://svn.freebsd.org/changeset/base/207629 Log: MFC r196981, r200844, r201630, r203977, r203978, r204352: r196981 (rdivacky): Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups. Obtained from: NetBSD r200844 (jh): Don't print the archive name with -p and -q options. PR: bin/141280 r201630 (kientzle): When restoring files, use the mode for the mode. Thanks to: Jun Kuriyama for pointing this out r203977 (gavin): Implement the rename query, for when a file with the same name as the one about to be extracted already exists. The question, and interpretation of the response is deliberately compatible with Info-Zip. This change was originally obtained from NetBSD, but has three changes: - better compatibility with Info-Zip in the handling of ^D - Use getdelim() rather than getline() - bug fix: != changed to == in the "file rename" code I suspect the latter is also a bug in NetBSD, but I can't easily confirm this. PR: bin/143307 Reviewed by: rdivacky (change to unzip.c only) Obtained from: NetBSD src/usr.bin/unzip/unzip.c 1.8 r203978 (gavin): Bump .Dd for r203977 r204352 (ru): Fixed static linkage. == Requested by: Alex Kozlov Modified: stable/8/usr.bin/unzip/Makefile stable/8/usr.bin/unzip/unzip.1 stable/8/usr.bin/unzip/unzip.c Directory Properties: stable/8/usr.bin/unzip/ (props changed) Modified: stable/8/usr.bin/unzip/Makefile ============================================================================== --- stable/8/usr.bin/unzip/Makefile Tue May 4 19:04:51 2010 (r207628) +++ stable/8/usr.bin/unzip/Makefile Tue May 4 19:18:00 2010 (r207629) @@ -3,7 +3,7 @@ PROG = unzip WARNS ?= 6 CSTD = c99 -DPADD = ${LIBARCHIVE} -LDADD = -larchive +DPADD = ${LIBARCHIVE} ${LIBZ} +LDADD = -larchive -lz .include Modified: stable/8/usr.bin/unzip/unzip.1 ============================================================================== --- stable/8/usr.bin/unzip/unzip.1 Tue May 4 19:04:51 2010 (r207628) +++ stable/8/usr.bin/unzip/unzip.1 Tue May 4 19:18:00 2010 (r207629) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2008 +.Dd February 16, 2010 .Dt UNZIP 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd extract files from a ZIP archive .Sh SYNOPSIS .Nm -.Op Fl ajLlnoqtu +.Op Fl aCcfjLlnopqtuv .Op Fl d Ar dir .Ar zipfile .Sh DESCRIPTION @@ -44,9 +44,22 @@ The following options are available: .It Fl a When extracting a text file, convert DOS-style line endings to Unix-style line endings. +.It Fl C +Match file names case-insensitively. +.It Fl c +Extract to stdout/screen. +When extracting files from the zipfile, they are written to stdout. +This is similar to +.Fl p , +but doesn't suppress normal output. .It Fl d Ar dir Extract files into the specified directory rather than the current directory. +.It Fl f +Update existing. +Extract only files from the zipfile if a file with the same name +already exists on disk and is older than the former. +Otherwise, the file is silently skipped. .It Fl j Ignore directories stored in the zipfile; instead, extract all files directly into the extraction directory. @@ -56,13 +69,19 @@ Convert the names of the extracted files List, rather than extract, the contents of the zipfile. .It Fl n No overwrite. -When extacting a file from the zipfile, if a file with the same name +When extracting a file from the zipfile, if a file with the same name already exists on disk, the file is silently skipped. .It Fl o Overwrite. -When extacting a file from the zipfile, if a file with the same name +When extracting a file from the zipfile, if a file with the same name already exists on disk, the existing file is replaced with the file from the zipfile. +.It Fl p +Extract to stdout. +When extracting files from the zipfile, they are written to stdout. +The normal output is suppressed as if +.Fl q +was specified. .It Fl q Quiet: print less information while extracting. .It Fl t @@ -70,15 +89,25 @@ Test: do not extract anything, but verif in the archive. .It Fl u Update. -When extacting a file from the zipfile, if a file with the same name +When extracting a file from the zipfile, if a file with the same name already exists on disk, the existing file is replaced with the file from the zipfile if and only if the latter is newer than the former. Otherwise, the file is silently skipped. +.It Fl v +List verbosely, rather than extract, the contents of the zipfile. +This differs from +.Fl l +by using the long listing. +Note that most of the data is currently fake and does not reflect the +content of the archive. +.It Fl x Ar pattern +Exclude files matching the pattern +.Ar pattern . .El .Pp Note that only one of .Fl n , -.Fl o +.Fl o , and .Fl u may be specified. @@ -129,17 +158,6 @@ utility is only able to process ZIP arch Depending on the installed version of .Xr libarchive , this may or may not include self-extracting archives. -.Sh BUGS -The -.Nm -utility currently does not support asking the user whether to -overwrite or skip a file that already exists on disk. -To be on the safe side, it will fail if it encounters a file that -already exists and neither the -.Fl n -nor the -.Fl o -command line option was specified. .Sh SEE ALSO .Xr libarchive 3 .Sh HISTORY Modified: stable/8/usr.bin/unzip/unzip.c ============================================================================== --- stable/8/usr.bin/unzip/unzip.c Tue May 4 19:04:51 2010 (r207628) +++ stable/8/usr.bin/unzip/unzip.c Tue May 4 19:18:00 2010 (r207629) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009 Joerg Sonnenberger * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav * All rights reserved. * @@ -51,15 +52,19 @@ /* command-line options */ static int a_opt; /* convert EOL */ +static int C_opt; /* match case-insensitively */ +static int c_opt; /* extract to stdout */ static const char *d_arg; /* directory */ +static int f_opt; /* update existing files only */ static int j_opt; /* junk directories */ static int L_opt; /* lowercase names */ -static int l_opt; /* list */ static int n_opt; /* never overwrite */ static int o_opt; /* always overwrite */ +static int p_opt; /* extract to stdout, quiet */ static int q_opt; /* quiet */ static int t_opt; /* test */ static int u_opt; /* update */ +static int v_opt; /* verbose/list */ /* time when unzip started */ static time_t now; @@ -70,9 +75,6 @@ static int unzip_debug; /* running on tty? */ static int tty; -/* error flag for -t */ -static int test_failed; - /* convenience macro */ /* XXX should differentiate between ARCHIVE_{WARN,FAIL,RETRY} */ #define ac(call) \ @@ -162,7 +164,6 @@ static void info(const char *fmt, ...) { va_list ap; - int i; if (q_opt && !unzip_debug) return; @@ -171,9 +172,10 @@ info(const char *fmt, ...) va_end(ap); fflush(stdout); - for (i = 0; fmt[i] != '\0'; ++i) - /* nothing */ ; - noeol = !(i && fmt[i - 1] == '\n'); + if (*fmt == '\0') + noeol = 1; + else + noeol = fmt[strlen(fmt) - 1] != '\n'; } /* debug message (if unzip_debug) */ @@ -181,7 +183,6 @@ static void debug(const char *fmt, ...) { va_list ap; - int i; if (!unzip_debug) return; @@ -190,9 +191,10 @@ debug(const char *fmt, ...) va_end(ap); fflush(stderr); - for (i = 0; fmt[i] != '\0'; ++i) - /* nothing */ ; - noeol = !(i && fmt[i - 1] == '\n'); + if (*fmt == '\0') + noeol = 1; + else + noeol = fmt[strlen(fmt) - 1] != '\n'; } /* duplicate a path name, possibly converting to lower case */ @@ -200,7 +202,7 @@ static char * pathdup(const char *path) { char *str; - int len; + size_t i, len; len = strlen(path); while (len && path[len - 1] == '/') @@ -209,8 +211,12 @@ pathdup(const char *path) errno = ENOMEM; error("malloc()"); } - for (int i = 0; i < len; ++i) - str[i] = L_opt ? tolower(path[i]) : path[i]; + if (L_opt) { + for (i = 0; i < len; ++i) + str[i] = tolower((unsigned char)path[i]); + } else { + memcpy(str, path, len); + } str[len] = '\0'; return (str); @@ -221,7 +227,7 @@ static char * pathcat(const char *prefix, const char *path) { char *str; - int prelen, len; + size_t prelen, len; prelen = prefix ? strlen(prefix) + 1 : 0; len = strlen(path) + 1; @@ -257,7 +263,7 @@ static void add_pattern(struct pattern_list *list, const char *pattern) { struct pattern *entry; - int len; + size_t len; debug("adding pattern '%s'\n", pattern); len = strlen(pattern); @@ -265,7 +271,6 @@ add_pattern(struct pattern_list *list, c errno = ENOMEM; error("malloc()"); } - memset(&entry->link, 0, sizeof entry->link); memcpy(entry->pattern, pattern, len + 1); STAILQ_INSERT_TAIL(list, entry, link); } @@ -279,7 +284,7 @@ match_pattern(struct pattern_list *list, struct pattern *entry; STAILQ_FOREACH(entry, list, link) { - if (fnmatch(entry->pattern, str, 0) == 0) + if (fnmatch(entry->pattern, str, C_opt ? FNM_CASEFOLD : 0) == 0) return (1); } return (0); @@ -378,7 +383,7 @@ extract_dir(struct archive *a, struct ar { int mode; - mode = archive_entry_filetype(e) & 0777; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0755; @@ -406,49 +411,104 @@ extract_dir(struct archive *a, struct ar static unsigned char buffer[8192]; static char spinner[] = { '|', '/', '-', '\\' }; +static int +handle_existing_file(char **path) +{ + size_t alen; + ssize_t len; + char buf[4]; + + for (;;) { + fprintf(stderr, + "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", + *path); + if (fgets(buf, sizeof(buf), stdin) == 0) { + clearerr(stdin); + printf("NULL\n(EOF or read error, " + "treating as \"[N]one\"...)\n"); + n_opt = 1; + return -1; + } + switch (*buf) { + case 'A': + o_opt = 1; + /* FALLTHROUGH */ + case 'y': + case 'Y': + (void)unlink(*path); + return 1; + case 'N': + n_opt = 1; + /* FALLTHROUGH */ + case 'n': + return -1; + case 'r': + case 'R': + printf("New name: "); + fflush(stdout); + free(*path); + *path = NULL; + alen = 0; + len = getdelim(path, &alen, '\n', stdin); + if ((*path)[len - 1] == '\n') + (*path)[len - 1] = '\0'; + return 0; + default: + break; + } + } +} + /* * Extract a regular file. */ static void -extract_file(struct archive *a, struct archive_entry *e, const char *path) +extract_file(struct archive *a, struct archive_entry *e, char **path) { int mode; time_t mtime; struct stat sb; struct timeval tv[2]; - int cr, fd, text, warn; + int cr, fd, text, warn, check; ssize_t len; unsigned char *p, *q, *end; - mode = archive_entry_filetype(e) & 0777; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0644; mtime = archive_entry_mtime(e); /* look for existing file of same name */ - if (lstat(path, &sb) == 0) { - if (u_opt) { +recheck: + if (lstat(*path, &sb) == 0) { + if (u_opt || f_opt) { /* check if up-to-date */ - if (S_ISREG(sb.st_mode) && sb.st_mtime > mtime) + if (S_ISREG(sb.st_mode) && sb.st_mtime >= mtime) return; - (void)unlink(path); + (void)unlink(*path); } else if (o_opt) { /* overwrite */ - (void)unlink(path); + (void)unlink(*path); } else if (n_opt) { /* do not overwrite */ return; } else { - /* XXX ask user */ - errorx("not implemented"); + check = handle_existing_file(path); + if (check == 0) + goto recheck; + if (check == -1) + return; /* do not overwrite */ } + } else { + if (f_opt) + return; } - if ((fd = open(path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) - error("open('%s')", path); + if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) + error("open('%s')", *path); /* loop over file contents and write to disk */ - info("x %s", path); + info(" extracting: %s", *path); text = a_opt; warn = 0; cr = 0; @@ -465,7 +525,7 @@ extract_file(struct archive *a, struct a if (a_opt && cr) { if (len == 0 || buffer[0] != '\n') if (write(fd, "\r", 1) != 1) - error("write('%s')", path); + error("write('%s')", *path); cr = 0; } @@ -496,7 +556,7 @@ extract_file(struct archive *a, struct a /* simple case */ if (!a_opt || !text) { if (write(fd, buffer, len) != len) - error("write('%s')", path); + error("write('%s')", *path); continue; } @@ -506,7 +566,7 @@ extract_file(struct archive *a, struct a if (!warn && !isascii(*q)) { warningx("%s may be corrupted due" " to weak text file detection" - " heuristic", path); + " heuristic", *path); warn = 1; } if (q[0] != '\r') @@ -519,7 +579,7 @@ extract_file(struct archive *a, struct a break; } if (write(fd, p, q - p) != q - p) - error("write('%s')", path); + error("write('%s')", *path); } } if (tty) @@ -534,9 +594,9 @@ extract_file(struct archive *a, struct a tv[1].tv_sec = mtime; tv[1].tv_usec = 0; if (futimes(fd, tv) != 0) - error("utimes('%s')", path); + error("utimes('%s')", *path); if (close(fd) != 0) - error("close('%s')", path); + error("close('%s')", *path); } /* @@ -612,46 +672,178 @@ extract(struct archive *a, struct archiv if (S_ISDIR(filetype)) extract_dir(a, e, realpathname); else - extract_file(a, e, realpathname); + extract_file(a, e, &realpathname); free(realpathname); free(pathname); } +static void +extract_stdout(struct archive *a, struct archive_entry *e) +{ + char *pathname; + mode_t filetype; + int cr, text, warn; + ssize_t len; + unsigned char *p, *q, *end; + + pathname = pathdup(archive_entry_pathname(e)); + filetype = archive_entry_filetype(e); + + /* I don't think this can happen in a zipfile.. */ + if (!S_ISDIR(filetype) && !S_ISREG(filetype)) { + warningx("skipping non-regular entry '%s'", pathname); + ac(archive_read_data_skip(a)); + free(pathname); + return; + } + + /* skip directories in -j case */ + if (S_ISDIR(filetype)) { + ac(archive_read_data_skip(a)); + free(pathname); + return; + } + + /* apply include / exclude patterns */ + if (!accept_pathname(pathname)) { + ac(archive_read_data_skip(a)); + free(pathname); + return; + } + + if (c_opt) + info("x %s\n", pathname); + + text = a_opt; + warn = 0; + cr = 0; + for (int n = 0; ; n++) { + len = archive_read_data(a, buffer, sizeof buffer); + + if (len < 0) + ac(len); + + /* left over CR from previous buffer */ + if (a_opt && cr) { + if (len == 0 || buffer[0] != '\n') { + if (fwrite("\r", 1, 1, stderr) != 1) + error("write('%s')", pathname); + } + cr = 0; + } + + /* EOF */ + if (len == 0) + break; + end = buffer + len; + + /* + * Detect whether this is a text file. The correct way to + * do this is to check the least significant bit of the + * "internal file attributes" field of the corresponding + * file header in the central directory, but libarchive + * does not read the central directory, so we have to + * guess by looking for non-ASCII characters in the + * buffer. Hopefully we won't guess wrong. If we do + * guess wrong, we print a warning message later. + */ + if (a_opt && n == 0) { + for (p = buffer; p < end; ++p) { + if (!isascii((unsigned char)*p)) { + text = 0; + break; + } + } + } + + /* simple case */ + if (!a_opt || !text) { + if (fwrite(buffer, 1, len, stdout) != (size_t)len) + error("write('%s')", pathname); + continue; + } + + /* hard case: convert \r\n to \n (sigh...) */ + for (p = buffer; p < end; p = q + 1) { + for (q = p; q < end; q++) { + if (!warn && !isascii(*q)) { + warningx("%s may be corrupted due" + " to weak text file detection" + " heuristic", pathname); + warn = 1; + } + if (q[0] != '\r') + continue; + if (&q[1] == end) { + cr = 1; + break; + } + if (q[1] == '\n') + break; + } + if (fwrite(p, 1, q - p, stdout) != (size_t)(q - p)) + error("write('%s')", pathname); + } + } + + free(pathname); +} + /* * Print the name of an entry to stdout. */ static void list(struct archive *a, struct archive_entry *e) { + char buf[20]; + time_t mtime; - printf("%s\n", archive_entry_pathname(e)); + mtime = archive_entry_mtime(e); + strftime(buf, sizeof(buf), "%m-%d-%g %R", localtime(&mtime)); + + if (v_opt == 1) { + printf(" %8ju %s %s\n", + (uintmax_t)archive_entry_size(e), + buf, archive_entry_pathname(e)); + } else if (v_opt == 2) { + printf("%8ju Stored %7ju 0%% %s %08x %s\n", + (uintmax_t)archive_entry_size(e), + (uintmax_t)archive_entry_size(e), + buf, + 0U, + archive_entry_pathname(e)); + } ac(archive_read_data_skip(a)); } /* * Extract to memory to check CRC */ -static void +static int test(struct archive *a, struct archive_entry *e) { ssize_t len; + int error_count; + error_count = 0; if (S_ISDIR(archive_entry_filetype(e))) - return; + return 0; - info("%s ", archive_entry_pathname(e)); + info(" testing: %s\t", archive_entry_pathname(e)); while ((len = archive_read_data(a, buffer, sizeof buffer)) > 0) /* nothing */; if (len < 0) { - info("%s\n", archive_error_string(a)); - ++test_failed; + info(" %s\n", archive_error_string(a)); + ++error_count; } else { - info("OK\n"); + info(" OK\n"); } /* shouldn't be necessary, but it doesn't hurt */ ac(archive_read_data_skip(a)); + + return error_count; } @@ -665,6 +857,7 @@ unzip(const char *fn) struct archive *a; struct archive_entry *e; int fd, ret; + uintmax_t total_size, file_count, error_count; if ((fd = open(fn, O_RDONLY)) < 0) error("%s", fn); @@ -673,33 +866,70 @@ unzip(const char *fn) ac(archive_read_support_format_zip(a)); ac(archive_read_open_fd(a, fd, 8192)); + if (!p_opt && !q_opt) + printf("Archive: %s\n", fn); + if (v_opt == 1) { + printf(" Length Date Time Name\n"); + printf(" -------- ---- ---- ----\n"); + } else if (v_opt == 2) { + printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); + printf("-------- ------ ------- ----- ---- ---- ------ ----\n"); + } + + total_size = 0; + file_count = 0; + error_count = 0; for (;;) { ret = archive_read_next_header(a, &e); if (ret == ARCHIVE_EOF) break; ac(ret); if (t_opt) - test(a, e); - else if (l_opt) + error_count += test(a, e); + else if (v_opt) list(a, e); + else if (p_opt || c_opt) + extract_stdout(a, e); else extract(a, e); + + total_size += archive_entry_size(e); + ++file_count; + } + + if (v_opt == 1) { + printf(" -------- -------\n"); + printf(" %8ju %ju file%s\n", + total_size, file_count, file_count != 1 ? "s" : ""); + } else if (v_opt == 2) { + printf("-------- ------- --- -------\n"); + printf("%8ju %7ju 0%% %ju file%s\n", + total_size, total_size, file_count, + file_count != 1 ? "s" : ""); } ac(archive_read_close(a)); (void)archive_read_finish(a); + if (close(fd) != 0) error("%s", fn); - if (t_opt && test_failed) - errorx("%d checksum error(s) found.", test_failed); + if (t_opt) { + if (error_count > 0) { + errorx("%d checksum error(s) found.", error_count); + } + else { + printf("No errors detected in compressed data of %s.\n", + fn); + } + } } static void usage(void) { - fprintf(stderr, "usage: unzip [-ajLlnoqtu] [-d dir] zipfile\n"); + fprintf(stderr, "usage: unzip [-aCcfjLlnopqtuv] [-d dir] [-x pattern] zipfile\n"); exit(1); } @@ -709,14 +939,23 @@ getopts(int argc, char *argv[]) int opt; optreset = optind = 1; - while ((opt = getopt(argc, argv, "ad:jLlnoqtux:")) != -1) + while ((opt = getopt(argc, argv, "aCcd:fjLlnopqtuvx:")) != -1) switch (opt) { case 'a': a_opt = 1; break; + case 'C': + C_opt = 1; + break; + case 'c': + c_opt = 1; + break; case 'd': d_arg = optarg; break; + case 'f': + f_opt = 1; + break; case 'j': j_opt = 1; break; @@ -724,13 +963,18 @@ getopts(int argc, char *argv[]) L_opt = 1; break; case 'l': - l_opt = 1; + if (v_opt == 0) + v_opt = 1; break; case 'n': n_opt = 1; break; case 'o': o_opt = 1; + q_opt = 1; + break; + case 'p': + p_opt = 1; break; case 'q': q_opt = 1; @@ -741,6 +985,9 @@ getopts(int argc, char *argv[]) case 'u': u_opt = 1; break; + case 'v': + v_opt = 2; + break; case 'x': add_pattern(&exclude, optarg); break; From owner-svn-src-all@FreeBSD.ORG Tue May 4 19:58:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 382B9106566C; Tue, 4 May 2010 19:58:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 281788FC0C; Tue, 4 May 2010 19:58: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 o44JwuCs018269; Tue, 4 May 2010 19:58:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44JwuG8018267; Tue, 4 May 2010 19:58:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005041958.o44JwuG8018267@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 19:58: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: r207630 - head/sys/boot/forth 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, 04 May 2010 19:58:56 -0000 Author: delphij Date: Tue May 4 19:58:55 2010 New Revision: 207630 URL: http://svn.freebsd.org/changeset/base/207630 Log: Remove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules available, they were removed due to NEEDSGIANT. While I'm there, add if_et which was missed quite a while ago. MFC after: 2 weeks Modified: head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Tue May 4 19:18:00 2010 (r207629) +++ head/sys/boot/forth/loader.conf Tue May 4 19:58:55 2010 (r207630) @@ -197,8 +197,6 @@ if_epair_load="NO" # Virtual b-t-b Ethe if_faith_load="NO" # IPv6-to-IPv4 TCP relay capturing interface if_gif_load="NO" # generic tunnel interface if_gre_load="NO" # encapsulating network device -if_ppp_load="NO" # Kernel ppp -if_sl_load="NO" # SLIP if_stf_load="NO" # 6to4 tunnel interface if_tap_load="NO" # Ethernet tunnel software network interface if_tun_load="NO" # Tunnel driver (user process ppp) @@ -217,7 +215,6 @@ if_age_load="NO" # Attansic/Atheros L1 if_alc_load="NO" # Atheros AR8131/AR8132 Ethernet if_ale_load="NO" # Atheros AR8121/AR8113/AR8114 Ethernet if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs -if_ar_load="NO" # Digi SYNC/570i if_ath_load="NO" # Atheros IEEE 802.11 wireless NICs if_aue_load="NO" # ADMtek AN986 Pegasus USB Ethernet if_awi_load="NO" # AMD PCnetMobile IEEE 802.11 wireless NICs @@ -237,6 +234,7 @@ if_ed_load="NO" # National Semiconduct if_em_load="NO" # Intel(R) PRO/1000 Gigabit Ethernet if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) +if_et_load="NO" # Agere ET1310 10/100/Gigabit Ethernet if_ex_load="NO" # Intel EtherExpress Pro/10 Ethernet if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet # adapters @@ -265,17 +263,15 @@ if_nve_load="NO" # NVIDIA nForce MCP Ne if_nxge_load="NO" # Neterion Xframe 10Gb Ethernet if_pcn_load="NO" # AMD PCnet PCI if_ral_load="NO" # Ralink Technology wireless -if_ray_load="NO" # Raytheon Raylink/Webgear Aviator PCCard if_re_load="NO" # RealTek 8139C+/8169/8169S/8110S if_rl_load="NO" # RealTek 8129/8139 if_rue_load="NO" # RealTek RTL8150 USB to Fast Ethernet if_sbni_load="NO" # Granch SBNI12 leased line adapters if_sf_load="NO" # Adaptec Duralink PCI (AIC-6915 "starfire") -if_sge_load="NO" # Silicon Integrated Systems SiS190/191 +if_sge_load="NO" # Silicon Integrated Systems SiS 190/191 if_sis_load="NO" # Silicon Integrated Systems SiS 900/7016 if_sk_load="NO" # SysKonnect SK-984x series PCI Gigabit Ethernet if_sn_load="NO" # SMC 91Cxx -if_sr_load="NO" # synchronous RISCom/N2 / WANic 400/405 if_ste_load="NO" # Sundance Technologies ST201 Fast Ethernet if_stge_load="NO" # Sundance/Tamarack TC9021 Gigabit Ethernet if_ti_load="NO" # Alteon Networks Tigon 1 and Tigon 2 From owner-svn-src-all@FreeBSD.ORG Tue May 4 20:37:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7BA6E106566C; Tue, 4 May 2010 20:37:36 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 32FC38FC0C; Tue, 4 May 2010 20:37:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id 1BA63FECD; Wed, 5 May 2010 08:37:35 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pG10J-OrshLR; Wed, 5 May 2010 08:37:30 +1200 (NZST) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Wed, 5 May 2010 08:37:30 +1200 (NZST) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 6F38911420; Wed, 5 May 2010 08:37:30 +1200 (NZST) Date: Wed, 5 May 2010 08:37:30 +1200 From: Andrew Thompson To: Martin Matuska Message-ID: <20100504203730.GA5420@citylink.fud.org.nz> References: <201005041730.o44HU7XQ085262@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201005041730.o44HU7XQ085262@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207624 - 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: Tue, 04 May 2010 20:37:36 -0000 On Tue, May 04, 2010 at 05:30:07PM +0000, Martin Matuska wrote: > Author: mm > Date: Tue May 4 17:30:07 2010 > New Revision: 207624 > URL: http://svn.freebsd.org/changeset/base/207624 > > Log: > Fix deadlock during zfs receive. > > OpenSolaris onnv revision: 9299:8809e849f63e > I believe I have hit this before, thanks for importing the fix. Andrew From owner-svn-src-all@FreeBSD.ORG Tue May 4 20:50:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3C121065675; Tue, 4 May 2010 20:50:39 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BF9958FC15; Tue, 4 May 2010 20:50: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 o44Kodhp029706; Tue, 4 May 2010 20:50:39 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44KodLt029690; Tue, 4 May 2010 20:50:39 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201005042050.o44KodLt029690@svn.freebsd.org> From: Roman Divacky Date: Tue, 4 May 2010 20:50:39 +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: r207631 - in vendor/llvm/dist: docs lib/CodeGen lib/Target/ARM lib/Target/CellSPU lib/Target/X86 lib/Target/X86/AsmParser lib/Transforms/Scalar lib/VMCore test/CodeGen/CellSPU test/MC/A... 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, 04 May 2010 20:50:39 -0000 Author: rdivacky Date: Tue May 4 20:50:39 2010 New Revision: 207631 URL: http://svn.freebsd.org/changeset/base/207631 Log: Update LLVM to r103052. Added: vendor/llvm/dist/test/CodeGen/CellSPU/storestruct.ll vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-suffix-matching.s Modified: vendor/llvm/dist/docs/FAQ.html vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.h vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp Modified: vendor/llvm/dist/docs/FAQ.html ============================================================================== --- vendor/llvm/dist/docs/FAQ.html Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/docs/FAQ.html Tue May 4 20:50:39 2010 (r207631) @@ -632,22 +632,22 @@ Stop.

Use commands like this:

    -
  1. Compile your program as normal with llvm-g++:

    +
  2. Compile your program with llvm-g++:

    -% llvm-g++ x.cpp -o program
    +% llvm-g++ -emit-llvm x.cpp -o program.bc -c
     

    or:

    -% llvm-g++ a.cpp -c
    -% llvm-g++ b.cpp -c
    -% llvm-g++ a.o b.o -o program
    +% llvm-g++ a.cpp -c -emit-llvm
    +% llvm-g++ b.cpp -c -emit-llvm
    +% llvm-ld a.o b.o -o program
     
    -

    With llvm-gcc3, this will generate program and program.bc. The .bc - file is the LLVM version of the program all linked together.

  3. +

    This will generate program and program.bc. The .bc + file is the LLVM version of the program all linked together.

  4. Convert the LLVM code to C code, using the LLC tool with the C backend:

    @@ -659,7 +659,7 @@ Stop.
  5. Finally, compile the C file:

    -% cc x.c
    +% cc x.c -lstdc++
     
@@ -931,7 +931,7 @@ F.i: src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
- Last modified: $Date: 2010-02-26 00:41:41 +0100 (Fri, 26 Feb 2010) $ + Last modified: $Date: 2010-05-04 20:16:00 +0200 (Tue, 04 May 2010) $ Modified: vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp Tue May 4 20:50:39 2010 (r207631) @@ -262,6 +262,23 @@ static void printRegName(unsigned reg, c } #endif +static +bool MultipleDefsByMI(const MachineInstr &MI, unsigned MOIdx) { + unsigned Reg = MI.getOperand(MOIdx).getReg(); + for (unsigned i = MOIdx+1, e = MI.getNumOperands(); i < e; ++i) { + const MachineOperand &MO = MI.getOperand(i); + if (!MO.isReg()) + continue; + if (MO.getReg() == Reg && MO.isDef()) { + assert(MI.getOperand(MOIdx).getSubReg() != MO.getSubReg() && + MI.getOperand(MOIdx).getSubReg() && + MO.getSubReg()); + return true; + } + } + return false; +} + void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, MachineBasicBlock::iterator mi, SlotIndex MIIdx, @@ -372,6 +389,13 @@ void LiveIntervals::handleVirtualRegiste } } else { + if (MultipleDefsByMI(*mi, MOIdx)) + // Mutple defs of the same virtual register by the same instruction. e.g. + // %reg1031:5, %reg1031:6 = VLD1q16 %reg1024, ... + // This is likely due to elimination of REG_SEQUENCE instructions. Return + // here since there is nothing to do. + return; + // If this is the second time we see a virtual register definition, it // must be due to phi elimination or two addr elimination. If this is // the result of two address elimination, then the vreg is one of the Modified: vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp Tue May 4 20:50:39 2010 (r207631) @@ -30,6 +30,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" #include #include using namespace llvm; @@ -52,22 +53,22 @@ void llvm::PHIElimination::getAnalysisUs MachineFunctionPass::getAnalysisUsage(AU); } -bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) { - MRI = &Fn.getRegInfo(); +bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &MF) { + MRI = &MF.getRegInfo(); bool Changed = false; // Split critical edges to help the coalescer if (LiveVariables *LV = getAnalysisIfAvailable()) - for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) - Changed |= SplitPHIEdges(Fn, *I, *LV); + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) + Changed |= SplitPHIEdges(MF, *I, *LV); // Populate VRegPHIUseCount - analyzePHINodes(Fn); + analyzePHINodes(MF); // Eliminate PHI instructions by inserting copies into predecessor blocks. - for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) - Changed |= EliminatePHINodes(Fn, *I); + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) + Changed |= EliminatePHINodes(MF, *I); // Remove dead IMPLICIT_DEF instructions. for (SmallPtrSet::iterator I = ImpDefs.begin(), @@ -81,11 +82,16 @@ bool llvm::PHIElimination::runOnMachineF // Clean up the lowered PHI instructions. for (LoweredPHIMap::iterator I = LoweredPHIs.begin(), E = LoweredPHIs.end(); I != E; ++I) - Fn.DeleteMachineInstr(I->first); + MF.DeleteMachineInstr(I->first); LoweredPHIs.clear(); ImpDefs.clear(); VRegPHIUseCount.clear(); + + // Eliminate REG_SEQUENCE instructions. Their whole purpose was to preseve + // SSA form. + Changed |= EliminateRegSequences(MF); + return Changed; } @@ -364,8 +370,8 @@ void llvm::PHIElimination::LowerAtomicPH /// used in a PHI node. We map that to the BB the vreg is coming from. This is /// used later to determine when the vreg is killed in the BB. /// -void llvm::PHIElimination::analyzePHINodes(const MachineFunction& Fn) { - for (MachineFunction::const_iterator I = Fn.begin(), E = Fn.end(); +void llvm::PHIElimination::analyzePHINodes(const MachineFunction& MF) { + for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); I != E; ++I) for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end(); BBI != BBE && BBI->isPHI(); ++BBI) @@ -443,3 +449,58 @@ MachineBasicBlock *PHIElimination::Split return NMBB; } + +static void UpdateRegSequenceSrcs(unsigned SrcReg, + unsigned DstReg, unsigned SrcIdx, + MachineRegisterInfo *MRI) { + for (MachineRegisterInfo::reg_iterator RI = MRI->reg_begin(SrcReg), + UE = MRI->reg_end(); RI != UE; ) { + MachineOperand &MO = RI.getOperand(); + ++RI; + MO.setReg(DstReg); + MO.setSubReg(SrcIdx); + } +} + +/// EliminateRegSequences - Eliminate REG_SEQUENCE instructions as second part +/// of de-ssa process. This replaces sources of REG_SEQUENCE as sub-register +/// references of the register defined by REG_SEQUENCE. e.g. +/// +/// %reg1029, %reg1030 = VLD1q16 %reg1024, ... +/// %reg1031 = REG_SEQUENCE %reg1029, 5, %reg1030, 6 +/// => +/// %reg1031:5, %reg1031:6 = VLD1q16 %reg1024, ... +bool PHIElimination::EliminateRegSequences(MachineFunction &MF) { + bool Changed = false; + + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) + for (MachineBasicBlock::iterator BBI = I->begin(), BBE = I->end(); + BBI != BBE; ) { + MachineInstr &MI = *BBI; + ++BBI; + if (MI.getOpcode() != TargetOpcode::REG_SEQUENCE) + continue; + unsigned DstReg = MI.getOperand(0).getReg(); + if (MI.getOperand(0).getSubReg() || + TargetRegisterInfo::isPhysicalRegister(DstReg) || + !(MI.getNumOperands() & 1)) { + DEBUG(dbgs() << "Illegal REG_SEQUENCE instruction:" << MI); + llvm_unreachable(0); + } + for (unsigned i = 1, e = MI.getNumOperands(); i < e; i += 2) { + unsigned SrcReg = MI.getOperand(i).getReg(); + if (MI.getOperand(i).getSubReg() || + TargetRegisterInfo::isPhysicalRegister(SrcReg)) { + DEBUG(dbgs() << "Illegal REG_SEQUENCE instruction:" << MI); + llvm_unreachable(0); + } + unsigned SrcIdx = MI.getOperand(i+1).getImm(); + UpdateRegSequenceSrcs(SrcReg, DstReg, SrcIdx, MRI); + } + + MI.eraseFromParent(); + Changed = true; + } + + return Changed; +} Modified: vendor/llvm/dist/lib/CodeGen/PHIElimination.h ============================================================================== --- vendor/llvm/dist/lib/CodeGen/PHIElimination.h Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/CodeGen/PHIElimination.h Tue May 4 20:50:39 2010 (r207631) @@ -94,6 +94,8 @@ namespace llvm { return I; } + bool EliminateRegSequences(MachineFunction &MF); + typedef std::pair BBVRegPair; typedef DenseMap VRegPHIUse; Modified: vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue May 4 20:50:39 2010 (r207631) @@ -27,6 +27,7 @@ #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -34,6 +35,10 @@ using namespace llvm; +static cl::opt +UseRegSeq("neon-reg-sequence", cl::Hidden, + cl::desc("Use reg_sequence to model ld / st of multiple neon regs")); + //===--------------------------------------------------------------------===// /// ARMDAGToDAGISel - ARM specific code to select ARM machine /// instructions for SelectionDAG operations. @@ -939,10 +944,14 @@ SDNode *ARMDAGToDAGISel::SelectT2Indexed /// form a quad register. SDNode *ARMDAGToDAGISel::PairDRegs(EVT VT, SDValue V0, SDValue V1) { DebugLoc dl = V0.getNode()->getDebugLoc(); - SDValue Undef = - SDValue(CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, dl, VT), 0); SDValue SubReg0 = CurDAG->getTargetConstant(ARM::DSUBREG_0, MVT::i32); SDValue SubReg1 = CurDAG->getTargetConstant(ARM::DSUBREG_1, MVT::i32); + if (UseRegSeq) { + const SDValue Ops[] = { V0, SubReg0, V1, SubReg1 }; + return CurDAG->getMachineNode(TargetOpcode::REG_SEQUENCE, dl, VT, Ops, 4); + } + SDValue Undef = + SDValue(CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, dl, VT), 0); SDNode *Pair = CurDAG->getMachineNode(TargetOpcode::INSERT_SUBREG, dl, VT, Undef, V0, SubReg0); return CurDAG->getMachineNode(TargetOpcode::INSERT_SUBREG, dl, Modified: vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp Tue May 4 20:50:39 2010 (r207631) @@ -12,12 +12,14 @@ #include "ARMInstrInfo.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" using namespace llvm; namespace { class NEONPreAllocPass : public MachineFunctionPass { const TargetInstrInfo *TII; + MachineRegisterInfo *MRI; public: static char ID; @@ -30,6 +32,8 @@ namespace { } private: + bool FormsRegSequence(MachineInstr *MI, + unsigned FirstOpnd, unsigned NumRegs); bool PreAllocNEONRegisters(MachineBasicBlock &MBB); }; @@ -334,6 +338,27 @@ static bool isNEONMultiRegOp(int Opcode, return false; } +bool NEONPreAllocPass::FormsRegSequence(MachineInstr *MI, + unsigned FirstOpnd, unsigned NumRegs) { + MachineInstr *RegSeq = 0; + for (unsigned R = 0; R < NumRegs; ++R) { + MachineOperand &MO = MI->getOperand(FirstOpnd + R); + assert(MO.isReg() && MO.getSubReg() == 0 && "unexpected operand"); + unsigned VirtReg = MO.getReg(); + assert(TargetRegisterInfo::isVirtualRegister(VirtReg) && + "expected a virtual register"); + if (!MRI->hasOneNonDBGUse(VirtReg)) + return false; + MachineInstr *UseMI = &*MRI->use_nodbg_begin(VirtReg); + if (UseMI->getOpcode() != TargetOpcode::REG_SEQUENCE) + return false; + if (RegSeq && RegSeq != UseMI) + return false; + RegSeq = UseMI; + } + return true; +} + bool NEONPreAllocPass::PreAllocNEONRegisters(MachineBasicBlock &MBB) { bool Modified = false; @@ -343,6 +368,8 @@ bool NEONPreAllocPass::PreAllocNEONRegis unsigned FirstOpnd, NumRegs, Offset, Stride; if (!isNEONMultiRegOp(MI->getOpcode(), FirstOpnd, NumRegs, Offset, Stride)) continue; + if (FormsRegSequence(MI, FirstOpnd, NumRegs)) + continue; MachineBasicBlock::iterator NextI = llvm::next(MBBI); for (unsigned R = 0; R < NumRegs; ++R) { @@ -382,6 +409,7 @@ bool NEONPreAllocPass::PreAllocNEONRegis bool NEONPreAllocPass::runOnMachineFunction(MachineFunction &MF) { TII = MF.getTarget().getInstrInfo(); + MRI = &MF.getRegInfo(); bool Modified = false; for (MachineFunction::iterator MFI = MF.begin(), E = MF.end(); MFI != E; Modified: vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Tue May 4 20:50:39 2010 (r207631) @@ -941,13 +941,21 @@ SPUDAGToDAGISel::Select(SDNode *N) { && ((RN = dyn_cast(Op0.getNode())) != 0 && RN->getReg() != SPU::R1))) { NewOpc = SPU::Ar32; + Ops[1] = Op1; if (Op1.getOpcode() == ISD::Constant) { ConstantSDNode *CN = cast(Op1); Op1 = CurDAG->getTargetConstant(CN->getSExtValue(), VT); - NewOpc = (isI32IntS10Immediate(CN) ? SPU::AIr32 : SPU::Ar32); + if (isInt<10>(CN->getSExtValue())) { + NewOpc = SPU::AIr32; + Ops[1] = Op1; + } else { + Ops[1] = SDValue(CurDAG->getMachineNode(SPU::ILr32, dl, + N->getValueType(0), + Op1), + 0); + } } Ops[0] = Op0; - Ops[1] = Op1; n_ops = 2; } } Modified: vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue May 4 20:50:39 2010 (r207631) @@ -51,11 +51,14 @@ private: void InstructionCleanup(MCInst &Inst); /// @name Auto-generated Match Functions - /// { + /// { bool MatchInstruction(const SmallVectorImpl &Operands, MCInst &Inst); + bool MatchInstructionImpl( + const SmallVectorImpl &Operands, MCInst &Inst); + /// } public: @@ -132,7 +135,7 @@ struct X86Operand : public MCParsedAsmOp X86Operand(KindTy K, SMLoc Start, SMLoc End) : Kind(K), StartLoc(Start), EndLoc(End) {} - + /// getStartLoc - Get the location of the first token of this operand. SMLoc getStartLoc() const { return StartLoc; } /// getEndLoc - Get the location of the last token of this operand. @@ -142,6 +145,11 @@ struct X86Operand : public MCParsedAsmOp assert(Kind == Token && "Invalid access!"); return StringRef(Tok.Data, Tok.Length); } + void setTokenValue(StringRef Value) { + assert(Kind == Token && "Invalid access!"); + Tok.Data = Value.data(); + Tok.Length = Value.size(); + } unsigned getReg() const { assert(Kind == Register && "Invalid access!"); @@ -632,6 +640,54 @@ void X86ATTAsmParser::InstructionCleanup } } +bool +X86ATTAsmParser::MatchInstruction(const SmallVectorImpl + &Operands, + MCInst &Inst) { + // First, try a direct match. + if (!MatchInstructionImpl(Operands, Inst)) + return false; + + // Ignore anything which is obviously not a suffix match. + if (Operands.size() == 0) + return true; + X86Operand *Op = static_cast(Operands[0]); + if (!Op->isToken() || Op->getToken().size() > 15) + return true; + + // FIXME: Ideally, we would only attempt suffix matches for things which are + // valid prefixes, and we could just infer the right unambiguous + // type. However, that requires substantially more matcher support than the + // following hack. + + // Change the operand to point to a temporary token. + char Tmp[16]; + StringRef Base = Op->getToken(); + memcpy(Tmp, Base.data(), Base.size()); + Op->setTokenValue(StringRef(Tmp, Base.size() + 1)); + + // Check for the various suffix matches. + Tmp[Base.size()] = 'b'; + bool MatchB = MatchInstructionImpl(Operands, Inst); + Tmp[Base.size()] = 'w'; + bool MatchW = MatchInstructionImpl(Operands, Inst); + Tmp[Base.size()] = 'l'; + bool MatchL = MatchInstructionImpl(Operands, Inst); + + // Restore the old token. + Op->setTokenValue(Base); + + // If exactly one matched, then we treat that as a successful match (and the + // instruction will already have been filled in correctly, since the failing + // matches won't have modified it). + if (MatchB + MatchW + MatchL == 2) + return false; + + // Otherwise, the match failed. + return true; +} + + extern "C" void LLVMInitializeX86AsmLexer(); // Force static initialization. Modified: vendor/llvm/dist/lib/Target/X86/X86.td ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86.td Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/Target/X86/X86.td Tue May 4 20:50:39 2010 (r207631) @@ -179,8 +179,9 @@ include "X86CallingConv.td" // Currently the X86 assembly parser only supports ATT syntax. def ATTAsmParser : AsmParser { - string AsmParserClassName = "ATTAsmParser"; - string AsmParserInstCleanup = "InstructionCleanup"; + string AsmParserClassName = "ATTAsmParser"; + string AsmParserInstCleanup = "InstructionCleanup"; + string MatchInstructionName = "MatchInstructionImpl"; int Variant = 0; // Discard comments in assembly strings. Modified: vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp Tue May 4 20:50:39 2010 (r207631) @@ -1584,7 +1584,7 @@ bool GVN::processNonLocalLoad(LoadInst * for (unsigned i = 0, e = UnavailableBlocks.size(); i != e; ++i) FullyAvailableBlocks[UnavailableBlocks[i]] = false; - bool NeedToSplitEdges = false; + SmallVector, 4> NeedToSplit; for (pred_iterator PI = pred_begin(LoadBB), E = pred_end(LoadBB); PI != E; ++PI) { BasicBlock *Pred = *PI; @@ -1600,12 +1600,13 @@ bool GVN::processNonLocalLoad(LoadInst * return false; } unsigned SuccNum = GetSuccessorNumber(Pred, LoadBB); - toSplit.push_back(std::make_pair(Pred->getTerminator(), SuccNum)); - NeedToSplitEdges = true; + NeedToSplit.push_back(std::make_pair(Pred->getTerminator(), SuccNum)); } } - if (NeedToSplitEdges) + if (!NeedToSplit.empty()) { + toSplit.append(NeedToSplit.size(), NeedToSplit.front()); return false; + } // Decide whether PRE is profitable for this load. unsigned NumUnavailablePreds = PredLoads.size(); Modified: vendor/llvm/dist/lib/VMCore/Metadata.cpp ============================================================================== --- vendor/llvm/dist/lib/VMCore/Metadata.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/lib/VMCore/Metadata.cpp Tue May 4 20:50:39 2010 (r207631) @@ -115,14 +115,17 @@ MDNode::~MDNode() { } static const Function *getFunctionForValue(Value *V) { - assert(!isa(V) && "does not iterate over metadata operands"); if (!V) return NULL; - if (Instruction *I = dyn_cast(V)) - return I->getParent()->getParent(); - if (BasicBlock *BB = dyn_cast(V)) - return BB->getParent(); + if (Instruction *I = dyn_cast(V)) { + BasicBlock *BB = I->getParent(); + return BB ? BB->getParent() : 0; + } if (Argument *A = dyn_cast(V)) return A->getParent(); + if (BasicBlock *BB = dyn_cast(V)) + return BB->getParent(); + if (MDNode *MD = dyn_cast(V)) + return MD->getFunction(); return NULL; } @@ -156,17 +159,9 @@ const Function *MDNode::getFunction() co return assertLocalFunction(this); #endif if (!isFunctionLocal()) return NULL; - - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { - if (Value *V = getOperand(i)) { - if (MDNode *MD = dyn_cast(V)) { - if (const Function *F = MD->getFunction()) - return F; - } else { - return getFunctionForValue(V); - } - } - } + for (unsigned i = 0, e = getNumOperands(); i != e; ++i) + if (const Function *F = getFunctionForValue(getOperand(i))) + return F; return NULL; } @@ -272,8 +267,19 @@ void MDNode::replaceOperand(MDNodeOperan // with an instruction or some other function-local object. If this is a // non-function-local MDNode, it can't point to a function-local object. // Handle this case by implicitly dropping the MDNode reference to null. - if (!isFunctionLocal() && To && isFunctionLocalValue(To)) - To = 0; + // Likewise if the MDNode is function-local but for a different function. + if (To && isFunctionLocalValue(To)) { + if (!isFunctionLocal()) + To = 0; + else { + const Function *F = getFunction(); + const Function *FV = getFunctionForValue(To); + // Metadata can be function-local without having an associated function. + // So only consider functions to have changed if non-null. + if (F && FV && F != FV) + To = 0; + } + } if (From == To) return; Added: vendor/llvm/dist/test/CodeGen/CellSPU/storestruct.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/CellSPU/storestruct.ll Tue May 4 20:50:39 2010 (r207631) @@ -0,0 +1,13 @@ +; RUN: llc < %s -march=cellspu | FileCheck %s + +%0 = type {i32, i32} +@buffer = global [ 72 x %0 ] zeroinitializer + +define void@test( ) { +; Check that there is no illegal "a rt, ra, imm" instruction +; CHECK-NOT: a {{\$., \$., 5..}} +; CHECK: a {{\$., \$., \$.}} + store %0 {i32 1, i32 2} , + %0* getelementptr ([72 x %0]* @buffer, i32 0, i32 71) + ret void +} Added: vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-suffix-matching.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-suffix-matching.s Tue May 4 20:50:39 2010 (r207631) @@ -0,0 +1,6 @@ +// RUN: llvm-mc -triple x86_64 -o - %s | FileCheck %s + +// CHECK: addl $0, %eax + add $0, %eax +// CHECK: addb $255, %al + add $0xFF, %al Modified: vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll ============================================================================== --- vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll Tue May 4 20:50:39 2010 (r207631) @@ -1,7 +1,8 @@ ; RUN: opt -S -globalopt < %s | FileCheck %s ; PR6112 - When globalopt does RAUW(@G, %G), the metadata reference should drop -; to null. +; to null. Function local metadata that references @G from a different function +; to that containing %G should likewise drop to null. @G = internal global i8** null define i32 @main(i32 %argc, i8** %argv) { @@ -11,9 +12,15 @@ define i32 @main(i32 %argc, i8** %argv) ret i32 0 } -!named = !{!0} +define void @foo(i32 %x) { + call void @llvm.foo(metadata !{i8*** @G, i32 %x}) +; CHECK: call void @llvm.foo(metadata !{null, i32 %x}) + ret void +} -; CHECK: !0 = metadata !{null} -!0 = metadata !{i8*** @G} +declare void @llvm.foo(metadata) nounwind readnone +!named = !{!0} +!0 = metadata !{i8*** @G} +; CHECK: !0 = metadata !{null} Modified: vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp ============================================================================== --- vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp Tue May 4 19:58:55 2010 (r207630) +++ vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp Tue May 4 20:50:39 2010 (r207631) @@ -17,12 +17,109 @@ #include "llvm/Support/Compiler.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/StringMap.h" #include "llvm/ADT/VectorExtras.h" #include #include using namespace llvm; //===----------------------------------------------------------------------===// +// Diagnostic category computation code. +//===----------------------------------------------------------------------===// + +namespace { +class DiagGroupParentMap { + std::map > Mapping; +public: + DiagGroupParentMap() { + std::vector DiagGroups + = Records.getAllDerivedDefinitions("DiagGroup"); + for (unsigned i = 0, e = DiagGroups.size(); i != e; ++i) { + std::vector SubGroups = + DiagGroups[i]->getValueAsListOfDefs("SubGroups"); + for (unsigned j = 0, e = SubGroups.size(); j != e; ++j) + Mapping[SubGroups[j]].push_back(DiagGroups[i]); + } + } + + const std::vector &getParents(const Record *Group) { + return Mapping[Group]; + } +}; +} // end anonymous namespace. + + +static std::string +getCategoryFromDiagGroup(const Record *Group, + DiagGroupParentMap &DiagGroupParents) { + // If the DiagGroup has a category, return it. + std::string CatName = Group->getValueAsString("CategoryName"); + if (!CatName.empty()) return CatName; + + // The diag group may the subgroup of one or more other diagnostic groups, + // check these for a category as well. + const std::vector &Parents = DiagGroupParents.getParents(Group); + for (unsigned i = 0, e = Parents.size(); i != e; ++i) { + CatName = getCategoryFromDiagGroup(Parents[i], DiagGroupParents); + if (!CatName.empty()) return CatName; + } + return ""; +} + +/// getDiagnosticCategory - Return the category that the specified diagnostic +/// lives in. +static std::string getDiagnosticCategory(const Record *R, + DiagGroupParentMap &DiagGroupParents) { + // If the diagnostic itself has a category, get it. + std::string CatName = R->getValueAsString("CategoryName"); + if (!CatName.empty()) return CatName; + + DefInit *Group = dynamic_cast(R->getValueInit("Group")); + if (Group == 0) return ""; + + // Check the diagnostic's diag group for a category. + return getCategoryFromDiagGroup(Group->getDef(), DiagGroupParents); +} + +namespace { + class DiagCategoryIDMap { + StringMap CategoryIDs; + std::vector CategoryStrings; + public: + DiagCategoryIDMap() { + DiagGroupParentMap ParentInfo; + + // The zero'th category is "". + CategoryStrings.push_back(""); + CategoryIDs[""] = 0; + + std::vector Diags = + Records.getAllDerivedDefinitions("Diagnostic"); + for (unsigned i = 0, e = Diags.size(); i != e; ++i) { + std::string Category = getDiagnosticCategory(Diags[i], ParentInfo); + if (Category.empty()) continue; // Skip diags with no category. + + unsigned &ID = CategoryIDs[Category]; + if (ID != 0) continue; // Already seen. + + ID = CategoryStrings.size(); + CategoryStrings.push_back(Category); + } + } + + unsigned getID(StringRef CategoryString) { + return CategoryIDs[CategoryString]; + } + + typedef std::vector::iterator iterator; + iterator begin() { return CategoryStrings.begin(); } + iterator end() { return CategoryStrings.end(); } + }; +} // end anonymous namespace. + + + +//===----------------------------------------------------------------------===// // Warning Tables (.inc file) generation. //===----------------------------------------------------------------------===// @@ -40,6 +137,9 @@ void ClangDiagsDefsEmitter::run(raw_ostr const std::vector &Diags = Records.getAllDerivedDefinitions("Diagnostic"); + DiagCategoryIDMap CategoryIDs; + DiagGroupParentMap DGParentMap; + for (unsigned i = 0, e = Diags.size(); i != e; ++i) { const Record &R = *Diags[i]; // Filter by component. @@ -67,6 +167,9 @@ void ClangDiagsDefsEmitter::run(raw_ostr OS << ", true"; else OS << ", false"; + + // Category number. + OS << ", " << CategoryIDs.getID(getDiagnosticCategory(&R, DGParentMap)); OS << ")\n"; } } @@ -82,6 +185,9 @@ struct GroupInfo { }; void ClangDiagGroupsEmitter::run(raw_ostream &OS) { + // Compute a mapping from a DiagGroup to all of its parents. + DiagGroupParentMap DGParentMap; + // Invert the 1-[0/1] mapping of diags to group into a one to many mapping of // groups to diags in the group. std::map DiagsInGroup; @@ -98,9 +204,10 @@ void ClangDiagGroupsEmitter::run(raw_ost // Add all DiagGroup's to the DiagsInGroup list to make sure we pick up empty // groups (these are warnings that GCC supports that clang never produces). - Diags = Records.getAllDerivedDefinitions("DiagGroup"); - for (unsigned i = 0, e = Diags.size(); i != e; ++i) { - Record *Group = Diags[i]; + std::vector DiagGroups + = Records.getAllDerivedDefinitions("DiagGroup"); + for (unsigned i = 0, e = DiagGroups.size(); i != e; ++i) { + Record *Group = DiagGroups[i]; GroupInfo &GI = DiagsInGroup[Group->getValueAsString("GroupName")]; std::vector SubGroups = Group->getValueAsListOfDefs("SubGroups"); @@ -167,4 +274,12 @@ void ClangDiagGroupsEmitter::run(raw_ost OS << " },\n"; } OS << "#endif // GET_DIAG_TABLE\n\n"; + + // Emit the category table next. + DiagCategoryIDMap CategoriesByID; + OS << "\n#ifdef GET_CATEGORY_TABLE\n"; + for (DiagCategoryIDMap::iterator I = CategoriesByID.begin(), + E = CategoriesByID.end(); I != E; ++I) + OS << "CATEGORY(\"" << *I << "\")\n"; + OS << "#endif // GET_CATEGORY_TABLE\n\n"; } From owner-svn-src-all@FreeBSD.ORG Tue May 4 20:51:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7AB91065673; Tue, 4 May 2010 20:51:20 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C43848FC16; Tue, 4 May 2010 20:51: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 o44KpKFS029918; Tue, 4 May 2010 20:51:20 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44KpKg7029879; Tue, 4 May 2010 20:51:20 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201005042051.o44KpKg7029879@svn.freebsd.org> From: Roman Divacky Date: Tue, 4 May 2010 20:51:20 +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: r207632 - in vendor/clang/dist: include/clang/AST include/clang/Analysis include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Lex include/clang/Parse include/cl... 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, 04 May 2010 20:51:20 -0000 Author: rdivacky Date: Tue May 4 20:51:19 2010 New Revision: 207632 URL: http://svn.freebsd.org/changeset/base/207632 Log: Update clang to r103052. Added: vendor/clang/dist/test/Misc/macro-backtrace-limit.c Modified: vendor/clang/dist/include/clang/AST/ASTDiagnostic.h vendor/clang/dist/include/clang/AST/UnresolvedSet.h vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/Diagnostic.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Lex/LexDiagnostic.h vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/test/CodeGen/staticinit.c vendor/clang/dist/test/CodeGenCXX/reference-in-blocks.cpp vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm vendor/clang/dist/test/Sema/function-redecl.c vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp Modified: vendor/clang/dist/include/clang/AST/ASTDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/AST/ASTDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define ASTSTART #include "clang/Basic/DiagnosticASTKinds.inc" #undef DIAG Modified: vendor/clang/dist/include/clang/AST/UnresolvedSet.h ============================================================================== --- vendor/clang/dist/include/clang/AST/UnresolvedSet.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/AST/UnresolvedSet.h Tue May 4 20:51:19 2010 (r207632) @@ -45,6 +45,7 @@ public: NamedDecl *getDecl() const { return ir->getDecl(); } AccessSpecifier getAccess() const { return ir->getAccess(); } + void setAccess(AccessSpecifier AS) { ir->setAccess(AS); } DeclAccessPair getPair() const { return *ir; } NamedDecl *operator*() const { return getDecl(); } Modified: vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define ANALYSISSTART #include "clang/Basic/DiagnosticAnalysisKinds.inc" #undef DIAG Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Diagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Basic/Diagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -60,7 +60,7 @@ namespace clang { // Get typedefs for common diagnostics. enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #include "clang/Basic/DiagnosticCommonKinds.inc" NUM_BUILTIN_COMMON_DIAGNOSTICS #undef DIAG @@ -283,13 +283,13 @@ public: void setTemplateBacktraceLimit(unsigned Limit) { TemplateBacktraceLimit = Limit; } - + /// \brief Retrieve the maximum number of template instantiation /// nodes to emit along with a given diagnostic. unsigned getTemplateBacktraceLimit() const { return TemplateBacktraceLimit; } - + /// setIgnoreAllWarnings - When set to true, any unmapped warnings are /// ignored. If this and WarningsAsErrors are both set, then this one wins. void setIgnoreAllWarnings(bool Val) { IgnoreAllWarnings = Val; } Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/Diagnostic.td Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Basic/Diagnostic.td Tue May 4 20:51:19 2010 (r207632) @@ -26,10 +26,17 @@ def CLASS_WARNING : DiagClass; def CLASS_EXTENSION : DiagClass; def CLASS_ERROR : DiagClass; +// Diagnostic Categories. These can be applied to groups or individual +// diagnostics to specify a category. +class DiagCategory { + string CategoryName = Name; +} + // Diagnostic Groups. class DiagGroup subgroups = []> { string GroupName = Name; list SubGroups = subgroups; + string CategoryName = ""; } class InGroup { DiagGroup Group = G; } //class IsGroup { DiagGroup Group = DiagGroup; } @@ -48,6 +55,7 @@ class Diagnostic : Diagnostic; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Tue May 4 20:51:19 2010 (r207632) @@ -15,8 +15,6 @@ def Implicit : DiagGroup<"implicit", [ ImplicitFunctionDeclare, ImplicitInt ]>; - - // Empty DiagGroups are recognized by clang but ignored. def : DiagGroup<"address">; @@ -102,7 +100,7 @@ def : DiagGroup<"strict-prototypes">; def : DiagGroup<"strict-selector-match">; def SwitchEnum : DiagGroup<"switch-enum">; def Switch : DiagGroup<"switch", [SwitchEnum]>; -def Trigraphs : DiagGroup<"trigraphs">; +def Trigraphs : DiagGroup<"trigraphs">; def : DiagGroup<"type-limits">; def Uninitialized : DiagGroup<"uninitialized">; @@ -135,7 +133,8 @@ def Parentheses : DiagGroup<"parentheses // -Wconversion has its own warnings, but we split this one out for // legacy reasons. def Conversion : DiagGroup<"conversion", - [DiagGroup<"shorten-64-to-32">]>; + [DiagGroup<"shorten-64-to-32">]>, + DiagCategory<"Value Conversion">; def Unused : DiagGroup<"unused", [UnusedArgument, UnusedFunction, UnusedLabel, @@ -143,7 +142,8 @@ def Unused : DiagGroup<"unused", UnusedValue, UnusedVariable]>; // Format settings. -def Format : DiagGroup<"format", [FormatExtraArgs, FormatZeroLength, NonNull]>; +def Format : DiagGroup<"format", [FormatExtraArgs, FormatZeroLength, NonNull]>, + DiagCategory<"Format String">; def FormatSecurity : DiagGroup<"format-security", [Format]>; def FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>; def FormatY2K : DiagGroup<"format-y2k", [Format]>; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Tue May 4 20:51:19 2010 (r207632) @@ -1457,7 +1457,7 @@ def note_template_default_arg_checking : "while checking a default template argument used here">; def note_instantiation_contexts_suppressed : Note< "(skipping %0 context%s0 in backtrace; use -ftemplate-backtrace-limit=0 to " - "see all)">; + "see all)">; def err_field_instantiates_to_function : Error< "data member instantiated with function type %0">; Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CC1Options.td Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Driver/CC1Options.td Tue May 4 20:51:19 2010 (r207632) @@ -200,6 +200,8 @@ def ftabstop : Separate<"-ftabstop">, Me HelpText<"Set the tab stop distance.">; def ferror_limit : Separate<"-ferror-limit">, MetaVarName<"">, HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">; +def fmacro_backtrace_limit : Separate<"-fmacro-backtrace-limit">, MetaVarName<"">, + HelpText<"Set the maximum number of entries to print in a macro instantiation backtrace (0 = no limit).">; def ftemplate_backtrace_limit : Separate<"-ftemplate-backtrace-limit">, MetaVarName<"">, HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">; def fmessage_length : Separate<"-fmessage-length">, MetaVarName<"">, Modified: vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define DRIVERSTART #include "clang/Basic/DiagnosticDriverKinds.inc" #undef DIAG Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Driver/Options.td Tue May 4 20:51:19 2010 (r207632) @@ -280,6 +280,8 @@ def flat__namespace : Flag<"-flat_namesp def flax_vector_conversions : Flag<"-flax-vector-conversions">, Group; def flimited_precision_EQ : Joined<"-flimited-precision=">, Group; def flto : Flag<"-flto">, Group; +def fmacro_backtrace_limit_EQ : Joined<"-fmacro-backtrace-limit=">, + Group; def fmath_errno : Flag<"-fmath-errno">, Group; def fmerge_all_constants : Flag<"-fmerge-all-constants">, Group; def fmessage_length_EQ : Joined<"-fmessage-length=">, Group; Modified: vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h Tue May 4 20:51:19 2010 (r207632) @@ -39,11 +39,15 @@ public: /// deserialized by, e.g., the CIndex library. unsigned ErrorLimit; /// Limit # errors emitted. + unsigned MacroBacktraceLimit; /// Limit depth of macro instantiation + /// backtrace. unsigned TemplateBacktraceLimit; /// Limit depth of instantiation backtrace. /// The distance between tab stops. unsigned TabStop; - enum { DefaultTabStop = 8, MaxTabStop = 100 }; + enum { DefaultTabStop = 8, MaxTabStop = 100, + DefaultMacroBacktraceLimit = 6, + DefaultTemplateBacktraceLimit = 10 }; /// Column limit for formatting message diagnostics, or 0 if unused. unsigned MessageLength; @@ -75,6 +79,7 @@ public: BinaryOutput = 0; ErrorLimit = 0; TemplateBacktraceLimit = 0; + MacroBacktraceLimit = 0; } }; Modified: vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define FRONTENDSTART #include "clang/Basic/DiagnosticFrontendKinds.inc" #undef DIAG Modified: vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h Tue May 4 20:51:19 2010 (r207632) @@ -71,12 +71,15 @@ public: const SourceManager &SM, const FixItHint *Hints, unsigned NumHints, - unsigned Columns); + unsigned Columns, + unsigned OnMacroInst, + unsigned MacroSkipStart, + unsigned MacroSkipEnd); virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, const DiagnosticInfo &Info); }; -} // end namspace clang +} // end namespace clang #endif Modified: vendor/clang/dist/include/clang/Lex/LexDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/LexDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Lex/LexDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define LEXSTART #include "clang/Basic/DiagnosticLexKinds.inc" #undef DIAG Modified: vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define PARSESTART #include "clang/Basic/DiagnosticParseKinds.inc" #undef DIAG Modified: vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h Tue May 4 20:51:19 2010 (r207632) @@ -15,7 +15,7 @@ namespace clang { namespace diag { enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM, +#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM, #define SEMASTART #include "clang/Basic/DiagnosticSemaKinds.inc" #undef DIAG Modified: vendor/clang/dist/lib/AST/StmtDumper.cpp ============================================================================== --- vendor/clang/dist/lib/AST/StmtDumper.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/AST/StmtDumper.cpp Tue May 4 20:51:19 2010 (r207632) @@ -260,6 +260,13 @@ void StmtDumper::DumpDeclarator(Decl *D) else ns = ""; OS << '"' << UD->getDeclKindName() << ns << ";\""; + } else if (UsingDecl *UD = dyn_cast(D)) { + // print using decl (e.g. "using std::string;") + const char *tn = UD->isTypeName() ? "typename " : ""; + OS << '"' << UD->getDeclKindName() << tn; + UD->getTargetNestedNameDecl()->print(OS, + PrintingPolicy(UD->getASTContext().getLangOptions())); + OS << ";\""; } else { assert(0 && "Unexpected decl"); } Modified: vendor/clang/dist/lib/Basic/Diagnostic.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Diagnostic.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Basic/Diagnostic.cpp Tue May 4 20:51:19 2010 (r207632) @@ -51,6 +51,8 @@ struct StaticDiagInfoRec { unsigned Mapping : 3; unsigned Class : 3; bool SFINAE : 1; + unsigned Category : 5; + const char *Description; const char *OptionGroup; @@ -63,8 +65,8 @@ struct StaticDiagInfoRec { }; static const StaticDiagInfoRec StaticDiagInfo[] = { -#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) \ - { diag::ENUM, DEFAULT_MAPPING, CLASS, SFINAE, DESC, GROUP }, +#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC,GROUP,SFINAE, CATEGORY) \ + { diag::ENUM, DEFAULT_MAPPING, CLASS, SFINAE, CATEGORY, DESC, GROUP }, #include "clang/Basic/DiagnosticCommonKinds.inc" #include "clang/Basic/DiagnosticDriverKinds.inc" #include "clang/Basic/DiagnosticFrontendKinds.inc" @@ -73,7 +75,7 @@ static const StaticDiagInfoRec StaticDia #include "clang/Basic/DiagnosticASTKinds.inc" #include "clang/Basic/DiagnosticSemaKinds.inc" #include "clang/Basic/DiagnosticAnalysisKinds.inc" - { 0, 0, 0, 0, 0, 0} + { 0, 0, 0, 0, 0, 0, 0} }; #undef DIAG @@ -99,7 +101,7 @@ static const StaticDiagInfoRec *GetDiagI #endif // Search the diagnostic table with a binary search. - StaticDiagInfoRec Find = { DiagID, 0, 0, 0, 0, 0 }; + StaticDiagInfoRec Find = { DiagID, 0, 0, 0, 0, 0, 0 }; const StaticDiagInfoRec *Found = std::lower_bound(StaticDiagInfo, StaticDiagInfo + NumDiagEntries, Find); Modified: vendor/clang/dist/lib/CodeGen/CGBlocks.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBlocks.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/CodeGen/CGBlocks.cpp Tue May 4 20:51:19 2010 (r207632) @@ -532,6 +532,8 @@ llvm::Value *CodeGenFunction::GetAddrOfB V = Builder.CreateBitCast(V, PtrStructTy); V = Builder.CreateStructGEP(V, getByRefValueLLVMField(VD), VD->getNameAsString()); + if (VD->getType()->isReferenceType()) + V = Builder.CreateLoad(V); } else { const llvm::Type *Ty = CGM.getTypes().ConvertType(VD->getType()); Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Tue May 4 20:51:19 2010 (r207632) @@ -495,7 +495,10 @@ CollectRecordFields(const RecordDecl *RD llvm::DIType CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method, llvm::DIFile Unit) { - llvm::DIType FnTy = getOrCreateType(Method->getType(), Unit); + llvm::DIType FnTy + = getOrCreateType(QualType(Method->getType()->getAs(), + 0), + Unit); // Static methods do not need "this" pointer argument. if (Method->isStatic()) Modified: vendor/clang/dist/lib/CodeGen/CGDecl.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDecl.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/CodeGen/CGDecl.cpp Tue May 4 20:51:19 2010 (r207632) @@ -231,9 +231,6 @@ CodeGenFunction::AddInitializerToGlobalB void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D, llvm::GlobalValue::LinkageTypes Linkage) { - // Bail out early if the block is unreachable. - if (!Builder.GetInsertBlock()) return; - llvm::Value *&DMEntry = LocalDeclMap[&D]; assert(DMEntry == 0 && "Decl already exists in localdeclmap!"); @@ -245,9 +242,9 @@ void CodeGenFunction::EmitStaticBlockVar if (getContext().getLangOptions().CPlusPlus) CGM.setStaticLocalDeclAddress(&D, GV); + // We can't have a VLA here, but we can have a pointer to a VLA, + // even though that doesn't really make any sense. // Make sure to evaluate VLA bounds now so that we have them for later. - // - // FIXME: Can this happen? if (D.getType()->isVariablyModifiedType()) EmitVLASize(D.getType()); Modified: vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp Tue May 4 20:51:19 2010 (r207632) @@ -279,6 +279,9 @@ static llvm::Constant *getGuardAbortFn(C void CodeGenFunction::EmitStaticCXXBlockVarDeclInit(const VarDecl &D, llvm::GlobalVariable *GV) { + // Bail out early if this initializer isn't reachable. + if (!Builder.GetInsertBlock()) return; + bool ThreadsafeStatics = getContext().getLangOptions().ThreadsafeStatics; llvm::SmallString<256> GuardVName; Modified: vendor/clang/dist/lib/CodeGen/CGObjC.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjC.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/CodeGen/CGObjC.cpp Tue May 4 20:51:19 2010 (r207632) @@ -441,18 +441,20 @@ void CodeGenFunction::GenerateObjCCtorDt LoadObjCSelf(), Ivar, 0); const RecordType *RT = FieldType->getAs(); CXXRecordDecl *FieldClassDecl = cast(RT->getDecl()); - if (Array) { - const llvm::Type *BasePtr = ConvertType(FieldType); - BasePtr = llvm::PointerType::getUnqual(BasePtr); - llvm::Value *BaseAddrPtr = - Builder.CreateBitCast(LV.getAddress(), BasePtr); - EmitCXXAggrDestructorCall(FieldClassDecl->getDestructor(getContext()), - Array, BaseAddrPtr); - } - else - EmitCXXDestructorCall(FieldClassDecl->getDestructor(CGM.getContext()), - Dtor_Complete, /*ForVirtualBase=*/false, - LV.getAddress()); + CXXDestructorDecl *Dtor = FieldClassDecl->getDestructor(getContext()); + if (!Dtor->isTrivial()) + if (Array) { + const llvm::Type *BasePtr = ConvertType(FieldType); + BasePtr = llvm::PointerType::getUnqual(BasePtr); + llvm::Value *BaseAddrPtr = + Builder.CreateBitCast(LV.getAddress(), BasePtr); + EmitCXXAggrDestructorCall(Dtor, + Array, BaseAddrPtr); + } + else + EmitCXXDestructorCall(Dtor, + Dtor_Complete, /*ForVirtualBase=*/false, + LV.getAddress()); } } FinishFunction(); Modified: vendor/clang/dist/lib/Driver/Tools.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Driver/Tools.cpp Tue May 4 20:51:19 2010 (r207632) @@ -21,6 +21,7 @@ #include "clang/Driver/Options.h" #include "clang/Driver/ToolChain.h" #include "clang/Driver/Util.h" +#include "clang/Frontend/DiagnosticOptions.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringSwitch.h" @@ -1082,11 +1083,19 @@ void Clang::ConstructJob(Compilation &C, else CmdArgs.push_back("19"); + CmdArgs.push_back("-fmacro-backtrace-limit"); + if (Arg *A = Args.getLastArg(options::OPT_fmacro_backtrace_limit_EQ)) + CmdArgs.push_back(A->getValue(Args)); + else + CmdArgs.push_back(Args.MakeArgString( + llvm::Twine(DiagnosticOptions::DefaultMacroBacktraceLimit))); + CmdArgs.push_back("-ftemplate-backtrace-limit"); if (Arg *A = Args.getLastArg(options::OPT_ftemplate_backtrace_limit_EQ)) CmdArgs.push_back(A->getValue(Args)); else - CmdArgs.push_back("10"); + CmdArgs.push_back(Args.MakeArgString( + llvm::Twine(DiagnosticOptions::DefaultTemplateBacktraceLimit))); // Pass -fmessage-length=. CmdArgs.push_back("-fmessage-length"); Modified: vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp Tue May 4 20:51:19 2010 (r207632) @@ -247,7 +247,13 @@ static void DiagnosticOptsToArgs(const D Res.push_back("-ferror-limit"); Res.push_back(llvm::utostr(Opts.ErrorLimit)); } - if (Opts.TemplateBacktraceLimit != 10) { + if (Opts.MacroBacktraceLimit + != DiagnosticOptions::DefaultMacroBacktraceLimit) { + Res.push_back("-fmacro-backtrace-limit"); + Res.push_back(llvm::utostr(Opts.MacroBacktraceLimit)); + } + if (Opts.TemplateBacktraceLimit + != DiagnosticOptions::DefaultTemplateBacktraceLimit) { Res.push_back("-ftemplate-backtrace-limit"); Res.push_back(llvm::utostr(Opts.TemplateBacktraceLimit)); } @@ -877,8 +883,13 @@ static void ParseDiagnosticArgs(Diagnost Opts.VerifyDiagnostics = Args.hasArg(OPT_verify); Opts.BinaryOutput = Args.hasArg(OPT_fdiagnostics_binary); Opts.ErrorLimit = getLastArgIntValue(Args, OPT_ferror_limit, 0, Diags); + Opts.MacroBacktraceLimit + = getLastArgIntValue(Args, OPT_fmacro_backtrace_limit, + DiagnosticOptions::DefaultMacroBacktraceLimit, Diags); Opts.TemplateBacktraceLimit - = getLastArgIntValue(Args, OPT_ftemplate_backtrace_limit, 0, Diags); + = getLastArgIntValue(Args, OPT_ftemplate_backtrace_limit, + DiagnosticOptions::DefaultTemplateBacktraceLimit, + Diags); Opts.TabStop = getLastArgIntValue(Args, OPT_ftabstop, DiagnosticOptions::DefaultTabStop, Diags); if (Opts.TabStop == 0 || Opts.TabStop > DiagnosticOptions::MaxTabStop) { Modified: vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp ============================================================================== --- vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp Tue May 4 20:51:19 2010 (r207632) @@ -285,7 +285,10 @@ void TextDiagnosticPrinter::EmitCaretDia const SourceManager &SM, const FixItHint *Hints, unsigned NumHints, - unsigned Columns) { + unsigned Columns, + unsigned OnMacroInst, + unsigned MacroSkipStart, + unsigned MacroSkipEnd) { assert(LangOpts && "Unexpected diagnostic outside source file processing"); assert(!Loc.isInvalid() && "must have a valid source location here"); @@ -293,10 +296,16 @@ void TextDiagnosticPrinter::EmitCaretDia // instantiated (recursively) then emit information about where the token was // spelled from. if (!Loc.isFileID()) { + // Whether to suppress printing this macro instantiation. + bool Suppressed + = OnMacroInst >= MacroSkipStart && OnMacroInst < MacroSkipEnd; + + SourceLocation OneLevelUp = SM.getImmediateInstantiationRange(Loc).first; // FIXME: Map ranges? - EmitCaretDiagnostic(OneLevelUp, Ranges, NumRanges, SM, 0, 0, Columns); - + EmitCaretDiagnostic(OneLevelUp, Ranges, NumRanges, SM, 0, 0, Columns, + OnMacroInst + 1, MacroSkipStart, MacroSkipEnd); + // Map the location. Loc = SM.getImmediateSpellingLoc(Loc); @@ -308,26 +317,38 @@ void TextDiagnosticPrinter::EmitCaretDia Ranges[i] = SourceRange(S, E); } - // Get the pretty name, according to #line directives etc. - PresumedLoc PLoc = SM.getPresumedLoc(Loc); - - // If this diagnostic is not in the main file, print out the "included from" - // lines. - if (LastWarningLoc != PLoc.getIncludeLoc()) { - LastWarningLoc = PLoc.getIncludeLoc(); - PrintIncludeStack(LastWarningLoc, SM); - } + if (!Suppressed) { + // Get the pretty name, according to #line directives etc. + PresumedLoc PLoc = SM.getPresumedLoc(Loc); + + // If this diagnostic is not in the main file, print out the + // "included from" lines. + if (LastWarningLoc != PLoc.getIncludeLoc()) { + LastWarningLoc = PLoc.getIncludeLoc(); + PrintIncludeStack(LastWarningLoc, SM); + } - if (DiagOpts->ShowLocation) { - // Emit the file/line/column that this expansion came from. - OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':'; - if (DiagOpts->ShowColumn) - OS << PLoc.getColumn() << ':'; - OS << ' '; + if (DiagOpts->ShowLocation) { + // Emit the file/line/column that this expansion came from. + OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':'; + if (DiagOpts->ShowColumn) + OS << PLoc.getColumn() << ':'; + OS << ' '; + } + OS << "note: instantiated from:\n"; + + EmitCaretDiagnostic(Loc, Ranges, NumRanges, SM, Hints, NumHints, Columns, + OnMacroInst + 1, MacroSkipStart, MacroSkipEnd); + return; + } + + if (OnMacroInst == MacroSkipStart) { + // Tell the user that we've skipped contexts. + OS << "note: (skipping " << (MacroSkipEnd - MacroSkipStart) + << " contexts in backtrace; use -fmacro-backtrace-limit=0 to see " + "all)\n"; } - OS << "note: instantiated from:\n"; - - EmitCaretDiagnostic(Loc, Ranges, NumRanges, SM, Hints, NumHints, Columns); + return; } @@ -866,10 +887,29 @@ void TextDiagnosticPrinter::HandleDiagno } } + unsigned MacroInstSkipStart = 0, MacroInstSkipEnd = 0; + if (DiagOpts && DiagOpts->MacroBacktraceLimit && !LastLoc.isFileID()) { + // Compute the length of the macro-instantiation backtrace, so that we + // can establish which steps in the macro backtrace we'll skip. + SourceLocation Loc = LastLoc; + unsigned Depth = 0; + do { + ++Depth; + Loc = LastLoc.getManager().getImmediateInstantiationRange(Loc).first; + } while (!Loc.isFileID()); + + if (Depth > DiagOpts->MacroBacktraceLimit) { + MacroInstSkipStart = DiagOpts->MacroBacktraceLimit / 2 + + DiagOpts->MacroBacktraceLimit % 2; + MacroInstSkipEnd = Depth - DiagOpts->MacroBacktraceLimit / 2; + } + } + EmitCaretDiagnostic(LastLoc, Ranges, NumRanges, LastLoc.getManager(), Info.getFixItHints(), Info.getNumFixItHints(), - DiagOpts->MessageLength); + DiagOpts->MessageLength, + 0, MacroInstSkipStart, MacroInstSkipEnd); } OS.flush(); Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Tue May 4 20:51:19 2010 (r207632) @@ -3243,8 +3243,10 @@ Sema::ActOnFunctionDeclarator(Scope* S, for (FunctionProtoType::arg_type_iterator AI = FT->arg_type_begin(), AE = FT->arg_type_end(); AI != AE; ++AI) { ParmVarDecl *Param = ParmVarDecl::Create(Context, NewFD, - SourceLocation(), 0, - *AI, /*TInfo=*/0, + D.getIdentifierLoc(), 0, + *AI, + Context.getTrivialTypeSourceInfo(*AI, + D.getIdentifierLoc()), VarDecl::None, VarDecl::None, 0); Param->setImplicit(); Modified: vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp Tue May 4 20:51:19 2010 (r207632) @@ -4134,13 +4134,16 @@ void Sema::DefineImplicitDestructor(Sour /// /// \param From The expression we are copying from. /// +/// \param CopyingBaseSubobject Whether we're copying a base subobject. +/// Otherwise, it's a non-static member subobject. +/// /// \param Depth Internal parameter recording the depth of the recursion. /// /// \returns A statement or a loop that copies the expressions. static Sema::OwningStmtResult BuildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T, Sema::OwningExprResult To, Sema::OwningExprResult From, - unsigned Depth = 0) { + bool CopyingBaseSubobject, unsigned Depth = 0) { typedef Sema::OwningStmtResult OwningStmtResult; typedef Sema::OwningExprResult OwningExprResult; @@ -4172,6 +4175,25 @@ BuildSingleCopyAssign(Sema &S, SourceLoc } F.done(); + // Suppress the protected check (C++ [class.protected]) for each of the + // assignment operators we found. This strange dance is required when + // we're assigning via a base classes's copy-assignment operator. To + // ensure that we're getting the right base class subobject (without + // ambiguities), we need to cast "this" to that subobject type; to + // ensure that we don't go through the virtual call mechanism, we need + // to qualify the operator= name with the base class (see below). However, + // this means that if the base class has a protected copy assignment + // operator, the protected member access check will fail. So, we + // rewrite "protected" access to "public" access in this case, since we + // know by construction that we're calling from a derived class. + if (CopyingBaseSubobject) { + for (LookupResult::iterator L = OpLookup.begin(), LEnd = OpLookup.end(); + L != LEnd; ++L) { + if (L.getAccess() == AS_protected) + L.setAccess(AS_public); + } + } + // Create the nested-name-specifier that will be used to qualify the // reference to operator=; this is required to suppress the virtual // call mechanism. @@ -4277,7 +4299,8 @@ BuildSingleCopyAssign(Sema &S, SourceLoc // Build the copy for an individual element of the array. OwningStmtResult Copy = BuildSingleCopyAssign(S, Loc, ArrayTy->getElementType(), - move(To), move(From), Depth+1); + move(To), move(From), + CopyingBaseSubobject, Depth+1); if (Copy.isInvalid()) { InitStmt->Destroy(S.Context); return S.StmtError(); @@ -4381,7 +4404,8 @@ void Sema::DefineImplicitCopyAssignment( // Build the copy. OwningStmtResult Copy = BuildSingleCopyAssign(*this, Loc, BaseType, - move(To), Owned(From)); + move(To), Owned(From), + /*CopyingBaseSubobject=*/true); if (Copy.isInvalid()) { Invalid = true; continue; @@ -4501,7 +4525,8 @@ void Sema::DefineImplicitCopyAssignment( // Build the copy of this field. OwningStmtResult Copy = BuildSingleCopyAssign(*this, Loc, FieldType, - move(To), move(From)); + move(To), move(From), + /*CopyingBaseSubobject=*/false); if (Copy.isInvalid()) { Invalid = true; continue; Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Tue May 4 20:51:19 2010 (r207632) @@ -3565,8 +3565,8 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn if (BinaryOperator *BO = dyn_cast(NakedFn)) { if (BO->getOpcode() == BinaryOperator::PtrMemD || BO->getOpcode() == BinaryOperator::PtrMemI) { - if (const FunctionProtoType *FPT = - dyn_cast(BO->getType())) { + if (const FunctionProtoType *FPT + = BO->getType()->getAs()) { QualType ResultTy = FPT->getResultType().getNonReferenceType(); ExprOwningPtr Modified: vendor/clang/dist/lib/Sema/SemaOverload.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaOverload.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Sema/SemaOverload.cpp Tue May 4 20:51:19 2010 (r207632) @@ -6513,7 +6513,7 @@ Sema::BuildCallToMemberFunction(Scope *S MemExpr->setBase(ObjectArg); // Convert the rest of the arguments - const FunctionProtoType *Proto = cast(Method->getType()); + const FunctionProtoType *Proto = Method->getType()->getAs(); if (ConvertArgumentsForCall(&*TheCall, MemExpr, Method, Proto, Args, NumArgs, RParenLoc)) return ExprError(); Modified: vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Tue May 4 20:51:19 2010 (r207632) @@ -1169,6 +1169,27 @@ TemplateDeclInstantiator::VisitCXXMethod return 0; QualType T = TInfo->getType(); + // \brief If the type of this function is not *directly* a function + // type, then we're instantiating the a function that was declared + // via a typedef, e.g., + // + // typedef int functype(int, int); + // functype func; + // + // In this case, we'll just go instantiate the ParmVarDecls that we + // synthesized in the method declaration. + if (!isa(T)) { + assert(!Params.size() && "Instantiating type could not yield parameters"); + for (unsigned I = 0, N = D->getNumParams(); I != N; ++I) { + ParmVarDecl *P = SemaRef.SubstParmVarDecl(D->getParamDecl(I), + TemplateArgs); + if (!P) + return 0; + + Params.push_back(P); + } + } + NestedNameSpecifier *Qualifier = D->getQualifier(); if (Qualifier) { Qualifier = SemaRef.SubstNestedNameSpecifier(Qualifier, Modified: vendor/clang/dist/test/CodeGen/staticinit.c ============================================================================== --- vendor/clang/dist/test/CodeGen/staticinit.c Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/test/CodeGen/staticinit.c Tue May 4 20:51:19 2010 (r207632) @@ -29,3 +29,13 @@ void foo(void) { // RUN: grep "f1.l0 = internal global i32 ptrtoint (i32 ()\* @f1 to i32)" %t int f1(void) { static int l0 = (unsigned) f1; } +// PR7044 +char *f2(char key) { + switch (key) { + static char _msg[40]; + case '\014': + return _msg; + } + + return 0; +} Modified: vendor/clang/dist/test/CodeGenCXX/reference-in-blocks.cpp ============================================================================== --- vendor/clang/dist/test/CodeGenCXX/reference-in-blocks.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/test/CodeGenCXX/reference-in-blocks.cpp Tue May 4 20:51:19 2010 (r207632) @@ -9,6 +9,26 @@ T _i; T get() {return _i;}; }; +// rdar: // 7495203 +class A { + public: + A() : field(10), d1(3.14) {} + void F(); + void S() { + printf(" field = %d\n", field); + printf(" field = %f\n", d1); + } + int field; + double d1; +}; + +void A::F() + { + __block A &tlc = *this; + // crashed in code gen (radar 7495203) + ^{ tlc.S(); }(); + } + int main() { // works @@ -16,6 +36,8 @@ int main() { //crashes in godegen? void (^bl2)(range& ) = ^(range& i){printf("Hello Blocks %d\n", i.get()); }; + + A *a = new A; + a->F(); return 0; } - Modified: vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm ============================================================================== --- vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm Tue May 4 20:51:19 2010 (r207632) @@ -69,3 +69,18 @@ int main() { [a release]; } +// rdar: // 7468090 +class S { +public: + S& operator = (const S&); +}; + +@interface I { + S position; +} +@property(assign, nonatomic) S position; +@end + +@implementation I + @synthesize position; +@end Added: vendor/clang/dist/test/Misc/macro-backtrace-limit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/test/Misc/macro-backtrace-limit.c Tue May 4 20:51:19 2010 (r207632) @@ -0,0 +1,32 @@ +// RUN: %clang-cc1 -fsyntax-only -fmacro-backtrace-limit 5 %s > %t 2>&1 +// RUN: FileCheck %s < %t + +#define M1(A, B) ((A) < (B)) +#define M2(A, B) M1(A, B) +#define M3(A, B) M2(A, B) +#define M4(A, B) M3(A, B) +#define M5(A, B) M4(A, B) +#define M6(A, B) M5(A, B) +#define M7(A, B) M6(A, B) +#define M8(A, B) M7(A, B) +#define M9(A, B) M8(A, B) +#define M10(A, B) M9(A, B) +#define M11(A, B) M10(A, B) +#define M12(A, B) M11(A, B) + +void f(int *ip, float *fp) { + // CHECK: macro-backtrace-limit.c:31:7: warning: comparison of distinct pointer types ('int *' and 'float *') + // CHECK: if (M12(ip, fp)) { } + // CHECK: macro-backtrace-limit.c:15:19: note: instantiated from: + // CHECK: #define M12(A, B) M11(A, B) + // CHECK: macro-backtrace-limit.c:14:19: note: instantiated from: + // CHECK: #define M11(A, B) M10(A, B) + // CHECK: note: (skipping 7 contexts in backtrace; use -fmacro-backtrace-limit=0 to see all) + // CHECK: macro-backtrace-limit.c:6:18: note: instantiated from: + // CHECK: #define M3(A, B) M2(A, B) + // CHECK: macro-backtrace-limit.c:5:18: note: instantiated from: + // CHECK: #define M2(A, B) M1(A, B) + // CHECK: macro-backtrace-limit.c:4:23: note: instantiated from: + // CHECK: #define M1(A, B) ((A) < (B)) + if (M12(ip, fp)) { } +} Modified: vendor/clang/dist/test/Sema/function-redecl.c ============================================================================== --- vendor/clang/dist/test/Sema/function-redecl.c Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/test/Sema/function-redecl.c Tue May 4 20:51:19 2010 (r207632) @@ -120,7 +120,7 @@ extern __typeof (i1) i1; typedef int a(); typedef int a2(int*); a x; -a2 x2; +a2 x2; // expected-note{{passing argument to parameter here}} void test_x() { x(5); x2(5); // expected-warning{{incompatible integer to pointer conversion passing 'int' to parameter of type 'int *'}} Modified: vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp ============================================================================== --- vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp Tue May 4 20:51:19 2010 (r207632) @@ -89,3 +89,31 @@ void j() { e1 = e2; } +namespace ProtectedCheck { + struct X { + protected: + X &operator=(const X&); // expected-note{{declared protected here}} + }; + + struct Y : public X { }; + + void f(Y y) { y = y; } + + struct Z { // expected-error{{'operator=' is a protected member of 'ProtectedCheck::X'}} + X x; + }; + + void f(Z z) { z = z; } // +} + +namespace MultiplePaths { + struct X0 { + X0 &operator=(const X0&); + }; + + struct X1 : public virtual X0 { }; + + struct X2 : X0, X1 { }; + + void f(X2 x2) { x2 = x2; } +} Modified: vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp ============================================================================== --- vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp Tue May 4 20:50:39 2010 (r207631) +++ vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp Tue May 4 20:51:19 2010 (r207632) @@ -76,3 +76,15 @@ namespace PR6990 { { }; } + +namespace InstantiateFunctionTypedef { + template + struct X { + typedef int functype(int, int); + functype func; + }; + + void f(X x) { + (void)x.func(1, 2); + } +} From owner-svn-src-all@FreeBSD.ORG Tue May 4 21:16:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72F6E1065674; Tue, 4 May 2010 21:16:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 628708FC19; Tue, 4 May 2010 21:16:01 +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 o44LG1OG035425; Tue, 4 May 2010 21:16:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LG17J035423; Tue, 4 May 2010 21:16:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005042116.o44LG17J035423@svn.freebsd.org> From: Andrew Thompson Date: Tue, 4 May 2010 21:16:01 +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: r207633 - stable/8/sys/dev/usb/controller 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, 04 May 2010 21:16:01 -0000 Author: thompsa Date: Tue May 4 21:16:01 2010 New Revision: 207633 URL: http://svn.freebsd.org/changeset/base/207633 Log: MFC r201797 Remove unused uhci_dump_qhs(). Modified: stable/8/sys/dev/usb/controller/uhci.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Tue May 4 20:51:19 2010 (r207632) +++ stable/8/sys/dev/usb/controller/uhci.c Tue May 4 21:16:01 2010 (r207633) @@ -830,33 +830,6 @@ uhci_dump_all(uhci_softc_t *sc) } static void -uhci_dump_qhs(uhci_qh_t *sqh) -{ - uint8_t temp; - - temp = uhci_dump_qh(sqh); - - /* - * uhci_dump_qhs displays all the QHs and TDs from the given QH - * onwards Traverses sideways first, then down. - * - * QH1 QH2 No QH TD2.1 TD2.2 TD1.1 etc. - * - * TD2.x being the TDs queued at QH2 and QH1 being referenced from QH1. - */ - - if (temp & 1) - uhci_dump_qhs(sqh->h_next); - else - DPRINTF("No QH\n"); - - if (temp & 2) - uhci_dump_tds(sqh->e_next); - else - DPRINTF("No TD\n"); -} - -static void uhci_dump_tds(uhci_td_t *td) { for (; From owner-svn-src-all@FreeBSD.ORG Tue May 4 21:21:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A73A8106566B; Tue, 4 May 2010 21:21:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB318FC15; Tue, 4 May 2010 21:21: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 o44LL57W036586; Tue, 4 May 2010 21:21:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LL5g6036581; Tue, 4 May 2010 21:21:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005042121.o44LL5g6036581@svn.freebsd.org> From: John Baldwin Date: Tue, 4 May 2010 21:21:05 +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: r207634 - 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: Tue, 04 May 2010 21:21:05 -0000 Author: jhb Date: Tue May 4 21:21:05 2010 New Revision: 207634 URL: http://svn.freebsd.org/changeset/base/207634 Log: MFC: 202767,202774 Add a timeout for the negative name cache entries in the NFS client. This avoids a bogus negative name cache entry from persisting forever when another client creates an entry with the same name within the same NFS server time of day clock tick. Unlike 8.x and later, the timeout is only adjustable via a system-wide sysctl (vfs.nfs.negative_name_timeout) rather than a mount option. Setting the timeout to 0 disables negative name caching. I also fixed one obvious typo where args.timeo should be args.maxgrouplist. Modified: stable/7/sys/nfsclient/nfs_vfsops.c stable/7/sys/nfsclient/nfs_vnops.c stable/7/sys/nfsclient/nfsmount.h stable/7/sys/nfsclient/nfsnode.h Modified: stable/7/sys/nfsclient/nfs_vfsops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vfsops.c Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfs_vfsops.c Tue May 4 21:21:05 2010 (r207634) @@ -951,7 +951,7 @@ nfs_mount(struct mount *mp, struct threa } if (vfs_getopt(mp->mnt_optnew, "maxgroups", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.maxgrouplist); - if (ret != 1 || args.timeo <= 0) { + if (ret != 1 || args.maxgrouplist <= 0) { vfs_mount_error(mp, "illegal maxgroups: %s", opt); error = EINVAL; Modified: stable/7/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vnops.c Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfs_vnops.c Tue May 4 21:21:05 2010 (r207634) @@ -225,6 +225,10 @@ int nfs_directio_enable = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW, &nfs_directio_enable, 0, "Enable NFS directio"); +static u_int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; +SYSCTL_UINT(_vfs_nfs, OID_AUTO, negative_name_timeout, CTLFLAG_RW, + &negnametimeo, 0, "Negative name cache entry timeout"); + /* * This sysctl allows other processes to mmap a file that has been opened * O_DIRECT by a process. In general, having processes mmap the file while @@ -918,9 +922,12 @@ nfs_lookup(struct vop_lookup_args *ap) * We only accept a negative hit in the cache if the * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * negnametimeo seconds. */ - if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 && + if ((u_int)(ticks - np->n_dmtime_ticks) < (negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 && vattr.va_mtime.tv_sec == np->n_dmtime) { nfsstats.lookupcache_hits++; return (ENOENT); @@ -1063,8 +1070,10 @@ nfsmout: */ mtx_lock(&np->n_mtx); if (np->n_dmtime <= dmtime) { - if (np->n_dmtime == 0) + if (np->n_dmtime == 0) { np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } mtx_unlock(&np->n_mtx); cache_enter(dvp, NULL, cnp); } else Modified: stable/7/sys/nfsclient/nfsmount.h ============================================================================== --- stable/7/sys/nfsclient/nfsmount.h Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfsmount.h Tue May 4 21:21:05 2010 (r207634) @@ -114,6 +114,10 @@ struct nfsmount { #define NFS_TPRINTF_DELAY 30 #endif +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #endif #endif Modified: stable/7/sys/nfsclient/nfsnode.h ============================================================================== --- stable/7/sys/nfsclient/nfsnode.h Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfsnode.h Tue May 4 21:21:05 2010 (r207634) @@ -110,6 +110,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ nfsfh_t *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-all@FreeBSD.ORG Tue May 4 21:23:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B8A21065674 for ; Tue, 4 May 2010 21:23:11 +0000 (UTC) (envelope-from ak@natsys-lab.com) Received: from omr13.networksolutionsemail.com (omr13.networksolutionsemail.com [205.178.146.63]) by mx1.freebsd.org (Postfix) with ESMTP id CD00B8FC0C for ; Tue, 4 May 2010 21:23:10 +0000 (UTC) Received: from cm-omr6 (mail.networksolutionsemail.com [205.178.146.50]) by omr13.networksolutionsemail.com (8.13.6/8.13.6) with ESMTP id o44KojT0008424 for ; Tue, 4 May 2010 16:51:11 -0400 Authentication-Results: cm-omr6 smtp.user=ak; auth=pass (CRAM-MD5) Received: from [81.200.119.167] ([81.200.119.167:60518] helo=[81.200.119.167]) by cm-omr6 (envelope-from ) (ecelerity 2.2.2.41 r(31179/31189)) with ESMTPA id A1/44-29263-3B880EB4; Tue, 04 May 2010 16:51:01 -0400 Message-ID: <4BE0C075.2040106@natsys-lab.com> Date: Wed, 05 May 2010 00:48:53 +0000 From: Alexander Krizhanovsky Organization: NatSys Lab. User-Agent: Thunderbird 2.0.0.23 (X11/20100322) MIME-Version: 1.0 To: Kostik Belousov References: <4BCBA7F8.3060109@natsys-lab.com> <20100425145929.GJ2422@deviant.kiev.zoral.com.ua> <4BDF2E4C.4090009@natsys-lab.com> <20100503163524.GE23646@deviant.kiev.zoral.com.ua> In-Reply-To: <20100503163524.GE23646@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, svn-src-all@freebsd.org, ur4ina@gmail.com Subject: Re: [PATCH] RUSAGE_THREAD 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, 04 May 2010 21:23:11 -0000 Konstantin, Concerning i/o counters we collect them in rucollect() in for loop and update in various places, for example in vfs_bio.c. Rusage of an exiting threads is handled in exit1() -> ruadd(). Your version of the patch certainly is more robust, however I'm still concerning about following things, which could be done better: 1) Zeroing of thread runtime statistic looks fine if we use it only for whole process statistic calculating, but now (when it's also used as is for the thread statistic) it should be handled independently, i.e. RUSAGE_{SELF,CHILDREN} calls should not affect the thread structures somehow. So I suppose we need to introduce some new counters to proc structure and counters update code (it was stopped me to go on this way). 2) With first in mind, getruasge(RUSAGE_THREAD) is called in current thread and doesn't affect or use information from other threads, so it definitely should use less number of locks, may be with atomic operations for read-update-write operations. In fact the same getting per-thread statistic in Linux is done _without_ locks at all (however Linux uses different process/thread model). If we're in time and it really looks like a problem (is getrusage() ever a hotspot?) I can try to prepare the patch with less locking on this weekend. Also I still don't understand the sanity check in calccru1() for negativeness of tu ( (int64_t)tu < 0 ) - is it reachable? It seems that it is possible only after about 300 thousand years of uptime... Could you please explain this? Should I write further about the patch to svn-src-all@ (sorry, but I'm new in FreeBSD mailing) ? Kostik Belousov wrote: > On Mon, May 03, 2010 at 08:13:00PM +0000, Alexander Krizhanovsky wrote: > >> Kostik, >> >> thank you very much for the review! >> >> Kostik Belousov wrote: >> >>> On Mon, Apr 19, 2010 at 12:46:48AM +0000, Alexander Krizhanovsky wrote: >>> >>> >>>> Hi all! >>>> >>>> This patch implements per-thread rusage statistic (like RUSAGE_THREAD in >>>> Linux and RUSAGE_LWP in OpenSolaris). >>>> >>>> Unfortunately, we have to acquire a number of locks to read/update >>>> system and user times for current thread rusage information because it's >>>> also used for whole process statistic and needs to be zeroed. >>>> >>>> Any comments are very appreciated. >>>> >>>> It's tested against 8.0-RELEASE. Appropriate PR is submitted. >>>> >>>> -- >>>> Alexander Krizhanovsky >>>> NatSys Lab. (http://natsys-lab.com) >>>> tel: +7 (916) 717-3899, +7 (499) 747-6304 >>>> e-mail: ak@natsys-lab.com >>>> >>>> >>>> >>> I think this should be somewhat modified before commit. >>> >>> First, please separate patch into two pieces. One would introduce >>> ruxagg_tlock() helper and use it in existing locations instead of >>> three-liners. Possibly, add K&R->ANSI C kern_getrusage definition >>> change. >>> >>> Second would actually add RUSAGE_THREAD. There, please follow >>> the style(9), in particular, do not initialize the local variables >>> at the declaration, instead, use explicit initialization in the code. >>> >>> >> Done. I have also introduced third patch for casting microseconds to >> timeval and replaced a few appropriate places in whole kernel code. >> patch-rusage-thread-03052010.txt is incremental for >> patch-ruxagg_tlock-03052010.txt, which is by turn incremental for >> patch-usec2timeval-03052010.txt. >> >> I have made following change for calcru1(): >> - if ((int64_t)tu < 0) { >> - /* XXX: this should be an assert /phk */ >> - printf("calcru: negative runtime of %jd usec for pid %d >> (%s)\n", >> - (intmax_t)tu, p->p_pid, p->p_comm); >> - tu = ruxp->rux_tu; >> - } >> + KASSERT((int64_t)tu < 0, ("calcru: negative runtime of %jd usec " >> + "for pid %d (%s)\n", >> + (intmax_t)tu, p->p_pid, p->p_comm)); >> >> tu can become negative at about 300 thousand years of uptime, so this >> condition seems quite unrealistic and indeed should be replaced by an >> assertion. However I didn't understand why it isn't done so far and the >> comment only was added. Did I miss something? >> >> >>> Should calctru() share the code with calcru1() ? I am esp. concerned >>> with sanity check like negative runtime etc. Possibly, this code >>> >> >from calcru1() should be separated into function used from both >> >>> calcru1() and calctru(). >>> >>> Man page for getrusage(2) should be updated. >>> >>> >> It's added to patch-rusage-thread-03052010.txt. >> >> In the end - shoud I raise a new PR (the original one is kern/145813)? >> >> >>> Thanks for the submission. >>> > > It was some time, I already committed ruxagg_tlock() part, that caused > some feedback, and I reworked the rest of the patch myself. See svn-src@ > for some discussion, and the latest version that I intend to commit > shortly is below. Your comments are welcome. > > Lets discuss third patch after this is landed. > > diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2 > index bdf5d45..423503f 100644 > --- a/lib/libc/sys/getrusage.2 > +++ b/lib/libc/sys/getrusage.2 > @@ -28,7 +28,7 @@ > .\" @(#)getrusage.2 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd June 4, 1993 > +.Dd May 1, 2010 > .Dt GETRUSAGE 2 > .Os > .Sh NAME > @@ -42,6 +42,7 @@ > .In sys/resource.h > .Fd "#define RUSAGE_SELF 0" > .Fd "#define RUSAGE_CHILDREN -1" > +.Fd "#define RUSAGE_THREAD 1" > .Ft int > .Fn getrusage "int who" "struct rusage *rusage" > .Sh DESCRIPTION > @@ -49,11 +50,12 @@ The > .Fn getrusage > system call > returns information describing the resources utilized by the current > -process, or all its terminated child processes. > +thread, the current process, or all its terminated child processes. > The > .Fa who > argument is either > -.Dv RUSAGE_SELF > +.Dv RUSAGE_THREAD , > +.Dv RUSAGE_SELF , > or > .Dv RUSAGE_CHILDREN . > The buffer to which > @@ -175,6 +177,10 @@ The > .Fn getrusage > system call appeared in > .Bx 4.2 . > +The > +.Dv RUSAGE_THREAD > +facility first appeared in > +.Fx 8.1 . > .Sh BUGS > There is no way to obtain information about a child process > that has not yet terminated. > diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c > index 49a3097..6c50f1f 100644 > --- a/sys/kern/kern_proc.c > +++ b/sys/kern/kern_proc.c > @@ -901,7 +901,7 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread) > kp->ki_pri.pri_user = td->td_user_pri; > > if (preferthread) { > - kp->ki_runtime = cputick2usec(td->td_runtime); > + kp->ki_runtime = td->td_rux.rux_runtime; > kp->ki_pctcpu = sched_pctcpu(td); > kp->ki_estcpu = td->td_estcpu; > } > diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c > index a3ed75d..0bc78d0 100644 > --- a/sys/kern/kern_resource.c > +++ b/sys/kern/kern_resource.c > @@ -76,7 +76,7 @@ static void calcru1(struct proc *p, struct rusage_ext *ruxp, > struct timeval *up, struct timeval *sp); > static int donice(struct thread *td, struct proc *chgp, int n); > static struct uidinfo *uilookup(uid_t uid); > -static void ruxagg_tlock(struct proc *p, struct thread *td); > +static void ruxagg(struct proc *p, struct thread *td); > > /* > * Resource controls and accounting. > @@ -630,7 +630,7 @@ lim_cb(void *arg) > return; > PROC_SLOCK(p); > FOREACH_THREAD_IN_PROC(p, td) { > - ruxagg_tlock(p, td); > + ruxagg(p, td); > } > PROC_SUNLOCK(p); > if (p->p_rux.rux_runtime > p->p_cpulimit * cpu_tickrate()) { > @@ -841,7 +841,7 @@ calcru(struct proc *p, struct timeval *up, struct timeval *sp) > FOREACH_THREAD_IN_PROC(p, td) { > if (td->td_incruntime == 0) > continue; > - ruxagg_tlock(p, td); > + ruxagg(p, td); > } > calcru1(p, &p->p_rux, up, sp); > } > @@ -961,6 +961,16 @@ kern_getrusage(struct thread *td, int who, struct rusage *rup) > calccru(p, &rup->ru_utime, &rup->ru_stime); > break; > > + case RUSAGE_THREAD: > + PROC_SLOCK(p); > + ruxagg(p, td); > + PROC_SUNLOCK(p); > + thread_lock(td); > + *rup = td->td_ru; > + calcru1(p, &td->td_rux, &rup->ru_utime, &rup->ru_stime); > + thread_unlock(td); > + break; > + > default: > error = EINVAL; > } > @@ -1001,7 +1011,7 @@ ruadd(struct rusage *ru, struct rusage_ext *rux, struct rusage *ru2, > * Aggregate tick counts into the proc's rusage_ext. > */ > void > -ruxagg(struct rusage_ext *rux, struct thread *td) > +ruxagg_locked(struct rusage_ext *rux, struct thread *td) > { > > THREAD_LOCK_ASSERT(td, MA_OWNED); > @@ -1010,18 +1020,19 @@ ruxagg(struct rusage_ext *rux, struct thread *td) > rux->rux_uticks += td->td_uticks; > rux->rux_sticks += td->td_sticks; > rux->rux_iticks += td->td_iticks; > - td->td_incruntime = 0; > - td->td_uticks = 0; > - td->td_iticks = 0; > - td->td_sticks = 0; > } > > static void > -ruxagg_tlock(struct proc *p, struct thread *td) > +ruxagg(struct proc *p, struct thread *td) > { > > thread_lock(td); > - ruxagg(&p->p_rux, td); > + ruxagg_locked(&p->p_rux, td); > + ruxagg_locked(&td->td_rux, td); > + td->td_incruntime = 0; > + td->td_uticks = 0; > + td->td_iticks = 0; > + td->td_sticks = 0; > thread_unlock(td); > } > > @@ -1039,7 +1050,7 @@ rufetch(struct proc *p, struct rusage *ru) > *ru = p->p_ru; > if (p->p_numthreads > 0) { > FOREACH_THREAD_IN_PROC(p, td) { > - ruxagg_tlock(p, td); > + ruxagg(p, td); > rucollect(ru, &td->td_ru); > } > } > diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c > index 9be4c2f..b32c584 100644 > --- a/sys/kern/kern_thread.c > +++ b/sys/kern/kern_thread.c > @@ -432,7 +432,7 @@ thread_exit(void) > PROC_UNLOCK(p); > thread_lock(td); > /* Save our tick information with both the thread and proc locked */ > - ruxagg(&p->p_rux, td); > + ruxagg_locked(&p->p_rux, td); > PROC_SUNLOCK(p); > td->td_state = TDS_INACTIVE; > #ifdef WITNESS > diff --git a/sys/sys/proc.h b/sys/sys/proc.h > index fb31cfc..e32e494 100644 > --- a/sys/sys/proc.h > +++ b/sys/sys/proc.h > @@ -173,6 +173,27 @@ struct kdtrace_thread; > struct cpuset; > > /* > + * XXX: Does this belong in resource.h or resourcevar.h instead? > + * Resource usage extension. The times in rusage structs in the kernel are > + * never up to date. The actual times are kept as runtimes and tick counts > + * (with control info in the "previous" times), and are converted when > + * userland asks for rusage info. Backwards compatibility prevents putting > + * this directly in the user-visible rusage struct. > + * > + * Locking for p_rux: (cj) means (j) for p_rux and (c) for p_crux. > + * Locking for td_rux: (t) for all fields. > + */ > +struct rusage_ext { > + u_int64_t rux_runtime; /* (cj) Real time. */ > + u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */ > + u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ > + u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ > + u_int64_t rux_uu; /* (c) Previous user time in usec. */ > + u_int64_t rux_su; /* (c) Previous sys time in usec. */ > + u_int64_t rux_tu; /* (c) Previous total time in usec. */ > +}; > + > +/* > * Kernel runnable context (thread). > * This is what is put to sleep and reactivated. > * Thread context. Processes may have multiple threads. > @@ -219,7 +240,8 @@ struct thread { > u_int td_estcpu; /* (t) estimated cpu utilization */ > int td_slptick; /* (t) Time at sleep. */ > int td_blktick; /* (t) Time spent blocked. */ > - struct rusage td_ru; /* (t) rusage information */ > + struct rusage td_ru; /* (t) rusage information. */ > + struct rusage_ext td_rux; /* (t) Internal rusage information. */ > uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ > uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ > u_int td_pticks; /* (t) Statclock hits for profiling */ > @@ -426,26 +448,6 @@ do { \ > #define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN > > /* > - * XXX: Does this belong in resource.h or resourcevar.h instead? > - * Resource usage extension. The times in rusage structs in the kernel are > - * never up to date. The actual times are kept as runtimes and tick counts > - * (with control info in the "previous" times), and are converted when > - * userland asks for rusage info. Backwards compatibility prevents putting > - * this directly in the user-visible rusage struct. > - * > - * Locking: (cj) means (j) for p_rux and (c) for p_crux. > - */ > -struct rusage_ext { > - u_int64_t rux_runtime; /* (cj) Real time. */ > - u_int64_t rux_uticks; /* (cj) Statclock hits in user mode. */ > - u_int64_t rux_sticks; /* (cj) Statclock hits in sys mode. */ > - u_int64_t rux_iticks; /* (cj) Statclock hits in intr mode. */ > - u_int64_t rux_uu; /* (c) Previous user time in usec. */ > - u_int64_t rux_su; /* (c) Previous sys time in usec. */ > - u_int64_t rux_tu; /* (c) Previous total time in usec. */ > -}; > - > -/* > * Process structure. > */ > struct proc { > diff --git a/sys/sys/resource.h b/sys/sys/resource.h > index 9af96af..e703744 100644 > --- a/sys/sys/resource.h > +++ b/sys/sys/resource.h > @@ -56,6 +56,7 @@ > > #define RUSAGE_SELF 0 > #define RUSAGE_CHILDREN -1 > +#define RUSAGE_THREAD 1 > > struct rusage { > struct timeval ru_utime; /* user time used */ > diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h > index 21728aa..95a9b49 100644 > --- a/sys/sys/resourcevar.h > +++ b/sys/sys/resourcevar.h > @@ -131,7 +131,7 @@ void rucollect(struct rusage *ru, struct rusage *ru2); > void rufetch(struct proc *p, struct rusage *ru); > void rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up, > struct timeval *sp); > -void ruxagg(struct rusage_ext *rux, struct thread *td); > +void ruxagg_locked(struct rusage_ext *rux, struct thread *td); > int suswintr(void *base, int word); > struct uidinfo > *uifind(uid_t uid); > -- Alexander Krizhanovsky NatSys Lab. (http://natsys-lab.com) tel: +7 (916) 717-3899, +7 (499) 747-6304 e-mail: ak@natsys-lab.com From owner-svn-src-all@FreeBSD.ORG Tue May 4 21:23:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC5F21065674; Tue, 4 May 2010 21:23:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CCD3B8FC16; Tue, 4 May 2010 21:23: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 o44LNxxS037248; Tue, 4 May 2010 21:23:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LNxF2037246; Tue, 4 May 2010 21:23:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005042123.o44LNxF2037246@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 May 2010 21:23: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: r207635 - head/sys/dev/sge 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, 04 May 2010 21:24:00 -0000 Author: yongari Date: Tue May 4 21:23:59 2010 New Revision: 207635 URL: http://svn.freebsd.org/changeset/base/207635 Log: Free entire mbuf chain instead of the first mbuf. Modified: head/sys/dev/sge/if_sge.c Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Tue May 4 21:21:05 2010 (r207634) +++ head/sys/dev/sge/if_sge.c Tue May 4 21:23:59 2010 (r207635) @@ -1015,7 +1015,7 @@ sge_list_tx_free(struct sge_softc *sc) bus_dmamap_sync(cd->sge_txmbuf_tag, txd->tx_dmamap, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(cd->sge_txmbuf_tag, txd->tx_dmamap); - m_free(txd->tx_m); + m_freem(txd->tx_m); txd->tx_m = NULL; txd->tx_ndesc = 0; } @@ -1064,7 +1064,7 @@ sge_list_rx_free(struct sge_softc *sc) BUS_DMASYNC_POSTREAD); bus_dmamap_unload(cd->sge_rxmbuf_tag, rxd->rx_dmamap); - m_free(rxd->rx_m); + m_freem(rxd->rx_m); rxd->rx_m = NULL; } } From owner-svn-src-all@FreeBSD.ORG Tue May 4 21:56:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 671BD1065672; Tue, 4 May 2010 21:56:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 566558FC08; Tue, 4 May 2010 21:56: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 o44LuGc4049832; Tue, 4 May 2010 21:56:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LuGq5049829; Tue, 4 May 2010 21:56:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005042156.o44LuGq5049829@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 4 May 2010 21:56:16 +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: r207636 - stable/7/usr.bin/stat 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, 04 May 2010 21:56:16 -0000 Author: jilles Date: Tue May 4 21:56:16 2010 New Revision: 207636 URL: http://svn.freebsd.org/changeset/base/207636 Log: MFC r207153: stat: Allow -f %Sf to display the file flags symbolically. PR: 124349 Modified: stable/7/usr.bin/stat/stat.1 stable/7/usr.bin/stat/stat.c Directory Properties: stable/7/usr.bin/stat/ (props changed) Modified: stable/7/usr.bin/stat/stat.1 ============================================================================== --- stable/7/usr.bin/stat/stat.1 Tue May 4 21:23:59 2010 (r207635) +++ stable/7/usr.bin/stat/stat.1 Tue May 4 21:56:16 2010 (r207636) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2007 +.Dd April 24, 2010 .Dt STAT 1 .Os .Sh NAME @@ -239,6 +239,11 @@ Display date in format. .It Cm dr Display actual device name. +.It Cm f +Display the flags of +.Ar file +as in +.Nm ls Fl lTdo . .It Cm gu Display group or user name. .It Cm p Modified: stable/7/usr.bin/stat/stat.c ============================================================================== --- stable/7/usr.bin/stat/stat.c Tue May 4 21:23:59 2010 (r207635) +++ stable/7/usr.bin/stat/stat.c Tue May 4 21:56:16 2010 (r207636) @@ -187,6 +187,9 @@ int format1(const struct stat *, /* stat char *, size_t, /* a place to put the output */ int, int, int, int, /* the parsed format */ int, int); +#if HAVE_STRUCT_STAT_ST_FLAGS +char *xfflagstostr(unsigned long); +#endif char *timefmt; int linkfail; @@ -329,6 +332,25 @@ main(int argc, char *argv[]) return (am_readlink ? linkfail : errs); } +#if HAVE_STRUCT_STAT_ST_FLAGS +/* + * fflagstostr() wrapper that leaks only once + */ +char * +xfflagstostr(unsigned long fflags) +{ + static char *str = NULL; + + if (str != NULL) + free(str); + + str = fflagstostr(fflags); + if (str == NULL) + err(1, "fflagstostr"); + return (str); +} +#endif /* HAVE_STRUCT_STAT_ST_FLAGS */ + void usage(const char *synopsis) { @@ -721,8 +743,11 @@ format1(const struct stat *st, case SHOW_st_flags: small = (sizeof(st->st_flags) == 4); data = st->st_flags; - sdata = NULL; - formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX; + sdata = xfflagstostr(st->st_flags); + if (*sdata == '\0') + sdata = "-"; + formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX | + FMTF_STRING; if (ofmt == 0) ofmt = FMTF_UNSIGNED; break; From owner-svn-src-all@FreeBSD.ORG Tue May 4 22:22:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D2851065749; Tue, 4 May 2010 22:22:33 +0000 (UTC) (envelope-from wes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BFDE78FC14; Tue, 4 May 2010 22:22: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 o44MMWiX059911; Tue, 4 May 2010 22:22:32 GMT (envelope-from wes@svn.freebsd.org) Received: (from wes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44MMWxf059910; Tue, 4 May 2010 22:22:32 GMT (envelope-from wes@svn.freebsd.org) Message-Id: <201005042222.o44MMWxf059910@svn.freebsd.org> From: Wes Peters Date: Tue, 4 May 2010 22:22:32 +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: r207637 - 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: Tue, 04 May 2010 22:22:33 -0000 Author: wes Date: Tue May 4 22:22:31 2010 New Revision: 207637 URL: http://svn.freebsd.org/changeset/base/207637 Log: Update my email address. Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue May 4 21:56:16 2010 (r207636) +++ svnadmin/conf/access Tue May 4 22:22:31 2010 (r207637) @@ -228,7 +228,7 @@ uqs vanhu versus weongyo -wes wes@opensail.org +wes wilko wkbcommt@xs4all.nl will wkoszek From owner-svn-src-all@FreeBSD.ORG Tue May 4 22:24:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F25121065679; Tue, 4 May 2010 22:24:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E2EDC8FC1D; Tue, 4 May 2010 22:24: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 o44MOJmx060341; Tue, 4 May 2010 22:24:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44MOJ26060339; Tue, 4 May 2010 22:24:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005042224.o44MOJ26060339@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 4 May 2010 22:24: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: r207638 - head/sys/dev/msk 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, 04 May 2010 22:24:20 -0000 Author: yongari Date: Tue May 4 22:24:19 2010 New Revision: 207638 URL: http://svn.freebsd.org/changeset/base/207638 Log: When VLAN hardware tagging is disabled, make sure to disable VLAN checksum offloading as well as TSO over VLAN. Reported by: jhb Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Tue May 4 22:22:31 2010 (r207637) +++ head/sys/dev/msk/if_msk.c Tue May 4 22:24:19 2010 (r207638) @@ -1101,7 +1101,8 @@ msk_ioctl(struct ifnet *ifp, u_long comm (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if ((IFCAP_VLAN_HWTAGGING & ifp->if_capenable) == 0) - ifp->if_capenable &= ~IFCAP_VLAN_HWTSO; + ifp->if_capenable &= + ~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM); msk_setvlan(sc_if, ifp); } if (ifp->if_mtu > ETHERMTU && From owner-svn-src-all@FreeBSD.ORG Tue May 4 23:55:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F3FE106564A; Tue, 4 May 2010 23:55:08 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5848FC0C; Tue, 4 May 2010 23:55: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 o44Nt85t080179; Tue, 4 May 2010 23:55:08 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44Nt8VO080177; Tue, 4 May 2010 23:55:08 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201005042355.o44Nt8VO080177@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 4 May 2010 23:55: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: r207639 - 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: Tue, 04 May 2010 23:55:08 -0000 Author: np Date: Tue May 4 23:55:08 2010 New Revision: 207639 URL: http://svn.freebsd.org/changeset/base/207639 Log: Add IFCAP_LINKSTATE to cxgb's capabilities. MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Tue May 4 22:24:19 2010 (r207638) +++ head/sys/dev/cxgb/cxgb_main.c Tue May 4 23:55:08 2010 (r207639) @@ -981,7 +981,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO) + IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #define CXGB_CAP_ENABLE (CXGB_CAP & ~IFCAP_TSO6) static int From owner-svn-src-all@FreeBSD.ORG Wed May 5 00:38:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68D00106567A; Wed, 5 May 2010 00:38:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 57D9E8FC0A; Wed, 5 May 2010 00:38: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 o450cKEI089723; Wed, 5 May 2010 00:38:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450cK27089721; Wed, 5 May 2010 00:38:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050038.o450cK27089721@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:38: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: r207640 - stable/8/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: Wed, 05 May 2010 00:38:20 -0000 Author: delphij Date: Wed May 5 00:38:20 2010 New Revision: 207640 URL: http://svn.freebsd.org/changeset/base/207640 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/8/share/mk/bsd.cpu.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.cpu.mk ============================================================================== --- stable/8/share/mk/bsd.cpu.mk Tue May 4 23:55:08 2010 (r207639) +++ stable/8/share/mk/bsd.cpu.mk Wed May 5 00:38:20 2010 (r207640) @@ -9,7 +9,7 @@ _CPUCFLAGS = . if ${MACHINE_ARCH} == "i386" MACHINE_CPU = i486 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "powerpc" From owner-svn-src-all@FreeBSD.ORG Wed May 5 00:39:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D529D1065673; Wed, 5 May 2010 00:39:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C428D8FC17; Wed, 5 May 2010 00:39: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 o450d6LO089940; Wed, 5 May 2010 00:39:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450d63N089938; Wed, 5 May 2010 00:39:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050039.o450d63N089938@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:39: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: r207641 - stable/7/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: Wed, 05 May 2010 00:39:06 -0000 Author: delphij Date: Wed May 5 00:39:06 2010 New Revision: 207641 URL: http://svn.freebsd.org/changeset/base/207641 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/7/share/mk/bsd.cpu.mk Directory Properties: stable/7/share/mk/ (props changed) Modified: stable/7/share/mk/bsd.cpu.mk ============================================================================== --- stable/7/share/mk/bsd.cpu.mk Wed May 5 00:38:20 2010 (r207640) +++ stable/7/share/mk/bsd.cpu.mk Wed May 5 00:39:06 2010 (r207641) @@ -9,7 +9,7 @@ _CPUCFLAGS = . if ${MACHINE_ARCH} == "i386" MACHINE_CPU = i486 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "sparc64" From owner-svn-src-all@FreeBSD.ORG Wed May 5 00:39:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B3741065675; Wed, 5 May 2010 00:39:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3268FC15; Wed, 5 May 2010 00:39: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 o450doZN090127; Wed, 5 May 2010 00:39:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450doVB090125; Wed, 5 May 2010 00:39:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050039.o450doVB090125@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207642 - stable/6/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: Wed, 05 May 2010 00:39:50 -0000 Author: delphij Date: Wed May 5 00:39:50 2010 New Revision: 207642 URL: http://svn.freebsd.org/changeset/base/207642 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/6/share/mk/bsd.cpu.mk Directory Properties: stable/6/share/mk/ (props changed) Modified: stable/6/share/mk/bsd.cpu.mk ============================================================================== --- stable/6/share/mk/bsd.cpu.mk Wed May 5 00:39:06 2010 (r207641) +++ stable/6/share/mk/bsd.cpu.mk Wed May 5 00:39:50 2010 (r207642) @@ -12,7 +12,7 @@ MACHINE_CPU = i486 _CPUCFLAGS = -mcpu=ev4 -mtune=ev5 MACHINE_CPU = ev4 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "sparc64" From owner-svn-src-all@FreeBSD.ORG Wed May 5 00:41:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 041BE1065673; Wed, 5 May 2010 00:41:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E68A98FC0A; Wed, 5 May 2010 00: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 o450feg7090593; Wed, 5 May 2010 00:41:40 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450fesw090589; Wed, 5 May 2010 00:41:40 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201005050041.o450fesw090589@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 5 May 2010 00: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: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool 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, 05 May 2010 00:41:41 -0000 Author: np Date: Wed May 5 00:41:40 2010 New Revision: 207643 URL: http://svn.freebsd.org/changeset/base/207643 Log: Add support for hardware filters to cxgb(4). The T3 chip can inspect L2/3/4 headers and can drop or steer packets as instructed. Filtering based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac addr is possible. Add support in cxgbtool to program these filters. Some simple examples: Drop all tcp/80 traffic coming from the subnet specified. # cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop Steer all incoming UDP traffic to qset 0. # cxgbtool cxgb2 filter 1 type udp queue 0 action pass Steer all tcp traffic from 192.168.1.1 to qset 1. # cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass Drop fragments. # cxgbtool cxgb2 filter 3 type frag action drop List all filters. # cxgbtool cxgb2 filter list index SIP DIP sport dport VLAN PRI P/MAC type Q 0 192.168.1.0/24 0.0.0.0 * 80 0 0/1 */* tcp - 1 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* udp 0 2 192.168.1.1/32 0.0.0.0 * * 0 0/1 */* tcp 1 3 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* frag - 16367 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* * * MFC after: 2 weeks Modified: head/sys/dev/cxgb/cxgb_ioctl.h head/sys/dev/cxgb/cxgb_main.c head/usr.sbin/cxgbtool/cxgbtool.c Modified: head/sys/dev/cxgb/cxgb_ioctl.h ============================================================================== --- head/sys/dev/cxgb/cxgb_ioctl.h Wed May 5 00:39:50 2010 (r207642) +++ head/sys/dev/cxgb/cxgb_ioctl.h Wed May 5 00:41:40 2010 (r207643) @@ -59,6 +59,9 @@ enum { CH_CLEAR_STATS, CH_GET_UP_LA, CH_GET_UP_IOQS, + CH_SET_FILTER, + CH_DEL_FILTER, + CH_GET_FILTER, }; /* statistics categories */ @@ -215,6 +218,29 @@ struct ch_up_ioqs { struct t3_ioq_entry *data; }; +struct ch_filter_tuple { + uint32_t sip; + uint32_t dip; + uint16_t sport; + uint16_t dport; + uint16_t vlan:12; + uint16_t vlan_prio:3; +}; + +struct ch_filter { + uint32_t filter_id; + struct ch_filter_tuple val; + struct ch_filter_tuple mask; + uint16_t mac_addr_idx; + uint8_t mac_hit:1; + uint8_t proto:2; + + uint8_t want_filter_id:1; + uint8_t pass:1; + uint8_t rss:1; + uint8_t qset; +}; + #define CHELSIO_SETREG _IOW('f', CH_SETREG, struct ch_reg) #define CHELSIO_GETREG _IOWR('f', CH_GETREG, struct ch_reg) #define CHELSIO_GETMTUTAB _IOR('f', CH_GETMTUTAB, struct ch_mtus) @@ -239,4 +265,7 @@ struct ch_up_ioqs { #define CHELSIO_GET_EEPROM _IOWR('f', CH_GET_EEPROM, struct ch_eeprom) #define CHELSIO_GET_UP_LA _IOWR('f', CH_GET_UP_LA, struct ch_up_la) #define CHELSIO_GET_UP_IOQS _IOWR('f', CH_GET_UP_IOQS, struct ch_up_ioqs) +#define CHELSIO_SET_FILTER _IOW('f', CH_SET_FILTER, struct ch_filter) +#define CHELSIO_DEL_FILTER _IOW('f', CH_DEL_FILTER, struct ch_filter) +#define CHELSIO_GET_FILTER _IOWR('f', CH_GET_FILTER, struct ch_filter) #endif Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed May 5 00:39:50 2010 (r207642) +++ head/sys/dev/cxgb/cxgb_main.c Wed May 5 00:41:40 2010 (r207643) @@ -99,6 +99,13 @@ static void cxgb_ext_intr_handler(void * static void cxgb_tick_handler(void *, int); static void cxgb_tick(void *); static void setup_rss(adapter_t *sc); +static int alloc_filters(struct adapter *); +static int setup_hw_filters(struct adapter *); +static int set_filter(struct adapter *, int, const struct filter_info *); +static inline void mk_set_tcb_field(struct cpl_set_tcb_field *, unsigned int, + unsigned int, u64, u64); +static inline void set_tcb_field_ulp(struct cpl_set_tcb_field *, unsigned int, + unsigned int, u64, u64); /* Attachment glue for the PCI controller end of the device. Each port of * the device is attached separately, as defined later. @@ -1661,6 +1668,13 @@ cxgb_up(struct adapter *sc) if ((err = update_tpsram(sc))) goto out; + if (is_offload(sc)) { + sc->params.mc5.nservers = 0; + sc->params.mc5.nroutes = 0; + sc->params.mc5.nfilters = t3_mc5_size(&sc->mc5) - + MC5_MIN_TIDS; + } + err = t3_init_hw(sc, 0); if (err) goto out; @@ -1672,6 +1686,7 @@ cxgb_up(struct adapter *sc) if (err) goto out; + alloc_filters(sc); setup_rss(sc); t3_intr_clear(sc); @@ -1698,6 +1713,7 @@ cxgb_up(struct adapter *sc) if (!(sc->flags & QUEUES_BOUND)) { bind_qsets(sc); + setup_hw_filters(sc); sc->flags |= QUEUES_BOUND; } @@ -3076,6 +3092,139 @@ cxgb_extension_ioctl(struct cdev *dev, u free(buf, M_DEVBUF); break; } + case CHELSIO_SET_FILTER: { + struct ch_filter *f = (struct ch_filter *)data;; + struct filter_info *p; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (!is_offload(sc)) + return (EOPNOTSUPP); /* No TCAM */ + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); /* mc5 not setup yet */ + if (nfilters == 0) + return (EBUSY); /* TOE will use TCAM */ + + /* sanity checks */ + if (f->filter_id >= nfilters || + (f->val.dip && f->mask.dip != 0xffffffff) || + (f->val.sport && f->mask.sport != 0xffff) || + (f->val.dport && f->mask.dport != 0xffff) || + (f->val.vlan && f->mask.vlan != 0xfff) || + (f->val.vlan_prio && + f->mask.vlan_prio != FILTER_NO_VLAN_PRI) || + (f->mac_addr_idx != 0xffff && f->mac_addr_idx > 15) || + f->qset >= SGE_QSETS || + sc->rrss_map[f->qset] >= RSS_TABLE_SIZE) + return (EINVAL); + + /* Was allocated with M_WAITOK */ + KASSERT(sc->filters, ("filter table NULL\n")); + + p = &sc->filters[f->filter_id]; + if (p->locked) + return (EPERM); + + bzero(p, sizeof(*p)); + p->sip = f->val.sip; + p->sip_mask = f->mask.sip; + p->dip = f->val.dip; + p->sport = f->val.sport; + p->dport = f->val.dport; + p->vlan = f->mask.vlan ? f->val.vlan : 0xfff; + p->vlan_prio = f->mask.vlan_prio ? (f->val.vlan_prio & 6) : + FILTER_NO_VLAN_PRI; + p->mac_hit = f->mac_hit; + p->mac_vld = f->mac_addr_idx != 0xffff; + p->mac_idx = f->mac_addr_idx; + p->pkt_type = f->proto; + p->report_filter_id = f->want_filter_id; + p->pass = f->pass; + p->rss = f->rss; + p->qset = f->qset; + + error = set_filter(sc, f->filter_id, p); + if (error == 0) + p->valid = 1; + break; + } + case CHELSIO_DEL_FILTER: { + struct ch_filter *f = (struct ch_filter *)data; + struct filter_info *p; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (!is_offload(sc)) + return (EOPNOTSUPP); + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); + if (nfilters == 0 || sc->filters == NULL) + return (EINVAL); + if (f->filter_id >= nfilters) + return (EINVAL); + + p = &sc->filters[f->filter_id]; + if (p->locked) + return (EPERM); + if (!p->valid) + return (EFAULT); /* Read "Bad address" as "Bad index" */ + + bzero(p, sizeof(*p)); + p->sip = p->sip_mask = 0xffffffff; + p->vlan = 0xfff; + p->vlan_prio = FILTER_NO_VLAN_PRI; + p->pkt_type = 1; + error = set_filter(sc, f->filter_id, p); + break; + } + case CHELSIO_GET_FILTER: { + struct ch_filter *f = (struct ch_filter *)data; + struct filter_info *p; + unsigned int i, nfilters = sc->params.mc5.nfilters; + + if (!is_offload(sc)) + return (EOPNOTSUPP); + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); + if (nfilters == 0 || sc->filters == NULL) + return (EINVAL); + + i = f->filter_id == 0xffffffff ? 0 : f->filter_id + 1; + for (; i < nfilters; i++) { + p = &sc->filters[i]; + if (!p->valid) + continue; + + bzero(f, sizeof(*f)); + + f->filter_id = i; + f->val.sip = p->sip; + f->mask.sip = p->sip_mask; + f->val.dip = p->dip; + f->mask.dip = p->dip ? 0xffffffff : 0; + f->val.sport = p->sport; + f->mask.sport = p->sport ? 0xffff : 0; + f->val.dport = p->dport; + f->mask.dport = p->dport ? 0xffff : 0; + f->val.vlan = p->vlan == 0xfff ? 0 : p->vlan; + f->mask.vlan = p->vlan == 0xfff ? 0 : 0xfff; + f->val.vlan_prio = p->vlan_prio == FILTER_NO_VLAN_PRI ? + 0 : p->vlan_prio; + f->mask.vlan_prio = p->vlan_prio == FILTER_NO_VLAN_PRI ? + 0 : FILTER_NO_VLAN_PRI; + f->mac_hit = p->mac_hit; + f->mac_addr_idx = p->mac_vld ? p->mac_idx : 0xffff; + f->proto = p->pkt_type; + f->want_filter_id = p->report_filter_id; + f->pass = p->pass; + f->rss = p->rss; + f->qset = p->qset; + + break; + } + + if (i == nfilters) + f->filter_id = 0xffffffff; + break; + } default: return (EOPNOTSUPP); break; @@ -3130,5 +3279,129 @@ cxgb_get_regs(adapter_t *sc, struct ch_i XGM_REG(A_XGM_RX_SPI4_SOP_EOP_CNT, 1)); } +static int +alloc_filters(struct adapter *sc) +{ + struct filter_info *p; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (nfilters == 0) + return (0); + + p = malloc(sizeof(*p) * nfilters, M_DEVBUF, M_WAITOK | M_ZERO); + sc->filters = p; + + p = &sc->filters[nfilters - 1]; + p->vlan = 0xfff; + p->vlan_prio = FILTER_NO_VLAN_PRI; + p->pass = p->rss = p->valid = p->locked = 1; + + return (0); +} + +static int +setup_hw_filters(struct adapter *sc) +{ + int i, rc; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (!sc->filters) + return (0); + + t3_enable_filters(sc); + + for (i = rc = 0; i < nfilters && !rc; i++) { + if (sc->filters[i].locked) + rc = set_filter(sc, i, &sc->filters[i]); + } + + return (rc); +} + +static int +set_filter(struct adapter *sc, int id, const struct filter_info *f) +{ + int len; + struct mbuf *m; + struct ulp_txpkt *txpkt; + struct work_request_hdr *wr; + struct cpl_pass_open_req *oreq; + struct cpl_set_tcb_field *sreq; + + len = sizeof(*wr) + sizeof(*oreq) + 2 * sizeof(*sreq); + KASSERT(len <= MHLEN, ("filter request too big for an mbuf")); + + id += t3_mc5_size(&sc->mc5) - sc->params.mc5.nroutes - + sc->params.mc5.nfilters; + + m = m_gethdr(M_WAITOK, MT_DATA); + m->m_len = m->m_pkthdr.len = len; + bzero(mtod(m, char *), len); + + wr = mtod(m, struct work_request_hdr *); + wr->wrh_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS) | F_WR_ATOMIC); + + oreq = (struct cpl_pass_open_req *)(wr + 1); + txpkt = (struct ulp_txpkt *)oreq; + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); + txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*oreq) / 8)); + OPCODE_TID(oreq) = htonl(MK_OPCODE_TID(CPL_PASS_OPEN_REQ, id)); + oreq->local_port = htons(f->dport); + oreq->peer_port = htons(f->sport); + oreq->local_ip = htonl(f->dip); + oreq->peer_ip = htonl(f->sip); + oreq->peer_netmask = htonl(f->sip_mask); + oreq->opt0h = 0; + oreq->opt0l = htonl(F_NO_OFFLOAD); + oreq->opt1 = htonl(V_MAC_MATCH_VALID(f->mac_vld) | + V_CONN_POLICY(CPL_CONN_POLICY_FILTER) | + V_VLAN_PRI(f->vlan_prio >> 1) | + V_VLAN_PRI_VALID(f->vlan_prio != FILTER_NO_VLAN_PRI) | + V_PKT_TYPE(f->pkt_type) | V_OPT1_VLAN(f->vlan) | + V_MAC_MATCH(f->mac_idx | (f->mac_hit << 4))); + + sreq = (struct cpl_set_tcb_field *)(oreq + 1); + set_tcb_field_ulp(sreq, id, 1, 0x1800808000ULL, + (f->report_filter_id << 15) | (1 << 23) | + ((u64)f->pass << 35) | ((u64)!f->rss << 36)); + set_tcb_field_ulp(sreq + 1, id, 0, 0xffffffff, (2 << 19) | 1); + t3_mgmt_tx(sc, m); + + if (f->pass && !f->rss) { + len = sizeof(*sreq); + m = m_gethdr(M_WAITOK, MT_DATA); + m->m_len = m->m_pkthdr.len = len; + bzero(mtod(m, char *), len); + sreq = mtod(m, struct cpl_set_tcb_field *); + sreq->wr.wrh_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + mk_set_tcb_field(sreq, id, 25, 0x3f80000, + (u64)sc->rrss_map[f->qset] << 19); + t3_mgmt_tx(sc, m); + } + return 0; +} + +static inline void +mk_set_tcb_field(struct cpl_set_tcb_field *req, unsigned int tid, + unsigned int word, u64 mask, u64 val) +{ + OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); + req->reply = V_NO_REPLY(1); + req->cpu_idx = 0; + req->word = htons(word); + req->mask = htobe64(mask); + req->val = htobe64(val); +} + +static inline void +set_tcb_field_ulp(struct cpl_set_tcb_field *req, unsigned int tid, + unsigned int word, u64 mask, u64 val) +{ + struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; + + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); + txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); + mk_set_tcb_field(req, tid, word, mask, val); +} MODULE_DEPEND(if_cxgb, cxgb_t3fw, 1, 1, 1); Modified: head/usr.sbin/cxgbtool/cxgbtool.c ============================================================================== --- head/usr.sbin/cxgbtool/cxgbtool.c Wed May 5 00:39:50 2010 (r207642) +++ head/usr.sbin/cxgbtool/cxgbtool.c Wed May 5 00:41:40 2010 (r207643) @@ -1,6 +1,6 @@ /************************************************************************** -Copyright (c) 2007-2009, Chelsio Inc. +Copyright (c) 2007-2010, Chelsio Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -93,6 +93,9 @@ usage(FILE *fp) "\tclearstats clear MAC statistics\n" "\tcontext show an SGE context\n" "\tdesc [] dump SGE descriptors\n" + "\tfilter [ ] ... set a filter\n" + "\tfilter delete|clear delete a filter\n" + "\tfilter list list all filters\n" "\tioqs dump uP IOQs\n" "\tla dump uP logic analyzer info\n" "\tloadboot download boot image\n" @@ -1177,24 +1180,25 @@ parse_ipaddr(const char *s, uint32_t *ad * Parse a string containing a value and an optional colon separated mask. */ static int -parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask) +parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask, + uint32_t default_mask) { char *p; - *mask = 0xffffffffU; + *mask = default_mask; *val = strtoul(s, &p, 0); - if (p == s) + if (p == s || *val > default_mask) return -1; if (*p == ':' && p[1]) *mask = strtoul(p + 1, &p, 0); - return *p ? -1 : 0; + return *p || *mask > default_mask ? -1 : 0; } static int parse_trace_param(const char *s, uint32_t *val, uint32_t *mask) { return strchr(s, '.') ? parse_ipaddr(s, val, mask) : - parse_val_mask_param(s, val, mask); + parse_val_mask_param(s, val, mask, 0xffffffffU); } static int @@ -1273,6 +1277,174 @@ trace_config(int argc, char *argv[], int return 0; } +static void +show_filters(const char *iff_name) +{ + static const char *pkt_type[] = { "*", "tcp", "udp", "frag" }; + struct ch_filter op; + union { + uint32_t nip; + uint8_t octet[4]; + } nsip, ndip; + char sip[20], dip[20]; + int header = 0; + + bzero(&op, sizeof(op)); + op.filter_id = 0xffffffff; + + do { + if (doit(iff_name, CHELSIO_GET_FILTER, &op) < 0) + err(1, "list filters"); + + if (op.filter_id == 0xffffffff) + break; + + if (!header) { + printf("index SIP DIP sport " + "dport VLAN PRI P/MAC type Q\n"); + header = 1; + } + + nsip.nip = htonl(op.val.sip); + ndip.nip = htonl(op.val.dip); + + sprintf(sip, "%u.%u.%u.%u/%-2u", nsip.octet[0], nsip.octet[1], + nsip.octet[2], nsip.octet[3], + op.mask.sip ? 33 - ffs(op.mask.sip) : 0); + sprintf(dip, "%u.%u.%u.%u", ndip.octet[0], ndip.octet[1], + ndip.octet[2], ndip.octet[3]); + printf("%5zu %18s %15s ", (size_t)op.filter_id, sip, dip); + printf(op.val.sport ? "%5u " : " * ", op.val.sport); + printf(op.val.dport ? "%5u " : " * ", op.val.dport); + printf(op.val.vlan != 0xfff ? "%4u " : " * ", op.val.vlan); + printf(op.val.vlan_prio == 7 ? " * " : + "%1u/%1u ", op.val.vlan_prio, op.val.vlan_prio | 1); + if (op.mac_addr_idx == 0xffff) + printf("*/* "); + else if (op.mac_hit) + printf("%1u/%3u ", (op.mac_addr_idx >> 3) & 0x1, + (op.mac_addr_idx) & 0x7); + else + printf("%1u/ * ", (op.mac_addr_idx >> 3) & 0x1); + printf("%4s ", pkt_type[op.proto]); + if (!op.pass) + printf("-\n"); + else if (op.rss) + printf("*\n"); + else + printf("%1u\n", op.qset); + } while (1); +} + +static int +filter_config(int argc, char *argv[], int start_arg, const char *iff_name) +{ + int ret = 0; + uint32_t val, mask; + struct ch_filter op; + + if (argc < start_arg + 1) + return -1; + + memset(&op, 0, sizeof(op)); + op.mac_addr_idx = 0xffff; + op.rss = 1; + + if (argc == start_arg + 1 && !strcmp(argv[start_arg], "list")) { + show_filters(iff_name); + return 0; + } + + if (get_int_arg(argv[start_arg++], &op.filter_id)) + return -1; + if (argc == start_arg + 1 && (!strcmp(argv[start_arg], "delete") || + !strcmp(argv[start_arg], "clear"))) { + if (doit(iff_name, CHELSIO_DEL_FILTER, &op) < 0) { + if (errno == EBUSY) + err(1, "no filter support when offload in use"); + err(1, "delete filter"); + } + return 0; + } + + while (start_arg + 2 <= argc) { + if (!strcmp(argv[start_arg], "sip")) { + ret = parse_ipaddr(argv[start_arg + 1], &op.val.sip, + &op.mask.sip); + } else if (!strcmp(argv[start_arg], "dip")) { + ret = parse_ipaddr(argv[start_arg + 1], &op.val.dip, + &op.mask.dip); + } else if (!strcmp(argv[start_arg], "sport")) { + ret = parse_val_mask_param(argv[start_arg + 1], + &val, &mask, 0xffff); + op.val.sport = val; + op.mask.sport = mask; + } else if (!strcmp(argv[start_arg], "dport")) { + ret = parse_val_mask_param(argv[start_arg + 1], + &val, &mask, 0xffff); + op.val.dport = val; + op.mask.dport = mask; + } else if (!strcmp(argv[start_arg], "vlan")) { + ret = parse_val_mask_param(argv[start_arg + 1], + &val, &mask, 0xfff); + op.val.vlan = val; + op.mask.vlan = mask; + } else if (!strcmp(argv[start_arg], "prio")) { + ret = parse_val_mask_param(argv[start_arg + 1], + &val, &mask, 7); + op.val.vlan_prio = val; + op.mask.vlan_prio = mask; + } else if (!strcmp(argv[start_arg], "mac")) { + if (!strcmp(argv[start_arg + 1], "none")) + val = -1; + else + ret = get_int_arg(argv[start_arg + 1], &val); + op.mac_hit = val != (uint32_t)-1; + op.mac_addr_idx = op.mac_hit ? val : 0; + } else if (!strcmp(argv[start_arg], "type")) { + if (!strcmp(argv[start_arg + 1], "tcp")) + op.proto = 1; + else if (!strcmp(argv[start_arg + 1], "udp")) + op.proto = 2; + else if (!strcmp(argv[start_arg + 1], "frag")) + op.proto = 3; + else + errx(1, "unknown type \"%s\"; must be one of " + "\"tcp\", \"udp\", or \"frag\"", + argv[start_arg + 1]); + } else if (!strcmp(argv[start_arg], "queue")) { + ret = get_int_arg(argv[start_arg + 1], &val); + op.qset = val; + op.rss = 0; + } else if (!strcmp(argv[start_arg], "action")) { + if (!strcmp(argv[start_arg + 1], "pass")) + op.pass = 1; + else if (strcmp(argv[start_arg + 1], "drop")) + errx(1, "unknown action \"%s\"; must be one of " + "\"pass\" or \"drop\"", + argv[start_arg + 1]); + } else + errx(1, "unknown filter parameter \"%s\"\n" + "known parameters are \"mac\", \"sip\", " + "\"dip\", \"sport\", \"dport\", \"vlan\", " + "\"prio\", \"type\", \"queue\", and \"action\"", + argv[start_arg]); + if (ret < 0) + errx(1, "bad value \"%s\" for parameter \"%s\"", + argv[start_arg + 1], argv[start_arg]); + start_arg += 2; + } + if (start_arg != argc) + errx(1, "no value for \"%s\"", argv[start_arg]); + + if (doit(iff_name, CHELSIO_SET_FILTER, &op) < 0) { + if (errno == EBUSY) + err(1, "no filter support when offload in use"); + err(1, "set filter"); + } + + return 0; +} static int get_sched_param(int argc, char *argv[], int pos, unsigned int *valp) { @@ -1501,6 +1673,8 @@ run_cmd(int argc, char *argv[], const ch r = pktsched(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "tcb")) r = get_tcb2(argc, argv, 3, iff_name); + else if (!strcmp(argv[2], "filter")) + r = filter_config(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "clearstats")) r = clear_stats(argc, argv, 3, iff_name); else if (!strcmp(argv[2], "la")) From owner-svn-src-all@FreeBSD.ORG Wed May 5 03:45:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 081FD1065673; Wed, 5 May 2010 03:45:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EA8498FC12; Wed, 5 May 2010 03:45: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 o453jk37031306; Wed, 5 May 2010 03:45:46 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o453jk6i031298; Wed, 5 May 2010 03:45:46 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005050345.o453jk6i031298@svn.freebsd.org> From: Alan Cox Date: Wed, 5 May 2010 03:45: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: r207644 - in head/sys: dev/agp fs/tmpfs 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: Wed, 05 May 2010 03:45:47 -0000 Author: alc Date: Wed May 5 03:45:46 2010 New Revision: 207644 URL: http://svn.freebsd.org/changeset/base/207644 Log: Push down the acquisition of the page queues lock into vm_page_unwire(). Update the comment describing which lock should be held on entry to vm_page_wire(). Reviewed by: kib Modified: head/sys/dev/agp/agp.c head/sys/dev/agp/agp_i810.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/vfs_bio.c head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_page.c Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/dev/agp/agp.c Wed May 5 03:45:46 2010 (r207644) @@ -624,9 +624,7 @@ bad: if (k >= i) vm_page_wakeup(m); vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(mem->am_obj); @@ -660,9 +658,7 @@ agp_generic_unbind_memory(device_t dev, for (i = 0; i < mem->am_size; i += PAGE_SIZE) { m = vm_page_lookup(mem->am_obj, atop(i)); vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(mem->am_obj); Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/dev/agp/agp_i810.c Wed May 5 03:45:46 2010 (r207644) @@ -1011,9 +1011,7 @@ agp_i810_free_memory(device_t dev, struc VM_OBJECT_LOCK(mem->am_obj); m = vm_page_lookup(mem->am_obj, 0); vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); - vm_page_unlock_queues(); vm_page_unlock(m); VM_OBJECT_UNLOCK(mem->am_obj); } else { Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed May 5 03:45:46 2010 (r207644) @@ -461,9 +461,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p VM_OBJECT_LOCK(tobj); out: vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, TRUE); - vm_page_unlock_queues(); vm_page_unlock(m); vm_page_wakeup(m); vm_object_pip_subtract(tobj, 1); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/kern/vfs_bio.c Wed May 5 03:45:46 2010 (r207644) @@ -1571,7 +1571,6 @@ vfs_vmio_release(struct buf *bp) * everything on the inactive queue. */ vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); /* * We don't mess with busy pages, it is @@ -1580,6 +1579,7 @@ vfs_vmio_release(struct buf *bp) */ if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && m->wire_count == 0) { + vm_page_lock_queues(); /* * Might as well free the page if we can and it has * no valid data. We also free the page if the @@ -1593,8 +1593,8 @@ vfs_vmio_release(struct buf *bp) } else if (buf_vm_page_count_severe()) { vm_page_try_to_cache(m); } + vm_page_unlock_queues(); } - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); @@ -2957,9 +2957,7 @@ allocbuf(struct buf *bp, int size) bp->b_pages[i] = NULL; vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/vm/vm_fault.c Wed May 5 03:45:46 2010 (r207644) @@ -799,9 +799,7 @@ vnode_locked: vm_page_unlock(fs.first_m); vm_page_lock(fs.m); - vm_page_lock_queues(); vm_page_unwire(fs.m, FALSE); - vm_page_unlock_queues(); vm_page_unlock(fs.m); } /* @@ -1112,6 +1110,7 @@ vm_fault_unwire(vm_map_t map, vm_offset_ { vm_paddr_t pa; vm_offset_t va; + vm_page_t m; pmap_t pmap; pmap = vm_map_pmap(map); @@ -1125,11 +1124,10 @@ vm_fault_unwire(vm_map_t map, vm_offset_ if (pa != 0) { pmap_change_wiring(pmap, va, FALSE); if (!fictitious) { - vm_page_lock(PHYS_TO_VM_PAGE(pa)); - vm_page_lock_queues(); - vm_page_unwire(PHYS_TO_VM_PAGE(pa), 1); - vm_page_unlock_queues(); - vm_page_unlock(PHYS_TO_VM_PAGE(pa)); + m = PHYS_TO_VM_PAGE(pa); + vm_page_lock(m); + vm_page_unwire(m, TRUE); + vm_page_unlock(m); } } } @@ -1275,9 +1273,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm if (upgrade) { vm_page_lock(src_m); - vm_page_lock_queues(); vm_page_unwire(src_m, 0); - vm_page_unlock_queues(); vm_page_unlock(src_m); vm_page_lock(dst_m); Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/vm/vm_glue.c Wed May 5 03:45:46 2010 (r207644) @@ -529,9 +529,7 @@ vm_thread_swapout(struct thread *td) panic("vm_thread_swapout: kstack already missing?"); vm_page_dirty(m); vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(ksobj); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed May 5 00:41:40 2010 (r207643) +++ head/sys/vm/vm_page.c Wed May 5 03:45:46 2010 (r207644) @@ -1532,7 +1532,7 @@ vm_page_free_toq(vm_page_t m) * another map, removing it from paging queues * as necessary. * - * The page queues must be locked. + * The page must be locked. * This routine may not block. */ void @@ -1584,31 +1584,31 @@ vm_page_wire(vm_page_t m) * be placed in the cache - for example, just after dirtying a page. * dirty pages in the cache are not allowed. * - * The page queues must be locked. + * The page must be locked. * This routine may not block. */ void vm_page_unwire(vm_page_t m, int activate) { - if ((m->flags & PG_UNMANAGED) == 0) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if ((m->flags & PG_UNMANAGED) == 0) vm_page_lock_assert(m, MA_OWNED); - } if (m->flags & PG_FICTITIOUS) return; if (m->wire_count > 0) { m->wire_count--; if (m->wire_count == 0) { atomic_subtract_int(&cnt.v_wire_count, 1); - if (m->flags & PG_UNMANAGED) { - ; - } else if (activate) + if ((m->flags & PG_UNMANAGED) != 0) + return; + vm_page_lock_queues(); + if (activate) vm_page_enqueue(PQ_ACTIVE, m); else { vm_page_flag_clear(m, PG_WINATCFLS); vm_page_enqueue(PQ_INACTIVE, m); } + vm_page_unlock_queues(); } } else { panic("vm_page_unwire: invalid wire count: %d", m->wire_count); From owner-svn-src-all@FreeBSD.ORG Wed May 5 04:37:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B1521065672; Wed, 5 May 2010 04:37:45 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5FC8FC08; Wed, 5 May 2010 04:37: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 o454bjGf042734; Wed, 5 May 2010 04:37:45 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o454bj8G042732; Wed, 5 May 2010 04:37:45 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201005050437.o454bj8G042732@svn.freebsd.org> From: Neel Natu Date: Wed, 5 May 2010 04:37: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: r207645 - 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: Wed, 05 May 2010 04:37:45 -0000 Author: neel Date: Wed May 5 04:37:45 2010 New Revision: 207645 URL: http://svn.freebsd.org/changeset/base/207645 Log: Fix DDB backtrace involving kernel modules. We can no longer assume that all valid program counter values reside within the kernel object file. Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Wed May 5 03:45:46 2010 (r207644) +++ head/sys/mips/mips/db_trace.c Wed May 5 04:37:45 2010 (r207645) @@ -181,7 +181,7 @@ loop: } /* check for bad PC */ /*XXX MIPS64 bad: These hard coded constants are lame */ - if (pc & 3 || pc < (uintptr_t)0x80000000 || pc >= (uintptr_t)edata) { + if (pc & 3 || pc < (uintptr_t)0x80000000) { (*printfn) ("PC 0x%x: not in kernel\n", pc); ra = 0; goto done; From owner-svn-src-all@FreeBSD.ORG Wed May 5 05:11:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8092106566C; Wed, 5 May 2010 05:11:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D6C338FC15; Wed, 5 May 2010 05:11: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 o455BCsb050268; Wed, 5 May 2010 05:11:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o455BCFd050266; Wed, 5 May 2010 05:11:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005050511.o455BCFd050266@svn.freebsd.org> From: Alexander Motin Date: Wed, 5 May 2010 05:11: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: r207646 - stable/8/sys/cam 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, 05 May 2010 05:11:13 -0000 Author: mav Date: Wed May 5 05:11:12 2010 New Revision: 207646 URL: http://svn.freebsd.org/changeset/base/207646 Log: MFC r207490: Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in usual operation, but required in some conditions to make queue running after being shrinked. Modified: stable/8/sys/cam/cam_xpt.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Wed May 5 04:37:45 2010 (r207645) +++ stable/8/sys/cam/cam_xpt.c Wed May 5 05:11:12 2010 (r207646) @@ -4809,6 +4809,8 @@ camisr_runqueue(void *V_queue) if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 && (--dev->tag_delay_count == 0)) xpt_start_tags(ccb_h->path); + if (!device_is_send_queued(dev)) + xpt_schedule_dev_sendq(ccb_h->path->bus, dev); } if (ccb_h->status & CAM_RELEASE_SIMQ) { From owner-svn-src-all@FreeBSD.ORG Wed May 5 05:18:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 110B6106564A; Wed, 5 May 2010 05:18:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F3E5C8FC16; Wed, 5 May 2010 05:18: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 o455I8M2051803; Wed, 5 May 2010 05:18:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o455I8XL051801; Wed, 5 May 2010 05:18:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005050518.o455I8XL051801@svn.freebsd.org> From: Alexander Motin Date: Wed, 5 May 2010 05:18: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: r207647 - stable/8/sys/cam/ata 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, 05 May 2010 05:18:09 -0000 Author: mav Date: Wed May 5 05:18:08 2010 New Revision: 207647 URL: http://svn.freebsd.org/changeset/base/207647 Log: MFC r207282: Update device identify data and serial number when device change detected. Reprobe immediately following this should have fresh data. Modified: stable/8/sys/cam/ata/ata_xpt.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Wed May 5 05:11:12 2010 (r207646) +++ stable/8/sys/cam/ata/ata_xpt.c Wed May 5 05:18:08 2010 (r207647) @@ -768,6 +768,7 @@ noerror: { struct ccb_pathinq cpi; int16_t *ptr; + int changed = 1; ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; @@ -809,9 +810,12 @@ noerror: sizeof(ident_buf->serial))) { /* Device changed. */ xpt_async(AC_LOST_DEVICE, path, NULL); - } else + } else { bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); - } else { + changed = 0; + } + } + if (changed) { bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); /* Clean up from previous instance of this device */ if (path->device->serial_num != NULL) { From owner-svn-src-all@FreeBSD.ORG Wed May 5 07:40:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 616361065672; Wed, 5 May 2010 07:40:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 519A98FC1D; Wed, 5 May 2010 07:40: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 o457eusd083170; Wed, 5 May 2010 07:40:56 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o457etCN083169; Wed, 5 May 2010 07:40:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005050740.o457etCN083169@svn.freebsd.org> From: Alan Cox Date: Wed, 5 May 2010 07:40: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: r207648 - head/sys/dev/drm 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, 05 May 2010 07:40:56 -0000 Author: alc Date: Wed May 5 07:40:54 2010 New Revision: 207648 URL: http://svn.freebsd.org/changeset/base/207648 Log: Push down the acquisition of the page queues lock into vm_page_unwire(). Modified: head/sys/dev/drm/via_dmablit.c Modified: head/sys/dev/drm/via_dmablit.c ============================================================================== --- head/sys/dev/drm/via_dmablit.c Wed May 5 05:18:08 2010 (r207647) +++ head/sys/dev/drm/via_dmablit.c Wed May 5 07:40:54 2010 (r207648) @@ -179,9 +179,7 @@ via_free_sg_info(drm_via_sg_info_t *vsg) for (i=0; i < vsg->num_pages; ++i) { if ( NULL != (page = vsg->pages[i])) { vm_page_lock(page); - vm_page_lock_queues(); vm_page_unwire(page, 0); - vm_page_unlock_queues(); vm_page_unlock(page); } } From owner-svn-src-all@FreeBSD.ORG Wed May 5 07:47:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD071106566B; Wed, 5 May 2010 07:47:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CCAB48FC08; Wed, 5 May 2010 07:47: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 o457le82084681; Wed, 5 May 2010 07: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 o457leh4084679; Wed, 5 May 2010 07:47:40 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005050747.o457leh4084679@svn.freebsd.org> From: Alan Cox Date: Wed, 5 May 2010 07: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: r207649 - head/sys/sparc64/sparc64 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, 05 May 2010 07:47:41 -0000 Author: alc Date: Wed May 5 07:47:40 2010 New Revision: 207649 URL: http://svn.freebsd.org/changeset/base/207649 Log: Use an OBJT_PHYS object and thus PG_UNMANAGED pages to implement the TSB. The TSB is not a pageable structure, so there is no point in using managed pages. Reviewed by: kib Modified: head/sys/sparc64/sparc64/pmap.c Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Wed May 5 07:40:54 2010 (r207648) +++ head/sys/sparc64/sparc64/pmap.c Wed May 5 07:47:40 2010 (r207649) @@ -1091,7 +1091,7 @@ pmap_pinit(pmap_t pm) * Allocate an object for it. */ if (pm->pm_tsb_obj == NULL) - pm->pm_tsb_obj = vm_object_allocate(OBJT_DEFAULT, TSB_PAGES); + pm->pm_tsb_obj = vm_object_allocate(OBJT_PHYS, TSB_PAGES); VM_OBJECT_LOCK(pm->pm_tsb_obj); for (i = 0; i < TSB_PAGES; i++) { @@ -1152,16 +1152,10 @@ pmap_release(pmap_t pm) KASSERT(obj->ref_count == 1, ("pmap_release: tsbobj ref count != 1")); while (!TAILQ_EMPTY(&obj->memq)) { m = TAILQ_FIRST(&obj->memq); - vm_page_lock_queues(); - if (vm_page_sleep_if_busy(m, FALSE, "pmaprl")) - continue; - KASSERT(m->hold_count == 0, - ("pmap_release: freeing held tsb page")); m->md.pmap = NULL; m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); - vm_page_unlock_queues(); } VM_OBJECT_UNLOCK(obj); pmap_qremove((vm_offset_t)pm->pm_tsb, TSB_PAGES); From owner-svn-src-all@FreeBSD.ORG Wed May 5 08:10:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90C1D1065673; Wed, 5 May 2010 08:10:27 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 03B488FC1B; Wed, 5 May 2010 08:10:26 +0000 (UTC) Received: from outgoing.leidinger.net (pD954F941.dip.t-dialin.net [217.84.249.65]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 8911784446F; Wed, 5 May 2010 10:10:20 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 5448B5120; Wed, 5 May 2010 10:10:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1273047015; bh=4BlLt4+Wa4lohxSnZ9oT58xvjFwXVkIor0JR4vki744=; h=Message-ID:Date:From:To:Cc:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding; b=eu+8xiCbUJTWmpgfw6nVEtLsovcg2GmS8sUtVKMYvDgh54B0la5XbvZLvktLoDY04 CiwT+W8lcQmlqrLAoroE/wpLXcFZoUKMVlVkxtXGtYMEDqKHqi00RecuEJUmbTLqTa zbZ4dYIikbMnyWN/m0EaOJdMIs2On3ExSFg41AOIqTtWivkts+Ag2e6l6dMhbqrfqs iBdtjxFY0usxfGJdOf2UrrBz21IS+TOglFidh6Y6GWimY93niurMtLiYfMk23W1vZf bZkk8Z7bXJ0LX/zRB0b2eJnBOIqAn1p26jAdqPKyAv25JSSMtYf3ujIt+vWvkjPEG8 sPnP/W2dyzpzg== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o458AFEO080875; Wed, 5 May 2010 10:10:15 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 05 May 2010 10:10:14 +0200 Message-ID: <20100505101014.21013q8knucsqo00@webmail.leidinger.net> Date: Wed, 05 May 2010 10:10:14 +0200 From: Alexander Leidinger To: Doug Barton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 8911784446F.22E31 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1273651822.38624@uUlS5k7NgpPRowQdKr3F6A X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Norikatsu Shigemura Subject: Re: svn commit: r207612 - head/usr.sbin/mergemaster 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, 05 May 2010 08:10:27 -0000 Quoting Doug Barton (from Tue, 04 May 2010 09:00:33 -0700): > On 5/4/2010 7:02 AM, Alexander Leidinger wrote: >> Quoting Norikatsu Shigemura (from Tue, 4 May 2010 >> 11:25:04 +0000 (UTC)): >> >>> Author: nork >>> Date: Tue May 4 11:25:04 2010 >>> New Revision: 207612 >>> URL: http://svn.freebsd.org/changeset/base/207612 >>> >>> Log: >>> Add support run services_mkdb(8). >> >> Shouldn't this (and similar messages) only be done if there is a >> corresponding DB file? > > This is the first case where the db file is "optional." All the others No, the DB for login.conf is optional too. The man page of login.conf is wrong. The cgetent(3) man-page explicitely tells that it first looks in the DB file, but falls back to the ASCII file if the DB file is not available. > have been created by default for ages now, and nork was simply copying > the existing code (including the "make sure" bit). I was assuming that it is just a copy of what exists. > As he pointed out, I asked him to make the prompt unconditional since > the db file is small, and harmless if not being used. Making it > conditional now is a pointless micro-optimization that will have to be > removed down the road when having/needing it becomes the default. Is there some movement to make it not optional? I do not think it is a micro-optimization. I do not talk about some performance impact (be it work which has to do be done by a person or by a CPU), it is about system knowledge. The DB is optional, if you ask someone without enough knowledge (and there are a lot of such people which do sysadministration stuff) to do this, he will not understand what this implies (that he has to run such a command every time /etc/services is changed). The DB file is only harmless if it is in sync with the ASCII file. If they are not in sync, the DB file is harmful to people which do not know about this feature. As an example of what I talk about: my client is a part of the european comission. This means we talk about a some kind of government entity (what follows can be told about big corporations too). They outsource the work for some specific time, and after that they make a new call for tender for this position. Most of the time the cheapest offer wins (decission of the bean counters, not by people which know what it means technically). I was there in the previous contract and in the current contract. In the previous contract we all where highly skilled. Now with a new manager (who has himself some sysadmin knowledge) everything changed. Junior admins are taking care about all sysadmin stuff, and the few seniors which are left are some kind of firefighters and do some kind of special investigations work. Now, if a junior admin sees some kind of procedure, he follows it. He does not see strange things, he does not know the implications of a lot of stuff, and not all ask questions of what it means for the system if he runs a command he does not know about. That's bad, but this is life. They do what they get told to do to earn money. To make my life a little bit more easy, I wrote a script which checks a system (Solaris) for the correct setup. It checks a lot of things, simple things (hostname, domainname, TZ, ...) and complex things (multipathing, ZFS/VxVM stuff, Zones, SMF, ...), generic stuff and the site specific configs. There I do not say only OK or ERROR, I also give infos. The infos are not only like 'do this', but also sometimes also 'ask someone with knowledge about this'. What I try to do there is to be as precise as possible (if there are conditions, I check the conditions if possible, or to tell as good as possible how to check conditions, which the script can not check itself), because I've already seen what people make out of not so detailed explanations. To come back to FreeBSD: a port may tell to modify /etc/services, but it may not tell to recreate the optional DB file (or the user may decide to not act because of the 'optional' and because he does not know what this is). The ports we can fix, but if someone is using some 3rd party application which is not in ports, and this application tells to modify /etc/services, then it is not within our control to fix the problem which may be caused by a stale DB file which the person installing the application does not know about. I hope this makes it more clear what kind of problem I see with the DB files for login.conf and the services file. Bye, Alexander. -- My brain is my second favorite organ. -- Woody Allen http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Wed May 5 08:43:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E0F2106566C; Wed, 5 May 2010 08:43:48 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC2F8FC18; Wed, 5 May 2010 08:43:48 +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 o458hl8o097108; Wed, 5 May 2010 08:43:47 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o458hlgM097105; Wed, 5 May 2010 08:43:47 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <201005050843.o458hlgM097105@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 5 May 2010 08:43: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: r207650 - head/usr.sbin/jail 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, 05 May 2010 08:43:48 -0000 Author: danger (doc committer) Date: Wed May 5 08:43:47 2010 New Revision: 207650 URL: http://svn.freebsd.org/changeset/base/207650 Log: - fix typo Modified: head/usr.sbin/jail/jail.8 Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Wed May 5 07:47:40 2010 (r207649) +++ head/usr.sbin/jail/jail.8 Wed May 5 08:43:47 2010 (r207650) @@ -239,7 +239,7 @@ The .Xr jexec 8 . .It Va ip4.addr A comma-separated list of IPv4 addresses assigned to the prison. -If this is set, the jail is restricted to using only these address. +If this is set, the jail is restricted to using only these addresses. Any attempts to use other addresses fail, and attempts to use wildcard addresses silently use the jailed address instead. For IPv4 the first address given will be kept used as the source address From owner-svn-src-all@FreeBSD.ORG Wed May 5 08:55:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 812161065673; Wed, 5 May 2010 08:55:26 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 70ADC8FC1A; Wed, 5 May 2010 08:55: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 o458tQ2a099713; Wed, 5 May 2010 08:55:26 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o458tQw3099711; Wed, 5 May 2010 08:55:26 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <201005050855.o458tQw3099711@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Wed, 5 May 2010 08:55: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: r207651 - head/sys/netipsec 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, 05 May 2010 08:55:26 -0000 Author: vanhu Date: Wed May 5 08:55:26 2010 New Revision: 207651 URL: http://svn.freebsd.org/changeset/base/207651 Log: Update SA's NAT-T stuff before calling key_mature() in key_update(), as SA may be used as soon as key_mature() has been called. Obtained from: NETASQ MFC after: 1 week Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed May 5 08:43:47 2010 (r207650) +++ head/sys/netipsec/key.c Wed May 5 08:55:26 2010 (r207651) @@ -5156,12 +5156,6 @@ key_update(so, m, mhp) return key_senderror(so, m, error); } - /* check SA values to be mature. */ - if ((mhp->msg->sadb_msg_errno = key_mature(sav)) != 0) { - KEY_FREESAV(&sav); - return key_senderror(so, m, 0); - } - #ifdef IPSEC_NAT_T /* * Handle more NAT-T info if present, @@ -5188,6 +5182,12 @@ key_update(so, m, mhp) #endif #endif + /* check SA values to be mature. */ + if ((mhp->msg->sadb_msg_errno = key_mature(sav)) != 0) { + KEY_FREESAV(&sav); + return key_senderror(so, m, 0); + } + { struct mbuf *n; From owner-svn-src-all@FreeBSD.ORG Wed May 5 08:58:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F111A1065673; Wed, 5 May 2010 08:58:58 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E0E738FC16; Wed, 5 May 2010 08:58: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 o458wwJl000596; Wed, 5 May 2010 08:58:58 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o458ww9n000594; Wed, 5 May 2010 08:58:58 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <201005050858.o458ww9n000594@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Wed, 5 May 2010 08:58: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: r207652 - head/sys/netipsec 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, 05 May 2010 08:58:59 -0000 Author: vanhu Date: Wed May 5 08:58:58 2010 New Revision: 207652 URL: http://svn.freebsd.org/changeset/base/207652 Log: Set SA's natt_type before calling key_mature() in key_add(), as the SA may be used as soon as key_mature() has been done. Obtained from: NETASQ MFC after: 1 week Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed May 5 08:55:26 2010 (r207651) +++ head/sys/netipsec/key.c Wed May 5 08:58:58 2010 (r207652) @@ -5422,12 +5422,6 @@ key_add(so, m, mhp) return key_senderror(so, m, error); } - /* check SA values to be mature. */ - if ((error = key_mature(newsav)) != 0) { - KEY_FREESAV(&newsav); - return key_senderror(so, m, error); - } - #ifdef IPSEC_NAT_T /* * Handle more NAT-T info if present, @@ -5447,6 +5441,12 @@ key_add(so, m, mhp) #endif #endif + /* check SA values to be mature. */ + if ((error = key_mature(newsav)) != 0) { + KEY_FREESAV(&newsav); + return key_senderror(so, m, error); + } + /* * don't call key_freesav() here, as we would like to keep the SA * in the database on success. From owner-svn-src-all@FreeBSD.ORG Wed May 5 09:01:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52092106564A; Wed, 5 May 2010 09:01:16 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 403308FC15; Wed, 5 May 2010 09: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 o4591G8t001191; Wed, 5 May 2010 09:01:16 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4591Ghe001189; Wed, 5 May 2010 09:01:16 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201005050901.o4591Ghe001189@svn.freebsd.org> From: Dmitry Morozovsky Date: Wed, 5 May 2010 09:01:16 +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: r207653 - stable/7/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: Wed, 05 May 2010 09:01:16 -0000 Author: marck (doc committer) Date: Wed May 5 09:01:15 2010 New Revision: 207653 URL: http://svn.freebsd.org/changeset/base/207653 Log: MFC r207068: Allow to modify directory's content even if the ZFS_NOUNLINK (SF_NOUNLINK, sunlnk) flag is set. We only deny dirctory's removal or rename. PR: kern/143343 Approved by: pjd Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.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/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed May 5 08:58:58 2010 (r207652) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed May 5 09:01:15 2010 (r207653) @@ -2227,11 +2227,24 @@ zfs_zaccess_common(znode_t *zp, uint32_t return (EPERM); } +#ifdef sun if ((v4_mode & (ACE_DELETE | ACE_DELETE_CHILD)) && (zp->z_phys->zp_flags & ZFS_NOUNLINK)) { *check_privs = B_FALSE; return (EPERM); } +#else + /* + * In FreeBSD we allow to modify directory's content is ZFS_NOUNLINK + * (sunlnk) is set. We just don't allow directory removal, which is + * handled in zfs_zaccess_delete(). + */ + if ((v4_mode & ACE_DELETE) && + (zp->z_phys->zp_flags & ZFS_NOUNLINK)) { + *check_privs = B_FALSE; + return (EPERM); + } +#endif if (((v4_mode & (ACE_READ_DATA|ACE_EXECUTE)) && (zp->z_phys->zp_flags & ZFS_AV_QUARANTINED))) { From owner-svn-src-all@FreeBSD.ORG Wed May 5 09:29:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68601106566C; Wed, 5 May 2010 09:29:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 576518FC12; Wed, 5 May 2010 09:29: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 o459TY6R007364; Wed, 5 May 2010 09:29:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o459TYHo007362; Wed, 5 May 2010 09:29:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005050929.o459TYHo007362@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 May 2010 09:29: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: r207654 - stable/8/lib/libc/stdlib 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, 05 May 2010 09:29:34 -0000 Author: kib Date: Wed May 5 09:29:34 2010 New Revision: 207654 URL: http://svn.freebsd.org/changeset/base/207654 Log: MFC r207009: C language does not has references, it provides pointers. Modified: stable/8/lib/libc/stdlib/realpath.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdlib/realpath.3 ============================================================================== --- stable/8/lib/libc/stdlib/realpath.3 Wed May 5 09:01:15 2010 (r207653) +++ stable/8/lib/libc/stdlib/realpath.3 Wed May 5 09:29:34 2010 (r207654) @@ -56,13 +56,13 @@ and in .Fa pathname , and copies the resulting absolute pathname into -the memory referenced by +the memory pointed to by .Fa resolved_path . The .Fa resolved_path argument .Em must -refer to a buffer capable of storing at least +point to a buffer capable of storing at least .Dv PATH_MAX characters, or be .Dv NULL . From owner-svn-src-all@FreeBSD.ORG Wed May 5 10:02:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C20BD106564A; Wed, 5 May 2010 10:02:53 +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 7C7CC8FC15; Wed, 5 May 2010 10:02:53 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 74DDE11BA1C; Wed, 5 May 2010 05:02:52 -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 8ADHUWL21VJZ; Wed, 05 May 2010 05:02:52 -0500 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201005050041.o450fesw090589@svn.freebsd.org> Date: Wed, 5 May 2010 11:02:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201005050041.o450fesw090589@svn.freebsd.org> To: Navdeep Parhar X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool 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, 05 May 2010 10:02:53 -0000 On 5 May 2010, at 01:41, Navdeep Parhar wrote: > Author: np > Date: Wed May 5 00:41:40 2010 > New Revision: 207643 > URL: http://svn.freebsd.org/changeset/base/207643 >=20 > Log: > Add support for hardware filters to cxgb(4). The T3 chip can inspect > L2/3/4 headers and can drop or steer packets as instructed. = Filtering > based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac > addr is possible. Add support in cxgbtool to program these filters. > Some simple examples: >=20 > Drop all tcp/80 traffic coming from the subnet specified. > # cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action = drop >=20 > Steer all incoming UDP traffic to qset 0. > # cxgbtool cxgb2 filter 1 type udp queue 0 action pass >=20 > Steer all tcp traffic from 192.168.1.1 to qset 1. > # cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action = pass >=20 > Drop fragments. > # cxgbtool cxgb2 filter 3 type frag action drop >=20 > List all filters. > # cxgbtool cxgb2 filter list > index SIP DIP sport dport VLAN PRI P/MAC = type Q > 0 192.168.1.0/24 0.0.0.0 * 80 0 0/1 */* = tcp - > 1 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* = udp 0 > 2 192.168.1.1/32 0.0.0.0 * * 0 0/1 */* = tcp 1 > 3 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* = frag - > 16367 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* = * * >=20 > MFC after: 2 weeks Wow, this is great! So this is able to do packet filtering at 10Gbps = with no CPU impact? Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Wed May 5 10:23:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2D351065672; Wed, 5 May 2010 10:23:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 368C58FC18; Wed, 5 May 2010 10:23:31 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id CA03446B89; Wed, 5 May 2010 06:23:30 -0400 (EDT) Date: Wed, 5 May 2010 11:23:30 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Navdeep Parhar In-Reply-To: <201005050041.o450fesw090589@svn.freebsd.org> Message-ID: References: <201005050041.o450fesw090589@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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 Subject: Re: svn commit: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool 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, 05 May 2010 10:23:31 -0000 On Wed, 5 May 2010, Navdeep Parhar wrote: > L2/3/4 headers and can drop or steer packets as instructed. Filtering > based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac > addr is possible. Add support in cxgbtool to program these filters. > Some simple examples: Excellent news! Now to start to teach the network stack how to use these features itself for the purposes of aligning connection affinity up/down the stack! Robert > > Drop all tcp/80 traffic coming from the subnet specified. > # cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop > > Steer all incoming UDP traffic to qset 0. > # cxgbtool cxgb2 filter 1 type udp queue 0 action pass > > Steer all tcp traffic from 192.168.1.1 to qset 1. > # cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass > > Drop fragments. > # cxgbtool cxgb2 filter 3 type frag action drop > > List all filters. > # cxgbtool cxgb2 filter list > index SIP DIP sport dport VLAN PRI P/MAC type Q > 0 192.168.1.0/24 0.0.0.0 * 80 0 0/1 */* tcp - > 1 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* udp 0 > 2 192.168.1.1/32 0.0.0.0 * * 0 0/1 */* tcp 1 > 3 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* frag - > 16367 0.0.0.0/0 0.0.0.0 * * 0 0/1 */* * * > > MFC after: 2 weeks > > Modified: > head/sys/dev/cxgb/cxgb_ioctl.h > head/sys/dev/cxgb/cxgb_main.c > head/usr.sbin/cxgbtool/cxgbtool.c > > Modified: head/sys/dev/cxgb/cxgb_ioctl.h > ============================================================================== > --- head/sys/dev/cxgb/cxgb_ioctl.h Wed May 5 00:39:50 2010 (r207642) > +++ head/sys/dev/cxgb/cxgb_ioctl.h Wed May 5 00:41:40 2010 (r207643) > @@ -59,6 +59,9 @@ enum { > CH_CLEAR_STATS, > CH_GET_UP_LA, > CH_GET_UP_IOQS, > + CH_SET_FILTER, > + CH_DEL_FILTER, > + CH_GET_FILTER, > }; > > /* statistics categories */ > @@ -215,6 +218,29 @@ struct ch_up_ioqs { > struct t3_ioq_entry *data; > }; > > +struct ch_filter_tuple { > + uint32_t sip; > + uint32_t dip; > + uint16_t sport; > + uint16_t dport; > + uint16_t vlan:12; > + uint16_t vlan_prio:3; > +}; > + > +struct ch_filter { > + uint32_t filter_id; > + struct ch_filter_tuple val; > + struct ch_filter_tuple mask; > + uint16_t mac_addr_idx; > + uint8_t mac_hit:1; > + uint8_t proto:2; > + > + uint8_t want_filter_id:1; > + uint8_t pass:1; > + uint8_t rss:1; > + uint8_t qset; > +}; > + > #define CHELSIO_SETREG _IOW('f', CH_SETREG, struct ch_reg) > #define CHELSIO_GETREG _IOWR('f', CH_GETREG, struct ch_reg) > #define CHELSIO_GETMTUTAB _IOR('f', CH_GETMTUTAB, struct ch_mtus) > @@ -239,4 +265,7 @@ struct ch_up_ioqs { > #define CHELSIO_GET_EEPROM _IOWR('f', CH_GET_EEPROM, struct ch_eeprom) > #define CHELSIO_GET_UP_LA _IOWR('f', CH_GET_UP_LA, struct ch_up_la) > #define CHELSIO_GET_UP_IOQS _IOWR('f', CH_GET_UP_IOQS, struct ch_up_ioqs) > +#define CHELSIO_SET_FILTER _IOW('f', CH_SET_FILTER, struct ch_filter) > +#define CHELSIO_DEL_FILTER _IOW('f', CH_DEL_FILTER, struct ch_filter) > +#define CHELSIO_GET_FILTER _IOWR('f', CH_GET_FILTER, struct ch_filter) > #endif > > Modified: head/sys/dev/cxgb/cxgb_main.c > ============================================================================== > --- head/sys/dev/cxgb/cxgb_main.c Wed May 5 00:39:50 2010 (r207642) > +++ head/sys/dev/cxgb/cxgb_main.c Wed May 5 00:41:40 2010 (r207643) > @@ -99,6 +99,13 @@ static void cxgb_ext_intr_handler(void * > static void cxgb_tick_handler(void *, int); > static void cxgb_tick(void *); > static void setup_rss(adapter_t *sc); > +static int alloc_filters(struct adapter *); > +static int setup_hw_filters(struct adapter *); > +static int set_filter(struct adapter *, int, const struct filter_info *); > +static inline void mk_set_tcb_field(struct cpl_set_tcb_field *, unsigned int, > + unsigned int, u64, u64); > +static inline void set_tcb_field_ulp(struct cpl_set_tcb_field *, unsigned int, > + unsigned int, u64, u64); > > /* Attachment glue for the PCI controller end of the device. Each port of > * the device is attached separately, as defined later. > @@ -1661,6 +1668,13 @@ cxgb_up(struct adapter *sc) > if ((err = update_tpsram(sc))) > goto out; > > + if (is_offload(sc)) { > + sc->params.mc5.nservers = 0; > + sc->params.mc5.nroutes = 0; > + sc->params.mc5.nfilters = t3_mc5_size(&sc->mc5) - > + MC5_MIN_TIDS; > + } > + > err = t3_init_hw(sc, 0); > if (err) > goto out; > @@ -1672,6 +1686,7 @@ cxgb_up(struct adapter *sc) > if (err) > goto out; > > + alloc_filters(sc); > setup_rss(sc); > > t3_intr_clear(sc); > @@ -1698,6 +1713,7 @@ cxgb_up(struct adapter *sc) > > if (!(sc->flags & QUEUES_BOUND)) { > bind_qsets(sc); > + setup_hw_filters(sc); > sc->flags |= QUEUES_BOUND; > } > > @@ -3076,6 +3092,139 @@ cxgb_extension_ioctl(struct cdev *dev, u > free(buf, M_DEVBUF); > break; > } > + case CHELSIO_SET_FILTER: { > + struct ch_filter *f = (struct ch_filter *)data;; > + struct filter_info *p; > + unsigned int nfilters = sc->params.mc5.nfilters; > + > + if (!is_offload(sc)) > + return (EOPNOTSUPP); /* No TCAM */ > + if (!(sc->flags & FULL_INIT_DONE)) > + return (EAGAIN); /* mc5 not setup yet */ > + if (nfilters == 0) > + return (EBUSY); /* TOE will use TCAM */ > + > + /* sanity checks */ > + if (f->filter_id >= nfilters || > + (f->val.dip && f->mask.dip != 0xffffffff) || > + (f->val.sport && f->mask.sport != 0xffff) || > + (f->val.dport && f->mask.dport != 0xffff) || > + (f->val.vlan && f->mask.vlan != 0xfff) || > + (f->val.vlan_prio && > + f->mask.vlan_prio != FILTER_NO_VLAN_PRI) || > + (f->mac_addr_idx != 0xffff && f->mac_addr_idx > 15) || > + f->qset >= SGE_QSETS || > + sc->rrss_map[f->qset] >= RSS_TABLE_SIZE) > + return (EINVAL); > + > + /* Was allocated with M_WAITOK */ > + KASSERT(sc->filters, ("filter table NULL\n")); > + > + p = &sc->filters[f->filter_id]; > + if (p->locked) > + return (EPERM); > + > + bzero(p, sizeof(*p)); > + p->sip = f->val.sip; > + p->sip_mask = f->mask.sip; > + p->dip = f->val.dip; > + p->sport = f->val.sport; > + p->dport = f->val.dport; > + p->vlan = f->mask.vlan ? f->val.vlan : 0xfff; > + p->vlan_prio = f->mask.vlan_prio ? (f->val.vlan_prio & 6) : > + FILTER_NO_VLAN_PRI; > + p->mac_hit = f->mac_hit; > + p->mac_vld = f->mac_addr_idx != 0xffff; > + p->mac_idx = f->mac_addr_idx; > + p->pkt_type = f->proto; > + p->report_filter_id = f->want_filter_id; > + p->pass = f->pass; > + p->rss = f->rss; > + p->qset = f->qset; > + > + error = set_filter(sc, f->filter_id, p); > + if (error == 0) > + p->valid = 1; > + break; > + } > + case CHELSIO_DEL_FILTER: { > + struct ch_filter *f = (struct ch_filter *)data; > + struct filter_info *p; > + unsigned int nfilters = sc->params.mc5.nfilters; > + > + if (!is_offload(sc)) > + return (EOPNOTSUPP); > + if (!(sc->flags & FULL_INIT_DONE)) > + return (EAGAIN); > + if (nfilters == 0 || sc->filters == NULL) > + return (EINVAL); > + if (f->filter_id >= nfilters) > + return (EINVAL); > + > + p = &sc->filters[f->filter_id]; > + if (p->locked) > + return (EPERM); > + if (!p->valid) > + return (EFAULT); /* Read "Bad address" as "Bad index" */ > + > + bzero(p, sizeof(*p)); > + p->sip = p->sip_mask = 0xffffffff; > + p->vlan = 0xfff; > + p->vlan_prio = FILTER_NO_VLAN_PRI; > + p->pkt_type = 1; > + error = set_filter(sc, f->filter_id, p); > + break; > + } > + case CHELSIO_GET_FILTER: { > + struct ch_filter *f = (struct ch_filter *)data; > + struct filter_info *p; > + unsigned int i, nfilters = sc->params.mc5.nfilters; > + > + if (!is_offload(sc)) > + return (EOPNOTSUPP); > + if (!(sc->flags & FULL_INIT_DONE)) > + return (EAGAIN); > + if (nfilters == 0 || sc->filters == NULL) > + return (EINVAL); > + > + i = f->filter_id == 0xffffffff ? 0 : f->filter_id + 1; > + for (; i < nfilters; i++) { > + p = &sc->filters[i]; > + if (!p->valid) > + continue; > + > + bzero(f, sizeof(*f)); > + > + f->filter_id = i; > + f->val.sip = p->sip; > + f->mask.sip = p->sip_mask; > + f->val.dip = p->dip; > + f->mask.dip = p->dip ? 0xffffffff : 0; > + f->val.sport = p->sport; > + f->mask.sport = p->sport ? 0xffff : 0; > + f->val.dport = p->dport; > + f->mask.dport = p->dport ? 0xffff : 0; > + f->val.vlan = p->vlan == 0xfff ? 0 : p->vlan; > + f->mask.vlan = p->vlan == 0xfff ? 0 : 0xfff; > + f->val.vlan_prio = p->vlan_prio == FILTER_NO_VLAN_PRI ? > + 0 : p->vlan_prio; > + f->mask.vlan_prio = p->vlan_prio == FILTER_NO_VLAN_PRI ? > + 0 : FILTER_NO_VLAN_PRI; > + f->mac_hit = p->mac_hit; > + f->mac_addr_idx = p->mac_vld ? p->mac_idx : 0xffff; > + f->proto = p->pkt_type; > + f->want_filter_id = p->report_filter_id; > + f->pass = p->pass; > + f->rss = p->rss; > + f->qset = p->qset; > + > + break; > + } > + > + if (i == nfilters) > + f->filter_id = 0xffffffff; > + break; > + } > default: > return (EOPNOTSUPP); > break; > @@ -3130,5 +3279,129 @@ cxgb_get_regs(adapter_t *sc, struct ch_i > XGM_REG(A_XGM_RX_SPI4_SOP_EOP_CNT, 1)); > } > > +static int > +alloc_filters(struct adapter *sc) > +{ > + struct filter_info *p; > + unsigned int nfilters = sc->params.mc5.nfilters; > + > + if (nfilters == 0) > + return (0); > + > + p = malloc(sizeof(*p) * nfilters, M_DEVBUF, M_WAITOK | M_ZERO); > + sc->filters = p; > + > + p = &sc->filters[nfilters - 1]; > + p->vlan = 0xfff; > + p->vlan_prio = FILTER_NO_VLAN_PRI; > + p->pass = p->rss = p->valid = p->locked = 1; > + > + return (0); > +} > + > +static int > +setup_hw_filters(struct adapter *sc) > +{ > + int i, rc; > + unsigned int nfilters = sc->params.mc5.nfilters; > + > + if (!sc->filters) > + return (0); > + > + t3_enable_filters(sc); > + > + for (i = rc = 0; i < nfilters && !rc; i++) { > + if (sc->filters[i].locked) > + rc = set_filter(sc, i, &sc->filters[i]); > + } > + > + return (rc); > +} > + > +static int > +set_filter(struct adapter *sc, int id, const struct filter_info *f) > +{ > + int len; > + struct mbuf *m; > + struct ulp_txpkt *txpkt; > + struct work_request_hdr *wr; > + struct cpl_pass_open_req *oreq; > + struct cpl_set_tcb_field *sreq; > + > + len = sizeof(*wr) + sizeof(*oreq) + 2 * sizeof(*sreq); > + KASSERT(len <= MHLEN, ("filter request too big for an mbuf")); > + > + id += t3_mc5_size(&sc->mc5) - sc->params.mc5.nroutes - > + sc->params.mc5.nfilters; > + > + m = m_gethdr(M_WAITOK, MT_DATA); > + m->m_len = m->m_pkthdr.len = len; > + bzero(mtod(m, char *), len); > + > + wr = mtod(m, struct work_request_hdr *); > + wr->wrh_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS) | F_WR_ATOMIC); > + > + oreq = (struct cpl_pass_open_req *)(wr + 1); > + txpkt = (struct ulp_txpkt *)oreq; > + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); > + txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*oreq) / 8)); > + OPCODE_TID(oreq) = htonl(MK_OPCODE_TID(CPL_PASS_OPEN_REQ, id)); > + oreq->local_port = htons(f->dport); > + oreq->peer_port = htons(f->sport); > + oreq->local_ip = htonl(f->dip); > + oreq->peer_ip = htonl(f->sip); > + oreq->peer_netmask = htonl(f->sip_mask); > + oreq->opt0h = 0; > + oreq->opt0l = htonl(F_NO_OFFLOAD); > + oreq->opt1 = htonl(V_MAC_MATCH_VALID(f->mac_vld) | > + V_CONN_POLICY(CPL_CONN_POLICY_FILTER) | > + V_VLAN_PRI(f->vlan_prio >> 1) | > + V_VLAN_PRI_VALID(f->vlan_prio != FILTER_NO_VLAN_PRI) | > + V_PKT_TYPE(f->pkt_type) | V_OPT1_VLAN(f->vlan) | > + V_MAC_MATCH(f->mac_idx | (f->mac_hit << 4))); > + > + sreq = (struct cpl_set_tcb_field *)(oreq + 1); > + set_tcb_field_ulp(sreq, id, 1, 0x1800808000ULL, > + (f->report_filter_id << 15) | (1 << 23) | > + ((u64)f->pass << 35) | ((u64)!f->rss << 36)); > + set_tcb_field_ulp(sreq + 1, id, 0, 0xffffffff, (2 << 19) | 1); > + t3_mgmt_tx(sc, m); > + > + if (f->pass && !f->rss) { > + len = sizeof(*sreq); > + m = m_gethdr(M_WAITOK, MT_DATA); > + m->m_len = m->m_pkthdr.len = len; > + bzero(mtod(m, char *), len); > + sreq = mtod(m, struct cpl_set_tcb_field *); > + sreq->wr.wrh_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); > + mk_set_tcb_field(sreq, id, 25, 0x3f80000, > + (u64)sc->rrss_map[f->qset] << 19); > + t3_mgmt_tx(sc, m); > + } > + return 0; > +} > + > +static inline void > +mk_set_tcb_field(struct cpl_set_tcb_field *req, unsigned int tid, > + unsigned int word, u64 mask, u64 val) > +{ > + OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); > + req->reply = V_NO_REPLY(1); > + req->cpu_idx = 0; > + req->word = htons(word); > + req->mask = htobe64(mask); > + req->val = htobe64(val); > +} > + > +static inline void > +set_tcb_field_ulp(struct cpl_set_tcb_field *req, unsigned int tid, > + unsigned int word, u64 mask, u64 val) > +{ > + struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; > + > + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); > + txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); > + mk_set_tcb_field(req, tid, word, mask, val); > +} > > MODULE_DEPEND(if_cxgb, cxgb_t3fw, 1, 1, 1); > > Modified: head/usr.sbin/cxgbtool/cxgbtool.c > ============================================================================== > --- head/usr.sbin/cxgbtool/cxgbtool.c Wed May 5 00:39:50 2010 (r207642) > +++ head/usr.sbin/cxgbtool/cxgbtool.c Wed May 5 00:41:40 2010 (r207643) > @@ -1,6 +1,6 @@ > /************************************************************************** > > -Copyright (c) 2007-2009, Chelsio Inc. > +Copyright (c) 2007-2010, Chelsio Inc. > All rights reserved. > > Redistribution and use in source and binary forms, with or without > @@ -93,6 +93,9 @@ usage(FILE *fp) > "\tclearstats clear MAC statistics\n" > "\tcontext show an SGE context\n" > "\tdesc [] dump SGE descriptors\n" > + "\tfilter [ ] ... set a filter\n" > + "\tfilter delete|clear delete a filter\n" > + "\tfilter list list all filters\n" > "\tioqs dump uP IOQs\n" > "\tla dump uP logic analyzer info\n" > "\tloadboot download boot image\n" > @@ -1177,24 +1180,25 @@ parse_ipaddr(const char *s, uint32_t *ad > * Parse a string containing a value and an optional colon separated mask. > */ > static int > -parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask) > +parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask, > + uint32_t default_mask) > { > char *p; > > - *mask = 0xffffffffU; > + *mask = default_mask; > *val = strtoul(s, &p, 0); > - if (p == s) > + if (p == s || *val > default_mask) > return -1; > if (*p == ':' && p[1]) > *mask = strtoul(p + 1, &p, 0); > - return *p ? -1 : 0; > + return *p || *mask > default_mask ? -1 : 0; > } > > static int > parse_trace_param(const char *s, uint32_t *val, uint32_t *mask) > { > return strchr(s, '.') ? parse_ipaddr(s, val, mask) : > - parse_val_mask_param(s, val, mask); > + parse_val_mask_param(s, val, mask, 0xffffffffU); > } > > static int > @@ -1273,6 +1277,174 @@ trace_config(int argc, char *argv[], int > return 0; > } > > +static void > +show_filters(const char *iff_name) > +{ > + static const char *pkt_type[] = { "*", "tcp", "udp", "frag" }; > + struct ch_filter op; > + union { > + uint32_t nip; > + uint8_t octet[4]; > + } nsip, ndip; > + char sip[20], dip[20]; > + int header = 0; > + > + bzero(&op, sizeof(op)); > + op.filter_id = 0xffffffff; > + > + do { > + if (doit(iff_name, CHELSIO_GET_FILTER, &op) < 0) > + err(1, "list filters"); > + > + if (op.filter_id == 0xffffffff) > + break; > + > + if (!header) { > + printf("index SIP DIP sport " > + "dport VLAN PRI P/MAC type Q\n"); > + header = 1; > + } > + > + nsip.nip = htonl(op.val.sip); > + ndip.nip = htonl(op.val.dip); > + > + sprintf(sip, "%u.%u.%u.%u/%-2u", nsip.octet[0], nsip.octet[1], > + nsip.octet[2], nsip.octet[3], > + op.mask.sip ? 33 - ffs(op.mask.sip) : 0); > + sprintf(dip, "%u.%u.%u.%u", ndip.octet[0], ndip.octet[1], > + ndip.octet[2], ndip.octet[3]); > + printf("%5zu %18s %15s ", (size_t)op.filter_id, sip, dip); > + printf(op.val.sport ? "%5u " : " * ", op.val.sport); > + printf(op.val.dport ? "%5u " : " * ", op.val.dport); > + printf(op.val.vlan != 0xfff ? "%4u " : " * ", op.val.vlan); > + printf(op.val.vlan_prio == 7 ? " * " : > + "%1u/%1u ", op.val.vlan_prio, op.val.vlan_prio | 1); > + if (op.mac_addr_idx == 0xffff) > + printf("*/* "); > + else if (op.mac_hit) > + printf("%1u/%3u ", (op.mac_addr_idx >> 3) & 0x1, > + (op.mac_addr_idx) & 0x7); > + else > + printf("%1u/ * ", (op.mac_addr_idx >> 3) & 0x1); > + printf("%4s ", pkt_type[op.proto]); > + if (!op.pass) > + printf("-\n"); > + else if (op.rss) > + printf("*\n"); > + else > + printf("%1u\n", op.qset); > + } while (1); > +} > + > +static int > +filter_config(int argc, char *argv[], int start_arg, const char *iff_name) > +{ > + int ret = 0; > + uint32_t val, mask; > + struct ch_filter op; > + > + if (argc < start_arg + 1) > + return -1; > + > + memset(&op, 0, sizeof(op)); > + op.mac_addr_idx = 0xffff; > + op.rss = 1; > + > + if (argc == start_arg + 1 && !strcmp(argv[start_arg], "list")) { > + show_filters(iff_name); > + return 0; > + } > + > + if (get_int_arg(argv[start_arg++], &op.filter_id)) > + return -1; > + if (argc == start_arg + 1 && (!strcmp(argv[start_arg], "delete") || > + !strcmp(argv[start_arg], "clear"))) { > + if (doit(iff_name, CHELSIO_DEL_FILTER, &op) < 0) { > + if (errno == EBUSY) > + err(1, "no filter support when offload in use"); > + err(1, "delete filter"); > + } > + return 0; > + } > + > + while (start_arg + 2 <= argc) { > + if (!strcmp(argv[start_arg], "sip")) { > + ret = parse_ipaddr(argv[start_arg + 1], &op.val.sip, > + &op.mask.sip); > + } else if (!strcmp(argv[start_arg], "dip")) { > + ret = parse_ipaddr(argv[start_arg + 1], &op.val.dip, > + &op.mask.dip); > + } else if (!strcmp(argv[start_arg], "sport")) { > + ret = parse_val_mask_param(argv[start_arg + 1], > + &val, &mask, 0xffff); > + op.val.sport = val; > + op.mask.sport = mask; > + } else if (!strcmp(argv[start_arg], "dport")) { > + ret = parse_val_mask_param(argv[start_arg + 1], > + &val, &mask, 0xffff); > + op.val.dport = val; > + op.mask.dport = mask; > + } else if (!strcmp(argv[start_arg], "vlan")) { > + ret = parse_val_mask_param(argv[start_arg + 1], > + &val, &mask, 0xfff); > + op.val.vlan = val; > + op.mask.vlan = mask; > + } else if (!strcmp(argv[start_arg], "prio")) { > + ret = parse_val_mask_param(argv[start_arg + 1], > + &val, &mask, 7); > + op.val.vlan_prio = val; > + op.mask.vlan_prio = mask; > + } else if (!strcmp(argv[start_arg], "mac")) { > + if (!strcmp(argv[start_arg + 1], "none")) > + val = -1; > + else > + ret = get_int_arg(argv[start_arg + 1], &val); > + op.mac_hit = val != (uint32_t)-1; > + op.mac_addr_idx = op.mac_hit ? val : 0; > + } else if (!strcmp(argv[start_arg], "type")) { > + if (!strcmp(argv[start_arg + 1], "tcp")) > + op.proto = 1; > + else if (!strcmp(argv[start_arg + 1], "udp")) > + op.proto = 2; > + else if (!strcmp(argv[start_arg + 1], "frag")) > + op.proto = 3; > + else > + errx(1, "unknown type \"%s\"; must be one of " > + "\"tcp\", \"udp\", or \"frag\"", > + argv[start_arg + 1]); > + } else if (!strcmp(argv[start_arg], "queue")) { > + ret = get_int_arg(argv[start_arg + 1], &val); > + op.qset = val; > + op.rss = 0; > + } else if (!strcmp(argv[start_arg], "action")) { > + if (!strcmp(argv[start_arg + 1], "pass")) > + op.pass = 1; > + else if (strcmp(argv[start_arg + 1], "drop")) > + errx(1, "unknown action \"%s\"; must be one of " > + "\"pass\" or \"drop\"", > + argv[start_arg + 1]); > + } else > + errx(1, "unknown filter parameter \"%s\"\n" > + "known parameters are \"mac\", \"sip\", " > + "\"dip\", \"sport\", \"dport\", \"vlan\", " > + "\"prio\", \"type\", \"queue\", and \"action\"", > + argv[start_arg]); > + if (ret < 0) > + errx(1, "bad value \"%s\" for parameter \"%s\"", > + argv[start_arg + 1], argv[start_arg]); > + start_arg += 2; > + } > + if (start_arg != argc) > + errx(1, "no value for \"%s\"", argv[start_arg]); > + > + if (doit(iff_name, CHELSIO_SET_FILTER, &op) < 0) { > + if (errno == EBUSY) > + err(1, "no filter support when offload in use"); > + err(1, "set filter"); > + } > + > + return 0; > +} > static int > get_sched_param(int argc, char *argv[], int pos, unsigned int *valp) > { > @@ -1501,6 +1673,8 @@ run_cmd(int argc, char *argv[], const ch > r = pktsched(argc, argv, 3, iff_name); > else if (!strcmp(argv[2], "tcb")) > r = get_tcb2(argc, argv, 3, iff_name); > + else if (!strcmp(argv[2], "filter")) > + r = filter_config(argc, argv, 3, iff_name); > else if (!strcmp(argv[2], "clearstats")) > r = clear_stats(argc, argv, 3, iff_name); > else if (!strcmp(argv[2], "la")) > From owner-svn-src-all@FreeBSD.ORG Wed May 5 10:30:56 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id 263A5106566C; Wed, 5 May 2010 10:30:56 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Wed, 5 May 2010 19:30:49 +0900 From: Norikatsu Shigemura To: Navdeep Parhar Message-Id: <20100505193049.cd94c63e.nork@FreeBSD.org> In-Reply-To: <201005050041.o450fesw090589@svn.freebsd.org> References: <201005050041.o450fesw090589@svn.freebsd.org> X-Mailer: Sylpheed 3.0.0 (GTK+ 2.18.7; i386-portbld-freebsd8.0) 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 Subject: Re: svn commit: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool 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, 05 May 2010 10:30:57 -0000 Hi np! On Wed, 5 May 2010 00:41:40 +0000 (UTC) Navdeep Parhar wrote: > Add support for hardware filters to cxgb(4). The T3 chip can inspect > L2/3/4 headers and can drop or steer packets as instructed. Filtering > based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac > addr is possible. Add support in cxgbtool to program these filters. Great news. Do you have any schedule to implement ipfw(4) hardware acceleration? :-) -- Norikatsu Shigemura From owner-svn-src-all@FreeBSD.ORG Wed May 5 12:37:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9CD51065673; Wed, 5 May 2010 12:37:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B824A8FC1C; Wed, 5 May 2010 12:37: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 o45Cb7Rq050360; Wed, 5 May 2010 12:37:07 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45Cb7sI050355; Wed, 5 May 2010 12:37:07 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051237.o45Cb7sI050355@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12:37:07 +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: r207655 - 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, 05 May 2010 12:37:07 -0000 Author: gavin Date: Wed May 5 12:37:07 2010 New Revision: 207655 URL: http://svn.freebsd.org/changeset/base/207655 Log: Merge r203684 from head (mainly to make future merges easier for people): Update .Dt on these man pages: the kernel modules and corresponding man pages are installed on more platforms than just i386. Modified: stable/8/share/man/man4/io.4 stable/8/share/man/man4/linux.4 stable/8/share/man/man4/ndis.4 stable/8/share/man/man4/nvram.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/io.4 ============================================================================== --- stable/8/share/man/man4/io.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/io.4 Wed May 5 12:37:07 2010 (r207655) @@ -27,8 +27,8 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2004 -.Dt IO 4 i386 +.Dd February 8, 2010 +.Dt IO 4 .Os .Sh NAME .Nm io Modified: stable/8/share/man/man4/linux.4 ============================================================================== --- stable/8/share/man/man4/linux.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/linux.4 Wed May 5 12:37:07 2010 (r207655) @@ -24,8 +24,8 @@ .\" .\" $FreeBSD$ .\" -.Dd March 17, 2008 -.Dt LINUX 4 i386 +.Dd February 8, 2010 +.Dt LINUX 4 .Os .Sh NAME .Nm linux Modified: stable/8/share/man/man4/ndis.4 ============================================================================== --- stable/8/share/man/man4/ndis.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/ndis.4 Wed May 5 12:37:07 2010 (r207655) @@ -30,8 +30,8 @@ .\" .\" $FreeBSD$ .\" -.Dd October 13, 2006 -.Dt NDIS 4 i386 +.Dd February 8, 2010 +.Dt NDIS 4 .Os .Sh NAME .Nm ndis Modified: stable/8/share/man/man4/nvram.4 ============================================================================== --- stable/8/share/man/man4/nvram.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/nvram.4 Wed May 5 12:37:07 2010 (r207655) @@ -26,8 +26,8 @@ .\" .\" $FreeBSD$ .\" -.Dd January 27, 2010 -.Dt NVRAM 4 i386 +.Dd February 8, 2010 +.Dt NVRAM 4 .Os .Sh NAME .Nm nvram From owner-svn-src-all@FreeBSD.ORG Wed May 5 12:38:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C81A106566B; Wed, 5 May 2010 12:38:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1C28FC1F; Wed, 5 May 2010 12: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 o45CcMAM050666; Wed, 5 May 2010 12: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 o45CcMud050664; Wed, 5 May 2010 12:38:22 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051238.o45CcMud050664@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12: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: r207656 - 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, 05 May 2010 12:38:23 -0000 Author: gavin Date: Wed May 5 12:38:22 2010 New Revision: 207656 URL: http://svn.freebsd.org/changeset/base/207656 Log: Merge r205155 from head: Add extra Xrefs PR: docs/114184 Submitted by: Julian Stacey Modified: stable/8/share/man/man4/ndis.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ndis.4 ============================================================================== --- stable/8/share/man/man4/ndis.4 Wed May 5 12:37:07 2010 (r207655) +++ stable/8/share/man/man4/ndis.4 Wed May 5 12:38:22 2010 (r207656) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd March 14, 2010 .Dt NDIS 4 .Os .Sh NAME @@ -133,8 +133,10 @@ before a timeout expired. .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 , +.Xr ndis_events 8 , .Xr ndiscvt 8 , -.Xr ndisgen 8 +.Xr ndisgen 8 , +.Xr wpa_supplicant 8 .Rs .%T "NDIS 5.1 specification" .%O http://www.microsoft.com From owner-svn-src-all@FreeBSD.ORG Wed May 5 12:39:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBD01106566C; Wed, 5 May 2010 12:39:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CAA9A8FC1C; Wed, 5 May 2010 12:39: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 o45CdiOn051006; Wed, 5 May 2010 12:39:44 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45CdiJd051004; Wed, 5 May 2010 12:39:44 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051239.o45CdiJd051004@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12:39:44 +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: r207657 - stable/8/usr.bin/biff 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, 05 May 2010 12:39:45 -0000 Author: gavin Date: Wed May 5 12:39:44 2010 New Revision: 207657 URL: http://svn.freebsd.org/changeset/base/207657 Log: Merge r205386 from head: Fix command example, presumed leftovers of old markup. Modified: stable/8/usr.bin/biff/biff.1 Directory Properties: stable/8/usr.bin/biff/ (props changed) Modified: stable/8/usr.bin/biff/biff.1 ============================================================================== --- stable/8/usr.bin/biff/biff.1 Wed May 5 12:38:22 2010 (r207656) +++ stable/8/usr.bin/biff/biff.1 Wed May 5 12:39:44 2010 (r207657) @@ -32,7 +32,7 @@ .\" @(#)biff.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 9, 2002 +.Dd March 20, 2010 .Dt BIFF 1 .Os .Sh NAME @@ -67,7 +67,7 @@ Enable bell notification. When header notification is enabled, the header and first few lines of the message will be printed on your terminal whenever mail arrives. A -.Dq "Li biff y" +.Dq "biff y" command is often included in the file .Pa .login or From owner-svn-src-all@FreeBSD.ORG Wed May 5 12:48:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A755106566B; Wed, 5 May 2010 12:48:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 38E798FC1C; Wed, 5 May 2010 12:48:31 +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 o45CmVQd052981; Wed, 5 May 2010 12:48:31 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45CmVUV052978; Wed, 5 May 2010 12:48:31 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051248.o45CmVUV052978@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12:48:31 +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: r207658 - stable/7/sbin/sysctl 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, 05 May 2010 12:48:31 -0000 Author: gavin Date: Wed May 5 12:48:30 2010 New Revision: 207658 URL: http://svn.freebsd.org/changeset/base/207658 Log: Merge r203310,203547,203717 from head: Implement the "-i" option to sysctl(8), to ignore failures while retrieving individual OIDs. This allows the same list of OIDs to be passed to sysctl(8) across different systems where particular OIDs may not exist, and still get as much information as possible from them. PR: bin/123644 Submitted by: dhw Modified: stable/7/sbin/sysctl/sysctl.8 stable/7/sbin/sysctl/sysctl.c Directory Properties: stable/7/sbin/sysctl/ (props changed) Modified: stable/7/sbin/sysctl/sysctl.8 ============================================================================== --- stable/7/sbin/sysctl/sysctl.8 Wed May 5 12:39:44 2010 (r207657) +++ stable/7/sbin/sysctl/sysctl.8 Wed May 5 12:48:30 2010 (r207658) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 28, 2007 +.Dd February 6, 2010 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehNnoqx +.Op Fl bdehiNnoqx .Ar name Ns Op = Ns Ar value .Ar ... .Nm @@ -82,6 +82,12 @@ or is specified, or a variable is being set. .It Fl h Format output for human, rather than machine, readability. +.It Fl i +Ignore unknown OIDs. +The purpose is to make use of +.Nm +for collecting data from a variety of machines (not all of which +are necessarily running exactly the same software) easier. .It Fl N Show only variable names, not their values. This is particularly useful with shells that offer programmable Modified: stable/7/sbin/sysctl/sysctl.c ============================================================================== --- stable/7/sbin/sysctl/sysctl.c Wed May 5 12:39:44 2010 (r207657) +++ stable/7/sbin/sysctl/sysctl.c Wed May 5 12:48:30 2010 (r207658) @@ -58,8 +58,8 @@ static const char rcsid[] = #include #include -static int aflag, bflag, dflag, eflag, hflag, Nflag, nflag, oflag; -static int qflag, xflag; +static int aflag, bflag, dflag, eflag, hflag, iflag, +static int Nflag, nflag, oflag, qflag, xflag; static int oidfmt(int *, int, char *, u_int *); static void parse(char *); @@ -75,7 +75,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: sysctl [-bdehNnoqx] name[=value] ...", + "usage: sysctl [-bdehiNnoqx] name[=value] ...", " sysctl [-bdehNnoqx] -a"); exit(1); } @@ -89,7 +89,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabdehNnoqwxX")) != -1) { + while ((ch = getopt(argc, argv, "AabdehiNnoqwxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -110,6 +110,9 @@ main(int argc, char **argv) case 'h': hflag = 1; break; + case 'i': + iflag = 1; + break; case 'N': Nflag = 1; break; @@ -185,6 +188,8 @@ parse(char *string) len = name2oid(bufp, mib); if (len < 0) { + if (iflag) + return; if (qflag) exit(1); else From owner-svn-src-all@FreeBSD.ORG Wed May 5 16:05:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A970A1065670; Wed, 5 May 2010 16:05:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 99BEE8FC19; Wed, 5 May 2010 16:05: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 o45G5pe5096480; Wed, 5 May 2010 16:05:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45G5pDG096478; Wed, 5 May 2010 16:05:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005051605.o45G5pDG096478@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 May 2010 16:05: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: r207659 - 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: Wed, 05 May 2010 16:05:51 -0000 Author: kib Date: Wed May 5 16:05:51 2010 New Revision: 207659 URL: http://svn.freebsd.org/changeset/base/207659 Log: Fix a mistake in r207603. td_rux.rux_runtime still needs conversion. Reported and tested by: nwhitehorn Pointy hat to: kib MFC after: 6 days Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed May 5 12:48:30 2010 (r207658) +++ head/sys/kern/kern_proc.c Wed May 5 16:05:51 2010 (r207659) @@ -901,7 +901,7 @@ fill_kinfo_thread(struct thread *td, str kp->ki_pri.pri_user = td->td_user_pri; if (preferthread) { - kp->ki_runtime = td->td_rux.rux_runtime; + kp->ki_runtime = cputick2usec(td->td_rux.rux_runtime); kp->ki_pctcpu = sched_pctcpu(td); kp->ki_estcpu = td->td_estcpu; } From owner-svn-src-all@FreeBSD.ORG Wed May 5 16:25:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 930C0106566B; Wed, 5 May 2010 16:25:57 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 826AE8FC12; Wed, 5 May 2010 16: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 o45GPveH001008; Wed, 5 May 2010 16:25:57 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GPv3M001006; Wed, 5 May 2010 16:25:57 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051625.o45GPv3M001006@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 16:25: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: r207660 - in stable/8/release: . picobsd/floppy.tree/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: Wed, 05 May 2010 16:25:57 -0000 Author: kensmith Date: Wed May 5 16:25:57 2010 New Revision: 207660 URL: http://svn.freebsd.org/changeset/base/207660 Log: Merge r206422: > Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition > to FTP_PASSIVE_MODE so release building works for a machine that needs > to use a proxy. PR: misc/137688 Submitted by: Michael Leun Modified: stable/8/release/Makefile Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Wed May 5 16:05:51 2010 (r207659) +++ stable/8/release/Makefile Wed May 5 16:25:57 2010 (r207660) @@ -575,7 +575,7 @@ release rerelease: echo " for i in ${MAKEINDEXPORTS}" >> ${_MK} echo " do" >> ${_MK} echo " cd /usr/ports/\$${i}" >> ${_MK} - echo " env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} + echo " env -i HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} echo " make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >> ${_MK} echo " done" >> ${_MK} echo " cd /usr/ports" >> ${_MK} From owner-svn-src-all@FreeBSD.ORG Wed May 5 16:41:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 286A5106567B; Wed, 5 May 2010 16:41:15 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 183D18FC14; Wed, 5 May 2010 16:41: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 o45GfEal004436; Wed, 5 May 2010 16:41:14 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GfEFo004434; Wed, 5 May 2010 16:41:14 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051641.o45GfEFo004434@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 16:41:14 +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: r207661 - stable/7/release 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, 05 May 2010 16:41:15 -0000 Author: kensmith Date: Wed May 5 16:41:14 2010 New Revision: 207661 URL: http://svn.freebsd.org/changeset/base/207661 Log: Merge r206422: > Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition > to FTP_PASSIVE_MODE so release building works for a machine that needs > to use a proxy. PR: misc/137688 Submitted by: Michael Leun Modified: stable/7/release/Makefile Directory Properties: stable/7/release/ (props changed) stable/7/release/doc/ (props changed) stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/Makefile ============================================================================== --- stable/7/release/Makefile Wed May 5 16:25:57 2010 (r207660) +++ stable/7/release/Makefile Wed May 5 16:41:14 2010 (r207661) @@ -576,7 +576,7 @@ release rerelease: echo " for i in ${MAKEINDEXPORTS}" >> ${_MK} echo " do" >> ${_MK} echo " cd /usr/ports/\$${i}" >> ${_MK} - echo " env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} + echo " env -i HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} echo " make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >> ${_MK} echo " done" >> ${_MK} echo " cd /usr/ports" >> ${_MK} From owner-svn-src-all@FreeBSD.ORG Wed May 5 16:44:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 642391065675; Wed, 5 May 2010 16:44:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 51D398FC29; Wed, 5 May 2010 16:44: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 o45GiQlc005186; Wed, 5 May 2010 16:44:26 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GiQBB005173; Wed, 5 May 2010 16:44:26 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005051644.o45GiQBB005173@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 5 May 2010 16:44: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: r207662 - in head/sys: fs/ext2fs fs/msdosfs fs/nfsclient fs/nwfs fs/smbfs fs/tmpfs gnu/fs/xfs/FreeBSD kern nfsclient sys ufs/ffs 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, 05 May 2010 16:44:26 -0000 Author: trasz Date: Wed May 5 16:44:25 2010 New Revision: 207662 URL: http://svn.freebsd.org/changeset/base/207662 Log: Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize(). Reviewed by: kib Modified: head/sys/fs/ext2fs/ext2_readwrite.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c head/sys/kern/vfs_vnops.c head/sys/nfsclient/nfs_bio.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/fs/ext2fs/ext2_readwrite.c ============================================================================== --- head/sys/fs/ext2fs/ext2_readwrite.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/ext2fs/ext2_readwrite.c Wed May 5 16:44:25 2010 (r207662) @@ -168,7 +168,6 @@ WRITE(ap) struct inode *ip; FS *fs; struct buf *bp; - struct thread *td; daddr_t lbn; off_t osize; int blkoffset, error, flags, ioflag, resid, size, seqcount, xfersize; @@ -213,17 +212,8 @@ WRITE(ap) * Maybe this should be above the vnode op call, but so long as * file servers have no limits, I don't think it matters. */ - td = uio->uio_td; - if (vp->v_type == VREG && td != NULL) { - PROC_LOCK(td->td_proc); - if (uio->uio_offset + uio->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - } + if (vn_rlimit_fsize(vp, uio, uio->uio_td)) + return (EFBIG); resid = uio->uio_resid; osize = ip->i_size; Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/ext2fs/ext2_vnops.c Wed May 5 16:44:25 2010 (r207662) @@ -46,7 +46,6 @@ #include #include -#include #include #include #include @@ -54,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +69,6 @@ #include -#include #include #include Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Wed May 5 16:44:25 2010 (r207662) @@ -61,9 +61,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -699,16 +696,8 @@ msdosfs_write(ap) /* * If they've exceeded their filesize limit, tell them about it. */ - if (td != NULL) { - PROC_LOCK(td->td_proc); - if ((uoff_t)uio->uio_offset + uio->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - } + if (vn_rlimit_fsize(vp, uio, td)) + return (EFBIG); /* * If the offset we are starting the write at is beyond the end of Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed May 5 16:44:25 2010 (r207662) @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include #include @@ -880,7 +877,6 @@ ncl_write(struct vop_write_args *ap) daddr_t lbn; int bcount; int n, on, error = 0; - struct proc *p = td?td->td_proc:NULL; #ifdef DIAGNOSTIC if (uio->uio_rw != UIO_WRITE) @@ -962,16 +958,8 @@ flush_and_restart: * Maybe this should be above the vnode op call, but so long as * file servers have no limits, i don't think it matters */ - if (p != NULL) { - PROC_LOCK(p); - if (uio->uio_offset + uio->uio_resid > - lim_cur(p, RLIMIT_FSIZE)) { - psignal(p, SIGXFSZ); - PROC_UNLOCK(p); - return (EFBIG); - } - PROC_UNLOCK(p); - } + if (vn_rlimit_fsize(vp, uio, td)) + return (EFBIG); biosize = vp->v_mount->mnt_stat.f_iosize; /* Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/nwfs/nwfs_io.c Wed May 5 16:44:25 2010 (r207662) @@ -28,16 +28,13 @@ */ #include #include -#include /* defines plimit structure in proc struct */ #include #include #include -#include #include #include #include #include -#include #include #include @@ -229,16 +226,10 @@ nwfs_writevnode(vp, uiop, cred, ioflag) } } if (uiop->uio_resid == 0) return 0; - if (td != NULL) { - PROC_LOCK(td->td_proc); - if (uiop->uio_offset + uiop->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - } + + if (vn_rlimit_fsize(vp, uiop, td)) + return (EFBIG); + error = ncp_write(NWFSTOCONN(nmp), &np->n_fh, uiop, cred); NCPVNDEBUG("after: ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid); if (!error) { Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/smbfs/smbfs_io.c Wed May 5 16:44:25 2010 (r207662) @@ -28,9 +28,7 @@ */ #include #include -#include /* defines plimit structure in proc struct */ #include -#include #include #include #include @@ -235,7 +233,6 @@ smbfs_writevnode(struct vnode *vp, struc struct smbmount *smp = VTOSMBFS(vp); struct smbnode *np = VTOSMB(vp); struct smb_cred scred; - struct proc *p; struct thread *td; int error = 0; @@ -249,7 +246,6 @@ smbfs_writevnode(struct vnode *vp, struc /* if (uiop->uio_offset + uiop->uio_resid > smp->nm_maxfilesize) return (EFBIG);*/ td = uiop->uio_td; - p = td->td_proc; if (ioflag & (IO_APPEND | IO_SYNC)) { if (np->n_flag & NMODIFIED) { smbfs_attr_cacheremove(vp); @@ -271,16 +267,10 @@ smbfs_writevnode(struct vnode *vp, struc } if (uiop->uio_resid == 0) return 0; - if (p != NULL) { - PROC_LOCK(p); - if (uiop->uio_offset + uiop->uio_resid > - lim_cur(p, RLIMIT_FSIZE)) { - psignal(p, SIGXFSZ); - PROC_UNLOCK(p); - return EFBIG; - } - PROC_UNLOCK(p); - } + + if (vn_rlimit_fsize(vp, uiop, td)) + return (EFBIG); + smb_makescred(&scred, td, cred); error = smb_write(smp->sm_share, np->n_fid, uiop, &scred); SMBVDEBUG("after: ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed May 5 16:44:25 2010 (r207662) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -748,16 +747,8 @@ tmpfs_write(struct vop_write_args *v) VFS_TO_TMPFS(vp->v_mount)->tm_maxfilesize) return (EFBIG); - if (vp->v_type == VREG && td != NULL) { - PROC_LOCK(td->td_proc); - if (uio->uio_offset + uio->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - } + if (vn_rlimit_fsize(vp, uio, td)) + return (EFBIG); extended = uio->uio_offset + uio->uio_resid > node->tn_size; if (extended) { Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Wed May 5 16:44:25 2010 (r207662) @@ -598,16 +598,8 @@ xfs_write_file(xfs_inode_t *xip, struct */ #if 0 td = uio->uio_td; - if (vp->v_type == VREG && td != NULL) { - PROC_LOCK(td->td_proc); - if (uio->uio_offset + uio->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - } + if (vn_rlimit_fsize(vp, uio, uio->uio_td)) + return (EFBIG); #endif resid = uio->uio_resid; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/kern/vfs_vnops.c Wed May 5 16:44:25 2010 (r207662) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1338,3 +1339,21 @@ vn_vget_ino(struct vnode *vp, ino_t ino, } return (error); } + +int +vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, const struct thread *td) +{ + if (vp->v_type != VREG || td == NULL) + return (0); + + PROC_LOCK(td->td_proc); + if (uio->uio_offset + uio->uio_resid > + lim_cur(td->td_proc, RLIMIT_FSIZE)) { + psignal(td->td_proc, SIGXFSZ); + PROC_UNLOCK(td->td_proc); + return (EFBIG); + } + PROC_UNLOCK(td->td_proc); + + return (0); +} Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/nfsclient/nfs_bio.c Wed May 5 16:44:25 2010 (r207662) @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include @@ -873,7 +871,6 @@ nfs_write(struct vop_write_args *ap) daddr_t lbn; int bcount; int n, on, error = 0; - struct proc *p = td?td->td_proc:NULL; #ifdef DIAGNOSTIC if (uio->uio_rw != UIO_WRITE) @@ -954,16 +951,8 @@ flush_and_restart: * Maybe this should be above the vnode op call, but so long as * file servers have no limits, i don't think it matters */ - if (p != NULL) { - PROC_LOCK(p); - if (uio->uio_offset + uio->uio_resid > - lim_cur(p, RLIMIT_FSIZE)) { - psignal(p, SIGXFSZ); - PROC_UNLOCK(p); - return (EFBIG); - } - PROC_UNLOCK(p); - } + if (vn_rlimit_fsize(vp, uio, td)) + return (EFBIG); biosize = vp->v_mount->mnt_stat.f_iosize; /* Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed May 5 16:41:14 2010 (r207661) +++ head/sys/sys/vnode.h Wed May 5 16:44:25 2010 (r207662) @@ -780,6 +780,7 @@ struct dirent; int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off); int vfs_unixify_accmode(accmode_t *accmode); +int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, const struct thread *td); #endif /* _KERNEL */ Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Wed May 5 16:41:14 2010 (r207661) +++ head/sys/ufs/ffs/ffs_vnops.c Wed May 5 16:44:25 2010 (r207662) @@ -75,9 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include #include #include @@ -652,7 +649,6 @@ ffs_write(ap) struct inode *ip; struct fs *fs; struct buf *bp; - struct thread *td; ufs_lbn_t lbn; off_t osize; int seqcount; @@ -704,17 +700,8 @@ ffs_write(ap) * Maybe this should be above the vnode op call, but so long as * file servers have no limits, I don't think it matters. */ - td = uio->uio_td; - if (vp->v_type == VREG && td != NULL) { - PROC_LOCK(td->td_proc); - if (uio->uio_offset + uio->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - } + if (vn_rlimit_fsize(vp, uio, uio->uio_td)) + return (EFBIG); resid = uio->uio_resid; osize = ip->i_size; From owner-svn-src-all@FreeBSD.ORG Wed May 5 16:48:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1205) id 4186C1065672; Wed, 5 May 2010 16:48:22 +0000 (UTC) Date: Wed, 5 May 2010 16:48:22 +0000 From: Navdeep Parhar To: Rui Paulo Message-ID: <20100505164822.GA44629@hub.freebsd.org> Mail-Followup-To: Rui Paulo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201005050041.o450fesw090589@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool 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, 05 May 2010 16:48:22 -0000 On Wed, May 05, 2010 at 11:02:49AM +0100, Rui Paulo wrote: > On 5 May 2010, at 01:41, Navdeep Parhar wrote: > > > Author: np > > Date: Wed May 5 00:41:40 2010 > > New Revision: 207643 > > URL: http://svn.freebsd.org/changeset/base/207643 > > > > Log: > > Add support for hardware filters to cxgb(4). The T3 chip can inspect > > L2/3/4 headers and can drop or steer packets as instructed. Filtering > > based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac > > addr is possible. Add support in cxgbtool to program these filters. > > Some simple examples: > > ... > > MFC after: 2 weeks > > Wow, this is great! So this is able to do packet filtering at 10Gbps with no CPU impact? Yes, a packet that is dropped due to a filter match is dropped by the NIC's silicon. There is no CPU impact. Regards, Navdeep > > Regards, > -- > Rui Paulo > > From owner-svn-src-all@FreeBSD.ORG Wed May 5 16:58:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53B90106564A; Wed, 5 May 2010 16:58:30 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 431028FC0C; Wed, 5 May 2010 16:58: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 o45GwUI3008480; Wed, 5 May 2010 16:58:30 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GwUIm008477; Wed, 5 May 2010 16:58:30 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051658.o45GwUIm008477@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 16:58: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: r207665 - in stable/8/release: . picobsd/floppy.tree/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: Wed, 05 May 2010 16:58:30 -0000 Author: kensmith Date: Wed May 5 16:58:29 2010 New Revision: 207665 URL: http://svn.freebsd.org/changeset/base/207665 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/8/release/Makefile stable/8/release/Makefile.inc.docports Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Wed May 5 16:57:02 2010 (r207664) +++ stable/8/release/Makefile Wed May 5 16:58:29 2010 (r207665) @@ -171,7 +171,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 DOCPORTS= textproc/docproj # Set this to wherever the distfiles required by release procedures. .if defined(DOCDISTFILES) Modified: stable/8/release/Makefile.inc.docports ============================================================================== --- stable/8/release/Makefile.inc.docports Wed May 5 16:57:02 2010 (r207664) +++ stable/8/release/Makefile.inc.docports Wed May 5 16:58:29 2010 (r207665) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-all@FreeBSD.ORG Wed May 5 17:01:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02C94106564A; Wed, 5 May 2010 17:01:04 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6DBD8FC14; Wed, 5 May 2010 17:01: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 o45H13Eb009111; Wed, 5 May 2010 17:01:03 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45H13sU009108; Wed, 5 May 2010 17:01:03 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051701.o45H13sU009108@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 17:01:03 +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: r207666 - stable/7/release 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, 05 May 2010 17:01:04 -0000 Author: kensmith Date: Wed May 5 17:01:03 2010 New Revision: 207666 URL: http://svn.freebsd.org/changeset/base/207666 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/7/release/Makefile stable/7/release/Makefile.inc.docports Directory Properties: stable/7/release/ (props changed) stable/7/release/doc/ (props changed) stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/Makefile ============================================================================== --- stable/7/release/Makefile Wed May 5 16:58:29 2010 (r207665) +++ stable/7/release/Makefile Wed May 5 17:01:03 2010 (r207666) @@ -169,7 +169,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 # By default, documentation (Handbook, FAQ, etc.) is built for all # the languages. To speed up building, set the DOC_LANG to just # the languages you need. (The language for the release notes is Modified: stable/7/release/Makefile.inc.docports ============================================================================== --- stable/7/release/Makefile.inc.docports Wed May 5 16:58:29 2010 (r207665) +++ stable/7/release/Makefile.inc.docports Wed May 5 17:01:03 2010 (r207666) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-all@FreeBSD.ORG Wed May 5 17:13:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80FD71065673; Wed, 5 May 2010 17:13:54 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 706BD8FC14; Wed, 5 May 2010 17:13: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 o45HDs6d011959; Wed, 5 May 2010 17:13:54 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45HDrP7011958; Wed, 5 May 2010 17:13:53 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051713.o45HDrP7011958@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 17:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207667 - in stable/6/release: . scripts 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, 05 May 2010 17:13:54 -0000 Author: kensmith Date: Wed May 5 17:13:53 2010 New Revision: 207667 URL: http://svn.freebsd.org/changeset/base/207667 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/6/release/Makefile stable/6/release/Makefile.inc.docports Directory Properties: stable/6/release/ (props changed) stable/6/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/6/release/scripts/src-install.sh (props changed) Modified: stable/6/release/Makefile ============================================================================== --- stable/6/release/Makefile Wed May 5 17:01:03 2010 (r207666) +++ stable/6/release/Makefile Wed May 5 17:13:53 2010 (r207667) @@ -140,7 +140,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 # By default, documentation (Handbook, FAQ, etc.) is built for all # the languages. To speed up building, set the DOC_LANG to just # the languages you need. (The language for the release notes is Modified: stable/6/release/Makefile.inc.docports ============================================================================== --- stable/6/release/Makefile.inc.docports Wed May 5 17:01:03 2010 (r207666) +++ stable/6/release/Makefile.inc.docports Wed May 5 17:13:53 2010 (r207667) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-all@FreeBSD.ORG Wed May 5 17:17:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1EDC1065679; Wed, 5 May 2010 17:17:19 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B0F228FC25; Wed, 5 May 2010 17:17: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 o45HHJWM012751; Wed, 5 May 2010 17:17:19 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45HHJlr012749; Wed, 5 May 2010 17:17:19 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051717.o45HHJlr012749@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 17:17:19 +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: r207668 - stable/7/usr.sbin/arlcontrol 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, 05 May 2010 17:17:19 -0000 Author: gavin Date: Wed May 5 17:17:19 2010 New Revision: 207668 URL: http://svn.freebsd.org/changeset/base/207668 Log: Spell "Hz" correctly in arlcontrol. Direct commit to stable/7 as this code no longer exists in head. PR: bin/142566 Submitted by: N.J. Mann Modified: stable/7/usr.sbin/arlcontrol/arlcontrol.c Modified: stable/7/usr.sbin/arlcontrol/arlcontrol.c ============================================================================== --- stable/7/usr.sbin/arlcontrol/arlcontrol.c Wed May 5 17:13:53 2010 (r207667) +++ stable/7/usr.sbin/arlcontrol/arlcontrol.c Wed May 5 17:17:19 2010 (r207668) @@ -148,21 +148,21 @@ static struct ch_list { int max_freq; } CHSET[] = { { 0, 0, 0, 0, 0, 0 }, - { 1, "900 Mhz", "Canada, U.S.A., Mexico", 0, freq_list_1, MAXFREQ(freq_list_1) }, + { 1, "900 MHz", "Canada, U.S.A., Mexico", 0, freq_list_1, MAXFREQ(freq_list_1) }, { 2, 0, 0, 0, 0, 0 }, { 3, 0, 0, 0, 0, 0 }, { 4, 0, 0, 0, 0, 0 }, { 5, 0, 0, 0, 0, 0 }, - { 6, "900 Mhz", "Australia", 0, freq_list_6, MAXFREQ(freq_list_6) }, + { 6, "900 MHz", "Australia", 0, freq_list_6, MAXFREQ(freq_list_6) }, { 7, 0, 0, 0, 0, 0 }, { 8, 0, 0, 0, 0, 0 }, - { 9, "2400 Mhz", "North America", rate_list_2400, freq_list_9, MAXFREQ(freq_list_9) }, - { 10, "2400 Mhz", "E.T.S.I", rate_list_2400, freq_list_10, MAXFREQ(freq_list_10) }, - { 11, "2400 Mhz", "Japan", rate_list_2400, freq_list_11, MAXFREQ(freq_list_11) }, - { 12, "2400 Mhz", "France", rate_list_2400, freq_list_12, MAXFREQ(freq_list_12) }, - { 13, "2400 Mhz", "Australia", rate_list_2400, freq_list_13, MAXFREQ(freq_list_13) }, - { 14, "2400 Mhz", "Germany", rate_list_2400, freq_list_14, MAXFREQ(freq_list_14) }, - { 15, "2400 Mhz", "U.K.(MPT1349),Spain", rate_list_2400, freq_list_15, MAXFREQ(freq_list_15) } + { 9, "2400 MHz", "North America", rate_list_2400, freq_list_9, MAXFREQ(freq_list_9) }, + { 10, "2400 MHz", "E.T.S.I", rate_list_2400, freq_list_10, MAXFREQ(freq_list_10) }, + { 11, "2400 MHz", "Japan", rate_list_2400, freq_list_11, MAXFREQ(freq_list_11) }, + { 12, "2400 MHz", "France", rate_list_2400, freq_list_12, MAXFREQ(freq_list_12) }, + { 13, "2400 MHz", "Australia", rate_list_2400, freq_list_13, MAXFREQ(freq_list_13) }, + { 14, "2400 MHz", "Germany", rate_list_2400, freq_list_14, MAXFREQ(freq_list_14) }, + { 15, "2400 MHz", "U.K.(MPT1349),Spain", rate_list_2400, freq_list_15, MAXFREQ(freq_list_15) } }; char* registrationMode[] = { @@ -221,7 +221,7 @@ print_al(struct arl_cfg_param *arl_io) arl_io->channelSet, CHSET[arl_io->channelSet].fr, CHSET[arl_io->channelSet].country); - printf("\tfrequency %s Mhz, bitrate %s kb/s, priority %s, receive mode %d\n", + printf("\tfrequency %s MHz, bitrate %s kb/s, priority %s, receive mode %d\n", (CHSET[arl_io->channelSet].freq && CHSET[arl_io->channelSet].max_freq > arl_io->channelNumber) ? CHSET[arl_io->channelSet].freq[arl_io->channelNumber].name : From owner-svn-src-all@FreeBSD.ORG Wed May 5 18:16:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F92D106564A; Wed, 5 May 2010 18:16:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2E89B8FC19; Wed, 5 May 2010 18:16: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 o45IG7a1025764; Wed, 5 May 2010 18:16:07 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45IG6FX025752; Wed, 5 May 2010 18:16:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005051816.o45IG6FX025752@svn.freebsd.org> From: Alan Cox Date: Wed, 5 May 2010 18:16: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: r207669 - in head/sys: fs/nfsclient fs/nwfs fs/smbfs kern nfsclient ufs/ffs 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: Wed, 05 May 2010 18:16:07 -0000 Author: alc Date: Wed May 5 18:16:06 2010 New Revision: 207669 URL: http://svn.freebsd.org/changeset/base/207669 Log: Acquire the page lock around all remaining calls to vm_page_free() on managed pages that didn't already have that lock held. (Freeing an unmanaged page, such as the various pmaps use, doesn't require the page lock.) This allows a change in vm_page_remove()'s locking requirements. It now expects the page lock to be held instead of the page queues lock. Consequently, the page queues lock is no longer required at all by callers to vm_page_rename(). Discussed with: kib Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/kern/kern_exec.c head/sys/kern/subr_uio.c head/sys/nfsclient/nfs_bio.c head/sys/ufs/ffs/ffs_vnops.c head/sys/vm/vm_fault.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed May 5 18:16:06 2010 (r207669) @@ -131,12 +131,15 @@ ncl_getpages(struct vop_getpages_args *a */ VM_OBJECT_LOCK(object); if (pages[ap->a_reqpage]->valid != 0) { - vm_page_lock_queues(); for (i = 0; i < npages; ++i) { - if (i != ap->a_reqpage) + if (i != ap->a_reqpage) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return (0); } @@ -171,12 +174,15 @@ ncl_getpages(struct vop_getpages_args *a if (error && (uio.uio_resid == count)) { ncl_printf("nfs_getpages: error %d\n", error); VM_OBJECT_LOCK(object); - vm_page_lock_queues(); for (i = 0; i < npages; ++i) { - if (i != ap->a_reqpage) + if (i != ap->a_reqpage) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return (VM_PAGER_ERROR); } Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/fs/nwfs/nwfs_io.c Wed May 5 18:16:06 2010 (r207669) @@ -428,12 +428,15 @@ nwfs_getpages(ap) VM_OBJECT_LOCK(object); if (error && (uio.uio_resid == count)) { printf("nwfs_getpages: error %d\n",error); - vm_page_lock_queues(); for (i = 0; i < npages; i++) { - if (ap->a_reqpage != i) + if (ap->a_reqpage != i) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return VM_PAGER_ERROR; } Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/fs/smbfs/smbfs_io.c Wed May 5 18:16:06 2010 (r207669) @@ -440,12 +440,15 @@ smbfs_getpages(ap) VM_OBJECT_LOCK(object); if (m->valid != 0) { - vm_page_lock_queues(); for (i = 0; i < npages; ++i) { - if (i != reqpage) + if (i != reqpage) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return 0; } @@ -478,12 +481,15 @@ smbfs_getpages(ap) VM_OBJECT_LOCK(object); if (error && (uio.uio_resid == count)) { printf("smbfs_getpages: error %d\n",error); - vm_page_lock_queues(); for (i = 0; i < npages; i++) { - if (reqpage != i) + if (reqpage != i) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return VM_PAGER_ERROR; } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/kern/kern_exec.c Wed May 5 18:16:06 2010 (r207669) @@ -949,9 +949,11 @@ exec_map_first_page(imgp) ma[0] = vm_page_lookup(object, 0); if ((rv != VM_PAGER_OK) || (ma[0] == NULL)) { if (ma[0]) { + vm_page_lock(ma[0]); vm_page_lock_queues(); vm_page_free(ma[0]); vm_page_unlock_queues(); + vm_page_unlock(ma[0]); } VM_OBJECT_UNLOCK(object); return (EIO); Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/kern/subr_uio.c Wed May 5 18:16:06 2010 (r207669) @@ -104,9 +104,11 @@ retry: if ((user_pg = vm_page_lookup(uobject, upindex)) != NULL) { if (vm_page_sleep_if_busy(user_pg, TRUE, "vm_pgmoveco")) goto retry; + vm_page_lock(user_pg); vm_page_lock_queues(); pmap_remove_all(user_pg); vm_page_free(user_pg); + vm_page_unlock(user_pg); } else { /* * Even if a physical page does not exist in the Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/nfsclient/nfs_bio.c Wed May 5 18:16:06 2010 (r207669) @@ -129,12 +129,15 @@ nfs_getpages(struct vop_getpages_args *a */ VM_OBJECT_LOCK(object); if (pages[ap->a_reqpage]->valid != 0) { - vm_page_lock_queues(); for (i = 0; i < npages; ++i) { - if (i != ap->a_reqpage) + if (i != ap->a_reqpage) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return (0); } @@ -169,12 +172,15 @@ nfs_getpages(struct vop_getpages_args *a if (error && (uio.uio_resid == count)) { nfs_printf("nfs_getpages: error %d\n", error); VM_OBJECT_LOCK(object); - vm_page_lock_queues(); for (i = 0; i < npages; ++i) { - if (i != ap->a_reqpage) + if (i != ap->a_reqpage) { + vm_page_lock(pages[i]); + vm_page_lock_queues(); vm_page_free(pages[i]); + vm_page_unlock_queues(); + vm_page_unlock(pages[i]); + } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); return (VM_PAGER_ERROR); } Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/ufs/ffs/ffs_vnops.c Wed May 5 18:16:06 2010 (r207669) @@ -847,13 +847,15 @@ ffs_getpages(ap) if (mreq->valid) { if (mreq->valid != VM_PAGE_BITS_ALL) vm_page_zero_invalid(mreq, TRUE); - vm_page_lock_queues(); for (i = 0; i < pcount; i++) { if (i != ap->a_reqpage) { + vm_page_lock(ap->a_m[i]); + vm_page_lock_queues(); vm_page_free(ap->a_m[i]); + vm_page_unlock_queues(); + vm_page_unlock(ap->a_m[i]); } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(mreq->object); return VM_PAGER_OK; } Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/vm/vm_fault.c Wed May 5 18:16:06 2010 (r207669) @@ -778,9 +778,7 @@ vnode_locked: * automatically made dirty. */ vm_page_lock(fs.m); - vm_page_lock_queues(); vm_page_rename(fs.m, fs.first_object, fs.first_pindex); - vm_page_unlock_queues(); vm_page_unlock(fs.m); vm_page_busy(fs.m); fs.first_m = fs.m; Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/vm/vm_object.c Wed May 5 18:16:06 2010 (r207669) @@ -1461,9 +1461,7 @@ retry: goto retry; } vm_page_lock(m); - vm_page_lock_queues(); vm_page_rename(m, new_object, idx); - vm_page_unlock_queues(); vm_page_unlock(m); /* page automatically made dirty by rename and cache handled */ vm_page_busy(m); @@ -1691,9 +1689,7 @@ vm_object_backing_scan(vm_object_t objec * mapped through the rename. */ vm_page_lock(p); - vm_page_lock_queues(); vm_page_rename(p, object, new_pindex); - vm_page_unlock_queues(); vm_page_unlock(p); /* page automatically made dirty by rename */ } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed May 5 17:17:19 2010 (r207668) +++ head/sys/vm/vm_page.c Wed May 5 18:16:06 2010 (r207669) @@ -791,7 +791,7 @@ vm_page_remove(vm_page_t m) vm_page_t root; if ((m->flags & PG_UNMANAGED) == 0) - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_assert(m, MA_OWNED); if ((object = m->object) == NULL) return; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -2234,11 +2234,11 @@ vm_page_cowfault(vm_page_t m) retry_alloc: pmap_remove_all(m); + vm_page_unlock_queues(); vm_page_remove(m); mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); if (mnew == NULL) { vm_page_insert(m, object, pindex); - vm_page_unlock_queues(); vm_page_unlock(m); VM_OBJECT_UNLOCK(object); VM_WAIT; @@ -2261,7 +2261,12 @@ vm_page_cowfault(vm_page_t m) * waiting to allocate a page. If so, put things back * the way they were */ + vm_page_unlock(m); + vm_page_lock(mnew); + vm_page_lock_queues(); vm_page_free(mnew); + vm_page_unlock_queues(); + vm_page_unlock(mnew); vm_page_insert(m, object, pindex); } else { /* clear COW & copy page */ if (!so_zerocp_fullpage) @@ -2270,9 +2275,8 @@ vm_page_cowfault(vm_page_t m) vm_page_dirty(mnew); mnew->wire_count = m->wire_count - m->cow; m->wire_count = m->cow; + vm_page_unlock(m); } - vm_page_unlock_queues(); - vm_page_unlock(m); } void Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed May 5 17:17:19 2010 (r207668) +++ head/sys/vm/vm_page.h Wed May 5 18:16:06 2010 (r207669) @@ -103,7 +103,7 @@ struct vm_page { struct vm_page *left; /* splay tree link (O) */ struct vm_page *right; /* splay tree link (O) */ - vm_object_t object; /* which object am I in (O,Q)*/ + vm_object_t object; /* which object am I in (O,P)*/ vm_pindex_t pindex; /* offset into object (O,Q) */ vm_paddr_t phys_addr; /* physical address of page */ struct md_page md; /* machine dependant stuff */ From owner-svn-src-all@FreeBSD.ORG Wed May 5 18:22:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AC061065672; Wed, 5 May 2010 18:22:30 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 479548FC0C; Wed, 5 May 2010 18:22: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 o45IMUg2027227; Wed, 5 May 2010 18:22:30 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45IMUrh027219; Wed, 5 May 2010 18:22:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005051822.o45IMUrh027219@svn.freebsd.org> From: Martin Matuska Date: Wed, 5 May 2010 18:22: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: r207670 - in head: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cd... 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, 05 May 2010 18:22:30 -0000 Author: mm Date: Wed May 5 18:22:29 2010 New Revision: 207670 URL: http://svn.freebsd.org/changeset/base/207670 Log: Introduce hardforce export option (-F) for "zpool export". When exporting with this flag, zpool.cache remains untouched. OpenSolaris onnv revision: 8211:32722be6ad3b Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID: 6775357) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed May 5 18:16:06 2010 (r207669) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed May 5 18:22:29 2010 (r207670) @@ -879,17 +879,21 @@ int zpool_do_export(int argc, char **argv) { boolean_t force = B_FALSE; + boolean_t hardforce = B_FALSE; int c; zpool_handle_t *zhp; int ret; int i; /* check options */ - while ((c = getopt(argc, argv, "f")) != -1) { + while ((c = getopt(argc, argv, "fF")) != -1) { switch (c) { case 'f': force = B_TRUE; break; + case 'F': + hardforce = B_TRUE; + break; case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); @@ -919,8 +923,12 @@ zpool_do_export(int argc, char **argv) continue; } - if (zpool_export(zhp, force) != 0) + if (hardforce) { + if (zpool_export_force(zhp) != 0) + ret = 1; + } else if (zpool_export(zhp, force) != 0) { ret = 1; + } zpool_close(zhp); } Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed May 5 18:16:06 2010 (r207669) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed May 5 18:22:29 2010 (r207670) @@ -3039,7 +3039,7 @@ ztest_spa_import_export(char *oldname, c /* * Export it. */ - error = spa_export(oldname, &config, B_FALSE); + error = spa_export(oldname, &config, B_FALSE, B_FALSE); if (error) fatal(0, "spa_export('%s') = %d", oldname, error); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed May 5 18:16:06 2010 (r207669) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed May 5 18:22:29 2010 (r207670) @@ -289,6 +289,7 @@ extern int zpool_get_errlog(zpool_handle * Import and export functions */ extern int zpool_export(zpool_handle_t *, boolean_t); +extern int zpool_export_force(zpool_handle_t *); extern int zpool_import(libzfs_handle_t *, nvlist_t *, const char *, char *altroot); extern int zpool_import_props(libzfs_handle_t *, nvlist_t *, const char *, Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed May 5 18:16:06 2010 (r207669) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Wed May 5 18:22:29 2010 (r207670) @@ -1096,7 +1096,7 @@ zpool_add(zpool_handle_t *zhp, nvlist_t * mounted datasets in the pool. */ int -zpool_export(zpool_handle_t *zhp, boolean_t force) +zpool_export_common(zpool_handle_t *zhp, boolean_t force, boolean_t hardforce) { zfs_cmd_t zc = { 0 }; char msg[1024]; @@ -1109,6 +1109,7 @@ zpool_export(zpool_handle_t *zhp, boolea (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); zc.zc_cookie = force; + zc.zc_guid = hardforce; if (zfs_ioctl(zhp->zpool_hdl, ZFS_IOC_POOL_EXPORT, &zc) != 0) { switch (errno) { @@ -1129,6 +1130,18 @@ zpool_export(zpool_handle_t *zhp, boolea return (0); } +int +zpool_export(zpool_handle_t *zhp, boolean_t force) +{ + return (zpool_export_common(zhp, force, B_FALSE)); +} + +int +zpool_export_force(zpool_handle_t *zhp) +{ + return (zpool_export_common(zhp, B_TRUE, B_TRUE)); +} + /* * zpool_import() is a contracted interface. Should be kept the same * if possible. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed May 5 18:16:06 2010 (r207669) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed May 5 18:22:29 2010 (r207670) @@ -2564,11 +2564,12 @@ spa_tryimport(nvlist_t *tryconfig) * The act of destroying or exporting a pool is very simple. We make sure there * is no more pending I/O and any references to the pool are gone. Then, we * update the pool state and sync all the labels to disk, removing the - * configuration from the cache afterwards. + * configuration from the cache afterwards. If the 'hardforce' flag is set, then + * we don't sync the labels or remove the configuration cache. */ static int spa_export_common(char *pool, int new_state, nvlist_t **oldconfig, - boolean_t force) + boolean_t force, boolean_t hardforce) { spa_t *spa; @@ -2636,7 +2637,7 @@ spa_export_common(char *pool, int new_st * so mark them all dirty. spa_unload() will do the * final sync that pushes these changes out. */ - if (new_state != POOL_STATE_UNINITIALIZED) { + if (new_state != POOL_STATE_UNINITIALIZED && !hardforce) { spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); spa->spa_state = new_state; spa->spa_final_txg = spa_last_synced_txg(spa) + 1; @@ -2656,7 +2657,8 @@ spa_export_common(char *pool, int new_st VERIFY(nvlist_dup(spa->spa_config, oldconfig, 0) == 0); if (new_state != POOL_STATE_UNINITIALIZED) { - spa_config_sync(spa, B_TRUE, B_TRUE); + if (!hardforce) + spa_config_sync(spa, B_TRUE, B_TRUE); spa_remove(spa); } mutex_exit(&spa_namespace_lock); @@ -2670,16 +2672,19 @@ spa_export_common(char *pool, int new_st int spa_destroy(char *pool) { - return (spa_export_common(pool, POOL_STATE_DESTROYED, NULL, B_FALSE)); + return (spa_export_common(pool, POOL_STATE_DESTROYED, NULL, + B_FALSE, B_FALSE)); } /* * Export a storage pool. */ int -spa_export(char *pool, nvlist_t **oldconfig, boolean_t force) +spa_export(char *pool, nvlist_t **oldconfig, boolean_t force, + boolean_t hardforce) { - return (spa_export_common(pool, POOL_STATE_EXPORTED, oldconfig, force)); + return (spa_export_common(pool, POOL_STATE_EXPORTED, oldconfig, + force, hardforce)); } /* @@ -2690,7 +2695,7 @@ int spa_reset(char *pool) { return (spa_export_common(pool, POOL_STATE_UNINITIALIZED, NULL, - B_FALSE)); + B_FALSE, B_FALSE)); } /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed May 5 18:16:06 2010 (r207669) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Wed May 5 18:22:29 2010 (r207670) @@ -333,7 +333,8 @@ extern int spa_import(const char *pool, extern int spa_import_faulted(const char *, nvlist_t *, nvlist_t *); extern nvlist_t *spa_tryimport(nvlist_t *tryconfig); extern int spa_destroy(char *pool); -extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force); +extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force, + boolean_t hardforce); extern int spa_reset(char *pool); extern void spa_async_request(spa_t *spa, int flag); extern void spa_async_unrequest(spa_t *spa, int flag); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed May 5 18:16:06 2010 (r207669) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed May 5 18:22:29 2010 (r207670) @@ -882,9 +882,10 @@ zfs_ioc_pool_export(zfs_cmd_t *zc) { int error; boolean_t force = (boolean_t)zc->zc_cookie; + boolean_t hardforce = (boolean_t)zc->zc_guid; zfs_log_history(zc); - error = spa_export(zc->zc_name, NULL, force); + error = spa_export(zc->zc_name, NULL, force, hardforce); return (error); } From owner-svn-src-all@FreeBSD.ORG Wed May 5 18:53:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1929F1065675; Wed, 5 May 2010 18:53:25 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 096408FC08; Wed, 5 May 2010 18:53: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 o45IrO0L034085; Wed, 5 May 2010 18:53:24 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45IrOS6034082; Wed, 5 May 2010 18:53:24 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201005051853.o45IrOS6034082@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 5 May 2010 18:53: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: r207671 - head/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: Wed, 05 May 2010 18:53:25 -0000 Author: jh Date: Wed May 5 18:53:24 2010 New Revision: 207671 URL: http://svn.freebsd.org/changeset/base/207671 Log: 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 Silence on: freebsd-geom Modified: head/sys/geom/geom.h head/sys/geom/geom_subr.c Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Wed May 5 18:22:29 2010 (r207670) +++ head/sys/geom/geom.h Wed May 5 18:53:24 2010 (r207671) @@ -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: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Wed May 5 18:22:29 2010 (r207670) +++ head/sys/geom/geom_subr.c Wed May 5 18:53:24 2010 (r207671) @@ -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 Wed May 5 18:57:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6EE01065677; Wed, 5 May 2010 18:57:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B510B8FC1B; Wed, 5 May 2010 18:57: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 o45Ivt4W035132; Wed, 5 May 2010 18:57:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45Ivt1O035124; Wed, 5 May 2010 18:57:55 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005051857.o45Ivt1O035124@svn.freebsd.org> From: Martin Matuska Date: Wed, 5 May 2010 18:57: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: r207672 - in head: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cd... 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, 05 May 2010 18:57:55 -0000 Author: mm Date: Wed May 5 18:57:55 2010 New Revision: 207672 URL: http://svn.freebsd.org/changeset/base/207672 Log: Forced commit to set MFC period for r207670. Approved by: delphij (mentor) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== From owner-svn-src-all@FreeBSD.ORG Wed May 5 20:39:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 895FE1065670; Wed, 5 May 2010 20:39:02 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 766468FC0C; Wed, 5 May 2010 20:39: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 o45Kd25t057718; Wed, 5 May 2010 20:39:02 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45Kd21m057708; Wed, 5 May 2010 20:39:02 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201005052039.o45Kd21m057708@svn.freebsd.org> From: Joel Dahl Date: Wed, 5 May 2010 20:39: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: r207673 - in head/sys: amd64/include/xen dev/cxgb/sys dev/xen/netfront i386/include/xen 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, 05 May 2010 20:39:02 -0000 Author: joel (doc committer) Date: Wed May 5 20:39:02 2010 New Revision: 207673 URL: http://svn.freebsd.org/changeset/base/207673 Log: Switch to our preferred 2-clause BSD license. Approved by: kmacy Modified: head/sys/amd64/include/xen/xenfunc.h head/sys/amd64/include/xen/xenvar.h head/sys/dev/cxgb/sys/mvec.h head/sys/dev/cxgb/sys/uipc_mvec.c head/sys/dev/xen/netfront/netfront.c head/sys/i386/include/xen/xenfunc.h head/sys/i386/include/xen/xenvar.h head/sys/kern/subr_bufring.c head/sys/sys/buf_ring.h Modified: head/sys/amd64/include/xen/xenfunc.h ============================================================================== --- head/sys/amd64/include/xen/xenfunc.h Wed May 5 18:57:55 2010 (r207672) +++ head/sys/amd64/include/xen/xenfunc.h Wed May 5 20:39:02 2010 (r207673) @@ -1,6 +1,5 @@ -/* - * - * Copyright (c) 2004,2005 Kip Macy +/*- + * Copyright (c) 2004, 2005 Kip Macy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,22 +10,22 @@ * 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. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * 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. + * 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 _XEN_XENFUNC_H_ #define _XEN_XENFUNC_H_ Modified: head/sys/amd64/include/xen/xenvar.h ============================================================================== --- head/sys/amd64/include/xen/xenvar.h Wed May 5 18:57:55 2010 (r207672) +++ head/sys/amd64/include/xen/xenvar.h Wed May 5 20:39:02 2010 (r207673) @@ -1,29 +1,27 @@ -/* +/*- * Copyright (c) 2008 Kip Macy * 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. - * + * 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$ */ Modified: head/sys/dev/cxgb/sys/mvec.h ============================================================================== --- head/sys/dev/cxgb/sys/mvec.h Wed May 5 18:57:55 2010 (r207672) +++ head/sys/dev/cxgb/sys/mvec.h Wed May 5 20:39:02 2010 (r207673) @@ -1,33 +1,31 @@ -/************************************************************************** - * - * Copyright (c) 2007,2009 Kip Macy kmacy@freebsd.org +/*- + * Copyright (c) 2007, 2009 Kip Macy * 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. The name of Kip Macy nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * 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 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. + * 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 _MVEC_H_ #define _MVEC_H_ Modified: head/sys/dev/cxgb/sys/uipc_mvec.c ============================================================================== --- head/sys/dev/cxgb/sys/uipc_mvec.c Wed May 5 18:57:55 2010 (r207672) +++ head/sys/dev/cxgb/sys/uipc_mvec.c Wed May 5 20:39:02 2010 (r207673) @@ -1,32 +1,28 @@ -/************************************************************************** - * - * Copyright (c) 2007-2008, Kip Macy kmacy@freebsd.org +/*- + * Copyright (c) 2007-2008 Kip Macy * 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. The name of Kip Macy nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * 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 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. - * - * - ***************************************************************************/ + * 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$"); Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Wed May 5 18:57:55 2010 (r207672) +++ head/sys/dev/xen/netfront/netfront.c Wed May 5 20:39:02 2010 (r207673) @@ -1,19 +1,27 @@ -/* - * +/*- * Copyright (c) 2004-2006 Kip Macy * 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. + * 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. */ Modified: head/sys/i386/include/xen/xenfunc.h ============================================================================== --- head/sys/i386/include/xen/xenfunc.h Wed May 5 18:57:55 2010 (r207672) +++ head/sys/i386/include/xen/xenfunc.h Wed May 5 20:39:02 2010 (r207673) @@ -1,6 +1,5 @@ -/* - * - * Copyright (c) 2004,2005 Kip Macy +/*- + * Copyright (c) 2004, 2005 Kip Macy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,24 +10,22 @@ * 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. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * 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. + * 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 _XEN_XENFUNC_H_ #define _XEN_XENFUNC_H_ Modified: head/sys/i386/include/xen/xenvar.h ============================================================================== --- head/sys/i386/include/xen/xenvar.h Wed May 5 18:57:55 2010 (r207672) +++ head/sys/i386/include/xen/xenvar.h Wed May 5 20:39:02 2010 (r207673) @@ -1,32 +1,31 @@ -/* +/*- * Copyright (c) 2008 Kip Macy * 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. - * + * 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 XENVAR_H_ #define XENVAR_H_ #define XBOOTUP 0x1 Modified: head/sys/kern/subr_bufring.c ============================================================================== --- head/sys/kern/subr_bufring.c Wed May 5 18:57:55 2010 (r207672) +++ head/sys/kern/subr_bufring.c Wed May 5 20:39:02 2010 (r207673) @@ -1,32 +1,29 @@ -/************************************************************************** - * - * Copyright (c) 2007,2008 Kip Macy kmacy@freebsd.org +/*- + * Copyright (c) 2007, 2008 Kip Macy * 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. The name of Kip Macy nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * 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 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. - * - * - ***************************************************************************/ + * 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$"); Modified: head/sys/sys/buf_ring.h ============================================================================== --- head/sys/sys/buf_ring.h Wed May 5 18:57:55 2010 (r207672) +++ head/sys/sys/buf_ring.h Wed May 5 20:39:02 2010 (r207673) @@ -1,33 +1,31 @@ -/************************************************************************** - * - * Copyright (c) 2007-2009 Kip Macy kmacy@freebsd.org +/*- + * Copyright (c) 2007-2009 Kip Macy * 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. + * 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. * - * 2. The name of Kip Macy nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * 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 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. + * 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 _SYS_BUF_RING_H_ #define _SYS_BUF_RING_H_ From owner-svn-src-all@FreeBSD.ORG Wed May 5 20:50:46 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 374DB1065673; Wed, 5 May 2010 20:50:46 +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 B5E398FC13; Wed, 5 May 2010 20:50:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o45KieAl017226; Wed, 5 May 2010 14:44:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 05 May 2010 14:45:01 -0600 (MDT) Message-Id: <20100505.144501.1034091071783952146.imp@bsdimp.com> To: nork@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20100505193049.cd94c63e.nork@FreeBSD.org> References: <201005050041.o450fesw090589@svn.freebsd.org> <20100505193049.cd94c63e.nork@FreeBSD.org> 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, np@FreeBSD.org Subject: Re: svn commit: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool 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, 05 May 2010 20:50:46 -0000 In message: <20100505193049.cd94c63e.nork@FreeBSD.org> Norikatsu Shigemura writes: : Hi np! : : On Wed, 5 May 2010 00:41:40 +0000 (UTC) : Navdeep Parhar wrote: : > Add support for hardware filters to cxgb(4). The T3 chip can inspect : > L2/3/4 headers and can drop or steer packets as instructed. Filtering : > based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac : > addr is possible. Add support in cxgbtool to program these filters. : : Great news. Do you have any schedule to implement ipfw(4) : hardware acceleration? :-) There's some embedded kit that has switches that can do limited filtering as well, and there it would be a big win.... Warner From owner-svn-src-all@FreeBSD.ORG Wed May 5 20:54:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 168421065678; Wed, 5 May 2010 20:54:17 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0596F8FC25; Wed, 5 May 2010 20:54: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 o45KsG75061198; Wed, 5 May 2010 20:54:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45KsGbO061196; Wed, 5 May 2010 20:54:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005052054.o45KsGbO061196@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 20:54:16 +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: r207675 - stable/7/sbin/sysctl 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, 05 May 2010 20:54:17 -0000 Author: gavin Date: Wed May 5 20:54:16 2010 New Revision: 207675 URL: http://svn.freebsd.org/changeset/base/207675 Log: Fix merge botch. Submitted by: Sofian Brabez Pointy hat: Earned and deserved. Modified: stable/7/sbin/sysctl/sysctl.c Modified: stable/7/sbin/sysctl/sysctl.c ============================================================================== --- stable/7/sbin/sysctl/sysctl.c Wed May 5 20:43:40 2010 (r207674) +++ stable/7/sbin/sysctl/sysctl.c Wed May 5 20:54:16 2010 (r207675) @@ -58,7 +58,7 @@ static const char rcsid[] = #include #include -static int aflag, bflag, dflag, eflag, hflag, iflag, +static int aflag, bflag, dflag, eflag, hflag, iflag; static int Nflag, nflag, oflag, qflag, xflag; static int oidfmt(int *, int, char *, u_int *); From owner-svn-src-all@FreeBSD.ORG Wed May 5 21:07:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 258341065672; Wed, 5 May 2010 21:07:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2D68FC1C; Wed, 5 May 2010 21:07:48 +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 o45L7l0W064260; Wed, 5 May 2010 21:07:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45L7lMA064255; Wed, 5 May 2010 21:07:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005052107.o45L7lMA064255@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 May 2010 21:07: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: r207676 - in head/sys: amd64/amd64 amd64/include 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: Wed, 05 May 2010 21:07:48 -0000 Author: kib Date: Wed May 5 21:07:47 2010 New Revision: 207676 URL: http://svn.freebsd.org/changeset/base/207676 Log: Add definitions for Intel AESNI CPUID bits and print the capabilities on boot. Hardware provided by: Sentex Communications MFC after: 1 week Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/include/specialreg.h head/sys/i386/i386/identcpu.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Wed May 5 20:54:16 2010 (r207675) +++ head/sys/amd64/amd64/identcpu.c Wed May 5 21:07:47 2010 (r207676) @@ -240,7 +240,7 @@ printcpuinfo(void) printf("\n Features2=0x%b", cpu_feature2, "\020" "\001SSE3" /* SSE3 */ - "\002" + "\002PCLMULQDQ" /* Carry-Less Mul Quadword */ "\003DTES64" /* 64-bit Debug Trace */ "\004MON" /* MONITOR/MWAIT Instructions */ "\005DS_CPL" /* CPL Qualified Debug Store */ @@ -264,7 +264,7 @@ printcpuinfo(void) "\027MOVBE" "\030POPCNT" "\031" - "\032" + "\032AESNI" /* AES Crypto*/ "\033XSAVE" "\034OSXSAVE" "\035" Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Wed May 5 20:54:16 2010 (r207675) +++ head/sys/amd64/include/specialreg.h Wed May 5 21:07:47 2010 (r207676) @@ -113,6 +113,7 @@ #define CPUID_PBE 0x80000000 #define CPUID2_SSE3 0x00000001 +#define CPUID2_PCLMULQDQ 0x00000002 #define CPUID2_DTES64 0x00000004 #define CPUID2_MON 0x00000008 #define CPUID2_DS_CPL 0x00000010 @@ -131,6 +132,7 @@ #define CPUID2_X2APIC 0x00200000 #define CPUID2_MOVBE 0x00400000 #define CPUID2_POPCNT 0x00800000 +#define CPUID2_AESNI 0x02000000 /* * Important bits in the AMD extended cpuid flags Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Wed May 5 20:54:16 2010 (r207675) +++ head/sys/i386/i386/identcpu.c Wed May 5 21:07:47 2010 (r207676) @@ -727,7 +727,7 @@ printcpuinfo(void) printf("\n Features2=0x%b", cpu_feature2, "\020" "\001SSE3" /* SSE3 */ - "\002" + "\002PCLMULQDQ" /* Carry-Less Mul Quadword */ "\003DTES64" /* 64-bit Debug Trace */ "\004MON" /* MONITOR/MWAIT Instructions */ "\005DS_CPL" /* CPL Qualified Debug Store */ @@ -751,7 +751,7 @@ printcpuinfo(void) "\027MOVBE" "\030POPCNT" "\031" - "\032" + "\032AESNI" /* AES Crypto*/ "\033XSAVE" "\034OSXSAVE" "\035" Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Wed May 5 20:54:16 2010 (r207675) +++ head/sys/i386/include/specialreg.h Wed May 5 21:07:47 2010 (r207676) @@ -110,6 +110,7 @@ #define CPUID_PBE 0x80000000 #define CPUID2_SSE3 0x00000001 +#define CPUID2_PCLMULQDQ 0x00000002 #define CPUID2_DTES64 0x00000004 #define CPUID2_MON 0x00000008 #define CPUID2_DS_CPL 0x00000010 @@ -128,6 +129,7 @@ #define CPUID2_X2APIC 0x00200000 #define CPUID2_MOVBE 0x00400000 #define CPUID2_POPCNT 0x00800000 +#define CPUID2_AESNI 0x02000000 /* * Important bits in the AMD extended cpuid flags From owner-svn-src-all@FreeBSD.ORG Wed May 5 21:24:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02F841065673; Wed, 5 May 2010 21:24:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E5E968FC1C; Wed, 5 May 2010 21:24: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 o45LOJvF067981; Wed, 5 May 2010 21:24:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45LOJES067973; Wed, 5 May 2010 21:24:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005052124.o45LOJES067973@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 21:24: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: r207677 - head/usr.bin/find 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, 05 May 2010 21:24:20 -0000 Author: delphij Date: Wed May 5 21:24:18 2010 New Revision: 207677 URL: http://svn.freebsd.org/changeset/base/207677 Log: Move SCCS tags to comments as they were already #if 0'ed. Modified: head/usr.bin/find/find.c head/usr.bin/find/function.c head/usr.bin/find/ls.c head/usr.bin/find/main.c head/usr.bin/find/misc.c head/usr.bin/find/operator.c head/usr.bin/find/option.c Modified: head/usr.bin/find/find.c ============================================================================== --- head/usr.bin/find/find.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/find.c Wed May 5 21:24:18 2010 (r207677) @@ -32,15 +32,10 @@ * 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. + * + * @(#)find.c 8.5 (Berkeley) 8/5/94 */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94"; -#else -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/function.c ============================================================================== --- head/usr.bin/find/function.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/function.c Wed May 5 21:24:18 2010 (r207677) @@ -32,14 +32,10 @@ * 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. + * + * @(#)function.c 8.10 (Berkeley) 5/4/95 */ -#ifndef lint -#if 0 -static const char sccsid[] = "@(#)function.c 8.10 (Berkeley) 5/4/95"; -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/ls.c ============================================================================== --- head/usr.bin/find/ls.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/ls.c Wed May 5 21:24:18 2010 (r207677) @@ -29,14 +29,10 @@ * 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. + * + * @(#)ls.c 8.1 (Berkeley) 6/6/93 */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)ls.c 8.1 (Berkeley) 6/6/93"; -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/main.c ============================================================================== --- head/usr.bin/find/main.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/main.c Wed May 5 21:24:18 2010 (r207677) @@ -32,6 +32,8 @@ * 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. + * + * @(#)main.c 8.4 (Berkeley) 5/4/95 */ #ifndef lint @@ -40,12 +42,6 @@ char copyright[] = The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/misc.c ============================================================================== --- head/usr.bin/find/misc.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/misc.c Wed May 5 21:24:18 2010 (r207677) @@ -32,15 +32,10 @@ * 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. + * + * @(#)misc.c 8.2 (Berkeley) 4/1/94 */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/1/94"; -#else -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/operator.c ============================================================================== --- head/usr.bin/find/operator.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/operator.c Wed May 5 21:24:18 2010 (r207677) @@ -32,14 +32,10 @@ * 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. + * + * @(#)operator.c 8.1 (Berkeley) 6/6/93 */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)operator.c 8.1 (Berkeley) 6/6/93"; -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/option.c ============================================================================== --- head/usr.bin/find/option.c Wed May 5 21:07:47 2010 (r207676) +++ head/usr.bin/find/option.c Wed May 5 21:24:18 2010 (r207677) @@ -32,14 +32,10 @@ * 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. + * + * @(#)option.c 8.2 (Berkeley) 4/16/94 */ -#ifndef lint -/* -static char sccsid[] = "@(#)option.c 8.2 (Berkeley) 4/16/94"; -*/ -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); From owner-svn-src-all@FreeBSD.ORG Wed May 5 21:48:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA9461065670; Wed, 5 May 2010 21:48:40 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A895F8FC16; Wed, 5 May 2010 21:48: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 o45Lmelb073394; Wed, 5 May 2010 21:48:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45LmevA073389; Wed, 5 May 2010 21:48:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052148.o45LmevA073389@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 21:48: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: r207678 - in head: bin/sh tools/regression/bin/sh/builtins 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, 05 May 2010 21:48:40 -0000 Author: jilles Date: Wed May 5 21:48:40 2010 New Revision: 207678 URL: http://svn.freebsd.org/changeset/base/207678 Log: sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var. This allows doing things like LC_ALL=C some_builtin to run a builtin under a different locale, just like is possible with external programs. The immediate reason is that this allows making printf(1) a builtin without breaking things like LC_NUMERIC=C printf '%f\n' 1.2 This change also affects special builtins, as even though the assignment is persistent, the export is only to the builtin (unless the variable was already exported). Note: for this to work for builtins that also exist as external programs such as /bin/test, the setlocale() call must be under #ifndef SHELL. The shell will do the setlocale() calls which may not agree with the environment variables. Added: head/tools/regression/bin/sh/builtins/locale1.0 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/var.c head/bin/sh/var.h Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Wed May 5 21:24:18 2010 (r207677) +++ head/bin/sh/eval.c Wed May 5 21:48:40 2010 (r207678) @@ -937,6 +937,8 @@ evalcommand(union node *cmd, int flags, cmdentry.special = 1; if (cmdentry.special) listsetvar(cmdenviron); + if (argc > 0) + bltinsetlocale(); commandname = argv[0]; argptr = argv + 1; nextopt_optptr = NULL; /* initialize nextopt */ @@ -944,6 +946,8 @@ evalcommand(union node *cmd, int flags, exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv); flushall(); cmddone: + if (argc > 0) + bltinunsetlocale(); cmdenviron = NULL; out1 = &output; out2 = &errout; Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Wed May 5 21:24:18 2010 (r207677) +++ head/bin/sh/var.c Wed May 5 21:48:40 2010 (r207678) @@ -122,6 +122,14 @@ STATIC const struct varinit varinit[] = STATIC struct var *vartab[VTABSIZE]; +STATIC const char *const locale_names[7] = { + "LC_COLLATE", "LC_CTYPE", "LC_MONETARY", + "LC_NUMERIC", "LC_TIME", "LC_MESSAGES", NULL +}; +STATIC const int locale_categories[7] = { + LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME, LC_MESSAGES, 0 +}; + STATIC struct var **hashvar(const char *); STATIC int varequal(const char *, const char *); STATIC int localevar(const char *); @@ -258,11 +266,7 @@ setvar(const char *name, const char *val STATIC int localevar(const char *s) { - static const char *lnames[7] = { - "ALL", "COLLATE", "CTYPE", "MONETARY", - "NUMERIC", "TIME", NULL - }; - const char **ss; + const char *const *ss; if (*s != 'L') return 0; @@ -270,8 +274,10 @@ localevar(const char *s) return 1; if (strncmp(s + 1, "C_", 2) != 0) return 0; - for (ss = lnames; *ss ; ss++) - if (varequal(s + 3, *ss)) + if (varequal(s + 3, "ALL")) + return 1; + for (ss = locale_names; *ss ; ss++) + if (varequal(s + 3, *ss + 3)) return 1; return 0; } @@ -437,6 +443,61 @@ bltinlookup(const char *name, int doall) } +/* + * Set up locale for a builtin (LANG/LC_* assignments). + */ +void +bltinsetlocale(void) +{ + struct strlist *lp; + int act = 0; + char *loc, *locdef; + int i; + + for (lp = cmdenviron ; lp ; lp = lp->next) { + if (localevar(lp->text)) { + act = 1; + break; + } + } + if (!act) + return; + loc = bltinlookup("LC_ALL", 0); + INTOFF; + if (loc != NULL) { + setlocale(LC_ALL, loc); + INTON; + return; + } + locdef = bltinlookup("LANG", 0); + for (i = 0; locale_names[i] != NULL; i++) { + loc = bltinlookup(locale_names[i], 0); + if (loc == NULL) + loc = locdef; + if (loc != NULL) + setlocale(locale_categories[i], loc); + } + INTON; +} + +/* + * Undo the effect of bltinlocaleset(). + */ +void +bltinunsetlocale(void) +{ + struct strlist *lp; + + INTOFF; + for (lp = cmdenviron ; lp ; lp = lp->next) { + if (localevar(lp->text)) { + setlocale(LC_ALL, ""); + return; + } + } + INTON; +} + /* * Generate a list of exported variables. This routine is used to construct Modified: head/bin/sh/var.h ============================================================================== --- head/bin/sh/var.h Wed May 5 21:24:18 2010 (r207677) +++ head/bin/sh/var.h Wed May 5 21:48:40 2010 (r207678) @@ -107,6 +107,8 @@ struct strlist; void listsetvar(struct strlist *); char *lookupvar(const char *); char *bltinlookup(const char *, int); +void bltinsetlocale(void); +void bltinunsetlocale(void); char **environment(void); int showvarscmd(int, char **); int exportcmd(int, char **); Added: head/tools/regression/bin/sh/builtins/locale1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/locale1.0 Wed May 5 21:48:40 2010 (r207678) @@ -0,0 +1,133 @@ +# $FreeBSD$ +# Note: this test depends on strerror() using locale. + +failures=0 + +check() { + if ! eval "[ $1 ]"; then + echo "Failed: $1 at $2" + : $((failures += 1)) + fi +} + +unset LANG LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME LC_MESSAGES + +msgeng="No such file or directory" +msgdut="Bestand of map niet gevonden" + +# Verify C locale error message. +case $(command . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +# Various locale variables that should not affect the message. +case $(LC_ALL=C command . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_ALL=C LANG=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_ALL=C LC_MESSAGES=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_CTYPE=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +# Verify Dutch message. +case $(export LANG=nl_NL.ISO8859-1; command . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(export LC_MESSAGES=nl_NL.ISO8859-1; command . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(export LC_ALL=nl_NL.ISO8859-1; command . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LANG=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_MESSAGES=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_ALL=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +# Verify that command assignments do not set the locale persistently. +case $(command . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LANG=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1; command . /var/empty/foo 2>&1) in + *"$msgdut"*"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_MESSAGES=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1; command . /var/empty/foo 2>&1) in + *"$msgdut"*"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(LC_ALL=nl_NL.ISO8859-1 command . /var/empty/foo 2>&1; command . /var/empty/foo 2>&1) in + *"$msgdut"*"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +# Check special builtin; add colon invocation to avoid depending on certain fix. +case $(LC_ALL=nl_NL.ISO8859-1 . /var/empty/foo 2>&1; :) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +# Assignments on special builtins are exported to that builtin; the export +# is not persistent. +case $(LC_ALL=nl_NL.ISO8859-1 . /dev/null; . /var/empty/foo 2>&1) in + *"$msgeng"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +case $(export LC_ALL; LC_ALL=nl_NL.ISO8859-1 . /dev/null; . /var/empty/foo 2>&1) in + *"$msgdut"*) ok=1 ;; + *) ok=0 ;; +esac +check '$ok -eq 1' $LINENO + +exit $((failures > 0)) From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:00:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E19A3106564A; Wed, 5 May 2010 22:00:57 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D01378FC16; Wed, 5 May 2010 22:00: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 o45M0v8Y076178; Wed, 5 May 2010 22:00:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45M0vD8076176; Wed, 5 May 2010 22:00:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052200.o45M0vD8076176@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:00: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: r207679 - stable/8/lib/libc/gen 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, 05 May 2010 22:00:58 -0000 Author: jilles Date: Wed May 5 22:00:57 2010 New Revision: 207679 URL: http://svn.freebsd.org/changeset/base/207679 Log: MFC r207186: sysctl(3): Update description of various kern.* variables. Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3) (which is a more convenient way to access some of the variables). PR: 116480 Modified: stable/8/lib/libc/gen/sysctl.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/gen/sysctl.3 ============================================================================== --- stable/8/lib/libc/gen/sysctl.3 Wed May 5 21:48:40 2010 (r207678) +++ stable/8/lib/libc/gen/sysctl.3 Wed May 5 22:00:57 2010 (r207679) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 28, 2009 +.Dd April 25, 2010 .Dt SYSCTL 3 .Os .Sh NAME @@ -326,7 +326,7 @@ information. .It "KERN_BOOTFILE string yes" .It "KERN_BOOTTIME struct timeval no" .It "KERN_CLOCKRATE struct clockinfo no" -.It "KERN_FILE struct file no" +.It "KERN_FILE struct xfile no" .It "KERN_HOSTID integer yes" .It "KERN_HOSTUUID string yes" .It "KERN_HOSTNAME string yes" @@ -343,14 +343,14 @@ information. .It "KERN_OSREV integer no" .It "KERN_OSTYPE string no" .It "KERN_POSIX1 integer no" -.It "KERN_PROC struct proc no" +.It "KERN_PROC node not applicable" .It "KERN_PROF node not applicable" .It "KERN_QUANTUM integer yes" .It "KERN_SAVED_IDS integer no" .It "KERN_SECURELVL integer raise only" .It "KERN_UPDATEINTERVAL integer no" .It "KERN_VERSION string no" -.It "KERN_VNODE struct vnode no" +.It "KERN_VNODE struct xvnode no" .El .Pp .Bl -tag -width 6n @@ -372,10 +372,8 @@ This structure contains the clock, stati frequencies, the number of micro-seconds per hz tick and the skew rate. .It Li KERN_FILE Return the entire file table. -The returned data consists of a single -.Va struct filehead -followed by an array of -.Va struct file , +The returned data consists of an array of +.Va struct xfile , whose size depends on the current number of such objects in the system. .It Li KERN_HOSTID Get or set the host ID. @@ -527,10 +525,8 @@ Note, the vnode table is not necessarily the system. The returned data consists of an array whose size depends on the current number of such objects in the system. -Each element of the array contains the kernel address of a vnode -.Va struct vnode * -followed by the vnode itself -.Va struct vnode . +Each element of the array consists of a +.Va struct xvnode . .El .Ss CTL_NET The string and integer information available for the CTL_NET level @@ -859,6 +855,8 @@ An attempt is made to set a read-only va A process without appropriate privilege attempts to set a value. .El .Sh SEE ALSO +.Xr confstr 3 , +.Xr kvm 3 , .Xr sysconf 3 , .Xr sysctl 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:06:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 533FC1065704; Wed, 5 May 2010 22:06:06 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 421648FC24; Wed, 5 May 2010 22:06: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 o45M6665077353; Wed, 5 May 2010 22:06:06 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45M66Zc077346; Wed, 5 May 2010 22:06:06 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005052206.o45M66Zc077346@svn.freebsd.org> From: Marko Zec Date: Wed, 5 May 2010 22:06: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: r207680 - in head: share/man/man4 sys/netgraph 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, 05 May 2010 22:06:06 -0000 Author: zec Date: Wed May 5 22:06:05 2010 New Revision: 207680 URL: http://svn.freebsd.org/changeset/base/207680 Log: Add an optional "persistent" flag to ng_hub and ng_bridge, which if set, disables automatic node shutdown when the last hook gets disconnected. Reviewed by: julian Modified: head/share/man/man4/ng_bridge.4 head/share/man/man4/ng_hub.4 head/sys/netgraph/ng_bridge.c head/sys/netgraph/ng_bridge.h head/sys/netgraph/ng_hub.c head/sys/netgraph/ng_hub.h Modified: head/share/man/man4/ng_bridge.4 ============================================================================== --- head/share/man/man4/ng_bridge.4 Wed May 5 22:00:57 2010 (r207679) +++ head/share/man/man4/ng_bridge.4 Wed May 5 22:06:05 2010 (r207680) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2000 +.Dd May 5, 2010 .Dt NG_BRIDGE 4 .Os .Sh NAME @@ -181,11 +181,17 @@ but also atomically clears the statistic .It Dv NGM_BRIDGE_GET_TABLE Returns the current host mapping table used to direct packets, in a .Dv "struct ng_bridge_host_ary" . +.It Dv NGM_BRIDGE_SET_PERSISTENT +This command sets the persistent flag on the node, and takes no arguments. .El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN -control message, or when all hooks have been disconnected. +control message, or when all hooks have been disconnected. Setting the +persistent flag via a +.Dv NGM_BRIDGE_SET_PERSISTENT +control message disables automatic node shutdown when the last hook gets +disconnected. .Sh FILES .Bl -tag -width XXXXXXXX -compact .It Pa /usr/share/examples/netgraph/ether.bridge Modified: head/share/man/man4/ng_hub.4 ============================================================================== --- head/share/man/man4/ng_hub.4 Wed May 5 22:00:57 2010 (r207679) +++ head/share/man/man4/ng_hub.4 Wed May 5 22:06:05 2010 (r207680) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 17, 2004 +.Dd May 5, 2010 .Dt NG_HUB 4 .Os .Sh NAME @@ -45,11 +45,20 @@ A node accepts any request to connect, regardless of the hook name, as long as the name is unique. .Sh CONTROL MESSAGES -This node type supports only the generic control messages. +This node type supports the generic control messages, plus the +following: +.Bl -tag -width foo +.It Dv NGM_HUB_SET_PERSISTENT +This command sets the persistent flag on the node, and takes no arguments. +.El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN -control message, or when all hooks have been disconnected. +control message, or when all hooks have been disconnected. Setting the +persistent flag via a +.Dv NGM_HUB_SET_PERSISTENT +control message disables automatic node shutdown when the last hook gets +disconnected. .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_bridge 4 , Modified: head/sys/netgraph/ng_bridge.c ============================================================================== --- head/sys/netgraph/ng_bridge.c Wed May 5 22:00:57 2010 (r207679) +++ head/sys/netgraph/ng_bridge.c Wed May 5 22:06:05 2010 (r207680) @@ -84,7 +84,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BRIDGE, "netgraph_bridge", "netgraph bridge node "); +MALLOC_DEFINE(M_NETGRAPH_BRIDGE, "netgraph_bridge", "netgraph bridge node"); #else #define M_NETGRAPH_BRIDGE M_NETGRAPH #endif @@ -106,6 +106,7 @@ struct ng_bridge_private { u_int numBuckets; /* num buckets in table */ u_int hashMask; /* numBuckets - 1 */ int numLinks; /* num connected links */ + int persistent; /* can exist w/o hooks */ struct callout timer; /* one second periodic timer */ }; typedef struct ng_bridge_private *priv_p; @@ -271,6 +272,13 @@ static const struct ng_cmdlist ng_bridge NULL, &ng_bridge_host_ary_type }, + { + NGM_BRIDGE_COOKIE, + NGM_BRIDGE_SET_PERSISTENT, + "setpersistent", + NULL, + NULL + }, { 0 } }; @@ -495,6 +503,11 @@ ng_bridge_rcvmsg(node_p node, item_p ite } break; } + case NGM_BRIDGE_SET_PERSISTENT: + { + priv->persistent = 1; + break; + } default: error = EINVAL; break; @@ -800,7 +813,8 @@ ng_bridge_disconnect(hook_p hook) /* If no more hooks, go away */ if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) - && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { + && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) + && !priv->persistent) { ng_rmnode_self(NG_HOOK_NODE(hook)); } return (0); Modified: head/sys/netgraph/ng_bridge.h ============================================================================== --- head/sys/netgraph/ng_bridge.h Wed May 5 22:00:57 2010 (r207679) +++ head/sys/netgraph/ng_bridge.h Wed May 5 22:06:05 2010 (r207680) @@ -149,6 +149,7 @@ enum { NGM_BRIDGE_CLR_STATS, /* clear link stats */ NGM_BRIDGE_GETCLR_STATS, /* atomically get & clear link stats */ NGM_BRIDGE_GET_TABLE, /* get link table */ + NGM_BRIDGE_SET_PERSISTENT, /* set persistent mode */ }; #endif /* _NETGRAPH_NG_BRIDGE_H_ */ Modified: head/sys/netgraph/ng_hub.c ============================================================================== --- head/sys/netgraph/ng_hub.c Wed May 5 22:00:57 2010 (r207679) +++ head/sys/netgraph/ng_hub.c Wed May 5 22:06:05 2010 (r207680) @@ -36,16 +36,46 @@ #include #include +#ifdef NG_SEPARATE_MALLOC +MALLOC_DEFINE(M_NETGRAPH_HUB, "netgraph_hub", "netgraph hub node"); +#else +#define M_NETGRAPH_HUB M_NETGRAPH +#endif + +/* Per-node private data */ +struct ng_hub_private { + int persistent; /* can exist w/o hooks */ +}; +typedef struct ng_hub_private *priv_p; + +/* Netgraph node methods */ static ng_constructor_t ng_hub_constructor; +static ng_rcvmsg_t ng_hub_rcvmsg; +static ng_shutdown_t ng_hub_shutdown; static ng_rcvdata_t ng_hub_rcvdata; static ng_disconnect_t ng_hub_disconnect; +/* List of commands and how to convert arguments to/from ASCII */ +static const struct ng_cmdlist ng_hub_cmdlist[] = { + { + NGM_HUB_COOKIE, + NGM_HUB_SET_PERSISTENT, + "setpersistent", + NULL, + NULL + }, + { 0 } +}; + static struct ng_type ng_hub_typestruct = { .version = NG_ABI_VERSION, .name = NG_HUB_NODE_TYPE, .constructor = ng_hub_constructor, + .rcvmsg = ng_hub_rcvmsg, + .shutdown = ng_hub_shutdown, .rcvdata = ng_hub_rcvdata, .disconnect = ng_hub_disconnect, + .cmdlist = ng_hub_cmdlist, }; NETGRAPH_INIT(hub, &ng_hub_typestruct); @@ -53,10 +83,39 @@ NETGRAPH_INIT(hub, &ng_hub_typestruct); static int ng_hub_constructor(node_p node) { + priv_p priv; + + /* Allocate and initialize private info */ + priv = malloc(sizeof(*priv), M_NETGRAPH_HUB, M_NOWAIT | M_ZERO); + if (priv == NULL) + return (ENOMEM); + NG_NODE_SET_PRIVATE(node, priv); return (0); } +/* + * Receive a control message + */ +static int +ng_hub_rcvmsg(node_p node, item_p item, hook_p lasthook) +{ + const priv_p priv = NG_NODE_PRIVATE(node); + int error = 0; + struct ng_mesg *msg; + + NGI_GET_MSG(item, msg); + if (msg->header.typecookie == NGM_HUB_COOKIE && + msg->header.cmd == NGM_HUB_SET_PERSISTENT) { + priv->persistent = 1; + } else { + error = EINVAL; + } + + NG_FREE_MSG(msg); + return (error); +} + static int ng_hub_rcvdata(hook_p hook, item_p item) { @@ -89,12 +148,25 @@ ng_hub_rcvdata(hook_p hook, item_p item) return (error); } +/* + * Shutdown node + */ +static int +ng_hub_shutdown(node_p node) +{ + const priv_p priv = NG_NODE_PRIVATE(node); + + free(priv, M_NETGRAPH_HUB); + return (0); +} + static int ng_hub_disconnect(hook_p hook) { + const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 && - NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) + NG_NODE_IS_VALID(NG_HOOK_NODE(hook)) && !priv->persistent) ng_rmnode_self(NG_HOOK_NODE(hook)); return (0); } Modified: head/sys/netgraph/ng_hub.h ============================================================================== --- head/sys/netgraph/ng_hub.h Wed May 5 22:00:57 2010 (r207679) +++ head/sys/netgraph/ng_hub.h Wed May 5 22:06:05 2010 (r207680) @@ -33,4 +33,9 @@ #define NG_HUB_NODE_TYPE "hub" #define NGM_HUB_COOKIE 1082189597 +/* Netgraph control messages */ +enum { + NGM_HUB_SET_PERSISTENT = 1, /* set persistent mode */ +}; + #endif /* _NETGRAPH_NG_HUB_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:07:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F18411065674; Wed, 5 May 2010 22:07:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E000B8FC1A; Wed, 5 May 2010 22:07: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 o45M7Sa5077730; Wed, 5 May 2010 22:07:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45M7Seg077728; Wed, 5 May 2010 22:07:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052207.o45M7Seg077728@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:07:28 +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: r207681 - stable/7/lib/libc/gen 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, 05 May 2010 22:07:29 -0000 Author: jilles Date: Wed May 5 22:07:28 2010 New Revision: 207681 URL: http://svn.freebsd.org/changeset/base/207681 Log: MFC r207186: sysctl(3): Update description of various kern.* variables. Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3) (which is a more convenient way to access some of the variables). PR: 116480 Modified: stable/7/lib/libc/gen/sysctl.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/gen/sysctl.3 ============================================================================== --- stable/7/lib/libc/gen/sysctl.3 Wed May 5 22:06:05 2010 (r207680) +++ stable/7/lib/libc/gen/sysctl.3 Wed May 5 22:07:28 2010 (r207681) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 10, 2007 +.Dd April 25, 2010 .Dt SYSCTL 3 .Os .Sh NAME @@ -323,7 +323,7 @@ information. .It "KERN_BOOTFILE string yes" .It "KERN_BOOTTIME struct timeval no" .It "KERN_CLOCKRATE struct clockinfo no" -.It "KERN_FILE struct file no" +.It "KERN_FILE struct xfile no" .It "KERN_HOSTID integer yes" .It "KERN_HOSTUUID string yes" .It "KERN_HOSTNAME string yes" @@ -340,14 +340,14 @@ information. .It "KERN_OSREV integer no" .It "KERN_OSTYPE string no" .It "KERN_POSIX1 integer no" -.It "KERN_PROC struct proc no" +.It "KERN_PROC node not applicable" .It "KERN_PROF node not applicable" .It "KERN_QUANTUM integer yes" .It "KERN_SAVED_IDS integer no" .It "KERN_SECURELVL integer raise only" .It "KERN_UPDATEINTERVAL integer no" .It "KERN_VERSION string no" -.It "KERN_VNODE struct vnode no" +.It "KERN_VNODE struct xvnode no" .El .Pp .Bl -tag -width 6n @@ -369,10 +369,8 @@ This structure contains the clock, stati frequencies, the number of micro-seconds per hz tick and the skew rate. .It Li KERN_FILE Return the entire file table. -The returned data consists of a single -.Va struct filehead -followed by an array of -.Va struct file , +The returned data consists of an array of +.Va struct xfile , whose size depends on the current number of such objects in the system. .It Li KERN_HOSTID Get or set the host ID. @@ -526,10 +524,8 @@ Note, the vnode table is not necessarily the system. The returned data consists of an array whose size depends on the current number of such objects in the system. -Each element of the array contains the kernel address of a vnode -.Va struct vnode * -followed by the vnode itself -.Va struct vnode . +Each element of the array consists of a +.Va struct xvnode . .El .Ss CTL_MACHDEP The set of variables defined is architecture dependent. @@ -869,6 +865,8 @@ An attempt is made to set a read-only va A process without appropriate privilege attempts to set a value. .El .Sh SEE ALSO +.Xr confstr 3 , +.Xr kvm 3 , .Xr sysconf 3 , .Xr sysctl 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:12:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE817106564A; Wed, 5 May 2010 22:12:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CD83E8FC12; Wed, 5 May 2010 22:12: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 o45MCuED078969; Wed, 5 May 2010 22:12:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MCurp078967; Wed, 5 May 2010 22:12:56 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052212.o45MCurp078967@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:12: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: r207682 - stable/8/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: Wed, 05 May 2010 22:12:57 -0000 Author: jilles Date: Wed May 5 22:12:56 2010 New Revision: 207682 URL: http://svn.freebsd.org/changeset/base/207682 Log: MFC r207190: unlinkat(2): unlinkat(AT_REMOVEDIR) fails with ENOTEMPTY like rmdir() for non-empty directories. POSIX permits both ENOTEMPTY and EEXIST, but we use the clearer ENOTEMPTY, following BSD tradition. Modified: stable/8/lib/libc/sys/unlink.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/unlink.2 ============================================================================== --- stable/8/lib/libc/sys/unlink.2 Wed May 5 22:07:28 2010 (r207681) +++ stable/8/lib/libc/sys/unlink.2 Wed May 5 22:12:56 2010 (r207682) @@ -28,7 +28,7 @@ .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd April 25, 2010 .Dt UNLINK 2 .Os .Sh NAME @@ -165,7 +165,7 @@ argument does not specify an absolute pa argument is neither .Dv AT_FDCWD nor a valid file descriptor open for searching. -.It Bq Er EEXIST +.It Bq Er ENOTEMPTY The .Fa flag parameter has the From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:15:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02BCA1065670; Wed, 5 May 2010 22:15:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E58D98FC15; Wed, 5 May 2010 22:15: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 o45MFKF0079544; Wed, 5 May 2010 22:15:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MFKHU079542; Wed, 5 May 2010 22:15:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005052215.o45MFKHU079542@svn.freebsd.org> From: Marius Strobl Date: Wed, 5 May 2010 22:15: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: r207683 - 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: Wed, 05 May 2010 22:15:21 -0000 Author: marius Date: Wed May 5 22:15:20 2010 New Revision: 207683 URL: http://svn.freebsd.org/changeset/base/207683 Log: - Fix broken symlinks on cross platform zfs send/recv. [1] - Enable zfs_ace_byteswap() on FreeBSD as it works just fine (tested between amd64 and sparc64 in both directions by Michael Moll). PR: 146272 Approved by: mm, pjd Obtained from: OpenSolaris (onnv rev. 8283:1ca59f393041; Bug ID 6764193) [1] MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c Wed May 5 22:12:56 2010 (r207682) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c Wed May 5 22:15:20 2010 (r207683) @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -50,7 +48,6 @@ zfs_oldace_byteswap(ace_t *ace, int ace_ void zfs_ace_byteswap(void *buf, size_t size, boolean_t zfs_layout) { -#ifdef TODO caddr_t end; caddr_t ptr; zfs_ace_t *zacep; @@ -64,6 +61,20 @@ zfs_ace_byteswap(void *buf, size_t size, while (ptr < end) { if (zfs_layout) { + /* + * Avoid overrun. Embedded aces can have one + * of several sizes. We don't know exactly + * how many our present, only the size of the + * buffer containing them. That size may be + * larger than needed to hold the aces + * present. As long as we do not do any + * swapping beyond the end of our block we are + * okay. It it safe to swap any non-ace data + * within the block since it is just zeros. + */ + if (ptr + sizeof (zfs_ace_hdr_t) > end) { + break; + } zacep = (zfs_ace_t *)ptr; zacep->z_hdr.z_access_mask = BSWAP_32(zacep->z_hdr.z_access_mask); @@ -72,6 +83,10 @@ zfs_ace_byteswap(void *buf, size_t size, BSWAP_16(zacep->z_hdr.z_type); entry_type = zacep->z_hdr.z_flags & ACE_TYPE_FLAGS; } else { + /* Overrun avoidance */ + if (ptr + sizeof (ace_t) > end) { + break; + } acep = (ace_t *)ptr; acep->a_access_mask = BSWAP_32(acep->a_access_mask); acep->a_flags = BSWAP_16(acep->a_flags); @@ -88,8 +103,14 @@ zfs_ace_byteswap(void *buf, size_t size, break; case ACE_IDENTIFIER_GROUP: default: + /* Overrun avoidance */ if (zfs_layout) { - zacep->z_fuid = BSWAP_64(zacep->z_fuid); + if (ptr + sizeof (zfs_ace_t) <= end) { + zacep->z_fuid = BSWAP_64(zacep->z_fuid); + } else { + entry_size = sizeof (zfs_ace_t); + break; + } } switch (ace_type) { case ACE_ACCESS_ALLOWED_OBJECT_ACE_TYPE: @@ -108,9 +129,6 @@ zfs_ace_byteswap(void *buf, size_t size, } ptr = ptr + entry_size; } -#else /* TODO */ - panic("%s:%u: TODO", __func__, __LINE__); -#endif /* TODO */ } /* ARGSUSED */ @@ -173,7 +191,8 @@ zfs_znode_byteswap(void *buf, size_t siz if (zp->zp_acl.z_acl_version == ZFS_ACL_VERSION) { zfs_acl_byteswap((void *)&zp->zp_acl.z_ace_data[0], ZFS_ACE_SPACE); - } else + } else { zfs_oldace_byteswap((ace_t *)&zp->zp_acl.z_ace_data[0], ACE_SLOT_CNT); + } } From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:17:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FA7B106564A; Wed, 5 May 2010 22:17:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3DEEF8FC08; Wed, 5 May 2010 22:17: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 o45MHHgW080007; Wed, 5 May 2010 22:17:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MHHsT080005; Wed, 5 May 2010 22:17:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052217.o45MHHsT080005@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:17: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: r207684 - stable/8/lib/libc/gen 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, 05 May 2010 22:17:18 -0000 Author: jilles Date: Wed May 5 22:17:17 2010 New Revision: 207684 URL: http://svn.freebsd.org/changeset/base/207684 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/8/lib/libc/gen/getcwd.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/gen/getcwd.3 ============================================================================== --- stable/8/lib/libc/gen/getcwd.3 Wed May 5 22:15:20 2010 (r207683) +++ stable/8/lib/libc/gen/getcwd.3 Wed May 5 22:17:17 2010 (r207684) @@ -28,7 +28,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -108,8 +108,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -124,6 +122,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:19:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 002A9106566C; Wed, 5 May 2010 22:19:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E2C068FC17; Wed, 5 May 2010 22:19: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 o45MJqhY080669; Wed, 5 May 2010 22:19:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MJqqX080667; Wed, 5 May 2010 22:19:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052219.o45MJqqX080667@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:19:52 +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: r207685 - stable/7/lib/libc/gen 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, 05 May 2010 22:19:53 -0000 Author: jilles Date: Wed May 5 22:19:52 2010 New Revision: 207685 URL: http://svn.freebsd.org/changeset/base/207685 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/7/lib/libc/gen/getcwd.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/gen/getcwd.3 ============================================================================== --- stable/7/lib/libc/gen/getcwd.3 Wed May 5 22:17:17 2010 (r207684) +++ stable/7/lib/libc/gen/getcwd.3 Wed May 5 22:19:52 2010 (r207685) @@ -28,7 +28,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -108,8 +108,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -124,6 +122,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:23:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F010106567B; Wed, 5 May 2010 22:23:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC2D8FC20; Wed, 5 May 2010 22:23: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 o45MNTSi081526; Wed, 5 May 2010 22:23:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MNTAv081524; Wed, 5 May 2010 22:23:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052223.o45MNTAv081524@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207686 - stable/6/lib/libc/gen 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, 05 May 2010 22:23:29 -0000 Author: jilles Date: Wed May 5 22:23:29 2010 New Revision: 207686 URL: http://svn.freebsd.org/changeset/base/207686 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/6/lib/libc/gen/getcwd.3 Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/gen/getcwd.3 ============================================================================== --- stable/6/lib/libc/gen/getcwd.3 Wed May 5 22:19:52 2010 (r207685) +++ stable/6/lib/libc/gen/getcwd.3 Wed May 5 22:23:29 2010 (r207686) @@ -32,7 +32,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -112,8 +112,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -128,6 +126,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:29:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9CAD1065672; Wed, 5 May 2010 22:29:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C9B788FC18; Wed, 5 May 2010 22:29: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 o45MTsck083023; Wed, 5 May 2010 22:29:54 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MTsY4083021; Wed, 5 May 2010 22:29:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201005052229.o45MTsY4083021@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 5 May 2010 22:29: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: r207687 - 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: Wed, 05 May 2010 22:29:55 -0000 Author: np Date: Wed May 5 22:29:54 2010 New Revision: 207687 URL: http://svn.freebsd.org/changeset/base/207687 Log: Do not hold the T3 firmware in memory all the time. firmware(9) can load/unload it as needed. Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed May 5 22:23:29 2010 (r207686) +++ head/sys/dev/cxgb/cxgb_main.c Wed May 5 22:29:54 2010 (r207687) @@ -3403,5 +3403,3 @@ set_tcb_field_ulp(struct cpl_set_tcb_fie txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); mk_set_tcb_field(req, tid, word, mask, val); } - -MODULE_DEPEND(if_cxgb, cxgb_t3fw, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Wed May 5 22:52:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 393BF106566C; Wed, 5 May 2010 22:52:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 28B778FC1E; Wed, 5 May 2010 22:52: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 o45Mq78N087932; Wed, 5 May 2010 22:52:07 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45Mq61F087929; Wed, 5 May 2010 22:52:06 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201005052252.o45Mq61F087929@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 5 May 2010 22:52: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: r207688 - 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: Wed, 05 May 2010 22:52:07 -0000 Author: np Date: Wed May 5 22:52:06 2010 New Revision: 207688 URL: http://svn.freebsd.org/changeset/base/207688 Log: Don't ring the tx doorbell for every frame when we know more frames will follow. Adjust the freelist and response queue doorbells too. Discussed with: kmacy Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed May 5 22:29:54 2010 (r207687) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed May 5 22:52:06 2010 (r207688) @@ -204,6 +204,7 @@ struct sge_fl { uint32_t cidx; uint32_t pidx; uint32_t gen; + uint32_t db_pending; bus_addr_t phys_addr; uint32_t cntxt_id; uint32_t empty; @@ -232,6 +233,7 @@ struct sge_txq { uint32_t pidx; uint32_t gen; uint32_t unacked; + uint32_t db_pending; struct tx_desc *desc; struct tx_sw_desc *sdesc; uint32_t token; Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed May 5 22:29:54 2010 (r207687) +++ head/sys/dev/cxgb/cxgb_sge.c Wed May 5 22:52:06 2010 (r207688) @@ -696,7 +696,7 @@ refill_fl(adapter_t *sc, struct sge_fl * struct refill_fl_cb_arg cb_arg; struct mbuf *m; caddr_t cl; - int err, count = 0; + int err; cb_arg.error = 0; while (n--) { @@ -754,12 +754,14 @@ refill_fl(adapter_t *sc, struct sge_fl * d = q->desc; } q->credits++; - count++; + q->db_pending++; } done: - if (count) + if (q->db_pending >= 32) { + q->db_pending = 0; t3_write_reg(sc, A_SG_KDOORBELL, V_EGRCNTX(q->cntxt_id)); + } } @@ -810,8 +812,10 @@ __refill_fl(adapter_t *adap, struct sge_ static __inline void __refill_fl_lt(adapter_t *adap, struct sge_fl *fl, int max) { - if ((fl->size - fl->credits) < max) - refill_fl(adap, fl, min(max, fl->size - fl->credits)); + uint32_t reclaimable = fl->size - fl->credits; + + if (reclaimable > 0) + refill_fl(adap, fl, min(max, reclaimable)); } /** @@ -1261,7 +1265,7 @@ make_sgl(struct sg_ent *sgp, bus_dma_seg * When GTS is disabled we unconditionally ring the doorbell. */ static __inline void -check_ring_tx_db(adapter_t *adap, struct sge_txq *q) +check_ring_tx_db(adapter_t *adap, struct sge_txq *q, int mustring) { #if USE_GTS clear_bit(TXQ_LAST_PKT_DB, &q->flags); @@ -1275,9 +1279,12 @@ check_ring_tx_db(adapter_t *adap, struct F_SELEGRCNTX | V_EGRCNTX(q->cntxt_id)); } #else - wmb(); /* write descriptors before telling HW */ - t3_write_reg(adap, A_SG_KDOORBELL, - F_SELEGRCNTX | V_EGRCNTX(q->cntxt_id)); + if (mustring || ++q->db_pending >= 32) { + wmb(); /* write descriptors before telling HW */ + t3_write_reg(adap, A_SG_KDOORBELL, + F_SELEGRCNTX | V_EGRCNTX(q->cntxt_id)); + q->db_pending = 0; + } #endif } @@ -1480,7 +1487,7 @@ t3_encap(struct sge_qset *qs, struct mbu wmb(); ETHER_BPF_MTAP(pi->ifp, m0); wr_gen2(txd, txqs.gen); - check_ring_tx_db(sc, txq); + check_ring_tx_db(sc, txq, 0); return (0); } else if (tso_info) { int eth_type; @@ -1543,7 +1550,7 @@ t3_encap(struct sge_qset *qs, struct mbu wmb(); ETHER_BPF_MTAP(pi->ifp, m0); wr_gen2(txd, txqs.gen); - check_ring_tx_db(sc, txq); + check_ring_tx_db(sc, txq, 0); m_freem(m0); return (0); } @@ -1574,7 +1581,7 @@ t3_encap(struct sge_qset *qs, struct mbu wmb(); ETHER_BPF_MTAP(pi->ifp, m0); wr_gen2(txd, txqs.gen); - check_ring_tx_db(sc, txq); + check_ring_tx_db(sc, txq, 0); m_freem(m0); return (0); } @@ -1593,7 +1600,7 @@ t3_encap(struct sge_qset *qs, struct mbu wr_lo = htonl(V_WR_TID(txq->token)); write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, sgl_flits, wr_hi, wr_lo); - check_ring_tx_db(sc, txq); + check_ring_tx_db(sc, txq, 0); return (0); } @@ -1643,7 +1650,6 @@ cxgb_start_locked(struct sge_qset *qs) { struct mbuf *m_head = NULL; struct sge_txq *txq = &qs->txq[TXQ_ETH]; - int in_use_init = txq->in_use; struct port_info *pi = qs->port; struct ifnet *ifp = pi->ifp; @@ -1655,8 +1661,7 @@ cxgb_start_locked(struct sge_qset *qs) return; } TXQ_LOCK_ASSERT(qs); - while ((txq->in_use - in_use_init < TX_START_MAX_DESC) && - !TXQ_RING_EMPTY(qs) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && + while (!TXQ_RING_EMPTY(qs) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && pi->link_config.link_ok) { reclaim_completed_tx(qs, cxgb_tx_reclaim_threshold, TXQ_ETH); @@ -1674,6 +1679,10 @@ cxgb_start_locked(struct sge_qset *qs) m_head = NULL; } + + if (txq->db_pending) + check_ring_tx_db(pi->adapter, txq, 1); + if (!TXQ_RING_EMPTY(qs) && callout_pending(&txq->txq_timer) == 0 && pi->link_config.link_ok) callout_reset_on(&txq->txq_timer, 1, cxgb_tx_timeout, @@ -1707,6 +1716,9 @@ cxgb_transmit_locked(struct ifnet *ifp, (error = drbr_enqueue(ifp, br, m)) != 0) return (error); } else { + if (txq->db_pending) + check_ring_tx_db(pi->adapter, txq, 1); + /* * We've bypassed the buf ring so we need to update * the stats directly @@ -2354,7 +2366,7 @@ again: reclaim_completed_tx(qs, 16, TXQ_ TXQ_UNLOCK(qs); write_ofld_wr(adap, m, q, pidx, gen, ndesc, segs, nsegs); - check_ring_tx_db(adap, q); + check_ring_tx_db(adap, q, 1); return (0); } @@ -3033,7 +3045,7 @@ process_responses(adapter_t *adap, struc r = rspq->desc; } - if (++rspq->credits >= (rspq->size / 4)) { + if (++rspq->credits >= 64) { refill_rspq(adap, rspq, rspq->credits); rspq->credits = 0; } From owner-svn-src-all@FreeBSD.ORG Thu May 6 00:24:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EF76106566B; Thu, 6 May 2010 00:24:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2E97C8FC12; Thu, 6 May 2010 00:24: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 o460O8tN008288; Thu, 6 May 2010 00:24:08 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o460O8QE008286; Thu, 6 May 2010 00:24:08 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005060024.o460O8QE008286@svn.freebsd.org> From: Rick Macklem Date: Thu, 6 May 2010 00:24: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: r207689 - head/usr.sbin/mountd 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, 06 May 2010 00:24:09 -0000 Author: rmacklem Date: Thu May 6 00:24:08 2010 New Revision: 207689 URL: http://svn.freebsd.org/changeset/base/207689 Log: If the "-alldirs" export option was used for the V4: line, mountd would crash in check_options() since dp == NULL for the V4: line. This patch moves the check for options allowed on the V4: line to ahead of where dp is used to avoid this crash. Reported by: mamalos AT eng.auth.gr MFC after: 1 week Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Wed May 5 22:52:06 2010 (r207688) +++ head/usr.sbin/mountd/mountd.c Thu May 6 00:24:08 2010 (r207689) @@ -2881,16 +2881,16 @@ check_options(dp) syslog(LOG_ERR, "-mask and /masklen are mutually exclusive"); return (1); } - if ((opt_flags & OP_ALLDIRS) && dp->dp_left) { - syslog(LOG_ERR, "-alldirs has multiple directories"); - return (1); - } if (v4root_phase > 0 && (opt_flags & ~(OP_SEC | OP_MASK | OP_NET | OP_HAVEMASK | OP_MASKLEN)) != 0) { syslog(LOG_ERR,"only -sec,-net,-mask options allowed on V4:"); return (1); } + if ((opt_flags & OP_ALLDIRS) && dp->dp_left) { + syslog(LOG_ERR, "-alldirs has multiple directories"); + return (1); + } return (0); } From owner-svn-src-all@FreeBSD.ORG Thu May 6 00:49:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF8DD106566C; Thu, 6 May 2010 00:49:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CE5B98FC0A; Thu, 6 May 2010 00:49: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 o460nAIp013802; Thu, 6 May 2010 00:49:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o460nAIJ013800; Thu, 6 May 2010 00:49:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005060049.o460nAIJ013800@svn.freebsd.org> From: Rick Macklem Date: Thu, 6 May 2010 00:49: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: r207690 - stable/8/sys/fs/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: Thu, 06 May 2010 00:49:11 -0000 Author: rmacklem Date: Thu May 6 00:49:10 2010 New Revision: 207690 URL: http://svn.freebsd.org/changeset/base/207690 Log: MFC: r207349 Delete a diagnostic statement that is no longer useful from the experimental NFS client. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu May 6 00:24:08 2010 (r207689) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu May 6 00:49:10 2010 (r207690) @@ -1406,10 +1406,6 @@ nfsrpc_write(vnode_t vp, struct uio *uio else error = nfsrpc_writerpc(vp, uiop, iomode, verfp, newcred, &stateid, p, nap, attrflagp, stuff); -if (error == NFSERR_BADSTATEID) { -printf("st=0x%x 0x%x 0x%x\n",stateid.other[0],stateid.other[1],stateid.other[2]); -nfscl_dumpstate(nmp, 1, 1, 0, 0); -} if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) From owner-svn-src-all@FreeBSD.ORG Thu May 6 01:00:56 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5D6E106564A; Thu, 6 May 2010 01:00:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 324428FC0C; Thu, 6 May 2010 01:00:55 +0000 (UTC) Received: from c122-106-171-133.carlnfd1.nsw.optusnet.com.au (c122-106-171-133.carlnfd1.nsw.optusnet.com.au [122.106.171.133]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o4610ql5009956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 May 2010 11:00:54 +1000 Date: Thu, 6 May 2010 11:00:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Xin LI In-Reply-To: <201005052124.o45LOJES067973@svn.freebsd.org> Message-ID: <20100506105825.B18998@delplex.bde.org> References: <201005052124.o45LOJES067973@svn.freebsd.org> 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 Subject: Re: svn commit: r207677 - head/usr.bin/find 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, 06 May 2010 01:00:56 -0000 On Wed, 5 May 2010, Xin LI wrote: > Log: > Move SCCS tags to comments as they were already #if 0'ed. This is explicitly disrecommended in style(9): All VCS (version control system) revision identification in files obtained from elsewhere should be maintained, including, where applica- ble, multiple IDs showing a file's history. In general, do not edit for- eign IDs or their infrastructure. Unless otherwise wrapped (such as ``#if defined(LIBC_SCCS)''), enclose both in ``#if 0 ... #endif'' to hide any uncompilable bits and to keep the IDs out of object files. Only add ``From: '' in front of foreign VCS IDs if the file is renamed. Bruce From owner-svn-src-all@FreeBSD.ORG Thu May 6 01:08:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E921C1065676; Thu, 6 May 2010 01:08:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D81D88FC13; Thu, 6 May 2010 01:08: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 o4618aYX018962; Thu, 6 May 2010 01:08:36 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4618aB6018960; Thu, 6 May 2010 01:08:36 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005060108.o4618aB6018960@svn.freebsd.org> From: Rick Macklem Date: Thu, 6 May 2010 01:08: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: r207691 - stable/8/sys/fs/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: Thu, 06 May 2010 01:08:37 -0000 Author: rmacklem Date: Thu May 6 01:08:36 2010 New Revision: 207691 URL: http://svn.freebsd.org/changeset/base/207691 Log: MFC: r207350 For the experimental NFS client, it should always flush dirty buffers before closing the NFSv4 opens, as the comment states. This patch deletes the call to nfscl_mustflush() which would return 0 for the case where a delegation still exists, which was incorrect and could cause crashes during recovery from an expired lease. Modified: stable/8/sys/fs/nfsclient/nfs_clnode.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clnode.c Thu May 6 00:49:10 2010 (r207690) +++ stable/8/sys/fs/nfsclient/nfs_clnode.c Thu May 6 01:08:36 2010 (r207691) @@ -198,8 +198,7 @@ ncl_inactive(struct vop_inactive_args *a * must be flushed before the close, so that the stateid is * available for the writes. */ - if (nfscl_mustflush(vp)) - (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); + (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); (void) nfsrpc_close(vp, 1, ap->a_td); } From owner-svn-src-all@FreeBSD.ORG Thu May 6 04:23:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D222D1065670; Thu, 6 May 2010 04:23:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C1EFA8FC25; Thu, 6 May 2010 04:23: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 o464Nq0B061924; Thu, 6 May 2010 04:23:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o464Nq83061921; Thu, 6 May 2010 04:23:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005060423.o464Nq83061921@svn.freebsd.org> From: Alan Cox Date: Thu, 6 May 2010 04:23: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: r207692 - 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, 06 May 2010 04:23:52 -0000 Author: alc Date: Thu May 6 04:23:52 2010 New Revision: 207692 URL: http://svn.freebsd.org/changeset/base/207692 Log: Eliminate dead code. Modified: head/sys/mips/include/pmap.h head/sys/mips/mips/pmap.c Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Thu May 6 01:08:36 2010 (r207691) +++ head/sys/mips/include/pmap.h Thu May 6 04:23:52 2010 (r207692) @@ -175,7 +175,6 @@ void pmap_unmapdev(vm_offset_t, vm_size_ vm_offset_t pmap_steal_memory(vm_size_t size); void pmap_set_modified(vm_offset_t pa); int page_is_managed(vm_offset_t pa); -void pmap_page_is_free(vm_page_t m); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kremove(vm_offset_t va); void *pmap_kenter_temporary(vm_paddr_t pa, int i); Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu May 6 01:08:36 2010 (r207691) +++ head/sys/mips/mips/pmap.c Thu May 6 04:23:52 2010 (r207692) @@ -3030,20 +3030,6 @@ init_pte_prot(vm_offset_t va, vm_page_t } /* - * pmap_page_is_free: - * - * Called when a page is freed to allow pmap to clean up - * any extra state associated with the page. In this case - * clear modified/referenced bits. - */ -void -pmap_page_is_free(vm_page_t m) -{ - - m->md.pv_flags = 0; -} - -/* * pmap_set_modified: * * Sets the page modified and reference bits for the specified page. From owner-svn-src-all@FreeBSD.ORG Thu May 6 04:57:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A57C41065675; Thu, 6 May 2010 04:57:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 938408FC17; Thu, 6 May 2010 04:57: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 o464vBWt069315; Thu, 6 May 2010 04:57:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o464vBBC069314; Thu, 6 May 2010 04:57:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005060457.o464vBBC069314@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 6 May 2010 04:57:11 +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: r207693 - stable/8/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, 06 May 2010 04:57:11 -0000 Author: kib Date: Thu May 6 04:57:10 2010 New Revision: 207693 URL: http://svn.freebsd.org/changeset/base/207693 Log: MFC r207570: Style and comment adjustements. Modified: stable/8/sys/amd64/amd64/exception.S 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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Thu May 6 04:23:52 2010 (r207692) +++ stable/8/sys/amd64/amd64/exception.S Thu May 6 04:57:10 2010 (r207693) @@ -50,14 +50,14 @@ .bss .globl dtrace_invop_jump_addr .align 8 - .type dtrace_invop_jump_addr, @object - .size dtrace_invop_jump_addr, 8 + .type dtrace_invop_jump_addr,@object + .size dtrace_invop_jump_addr,8 dtrace_invop_jump_addr: .zero 8 .globl dtrace_invop_calltrap_addr .align 8 - .type dtrace_invop_calltrap_addr, @object - .size dtrace_invop_calltrap_addr, 8 + .type dtrace_invop_calltrap_addr,@object + .size dtrace_invop_calltrap_addr,8 dtrace_invop_calltrap_addr: .zero 8 #endif @@ -157,7 +157,6 @@ IDTVEC(align) * kernel from userland. Reenable interrupts if they were enabled * before the trap. This approximates SDT_SYS386TGT on the i386 port. */ - SUPERALIGN_TEXT .globl alltraps .type alltraps,@function @@ -211,16 +210,16 @@ alltraps_pushregs_no_rdi: * Set our jump address for the jump back in the event that * the breakpoint wasn't caused by DTrace at all. */ - movq $calltrap, dtrace_invop_calltrap_addr(%rip) + movq $calltrap,dtrace_invop_calltrap_addr(%rip) /* Jump to the code hooked in by DTrace. */ - movq dtrace_invop_jump_addr, %rax + movq dtrace_invop_jump_addr,%rax jmpq *dtrace_invop_jump_addr #endif .globl calltrap .type calltrap,@function calltrap: - movq %rsp, %rdi + movq %rsp,%rdi call trap MEXITCOUNT jmp doreti /* Handle any pending ASTs */ @@ -274,9 +273,11 @@ IDTVEC(dblfault) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs -1: movq %rsp, %rdi +1: + movq %rsp,%rdi call dblfault_handler -2: hlt +2: + hlt jmp 2b IDTVEC(page) @@ -369,7 +370,7 @@ IDTVEC(fast_syscall) movq %r15,TF_R15(%rsp) /* C preserved */ movl $TF_HASSEGS,TF_FLAGS(%rsp) FAKE_MCOUNT(TF_RIP(%rsp)) - movq %rsp, %rdi + movq %rsp,%rdi call syscall movq PCPU(CURPCB),%rax andq $~PCB_FULLCTX,PCB_FLAGS(%rax) @@ -456,7 +457,7 @@ nmi_fromuserspace: /* Note: this label is also used by ddb and gdb: */ nmi_calltrap: FAKE_MCOUNT(TF_RIP(%rsp)) - movq %rsp, %rdi + movq %rsp,%rdi call trap MEXITCOUNT #ifdef HWPMC_HOOKS @@ -555,9 +556,9 @@ nmi_restoreregs: iretq ENTRY(fork_trampoline) - movq %r12, %rdi /* function */ - movq %rbx, %rsi /* arg1 */ - movq %rsp, %rdx /* trapframe pointer */ + movq %r12,%rdi /* function */ + movq %rbx,%rsi /* arg1 */ + movq %rsp,%rdx /* trapframe pointer */ call fork_exit MEXITCOUNT jmp doreti /* Handle any ASTs */ @@ -628,7 +629,7 @@ doreti_ast: testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) je doreti_exit sti - movq %rsp, %rdi /* pass a pointer to the trapframe */ + movq %rsp,%rdi /* pass a pointer to the trapframe */ call ast jmp doreti_ast @@ -648,8 +649,8 @@ doreti_exit: * Do not reload segment registers for kernel. * Since we do not reload segments registers with sane * values on kernel entry, descriptors referenced by - * segments registers may be not valid. This is fatal - * for the usermode, but is innocent for the kernel. + * segments registers might be not valid. This is fatal + * for user mode, but is not a problem for the kernel. */ testb $SEL_RPL_MASK,TF_CS(%rsp) jz ld_regs @@ -662,14 +663,16 @@ do_segs: /* Restore %fs and fsbase */ movw TF_FS(%rsp),%ax .globl ld_fs -ld_fs: movw %ax,%fs +ld_fs: + movw %ax,%fs cmpw $KUF32SEL,%ax jne 1f movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx .globl ld_fsbase -ld_fsbase: wrmsr +ld_fsbase: + wrmsr 1: /* Restore %gs and gsbase */ movw TF_GS(%rsp),%si @@ -678,7 +681,8 @@ ld_fsbase: wrmsr movl $MSR_GSBASE,%ecx rdmsr .globl ld_gs -ld_gs: movw %si,%gs +ld_gs: + movw %si,%gs wrmsr popfq cmpw $KUG32SEL,%si @@ -687,12 +691,17 @@ ld_gs: movw %si,%gs movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx .globl ld_gsbase -ld_gsbase: wrmsr -1: .globl ld_es -ld_es: movw TF_ES(%rsp),%es +ld_gsbase: + wrmsr +1: + .globl ld_es +ld_es: + movw TF_ES(%rsp),%es .globl ld_ds -ld_ds: movw TF_DS(%rsp),%ds -ld_regs:movq TF_RDI(%rsp),%rdi +ld_ds: + movw TF_DS(%rsp),%ds +ld_regs: + movq TF_RDI(%rsp),%rdi movq TF_RSI(%rsp),%rsi movq TF_RDX(%rsp),%rdx movq TF_RCX(%rsp),%rcx @@ -711,7 +720,8 @@ ld_regs:movq TF_RDI(%rsp),%rdi jz 1f /* keep running with kernel GS.base */ cli swapgs -1: addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ +1: + addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ .globl doreti_iret doreti_iret: iretq @@ -738,7 +748,8 @@ doreti_iret_fault: testl $PSL_I,TF_RFLAGS(%rsp) jz 1f sti -1: movw %fs,TF_FS(%rsp) +1: + movw %fs,TF_FS(%rsp) movw %gs,TF_GS(%rsp) movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) @@ -768,7 +779,7 @@ doreti_iret_fault: .globl ds_load_fault ds_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUDSEL,TF_DS(%rsp) jmp doreti @@ -777,7 +788,7 @@ ds_load_fault: .globl es_load_fault es_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUDSEL,TF_ES(%rsp) jmp doreti @@ -786,7 +797,7 @@ es_load_fault: .globl fs_load_fault fs_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUF32SEL,TF_FS(%rsp) jmp doreti @@ -796,7 +807,7 @@ fs_load_fault: gs_load_fault: popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUG32SEL,TF_GS(%rsp) jmp doreti @@ -805,7 +816,7 @@ gs_load_fault: .globl fsbase_load_fault fsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 movq TD_PCB(%r8),%r8 @@ -816,7 +827,7 @@ fsbase_load_fault: .globl gsbase_load_fault gsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 movq TD_PCB(%r8),%r8 From owner-svn-src-all@FreeBSD.ORG Thu May 6 04:57:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 867791065687; Thu, 6 May 2010 04:57:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 75DDB8FC1D; Thu, 6 May 2010 04: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 o464vXOX069422; Thu, 6 May 2010 04:57:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o464vXBF069418; Thu, 6 May 2010 04:57:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005060457.o464vXBF069418@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 6 May 2010 04: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: r207694 - 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: Thu, 06 May 2010 04:57:33 -0000 Author: kib Date: Thu May 6 04:57:33 2010 New Revision: 207694 URL: http://svn.freebsd.org/changeset/base/207694 Log: Add a helper function vm_pageout_page_lock(), similar to tegge' vm_pageout_fallback_object_lock(), to obtain the page lock while having page queue lock locked, and still maintain the page position in a queue. Use the helper to lock the page in the pageout daemon and contig launder iterators instead of skipping the page if its lock is contested. Skipping locked pages easily causes pagedaemon or launder to not make a progress with page cleaning. Proposed and reviewed by: alc Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pageout.h Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Thu May 6 04:57:10 2010 (r207693) +++ head/sys/vm/vm_contig.c Thu May 6 04:57:33 2010 (r207694) @@ -168,8 +168,10 @@ vm_contig_launder(int queue) if ((m->flags & PG_MARKER) != 0) continue; - if (!vm_page_trylock(m)) - continue; + if (!vm_pageout_page_lock(m, &next)) { + vm_page_unlock(m); + return (FALSE); + } KASSERT(VM_PAGE_INQUEUE2(m, queue), ("vm_contig_launder: page %p's queue is not %d", m, queue)); error = vm_contig_launder_page(m, &next); Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu May 6 04:57:10 2010 (r207693) +++ head/sys/vm/vm_pageout.c Thu May 6 04:57:33 2010 (r207694) @@ -215,6 +215,17 @@ static void vm_req_vmdaemon(int req); #endif static void vm_pageout_page_stats(void); +static void +vm_pageout_init_marker(vm_page_t marker, u_short queue) +{ + + bzero(marker, sizeof(*marker)); + marker->flags = PG_FICTITIOUS | PG_MARKER; + marker->oflags = VPO_BUSY; + marker->queue = queue; + marker->wire_count = 1; +} + /* * vm_pageout_fallback_object_lock: * @@ -237,16 +248,8 @@ vm_pageout_fallback_object_lock(vm_page_ u_short queue; vm_object_t object; - /* - * Initialize our marker - */ - bzero(&marker, sizeof(marker)); - marker.flags = PG_FICTITIOUS | PG_MARKER; - marker.oflags = VPO_BUSY; - marker.queue = m->queue; - marker.wire_count = 1; - queue = m->queue; + vm_pageout_init_marker(&marker, queue); object = m->object; TAILQ_INSERT_AFTER(&vm_page_queues[queue].pl, @@ -268,6 +271,43 @@ vm_pageout_fallback_object_lock(vm_page_ } /* + * Lock the page while holding the page queue lock. Use marker page + * to detect page queue changes and maintain notion of next page on + * page queue. Return TRUE if no changes were detected, FALSE + * otherwise. The page is locked on return. The page queue lock might + * be dropped and reacquired. + * + * This function depends on normal struct vm_page being type stable. + */ +boolean_t +vm_pageout_page_lock(vm_page_t m, vm_page_t *next) +{ + struct vm_page marker; + boolean_t unchanged; + u_short queue; + + vm_page_lock_assert(m, MA_NOTOWNED); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + + if (vm_page_trylock(m)) + return (TRUE); + + queue = m->queue; + vm_pageout_init_marker(&marker, queue); + + TAILQ_INSERT_AFTER(&vm_page_queues[queue].pl, m, &marker, pageq); + vm_page_unlock_queues(); + vm_page_lock(m); + vm_page_lock_queues(); + + /* Page queue might have changed. */ + *next = TAILQ_NEXT(&marker, pageq); + unchanged = (m->queue == queue && &marker == TAILQ_NEXT(m, pageq)); + TAILQ_REMOVE(&vm_page_queues[queue].pl, &marker, pageq); + return (unchanged); +} + +/* * vm_pageout_clean: * * Clean the page and remove it from the laundry. @@ -777,7 +817,11 @@ rescan0: if (m->flags & PG_MARKER) continue; - if (!vm_page_trylock(m)) { + /* + * Lock the page. + */ + if (!vm_pageout_page_lock(m, &next)) { + vm_page_unlock(m); addl_page_shortage++; continue; } @@ -1112,7 +1156,9 @@ unlock_and_continue: m = next; continue; } - if (!vm_page_trylock(m) || (object = m->object) == NULL) { + if (!vm_pageout_page_lock(m, &next) || + (object = m->object) == NULL) { + vm_page_unlock(m); m = next; continue; } @@ -1375,7 +1421,9 @@ vm_pageout_page_stats() continue; } vm_page_lock_assert(m, MA_NOTOWNED); - if (vm_page_trylock(m) == 0 || (object = m->object) == NULL) { + if (!vm_pageout_page_lock(m, &next) || + (object = m->object) == NULL) { + vm_page_unlock(m); m = next; continue; } Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Thu May 6 04:57:10 2010 (r207693) +++ head/sys/vm/vm_pageout.h Thu May 6 04:57:33 2010 (r207694) @@ -104,5 +104,6 @@ extern void vm_waitpfault(void); boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); int vm_pageout_flush(vm_page_t *, int, int); void vm_pageout_oom(int shortage); +boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); #endif #endif /* _VM_VM_PAGEOUT_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 06:44:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07C8B1065672; Thu, 6 May 2010 06:44:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E8ACA8FC18; Thu, 6 May 2010 06:44: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 o466iJEm092677; Thu, 6 May 2010 06:44:19 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o466iJxI092654; Thu, 6 May 2010 06:44:19 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005060644.o466iJxI092654@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 6 May 2010 06:44:19 +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: r207695 - in stable/8/sys: contrib/ipfilter/netinet net netinet netinet6 netipsec 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, 06 May 2010 06:44:20 -0000 Author: bz Date: Thu May 6 06:44:19 2010 New Revision: 207695 URL: http://svn.freebsd.org/changeset/base/207695 Log: MFC r207369: MFP4: @176978-176982, 176984, 176990-176994, 177441 "Whitspace" churn after the VIMAGE/VNET whirls. Remove the need for some "init" functions within the network stack, like pim6_init(), icmp_init() or significantly shorten others like ip6_init() and nd6_init(), using static initialization again where possible and formerly missed. Move (most) variables back to the place they used to be before the container structs and VIMAGE_GLOABLS (before r185088) and try to reduce the diff to stable/7 and earlier as good as possible, to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9. This also removes some header file pollution for putatively static global variables. Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are no longer needed. Reviewed by: jhb Discussed with: rwatson Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH Modified: stable/8/sys/contrib/ipfilter/netinet/ip_auth.c stable/8/sys/net/if.c stable/8/sys/net/if_gif.c stable/8/sys/net/if_gif.h stable/8/sys/net/route.c stable/8/sys/netinet/icmp6.h stable/8/sys/netinet/if_ether.c stable/8/sys/netinet/in.c stable/8/sys/netinet/in_gif.c stable/8/sys/netinet/in_proto.c stable/8/sys/netinet/in_rmx.c stable/8/sys/netinet/ip_icmp.c stable/8/sys/netinet/ip_icmp.h stable/8/sys/netinet/ip_input.c stable/8/sys/netinet/ip_var.h stable/8/sys/netinet/tcp_hostcache.c stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_reass.c stable/8/sys/netinet/tcp_sack.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_syncache.c stable/8/sys/netinet/tcp_timewait.c stable/8/sys/netinet/tcp_var.h stable/8/sys/netinet/udp_usrreq.c stable/8/sys/netinet/udp_var.h stable/8/sys/netinet6/frag6.c stable/8/sys/netinet6/icmp6.c stable/8/sys/netinet6/in6_gif.c stable/8/sys/netinet6/in6_ifattach.c stable/8/sys/netinet6/in6_proto.c stable/8/sys/netinet6/in6_rmx.c stable/8/sys/netinet6/in6_src.c stable/8/sys/netinet6/in6_var.h stable/8/sys/netinet6/ip6_input.c stable/8/sys/netinet6/ip6_mroute.c stable/8/sys/netinet6/ip6_var.h stable/8/sys/netinet6/nd6.c stable/8/sys/netinet6/nd6.h stable/8/sys/netinet6/nd6_nbr.c stable/8/sys/netinet6/nd6_rtr.c stable/8/sys/netinet6/raw_ip6.c stable/8/sys/netinet6/scope6.c stable/8/sys/netipsec/ah_var.h stable/8/sys/netipsec/esp_var.h stable/8/sys/netipsec/ipcomp_var.h stable/8/sys/netipsec/ipip_var.h stable/8/sys/netipsec/ipsec.c stable/8/sys/netipsec/ipsec.h stable/8/sys/netipsec/ipsec6.h stable/8/sys/netipsec/key.c stable/8/sys/netipsec/xform_esp.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/contrib/ipfilter/netinet/ip_auth.c ============================================================================== --- stable/8/sys/contrib/ipfilter/netinet/ip_auth.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/contrib/ipfilter/netinet/ip_auth.c Thu May 6 06:44:19 2010 (r207695) @@ -70,11 +70,6 @@ struct file; #include #include #include -#if !defined(_KERNEL) && defined(__FreeBSD_version) && \ - __FreeBSD_version >= 800049 -# define V_ip_do_randomid ip_do_randomid -# define V_ip_id ip_id -#endif #if !defined(_KERNEL) && !defined(__osf__) && !defined(__sgi) # define KERNEL # define _KERNEL Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/if.c Thu May 6 06:44:19 2010 (r207695) @@ -167,9 +167,11 @@ static void if_detach_internal(struct if extern void nd6_setmtu(struct ifnet *); #endif +VNET_DEFINE(int, if_index); +int ifqmaxlen = IFQ_MAXLEN; VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */ VNET_DEFINE(struct ifgrouphead, ifg_head); -VNET_DEFINE(int, if_index); + static VNET_DEFINE(int, if_indexlim) = 8; /* Table of ifnet by index. */ @@ -178,8 +180,6 @@ static VNET_DEFINE(struct ifindex_entry #define V_if_indexlim VNET(if_indexlim) #define V_ifindex_table VNET(ifindex_table) -int ifqmaxlen = IFQ_MAXLEN; - /* * The global network interface list (V_ifnet) and related state (such as * if_index, if_indexlim, and ifindex_table) are protected by an sxlock and Modified: stable/8/sys/net/if_gif.c ============================================================================== --- stable/8/sys/net/if_gif.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/if_gif.c Thu May 6 06:44:19 2010 (r207695) @@ -94,20 +94,9 @@ */ static struct mtx gif_mtx; static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); - static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); - #define V_gif_softc_list VNET(gif_softc_list) -#ifdef INET -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; -#define V_ip_gif_ttl VNET(ip_gif_ttl) -#endif -#ifdef INET6 -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; -#define V_ip6_gif_hlim VNET(ip6_gif_hlim) -#endif - void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af); void (*ng_gif_attach_p)(struct ifnet *ifp); @@ -135,19 +124,11 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTL */ #define MAX_GIF_NEST 1 #endif - static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; #define V_max_gif_nesting VNET(max_gif_nesting) - SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); -#ifdef INET6 -SYSCTL_DECL(_net_inet6_ip6); -SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_RW, - &VNET_NAME(ip6_gif_hlim), 0, ""); -#endif - /* * By default, we disallow creation of multiple tunnels between the same * pair of addresses. Some applications require this functionality so @@ -159,7 +140,6 @@ static VNET_DEFINE(int, parallel_tunnels static VNET_DEFINE(int, parallel_tunnels) = 0; #endif #define V_parallel_tunnels VNET(parallel_tunnels) - SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, &VNET_NAME(parallel_tunnels), 0, "Allow parallel tunnels?"); Modified: stable/8/sys/net/if_gif.h ============================================================================== --- stable/8/sys/net/if_gif.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/if_gif.h Thu May 6 06:44:19 2010 (r207695) @@ -118,10 +118,6 @@ int gif_ioctl(struct ifnet *, u_long, ca int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); void gif_delete_tunnel(struct ifnet *); int gif_encapcheck(const struct mbuf *, int, int, void *); - -VNET_DECLARE(int, ip_gif_ttl); -#define V_ip_gif_ttl VNET(ip_gif_ttl) - #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/route.c Thu May 6 06:44:19 2010 (r207695) @@ -88,15 +88,14 @@ SYSCTL_INT(_net, OID_AUTO, add_addr_allf &rt_add_addr_allfibs, 0, ""); TUNABLE_INT("net.add_addr_allfibs", &rt_add_addr_allfibs); -VNET_DEFINE(struct radix_node_head *, rt_tables); -static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ -VNET_DEFINE(int, rttrash); /* routes not in table but not freed */ VNET_DEFINE(struct rtstat, rtstat); +#define V_rtstat VNET(rtstat) +VNET_DEFINE(struct radix_node_head *, rt_tables); #define V_rt_tables VNET(rt_tables) -#define V_rtzone VNET(rtzone) + +VNET_DEFINE(int, rttrash); /* routes not in table but not freed */ #define V_rttrash VNET(rttrash) -#define V_rtstat VNET(rtstat) /* compare two sockaddr structures */ @@ -114,6 +113,9 @@ VNET_DEFINE(struct rtstat, rtstat); */ #define RNTORT(p) ((struct rtentry *)(p)) +static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ +#define V_rtzone VNET(rtzone) + #if 0 /* default fib for tunnels to use */ u_int tunnel_fib = 0; Modified: stable/8/sys/netinet/icmp6.h ============================================================================== --- stable/8/sys/netinet/icmp6.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/icmp6.h Thu May 6 06:44:19 2010 (r207695) @@ -652,7 +652,6 @@ struct rtentry; struct rttimer; struct in6_multi; # endif -void icmp6_init(void); void icmp6_paramerror(struct mbuf *, int); void icmp6_error(struct mbuf *, int, int, int); void icmp6_error2(struct mbuf *, int, int, int, struct ifnet *); Modified: stable/8/sys/netinet/if_ether.c ============================================================================== --- stable/8/sys/netinet/if_ether.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/if_ether.c Thu May 6 06:44:19 2010 (r207695) @@ -82,16 +82,15 @@ SYSCTL_DECL(_net_link_ether); SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, ""); SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); -VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for - * local traffic */ - /* timer values */ static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ +static VNET_DEFINE(int, arp_maxtries) = 5; +VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for + * local traffic */ +static VNET_DEFINE(int, arp_proxyall) = 0; static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ -static VNET_DEFINE(int, arp_maxtries) = 5; -static VNET_DEFINE(int, arp_proxyall); static VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ #define V_arpt_keep VNET(arpt_keep) @@ -103,7 +102,6 @@ static VNET_DEFINE(struct arpstat, arpst SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW, &VNET_NAME(arpt_keep), 0, "ARP entry lifetime in seconds"); - SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, &VNET_NAME(arp_maxtries), 0, "ARP resolution attempts before returning error"); Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in.c Thu May 6 06:44:19 2010 (r207695) @@ -77,20 +77,19 @@ static int in_ifinit(struct ifnet *, static void in_purgemaddrs(struct ifnet *); static VNET_DEFINE(int, subnetsarelocal); -static VNET_DEFINE(int, sameprefixcarponly); -VNET_DECLARE(struct inpcbinfo, ripcbinfo); - #define V_subnetsarelocal VNET(subnetsarelocal) -#define V_sameprefixcarponly VNET(sameprefixcarponly) -#define V_ripcbinfo VNET(ripcbinfo) - SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &VNET_NAME(subnetsarelocal), 0, "Treat all subnets as directly connected"); +static VNET_DEFINE(int, sameprefixcarponly); +#define V_sameprefixcarponly VNET(sameprefixcarponly) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, &VNET_NAME(sameprefixcarponly), 0, "Refuse to create same prefixes on different interfaces"); +VNET_DECLARE(struct inpcbinfo, ripcbinfo); +#define V_ripcbinfo VNET(ripcbinfo) + /* * Return 1 if an internet address is for a ``local'' host * (one to which we have a connection). If subnetsarelocal Modified: stable/8/sys/netinet/in_gif.c ============================================================================== --- stable/8/sys/netinet/in_gif.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in_gif.c Thu May 6 06:44:19 2010 (r207695) @@ -85,6 +85,8 @@ struct protosw in_gif_protosw = { .pr_usrreqs = &rip_usrreqs }; +VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +#define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); Modified: stable/8/sys/netinet/in_proto.c ============================================================================== --- stable/8/sys/netinet/in_proto.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in_proto.c Thu May 6 06:44:19 2010 (r207695) @@ -208,7 +208,6 @@ struct protosw inetsw[] = { .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = icmp_input, .pr_ctloutput = rip_ctloutput, - .pr_init = icmp_init, .pr_usrreqs = &rip_usrreqs }, { Modified: stable/8/sys/netinet/in_rmx.c ============================================================================== --- stable/8/sys/netinet/in_rmx.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in_rmx.c Thu May 6 06:44:19 2010 (r207695) @@ -131,22 +131,22 @@ in_matroute(void *v_arg, struct radix_no return rn; } -static VNET_DEFINE(int, rtq_reallyold); -static VNET_DEFINE(int, rtq_minreallyold); -static VNET_DEFINE(int, rtq_toomany); - +static VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */ #define V_rtq_reallyold VNET(rtq_reallyold) -#define V_rtq_minreallyold VNET(rtq_minreallyold) -#define V_rtq_toomany VNET(rtq_toomany) - SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold), 0, "Default expiration time on dynamically learned routes"); +/* never automatically crank down to less */ +static VNET_DEFINE(int, rtq_minreallyold) = 10; +#define V_rtq_minreallyold VNET(rtq_minreallyold) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &VNET_NAME(rtq_minreallyold), 0, "Minimum time to attempt to hold onto dynamically learned routes"); +/* 128 cached routes is "too many" */ +static VNET_DEFINE(int, rtq_toomany) = 128; +#define V_rtq_toomany VNET(rtq_toomany) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, &VNET_NAME(rtq_toomany), 0, "Upper limit on dynamically learned routes"); @@ -239,7 +239,7 @@ in_rtqkill(struct radix_node *rn, void * } #define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */ -static VNET_DEFINE(int, rtq_timeout); +static VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT; static VNET_DEFINE(struct callout, rtq_timer); #define V_rtq_timeout VNET(rtq_timeout) @@ -362,11 +362,6 @@ in_inithead(void **head, int off) if (off == 0) /* XXX MRT see above */ return 1; /* only do the rest for a real routing table */ - V_rtq_reallyold = 60*60; /* one hour is "really old" */ - V_rtq_minreallyold = 10; /* never automatically crank down to less */ - V_rtq_toomany = 128; /* 128 cached routes is "too many" */ - V_rtq_timeout = RTQ_TIMEOUT; - rnh = *head; rnh->rnh_addaddr = in_addroute; rnh->rnh_matchaddr = in_matroute; Modified: stable/8/sys/netinet/ip_icmp.c ============================================================================== --- stable/8/sys/netinet/ip_icmp.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_icmp.c Thu May 6 06:44:19 2010 (r207695) @@ -75,65 +75,60 @@ __FBSDID("$FreeBSD$"); * routines to turnaround packets back to the originator, and * host table maintenance routines. */ - VNET_DEFINE(struct icmpstat, icmpstat); -static VNET_DEFINE(int, icmpmaskrepl); -static VNET_DEFINE(u_int, icmpmaskfake); -static VNET_DEFINE(int, drop_redirect); -static VNET_DEFINE(int, log_redirect); -static VNET_DEFINE(int, icmplim); -static VNET_DEFINE(int, icmplim_output); -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); -static VNET_DEFINE(int, icmp_rfi); -static VNET_DEFINE(int, icmp_quotelen); -static VNET_DEFINE(int, icmpbmcastecho); - -#define V_icmpmaskrepl VNET(icmpmaskrepl) -#define V_icmpmaskfake VNET(icmpmaskfake) -#define V_drop_redirect VNET(drop_redirect) -#define V_log_redirect VNET(log_redirect) -#define V_icmplim VNET(icmplim) -#define V_icmplim_output VNET(icmplim_output) -#define V_reply_src VNET(reply_src) -#define V_icmp_rfi VNET(icmp_rfi) -#define V_icmp_quotelen VNET(icmp_quotelen) -#define V_icmpbmcastecho VNET(icmpbmcastecho) - SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmpstat), icmpstat, ""); +static VNET_DEFINE(int, icmpmaskrepl) = 0; +#define V_icmpmaskrepl VNET(icmpmaskrepl) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, &VNET_NAME(icmpmaskrepl), 0, "Reply to ICMP Address Mask Request packets."); +static VNET_DEFINE(u_int, icmpmaskfake) = 0; +#define V_icmpmaskfake VNET(icmpmaskfake) SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, &VNET_NAME(icmpmaskfake), 0, "Fake reply to ICMP Address Mask Request packets."); +static VNET_DEFINE(int, drop_redirect) = 0; +#define V_drop_redirect VNET(drop_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, &VNET_NAME(drop_redirect), 0, "Ignore ICMP redirects"); +static VNET_DEFINE(int, log_redirect) = 0; +#define V_log_redirect VNET(log_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, &VNET_NAME(log_redirect), 0, "Log ICMP redirects to the console"); +static VNET_DEFINE(int, icmplim) = 200; +#define V_icmplim VNET(icmplim) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, &VNET_NAME(icmplim), 0, "Maximum number of ICMP responses per second"); +static VNET_DEFINE(int, icmplim_output) = 1; +#define V_icmplim_output VNET(icmplim_output) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, &VNET_NAME(icmplim_output), 0, "Enable rate limiting of ICMP responses"); +static VNET_DEFINE(char, reply_src[IFNAMSIZ]); +#define V_reply_src VNET(reply_src) SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, &VNET_NAME(reply_src), IFNAMSIZ, "icmp reply source for non-local packets."); +static VNET_DEFINE(int, icmp_rfi) = 0; +#define V_icmp_rfi VNET(icmp_rfi) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_RW, &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); +static VNET_DEFINE(int, icmp_quotelen) = 8; +#define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, "Number of bytes from original packet to quote in ICMP reply"); @@ -141,7 +136,8 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO /* * ICMP broadcast echo sysctl */ - +static VNET_DEFINE(int, icmpbmcastecho) = 0; +#define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &VNET_NAME(icmpbmcastecho), 0, ""); @@ -156,21 +152,6 @@ static void icmp_send(struct mbuf *, str extern struct protosw inetsw[]; -void -icmp_init(void) -{ - - V_icmpmaskrepl = 0; - V_icmpmaskfake = 0; - V_drop_redirect = 0; - V_log_redirect = 0; - V_icmplim = 200; - V_icmplim_output = 1; - V_icmp_rfi = 0; - V_icmp_quotelen = 8; - V_icmpbmcastecho = 0; -} - /* * Kernel module interface for updating icmpstat. The argument is an index * into icmpstat treated as an array of u_long. While this encodes the Modified: stable/8/sys/netinet/ip_icmp.h ============================================================================== --- stable/8/sys/netinet/ip_icmp.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_icmp.h Thu May 6 06:44:19 2010 (r207695) @@ -208,7 +208,6 @@ struct icmp { #ifdef _KERNEL void icmp_error(struct mbuf *, int, int, uint32_t, int); void icmp_input(struct mbuf *, int); -void icmp_init(void); int ip_next_mtu(int, int); #endif Modified: stable/8/sys/netinet/ip_input.c ============================================================================== --- stable/8/sys/netinet/ip_input.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_input.c Thu May 6 06:44:19 2010 (r207695) @@ -89,66 +89,40 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct ip) == 20); #endif -static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ -static VNET_DEFINE(int, ip_checkinterface); -static VNET_DEFINE(int, ip_keepfaith); -static VNET_DEFINE(int, ip_sendsourcequench); - -#define V_ipsendredirects VNET(ipsendredirects) -#define V_ip_checkinterface VNET(ip_checkinterface) -#define V_ip_keepfaith VNET(ip_keepfaith) -#define V_ip_sendsourcequench VNET(ip_sendsourcequench) - -VNET_DEFINE(int, ip_defttl) = IPDEFTTL; -VNET_DEFINE(int, ip_do_randomid); -VNET_DEFINE(int, ipforwarding); - -VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ -VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ -VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ -VNET_DEFINE(struct ipstat, ipstat); - -static VNET_DEFINE(int, ip_rsvp_on); -VNET_DEFINE(struct socket *, ip_rsvpd); -VNET_DEFINE(int, rsvp_on); - -#define V_ip_rsvp_on VNET(ip_rsvp_on) - -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); -static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ -static VNET_DEFINE(int, maxfragsperpacket); -static VNET_DEFINE(int, nipq); /* Total # of reass queues */ - -#define V_ipq VNET(ipq) -#define V_maxnipq VNET(maxnipq) -#define V_maxfragsperpacket VNET(maxfragsperpacket) -#define V_nipq VNET(nipq) - -VNET_DEFINE(int, ipstealth); - struct rwlock in_ifaddr_lock; RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); +VNET_DEFINE(int, rsvp_on); + +VNET_DEFINE(int, ipforwarding); SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW, &VNET_NAME(ipforwarding), 0, "Enable IP forwarding between interfaces"); +static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ +#define V_ipsendredirects VNET(ipsendredirects) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW, &VNET_NAME(ipsendredirects), 0, "Enable sending IP redirects"); +VNET_DEFINE(int, ip_defttl) = IPDEFTTL; SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW, &VNET_NAME(ip_defttl), 0, "Maximum TTL on IP packets"); +static VNET_DEFINE(int, ip_keepfaith); +#define V_ip_keepfaith VNET(ip_keepfaith) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, &VNET_NAME(ip_keepfaith), 0, "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); +static VNET_DEFINE(int, ip_sendsourcequench); +#define V_ip_sendsourcequench VNET(ip_sendsourcequench) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, &VNET_NAME(ip_sendsourcequench), 0, "Enable the transmission of source quench packets"); +VNET_DEFINE(int, ip_do_randomid); SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_RW, &VNET_NAME(ip_do_randomid), 0, "Assign random ip_id values"); @@ -166,6 +140,8 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, * to the loopback interface instead of the interface where the * packets for those addresses are received. */ +static VNET_DEFINE(int, ip_checkinterface); +#define V_ip_checkinterface VNET(ip_checkinterface) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, &VNET_NAME(ip_checkinterface), 0, "Verify packet arrives on correct interface"); @@ -182,16 +158,22 @@ static struct netisr_handler ip_nh = { extern struct domain inetdomain; extern struct protosw inetsw[]; u_char ip_protox[IPPROTO_MAX]; +VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ +VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ +VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ +VNET_DEFINE(struct ipstat, ipstat); SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(ipstat), ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); static VNET_DEFINE(uma_zone_t, ipq_zone); -#define V_ipq_zone VNET(ipq_zone) - +static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static struct mtx ipqlock; +#define V_ipq_zone VNET(ipq_zone) +#define V_ipq VNET(ipq) + #define IPQ_LOCK() mtx_lock(&ipqlock) #define IPQ_UNLOCK() mtx_unlock(&ipqlock) #define IPQ_LOCK_INIT() mtx_init(&ipqlock, "ipqlock", NULL, MTX_DEF) @@ -201,10 +183,16 @@ static void maxnipq_update(void); static void ipq_zone_change(void *); static void ip_drain_locked(void); +static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ +static VNET_DEFINE(int, nipq); /* Total # of reass queues */ +#define V_maxnipq VNET(maxnipq) +#define V_nipq VNET(nipq) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, &VNET_NAME(nipq), 0, "Current number of IPv4 fragment reassembly queue entries"); +static VNET_DEFINE(int, maxfragsperpacket); +#define V_maxfragsperpacket VNET(maxfragsperpacket) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, &VNET_NAME(maxfragsperpacket), 0, "Maximum number of IPv4 fragments allowed per packet"); @@ -217,6 +205,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, m #endif #ifdef IPSTEALTH +VNET_DEFINE(int, ipstealth); SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW, &VNET_NAME(ipstealth), 0, "IP stealth mode, no TTL decrementation on forwarding"); @@ -1740,6 +1729,11 @@ makedummy: * locking. This code remains in ip_input.c as ip_mroute.c is optionally * compiled. */ +static VNET_DEFINE(int, ip_rsvp_on); +VNET_DEFINE(struct socket *, ip_rsvpd); + +#define V_ip_rsvp_on VNET(ip_rsvp_on) + int ip_rsvp_init(struct socket *so) { Modified: stable/8/sys/netinet/ip_var.h ============================================================================== --- stable/8/sys/netinet/ip_var.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_var.h Thu May 6 06:44:19 2010 (r207695) @@ -181,9 +181,13 @@ VNET_DECLARE(int, ipforwarding); /* ip #ifdef IPSTEALTH VNET_DECLARE(int, ipstealth); /* stealth forwarding */ #endif -VNET_DECLARE(int, rsvp_on); +extern u_char ip_protox[]; VNET_DECLARE(struct socket *, ip_rsvpd); /* reservation protocol daemon*/ VNET_DECLARE(struct socket *, ip_mrouter); /* multicast routing daemon */ +extern int (*legal_vif_num)(int); +extern u_long (*ip_mcast_src)(int); +VNET_DECLARE(int, rsvp_on); +extern struct pr_usrreqs rip_usrreqs; #define V_ipstat VNET(ipstat) #define V_ip_id VNET(ip_id) @@ -192,14 +196,9 @@ VNET_DECLARE(struct socket *, ip_mrouter #ifdef IPSTEALTH #define V_ipstealth VNET(ipstealth) #endif -#define V_rsvp_on VNET(rsvp_on) #define V_ip_rsvpd VNET(ip_rsvpd) #define V_ip_mrouter VNET(ip_mrouter) - -extern u_char ip_protox[]; -extern int (*legal_vif_num)(int); -extern u_long (*ip_mcast_src)(int); -extern struct pr_usrreqs rip_usrreqs; +#define V_rsvp_on VNET(rsvp_on) void inp_freemoptions(struct ip_moptions *); int inp_getmoptions(struct inpcb *, struct sockopt *); Modified: stable/8/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/8/sys/netinet/tcp_hostcache.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_hostcache.c Thu May 6 06:44:19 2010 (r207695) @@ -107,9 +107,9 @@ __FBSDID("$FreeBSD$"); #define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */ static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); -static VNET_DEFINE(struct callout, tcp_hc_callout); - #define V_tcp_hostcache VNET(tcp_hostcache) + +static VNET_DEFINE(struct callout, tcp_hc_callout); #define V_tcp_hc_callout VNET(tcp_hc_callout) static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_input.c Thu May 6 06:44:19 2010 (r207695) @@ -99,20 +99,6 @@ __FBSDID("$FreeBSD$"); static const int tcprexmtthresh = 3; VNET_DEFINE(struct tcpstat, tcpstat); -VNET_DEFINE(int, blackhole); -VNET_DEFINE(int, tcp_delack_enabled); -VNET_DEFINE(int, drop_synfin); -VNET_DEFINE(int, tcp_do_rfc3042); -VNET_DEFINE(int, tcp_do_rfc3390); -VNET_DEFINE(int, tcp_do_ecn); -VNET_DEFINE(int, tcp_ecn_maxretries); -VNET_DEFINE(int, tcp_insecure_rst); -VNET_DEFINE(int, tcp_do_autorcvbuf); -VNET_DEFINE(int, tcp_autorcvbuf_inc); -VNET_DEFINE(int, tcp_autorcvbuf_max); -VNET_DEFINE(int, tcp_do_rfc3465); -VNET_DEFINE(int, tcp_abc_l_var); - SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(tcpstat), tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); @@ -122,56 +108,79 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_ &tcp_log_in_vain, 0, "Log all incoming TCP segments to closed ports"); +VNET_DEFINE(int, blackhole) = 0; +#define V_blackhole VNET(blackhole) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW, &VNET_NAME(blackhole), 0, "Do not send RST on segments to closed ports"); +VNET_DEFINE(int, tcp_delack_enabled) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, delayed_ack, CTLFLAG_RW, &VNET_NAME(tcp_delack_enabled), 0, "Delay ACK to try and piggyback it onto a data packet"); +VNET_DEFINE(int, drop_synfin) = 0; +#define V_drop_synfin VNET(drop_synfin) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW, &VNET_NAME(drop_synfin), 0, "Drop TCP packets with SYN+FIN set"); +VNET_DEFINE(int, tcp_do_rfc3042) = 1; +#define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3042), 0, "Enable RFC 3042 (Limited Transmit)"); +VNET_DEFINE(int, tcp_do_rfc3390) = 1; +#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3390), 0, "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); +VNET_DEFINE(int, tcp_do_rfc3465) = 1; +#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3465), 0, "Enable RFC 3465 (Appropriate Byte Counting)"); +VNET_DEFINE(int, tcp_abc_l_var) = 2; +#define V_tcp_abc_l_var VNET(tcp_abc_l_var) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_RW, &VNET_NAME(tcp_abc_l_var), 2, "Cap the max cwnd increment during slow-start to this number of segments"); SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN"); +VNET_DEFINE(int, tcp_do_ecn) = 0; SYSCTL_VNET_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_do_ecn), 0, "TCP ECN support"); +VNET_DEFINE(int, tcp_ecn_maxretries) = 1; SYSCTL_VNET_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, CTLFLAG_RW, &VNET_NAME(tcp_ecn_maxretries), 0, "Max retries before giving up on ECN"); +VNET_DEFINE(int, tcp_insecure_rst) = 0; +#define V_tcp_insecure_rst VNET(tcp_insecure_rst) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_RW, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); +VNET_DEFINE(int, tcp_do_autorcvbuf) = 1; +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW, &VNET_NAME(tcp_do_autorcvbuf), 0, "Enable automatic receive buffer sizing"); +VNET_DEFINE(int, tcp_autorcvbuf_inc) = 16*1024; +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_inc, CTLFLAG_RW, &VNET_NAME(tcp_autorcvbuf_inc), 0, "Incrementor step size of automatic receive buffer"); +VNET_DEFINE(int, tcp_autorcvbuf_max) = 256*1024; +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_max, CTLFLAG_RW, &VNET_NAME(tcp_autorcvbuf_max), 0, "Max size of automatic receive buffer"); @@ -181,8 +190,8 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, read &tcp_read_locking, 0, "Enable read locking strategy"); VNET_DEFINE(struct inpcbhead, tcb); -VNET_DEFINE(struct inpcbinfo, tcbinfo); #define tcb6 tcb /* for KAME src sync over BSD*'s */ +VNET_DEFINE(struct inpcbinfo, tcbinfo); static void tcp_dooptions(struct tcpopt *, u_char *, int, int); static void tcp_do_segment(struct mbuf *, struct tcphdr *, Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_output.c Thu May 6 06:44:19 2010 (r207695) @@ -87,43 +87,46 @@ __FBSDID("$FreeBSD$"); extern struct mbuf *m_copypack(); #endif -VNET_DEFINE(int, path_mtu_discovery); -VNET_DEFINE(int, ss_fltsz); -VNET_DEFINE(int, ss_fltsz_local); -VNET_DEFINE(int, tcp_do_newreno); -VNET_DEFINE(int, tcp_do_tso); -VNET_DEFINE(int, tcp_do_autosndbuf); -VNET_DEFINE(int, tcp_autosndbuf_inc); -VNET_DEFINE(int, tcp_autosndbuf_max); - +VNET_DEFINE(int, path_mtu_discovery) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, path_mtu_discovery, CTLFLAG_RW, &VNET_NAME(path_mtu_discovery), 1, "Enable Path MTU Discovery"); +VNET_DEFINE(int, ss_fltsz) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW, &VNET_NAME(ss_fltsz), 1, "Slow start flight size"); +VNET_DEFINE(int, ss_fltsz_local) = 4; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, CTLFLAG_RW, &VNET_NAME(ss_fltsz_local), 1, "Slow start flight size for local networks"); +VNET_DEFINE(int, tcp_do_newreno) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, newreno, CTLFLAG_RW, &VNET_NAME(tcp_do_newreno), 0, "Enable NewReno Algorithms"); +VNET_DEFINE(int, tcp_do_tso) = 1; +#define V_tcp_do_tso VNET(tcp_do_tso) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW, &VNET_NAME(tcp_do_tso), 0, "Enable TCP Segmentation Offload"); +VNET_DEFINE(int, tcp_do_autosndbuf) = 1; +#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto, CTLFLAG_RW, &VNET_NAME(tcp_do_autosndbuf), 0, "Enable automatic send buffer sizing"); +VNET_DEFINE(int, tcp_autosndbuf_inc) = 8*1024; +#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_inc, CTLFLAG_RW, &VNET_NAME(tcp_autosndbuf_inc), 0, "Incrementor step size of automatic send buffer"); +VNET_DEFINE(int, tcp_autosndbuf_max) = 256*1024; +#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_RW, &VNET_NAME(tcp_autosndbuf_max), 0, "Max size of automatic send buffer"); Modified: stable/8/sys/netinet/tcp_reass.c ============================================================================== --- stable/8/sys/netinet/tcp_reass.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_reass.c Thu May 6 06:44:19 2010 (r207695) @@ -74,30 +74,28 @@ __FBSDID("$FreeBSD$"); #include #endif /* TCPDEBUG */ -static VNET_DEFINE(int, tcp_reass_maxseg); -VNET_DEFINE(int, tcp_reass_qsize); -static VNET_DEFINE(int, tcp_reass_maxqlen); -static VNET_DEFINE(int, tcp_reass_overflows); - -#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) -#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) -#define V_tcp_reass_overflows VNET(tcp_reass_overflows) - SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); +static VNET_DEFINE(int, tcp_reass_maxseg) = 0; +#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, &VNET_NAME(tcp_reass_maxseg), 0, "Global maximum number of TCP Segments in Reassembly Queue"); +VNET_DEFINE(int, tcp_reass_qsize) = 0; SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD, &VNET_NAME(tcp_reass_qsize), 0, "Global number of TCP Segments currently in Reassembly Queue"); +static VNET_DEFINE(int, tcp_reass_maxqlen) = 48; +#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxqlen, CTLFLAG_RW, &VNET_NAME(tcp_reass_maxqlen), 0, "Maximum number of TCP Segments per individual Reassembly Queue"); +static VNET_DEFINE(int, tcp_reass_overflows) = 0; +#define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, &VNET_NAME(tcp_reass_overflows), 0, "Global number of TCP Segment Reassembly Queue Overflows"); @@ -117,11 +115,6 @@ void tcp_reass_init(void) { - V_tcp_reass_maxseg = 0; - V_tcp_reass_qsize = 0; - V_tcp_reass_maxqlen = 48; - V_tcp_reass_overflows = 0; - V_tcp_reass_maxseg = nmbclusters / 16; TUNABLE_INT_FETCH("net.inet.tcp.reass.maxsegments", &V_tcp_reass_maxseg); Modified: stable/8/sys/netinet/tcp_sack.c ============================================================================== --- stable/8/sys/netinet/tcp_sack.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_sack.c Thu May 6 06:44:19 2010 (r207695) @@ -123,29 +123,28 @@ __FBSDID("$FreeBSD$"); #include VNET_DECLARE(struct uma_zone *, sack_hole_zone); -VNET_DEFINE(int, tcp_do_sack); -VNET_DEFINE(int, tcp_sack_maxholes); -VNET_DEFINE(int, tcp_sack_globalmaxholes); -VNET_DEFINE(int, tcp_sack_globalholes); - #define V_sack_hole_zone VNET(sack_hole_zone) -#define V_tcp_do_sack VNET(tcp_do_sack) -#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) -#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) -#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK"); +VNET_DEFINE(int, tcp_do_sack) = 1; +#define V_tcp_do_sack VNET(tcp_do_sack) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_do_sack), 0, "Enable/Disable TCP SACK support"); +VNET_DEFINE(int, tcp_sack_maxholes) = 128; +#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_RW, &VNET_NAME(tcp_sack_maxholes), 0, "Maximum number of TCP SACK holes allowed per connection"); +VNET_DEFINE(int, tcp_sack_globalmaxholes) = 65536; +#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxholes, CTLFLAG_RW, &VNET_NAME(tcp_sack_globalmaxholes), 0, "Global maximum number of TCP SACK holes"); +VNET_DEFINE(int, tcp_sack_globalholes) = 0; +#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalholes, CTLFLAG_RD, &VNET_NAME(tcp_sack_globalholes), 0, "Global number of TCP SACK holes currently allocated"); Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_subr.c Thu May 6 06:44:19 2010 (r207695) @@ -111,28 +111,10 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(int, tcp_mssdflt); +VNET_DEFINE(int, tcp_mssdflt) = TCP_MSS; #ifdef INET6 -VNET_DEFINE(int, tcp_v6mssdflt); +VNET_DEFINE(int, tcp_v6mssdflt) = TCP6_MSS; #endif -VNET_DEFINE(int, tcp_minmss); -VNET_DEFINE(int, tcp_do_rfc1323); - -static VNET_DEFINE(int, icmp_may_rst); -static VNET_DEFINE(int, tcp_isn_reseed_interval); -static VNET_DEFINE(int, tcp_inflight_enable); -static VNET_DEFINE(int, tcp_inflight_rttthresh); -static VNET_DEFINE(int, tcp_inflight_min); -static VNET_DEFINE(int, tcp_inflight_max); -static VNET_DEFINE(int, tcp_inflight_stab); - -#define V_icmp_may_rst VNET(icmp_may_rst) -#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) -#define V_tcp_inflight_enable VNET(tcp_inflight_enable) -#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) -#define V_tcp_inflight_min VNET(tcp_inflight_min) -#define V_tcp_inflight_max VNET(tcp_inflight_max) -#define V_tcp_inflight_stab VNET(tcp_inflight_stab) static int sysctl_net_inet_tcp_mss_check(SYSCTL_HANDLER_ARGS) @@ -194,10 +176,12 @@ vnet_sysctl_msec_to_ticks(SYSCTL_HANDLER * with packet generation and sending. Set to zero to disable MINMSS * checking. This setting prevents us from sending too small packets. */ +VNET_DEFINE(int, tcp_minmss) = TCP_MINMSS; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, minmss, CTLFLAG_RW, &VNET_NAME(tcp_minmss), 0, "Minmum TCP Maximum Segment Size"); +VNET_DEFINE(int, tcp_do_rfc1323) = 1; SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc1323), 0, "Enable rfc1323 (high performance TCP) extensions"); @@ -217,10 +201,14 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); +static VNET_DEFINE(int, icmp_may_rst) = 1; +#define V_icmp_may_rst VNET(icmp_may_rst) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, &VNET_NAME(icmp_may_rst), 0, "Certain ICMP unreachable messages may abort connections in SYN_SENT"); +static VNET_DEFINE(int, tcp_isn_reseed_interval) = 0; +#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW, &VNET_NAME(tcp_isn_reseed_interval), 0, "Seconds between reseeding of ISN secret"); @@ -233,6 +221,8 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, SYSCTL_NODE(_net_inet_tcp, OID_AUTO, inflight, CTLFLAG_RW, 0, "TCP inflight data limiting"); +static VNET_DEFINE(int, tcp_inflight_enable) = 1; +#define V_tcp_inflight_enable VNET(tcp_inflight_enable) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_inflight_enable), 0, "Enable automatic TCP inflight data limiting"); @@ -242,19 +232,27 @@ SYSCTL_INT(_net_inet_tcp_inflight, OID_A &tcp_inflight_debug, 0, "Debug TCP inflight calculations"); +static VNET_DEFINE(int, tcp_inflight_rttthresh); +#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) SYSCTL_VNET_PROC(_net_inet_tcp_inflight, OID_AUTO, rttthresh, CTLTYPE_INT|CTLFLAG_RW, &VNET_NAME(tcp_inflight_rttthresh), 0, vnet_sysctl_msec_to_ticks, "I", "RTT threshold below which inflight will deactivate itself"); +static VNET_DEFINE(int, tcp_inflight_min) = 6144; +#define V_tcp_inflight_min VNET(tcp_inflight_min) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, min, CTLFLAG_RW, &VNET_NAME(tcp_inflight_min), 0, "Lower-bound for TCP inflight window"); +static VNET_DEFINE(int, tcp_inflight_max) = TCP_MAXWIN << TCP_MAX_WINSHIFT; +#define V_tcp_inflight_max VNET(tcp_inflight_max) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, max, CTLFLAG_RW, &VNET_NAME(tcp_inflight_max), 0, "Upper-bound for TCP inflight window"); +static VNET_DEFINE(int, tcp_inflight_stab) = 20; +#define V_tcp_inflight_stab VNET(tcp_inflight_stab) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, stab, CTLFLAG_RW, &VNET_NAME(tcp_inflight_stab), 0, "Inflight Algorithm Stabilization 20 = 2 packets"); @@ -323,53 +321,6 @@ tcp_init(void) { int hashsize; - V_blackhole = 0; - V_tcp_delack_enabled = 1; - V_drop_synfin = 0; - V_tcp_do_rfc3042 = 1; - V_tcp_do_rfc3390 = 1; - V_tcp_do_ecn = 0; - V_tcp_ecn_maxretries = 1; - V_tcp_insecure_rst = 0; - V_tcp_do_autorcvbuf = 1; - V_tcp_autorcvbuf_inc = 16*1024; - V_tcp_autorcvbuf_max = 256*1024; - V_tcp_do_rfc3465 = 1; - V_tcp_abc_l_var = 2; - - V_tcp_mssdflt = TCP_MSS; -#ifdef INET6 - V_tcp_v6mssdflt = TCP6_MSS; -#endif - V_tcp_minmss = TCP_MINMSS; - V_tcp_do_rfc1323 = 1; - V_icmp_may_rst = 1; - V_tcp_isn_reseed_interval = 0; - V_tcp_inflight_enable = 1; - V_tcp_inflight_min = 6144; - V_tcp_inflight_max = TCP_MAXWIN << TCP_MAX_WINSHIFT; - V_tcp_inflight_stab = 20; - - V_path_mtu_discovery = 1; - V_ss_fltsz = 1; - V_ss_fltsz_local = 4; - V_tcp_do_newreno = 1; - V_tcp_do_tso = 1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 6 06:44:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AEB12106576C; Thu, 6 May 2010 06:44:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 141ED8FC1C; Thu, 6 May 2010 06:44: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 o466iQdY092745; Thu, 6 May 2010 06:44:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o466iQP9092743; Thu, 6 May 2010 06:44:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005060644.o466iQP9092743@svn.freebsd.org> From: Alexander Motin Date: Thu, 6 May 2010 06:44: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: r207696 - head/sys/dev/mvs 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, 06 May 2010 06:44:27 -0000 Author: mav Date: Thu May 6 06:44:26 2010 New Revision: 207696 URL: http://svn.freebsd.org/changeset/base/207696 Log: Fix polled operation. Now it is possible to dump kernel via mvs(4). Modified: head/sys/dev/mvs/mvs.c Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Thu May 6 06:44:19 2010 (r207695) +++ head/sys/dev/mvs/mvs.c Thu May 6 06:44:26 2010 (r207696) @@ -2168,6 +2168,6 @@ mvspoll(struct cam_sim *sim) arg.arg = ch->dev; arg.cause = 2; /* XXX */ - mvs_ch_intr(arg.arg); + mvs_ch_intr(&arg); } From owner-svn-src-all@FreeBSD.ORG Thu May 6 09:52:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55DF71065672; Thu, 6 May 2010 09:52:33 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44F538FC1F; Thu, 6 May 2010 09:52: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 o469qXgl034306; Thu, 6 May 2010 09:52:33 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o469qWB1034305; Thu, 6 May 2010 09:52:32 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005060952.o469qWB1034305@svn.freebsd.org> From: Marko Zec Date: Thu, 6 May 2010 09:52:32 +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: r207697 - stable/8/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, 06 May 2010 09:52:33 -0000 Author: zec Date: Thu May 6 09:52:32 2010 New Revision: 207697 URL: http://svn.freebsd.org/changeset/base/207697 Log: MFC r207475: Remove a redundant variable assignment. Reviewed by: bz, rwatson Modified: stable/8/sys/kern/uipc_mbuf.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/uipc_mbuf.c ============================================================================== --- stable/8/sys/kern/uipc_mbuf.c Thu May 6 06:44:26 2010 (r207696) +++ stable/8/sys/kern/uipc_mbuf.c Thu May 6 09:52:32 2010 (r207697) @@ -948,9 +948,8 @@ m_adj(struct mbuf *mp, int req_len) len = 0; } } - m = mp; if (mp->m_flags & M_PKTHDR) - m->m_pkthdr.len -= (req_len - len); + mp->m_pkthdr.len -= (req_len - len); } else { /* * Trim from tail. Scan the mbuf chain, From owner-svn-src-all@FreeBSD.ORG Thu May 6 09:54:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DDF81065674; Thu, 6 May 2010 09:54:01 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBC68FC08; Thu, 6 May 2010 09:54:01 +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 o469s1af034687; Thu, 6 May 2010 09:54:01 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o469s1RH034685; Thu, 6 May 2010 09:54:01 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005060954.o469s1RH034685@svn.freebsd.org> From: Marko Zec Date: Thu, 6 May 2010 09:54:01 +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: r207698 - stable/8/sys/netgraph 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, 06 May 2010 09:54:01 -0000 Author: zec Date: Thu May 6 09:54:01 2010 New Revision: 207698 URL: http://svn.freebsd.org/changeset/base/207698 Log: MFC r207572: When destroying a vnet, shut down all netgraph nodes tied to that vnet before proceeding with dismantling other protocol domains. This change only affects options VIMAGE builds. Reviewed by: julian, bz Modified: stable/8/sys/netgraph/ng_base.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netgraph/ng_base.c ============================================================================== --- stable/8/sys/netgraph/ng_base.c Thu May 6 09:52:32 2010 (r207697) +++ stable/8/sys/netgraph/ng_base.c Thu May 6 09:54:01 2010 (r207698) @@ -3067,28 +3067,42 @@ ng_mod_event(module_t mod, int event, vo static void vnet_netgraph_uninit(const void *unused __unused) { -#if 0 - node_p node, last_killed = NULL; + node_p node = NULL, last_killed = NULL; + int i; + + do { + /* Find a node to kill */ + mtx_lock(&ng_namehash_mtx); + for (i = 0; i < NG_NAME_HASH_SIZE; i++) { + LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) { + if (node != &ng_deadnode) { + NG_NODE_REF(node); + break; + } + } + if (node != NULL) + break; + } + mtx_unlock(&ng_namehash_mtx); - /* XXXRW: utterly bogus. */ - while ((node = LIST_FIRST(&V_ng_allnodes)) != NULL) { - if (node == last_killed) { - /* This should never happen */ - node->nd_flags |= NGF_REALLY_DIE; - printf("netgraph node %s needs NGF_REALLY_DIE\n", - node->nd_name); + /* Attempt to kill it only if it is a regular node */ + if (node != NULL) { + if (node == last_killed) { + /* This should never happen */ + printf("ng node %s needs" + "NGF_REALLY_DIE\n", node->nd_name); + if (node->nd_flags & NGF_REALLY_DIE) + panic("ng node %s won't die", + node->nd_name); + node->nd_flags |= NGF_REALLY_DIE; + } ng_rmnode(node, NULL, NULL, 0); - /* This must never happen */ - if (node == LIST_FIRST(&V_ng_allnodes)) - panic("netgraph node %s won't die", - node->nd_name); + NG_NODE_UNREF(node); + last_killed = node; } - ng_rmnode(node, NULL, NULL, 0); - last_killed = node; - } -#endif + } while (node != NULL); } -VNET_SYSUNINIT(vnet_netgraph_uninit, SI_SUB_NETGRAPH, SI_ORDER_ANY, +VNET_SYSUNINIT(vnet_netgraph_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, vnet_netgraph_uninit, NULL); #endif /* VIMAGE */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 12:37:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0C111065672; Thu, 6 May 2010 12:37:01 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA838FC0A; Thu, 6 May 2010 12:37:01 +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 o46Cb1T0076451; Thu, 6 May 2010 12:37:01 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Cb1se076439; Thu, 6 May 2010 12:37:01 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005061237.o46Cb1se076439@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 6 May 2010 12:37:01 +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: r207699 - in stable/7: sbin/ifconfig share/man/man4 sys/amd64/amd64 sys/dev/aic7xxx sys/dev/ath sys/dev/ath/ath_hal/ar5210 sys/dev/ct sys/dev/mly 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, 06 May 2010 12:37:01 -0000 Author: gavin Date: Thu May 6 12:37:01 2010 New Revision: 207699 URL: http://svn.freebsd.org/changeset/base/207699 Log: Merge r202161 from head: Spell "Hz" correctly wherever it is user-visible. PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Modified: stable/7/sbin/ifconfig/ifieee80211.c stable/7/share/man/man4/ath.4 stable/7/share/man/man4/cpufreq.4 stable/7/share/man/man4/vge.4 stable/7/sys/amd64/amd64/local_apic.c stable/7/sys/dev/aic7xxx/aic79xx_pci.c stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c stable/7/sys/dev/ath/if_ath.c stable/7/sys/dev/ct/ct_isa.c stable/7/sys/dev/mly/mly.c stable/7/sys/i386/i386/local_apic.c Directory Properties: stable/7/sbin/ifconfig/ (props changed) stable/7/share/man/man4/ (props changed) 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/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/7/sbin/ifconfig/ifieee80211.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sbin/ifconfig/ifieee80211.c Thu May 6 12:37:01 2010 (r207699) @@ -2259,7 +2259,7 @@ print_chaninfo(const struct ieee80211_ch { char buf[14]; - printf("Channel %3u : %u%c Mhz%-14.14s", + printf("Channel %3u : %u%c MHz%-14.14s", ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', get_chaninfo(c, verb, buf, sizeof(buf))); @@ -2338,7 +2338,7 @@ list_channels(int s, int allchans) static void print_txpow(const struct ieee80211_channel *c) { - printf("Channel %3u : %u Mhz %3.1f reg %2d ", + printf("Channel %3u : %u MHz %3.1f reg %2d ", c->ic_ieee, c->ic_freq, c->ic_maxpower/2., c->ic_maxregpower); } @@ -2800,7 +2800,7 @@ ieee80211_status(int s) c = getcurchan(s); if (c->ic_freq != IEEE80211_CHAN_ANY) { char buf[14]; - printf(" channel %d (%u Mhz%s)", c->ic_ieee, c->ic_freq, + printf(" channel %d (%u MHz%s)", c->ic_ieee, c->ic_freq, get_chaninfo(c, 1, buf, sizeof(buf))); } else if (verbose) printf(" channel UNDEF"); Modified: stable/7/share/man/man4/ath.4 ============================================================================== --- stable/7/share/man/man4/ath.4 Thu May 6 09:54:01 2010 (r207698) +++ stable/7/share/man/man4/ath.4 Thu May 6 12:37:01 2010 (r207699) @@ -224,7 +224,7 @@ This should not happen. An invalid transmit rate was specified for an outgoing frame. The frame is discarded. This should not happen. -.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)" +.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)" The Atheros Hardware Access Layer was unable to reset the hardware when switching channels during scanning. This should not happen. Modified: stable/7/share/man/man4/cpufreq.4 ============================================================================== --- stable/7/share/man/man4/cpufreq.4 Thu May 6 09:54:01 2010 (r207698) +++ stable/7/share/man/man4/cpufreq.4 Thu May 6 12:37:01 2010 (r207699) @@ -234,7 +234,7 @@ The driver should set unknown or irrelev All the following elements for each setting should be returned: .Bd -literal struct cf_setting { - int freq; /* CPU clock in Mhz or 100ths of a percent. */ + int freq; /* CPU clock in MHz or 100ths of a percent. */ int volts; /* Voltage in mV. */ int power; /* Power consumed in mW. */ int lat; /* Transition latency in us. */ Modified: stable/7/share/man/man4/vge.4 ============================================================================== --- stable/7/share/man/man4/vge.4 Thu May 6 09:54:01 2010 (r207698) +++ stable/7/share/man/man4/vge.4 Thu May 6 12:37:01 2010 (r207699) @@ -58,7 +58,7 @@ driver provides support for various NICs based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity Family Gigabit Ethernet controller chips. .Pp -The VT6120/VT6122 is a 33/66Mhz 64-bit PCI device which combines a tri-speed +The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed MAC with an integrated 10/100/1000 copper PHY. (Some older cards use an external PHY.) The VT6130/VT6132 is the PCI express version of Velocity family. Modified: stable/7/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/7/sys/amd64/amd64/local_apic.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/amd64/amd64/local_apic.c Thu May 6 12:37:01 2010 (r207699) @@ -467,7 +467,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* Modified: stable/7/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/7/sys/dev/aic7xxx/aic79xx_pci.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/aic7xxx/aic79xx_pci.c Thu May 6 12:37:01 2010 (r207699) @@ -248,10 +248,10 @@ static const char *pci_bus_modes[] = "PCI bus mode unknown", "PCI bus mode unknown", "PCI bus mode unknown", - "PCI-X 101-133Mhz", - "PCI-X 67-100Mhz", - "PCI-X 50-66Mhz", - "PCI 33 or 66Mhz" + "PCI-X 101-133MHz", + "PCI-X 67-100MHz", + "PCI-X 50-66MHz", + "PCI 33 or 66MHz" }; #define TESTMODE 0x00000800ul Modified: stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Thu May 6 12:37:01 2010 (r207699) @@ -15,6 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: ar5210_reset.c,v 1.8 2008/11/11 17:25:16 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -86,7 +87,7 @@ ar5210Reset(struct ath_hal *ah, HAL_OPMO if ((chan->channelFlags & CHANNEL_5GHZ) == 0) { /* Only 11a mode */ - HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5Ghz\n", __func__); + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5GHz\n", __func__); FAIL(HAL_EINVAL); } /* Modified: stable/7/sys/dev/ath/if_ath.c ============================================================================== --- stable/7/sys/dev/ath/if_ath.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/ath/if_ath.c Thu May 6 12:37:01 2010 (r207699) @@ -4934,7 +4934,7 @@ ath_chan_set(struct ath_softc *sc, struc ath_stoprecv(sc); /* turn off frame recv */ if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status)) { if_printf(ic->ic_ifp, "%s: unable to reset " - "channel %u (%u Mhz, flags 0x%x hal flags 0x%x), " + "channel %u (%u MHz, flags 0x%x hal flags 0x%x), " "hal status %u\n", __func__, ieee80211_chan2ieee(ic, chan), chan->ic_freq, chan->ic_flags, hchan.channelFlags, status); Modified: stable/7/sys/dev/ct/ct_isa.c ============================================================================== --- stable/7/sys/dev/ct/ct_isa.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/ct/ct_isa.c Thu May 6 12:37:01 2010 (r207699) @@ -316,7 +316,7 @@ ct_isa_attach(device_t dev) break; } #if 0 - printf("%s: chiprev %s chipclk %d Mhz\n", + printf("%s: chiprev %s chipclk %d MHz\n", slp->sl_dev.dv_xname, s, ct->sc_chipclk); #endif Modified: stable/7/sys/dev/mly/mly.c ============================================================================== --- stable/7/sys/dev/mly/mly.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/mly/mly.c Thu May 6 12:37:01 2010 (r207699) @@ -2528,7 +2528,7 @@ mly_describe_controller(struct mly_softc mly_describe_code(mly_table_memorytype, mi->memory_type), mi->memory_parity ? "+parity": "",mi->memory_ecc ? "+ECC": "", mi->cache_size); - mly_printf(sc, "CPU: %s @ %dMHZ\n", + mly_printf(sc, "CPU: %s @ %dMHz\n", mly_describe_code(mly_table_cputype, mi->cpu[0].type), mi->cpu[0].speed); if (mi->l2cache_size != 0) mly_printf(sc, "%dKB L2 cache\n", mi->l2cache_size); Modified: stable/7/sys/i386/i386/local_apic.c ============================================================================== --- stable/7/sys/i386/i386/local_apic.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/i386/i386/local_apic.c Thu May 6 12:37:01 2010 (r207699) @@ -470,7 +470,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* From owner-svn-src-all@FreeBSD.ORG Thu May 6 15:52:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE8F21065675; Thu, 6 May 2010 15:52:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BF16D8FC12; Thu, 6 May 2010 15:52: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 o46Fq8fD019246; Thu, 6 May 2010 15:52:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Fq809019245; Thu, 6 May 2010 15:52:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005061552.o46Fq809019245@svn.freebsd.org> From: Alan Cox Date: Thu, 6 May 2010 15:52: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: r207700 - 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, 06 May 2010 15:52:08 -0000 Author: alc Date: Thu May 6 15:52:08 2010 New Revision: 207700 URL: http://svn.freebsd.org/changeset/base/207700 Log: Eliminate a small bit of unneeded code from kern_sendfile(): While kern_sendfile() is running, the file's vm object can't be destroyed because kern_sendfile() increments the vm object's reference count. (Once kern_sendfile() decrements the reference count and returns, the vm object can, however, be destroyed. So, sf_buf_mext() must handle the case where the vm object is destroyed.) Reviewed by: kib Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu May 6 12:37:01 2010 (r207699) +++ head/sys/kern/uipc_syscalls.c Thu May 6 15:52:08 2010 (r207700) @@ -2139,14 +2139,9 @@ retry_space: (mnw ? SFB_NOWAIT : SFB_CATCH))) == NULL) { mbstat.sf_allocfail++; vm_page_lock(pg); - vm_page_lock_queues(); vm_page_unwire(pg, 0); - /* - * XXX: Not same check as above!? - */ - if (pg->wire_count == 0 && pg->object == NULL) - vm_page_free(pg); - vm_page_unlock_queues(); + KASSERT(pg->object != NULL, + ("kern_sendfile: object disappeared")); vm_page_unlock(pg); error = (mnw ? EAGAIN : EINTR); break; From owner-svn-src-all@FreeBSD.ORG Thu May 6 16:37:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C2C9106566B; Thu, 6 May 2010 16:37:51 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2C76B8FC18; Thu, 6 May 2010 16:37: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 o46GbpxG029343; Thu, 6 May 2010 16:37:51 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46GbpIU029341; Thu, 6 May 2010 16:37:51 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201005061637.o46GbpIU029341@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 6 May 2010 16:37: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: r207701 - head/usr.bin/calendar 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, 06 May 2010 16:37:51 -0000 Author: ache Date: Thu May 6 16:37:50 2010 New Revision: 207701 URL: http://svn.freebsd.org/changeset/base/207701 Log: Fix recent space skipping: 1) add missing (unsigned char) cast to ctype() macro 2) fix off-by-one error causing last letter always doubled Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Thu May 6 15:52:08 2010 (r207700) +++ head/usr.bin/calendar/io.c Thu May 6 16:37:50 2010 (r207701) @@ -155,8 +155,8 @@ cal(void) } /* Get rid of leading spaces (non-standard) */ - while (isspace(buf[0])) - memcpy(buf, buf + 1, strlen(buf) - 1); + while (isspace((unsigned char)buf[0])) + memcpy(buf, buf + 1, strlen(buf)); /* No tab in the line, then not a valid line */ if ((pp = strchr(buf, '\t')) == NULL) From owner-svn-src-all@FreeBSD.ORG Thu May 6 16:39:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 854451065673; Thu, 6 May 2010 16:39:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 74F378FC1C; Thu, 6 May 2010 16:39: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 o46GdhIL029772; Thu, 6 May 2010 16:39:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46GdhZC029766; Thu, 6 May 2010 16:39:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005061639.o46GdhZC029766@svn.freebsd.org> From: Alan Cox Date: Thu, 6 May 2010 16:39: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: r207702 - in head/sys: amd64/amd64 i386/i386 sparc64/sparc64 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: Thu, 06 May 2010 16:39:43 -0000 Author: alc Date: Thu May 6 16:39:43 2010 New Revision: 207702 URL: http://svn.freebsd.org/changeset/base/207702 Log: Push down the page queues lock inside of vm_page_free_toq() and pmap_page_is_mapped() in preparation for removing page queues locking around calls to vm_page_free(). Setting aside the assertion that calls pmap_page_is_mapped(), vm_page_free_toq() now acquires and holds the page queues lock just long enough to actually add or remove the page from the paging queues. Update vm_page_unhold() to reflect the above change. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu May 6 16:37:50 2010 (r207701) +++ head/sys/amd64/amd64/pmap.c Thu May 6 16:39:43 2010 (r207702) @@ -3961,16 +3961,15 @@ pmap_pvh_wired_mappings(struct md_page * boolean_t pmap_page_is_mapped(vm_page_t m) { - struct md_page *pvh; + boolean_t rv; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) return (FALSE); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (TAILQ_EMPTY(&m->md.pv_list)) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - return (!TAILQ_EMPTY(&pvh->pv_list)); - } else - return (TRUE); + vm_page_lock_queues(); + rv = !TAILQ_EMPTY(&m->md.pv_list) || + !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list); + vm_page_unlock_queues(); + return (rv); } /* Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu May 6 16:37:50 2010 (r207701) +++ head/sys/i386/i386/pmap.c Thu May 6 16:39:43 2010 (r207702) @@ -4125,16 +4125,15 @@ pmap_pvh_wired_mappings(struct md_page * boolean_t pmap_page_is_mapped(vm_page_t m) { - struct md_page *pvh; + boolean_t rv; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) return (FALSE); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (TAILQ_EMPTY(&m->md.pv_list)) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - return (!TAILQ_EMPTY(&pvh->pv_list)); - } else - return (TRUE); + vm_page_lock_queues(); + rv = !TAILQ_EMPTY(&m->md.pv_list) || + !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list); + vm_page_unlock_queues(); + return (rv); } /* Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu May 6 16:37:50 2010 (r207701) +++ head/sys/sparc64/sparc64/pmap.c Thu May 6 16:39:43 2010 (r207702) @@ -1834,14 +1834,19 @@ boolean_t pmap_page_is_mapped(vm_page_t m) { struct tte *tp; + boolean_t rv; + rv = FALSE; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) - return (FALSE); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + return (rv); + vm_page_lock_queues(); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) - if ((tp->tte_data & TD_PV) != 0) - return (TRUE); - return (FALSE); + if ((tp->tte_data & TD_PV) != 0) { + rv = TRUE; + break; + } + vm_page_unlock_queues(); + return (rv); } /* Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu May 6 16:37:50 2010 (r207701) +++ head/sys/vm/vm_page.c Thu May 6 16:39:43 2010 (r207702) @@ -563,11 +563,8 @@ vm_page_unhold(vm_page_t mem) vm_page_lock_assert(mem, MA_OWNED); --mem->hold_count; KASSERT(mem->hold_count >= 0, ("vm_page_unhold: hold count < 0!!!")); - if (mem->hold_count == 0 && VM_PAGE_INQUEUE2(mem, PQ_HOLD)) { - vm_page_lock_queues(); + if (mem->hold_count == 0 && VM_PAGE_INQUEUE2(mem, PQ_HOLD)) vm_page_free_toq(mem); - vm_page_unlock_queues(); - } } /* @@ -1448,10 +1445,11 @@ void vm_page_free_toq(vm_page_t m) { - if (VM_PAGE_GETQUEUE(m) != PQ_NONE) - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - KASSERT(!pmap_page_is_mapped(m), - ("vm_page_free_toq: freeing mapped page %p", m)); + if ((m->flags & PG_UNMANAGED) == 0) { + vm_page_lock_assert(m, MA_OWNED); + KASSERT(!pmap_page_is_mapped(m), + ("vm_page_free_toq: freeing mapped page %p", m)); + } PCPU_INC(cnt.v_tfree); if (m->busy || VM_PAGE_IS_FREE(m)) { @@ -1471,7 +1469,11 @@ vm_page_free_toq(vm_page_t m) * callback routine until after we've put the page on the * appropriate free queue. */ - vm_pageq_remove(m); + if (VM_PAGE_GETQUEUE(m) != PQ_NONE) { + vm_page_lock_queues(); + vm_pageq_remove(m); + vm_page_unlock_queues(); + } vm_page_remove(m); /* @@ -1493,9 +1495,10 @@ vm_page_free_toq(vm_page_t m) panic("vm_page_free: freeing wired page"); } if (m->hold_count != 0) { - vm_page_lock_assert(m, MA_OWNED); m->flags &= ~PG_ZERO; + vm_page_lock_queues(); vm_page_enqueue(PQ_HOLD, m); + vm_page_unlock_queues(); } else { /* * Restore the default memory attribute to the page. Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Thu May 6 16:37:50 2010 (r207701) +++ head/sys/vm/vm_page.h Thu May 6 16:39:43 2010 (r207702) @@ -107,7 +107,7 @@ struct vm_page { vm_pindex_t pindex; /* offset into object (O,Q) */ vm_paddr_t phys_addr; /* physical address of page */ struct md_page md; /* machine dependant stuff */ - uint8_t queue; /* page queue index */ + uint8_t queue; /* page queue index (P,Q) */ int8_t segind; u_short flags; /* see below */ uint8_t order; /* index of the buddy queue */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 16:54:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B67A1065673; Thu, 6 May 2010 16:54:47 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB2B8FC08; Thu, 6 May 2010 16:54: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 o46GslYA033120; Thu, 6 May 2010 16:54:47 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46GslfG033117; Thu, 6 May 2010 16:54:47 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201005061654.o46GslfG033117@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 6 May 2010 16:54: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: r207703 - head/usr.bin/calendar 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, 06 May 2010 16:54:47 -0000 Author: ache Date: Thu May 6 16:54:46 2010 New Revision: 207703 URL: http://svn.freebsd.org/changeset/base/207703 Log: While I am here, add more missing (unsigned char) casts to ctype() macros Modified: head/usr.bin/calendar/io.c head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Thu May 6 16:39:43 2010 (r207702) +++ head/usr.bin/calendar/io.c Thu May 6 16:54:46 2010 (r207703) @@ -163,7 +163,7 @@ cal(void) continue; /* Trim spaces in front of the tab */ - while (isspace(pp[-1])) + while (isspace((unsigned char)pp[-1])) pp--; p = *pp; Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Thu May 6 16:39:43 2010 (r207702) +++ head/usr.bin/calendar/parsedata.c Thu May 6 16:54:46 2010 (r207703) @@ -872,7 +872,7 @@ isonlydigits(char *s, int nostar) for (i = 0; s[i] != '\0'; i++) { if (nostar == 0 && s[i] == '*' && s[i + 1] == '\0') return 1; - if (!isdigit(s[i])) + if (!isdigit((unsigned char)s[i])) return (0); } return (1); From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:03:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2CF771065674; Thu, 6 May 2010 17:03:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9328FC17; Thu, 6 May 2010 17:03: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 o46H3Rxm035122; Thu, 6 May 2010 17:03:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46H3RbV035121; Thu, 6 May 2010 17:03:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005061703.o46H3RbV035121@svn.freebsd.org> From: Xin LI Date: Thu, 6 May 2010 17:03: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: r207704 - 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: Thu, 06 May 2010 17:03:28 -0000 Author: delphij Date: Thu May 6 17:03:27 2010 New Revision: 207704 URL: http://svn.freebsd.org/changeset/base/207704 Log: MFC r207382: bwn(4) will first appear in FreeBSD 8.1-RELEASE. Modified: stable/8/share/man/man4/bwn.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/bwn.4 ============================================================================== --- stable/8/share/man/man4/bwn.4 Thu May 6 16:54:46 2010 (r207703) +++ stable/8/share/man/man4/bwn.4 Thu May 6 17:03:27 2010 (r207704) @@ -123,7 +123,7 @@ ifconfig wlan create wlandev bwn0 ssid m The .Nm driver first appeared in -.Fx 8.0 . +.Fx 8.1 . .Sh AUTHORS .An -nosplit The From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:06:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2202E1065670; Thu, 6 May 2010 17:06:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 070C48FC0A; Thu, 6 May 2010 17:06: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 o46H6a1S035866; Thu, 6 May 2010 17:06:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46H6aVD035858; Thu, 6 May 2010 17:06:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005061706.o46H6aVD035858@svn.freebsd.org> From: Xin LI Date: Thu, 6 May 2010 17:06: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: r207705 - head/usr.bin/find 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, 06 May 2010 17:06:37 -0000 Author: delphij Date: Thu May 6 17:06:36 2010 New Revision: 207705 URL: http://svn.freebsd.org/changeset/base/207705 Log: Revert r207677 which is considered a violation of style(9). Pointed out by: bde Pointy hat to: delphij Modified: head/usr.bin/find/find.c head/usr.bin/find/function.c head/usr.bin/find/ls.c head/usr.bin/find/main.c head/usr.bin/find/misc.c head/usr.bin/find/operator.c head/usr.bin/find/option.c Modified: head/usr.bin/find/find.c ============================================================================== --- head/usr.bin/find/find.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/find.c Thu May 6 17:06:36 2010 (r207705) @@ -32,10 +32,15 @@ * 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. - * - * @(#)find.c 8.5 (Berkeley) 8/5/94 */ +#ifndef lint +#if 0 +static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94"; +#else +#endif +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/function.c ============================================================================== --- head/usr.bin/find/function.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/function.c Thu May 6 17:06:36 2010 (r207705) @@ -32,10 +32,14 @@ * 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. - * - * @(#)function.c 8.10 (Berkeley) 5/4/95 */ +#ifndef lint +#if 0 +static const char sccsid[] = "@(#)function.c 8.10 (Berkeley) 5/4/95"; +#endif +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/ls.c ============================================================================== --- head/usr.bin/find/ls.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/ls.c Thu May 6 17:06:36 2010 (r207705) @@ -29,10 +29,14 @@ * 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. - * - * @(#)ls.c 8.1 (Berkeley) 6/6/93 */ +#ifndef lint +#if 0 +static char sccsid[] = "@(#)ls.c 8.1 (Berkeley) 6/6/93"; +#endif +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/main.c ============================================================================== --- head/usr.bin/find/main.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/main.c Thu May 6 17:06:36 2010 (r207705) @@ -32,8 +32,6 @@ * 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. - * - * @(#)main.c 8.4 (Berkeley) 5/4/95 */ #ifndef lint @@ -42,6 +40,12 @@ char copyright[] = The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ +#ifndef lint +#if 0 +static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; +#endif +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/misc.c ============================================================================== --- head/usr.bin/find/misc.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/misc.c Thu May 6 17:06:36 2010 (r207705) @@ -32,10 +32,15 @@ * 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. - * - * @(#)misc.c 8.2 (Berkeley) 4/1/94 */ +#ifndef lint +#if 0 +static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/1/94"; +#else +#endif +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/operator.c ============================================================================== --- head/usr.bin/find/operator.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/operator.c Thu May 6 17:06:36 2010 (r207705) @@ -32,10 +32,14 @@ * 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. - * - * @(#)operator.c 8.1 (Berkeley) 6/6/93 */ +#ifndef lint +#if 0 +static char sccsid[] = "@(#)operator.c 8.1 (Berkeley) 6/6/93"; +#endif +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); Modified: head/usr.bin/find/option.c ============================================================================== --- head/usr.bin/find/option.c Thu May 6 17:03:27 2010 (r207704) +++ head/usr.bin/find/option.c Thu May 6 17:06:36 2010 (r207705) @@ -32,10 +32,14 @@ * 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. - * - * @(#)option.c 8.2 (Berkeley) 4/16/94 */ +#ifndef lint +/* +static char sccsid[] = "@(#)option.c 8.2 (Berkeley) 4/16/94"; +*/ +#endif /* not lint */ + #include __FBSDID("$FreeBSD$"); @@ -51,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include "find.h" -int typecompare(const void *, const void *); +static int typecompare(const void *, const void *); /* NB: the following table must be sorted lexically. */ /* Options listed with C++ comments are in gnu find, but not our find */ @@ -190,7 +194,7 @@ lookup_option(const char *name) sizeof(options)/sizeof(OPTION), sizeof(OPTION), typecompare)); } -int +static int typecompare(const void *a, const void *b) { return (strcmp(((const OPTION *)a)->name, ((const OPTION *)b)->name)); From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:26:55 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E1891065678; Thu, 6 May 2010 17:26:55 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3188FC13; Thu, 6 May 2010 17:26:54 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 7C794A69503; Fri, 7 May 2010 01:10:38 +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 Q6H155hFCKpI; Fri, 7 May 2010 01:10:31 +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 DDA9DA69502; Fri, 7 May 2010 01:10:28 +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=TqjoP4xBx7XONek7nGSl4ETTyNk1YCdYbm9dbrMi3f4mDXruS6ZT0eFdQhjLd4MMF a889VpgtunpcfMQgFvtnQ== Message-ID: <4BE2F7FF.9070902@delphij.net> Date: Thu, 06 May 2010 10:10:23 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100408 Thunderbird/3.0.4 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: Bruce Evans References: <201005052124.o45LOJES067973@svn.freebsd.org> <20100506105825.B18998@delplex.bde.org> In-Reply-To: <20100506105825.B18998@delplex.bde.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r207677 - head/usr.bin/find 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, 06 May 2010 17:26:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/05/05 18:00, Bruce Evans wrote: > On Wed, 5 May 2010, Xin LI wrote: > >> Log: >> Move SCCS tags to comments as they were already #if 0'ed. > > This is explicitly disrecommended in style(9): > > All VCS (version control system) revision identification in files > obtained from elsewhere should be maintained, including, where > applica- > ble, multiple IDs showing a file's history. In general, do not > edit for- > eign IDs or their infrastructure. Unless otherwise wrapped (such as > ``#if defined(LIBC_SCCS)''), enclose both in ``#if 0 ... #endif'' > to hide > any uncompilable bits and to keep the IDs out of object files. > Only add > ``From: '' in front of foreign VCS IDs if the file is renamed. Sorry for that. I thought that the style(9) approach actually creates more diffs but I'll obey these rule. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJL4vf/AAoJEATO+BI/yjfB8UQH/1RFuhSbshX6f7096nhQPsEv poHVmmYvEivhaE25PZkSSyBTVws4arN1IuBGerS2OKqBn+E3L09dHiSOxFG0qiTN wnNcfXZo/OuniSZIhcvBhkO0EgXsAhNacPDxrx+WjjQthnQPoM4bprVgfk6mHd+/ x8BXxxLwtbMawwf/QlA97/h2TpMab/Hmx4J3pV7dBLjDVzEmnPPiD0mMaqnffAW7 Z3nRNhydea014fUMUDr/wpIx0XOFJsIIHrPwWK5odQ1TUGxLqly4mBCwy//ydVLK bdUVnmU26j50zC6dQSvsO/tQEd4Katw/ITat2vLn5cA9i2KnWP4HMEGulGyW9JI= =19LB -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:29:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0955D1065675; Thu, 6 May 2010 17:29:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B7B208FC16; Thu, 6 May 2010 17:28: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 o46HSxLl040812; Thu, 6 May 2010 17:28:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46HSxvW040810; Thu, 6 May 2010 17:28:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005061728.o46HSxvW040810@svn.freebsd.org> From: Alan Cox Date: Thu, 6 May 2010 17:28: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: r207706 - 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: Thu, 06 May 2010 17:29:00 -0000 Author: alc Date: Thu May 6 17:28:59 2010 New Revision: 207706 URL: http://svn.freebsd.org/changeset/base/207706 Log: Update a comment to say that access to a page's wire count is now synchronized by the page lock. Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Thu May 6 17:06:36 2010 (r207705) +++ head/sys/vm/vm_page.h Thu May 6 17:28:59 2010 (r207706) @@ -113,7 +113,7 @@ struct vm_page { uint8_t order; /* index of the buddy queue */ uint8_t pool; u_short cow; /* page cow mapping count (Q) */ - u_int wire_count; /* wired down maps refs (Q) */ + u_int wire_count; /* wired down maps refs (P) */ short hold_count; /* page hold count (P) */ u_short oflags; /* page flags (O) */ u_char act_count; /* page usage count (Q) */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:43:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D24B51065675; Thu, 6 May 2010 17:43:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C2A998FC17; Thu, 6 May 2010 17:43: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 o46Hhf7X044168; Thu, 6 May 2010 17:43:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Hhfb7044164; Thu, 6 May 2010 17:43:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005061743.o46Hhfb7044164@svn.freebsd.org> From: Alan Cox Date: Thu, 6 May 2010 17:43: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: r207708 - in head/sys: kern 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: Thu, 06 May 2010 17:43:42 -0000 Author: alc Date: Thu May 6 17:43:41 2010 New Revision: 207708 URL: http://svn.freebsd.org/changeset/base/207708 Log: Remove page queues locking from all sf_buf_mext()-like functions. The page lock now suffices. Fix a couple nearby style violations. Modified: head/sys/kern/uipc_cow.c head/sys/kern/uipc_syscalls.c head/sys/net/bpf_zerocopy.c Modified: head/sys/kern/uipc_cow.c ============================================================================== --- head/sys/kern/uipc_cow.c Thu May 6 17:37:23 2010 (r207707) +++ head/sys/kern/uipc_cow.c Thu May 6 17:43:41 2010 (r207708) @@ -81,7 +81,6 @@ socow_iodone(void *addr, void *args) sf_buf_free(sf); /* remove COW mapping */ vm_page_lock(pp); - vm_page_lock_queues(); vm_page_cowclear(pp); vm_page_unwire(pp, 0); /* @@ -91,7 +90,6 @@ socow_iodone(void *addr, void *args) */ if (pp->wire_count == 0 && pp->object == NULL) vm_page_free(pp); - vm_page_unlock_queues(); vm_page_unlock(pp); socow_stats.iodone++; } @@ -147,9 +145,8 @@ socow_setup(struct mbuf *m0, struct uio * Allocate an sf buf */ sf = sf_buf_alloc(pp, SFB_CATCH); - if (!sf) { + if (sf == NULL) { vm_page_lock(pp); - vm_page_lock_queues(); vm_page_cowclear(pp); vm_page_unwire(pp, 0); /* @@ -159,7 +156,6 @@ socow_setup(struct mbuf *m0, struct uio */ if (pp->wire_count == 0 && pp->object == NULL) vm_page_free(pp); - vm_page_unlock_queues(); vm_page_unlock(pp); socow_stats.fail_sf_buf++; return(0); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu May 6 17:37:23 2010 (r207707) +++ head/sys/kern/uipc_syscalls.c Thu May 6 17:43:41 2010 (r207708) @@ -1716,7 +1716,6 @@ sf_buf_mext(void *addr, void *args) m = sf_buf_page(args); sf_buf_free(args); vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); /* * Check for the object going away on us. This can @@ -1725,7 +1724,6 @@ sf_buf_mext(void *addr, void *args) */ if (m->wire_count == 0 && m->object == NULL) vm_page_free(m); - vm_page_unlock_queues(); vm_page_unlock(m); if (addr == NULL) return; @@ -2111,7 +2109,6 @@ retry_space: } if (error) { vm_page_lock(pg); - vm_page_lock_queues(); vm_page_unwire(pg, 0); /* * See if anyone else might know about @@ -2120,10 +2117,8 @@ retry_space: */ if (pg->wire_count == 0 && pg->valid == 0 && pg->busy == 0 && !(pg->oflags & VPO_BUSY) && - pg->hold_count == 0) { + pg->hold_count == 0) vm_page_free(pg); - } - vm_page_unlock_queues(); vm_page_unlock(pg); VM_OBJECT_UNLOCK(obj); if (error == EAGAIN) Modified: head/sys/net/bpf_zerocopy.c ============================================================================== --- head/sys/net/bpf_zerocopy.c Thu May 6 17:37:23 2010 (r207707) +++ head/sys/net/bpf_zerocopy.c Thu May 6 17:43:41 2010 (r207708) @@ -113,11 +113,9 @@ zbuf_page_free(vm_page_t pp) { vm_page_lock(pp); - vm_page_lock_queues(); vm_page_unwire(pp, 0); if (pp->wire_count == 0 && pp->object == NULL) vm_page_free(pp); - vm_page_unlock_queues(); vm_page_unlock(pp); } From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:53:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E25F31065670; Thu, 6 May 2010 17:53:04 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D28928FC13; Thu, 6 May 2010 17:53: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 o46Hr4vq046298; Thu, 6 May 2010 17:53:04 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Hr4d0046296; Thu, 6 May 2010 17:53:04 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201005061753.o46Hr4d0046296@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 6 May 2010 17:53: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: r207709 - head/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: Thu, 06 May 2010 17:53:05 -0000 Author: bschmidt Date: Thu May 6 17:53:04 2010 New Revision: 207709 URL: http://svn.freebsd.org/changeset/base/207709 Log: Add a workaround for a bug in the firmware regarding the transition from passive to active scans. Basicly disable it by increasing the amount packets to be received to an amount which can't be reached during dwell times. Approved by: rpaulo (mentor) MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu May 6 17:43:41 2010 (r207708) +++ head/sys/dev/iwn/if_iwn.c Thu May 6 17:53:04 2010 (r207709) @@ -4730,7 +4730,7 @@ iwn_scan(struct iwn_softc *sc) chan->passive = htole16(78); else chan->passive = htole16(110); - hdr->crc_threshold = htole16(1); + hdr->crc_threshold = 0xffff; } else if (!(c->ic_flags & IEEE80211_CHAN_PASSIVE)) { chan->rf_gain = 0x28; chan->active = htole16(36); @@ -4743,7 +4743,7 @@ iwn_scan(struct iwn_softc *sc) chan->passive = htole16(88); else chan->passive = htole16(120); - hdr->crc_threshold = htole16(1); + hdr->crc_threshold = 0xffff; } DPRINTF(sc, IWN_DEBUG_STATE, From owner-svn-src-all@FreeBSD.ORG Thu May 6 17:55:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 905D7106566C; Thu, 6 May 2010 17:55:18 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id B7D798FC1F; Thu, 6 May 2010 17:55:17 +0000 (UTC) Received: by ewy24 with SMTP id 24so62109ewy.33 for ; Thu, 06 May 2010 10:55:11 -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; bh=OokrPnC0I+JkMNGwjd1GFamJWu2ZaXYi7bj8OXJcOdY=; b=HZeijsHxilpoeFR/8cfXwkXfKqgnzPVPAQmFOKhQOfAnznWambSLVyPRgVBg627Naz d6AgN8Ruko9d1OyPReilfpmqLYsvRolZV/7BQk9LNC6YFayuipmDlTpZO/reAEtGmsLk vpOinip22zcvE+bFHRlT0PCQEZZmB7k72pk9g= 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; b=tmFRL0Iq0I3nKuiBip5He4sYJcKNZJNBzoWTOHXqHZ+lJ8yniFnplU4uD1MBGPNd5y Byot2Ffd5QmGaSxKQHB80efAiW4njziFhDH8W5QuAoe4QjqBG0L84nZbt66aJCitrtfW N9c7Ks/A3cWfdLqV6ydhCRRaCw+HnU2ooanHo= MIME-Version: 1.0 Received: by 10.213.46.133 with SMTP id j5mr3689856ebf.66.1273168511547; Thu, 06 May 2010 10:55:11 -0700 (PDT) Received: by 10.213.108.141 with HTTP; Thu, 6 May 2010 10:55:11 -0700 (PDT) In-Reply-To: <201005061753.o46Hr4d0046296@svn.freebsd.org> References: <201005061753.o46Hr4d0046296@svn.freebsd.org> Date: Thu, 6 May 2010 13:55:11 -0400 Message-ID: From: Ben Kaduk To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207709 - head/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: Thu, 06 May 2010 17:55:18 -0000 On Thu, May 6, 2010 at 1:53 PM, Bernhard Schmidt wrote: > Author: bschmidt > Date: Thu May 6 17:53:04 2010 > New Revision: 207709 > URL: http://svn.freebsd.org/changeset/base/207709 > > Log: > Add a workaround for a bug in the firmware regarding the transition > from passive to active scans. Basicly disable it by increasing the > amount packets to be received to an amount which can't be reached > during dwell times. Is this expected to fix the firmware errors that have cropped up periodically for me? (Sorry for the lack of useful bug reports, etc.) Thanks, Ben Kaduk From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:17:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87BAA1065672; Thu, 6 May 2010 18:17:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7CE8FC12; Thu, 6 May 2010 18:17: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 o46IHa8S051798; Thu, 6 May 2010 18:17:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IHaqZ051795; Thu, 6 May 2010 18:17:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061817.o46IHaqZ051795@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:17: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: r207710 - stable/8/sys/dev/sge 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, 06 May 2010 18:17:36 -0000 Author: yongari Date: Thu May 6 18:17:36 2010 New Revision: 207710 URL: http://svn.freebsd.org/changeset/base/207710 Log: MFC r207375-207377. r207375: Preserve unknown bits of RX MAC control register when driver programs RX filter configuration. It seems RX MAC control register is one of key registers to get various offloading features as well as performance. Blindly clearing unrelated bits can result in unexpected results. Tested by: xclin cs dot nctu dot edu dot tw > r207376: Remove wrong link state chage. r207377: Explicitly marks SiS190 to differentiate it from SiS191. Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Thu May 6 17:53:04 2010 (r207709) +++ stable/8/sys/dev/sge/if_sge.c Thu May 6 18:17:36 2010 (r207710) @@ -453,8 +453,9 @@ sge_rxfilter(struct sge_softc *sc) SGE_LOCK_ASSERT(sc); ifp = sc->sge_ifp; - hashes[0] = hashes[1] = 0; - rxfilt = AcceptMyPhys; + rxfilt = CSR_READ_2(sc, RxMacControl); + rxfilt &= ~(AcceptBroadcast | AcceptAllPhys | AcceptMulticast); + rxfilt |= AcceptMyPhys; if ((ifp->if_flags & IFF_BROADCAST) != 0) rxfilt |= AcceptBroadcast; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { @@ -463,20 +464,20 @@ sge_rxfilter(struct sge_softc *sc) rxfilt |= AcceptMulticast; hashes[0] = 0xFFFFFFFF; hashes[1] = 0xFFFFFFFF; - goto done; - } - rxfilt |= AcceptMulticast; - /* Now program new ones. */ - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN); - hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } else { + rxfilt |= AcceptMulticast; + hashes[0] = hashes[1] = 0; + /* Now program new ones. */ + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN); + hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } + if_maddr_runlock(ifp); } - if_maddr_runlock(ifp); -done: CSR_WRITE_2(sc, RxMacControl, rxfilt | 0x02); CSR_WRITE_4(sc, RxHashTable, hashes[0]); CSR_WRITE_4(sc, RxHashTable2, hashes[1]); @@ -571,7 +572,7 @@ sge_attach(device_t dev) } sc->sge_rev = pci_get_revid(dev); if (pci_get_device(dev) == SIS_DEVICEID_190) - sc->sge_flags |= SGE_FLAG_FASTETHER; + sc->sge_flags |= SGE_FLAG_FASTETHER | SGE_FLAG_SIS190; /* Reset the adapter. */ sge_reset(sc); @@ -1590,7 +1591,6 @@ sge_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; SGE_LOCK(sc); mii = device_get_softc(sc->sge_miibus); - sc->sge_flags &= ~SGE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Thu May 6 17:53:04 2010 (r207709) +++ stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:17:36 2010 (r207710) @@ -331,6 +331,7 @@ struct sge_softc { int sge_timer; int sge_flags; #define SGE_FLAG_FASTETHER 0x0001 +#define SGE_FLAG_SIS190 0x0002 #define SGE_FLAG_RGMII 0x0010 #define SGE_FLAG_SPEED_1000 0x2000 #define SGE_FLAG_FDX 0x4000 From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:26:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB94D106566B; Thu, 6 May 2010 18:26:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A0CF38FC0C; Thu, 6 May 2010 18:26: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 o46IQh8P053939; Thu, 6 May 2010 18:26:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IQhEA053936; Thu, 6 May 2010 18:26:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061826.o46IQhEA053936@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:26:43 +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: r207711 - stable/7/sys/dev/sge 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, 06 May 2010 18:26:43 -0000 Author: yongari Date: Thu May 6 18:26:43 2010 New Revision: 207711 URL: http://svn.freebsd.org/changeset/base/207711 Log: MFC r207375-207377. r207375: Preserve unknown bits of RX MAC control register when driver programs RX filter configuration. It seems RX MAC control register is one of key registers to get various offloading features as well as performance. Blindly clearing unrelated bits can result in unexpected results. Tested by: xclin cs dot nctu dot edu dot tw > r207376: Remove wrong link state chage. r207377: Explicitly marks SiS190 to differentiate it from SiS191. Modified: stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.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/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Thu May 6 18:17:36 2010 (r207710) +++ stable/7/sys/dev/sge/if_sge.c Thu May 6 18:26:43 2010 (r207711) @@ -453,8 +453,9 @@ sge_rxfilter(struct sge_softc *sc) SGE_LOCK_ASSERT(sc); ifp = sc->sge_ifp; - hashes[0] = hashes[1] = 0; - rxfilt = AcceptMyPhys; + rxfilt = CSR_READ_2(sc, RxMacControl); + rxfilt &= ~(AcceptBroadcast | AcceptAllPhys | AcceptMulticast); + rxfilt |= AcceptMyPhys; if ((ifp->if_flags & IFF_BROADCAST) != 0) rxfilt |= AcceptBroadcast; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { @@ -463,20 +464,20 @@ sge_rxfilter(struct sge_softc *sc) rxfilt |= AcceptMulticast; hashes[0] = 0xFFFFFFFF; hashes[1] = 0xFFFFFFFF; - goto done; - } - rxfilt |= AcceptMulticast; - /* Now program new ones. */ - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN); - hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } else { + rxfilt |= AcceptMulticast; + hashes[0] = hashes[1] = 0; + /* Now program new ones. */ + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN); + hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } + IF_ADDR_UNLOCK(ifp); } - IF_ADDR_UNLOCK(ifp); -done: CSR_WRITE_2(sc, RxMacControl, rxfilt | 0x02); CSR_WRITE_4(sc, RxHashTable, hashes[0]); CSR_WRITE_4(sc, RxHashTable2, hashes[1]); @@ -571,7 +572,7 @@ sge_attach(device_t dev) } sc->sge_rev = pci_get_revid(dev); if (pci_get_device(dev) == SIS_DEVICEID_190) - sc->sge_flags |= SGE_FLAG_FASTETHER; + sc->sge_flags |= SGE_FLAG_FASTETHER | SGE_FLAG_SIS190; /* Reset the adapter. */ sge_reset(sc); @@ -1590,7 +1591,6 @@ sge_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; SGE_LOCK(sc); mii = device_get_softc(sc->sge_miibus); - sc->sge_flags &= ~SGE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) Modified: stable/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:17:36 2010 (r207710) +++ stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:26:43 2010 (r207711) @@ -331,6 +331,7 @@ struct sge_softc { int sge_timer; int sge_flags; #define SGE_FLAG_FASTETHER 0x0001 +#define SGE_FLAG_SIS190 0x0002 #define SGE_FLAG_RGMII 0x0010 #define SGE_FLAG_SPEED_1000 0x2000 #define SGE_FLAG_FDX 0x4000 From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:26:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02663106567C; Thu, 6 May 2010 18:26:58 +0000 (UTC) (envelope-from bschmidt@mx.techwires.net) Received: from mx.techwires.net (mx.techwires.net [79.140.39.242]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8968FC1B; Thu, 6 May 2010 18:26:57 +0000 (UTC) Received: by mx.techwires.net (Postfix, from userid 1001) id 34FFC291A1; Thu, 6 May 2010 20:11:10 +0200 (CEST) Date: Thu, 6 May 2010 20:11:10 +0200 From: Bernhard Schmidt To: Ben Kaduk Message-ID: <20100506181110.GA6628@mx.techwires.net> References: <201005061753.o46Hr4d0046296@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207709 - head/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: Thu, 06 May 2010 18:26:58 -0000 On Thu, May 06, 2010 at 01:55:11PM -0400, Ben Kaduk wrote: > On Thu, May 6, 2010 at 1:53 PM, Bernhard Schmidt wrote: > > Author: bschmidt > > Date: Thu May 6 17:53:04 2010 > > New Revision: 207709 > > URL: http://svn.freebsd.org/changeset/base/207709 > > > > Log: > > Add a workaround for a bug in the firmware regarding the transition > > from passive to active scans. Basicly disable it by increasing the > > amount packets to be received to an amount which can't be reached > > during dwell times. > > Is this expected to fix the firmware errors that have cropped up > periodically for me? > (Sorry for the lack of useful bug reports, etc.) I'm not aware that this generated any firmware errors. For scans on certain channels (definitely those which require radar detection) the firmware scan command might return with an error code instead of the expected scan result though. Which made it pretty much impossible to connect on those channels. -- Bernhard From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:30:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7B7E1065673; Thu, 6 May 2010 18:30:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B69A58FC1D; Thu, 6 May 2010 18:30: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 o46IUkQG054875; Thu, 6 May 2010 18:30:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IUk05054872; Thu, 6 May 2010 18:30:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061830.o46IUk05054872@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:30: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: r207712 - stable/8/sys/dev/sge 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, 06 May 2010 18:30:46 -0000 Author: yongari Date: Thu May 6 18:30:46 2010 New Revision: 207712 URL: http://svn.freebsd.org/changeset/base/207712 Log: MFC r207379: Enable FCS stripping and padding 10 bytes bit of RX MAC control register. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. The controller can pad 10 bytes before DMAing a received frame to RX buffer and received bytes include the padded bytes. This padding is very useful on strict-alignment architectures because driver does not have to copy received frame to align IP header on 4 bytes boundary. It also gives better RX performance on non-strict alignment architectures. Special thanks to xclin to give me valuable register information. Without his enthusiastic trial and errors this wouldn't be even possible. While I'm here tighten validity check of received frame. Controller clears RDS_CRCOK bit when it received bad CRC frames. xclin found that using loop back testing. Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Thu May 6 18:26:43 2010 (r207711) +++ stable/8/sys/dev/sge/if_sge.c Thu May 6 18:30:46 2010 (r207712) @@ -1144,7 +1144,8 @@ sge_rxeof(struct sge_softc *sc) if ((rxinfo & RDC_OWN) != 0) break; rxstat = le32toh(cur_rx->sge_sts_size); - if (SGE_RX_ERROR(rxstat) != 0 || SGE_RX_NSEGS(rxstat) != 1) { + if ((rxstat & RDS_CRCOK) == 0 || SGE_RX_ERROR(rxstat) != 0 || + SGE_RX_NSEGS(rxstat) != 1) { /* XXX We don't support multi-segment frames yet. */ #ifdef SGE_SHOW_ERRORS device_printf(sc->sge_dev, "Rx error : 0x%b\n", rxstat, @@ -1177,11 +1178,23 @@ sge_rxeof(struct sge_softc *sc) /* * TODO : VLAN hardware tag stripping. */ - m->m_pkthdr.len = m->m_len = - SGE_RX_BYTES(rxstat) - ETHER_CRC_LEN; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { + /* + * Account for 10bytes auto padding which is used + * to align IP header on 32bit boundary. Also note, + * CRC bytes is automatically removed by the + * hardware. + */ + m->m_data += SGE_RX_PAD_BYTES; + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + SGE_RX_PAD_BYTES; + } else { + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + ETHER_CRC_LEN; #ifndef __NO_STRICT_ALIGNMENT - sge_fixup_rx(m); + sge_fixup_rx(m); #endif + } m->m_pkthdr.rcvif = ifp; ifp->if_ipackets++; SGE_UNLOCK(sc); @@ -1503,6 +1516,7 @@ sge_init_locked(struct sge_softc *sc) { struct ifnet *ifp; struct mii_data *mii; + uint16_t rxfilt; int i; SGE_LOCK_ASSERT(sc); @@ -1535,10 +1549,19 @@ sge_init_locked(struct sge_softc *sc) CSR_WRITE_4(sc, RxWakeOnLan, 0); CSR_WRITE_4(sc, RxWakeOnLanData, 0); /* Allow receiving VLAN frames. */ - CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + CSR_WRITE_2(sc, RxMPSControl, + ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + SGE_RX_PAD_BYTES); + else + CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, RxMacAddr + i, IF_LLADDR(ifp)[i]); + /* Configure RX MAC. */ + rxfilt = 0; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; + CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); /* Initialize default speed/duplex information. */ Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:26:43 2010 (r207711) +++ stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:30:46 2010 (r207712) @@ -137,6 +137,10 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_FCS 0x0010 +#define RXMAC_PAD_ENB 0x0004 + +#define SGE_RX_PAD_BYTES 10 /* Station control register. */ #define SC_LOOPBACK 0x80000000 From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:32:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 880191065670; Thu, 6 May 2010 18:32:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 770958FC16; Thu, 6 May 2010 18:32: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 o46IW2q2055194; Thu, 6 May 2010 18:32:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IW2Fp055191; Thu, 6 May 2010 18:32:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061832.o46IW2Fp055191@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:32:02 +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: r207713 - stable/7/sys/dev/sge 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, 06 May 2010 18:32:02 -0000 Author: yongari Date: Thu May 6 18:32:02 2010 New Revision: 207713 URL: http://svn.freebsd.org/changeset/base/207713 Log: MFC r207379: Enable FCS stripping and padding 10 bytes bit of RX MAC control register. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. The controller can pad 10 bytes before DMAing a received frame to RX buffer and received bytes include the padded bytes. This padding is very useful on strict-alignment architectures because driver does not have to copy received frame to align IP header on 4 bytes boundary. It also gives better RX performance on non-strict alignment architectures. Special thanks to xclin to give me valuable register information. Without his enthusiastic trial and errors this wouldn't be even possible. While I'm here tighten validity check of received frame. Controller clears RDS_CRCOK bit when it received bad CRC frames. xclin found that using loop back testing. Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.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/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Thu May 6 18:30:46 2010 (r207712) +++ stable/7/sys/dev/sge/if_sge.c Thu May 6 18:32:02 2010 (r207713) @@ -1144,7 +1144,8 @@ sge_rxeof(struct sge_softc *sc) if ((rxinfo & RDC_OWN) != 0) break; rxstat = le32toh(cur_rx->sge_sts_size); - if (SGE_RX_ERROR(rxstat) != 0 || SGE_RX_NSEGS(rxstat) != 1) { + if ((rxstat & RDS_CRCOK) == 0 || SGE_RX_ERROR(rxstat) != 0 || + SGE_RX_NSEGS(rxstat) != 1) { /* XXX We don't support multi-segment frames yet. */ #ifdef SGE_SHOW_ERRORS device_printf(sc->sge_dev, "Rx error : 0x%b\n", rxstat, @@ -1177,11 +1178,23 @@ sge_rxeof(struct sge_softc *sc) /* * TODO : VLAN hardware tag stripping. */ - m->m_pkthdr.len = m->m_len = - SGE_RX_BYTES(rxstat) - ETHER_CRC_LEN; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { + /* + * Account for 10bytes auto padding which is used + * to align IP header on 32bit boundary. Also note, + * CRC bytes is automatically removed by the + * hardware. + */ + m->m_data += SGE_RX_PAD_BYTES; + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + SGE_RX_PAD_BYTES; + } else { + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + ETHER_CRC_LEN; #ifndef __NO_STRICT_ALIGNMENT - sge_fixup_rx(m); + sge_fixup_rx(m); #endif + } m->m_pkthdr.rcvif = ifp; ifp->if_ipackets++; SGE_UNLOCK(sc); @@ -1503,6 +1516,7 @@ sge_init_locked(struct sge_softc *sc) { struct ifnet *ifp; struct mii_data *mii; + uint16_t rxfilt; int i; SGE_LOCK_ASSERT(sc); @@ -1535,10 +1549,19 @@ sge_init_locked(struct sge_softc *sc) CSR_WRITE_4(sc, RxWakeOnLan, 0); CSR_WRITE_4(sc, RxWakeOnLanData, 0); /* Allow receiving VLAN frames. */ - CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + CSR_WRITE_2(sc, RxMPSControl, + ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + SGE_RX_PAD_BYTES); + else + CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, RxMacAddr + i, IF_LLADDR(ifp)[i]); + /* Configure RX MAC. */ + rxfilt = 0; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; + CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); /* Initialize default speed/duplex information. */ Modified: stable/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:30:46 2010 (r207712) +++ stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:32:02 2010 (r207713) @@ -137,6 +137,10 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_FCS 0x0010 +#define RXMAC_PAD_ENB 0x0004 + +#define SGE_RX_PAD_BYTES 10 /* Station control register. */ #define SC_LOOPBACK 0x80000000 From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:34:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24A84106564A; Thu, 6 May 2010 18:34:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 136638FC17; Thu, 6 May 2010 18:34: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 o46IYFbA055810; Thu, 6 May 2010 18:34:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IYFD0055807; Thu, 6 May 2010 18:34:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061834.o46IYFD0055807@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:34: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: r207714 - stable/8/sys/dev/sge 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, 06 May 2010 18:34:16 -0000 Author: yongari Date: Thu May 6 18:34:15 2010 New Revision: 207714 URL: http://svn.freebsd.org/changeset/base/207714 Log: MFC r207380: Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. In theory, controller reinitialization is not needed when VLAN tag configuration is changed, but xclin said controller was not stable whenever toggling VLAN tag bit. To address that, sge(4) reinitialize controller for VLAN configuration which seems to work as expected. VLAN tag information for TX/RX descriptor and configure bit of RxMacControl register was found by xclin. Submitted by: xclin cs dot nctu dot edu dot tw > (initial version) Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Thu May 6 18:32:02 2010 (r207713) +++ stable/8/sys/dev/sge/if_sge.c Thu May 6 18:34:15 2010 (r207714) @@ -137,6 +137,7 @@ static int sge_get_mac_addr_eeprom(struc static uint16_t sge_read_eeprom(struct sge_softc *, int); static void sge_rxfilter(struct sge_softc *); +static void sge_setvlan(struct sge_softc *); static void sge_reset(struct sge_softc *); static int sge_list_rx_init(struct sge_softc *); static int sge_list_rx_free(struct sge_softc *); @@ -484,6 +485,25 @@ sge_rxfilter(struct sge_softc *sc) } static void +sge_setvlan(struct sge_softc *sc) +{ + struct ifnet *ifp; + uint16_t rxfilt; + + SGE_LOCK_ASSERT(sc); + + ifp = sc->sge_ifp; + if ((ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) == 0) + return; + rxfilt = CSR_READ_2(sc, RxMacControl); + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + rxfilt |= RXMAC_STRIP_VLAN; + else + rxfilt &= ~RXMAC_STRIP_VLAN; + CSR_WRITE_2(sc, RxMacControl, rxfilt); +} + +static void sge_reset(struct sge_softc *sc) { @@ -619,6 +639,9 @@ sge_attach(device_t dev) ether_ifattach(ifp, eaddr); /* VLAN setup. */ + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; /* Tell the upper layer(s) we support long frames. */ @@ -1175,9 +1198,12 @@ sge_rxeof(struct sge_softc *sc) m->m_pkthdr.csum_data = 0xffff; } } - /* - * TODO : VLAN hardware tag stripping. - */ + /* Check for VLAN tagged frame. */ + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0 && + (rxstat & RDS_VLAN) != 0) { + m->m_pkthdr.ether_vtag = rxinfo & RDC_VLAN_MASK; + m->m_flags |= M_VLANTAG; + } if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { /* * Account for 10bytes auto padding which is used @@ -1422,6 +1448,11 @@ sge_encap(struct sge_softc *sc, struct m desc->sge_flags = htole32(txsegs[0].ds_len); if (prod == SGE_TX_RING_CNT - 1) desc->sge_flags |= htole32(RING_END); + /* Configure VLAN. */ + if(((*m_head)->m_flags & M_VLANTAG) != 0) { + cflags |= (*m_head)->m_pkthdr.ether_vtag; + desc->sge_sts_size |= htole32(TDS_INS_VLAN); + } desc->sge_cmdsts = htole32(TDC_DEF | TDC_CRC | TDC_PAD | cflags); #if 1 if ((sc->sge_flags & SGE_FLAG_SPEED_1000) != 0) @@ -1563,6 +1594,7 @@ sge_init_locked(struct sge_softc *sc) rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); + sge_setvlan(sc); /* Initialize default speed/duplex information. */ if ((sc->sge_flags & SGE_FLAG_FASTETHER) == 0) @@ -1653,7 +1685,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm struct sge_softc *sc; struct ifreq *ifr; struct mii_data *mii; - int error = 0, mask; + int error = 0, mask, reinit; sc = ifp->if_softc; ifr = (struct ifreq *)data; @@ -1675,6 +1707,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm break; case SIOCSIFCAP: SGE_LOCK(sc); + reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { @@ -1687,7 +1720,24 @@ sge_ioctl(struct ifnet *ifp, u_long comm if ((mask & IFCAP_RXCSUM) != 0 && (ifp->if_capabilities & IFCAP_RXCSUM) != 0) ifp->if_capenable ^= IFCAP_RXCSUM; + if ((mask & IFCAP_VLAN_HWCSUM) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWCSUM) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { + /* + * Due to unknown reason, toggling VLAN hardware + * tagging require interface reinitialization. + */ + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + reinit = 1; + } + if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + sge_init_locked(sc); + } SGE_UNLOCK(sc); + VLAN_CAPABILITIES(ifp); break; case SIOCADDMULTI: case SIOCDELMULTI: Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:32:02 2010 (r207713) +++ stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:34:15 2010 (r207714) @@ -137,6 +137,7 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_VLAN 0x0020 #define RXMAC_STRIP_FCS 0x0010 #define RXMAC_PAD_ENB 0x0004 @@ -187,12 +188,14 @@ #define TDC_COL 0x00040000 #define TDC_CRC 0x00020000 #define TDC_PAD 0x00010000 +#define TDC_VLAN_MASK 0x0000FFFF #define SGE_TX_INTR_FRAMES 32 /* * TX descriptor status bits. */ +#define TDS_INS_VLAN 0x80000000 #define TDS_OWC 0x00080000 #define TDS_ABT 0x00040000 #define TDS_FIFO 0x00020000 @@ -219,11 +222,12 @@ #define RDC_UCAST 0x00040000 #define RDC_CRCOFF 0x00020000 #define RDC_PREADD 0x00010000 +#define RDC_VLAN_MASK 0x0000FFFF /* * RX descriptor status bits */ -#define RDS_TAGON 0x80000000 +#define RDS_VLAN 0x80000000 #define RDS_DESCS 0x3f000000 #define RDS_ABORT 0x00800000 #define RDS_SHORT 0x00400000 @@ -240,7 +244,7 @@ #define RX_ERR_BITS "\20" \ "\21CRCOK\22COLON\23NIBON\24OVRUN" \ "\25MIIER\26LIMIT\27SHORT\30ABORT" \ - "\40TAGON" + "\40VLAN" #define RING_END 0x80000000 #define SGE_RX_BYTES(x) ((x) & 0xFFFF) From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:35:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72D361065672; Thu, 6 May 2010 18:35:53 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 618928FC1A; Thu, 6 May 2010 18:35: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 o46IZr52056217; Thu, 6 May 2010 18:35:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IZrOI056214; Thu, 6 May 2010 18:35:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061835.o46IZrOI056214@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:35:53 +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: r207715 - stable/7/sys/dev/sge 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, 06 May 2010 18:35:53 -0000 Author: yongari Date: Thu May 6 18:35:53 2010 New Revision: 207715 URL: http://svn.freebsd.org/changeset/base/207715 Log: MFC r207380: Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. In theory, controller reinitialization is not needed when VLAN tag configuration is changed, but xclin said controller was not stable whenever toggling VLAN tag bit. To address that, sge(4) reinitialize controller for VLAN configuration which seems to work as expected. VLAN tag information for TX/RX descriptor and configure bit of RxMacControl register was found by xclin. Submitted by: xclin cs dot nctu dot edu dot tw > (initial version) Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.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/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Thu May 6 18:34:15 2010 (r207714) +++ stable/7/sys/dev/sge/if_sge.c Thu May 6 18:35:53 2010 (r207715) @@ -137,6 +137,7 @@ static int sge_get_mac_addr_eeprom(struc static uint16_t sge_read_eeprom(struct sge_softc *, int); static void sge_rxfilter(struct sge_softc *); +static void sge_setvlan(struct sge_softc *); static void sge_reset(struct sge_softc *); static int sge_list_rx_init(struct sge_softc *); static int sge_list_rx_free(struct sge_softc *); @@ -484,6 +485,25 @@ sge_rxfilter(struct sge_softc *sc) } static void +sge_setvlan(struct sge_softc *sc) +{ + struct ifnet *ifp; + uint16_t rxfilt; + + SGE_LOCK_ASSERT(sc); + + ifp = sc->sge_ifp; + if ((ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) == 0) + return; + rxfilt = CSR_READ_2(sc, RxMacControl); + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + rxfilt |= RXMAC_STRIP_VLAN; + else + rxfilt &= ~RXMAC_STRIP_VLAN; + CSR_WRITE_2(sc, RxMacControl, rxfilt); +} + +static void sge_reset(struct sge_softc *sc) { @@ -619,6 +639,9 @@ sge_attach(device_t dev) ether_ifattach(ifp, eaddr); /* VLAN setup. */ + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; /* Tell the upper layer(s) we support long frames. */ @@ -1175,9 +1198,12 @@ sge_rxeof(struct sge_softc *sc) m->m_pkthdr.csum_data = 0xffff; } } - /* - * TODO : VLAN hardware tag stripping. - */ + /* Check for VLAN tagged frame. */ + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0 && + (rxstat & RDS_VLAN) != 0) { + m->m_pkthdr.ether_vtag = rxinfo & RDC_VLAN_MASK; + m->m_flags |= M_VLANTAG; + } if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { /* * Account for 10bytes auto padding which is used @@ -1422,6 +1448,11 @@ sge_encap(struct sge_softc *sc, struct m desc->sge_flags = htole32(txsegs[0].ds_len); if (prod == SGE_TX_RING_CNT - 1) desc->sge_flags |= htole32(RING_END); + /* Configure VLAN. */ + if(((*m_head)->m_flags & M_VLANTAG) != 0) { + cflags |= (*m_head)->m_pkthdr.ether_vtag; + desc->sge_sts_size |= htole32(TDS_INS_VLAN); + } desc->sge_cmdsts = htole32(TDC_DEF | TDC_CRC | TDC_PAD | cflags); #if 1 if ((sc->sge_flags & SGE_FLAG_SPEED_1000) != 0) @@ -1563,6 +1594,7 @@ sge_init_locked(struct sge_softc *sc) rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); + sge_setvlan(sc); /* Initialize default speed/duplex information. */ if ((sc->sge_flags & SGE_FLAG_FASTETHER) == 0) @@ -1653,7 +1685,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm struct sge_softc *sc; struct ifreq *ifr; struct mii_data *mii; - int error = 0, mask; + int error = 0, mask, reinit; sc = ifp->if_softc; ifr = (struct ifreq *)data; @@ -1675,6 +1707,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm break; case SIOCSIFCAP: SGE_LOCK(sc); + reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { @@ -1687,7 +1720,24 @@ sge_ioctl(struct ifnet *ifp, u_long comm if ((mask & IFCAP_RXCSUM) != 0 && (ifp->if_capabilities & IFCAP_RXCSUM) != 0) ifp->if_capenable ^= IFCAP_RXCSUM; + if ((mask & IFCAP_VLAN_HWCSUM) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWCSUM) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { + /* + * Due to unknown reason, toggling VLAN hardware + * tagging require interface reinitialization. + */ + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + reinit = 1; + } + if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + sge_init_locked(sc); + } SGE_UNLOCK(sc); + VLAN_CAPABILITIES(ifp); break; case SIOCADDMULTI: case SIOCDELMULTI: Modified: stable/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:34:15 2010 (r207714) +++ stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:35:53 2010 (r207715) @@ -137,6 +137,7 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_VLAN 0x0020 #define RXMAC_STRIP_FCS 0x0010 #define RXMAC_PAD_ENB 0x0004 @@ -187,12 +188,14 @@ #define TDC_COL 0x00040000 #define TDC_CRC 0x00020000 #define TDC_PAD 0x00010000 +#define TDC_VLAN_MASK 0x0000FFFF #define SGE_TX_INTR_FRAMES 32 /* * TX descriptor status bits. */ +#define TDS_INS_VLAN 0x80000000 #define TDS_OWC 0x00080000 #define TDS_ABT 0x00040000 #define TDS_FIFO 0x00020000 @@ -219,11 +222,12 @@ #define RDC_UCAST 0x00040000 #define RDC_CRCOFF 0x00020000 #define RDC_PREADD 0x00010000 +#define RDC_VLAN_MASK 0x0000FFFF /* * RX descriptor status bits */ -#define RDS_TAGON 0x80000000 +#define RDS_VLAN 0x80000000 #define RDS_DESCS 0x3f000000 #define RDS_ABORT 0x00800000 #define RDS_SHORT 0x00400000 @@ -240,7 +244,7 @@ #define RX_ERR_BITS "\20" \ "\21CRCOK\22COLON\23NIBON\24OVRUN" \ "\25MIIER\26LIMIT\27SHORT\30ABORT" \ - "\40TAGON" + "\40VLAN" #define RING_END 0x80000000 #define SGE_RX_BYTES(x) ((x) & 0xFFFF) From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:37:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D03C106566C; Thu, 6 May 2010 18:37:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F044A8FC0A; Thu, 6 May 2010 18:37: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 o46IbdkI056656; Thu, 6 May 2010 18:37:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IbdfG056653; Thu, 6 May 2010 18:37:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061837.o46IbdfG056653@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:37: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: r207716 - 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: Thu, 06 May 2010 18:37:40 -0000 Author: yongari Date: Thu May 6 18:37:39 2010 New Revision: 207716 URL: http://svn.freebsd.org/changeset/base/207716 Log: MFC r207381: Now sge(4) supports hardware VLAN tag insertion/stripping. Modified: stable/8/share/man/man4/sge.4 stable/8/share/man/man4/vlan.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/sge.4 ============================================================================== --- stable/8/share/man/man4/sge.4 Thu May 6 18:35:53 2010 (r207715) +++ stable/8/share/man/man4/sge.4 Thu May 6 18:37:39 2010 (r207716) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd April 29, 2010 .Dt SGE 4 .Os .Sh NAME @@ -53,11 +53,11 @@ controllers and SiS191 Fast/Gigabit Ethe .Pp All LOMs supported by the .Nm -driver have TCP/UDP/IP checksum offload for transmit and receive. +driver have TCP/UDP/IP checksum offload for transmit and receive, +hardware VLAN tag stripping/insertion features. Due to lack of documentation more offloading features like TCP -segmentation offload (TSO), hardware VLAN tag stripping/insertion -features, Wake On Lan (WOL), Jumbo frame and an interrupt moderation -mechanism are not supported yet. +segmentation offload (TSO), Wake On Lan (WOL), Jumbo frame and an +interrupt moderation mechanism are not supported yet. .Pp The .Nm Modified: stable/8/share/man/man4/vlan.4 ============================================================================== --- stable/8/share/man/man4/vlan.4 Thu May 6 18:35:53 2010 (r207715) +++ stable/8/share/man/man4/vlan.4 Thu May 6 18:37:39 2010 (r207716) @@ -134,6 +134,7 @@ in the hardware is limited to the follow .Xr msk 4 , .Xr nge 4 , .Xr re 4 , +.Xr sge 4 , .Xr stge 4 , .Xr ti 4 , .Xr txp 4 , @@ -172,7 +173,6 @@ natively: .Xr nve 4 , .Xr rl 4 , .Xr sf 4 , -.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:38:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52331065672; Thu, 6 May 2010 18:38:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D482D8FC1B; Thu, 6 May 2010 18:38: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 o46IcJWX056835; Thu, 6 May 2010 18:38:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IcJHe056832; Thu, 6 May 2010 18:38:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061838.o46IcJHe056832@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:38:19 +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: r207717 - 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: Thu, 06 May 2010 18:38:20 -0000 Author: yongari Date: Thu May 6 18:38:19 2010 New Revision: 207717 URL: http://svn.freebsd.org/changeset/base/207717 Log: MFC r207381: Now sge(4) supports hardware VLAN tag insertion/stripping. Modified: stable/7/share/man/man4/sge.4 stable/7/share/man/man4/vlan.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/sge.4 ============================================================================== --- stable/7/share/man/man4/sge.4 Thu May 6 18:37:39 2010 (r207716) +++ stable/7/share/man/man4/sge.4 Thu May 6 18:38:19 2010 (r207717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd April 29, 2010 .Dt SGE 4 .Os .Sh NAME @@ -53,11 +53,11 @@ controllers and SiS191 Fast/Gigabit Ethe .Pp All LOMs supported by the .Nm -driver have TCP/UDP/IP checksum offload for transmit and receive. +driver have TCP/UDP/IP checksum offload for transmit and receive, +hardware VLAN tag stripping/insertion features. Due to lack of documentation more offloading features like TCP -segmentation offload (TSO), hardware VLAN tag stripping/insertion -features, Wake On Lan (WOL), Jumbo frame and an interrupt moderation -mechanism are not supported yet. +segmentation offload (TSO), Wake On Lan (WOL), Jumbo frame and an +interrupt moderation mechanism are not supported yet. .Pp The .Nm Modified: stable/7/share/man/man4/vlan.4 ============================================================================== --- stable/7/share/man/man4/vlan.4 Thu May 6 18:37:39 2010 (r207716) +++ stable/7/share/man/man4/vlan.4 Thu May 6 18:38:19 2010 (r207717) @@ -134,6 +134,7 @@ in the hardware is limited to the follow .Xr msk 4 , .Xr nge 4 , .Xr re 4 , +.Xr sge 4 , .Xr stge 4 , .Xr ti 4 , .Xr txp 4 , @@ -172,7 +173,6 @@ natively: .Xr nve 4 , .Xr rl 4 , .Xr sf 4 , -.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:43:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FFD71065676; Thu, 6 May 2010 18:43:01 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44FF48FC13; Thu, 6 May 2010 18:43:01 +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 o46Ih1Ns057905; Thu, 6 May 2010 18:43:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Ih1NB057902; Thu, 6 May 2010 18:43:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061843.o46Ih1NB057902@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:43:01 +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: r207718 - stable/8/sys/dev/msk 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, 06 May 2010 18:43:01 -0000 Author: yongari Date: Thu May 6 18:43:00 2010 New Revision: 207718 URL: http://svn.freebsd.org/changeset/base/207718 Log: MFC r207409,207442: r207409: Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If it is 8bits register then RX FIFO size can't exceed 2KB which is not true for almost all Yukon II controller. r207442: Disable non-ASF packet flushing on Yukon Extreme as vendor's driver does. Without this change, Yukon Extreme seems to generate lots of RX FIFO overruns even though controller has available RX buffers. These excessive RX FIFO overruns generated lots of pause frames which in turn killed devices plugged into switch. It seems there is still occasional RX frame corruption on Yukon Extreme but this change seems to fix the pause frame storm. Reported by: jhb Tested by: jhb Modified: stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/msk/if_mskreg.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Thu May 6 18:38:19 2010 (r207717) +++ stable/8/sys/dev/msk/if_msk.c Thu May 6 18:43:00 2010 (r207718) @@ -3673,9 +3673,9 @@ msk_init_locked(struct msk_if_softc *sc_ if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) { /* Set Rx Pause threshould. */ - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), MSK_ECU_LLPP); - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), MSK_ECU_ULPP); /* Configure store-and-forward for Tx. */ msk_set_tx_stfwd(sc_if); @@ -3763,6 +3763,11 @@ msk_init_locked(struct msk_if_softc *sc_ msk_stop(sc_if); return; } + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { + /* Disable flushing of non-ASF packets. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), + GMF_RX_MACSEC_FLUSH_OFF); + } /* Configure interrupt handling. */ if (sc_if->msk_port == MSK_PORT_A) { Modified: stable/8/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:38:19 2010 (r207717) +++ stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:43:00 2010 (r207718) @@ -621,8 +621,8 @@ #define RX_GMF_FL_MSK 0x0c4c /* 32 bit Rx GMAC FIFO Flush Mask */ #define RX_GMF_FL_THR 0x0c50 /* 32 bit Rx GMAC FIFO Flush Threshold */ #define RX_GMF_TR_THR 0x0c54 /* 32 bit Rx Truncation Threshold (Yukon-2) */ -#define RX_GMF_UP_THR 0x0c58 /* 8 bit Rx Upper Pause Thr (Yukon-EC_U) */ -#define RX_GMF_LP_THR 0x0c5a /* 8 bit Rx Lower Pause Thr (Yukon-EC_U) */ +#define RX_GMF_UP_THR 0x0c58 /* 16 bit Rx Upper Pause Thr (Yukon-EC_U) */ +#define RX_GMF_LP_THR 0x0c5a /* 16 bit Rx Lower Pause Thr (Yukon-EC_U) */ #define RX_GMF_VLAN 0x0c5c /* 32 bit Rx VLAN Type Register (Yukon-2) */ #define RX_GMF_WP 0x0c60 /* 32 bit Rx GMAC FIFO Write Pointer */ #define RX_GMF_WLEV 0x0c68 /* 32 bit Rx GMAC FIFO Write Level */ @@ -1941,6 +1941,8 @@ #define RX_TRUNC_OFF BIT_26 /* disable packet truncation */ #define RX_VLAN_STRIP_ON BIT_25 /* enable VLAN stripping */ #define RX_VLAN_STRIP_OFF BIT_24 /* disable VLAN stripping */ +#define GMF_RX_MACSEC_FLUSH_ON BIT_23 +#define GMF_RX_MACSEC_FLUSH_OFF BIT_22 #define GMF_RX_OVER_ON BIT_19 /* enable flushing on receive overrun */ #define GMF_RX_OVER_OFF BIT_18 /* disable flushing on receive overrun */ #define GMF_ASF_RX_OVER_ON BIT_17 /* enable flushing of ASF when overrun */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:43:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B57C91065670; Thu, 6 May 2010 18:43:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9AC768FC17; Thu, 6 May 2010 18:43: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 o46IhJ6h058011; Thu, 6 May 2010 18:43:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IhJxk058006; Thu, 6 May 2010 18:43:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005061843.o46IhJxk058006@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 6 May 2010 18:43: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: r207719 - in head/sys: fs/msdosfs fs/tmpfs 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: Thu, 06 May 2010 18:43:19 -0000 Author: trasz Date: Thu May 6 18:43:19 2010 New Revision: 207719 URL: http://svn.freebsd.org/changeset/base/207719 Log: Style fixes and removal of unneeded variable. Submitted by: bde@ Modified: head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Thu May 6 18:43:00 2010 (r207718) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Thu May 6 18:43:19 2010 (r207719) @@ -652,7 +652,6 @@ msdosfs_write(ap) struct buf *bp; int ioflag = ap->a_ioflag; struct uio *uio = ap->a_uio; - struct thread *td = uio->uio_td; struct vnode *vp = ap->a_vp; struct vnode *thisvp; struct denode *dep = VTODE(vp); @@ -696,7 +695,7 @@ msdosfs_write(ap) /* * If they've exceeded their filesize limit, tell them about it. */ - if (vn_rlimit_fsize(vp, uio, td)) + if (vn_rlimit_fsize(vp, uio, uio->uio_td)) return (EFBIG); /* Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu May 6 18:43:00 2010 (r207718) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu May 6 18:43:19 2010 (r207719) @@ -717,7 +717,6 @@ tmpfs_write(struct vop_write_args *v) struct vnode *vp = v->a_vp; struct uio *uio = v->a_uio; int ioflag = v->a_ioflag; - struct thread *td = uio->uio_td; boolean_t extended; int error = 0; @@ -747,7 +746,7 @@ tmpfs_write(struct vop_write_args *v) VFS_TO_TMPFS(vp->v_mount)->tm_maxfilesize) return (EFBIG); - if (vn_rlimit_fsize(vp, uio, td)) + if (vn_rlimit_fsize(vp, uio, uio->uio_td)) return (EFBIG); extended = uio->uio_offset + uio->uio_resid > node->tn_size; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu May 6 18:43:00 2010 (r207718) +++ head/sys/kern/vfs_vnops.c Thu May 6 18:43:19 2010 (r207719) @@ -1341,11 +1341,12 @@ vn_vget_ino(struct vnode *vp, ino_t ino, } int -vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, const struct thread *td) +vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, + const struct thread *td) { + if (vp->v_type != VREG || td == NULL) return (0); - PROC_LOCK(td->td_proc); if (uio->uio_offset + uio->uio_resid > lim_cur(td->td_proc, RLIMIT_FSIZE)) { @@ -1354,6 +1355,5 @@ vn_rlimit_fsize(const struct vnode *vp, return (EFBIG); } PROC_UNLOCK(td->td_proc); - return (0); } Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Thu May 6 18:43:00 2010 (r207718) +++ head/sys/sys/vnode.h Thu May 6 18:43:19 2010 (r207719) @@ -655,6 +655,8 @@ int vn_rdwr_inchunks(enum uio_rw rw, str size_t len, off_t offset, enum uio_seg segflg, int ioflg, struct ucred *active_cred, struct ucred *file_cred, size_t *aresid, struct thread *td); +int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, + const struct thread *td); int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred, struct ucred *file_cred, struct thread *td); int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); @@ -670,6 +672,7 @@ int vn_extattr_rm(struct vnode *vp, int int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags, struct vnode **rvp); + int vfs_cache_lookup(struct vop_lookup_args *ap); void vfs_timestamp(struct timespec *); void vfs_write_resume(struct mount *mp); @@ -780,7 +783,6 @@ struct dirent; int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off); int vfs_unixify_accmode(accmode_t *accmode); -int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, const struct thread *td); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:44:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11F9B1065675; Thu, 6 May 2010 18:44:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 00F968FC14; Thu, 6 May 2010 18:44: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 o46Iinoa058410; Thu, 6 May 2010 18:44:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Iin09058407; Thu, 6 May 2010 18:44:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061844.o46Iin09058407@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:44:49 +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: r207720 - stable/7/sys/dev/msk 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, 06 May 2010 18:44:50 -0000 Author: yongari Date: Thu May 6 18:44:49 2010 New Revision: 207720 URL: http://svn.freebsd.org/changeset/base/207720 Log: MFC r207409,207442: r207409: Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If it is 8bits register then RX FIFO size can't exceed 2KB which is not true for almost all Yukon II controller. r207442: Disable non-ASF packet flushing on Yukon Extreme as vendor's driver does. Without this change, Yukon Extreme seems to generate lots of RX FIFO overruns even though controller has available RX buffers. These excessive RX FIFO overruns generated lots of pause frames which in turn killed devices plugged into switch. It seems there is still occasional RX frame corruption on Yukon Extreme but this change seems to fix the pause frame storm. Reported by: jhb Tested by: jhb Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.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/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu May 6 18:43:19 2010 (r207719) +++ stable/7/sys/dev/msk/if_msk.c Thu May 6 18:44:49 2010 (r207720) @@ -3673,9 +3673,9 @@ msk_init_locked(struct msk_if_softc *sc_ if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) { /* Set Rx Pause threshould. */ - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), MSK_ECU_LLPP); - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), MSK_ECU_ULPP); /* Configure store-and-forward for Tx. */ msk_set_tx_stfwd(sc_if); @@ -3763,6 +3763,11 @@ msk_init_locked(struct msk_if_softc *sc_ msk_stop(sc_if); return; } + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { + /* Disable flushing of non-ASF packets. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), + GMF_RX_MACSEC_FLUSH_OFF); + } /* Configure interrupt handling. */ if (sc_if->msk_port == MSK_PORT_A) { Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:43:19 2010 (r207719) +++ stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:44:49 2010 (r207720) @@ -621,8 +621,8 @@ #define RX_GMF_FL_MSK 0x0c4c /* 32 bit Rx GMAC FIFO Flush Mask */ #define RX_GMF_FL_THR 0x0c50 /* 32 bit Rx GMAC FIFO Flush Threshold */ #define RX_GMF_TR_THR 0x0c54 /* 32 bit Rx Truncation Threshold (Yukon-2) */ -#define RX_GMF_UP_THR 0x0c58 /* 8 bit Rx Upper Pause Thr (Yukon-EC_U) */ -#define RX_GMF_LP_THR 0x0c5a /* 8 bit Rx Lower Pause Thr (Yukon-EC_U) */ +#define RX_GMF_UP_THR 0x0c58 /* 16 bit Rx Upper Pause Thr (Yukon-EC_U) */ +#define RX_GMF_LP_THR 0x0c5a /* 16 bit Rx Lower Pause Thr (Yukon-EC_U) */ #define RX_GMF_VLAN 0x0c5c /* 32 bit Rx VLAN Type Register (Yukon-2) */ #define RX_GMF_WP 0x0c60 /* 32 bit Rx GMAC FIFO Write Pointer */ #define RX_GMF_WLEV 0x0c68 /* 32 bit Rx GMAC FIFO Write Level */ @@ -1941,6 +1941,8 @@ #define RX_TRUNC_OFF BIT_26 /* disable packet truncation */ #define RX_VLAN_STRIP_ON BIT_25 /* enable VLAN stripping */ #define RX_VLAN_STRIP_OFF BIT_24 /* disable VLAN stripping */ +#define GMF_RX_MACSEC_FLUSH_ON BIT_23 +#define GMF_RX_MACSEC_FLUSH_OFF BIT_22 #define GMF_RX_OVER_ON BIT_19 /* enable flushing on receive overrun */ #define GMF_RX_OVER_OFF BIT_18 /* disable flushing on receive overrun */ #define GMF_ASF_RX_OVER_ON BIT_17 /* enable flushing of ASF when overrun */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:47:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA85F1065675; Thu, 6 May 2010 18:47:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA5A8FC08; Thu, 6 May 2010 18:47: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 o46IlGGF058989; Thu, 6 May 2010 18:47:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IlGHV058986; Thu, 6 May 2010 18:47:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061847.o46IlGHV058986@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:47: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: r207721 - stable/8/sys/dev/msk 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, 06 May 2010 18:47:16 -0000 Author: yongari Date: Thu May 6 18:47:16 2010 New Revision: 207721 URL: http://svn.freebsd.org/changeset/base/207721 Log: MFC r207445: Add basic support for Marvell 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/msk/if_mskreg.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Thu May 6 18:44:49 2010 (r207720) +++ stable/8/sys/dev/msk/if_msk.c Thu May 6 18:47:16 2010 (r207721) @@ -223,6 +223,8 @@ static struct msk_product { "Marvell Yukon 88E8072 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4380, "Marvell Yukon 88E8057 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4381, + "Marvell Yukon 88E8059 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -239,7 +241,9 @@ static const char *model_name[] = { "Yukon FE", "Yukon FE+", "Yukon Supreme", - "Yukon Ultra 2" + "Yukon Ultra 2", + "Yukon Unknown", + "Yukon Optima", }; static int mskc_probe(device_t); @@ -1142,6 +1146,7 @@ msk_phy_power(struct msk_softc *sc, int case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: case CHIP_ID_YUKON_UL_2: + case CHIP_ID_YUKON_OPT: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1285,6 +1290,10 @@ mskc_reset(struct msk_softc *sc) GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | GMC_BYP_RETR_ON); } + if (sc->msk_hw_id == CHIP_ID_YUKON_OPT && sc->msk_hw_rev == 0) { + /* Disable PCIe PHY powerdown(reg 0x80, bit7). */ + CSR_WRITE_4(sc, Y2_PEX_PHY_DATA, (0x0080 << 16) | 0x0080); + } CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_OFF); /* LED On. */ @@ -1629,8 +1638,9 @@ mskc_attach(device_t dev) sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || - sc->msk_hw_id > CHIP_ID_YUKON_UL_2 || - sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { + sc->msk_hw_id > CHIP_ID_YUKON_OPT || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR || + sc->msk_hw_id == CHIP_ID_YUKON_UNKNOWN) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); mtx_destroy(&sc->msk_mtx); @@ -1743,6 +1753,10 @@ mskc_attach(device_t dev) sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_OPT: + sc->msk_clock = 125; /* 125 MHz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2; + break; default: sc->msk_clock = 156; /* 156 MHz */ break; Modified: stable/8/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:44:49 2010 (r207720) +++ stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:47:16 2010 (r207721) @@ -145,6 +145,7 @@ #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C #define DEVICEID_MRVL_4380 0x4380 +#define DEVICEID_MRVL_4381 0x4381 /* * D-Link gigabit ethernet device ID @@ -828,6 +829,9 @@ #define Y2_IS_CHK_RX2 BIT_10 /* Descriptor error Rx 2 */ #define Y2_IS_CHK_TXS2 BIT_9 /* Descriptor error TXS 2 */ #define Y2_IS_CHK_TXA2 BIT_8 /* Descriptor error TXA 2 */ +#define Y2_IS_PSM_ACK BIT_7 /* PSM Ack (Yukon Optima) */ +#define Y2_IS_PTP_TIST BIT_6 /* PTP TIme Stamp (Yukon Optima) */ +#define Y2_IS_PHY_QLNK BIT_5 /* PHY Quick Link (Yukon Optima) */ #define Y2_IS_IRQ_PHY1 BIT_4 /* Interrupt from PHY 1 */ #define Y2_IS_IRQ_MAC1 BIT_3 /* Interrupt from MAC 1 */ #define Y2_IS_CHK_RX1 BIT_2 /* Descriptor error Rx 1 */ @@ -894,6 +898,8 @@ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ #define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ #define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ +#define CHIP_ID_YUKON_UNKNOWN 0xbb +#define CHIP_ID_YUKON_OPT 0xbc /* Chip ID for YUKON-2 Optima */ #define CHIP_REV_YU_XL_A0 0 /* Chip Rev. for Yukon-2 A0 */ #define CHIP_REV_YU_XL_A1 1 /* Chip Rev. for Yukon-2 A1 */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:48:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 169B6106566C; Thu, 6 May 2010 18:48:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EFD158FC15; Thu, 6 May 2010 18:48: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 o46Imi6s059365; Thu, 6 May 2010 18:48:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Imiil059362; Thu, 6 May 2010 18:48:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061848.o46Imiil059362@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:48:44 +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: r207722 - stable/7/sys/dev/msk 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, 06 May 2010 18:48:45 -0000 Author: yongari Date: Thu May 6 18:48:44 2010 New Revision: 207722 URL: http://svn.freebsd.org/changeset/base/207722 Log: MFC r207445: Add basic support for Marvell 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.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/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu May 6 18:47:16 2010 (r207721) +++ stable/7/sys/dev/msk/if_msk.c Thu May 6 18:48:44 2010 (r207722) @@ -223,6 +223,8 @@ static struct msk_product { "Marvell Yukon 88E8072 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4380, "Marvell Yukon 88E8057 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4381, + "Marvell Yukon 88E8059 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -239,7 +241,9 @@ static const char *model_name[] = { "Yukon FE", "Yukon FE+", "Yukon Supreme", - "Yukon Ultra 2" + "Yukon Ultra 2", + "Yukon Unknown", + "Yukon Optima", }; static int mskc_probe(device_t); @@ -1142,6 +1146,7 @@ msk_phy_power(struct msk_softc *sc, int case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: case CHIP_ID_YUKON_UL_2: + case CHIP_ID_YUKON_OPT: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1285,6 +1290,10 @@ mskc_reset(struct msk_softc *sc) GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | GMC_BYP_RETR_ON); } + if (sc->msk_hw_id == CHIP_ID_YUKON_OPT && sc->msk_hw_rev == 0) { + /* Disable PCIe PHY powerdown(reg 0x80, bit7). */ + CSR_WRITE_4(sc, Y2_PEX_PHY_DATA, (0x0080 << 16) | 0x0080); + } CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_OFF); /* LED On. */ @@ -1629,8 +1638,9 @@ mskc_attach(device_t dev) sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || - sc->msk_hw_id > CHIP_ID_YUKON_UL_2 || - sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { + sc->msk_hw_id > CHIP_ID_YUKON_OPT || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR || + sc->msk_hw_id == CHIP_ID_YUKON_UNKNOWN) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); mtx_destroy(&sc->msk_mtx); @@ -1743,6 +1753,10 @@ mskc_attach(device_t dev) sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_OPT: + sc->msk_clock = 125; /* 125 MHz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2; + break; default: sc->msk_clock = 156; /* 156 MHz */ break; Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:47:16 2010 (r207721) +++ stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:48:44 2010 (r207722) @@ -145,6 +145,7 @@ #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C #define DEVICEID_MRVL_4380 0x4380 +#define DEVICEID_MRVL_4381 0x4381 /* * D-Link gigabit ethernet device ID @@ -828,6 +829,9 @@ #define Y2_IS_CHK_RX2 BIT_10 /* Descriptor error Rx 2 */ #define Y2_IS_CHK_TXS2 BIT_9 /* Descriptor error TXS 2 */ #define Y2_IS_CHK_TXA2 BIT_8 /* Descriptor error TXA 2 */ +#define Y2_IS_PSM_ACK BIT_7 /* PSM Ack (Yukon Optima) */ +#define Y2_IS_PTP_TIST BIT_6 /* PTP TIme Stamp (Yukon Optima) */ +#define Y2_IS_PHY_QLNK BIT_5 /* PHY Quick Link (Yukon Optima) */ #define Y2_IS_IRQ_PHY1 BIT_4 /* Interrupt from PHY 1 */ #define Y2_IS_IRQ_MAC1 BIT_3 /* Interrupt from MAC 1 */ #define Y2_IS_CHK_RX1 BIT_2 /* Descriptor error Rx 1 */ @@ -894,6 +898,8 @@ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ #define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ #define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ +#define CHIP_ID_YUKON_UNKNOWN 0xbb +#define CHIP_ID_YUKON_OPT 0xbc /* Chip ID for YUKON-2 Optima */ #define CHIP_REV_YU_XL_A0 0 /* Chip Rev. for Yukon-2 A0 */ #define CHIP_REV_YU_XL_A1 1 /* Chip Rev. for Yukon-2 A1 */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:50:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EA8D1065674; Thu, 6 May 2010 18:50:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5E0FF8FC1C; Thu, 6 May 2010 18:50: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 o46IoNNV059772; Thu, 6 May 2010 18:50:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IoN1o059769; Thu, 6 May 2010 18:50:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061850.o46IoN1o059769@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:50:23 +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: r207723 - stable/8/sys/dev/mii 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, 06 May 2010 18:50:23 -0000 Author: yongari Date: Thu May 6 18:50:23 2010 New Revision: 207723 URL: http://svn.freebsd.org/changeset/base/207723 Log: MFC r207446: Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/8/sys/dev/mii/e1000phy.c stable/8/sys/dev/mii/miidevs 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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/mii/e1000phy.c ============================================================================== --- stable/8/sys/dev/mii/e1000phy.c Thu May 6 18:48:44 2010 (r207722) +++ stable/8/sys/dev/mii/e1000phy.c Thu May 6 18:50:23 2010 (r207723) @@ -112,6 +112,7 @@ static const struct mii_phydesc e1000phy MII_PHY_DESC(MARVELL, E1116R), MII_PHY_DESC(MARVELL, E1118), MII_PHY_DESC(MARVELL, E3016), + MII_PHY_DESC(MARVELL, PHYG65G), MII_PHY_DESC(xxMARVELL, E1000), MII_PHY_DESC(xxMARVELL, E1011), MII_PHY_DESC(xxMARVELL, E1000_3), @@ -230,6 +231,7 @@ e1000phy_reset(struct mii_softc *sc) case MII_MODEL_MARVELL_E1116: case MII_MODEL_MARVELL_E1118: case MII_MODEL_MARVELL_E1149: + case MII_MODEL_MARVELL_PHYG65G: /* Disable energy detect mode. */ reg &= ~E1000_SCR_EN_DETECT_MASK; reg |= E1000_SCR_AUTO_X_MODE; Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Thu May 6 18:48:44 2010 (r207722) +++ stable/8/sys/dev/mii/miidevs Thu May 6 18:50:23 2010 (r207723) @@ -254,6 +254,7 @@ model MARVELL E1116 0x0021 Marvell 88E1 model MARVELL E1116R 0x0024 Marvell 88E1116R Gigabit PHY model MARVELL E1118 0x0022 Marvell 88E1118 Gigabit PHY model MARVELL E3016 0x0026 Marvell 88E3016 10/100 Fast Ethernet PHY +model MARVELL PHYG65G 0x0027 Marvell PHYG65G Gigabit PHY model xxMARVELL E1000 0x0005 Marvell 88E1000 Gigabit PHY model xxMARVELL E1011 0x0002 Marvell 88E1011 Gigabit PHY model xxMARVELL E1000_3 0x0003 Marvell 88E1000 Gigabit PHY From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:51:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5981E106564A; Thu, 6 May 2010 18:51:48 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 473F08FC15; Thu, 6 May 2010 18:51:48 +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 o46IpmQe060146; Thu, 6 May 2010 18:51:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IpmLD060143; Thu, 6 May 2010 18:51:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061851.o46IpmLD060143@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:51:48 +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: r207724 - stable/7/sys/dev/mii 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, 06 May 2010 18:51:48 -0000 Author: yongari Date: Thu May 6 18:51:47 2010 New Revision: 207724 URL: http://svn.freebsd.org/changeset/base/207724 Log: MFC r207446: Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/miidevs 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/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Thu May 6 18:50:23 2010 (r207723) +++ stable/7/sys/dev/mii/e1000phy.c Thu May 6 18:51:47 2010 (r207724) @@ -111,6 +111,7 @@ static const struct mii_phydesc e1000phy MII_PHY_DESC(MARVELL, E1116), MII_PHY_DESC(MARVELL, E1118), MII_PHY_DESC(MARVELL, E3016), + MII_PHY_DESC(MARVELL, PHYG65G), MII_PHY_DESC(xxMARVELL, E1000), MII_PHY_DESC(xxMARVELL, E1011), MII_PHY_DESC(xxMARVELL, E1000_3), @@ -229,6 +230,7 @@ e1000phy_reset(struct mii_softc *sc) case MII_MODEL_MARVELL_E1116: case MII_MODEL_MARVELL_E1118: case MII_MODEL_MARVELL_E1149: + case MII_MODEL_MARVELL_PHYG65G: /* Disable energy detect mode. */ reg &= ~E1000_SCR_EN_DETECT_MASK; reg |= E1000_SCR_AUTO_X_MODE; Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Thu May 6 18:50:23 2010 (r207723) +++ stable/7/sys/dev/mii/miidevs Thu May 6 18:51:47 2010 (r207724) @@ -243,6 +243,7 @@ model MARVELL E1111 0x000c Marvell 88E1 model MARVELL E1116 0x0021 Marvell 88E1116 Gigabit PHY model MARVELL E1118 0x0022 Marvell 88E1118 Gigabit PHY model MARVELL E3016 0x0026 Marvell 88E3016 10/100 Fast Ethernet PHY +model MARVELL PHYG65G 0x0027 Marvell PHYG65G Gigabit PHY model xxMARVELL E1000 0x0005 Marvell 88E1000 Gigabit PHY model xxMARVELL E1011 0x0002 Marvell 88E1011 Gigabit PHY model xxMARVELL E1000_3 0x0003 Marvell 88E1000 Gigabit PHY From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:52:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D683B106566C; Thu, 6 May 2010 18:52:41 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C6BB18FC26; Thu, 6 May 2010 18:52: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 o46Iqf7Y060365; Thu, 6 May 2010 18:52:41 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Iqf2s060363; Thu, 6 May 2010 18:52:41 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005061852.o46Iqf2s060363@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 6 May 2010 18:52: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: r207725 - 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, 06 May 2010 18:52:41 -0000 Author: trasz Date: Thu May 6 18:52:41 2010 New Revision: 207725 URL: http://svn.freebsd.org/changeset/base/207725 Log: Avoid overflow. Submitted by: bde@ Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu May 6 18:51:47 2010 (r207724) +++ head/sys/kern/vfs_vnops.c Thu May 6 18:52:41 2010 (r207725) @@ -1348,7 +1348,7 @@ vn_rlimit_fsize(const struct vnode *vp, if (vp->v_type != VREG || td == NULL) return (0); PROC_LOCK(td->td_proc); - if (uio->uio_offset + uio->uio_resid > + if ((uoff_t)uio->uio_offset + uio->uio_resid > lim_cur(td->td_proc, RLIMIT_FSIZE)) { psignal(td->td_proc, SIGXFSZ); PROC_UNLOCK(td->td_proc); From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:53:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1680E1065783; Thu, 6 May 2010 18:53:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 05F7C8FC1F; Thu, 6 May 2010 18:53: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 o46Iqxmw060467; Thu, 6 May 2010 18:52:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IqxBa060465; Thu, 6 May 2010 18:52:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061852.o46IqxBa060465@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:52:59 +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: r207726 - 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: Thu, 06 May 2010 18:53:00 -0000 Author: yongari Date: Thu May 6 18:52:59 2010 New Revision: 207726 URL: http://svn.freebsd.org/changeset/base/207726 Log: MFC r207447: Marvell 88E8059(Yukon Optima) is now supported. Modified: stable/8/share/man/man4/msk.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/msk.4 ============================================================================== --- stable/8/share/man/man4/msk.4 Thu May 6 18:52:41 2010 (r207725) +++ stable/8/share/man/man4/msk.4 Thu May 6 18:52:59 2010 (r207726) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2010 +.Dd April 30, 2010 .Dt MSK 4 .Os .Sh NAME @@ -208,6 +208,8 @@ Marvell Yukon 88E8057 Gigabit Ethernet .It Marvell Yukon 88E8058 Gigabit Ethernet .It +Marvell Yukon 88E8059 Gigabit Ethernet +.It Marvell Yukon 88E8070 Gigabit Ethernet .It Marvell Yukon 88E8071 Gigabit Ethernet From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:53:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72B34106564A; Thu, 6 May 2010 18:53:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6186D8FC1E; Thu, 6 May 2010 18:53: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 o46IrhtJ060683; Thu, 6 May 2010 18:53:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IrhGj060681; Thu, 6 May 2010 18:53:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061853.o46IrhGj060681@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:53:43 +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: r207727 - 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: Thu, 06 May 2010 18:53:44 -0000 Author: yongari Date: Thu May 6 18:53:43 2010 New Revision: 207727 URL: http://svn.freebsd.org/changeset/base/207727 Log: MFC r207447: Marvell 88E8059(Yukon Optima) is now supported. Modified: stable/7/share/man/man4/msk.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/msk.4 ============================================================================== --- stable/7/share/man/man4/msk.4 Thu May 6 18:52:59 2010 (r207726) +++ stable/7/share/man/man4/msk.4 Thu May 6 18:53:43 2010 (r207727) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2010 +.Dd April 30, 2010 .Dt MSK 4 .Os .Sh NAME @@ -208,6 +208,8 @@ Marvell Yukon 88E8057 Gigabit Ethernet .It Marvell Yukon 88E8058 Gigabit Ethernet .It +Marvell Yukon 88E8059 Gigabit Ethernet +.It Marvell Yukon 88E8070 Gigabit Ethernet .It Marvell Yukon 88E8071 Gigabit Ethernet From owner-svn-src-all@FreeBSD.ORG Thu May 6 18:58:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 728ED106564A; Thu, 6 May 2010 18:58:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 611C68FC16; Thu, 6 May 2010 18:58: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 o46IwXiF061788; Thu, 6 May 2010 18:58:33 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IwXwd061775; Thu, 6 May 2010 18:58:33 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005061858.o46IwXwd061775@svn.freebsd.org> From: Alan Cox Date: Thu, 6 May 2010 18:58: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: r207728 - in head/sys: fs/nfsclient fs/nwfs fs/smbfs kern nfsclient ufs/ffs 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: Thu, 06 May 2010 18:58:33 -0000 Author: alc Date: Thu May 6 18:58:32 2010 New Revision: 207728 URL: http://svn.freebsd.org/changeset/base/207728 Log: Eliminate page queues locking around most calls to vm_page_free(). Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/kern/kern_exec.c head/sys/nfsclient/nfs_bio.c head/sys/ufs/ffs/ffs_vnops.c head/sys/vm/device_pager.c head/sys/vm/sg_pager.c head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_object.c head/sys/vm/vnode_pager.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/fs/nfsclient/nfs_clbio.c Thu May 6 18:58:32 2010 (r207728) @@ -134,9 +134,7 @@ ncl_getpages(struct vop_getpages_args *a for (i = 0; i < npages; ++i) { if (i != ap->a_reqpage) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } @@ -177,9 +175,7 @@ ncl_getpages(struct vop_getpages_args *a for (i = 0; i < npages; ++i) { if (i != ap->a_reqpage) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/fs/nwfs/nwfs_io.c Thu May 6 18:58:32 2010 (r207728) @@ -431,9 +431,7 @@ nwfs_getpages(ap) for (i = 0; i < npages; i++) { if (ap->a_reqpage != i) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/fs/smbfs/smbfs_io.c Thu May 6 18:58:32 2010 (r207728) @@ -443,9 +443,7 @@ smbfs_getpages(ap) for (i = 0; i < npages; ++i) { if (i != reqpage) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } @@ -484,9 +482,7 @@ smbfs_getpages(ap) for (i = 0; i < npages; i++) { if (reqpage != i) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/kern/kern_exec.c Thu May 6 18:58:32 2010 (r207728) @@ -948,11 +948,9 @@ exec_map_first_page(imgp) rv = vm_pager_get_pages(object, ma, initial_pagein, 0); ma[0] = vm_page_lookup(object, 0); if ((rv != VM_PAGER_OK) || (ma[0] == NULL)) { - if (ma[0]) { + if (ma[0] != NULL) { vm_page_lock(ma[0]); - vm_page_lock_queues(); vm_page_free(ma[0]); - vm_page_unlock_queues(); vm_page_unlock(ma[0]); } VM_OBJECT_UNLOCK(object); Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/nfsclient/nfs_bio.c Thu May 6 18:58:32 2010 (r207728) @@ -132,9 +132,7 @@ nfs_getpages(struct vop_getpages_args *a for (i = 0; i < npages; ++i) { if (i != ap->a_reqpage) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } @@ -175,9 +173,7 @@ nfs_getpages(struct vop_getpages_args *a for (i = 0; i < npages; ++i) { if (i != ap->a_reqpage) { vm_page_lock(pages[i]); - vm_page_lock_queues(); vm_page_free(pages[i]); - vm_page_unlock_queues(); vm_page_unlock(pages[i]); } } Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/ufs/ffs/ffs_vnops.c Thu May 6 18:58:32 2010 (r207728) @@ -850,9 +850,7 @@ ffs_getpages(ap) for (i = 0; i < pcount; i++) { if (i != ap->a_reqpage) { vm_page_lock(ap->a_m[i]); - vm_page_lock_queues(); vm_page_free(ap->a_m[i]); - vm_page_unlock_queues(); vm_page_unlock(ap->a_m[i]); } } Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/vm/device_pager.c Thu May 6 18:58:32 2010 (r207728) @@ -255,9 +255,7 @@ dev_pager_getpages(object, m, count, req for (i = 0; i < count; i++) { if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } } @@ -272,9 +270,7 @@ dev_pager_getpages(object, m, count, req TAILQ_INSERT_TAIL(&object->un_pager.devp.devp_pglist, page, pageq); for (i = 0; i < count; i++) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } vm_page_insert(page, object, offset); Modified: head/sys/vm/sg_pager.c ============================================================================== --- head/sys/vm/sg_pager.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/vm/sg_pager.c Thu May 6 18:58:32 2010 (r207728) @@ -200,9 +200,7 @@ sg_pager_getpages(vm_object_t object, vm /* Free the original pages and insert this fake page into the object. */ for (i = 0; i < count; i++) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } vm_page_insert(page, object, offset); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/vm/vm_fault.c Thu May 6 18:58:32 2010 (r207728) @@ -164,9 +164,7 @@ unlock_and_deallocate(struct faultstate if (fs->object != fs->first_object) { VM_OBJECT_LOCK(fs->first_object); vm_page_lock(fs->first_m); - vm_page_lock_queues(); vm_page_free(fs->first_m); - vm_page_unlock_queues(); vm_page_unlock(fs->first_m); vm_object_pip_wakeup(fs->first_object); VM_OBJECT_UNLOCK(fs->first_object); @@ -348,9 +346,7 @@ RetryFault:; if (fs.object != fs.first_object) { VM_OBJECT_LOCK(fs.first_object); vm_page_lock(fs.first_m); - vm_page_lock_queues(); vm_page_free(fs.first_m); - vm_page_unlock_queues(); vm_page_unlock(fs.first_m); vm_object_pip_wakeup(fs.first_object); VM_OBJECT_UNLOCK(fs.first_object); @@ -638,9 +634,7 @@ vnode_locked: if (((fs.map != kernel_map) && (rv == VM_PAGER_ERROR)) || (rv == VM_PAGER_BAD)) { vm_page_lock(fs.m); - vm_page_lock_queues(); vm_page_free(fs.m); - vm_page_unlock_queues(); vm_page_unlock(fs.m); fs.m = NULL; unlock_and_deallocate(&fs); @@ -648,9 +642,7 @@ vnode_locked: } if (fs.object != fs.first_object) { vm_page_lock(fs.m); - vm_page_lock_queues(); vm_page_free(fs.m); - vm_page_unlock_queues(); vm_page_unlock(fs.m); fs.m = NULL; /* @@ -764,13 +756,11 @@ vnode_locked: * We don't chase down the shadow chain */ fs.object == fs.first_object->backing_object) { - vm_page_lock(fs.first_m); - vm_page_lock_queues(); /* * get rid of the unnecessary page */ + vm_page_lock(fs.first_m); vm_page_free(fs.first_m); - vm_page_unlock_queues(); vm_page_unlock(fs.first_m); /* * grab the page and put it into the Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/vm/vm_glue.c Thu May 6 18:58:32 2010 (r207728) @@ -258,9 +258,7 @@ vm_imgact_hold_page(vm_object_t object, goto out; if (rv != VM_PAGER_OK) { vm_page_lock(m); - vm_page_lock_queues(); vm_page_free(m); - vm_page_unlock_queues(); vm_page_unlock(m); m = NULL; goto out; @@ -437,10 +435,8 @@ vm_thread_stack_dispose(vm_object_t ksob if (m == NULL) panic("vm_thread_dispose: kstack already missing?"); vm_page_lock(m); - vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_free(m); - vm_page_unlock_queues(); vm_page_unlock(m); } VM_OBJECT_UNLOCK(ksobj); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/vm/vm_object.c Thu May 6 18:58:32 2010 (r207728) @@ -2046,9 +2046,7 @@ vm_object_populate(vm_object_t object, v break; if (rv != VM_PAGER_OK) { vm_page_lock(m); - vm_page_lock_queues(); vm_page_free(m); - vm_page_unlock_queues(); vm_page_unlock(m); break; } Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Thu May 6 18:53:43 2010 (r207727) +++ head/sys/vm/vnode_pager.c Thu May 6 18:58:32 2010 (r207728) @@ -725,9 +725,7 @@ vnode_pager_generic_getpages(vp, m, byte for (i = 0; i < count; i++) if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } PCPU_INC(cnt.v_vnodein); @@ -740,9 +738,7 @@ vnode_pager_generic_getpages(vp, m, byte for (i = 0; i < count; i++) if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } VM_OBJECT_UNLOCK(object); @@ -759,9 +755,7 @@ vnode_pager_generic_getpages(vp, m, byte for (i = 0; i < count; i++) if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } VM_OBJECT_UNLOCK(object); @@ -780,9 +774,7 @@ vnode_pager_generic_getpages(vp, m, byte for (i = 0; i < count; i++) if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } VM_OBJECT_UNLOCK(object); @@ -795,9 +787,7 @@ vnode_pager_generic_getpages(vp, m, byte for (i = 0; i < count; i++) if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } VM_OBJECT_UNLOCK(object); @@ -821,9 +811,7 @@ vnode_pager_generic_getpages(vp, m, byte for (; i < count; i++) if (i != reqpage) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } VM_OBJECT_UNLOCK(object); @@ -840,9 +828,7 @@ vnode_pager_generic_getpages(vp, m, byte (uintmax_t)object->un_pager.vnp.vnp_size); } vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); VM_OBJECT_UNLOCK(object); runend = i + 1; @@ -854,9 +840,7 @@ vnode_pager_generic_getpages(vp, m, byte VM_OBJECT_LOCK(object); for (j = i; j < runend; j++) { vm_page_lock(m[j]); - vm_page_lock_queues(); vm_page_free(m[j]); - vm_page_unlock_queues(); vm_page_unlock(m[j]); } VM_OBJECT_UNLOCK(object); @@ -865,9 +849,7 @@ vnode_pager_generic_getpages(vp, m, byte VM_OBJECT_LOCK(object); for (i = first + runpg; i < count; i++) { vm_page_lock(m[i]); - vm_page_lock_queues(); vm_page_free(m[i]); - vm_page_unlock_queues(); vm_page_unlock(m[i]); } VM_OBJECT_UNLOCK(object); From owner-svn-src-all@FreeBSD.ORG Thu May 6 19:22:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDC251065677; Thu, 6 May 2010 19:22:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BCED48FC0C; Thu, 6 May 2010 19:22: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 o46JMouR067220; Thu, 6 May 2010 19:22:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46JMoWr067215; Thu, 6 May 2010 19:22:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005061922.o46JMoWr067215@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 6 May 2010 19:22: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: r207729 - in head/sys: fs/devfs 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: Thu, 06 May 2010 19:22:50 -0000 Author: kib Date: Thu May 6 19:22:50 2010 New Revision: 207729 URL: http://svn.freebsd.org/changeset/base/207729 Log: Add MAKEDEV_NOWAIT flag to make_dev_credf(9), to create a device node in a no-sleep context. If resource allocation cannot be done without sleep, make_dev_credf() fails and returns NULL. Reviewed by: jh MFC after: 2 weeks Modified: head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_int.h head/sys/kern/kern_conf.c head/sys/sys/conf.h Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Thu May 6 18:58:32 2010 (r207728) +++ head/sys/fs/devfs/devfs_devs.c Thu May 6 19:22:50 2010 (r207729) @@ -115,17 +115,21 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, cdev 0, sizeof(struct cdev_priv), "sizeof(struct cdev_priv)"); struct cdev * -devfs_alloc(void) +devfs_alloc(int flags) { struct cdev_priv *cdp; struct cdev *cdev; struct timespec ts; - cdp = malloc(sizeof *cdp, M_CDEVP, M_USE_RESERVE | M_ZERO | M_WAITOK); + cdp = malloc(sizeof *cdp, M_CDEVP, M_USE_RESERVE | M_ZERO | + ((flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK)); + if (cdp == NULL) + return (NULL); cdp->cdp_dirents = &cdp->cdp_dirent0; cdp->cdp_dirent0 = NULL; cdp->cdp_maxdirent = 0; + cdp->cdp_inode = 0; cdev = &cdp->cdp_c; @@ -133,6 +137,7 @@ devfs_alloc(void) LIST_INIT(&cdev->si_children); vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; + cdev->si_cred = NULL; return (cdev); } Modified: head/sys/fs/devfs/devfs_int.h ============================================================================== --- head/sys/fs/devfs/devfs_int.h Thu May 6 18:58:32 2010 (r207728) +++ head/sys/fs/devfs/devfs_int.h Thu May 6 19:22:50 2010 (r207729) @@ -70,7 +70,7 @@ struct cdev_priv { #define cdev2priv(c) member2struct(cdev_priv, cdp_c, c) -struct cdev *devfs_alloc(void); +struct cdev *devfs_alloc(int); void devfs_free(struct cdev *); void devfs_create(struct cdev *dev); void devfs_destroy(struct cdev *dev); Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Thu May 6 18:58:32 2010 (r207728) +++ head/sys/kern/kern_conf.c Thu May 6 19:22:50 2010 (r207729) @@ -505,7 +505,7 @@ giant_mmap_single(struct cdev *dev, vm_o } static void -notify(struct cdev *dev, const char *ev) +notify(struct cdev *dev, const char *ev, int flags) { static const char prefix[] = "cdev="; char *data; @@ -514,7 +514,8 @@ notify(struct cdev *dev, const char *ev) if (cold) return; namelen = strlen(dev->si_name); - data = malloc(namelen + sizeof(prefix), M_TEMP, M_NOWAIT); + data = malloc(namelen + sizeof(prefix), M_TEMP, + (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); if (data == NULL) return; memcpy(data, prefix, sizeof(prefix) - 1); @@ -524,17 +525,17 @@ notify(struct cdev *dev, const char *ev) } static void -notify_create(struct cdev *dev) +notify_create(struct cdev *dev, int flags) { - notify(dev, "CREATE"); + notify(dev, "CREATE", flags); } static void notify_destroy(struct cdev *dev) { - notify(dev, "DESTROY"); + notify(dev, "DESTROY", MAKEDEV_WAITOK); } static struct cdev * @@ -572,24 +573,27 @@ fini_cdevsw(struct cdevsw *devsw) devsw->d_flags &= ~D_INIT; } -static void -prep_cdevsw(struct cdevsw *devsw) +static int +prep_cdevsw(struct cdevsw *devsw, int flags) { struct cdevsw *dsw2; mtx_assert(&devmtx, MA_OWNED); if (devsw->d_flags & D_INIT) - return; + return (1); if (devsw->d_flags & D_NEEDGIANT) { dev_unlock(); - dsw2 = malloc(sizeof *dsw2, M_DEVT, M_WAITOK); + dsw2 = malloc(sizeof *dsw2, M_DEVT, + (flags & MAKEDEV_NOWAIT) ? M_NOWAIT : M_WAITOK); dev_lock(); + if (dsw2 == NULL && !(devsw->d_flags & D_INIT)) + return (0); } else dsw2 = NULL; if (devsw->d_flags & D_INIT) { if (dsw2 != NULL) cdevsw_free_devlocked(dsw2); - return; + return (1); } if (devsw->d_version != D_VERSION_03) { @@ -647,6 +651,7 @@ prep_cdevsw(struct cdevsw *devsw) if (dsw2 != NULL) cdevsw_free_devlocked(dsw2); + return (1); } static struct cdev * @@ -657,9 +662,15 @@ make_dev_credv(int flags, struct cdevsw struct cdev *dev; int i; - dev = devfs_alloc(); + dev = devfs_alloc(flags); + if (dev == NULL) + return (NULL); dev_lock(); - prep_cdevsw(devsw); + if (!prep_cdevsw(devsw, flags)) { + dev_unlock(); + devfs_free(dev); + return (NULL); + } dev = newdev(devsw, unit, dev); if (flags & MAKEDEV_REF) dev_refl(dev); @@ -686,8 +697,6 @@ make_dev_credv(int flags, struct cdevsw dev->si_flags |= SI_NAMED; if (cr != NULL) dev->si_cred = crhold(cr); - else - dev->si_cred = NULL; dev->si_uid = uid; dev->si_gid = gid; dev->si_mode = mode; @@ -696,7 +705,7 @@ make_dev_credv(int flags, struct cdevsw clean_unrhdrl(devfs_inos); dev_unlock_and_free(); - notify_create(dev); + notify_create(dev, flags); return (dev); } @@ -771,7 +780,7 @@ make_dev_alias(struct cdev *pdev, const int i; KASSERT(pdev != NULL, ("NULL pdev")); - dev = devfs_alloc(); + dev = devfs_alloc(MAKEDEV_WAITOK); dev_lock(); dev->si_flags |= SI_ALIAS; dev->si_flags |= SI_NAMED; @@ -788,7 +797,7 @@ make_dev_alias(struct cdev *pdev, const clean_unrhdrl(devfs_inos); dev_unlock(); - notify_create(dev); + notify_create(dev, MAKEDEV_WAITOK); return (dev); } @@ -973,9 +982,9 @@ clone_create(struct clonedevs **cdp, str * the end of the list. */ unit = *up; - ndev = devfs_alloc(); + ndev = devfs_alloc(MAKEDEV_WAITOK); dev_lock(); - prep_cdevsw(csw); + prep_cdevsw(csw, MAKEDEV_WAITOK); low = extra; de = dl = NULL; cd = *cdp; Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Thu May 6 18:58:32 2010 (r207728) +++ head/sys/sys/conf.h Thu May 6 19:22:50 2010 (r207729) @@ -262,8 +262,10 @@ struct cdev *make_dev(struct cdevsw *_de struct cdev *make_dev_cred(struct cdevsw *_devsw, int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _perms, const char *_fmt, ...) __printflike(7, 8); -#define MAKEDEV_REF 0x1 -#define MAKEDEV_WHTOUT 0x2 +#define MAKEDEV_REF 0x1 +#define MAKEDEV_WHTOUT 0x2 +#define MAKEDEV_NOWAIT 0x4 +#define MAKEDEV_WAITOK 0x8 struct cdev *make_dev_credf(int _flags, struct cdevsw *_devsw, int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, From owner-svn-src-all@FreeBSD.ORG Thu May 6 19:23:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A49DB1065672; Thu, 6 May 2010 19:23:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 94A768FC08; Thu, 6 May 2010 19:23: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 o46JNnAC067456; Thu, 6 May 2010 19:23:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46JNnuX067454; Thu, 6 May 2010 19:23:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005061923.o46JNnuX067454@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 6 May 2010 19:23: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: r207730 - 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: Thu, 06 May 2010 19:23:49 -0000 Author: kib Date: Thu May 6 19:23:49 2010 New Revision: 207730 URL: http://svn.freebsd.org/changeset/base/207730 Log: Document MAKEDEV_NOWAIT flag for make_dev_credf(9). Reviewed by: jh MFC after: 2 weeks Modified: head/share/man/man9/make_dev.9 Modified: head/share/man/man9/make_dev.9 ============================================================================== --- head/share/man/man9/make_dev.9 Thu May 6 19:22:50 2010 (r207729) +++ head/share/man/man9/make_dev.9 Thu May 6 19:23:49 2010 (r207730) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2008 +.Dd May 6, 2010 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -133,9 +133,18 @@ The following values are currently accep .Pp .Bd -literal -offset indent -compact MAKEDEV_REF reference the created device +MAKEDEV_NOWAIT do not sleep, may return NULL +MAKEDEV_WAITOK allow the function to sleep to satisfy malloc .Ed .Pp The +.Dv MAKEDEV_WAITOK +flag is assumed if none of +.Dv MAKEDEV_WAITOK , +.Dv MAKEDEV_NOWAIT +is specified. +.Pp +The .Xr dev_clone 9 event handler shall specify .Dv MAKEDEV_REF From owner-svn-src-all@FreeBSD.ORG Thu May 6 20:54:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5741106566B; Thu, 6 May 2010 20:54:19 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C51FD8FC13; Thu, 6 May 2010 20:54: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 o46KsJBK087524; Thu, 6 May 2010 20:54:19 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46KsJOu087523; Thu, 6 May 2010 20:54:19 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201005062054.o46KsJOu087523@svn.freebsd.org> From: Fabien Thomas Date: Thu, 6 May 2010 20:54: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: r207731 - head/usr.sbin/pmcstat 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, 06 May 2010 20:54:19 -0000 Author: fabient Date: Thu May 6 20:54:19 2010 New Revision: 207731 URL: http://svn.freebsd.org/changeset/base/207731 Log: Exclude undefined symbol from ELF file when doing function resolve. MFC after: 3 days Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Thu May 6 19:23:49 2010 (r207730) +++ head/usr.sbin/pmcstat/pmcstat_log.c Thu May 6 20:54:19 2010 (r207731) @@ -539,6 +539,8 @@ pmcstat_image_add_symbols(struct pmcstat return; if (GELF_ST_TYPE(sym.st_info) != STT_FUNC) continue; + if (sym.st_shndx == STN_UNDEF) + continue; if (!firsttime && pmcstat_symbol_search(image, sym.st_value)) continue; /* We've seen this symbol already. */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 20:58:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88714106566B; Thu, 6 May 2010 20:58:23 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 77E8D8FC14; Thu, 6 May 2010 20:58: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 o46KwNth088460; Thu, 6 May 2010 20:58:23 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46KwNjg088458; Thu, 6 May 2010 20:58:23 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201005062058.o46KwNjg088458@svn.freebsd.org> From: Fabien Thomas Date: Thu, 6 May 2010 20:58: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: r207732 - head/sys/netgraph 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, 06 May 2010 20:58:23 -0000 Author: fabient Date: Thu May 6 20:58:23 2010 New Revision: 207732 URL: http://svn.freebsd.org/changeset/base/207732 Log: Fix an invalid parameter detected by INVARIANT and confirmed by r193272. Modified: head/sys/netgraph/ng_ksocket.c Modified: head/sys/netgraph/ng_ksocket.c ============================================================================== --- head/sys/netgraph/ng_ksocket.c Thu May 6 20:54:19 2010 (r207731) +++ head/sys/netgraph/ng_ksocket.c Thu May 6 20:58:23 2010 (r207732) @@ -1272,7 +1272,7 @@ ng_ksocket_finish_accept(priv_p priv) soupcall_set(so, SO_RCV, ng_ksocket_incoming, node); SOCKBUF_UNLOCK(&so->so_rcv); SOCKBUF_LOCK(&so->so_snd); - soupcall_set(so, SO_RCV, ng_ksocket_incoming, node); + soupcall_set(so, SO_SND, ng_ksocket_incoming, node); SOCKBUF_UNLOCK(&so->so_snd); /* Fill in the response data and send it or return it to the caller */ From owner-svn-src-all@FreeBSD.ORG Thu May 6 21:34:04 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 784DE106567F; Thu, 6 May 2010 21:34:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id E5FE68FC2B; Thu, 6 May 2010 21:34:03 +0000 (UTC) Received: from c122-106-171-133.carlnfd1.nsw.optusnet.com.au (c122-106-171-133.carlnfd1.nsw.optusnet.com.au [122.106.171.133]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o46LXeMK004342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 May 2010 07:33:43 +1000 Date: Fri, 7 May 2010 07:33:41 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: d@delphij.net In-Reply-To: <4BE2F7FF.9070902@delphij.net> Message-ID: <20100507073128.Q19830@delplex.bde.org> References: <201005052124.o45LOJES067973@svn.freebsd.org> <20100506105825.B18998@delplex.bde.org> <4BE2F7FF.9070902@delphij.net> 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, Xin LI , Bruce Evans Subject: Re: svn commit: r207677 - head/usr.bin/find 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, 06 May 2010 21:34:04 -0000 On Thu, 6 May 2010, Xin LI wrote: > On 2010/05/05 18:00, Bruce Evans wrote: >> On Wed, 5 May 2010, Xin LI wrote: >> >>> Log: >>> Move SCCS tags to comments as they were already #if 0'ed. >> >> This is explicitly disrecommended in style(9): >> ... > > Sorry for that. I thought that the style(9) approach actually creates > more diffs but I'll obey these rule. Thanks. The rule is to minimise diffs. It doesn't quite do that, but at least it prevents the VCS id itself showing up on changed lines (or at all in plain diffs). Bruce From owner-svn-src-all@FreeBSD.ORG Thu May 6 21:57:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B998B106566B; Thu, 6 May 2010 21:57:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9828FC0C; Thu, 6 May 2010 21:57: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 o46LvcSX001559; Thu, 6 May 2010 21:57:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Lvc4m001557; Thu, 6 May 2010 21:57:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005062157.o46Lvc4m001557@svn.freebsd.org> From: Xin LI Date: Thu, 6 May 2010 21:57: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: r207733 - head/usr.bin/rpcgen 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, 06 May 2010 21:57:38 -0000 Author: delphij Date: Thu May 6 21:57:38 2010 New Revision: 207733 URL: http://svn.freebsd.org/changeset/base/207733 Log: Plug a memory leak. MFC after: 2 weeks Modified: head/usr.bin/rpcgen/rpc_cout.c Modified: head/usr.bin/rpcgen/rpc_cout.c ============================================================================== --- head/usr.bin/rpcgen/rpc_cout.c Thu May 6 20:58:23 2010 (r207732) +++ head/usr.bin/rpcgen/rpc_cout.c Thu May 6 21:57:38 2010 (r207733) @@ -489,6 +489,7 @@ inline_struct(definition *def, int flag) } size = 0; i = 0; + free(sizestr); sizestr = NULL; print_stat(indent + 1, &dl->decl); } From owner-svn-src-all@FreeBSD.ORG Thu May 6 22:06:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A5F31065755; Thu, 6 May 2010 22:06:15 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 42CE08FC19; Thu, 6 May 2010 22:06: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 o46M6FjU003517; Thu, 6 May 2010 22:06:15 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46M6FXB003515; Thu, 6 May 2010 22:06:15 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005062206.o46M6FXB003515@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 6 May 2010 22:06: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: r207734 - 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: Thu, 06 May 2010 22:06:15 -0000 Author: jilles Date: Thu May 6 22:06:14 2010 New Revision: 207734 URL: http://svn.freebsd.org/changeset/base/207734 Log: sigaltstack(2): document some modernizations: * un-document 'struct sigaltstack' tag for stack_t as this is BSD-specific; this doesn't seem useful enough to document as such * alternate stacks are per thread, not per process * update error codes to what the kernel does and POSIX requires MFC after: 1 week Modified: head/lib/libc/sys/sigaltstack.2 Modified: head/lib/libc/sys/sigaltstack.2 ============================================================================== --- head/lib/libc/sys/sigaltstack.2 Thu May 6 21:57:38 2010 (r207733) +++ head/lib/libc/sys/sigaltstack.2 Thu May 6 22:06:14 2010 (r207734) @@ -28,7 +28,7 @@ .\" @(#)sigaltstack.2 8.2 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd May 1, 1995 +.Dd May 6, 2010 .Dt SIGALTSTACK 2 .Os .Sh NAME @@ -39,7 +39,7 @@ .Sh SYNOPSIS .In signal.h .Bd -literal -typedef struct sigaltstack { +typedef struct { char *ss_sp; size_t ss_size; int ss_flags; @@ -51,25 +51,25 @@ typedef struct sigaltstack { The .Fn sigaltstack system call -allows users to define an alternate stack on which signals -are to be processed. +allows defining an alternate stack on which signals +are to be processed for the current thread. If .Fa ss is non-zero, it specifies a pointer to and the size of a .Em "signal stack" -on which to deliver signals, -and tells the system if the process is currently executing -on that stack. +on which to deliver signals. When a signal's action indicates its handler should execute on the signal stack (specified with a .Xr sigaction 2 system call), the system checks to see -if the process is currently executing on that stack. -If the process is not currently executing on the signal stack, +if the thread is currently executing on that stack. +If the thread is not currently executing on the signal stack, the system arranges a switch to the signal stack for the duration of the signal handler's execution. .Pp +An active stack cannot be modified. +.Pp If .Dv SS_DISABLE is set in @@ -78,12 +78,6 @@ is set in and .Fa ss_size are ignored and the signal stack will be disabled. -Trying to disable an active stack will cause -.Fn sigaltstack -to return -1 with -.Va errno -set to -.Er EINVAL . A disabled stack will cause all signals to be taken on the regular user stack. If the stack is later re-enabled then all signals that were specified @@ -96,7 +90,7 @@ The .Fa ss_flags field will contain the value .Dv SS_ONSTACK -if the process is currently on a signal stack and +if the thread is currently on a signal stack and .Dv SS_DISABLE if the signal stack is currently disabled. .Sh NOTES @@ -146,8 +140,12 @@ or .Fa oss points to memory that is not a valid part of the process address space. +.It Bq Er EPERM +An attempt was made to modify an active stack. .It Bq Er EINVAL -An attempt was made to disable an active stack. +The +.Fa ss_flags +field was invalid. .It Bq Er ENOMEM Size of alternate stack area is less than or equal to .Dv MINSIGSTKSZ . From owner-svn-src-all@FreeBSD.ORG Thu May 6 22:49:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C76CA106566B; Thu, 6 May 2010 22:49:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B56148FC17; Thu, 6 May 2010 22:49: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 o46MnsfN013119; Thu, 6 May 2010 22:49:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Mnser013107; Thu, 6 May 2010 22:49:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005062249.o46Mnser013107@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 6 May 2010 22:49: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: r207735 - in head: lib/libc/gen lib/libc/sys usr.bin/lastcomm 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, 06 May 2010 22:49:54 -0000 Author: jilles Date: Thu May 6 22:49:54 2010 New Revision: 207735 URL: http://svn.freebsd.org/changeset/base/207735 Log: Update xrefs from 4.3BSD to modern signal functions in various man pages. sigvec(2) references have been updated to sigaction(2), sigsetmask(2) and sigblock(2) to sigprocmask(2), sigpause(2) to sigsuspend(2). Some legacy man pages still refer to them, that is OK. Modified: head/lib/libc/gen/alarm.3 head/lib/libc/gen/siginterrupt.3 head/lib/libc/gen/ualarm.3 head/lib/libc/sys/execve.2 head/lib/libc/sys/fcntl.2 head/lib/libc/sys/getitimer.2 head/lib/libc/sys/getrlimit.2 head/lib/libc/sys/sigaction.2 head/lib/libc/sys/sigreturn.2 head/lib/libc/sys/vfork.2 head/usr.bin/lastcomm/lastcomm.1 Modified: head/lib/libc/gen/alarm.3 ============================================================================== --- head/lib/libc/gen/alarm.3 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/gen/alarm.3 Thu May 6 22:49:54 2010 (r207735) @@ -76,8 +76,7 @@ If no alarm is currently set, the return .Sh SEE ALSO .Xr setitimer 2 , .Xr sigaction 2 , -.Xr sigpause 2 , -.Xr sigvec 2 , +.Xr sigsuspend 2 , .Xr signal 3 , .Xr sleep 3 , .Xr ualarm 3 , Modified: head/lib/libc/gen/siginterrupt.3 ============================================================================== --- head/lib/libc/gen/siginterrupt.3 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/gen/siginterrupt.3 Thu May 6 22:49:54 2010 (r207735) @@ -109,9 +109,8 @@ is not a valid signal number. .El .Sh SEE ALSO .Xr sigaction 2 , -.Xr sigblock 2 , -.Xr sigpause 2 , -.Xr sigsetmask 2 , +.Xr sigprocmask 2 , +.Xr sigsuspend 2 , .Xr signal 3 .Sh HISTORY The Modified: head/lib/libc/gen/ualarm.3 ============================================================================== --- head/lib/libc/gen/ualarm.3 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/gen/ualarm.3 Thu May 6 22:49:54 2010 (r207735) @@ -84,8 +84,8 @@ A microsecond is 0.000001 seconds. .Sh SEE ALSO .Xr getitimer 2 , .Xr setitimer 2 , -.Xr sigpause 2 , -.Xr sigvec 2 , +.Xr sigaction 2 , +.Xr sigsuspend 2 , .Xr alarm 3 , .Xr signal 3 , .Xr sleep 3 , Modified: head/lib/libc/sys/execve.2 ============================================================================== --- head/lib/libc/sys/execve.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/execve.2 Thu May 6 22:49:54 2010 (r207735) @@ -189,8 +189,8 @@ the calling process: .It interval timers Ta see Xr getitimer 2 .It resource limits Ta see Xr getrlimit 2 .It file mode mask Ta see Xr umask 2 -.It signal mask Ta see Xr sigvec 2 , -.Xr sigsetmask 2 +.It signal mask Ta see Xr sigaction 2 , +.Xr sigprocmask 2 .El .Pp When a program is executed as a result of an Modified: head/lib/libc/sys/fcntl.2 ============================================================================== --- head/lib/libc/sys/fcntl.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/fcntl.2 Thu May 6 22:49:54 2010 (r207735) @@ -618,7 +618,7 @@ for the reasons as stated in .Xr flock 2 , .Xr getdtablesize 2 , .Xr open 2 , -.Xr sigvec 2 , +.Xr sigaction 2 , .Xr lockf 3 , .Xr tcgetpgrp 3 , .Xr tcsetpgrp 3 Modified: head/lib/libc/sys/getitimer.2 ============================================================================== --- head/lib/libc/sys/getitimer.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/getitimer.2 Thu May 6 22:49:54 2010 (r207735) @@ -171,7 +171,7 @@ to be handled. .Sh SEE ALSO .Xr gettimeofday 2 , .Xr select 2 , -.Xr sigvec 2 , +.Xr sigaction 2 , .Xr clocks 7 .Sh HISTORY The Modified: head/lib/libc/sys/getrlimit.2 ============================================================================== --- head/lib/libc/sys/getrlimit.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/getrlimit.2 Thu May 6 22:49:54 2010 (r207735) @@ -193,7 +193,7 @@ raised the maximum limit value, and the .Xr quota 1 , .Xr quotactl 2 , .Xr sigaltstack 2 , -.Xr sigvec 2 , +.Xr sigaction 2 , .Xr sysctl 3 , .Xr ulimit 3 .Sh HISTORY Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/sigaction.2 Thu May 6 22:49:54 2010 (r207735) @@ -609,13 +609,9 @@ or .Xr kill 2 , .Xr ptrace 2 , .Xr sigaltstack 2 , -.Xr sigblock 2 , -.Xr sigpause 2 , .Xr sigpending 2 , .Xr sigprocmask 2 , -.Xr sigsetmask 2 , .Xr sigsuspend 2 , -.Xr sigvec 2 , .Xr wait 2 , .Xr fpsetmask 3 , .Xr setjmp 3 , Modified: head/lib/libc/sys/sigreturn.2 ============================================================================== --- head/lib/libc/sys/sigreturn.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/sigreturn.2 Thu May 6 22:49:54 2010 (r207735) @@ -83,7 +83,7 @@ The process status longword is invalid o raise the privilege level of the process. .El .Sh SEE ALSO -.Xr sigvec 2 , +.Xr sigaction 2 , .Xr setjmp 3 , .Xr ucontext 3 .Sh HISTORY Modified: head/lib/libc/sys/vfork.2 ============================================================================== --- head/lib/libc/sys/vfork.2 Thu May 6 22:06:14 2010 (r207734) +++ head/lib/libc/sys/vfork.2 Thu May 6 22:49:54 2010 (r207735) @@ -104,7 +104,7 @@ Same as for .Xr _exit 2 , .Xr fork 2 , .Xr rfork 2 , -.Xr sigvec 2 , +.Xr sigaction 2 , .Xr wait 2 , .Xr exit 3 .Sh HISTORY Modified: head/usr.bin/lastcomm/lastcomm.1 ============================================================================== --- head/usr.bin/lastcomm/lastcomm.1 Thu May 6 22:06:14 2010 (r207734) +++ head/usr.bin/lastcomm/lastcomm.1 Thu May 6 22:49:54 2010 (r207735) @@ -168,7 +168,7 @@ while will print details of each terminating command. .Sh SEE ALSO .Xr last 1 , -.Xr sigvec 2 , +.Xr sigaction 2 , .Xr acct 5 , .Xr core 5 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Fri May 7 00:41:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70466106566B; Fri, 7 May 2010 00:41:13 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5C13F8FC1C; Fri, 7 May 2010 00:41: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 o470fDU2037414; Fri, 7 May 2010 00:41:13 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o470fDOU037408; Fri, 7 May 2010 00:41:13 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201005070041.o470fDOU037408@svn.freebsd.org> From: Kirk McKusick Date: Fri, 7 May 2010 00:41: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: r207736 - in head: contrib/top lib/libc/sys lib/libutil libexec/rpc.rquotad sbin/quotacheck sys/ufs/ufs usr.bin/quota usr.sbin/edquota usr.sbin/quotaon usr.sbin/repquota 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, 07 May 2010 00:41:13 -0000 Author: mckusick Date: Fri May 7 00:41:12 2010 New Revision: 207736 URL: http://svn.freebsd.org/changeset/base/207736 Log: Merger of the quota64 project into head. This joint work of Dag-Erling Smørgrav and myself updates the FFS quota system to support both traditional 32-bit and new 64-bit quotas (for those of you who want to put 2+Tb quotas on your users). By default quotas are not compiled into the kernel. To include them in your kernel configuration you need to specify: options QUOTA # Enable FFS quotas If you are already running with the current 32-bit quotas, they should continue to work just as they have in the past. If you wish to convert to using 64-bit quotas, use `quotacheck -c 64'; if you wish to revert from 64-bit quotas back to 32-bit quotas, use `quotacheck -c 32'. There is a new library of functions to simplify the use of the quota system, do `man quotafile' for details. If your application is currently using the quotactl(2), it is highly recommended that you convert your application to use the quotafile interface. Note that existing binaries will continue to work. Special thanks to John Kozubik of rsync.net for getting me interested in pursuing 64-bit quota support and for funding part of my development time on this project. Added: head/lib/libutil/quotafile.3 - copied unchanged from r207707, projects/quota64/lib/libutil/quotafile.3 head/lib/libutil/quotafile.c - copied unchanged from r207707, projects/quota64/lib/libutil/quotafile.c Modified: head/lib/libc/sys/quotactl.2 head/lib/libutil/Makefile head/lib/libutil/libutil.h head/libexec/rpc.rquotad/Makefile head/libexec/rpc.rquotad/rquotad.c head/sbin/quotacheck/Makefile head/sbin/quotacheck/preen.c head/sbin/quotacheck/quotacheck.8 head/sbin/quotacheck/quotacheck.c head/sbin/quotacheck/quotacheck.h head/sys/ufs/ufs/quota.h head/sys/ufs/ufs/ufs_quota.c head/sys/ufs/ufs/ufs_vfsops.c head/sys/ufs/ufs/ufsmount.h head/usr.bin/quota/Makefile head/usr.bin/quota/quota.c head/usr.sbin/edquota/Makefile head/usr.sbin/edquota/edquota.8 head/usr.sbin/edquota/edquota.c head/usr.sbin/quotaon/Makefile head/usr.sbin/quotaon/quotaon.c head/usr.sbin/repquota/Makefile head/usr.sbin/repquota/repquota.8 head/usr.sbin/repquota/repquota.c Directory Properties: head/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/contrib/bind9/ (props changed) head/contrib/ee/ (props changed) head/contrib/expat/ (props changed) head/contrib/file/ (props changed) head/contrib/gdb/ (props changed) head/contrib/gdtoa/ (props changed) head/contrib/gnu-sort/ (props changed) head/contrib/groff/ (props changed) head/contrib/less/ (props changed) head/contrib/libpcap/ (props changed) head/contrib/ncurses/ (props changed) head/contrib/netcat/ (props changed) head/contrib/ntp/ (props changed) head/contrib/one-true-awk/ (props changed) head/contrib/openbsm/ (props changed) head/contrib/openpam/ (props changed) head/contrib/pf/ (props changed) head/contrib/sendmail/ (props changed) head/contrib/tcpdump/ (props changed) head/contrib/tcsh/ (props changed) head/contrib/top/ (props changed) head/contrib/top/install-sh (props changed) head/contrib/tzcode/stdtime/ (props changed) head/contrib/tzcode/zic/ (props changed) head/contrib/tzdata/ (props changed) head/contrib/wpa/ (props changed) head/crypto/openssh/ (props changed) head/crypto/openssl/ (props changed) head/lib/libc/ (props changed) head/lib/libc/stdtime/ (props changed) head/lib/libutil/ (props changed) head/lib/libz/ (props changed) head/sbin/ (props changed) head/sbin/ipfw/ (props changed) head/share/zoneinfo/ (props changed) head/sys/ (props changed) head/sys/amd64/include/xen/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/pf/ (props changed) head/sys/contrib/x86emu/ (props changed) head/sys/dev/xen/xenpci/ (props changed) head/usr.bin/csup/ (props changed) head/usr.bin/procstat/ (props changed) head/usr.sbin/zic/ (props changed) Modified: head/lib/libc/sys/quotactl.2 ============================================================================== --- head/lib/libc/sys/quotactl.2 Thu May 6 22:49:54 2010 (r207735) +++ head/lib/libc/sys/quotactl.2 Fri May 7 00:41:12 2010 (r207736) @@ -84,7 +84,7 @@ and group identifiers (GRPQUOTA). The .Dq ufs specific commands are: -.Bl -tag -width Q_QUOTAOFFxx +.Bl -tag -width Q_GETQUOTASIZEx .It Dv Q_QUOTAON Enable disk quotas for the file system specified by .Fa path . @@ -110,6 +110,17 @@ and .Fa id arguments are unused. Only the super-user may turn quotas off. +.It Dv Q_GETQUOTASIZE +Get the wordsize used to represent the quotas for the user or group +(as determined by the command type). +Possible values are 32 for the old-style quota file +and 64 for the new-style quota file. +The +.Fa addr +argument is a pointer to an integer into which the size is stored. +The identifier +.Fa id +is not used. .It Dv Q_GETQUOTA Get disk quota limits and current usage for the user or group (as determined by the command type) with identifier @@ -177,9 +188,11 @@ The argument or the command type is invalid. In -.Dv Q_GETQUOTA -and +.Dv Q_GETQUOTASIZE , +.Dv Q_GETQUOTA , .Dv Q_SETQUOTA , +and +.Dv Q_SETUSE , quotas are not currently enabled for this file system. .Pp The @@ -208,7 +221,8 @@ Too many symbolic links were encountered .It Bq Er EROFS In .Dv Q_QUOTAON , -the quota file resides on a read-only file system. +either the file system on which quotas are to be enabled is mounted read-only +or the quota file resides on a read-only file system. .It Bq Er EIO An .Tn I/O Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Thu May 6 22:49:54 2010 (r207735) +++ head/lib/libutil/Makefile Fri May 7 00:41:12 2010 (r207736) @@ -12,7 +12,7 @@ SRCS= _secure_path.c auth.c expand_numbe hexdump.c humanize_number.c kinfo_getfile.c kinfo_getvmmap.c kld.c \ login_auth.c login_cap.c \ login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \ - pidfile.c property.c pty.c pw_util.c realhostname.c \ + pidfile.c property.c pty.c pw_util.c quotafile.c realhostname.c \ stub.c trimdomain.c uucplock.c INCS= libutil.h login_cap.h @@ -29,7 +29,7 @@ MAN+= kld.3 login_auth.3 login_tty.3 pty _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \ realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \ pidfile.3 flopen.3 expand_number.3 hexdump.3 \ - kinfo_getfile.3 kinfo_getvmmap.3 + kinfo_getfile.3 kinfo_getvmmap.3 quotafile.3 MAN+= login.conf.5 auth.conf.5 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+= property.3 properties_read.3 property.3 properties_free.3 @@ -57,5 +57,13 @@ MLINKS+=pidfile.3 pidfile_open.3 \ pidfile.3 pidfile_write.3 \ pidfile.3 pidfile_close.3 \ pidfile.3 pidfile_remove.3 +MLINKS+=quotafile.3 quota_open.3 \ + quotafile.3 quota_fsname.3 \ + quotafile.3 quota_qfname.3 \ + quotafile.3 quota_statfs.3 \ + quotafile.3 quota_read.3 \ + quotafile.3 quota_write_limits.3 \ + quotafile.3 quota_write_usage.3 \ + quotafile.3 quota_close.3 .include Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Thu May 6 22:49:54 2010 (r207735) +++ head/lib/libutil/libutil.h Fri May 7 00:41:12 2010 (r207736) @@ -164,6 +164,23 @@ int pidfile_close(struct pidfh *pfh); int pidfile_remove(struct pidfh *pfh); #endif +#ifdef _UFS_UFS_QUOTA_H_ +struct quotafile; +struct fstab; +struct quotafile *quota_open(struct fstab *, int, int); +void quota_close(struct quotafile *); +int quota_on(struct quotafile *); +int quota_off(struct quotafile *); +const char *quota_fsname(const struct quotafile *); +const char *quota_qfname(const struct quotafile *); +int quota_maxid(struct quotafile *); +int quota_check_path(const struct quotafile *, const char *path); +int quota_read(struct quotafile *, struct dqblk *, int); +int quota_write_limits(struct quotafile *, struct dqblk *, int); +int quota_write_usage(struct quotafile *, struct dqblk *, int); +int quota_convert(struct quotafile *, int); +#endif + __END_DECLS #define UU_LOCK_INUSE (1) Copied: head/lib/libutil/quotafile.3 (from r207707, projects/quota64/lib/libutil/quotafile.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/quotafile.3 Fri May 7 00:41:12 2010 (r207736, copy of r207707, projects/quota64/lib/libutil/quotafile.3) @@ -0,0 +1,290 @@ +.\"- +.\" Copyright (c) 2009 Dag-Erling Coïdan Smørgrav and +.\" Marshall Kirk McKusick. 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 December 28, 2009 +.Dt QUOTAFILE 3 +.Os +.Sh NAME +.Nm quota_open +.Nm quota_close +.Nm quota_on +.Nm quota_off +.Nm quota_read +.Nm quota_write_limits +.Nm quota_write_usage +.Nm quota_fsname +.Nm quota_qfname +.Nm quota_maxid +.Nm quota_check_path +.Nm quota_convert +.Nd "Manipulate quotas" +.Sh LIBRARY +.Lb libutil +.Sh SYNOPSIS +.In sys/param.h +.In sys/mount.h +.In ufs/ufs/quota.h +.In fcntl.h +.In fstab.h +.In libutil.h +.Ft "struct quotafile *" +.Fn quota_open "struct fstab *fs" "int quotatype" "int openflags" +.Ft int +.Fn quota_close "struct quotafile *qf" +.Ft int +.Fn quota_on "const struct quotafile *qf" +.Ft int +.Fn quota_off "const struct quotafile *qf" +.Ft int +.Fn quota_read "struct quotafile *qf" "struct dqblk *dqb" "int id" +.Ft int +.Fn quota_write_limits "struct quotafile *qf" "struct dqblk *dqb" "int id" +.Ft int +.Fn quota_write_usage "struct quotafile *qf" "struct dqblk *dqb" "int id" +.Ft "const char *" +.Fn quota_fsname "const struct quotafile *qf" +.Ft "const char *" +.Fn quota_qfname "const struct quotafile *qf" +.Ft int +.Fn quota_maxid "const struct quotafile *qf" +.Ft int +.Fn quota_check_path "const struct quotafile *qf" "const char *path" +.Ft int +.Fn quota_convert "struct quotafile *qf" "int wordsize" +.Sh DESCRIPTION +These functions are designed to simplify access to filesystem quotas. +If quotas are active on a filesystem, +these functions will access them directly from the kernel using the +.Fn quotactl +system call. +If quotas are not active, +these functions will access them by reading and writing +the quota files directly. +.Pp +The +.Fn quota_open +function takes a pointer to an +.Vt fstab +entry corresponding to the filesystem on which quotas +are to be accessed. +The +.Va quotatype +field indicates the type of quotas being sought, either +.Dv USRQUOTA +or +.Dv GRPQUOTA . +The +.Va openflags +are those used by the +.Fn open +system call, usually either +.Dv O_RDONLY +if the quotas are just to be read, or +.Dv O_RDWR +if the quotas are to be updated. +The +.Dv O_CREAT +flag should be specified if a new quota file of the requested type +should be created if it does not already exist. +.Pp +The +.Fn quota_close +function closes any open file descriptors and frees any storage +associated with the filesystem and quota type referenced by +.Va qf . +.Pp +The +.Fn quota_on +function enables quotas for the filesystem associated with its +.Va qf +argument which may have been opened +.Dv O_RDONLY +or +.Dv O_RDWR . +The +.Fn quota_on +function returns 0 if successful; +otherwise the value\~-1 is returned and the global variable +.Va errno +is set to indicate the error, see +.Xr quotactl 2 +for the possible errors. +.Pp +The +.Fn quota_off +function disables quotas for the filesystem associated with its +.Va qf +argument which may have been opened +.Dv O_RDONLY +or +.Dv O_RDWR . +The +.Fn quota_off +function returns 0 if successful; +otherwise the value\~-1 is returned and the global variable +.Va errno +is set to indicate the error, see +.Xr quotactl 2 +for the possible errors. +.Pp +The +.Fn quota_read +function reads the quota from the filesystem and quota type referenced by +.Va qf +for the user (or group) specified by +.Va id +into the +.Vt dqblk +quota structure pointed to by +.Va dqb . +.Pp +The +.Fn quota_write_limits +function updates the limit fields (but not the usage fields) +for the filesystem and quota type referenced by +.Va qf +for the user (or group) specified by +.Va id +from the +.Vt dqblk +quota structure pointed to by +.Va dqb . +.Pp +The +.Fn quota_write_usage +function updates the usage fields (but not the limit fields) +for the filesystem and quota type referenced by +.Va qf +for the user (or group) specified by +.Va id +from the +.Vt dqblk +quota structure pointed to by +.Va dqb . +.Pp +The +.Fn quota_fsname +function returns a pointer to a buffer containing the path to the root +of the file system that corresponds to its +.Va qf +argument, as listed in +.Pa /etc/fstab . +Note that this may be a symbolic link to the actual directory. +.Pp +The +.Fn quota_qfname +function returns a pointer to a buffer containing the name of the +quota file that corresponds to its +.Va qf +argument. +Note that this may be a symbolic link to the actual file. +.Pp +The +.Fn quota_maxid +function returns the maximum user (or group) +.Va id +contained in the quota file associated with its +.Va qf +argument. +.Pp +The +.Fn quota_check_path +function checks if the specified path is within the filesystem that +corresponds to its +.Va qf +argument. +If the +.Va path +argument refers to a symbolic link, +.Fn quota_check_path +will follow it. +.Pp +The +.Fn quota_convert +function converts the quota file associated with its +.Va qf +argument to the data size specified by its +.Va wordsize +argument. +The supported wordsize arguments are 32 for the old 32-bit +quota file format and 64 for the new 64-bit quota file format. +The +.Fn quota_convert +function may only be called to operate on quota files that +are not currently active. +.Sh IMPLEMENTATION NOTES +If the underlying quota file is in or converted to the old 32-bit format, +limit and usage values written to the quota file will be clipped to 32 bits. +.Sh RETURN VALUES +If the filesystem has quotas associated with it, +.Fn quota_open +returns a pointer to a +.Vt quotafile +structure used in subsequent quota access calls. +If the filesystem has no quotas, or access permission is denied +.Dv NULL +is returned and +.Va errno +is set to indicate the error. +.Pp +The +.Fn quota_check_path +function returns\~1 for a positive result and\~0 for a negative +result. +If an error occurs, it returns\~-1 and sets +.Va errno +to indicate the error. +.Pp +The +.Fn quota_read , +.Fn quota_write_limits , +.Fn quota_write_usage , +.Fn quota_convert , +and +.Fn quota_close +functions return zero on success. +On error they return\~-1 +and set +.Va errno +to indicate the error. +.Sh SEE ALSO +.Xr quotactl 2 , +.Xr quota.user 5 , +.Xr quota.group 5 +.Sh HISTORY +The +.Nm quotafile +functions first appeared in +.Fx 8.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm quotafile +functions and this manual page were written by +.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org +and +.An Marshall Kirk McKusick Aq mckusick@mckusick.com . Copied: head/lib/libutil/quotafile.c (from r207707, projects/quota64/lib/libutil/quotafile.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/quotafile.c Fri May 7 00:41:12 2010 (r207736, copy of r207707, projects/quota64/lib/libutil/quotafile.c) @@ -0,0 +1,593 @@ +/*- + * Copyright (c) 2008 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2008 Marshall Kirk McKusick + * 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 + * in this position and unchanged. + * 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$ + */ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct quotafile { + int fd; /* -1 means using quotactl for access */ + int accmode; /* access mode */ + int wordsize; /* 32-bit or 64-bit limits */ + int quotatype; /* USRQUOTA or GRPQUOTA */ + dev_t dev; /* device */ + char fsname[MAXPATHLEN + 1]; /* mount point of filesystem */ + char qfname[MAXPATHLEN + 1]; /* quota file if not using quotactl */ +}; + +static const char *qfextension[] = INITQFNAMES; + +/* + * Check to see if a particular quota is to be enabled. + */ +static int +hasquota(struct fstab *fs, int type, char *qfnamep, int qfbufsize) +{ + char *opt; + char *cp; + struct statfs sfb; + char buf[BUFSIZ]; + static char initname, usrname[100], grpname[100]; + + /* + * 1) we only need one of these + * 2) fstab may specify a different filename + */ + if (!initname) { + (void)snprintf(usrname, sizeof(usrname), "%s%s", + qfextension[USRQUOTA], QUOTAFILENAME); + (void)snprintf(grpname, sizeof(grpname), "%s%s", + qfextension[GRPQUOTA], QUOTAFILENAME); + initname = 1; + } + strcpy(buf, fs->fs_mntops); + for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) { + if ((cp = index(opt, '='))) + *cp++ = '\0'; + if (type == USRQUOTA && strcmp(opt, usrname) == 0) + break; + if (type == GRPQUOTA && strcmp(opt, grpname) == 0) + break; + } + if (!opt) + return (0); + /* + * Ensure that the filesystem is mounted. + */ + if (statfs(fs->fs_file, &sfb) != 0 || + strcmp(fs->fs_file, sfb.f_mntonname)) { + return (0); + } + if (cp) { + strncpy(qfnamep, cp, qfbufsize); + } else { + (void)snprintf(qfnamep, qfbufsize, "%s/%s.%s", fs->fs_file, + QUOTAFILENAME, qfextension[type]); + } + return (1); +} + +struct quotafile * +quota_open(struct fstab *fs, int quotatype, int openflags) +{ + struct quotafile *qf; + struct dqhdr64 dqh; + struct group *grp; + struct stat st; + int qcmd, serrno; + + if (strcmp(fs->fs_vfstype, "ufs")) + return (NULL); + if ((qf = calloc(1, sizeof(*qf))) == NULL) + return (NULL); + qf->fd = -1; + qf->quotatype = quotatype; + strncpy(qf->fsname, fs->fs_file, sizeof(qf->fsname)); + if (stat(qf->fsname, &st) != 0) + goto error; + qf->dev = st.st_dev; + serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname)); + qcmd = QCMD(Q_GETQUOTASIZE, quotatype); + if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) == 0) + return (qf); + if (serrno == 0) { + errno = EOPNOTSUPP; + goto error; + } + qf->accmode = openflags & O_ACCMODE; + if ((qf->fd = open(qf->qfname, qf->accmode)) < 0 && + (openflags & O_CREAT) != O_CREAT) + goto error; + /* File open worked, so process it */ + if (qf->fd != -1) { + qf->wordsize = 32; + switch (read(qf->fd, &dqh, sizeof(dqh))) { + case -1: + goto error; + case sizeof(dqh): + if (strcmp(dqh.dqh_magic, Q_DQHDR64_MAGIC) != 0) { + /* no magic, assume 32 bits */ + qf->wordsize = 32; + return (qf); + } + if (be32toh(dqh.dqh_version) != Q_DQHDR64_VERSION || + be32toh(dqh.dqh_hdrlen) != sizeof(struct dqhdr64) || + be32toh(dqh.dqh_reclen) != sizeof(struct dqblk64)) { + /* correct magic, wrong version / lengths */ + errno = EINVAL; + goto error; + } + qf->wordsize = 64; + return (qf); + default: + qf->wordsize = 32; + return (qf); + } + /* not reached */ + } + /* open failed, but O_CREAT was specified, so create a new file */ + if ((qf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC, 0)) < 0) + goto error; + qf->wordsize = 64; + memset(&dqh, 0, sizeof(dqh)); + memcpy(dqh.dqh_magic, Q_DQHDR64_MAGIC, sizeof(dqh.dqh_magic)); + dqh.dqh_version = htobe32(Q_DQHDR64_VERSION); + dqh.dqh_hdrlen = htobe32(sizeof(struct dqhdr64)); + dqh.dqh_reclen = htobe32(sizeof(struct dqblk64)); + if (write(qf->fd, &dqh, sizeof(dqh)) != sizeof(dqh)) { + /* it was one we created ourselves */ + unlink(qf->qfname); + goto error; + } + grp = getgrnam(QUOTAGROUP); + fchown(qf->fd, 0, grp ? grp->gr_gid : 0); + fchmod(qf->fd, 0640); + return (qf); +error: + serrno = errno; + /* did we have an open file? */ + if (qf->fd != -1) + close(qf->fd); + free(qf); + errno = serrno; + return (NULL); +} + +void +quota_close(struct quotafile *qf) +{ + + if (qf->fd != -1) + close(qf->fd); + free(qf); +} + +int +quota_on(struct quotafile *qf) +{ + int qcmd; + + qcmd = QCMD(Q_QUOTAON, qf->quotatype); + return (quotactl(qf->fsname, qcmd, 0, qf->qfname)); +} + +int +quota_off(struct quotafile *qf) +{ + + return (quotactl(qf->fsname, QCMD(Q_QUOTAOFF, qf->quotatype), 0, 0)); +} + +const char * +quota_fsname(const struct quotafile *qf) +{ + + return (qf->fsname); +} + +const char * +quota_qfname(const struct quotafile *qf) +{ + + return (qf->qfname); +} + +int +quota_check_path(const struct quotafile *qf, const char *path) +{ + struct stat st; + + if (stat(path, &st) == -1) + return (-1); + return (st.st_dev == qf->dev); +} + +int +quota_maxid(struct quotafile *qf) +{ + struct stat st; + int maxid; + + if (stat(qf->qfname, &st) < 0) + return (0); + switch (qf->wordsize) { + case 32: + maxid = st.st_size / sizeof(struct dqblk32) - 1; + break; + case 64: + maxid = st.st_size / sizeof(struct dqblk64) - 2; + break; + default: + maxid = 0; + break; + } + return (maxid > 0 ? maxid : 0); +} + +static int +quota_read32(struct quotafile *qf, struct dqblk *dqb, int id) +{ + struct dqblk32 dqb32; + off_t off; + + off = id * sizeof(struct dqblk32); + if (lseek(qf->fd, off, SEEK_SET) == -1) + return (-1); + switch (read(qf->fd, &dqb32, sizeof(dqb32))) { + case 0: + memset(dqb, 0, sizeof(*dqb)); + return (0); + case sizeof(dqb32): + dqb->dqb_bhardlimit = dqb32.dqb_bhardlimit; + dqb->dqb_bsoftlimit = dqb32.dqb_bsoftlimit; + dqb->dqb_curblocks = dqb32.dqb_curblocks; + dqb->dqb_ihardlimit = dqb32.dqb_ihardlimit; + dqb->dqb_isoftlimit = dqb32.dqb_isoftlimit; + dqb->dqb_curinodes = dqb32.dqb_curinodes; + dqb->dqb_btime = dqb32.dqb_btime; + dqb->dqb_itime = dqb32.dqb_itime; + return (0); + default: + return (-1); + } +} + +static int +quota_read64(struct quotafile *qf, struct dqblk *dqb, int id) +{ + struct dqblk64 dqb64; + off_t off; + + off = sizeof(struct dqhdr64) + id * sizeof(struct dqblk64); + if (lseek(qf->fd, off, SEEK_SET) == -1) + return (-1); + switch (read(qf->fd, &dqb64, sizeof(dqb64))) { + case 0: + memset(dqb, 0, sizeof(*dqb)); + return (0); + case sizeof(dqb64): + dqb->dqb_bhardlimit = be64toh(dqb64.dqb_bhardlimit); + dqb->dqb_bsoftlimit = be64toh(dqb64.dqb_bsoftlimit); + dqb->dqb_curblocks = be64toh(dqb64.dqb_curblocks); + dqb->dqb_ihardlimit = be64toh(dqb64.dqb_ihardlimit); + dqb->dqb_isoftlimit = be64toh(dqb64.dqb_isoftlimit); + dqb->dqb_curinodes = be64toh(dqb64.dqb_curinodes); + dqb->dqb_btime = be64toh(dqb64.dqb_btime); + dqb->dqb_itime = be64toh(dqb64.dqb_itime); + return (0); + default: + return (-1); + } +} + +int +quota_read(struct quotafile *qf, struct dqblk *dqb, int id) +{ + int qcmd; + + if (qf->fd == -1) { + qcmd = QCMD(Q_GETQUOTA, qf->quotatype); + return (quotactl(qf->fsname, qcmd, id, dqb)); + } + switch (qf->wordsize) { + case 32: + return (quota_read32(qf, dqb, id)); + case 64: + return (quota_read64(qf, dqb, id)); + default: + errno = EINVAL; + return (-1); + } + /* not reached */ +} + +#define CLIP32(u64) ((u64) > UINT32_MAX ? UINT32_MAX : (uint32_t)(u64)) + +static int +quota_write32(struct quotafile *qf, const struct dqblk *dqb, int id) +{ + struct dqblk32 dqb32; + off_t off; + + dqb32.dqb_bhardlimit = CLIP32(dqb->dqb_bhardlimit); + dqb32.dqb_bsoftlimit = CLIP32(dqb->dqb_bsoftlimit); + dqb32.dqb_curblocks = CLIP32(dqb->dqb_curblocks); + dqb32.dqb_ihardlimit = CLIP32(dqb->dqb_ihardlimit); + dqb32.dqb_isoftlimit = CLIP32(dqb->dqb_isoftlimit); + dqb32.dqb_curinodes = CLIP32(dqb->dqb_curinodes); + dqb32.dqb_btime = CLIP32(dqb->dqb_btime); + dqb32.dqb_itime = CLIP32(dqb->dqb_itime); + + off = id * sizeof(struct dqblk32); + if (lseek(qf->fd, off, SEEK_SET) == -1) + return (-1); + if (write(qf->fd, &dqb32, sizeof(dqb32)) == sizeof(dqb32)) + return (0); + return (-1); +} + +static int +quota_write64(struct quotafile *qf, const struct dqblk *dqb, int id) +{ + struct dqblk64 dqb64; + off_t off; + + dqb64.dqb_bhardlimit = htobe64(dqb->dqb_bhardlimit); + dqb64.dqb_bsoftlimit = htobe64(dqb->dqb_bsoftlimit); + dqb64.dqb_curblocks = htobe64(dqb->dqb_curblocks); + dqb64.dqb_ihardlimit = htobe64(dqb->dqb_ihardlimit); + dqb64.dqb_isoftlimit = htobe64(dqb->dqb_isoftlimit); + dqb64.dqb_curinodes = htobe64(dqb->dqb_curinodes); + dqb64.dqb_btime = htobe64(dqb->dqb_btime); + dqb64.dqb_itime = htobe64(dqb->dqb_itime); + + off = sizeof(struct dqhdr64) + id * sizeof(struct dqblk64); + if (lseek(qf->fd, off, SEEK_SET) == -1) + return (-1); + if (write(qf->fd, &dqb64, sizeof(dqb64)) == sizeof(dqb64)) + return (0); + return (-1); +} + +int +quota_write_usage(struct quotafile *qf, struct dqblk *dqb, int id) +{ + struct dqblk dqbuf; + int qcmd; + + if (qf->fd == -1) { + qcmd = QCMD(Q_SETUSE, qf->quotatype); + return (quotactl(qf->fsname, qcmd, id, dqb)); + } + /* + * Have to do read-modify-write of quota in file. + */ + if ((qf->accmode & O_RDWR) != O_RDWR) { + errno = EBADF; + return (-1); + } + if (quota_read(qf, &dqbuf, id) != 0) + return (-1); + /* + * Reset time limit if have a soft limit and were + * previously under it, but are now over it. + */ + if (dqbuf.dqb_bsoftlimit && id != 0 && + dqbuf.dqb_curblocks < dqbuf.dqb_bsoftlimit && + dqb->dqb_curblocks >= dqbuf.dqb_bsoftlimit) + dqbuf.dqb_btime = 0; + if (dqbuf.dqb_isoftlimit && id != 0 && + dqbuf.dqb_curinodes < dqbuf.dqb_isoftlimit && + dqb->dqb_curinodes >= dqbuf.dqb_isoftlimit) + dqbuf.dqb_itime = 0; + dqbuf.dqb_curinodes = dqb->dqb_curinodes; + dqbuf.dqb_curblocks = dqb->dqb_curblocks; + /* + * Write it back. + */ + switch (qf->wordsize) { + case 32: + return (quota_write32(qf, &dqbuf, id)); + case 64: + return (quota_write64(qf, &dqbuf, id)); + default: + errno = EINVAL; + return (-1); + } + /* not reached */ +} + +int +quota_write_limits(struct quotafile *qf, struct dqblk *dqb, int id) +{ + struct dqblk dqbuf; + int qcmd; + + if (qf->fd == -1) { + qcmd = QCMD(Q_SETQUOTA, qf->quotatype); + return (quotactl(qf->fsname, qcmd, id, dqb)); + } + /* + * Have to do read-modify-write of quota in file. + */ + if ((qf->accmode & O_RDWR) != O_RDWR) { + errno = EBADF; + return (-1); + } + if (quota_read(qf, &dqbuf, id) != 0) + return (-1); + /* + * Reset time limit if have a soft limit and were + * previously under it, but are now over it + * or if there previously was no soft limit, but + * now have one and are over it. + */ + if (dqbuf.dqb_bsoftlimit && id != 0 && + dqbuf.dqb_curblocks < dqbuf.dqb_bsoftlimit && + dqbuf.dqb_curblocks >= dqb->dqb_bsoftlimit) + dqb->dqb_btime = 0; + if (dqbuf.dqb_bsoftlimit == 0 && id != 0 && + dqb->dqb_bsoftlimit > 0 && + dqbuf.dqb_curblocks >= dqb->dqb_bsoftlimit) + dqb->dqb_btime = 0; + if (dqbuf.dqb_isoftlimit && id != 0 && + dqbuf.dqb_curinodes < dqbuf.dqb_isoftlimit && + dqbuf.dqb_curinodes >= dqb->dqb_isoftlimit) + dqb->dqb_itime = 0; + if (dqbuf.dqb_isoftlimit == 0 && id !=0 && + dqb->dqb_isoftlimit > 0 && + dqbuf.dqb_curinodes >= dqb->dqb_isoftlimit) + dqb->dqb_itime = 0; + dqb->dqb_curinodes = dqbuf.dqb_curinodes; + dqb->dqb_curblocks = dqbuf.dqb_curblocks; + /* + * Write it back. + */ + switch (qf->wordsize) { + case 32: + return (quota_write32(qf, dqb, id)); + case 64: + return (quota_write64(qf, dqb, id)); + default: + errno = EINVAL; + return (-1); + } + /* not reached */ +} + +/* + * Convert a quota file from one format to another. + */ +int +quota_convert(struct quotafile *qf, int wordsize) +{ + struct quotafile *newqf; + struct dqhdr64 dqh; + struct dqblk dqblk; + struct group *grp; + int serrno, maxid, id, fd; + + /* + * Quotas must not be active and quotafile must be open + * for reading and writing. + */ + if ((qf->accmode & O_RDWR) != O_RDWR || qf->fd == -1) { + errno = EBADF; + return (-1); + } + if ((wordsize != 32 && wordsize != 64) || + wordsize == qf->wordsize) { + errno = EINVAL; + return (-1); + } + maxid = quota_maxid(qf); + if ((newqf = calloc(1, sizeof(*qf))) == NULL) { + errno = ENOMEM; + return (-1); + } + *newqf = *qf; + snprintf(newqf->qfname, MAXPATHLEN + 1, "%s_%d.orig", qf->qfname, + qf->wordsize); + if (rename(qf->qfname, newqf->qfname) < 0) { + free(newqf); + return (-1); + } + if ((newqf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC, 0)) < 0) { + serrno = errno; + goto error; + } + newqf->wordsize = wordsize; + if (wordsize == 64) { + memset(&dqh, 0, sizeof(dqh)); + memcpy(dqh.dqh_magic, Q_DQHDR64_MAGIC, sizeof(dqh.dqh_magic)); + dqh.dqh_version = htobe32(Q_DQHDR64_VERSION); + dqh.dqh_hdrlen = htobe32(sizeof(struct dqhdr64)); + dqh.dqh_reclen = htobe32(sizeof(struct dqblk64)); + if (write(newqf->fd, &dqh, sizeof(dqh)) != sizeof(dqh)) { + serrno = errno; + goto error; + } + } + grp = getgrnam(QUOTAGROUP); + fchown(newqf->fd, 0, grp ? grp->gr_gid : 0); + fchmod(newqf->fd, 0640); + for (id = 0; id <= maxid; id++) { + if ((quota_read(qf, &dqblk, id)) < 0) + break; + switch (newqf->wordsize) { + case 32: + if ((quota_write32(newqf, &dqblk, id)) < 0) + break; + continue; + case 64: + if ((quota_write64(newqf, &dqblk, id)) < 0) + break; + continue; + default: + errno = EINVAL; + break; + } + } + if (id < maxid) { + serrno = errno; + goto error; + } + /* + * Update the passed in quotafile to reference the new file + * of the converted format size. + */ + fd = qf->fd; + qf->fd = newqf->fd; + newqf->fd = fd; + qf->wordsize = newqf->wordsize; + quota_close(newqf); + return (0); +error: + /* put back the original file */ + (void) rename(newqf->qfname, qf->qfname); + quota_close(newqf); + errno = serrno; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 7 04:14:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03095106567C; Fri, 7 May 2010 04:14:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E7B638FC1F; Fri, 7 May 2010 04:14: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 o474E7p2084393; Fri, 7 May 2010 04:14:07 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o474E7tR084390; Fri, 7 May 2010 04:14:07 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005070414.o474E7tR084390@svn.freebsd.org> From: Alan Cox Date: Fri, 7 May 2010 04:14: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: r207738 - 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: Fri, 07 May 2010 04:14:08 -0000 Author: alc Date: Fri May 7 04:14:07 2010 New Revision: 207738 URL: http://svn.freebsd.org/changeset/base/207738 Log: Push down the page queues lock into vm_page_deactivate(). Eliminate an incorrect comment. Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri May 7 04:04:24 2010 (r207737) +++ head/sys/vm/vm_fault.c Fri May 7 04:14:07 2010 (r207738) @@ -138,9 +138,7 @@ release_page(struct faultstate *fs) vm_page_wakeup(fs->m); vm_page_lock(fs->m); - vm_page_lock_queues(); vm_page_deactivate(fs->m); - vm_page_unlock_queues(); vm_page_unlock(fs->m); fs->m = NULL; } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri May 7 04:04:24 2010 (r207737) +++ head/sys/vm/vm_page.c Fri May 7 04:14:07 2010 (r207738) @@ -1618,10 +1618,8 @@ vm_page_unwire(vm_page_t m, int activate } } - /* - * Move the specified page to the inactive queue. If the page has - * any associated swap, the swap is deallocated. + * Move the specified page to the inactive queue. * * Normally athead is 0 resulting in LRU operation. athead is set * to 1 if we want this page to be 'as if it were placed in the cache', @@ -1633,7 +1631,6 @@ static inline void _vm_page_deactivate(vm_page_t m, int athead) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); vm_page_lock_assert(m, MA_OWNED); /* @@ -1642,6 +1639,7 @@ _vm_page_deactivate(vm_page_t m, int ath if (VM_PAGE_INQUEUE2(m, PQ_INACTIVE)) return; if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { + vm_page_lock_queues(); vm_page_flag_clear(m, PG_WINATCFLS); vm_pageq_remove(m); if (athead) @@ -1650,13 +1648,20 @@ _vm_page_deactivate(vm_page_t m, int ath TAILQ_INSERT_TAIL(&vm_page_queues[PQ_INACTIVE].pl, m, pageq); VM_PAGE_SETQUEUE2(m, PQ_INACTIVE); cnt.v_inactive_count++; + vm_page_unlock_queues(); } } +/* + * Move the specified page to the inactive queue. + * + * The page must be locked. + */ void vm_page_deactivate(vm_page_t m) { - _vm_page_deactivate(m, 0); + + _vm_page_deactivate(m, 0); } /* From owner-svn-src-all@FreeBSD.ORG Fri May 7 05:23:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 962A51065677; Fri, 7 May 2010 05:23:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 868E88FC15; Fri, 7 May 2010 05:23: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 o475NFTv099388; Fri, 7 May 2010 05:23:15 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o475NFCq099385; Fri, 7 May 2010 05:23:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005070523.o475NFCq099385@svn.freebsd.org> From: Alan Cox Date: Fri, 7 May 2010 05:23: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: r207739 - in head/sys: 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: Fri, 07 May 2010 05:23:15 -0000 Author: alc Date: Fri May 7 05:23:15 2010 New Revision: 207739 URL: http://svn.freebsd.org/changeset/base/207739 Log: Eliminate acquisitions of the page queues lock that are no longer needed. Switch to a per-processor counter for the number of pages freed during process termination. Modified: head/sys/sys/vmmeter.h head/sys/vm/vm_object.c Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Fri May 7 04:14:07 2010 (r207738) +++ head/sys/sys/vmmeter.h Fri May 7 05:23:15 2010 (r207739) @@ -74,7 +74,7 @@ struct vmmeter { u_int v_tcached; /* (q) total pages cached */ u_int v_dfree; /* (q) pages freed by daemon */ - u_int v_pfree; /* (q) pages freed by exiting processes */ + u_int v_pfree; /* (p) pages freed by exiting processes */ u_int v_tfree; /* (p) total pages freed */ /* * Distribution of page usages. Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri May 7 04:14:07 2010 (r207738) +++ head/sys/vm/vm_object.c Fri May 7 05:23:15 2010 (r207739) @@ -722,14 +722,11 @@ vm_object_terminate(vm_object_t object) ("vm_object_terminate: freeing busy page %p " "p->busy = %d, p->oflags %x\n", p, p->busy, p->oflags)); vm_page_lock(p); - vm_page_lock_queues(); if (p->wire_count == 0) { vm_page_free(p); - cnt.v_pfree++; - } else { + PCPU_INC(cnt.v_pfree); + } else vm_page_remove(p); - } - vm_page_unlock_queues(); vm_page_unlock(p); } @@ -1634,14 +1631,12 @@ vm_object_backing_scan(vm_object_t objec * can simply destroy it. */ vm_page_lock(p); - vm_page_lock_queues(); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); if (p->wire_count == 0) vm_page_free(p); else vm_page_remove(p); - vm_page_unlock_queues(); vm_page_unlock(p); p = next; continue; @@ -1660,14 +1655,12 @@ vm_object_backing_scan(vm_object_t objec * Leave the parent's page alone */ vm_page_lock(p); - vm_page_lock_queues(); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); if (p->wire_count == 0) vm_page_free(p); else vm_page_remove(p); - vm_page_unlock_queues(); vm_page_unlock(p); p = next; continue; From owner-svn-src-all@FreeBSD.ORG Fri May 7 06:58:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0CD41065670; Fri, 7 May 2010 06:58:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 911298FC15; Fri, 7 May 2010 06:58: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 o476wrVr020383; Fri, 7 May 2010 06:58:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o476wroB020381; Fri, 7 May 2010 06:58:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005070658.o476wroB020381@svn.freebsd.org> From: Alan Cox Date: Fri, 7 May 2010 06:58: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: r207740 - 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: Fri, 07 May 2010 06:58:53 -0000 Author: alc Date: Fri May 7 06:58:53 2010 New Revision: 207740 URL: http://svn.freebsd.org/changeset/base/207740 Log: Update the synchronization requirements for the page usage count. Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri May 7 05:23:15 2010 (r207739) +++ head/sys/vm/vm_page.h Fri May 7 06:58:53 2010 (r207740) @@ -116,7 +116,7 @@ struct vm_page { u_int wire_count; /* wired down maps refs (P) */ short hold_count; /* page hold count (P) */ u_short oflags; /* page flags (O) */ - u_char act_count; /* page usage count (Q) */ + u_char act_count; /* page usage count (P) */ u_char busy; /* page busy count (O) */ /* NOTE that these must support one bit per DEV_BSIZE in a page!!! */ /* so, on normal X86 kernels, they must be at least 8 bits wide */ From owner-svn-src-all@FreeBSD.ORG Fri May 7 08:20:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7083B1065673; Fri, 7 May 2010 08:20:56 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 604E88FC1B; Fri, 7 May 2010 08:20: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 o478KuHJ038387; Fri, 7 May 2010 08:20:56 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o478Kunr038385; Fri, 7 May 2010 08:20:56 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201005070820.o478Kunr038385@svn.freebsd.org> From: Jeff Roberson Date: Fri, 7 May 2010 08:20: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: r207741 - head/sys/ufs/ffs 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, 07 May 2010 08:20:56 -0000 Author: jeff Date: Fri May 7 08:20:56 2010 New Revision: 207741 URL: http://svn.freebsd.org/changeset/base/207741 Log: - Use the correct flag mask when determining whether an inode has successfully made it to the free list yet or not. This fixes a deadlock that can occur with unlinked but referenced files. Journal space and inodedeps were not correctly reclaimed because the inode block was not left dirty. Tested/Reported by: lwindschuh@googlemail.com Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri May 7 06:58:53 2010 (r207740) +++ head/sys/ufs/ffs/ffs_softdep.c Fri May 7 08:20:56 2010 (r207741) @@ -9301,7 +9301,7 @@ handle_written_inodeblock(inodedep, bp) hadchanges = 1; } /* Leave this inodeblock dirty until it's in the list. */ - if ((inodedep->id_state & (UNLINKED | DEPCOMPLETE)) == UNLINKED) + if ((inodedep->id_state & (UNLINKED | UNLINKONLIST)) == UNLINKED) hadchanges = 1; /* * If we had to rollback the inode allocation because of From owner-svn-src-all@FreeBSD.ORG Fri May 7 08:45:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 428661065676; Fri, 7 May 2010 08:45:22 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 31BBF8FC12; Fri, 7 May 2010 08:45: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 o478jM7q043760; Fri, 7 May 2010 08:45:22 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o478jMXO043757; Fri, 7 May 2010 08:45:22 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201005070845.o478jMXO043757@svn.freebsd.org> From: Jeff Roberson Date: Fri, 7 May 2010 08:45: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: r207742 - head/sys/ufs/ffs 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, 07 May 2010 08:45:22 -0000 Author: jeff Date: Fri May 7 08:45:21 2010 New Revision: 207742 URL: http://svn.freebsd.org/changeset/base/207742 Log: - Call softdep_prealloc() before any of the balloc routines in the snapshot code. - Don't fsync() vnodes in prealloc if copy on write is in progress. It is not safe to recurse back into the write path here. Reported by: Vladimir Grebenschikov Modified: head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Fri May 7 08:20:56 2010 (r207741) +++ head/sys/ufs/ffs/ffs_snapshot.c Fri May 7 08:45:21 2010 (r207742) @@ -1002,6 +1002,8 @@ expunge_ufs1(snapvp, cancelip, fs, acctf if (lbn < NDADDR) { blkno = VTOI(snapvp)->i_din1->di_db[lbn]; } else { + if (DOINGSOFTDEP(snapvp)) + softdep_prealloc(snapvp, MNT_WAIT); td->td_pflags |= TDP_COWINPROGRESS; error = ffs_balloc_ufs1(snapvp, lblktosize(fs, (off_t)lbn), fs->fs_bsize, KERNCRED, BA_METAONLY, &bp); @@ -1283,6 +1285,8 @@ expunge_ufs2(snapvp, cancelip, fs, acctf if (lbn < NDADDR) { blkno = VTOI(snapvp)->i_din2->di_db[lbn]; } else { + if (DOINGSOFTDEP(snapvp)) + softdep_prealloc(snapvp, MNT_WAIT); td->td_pflags |= TDP_COWINPROGRESS; error = ffs_balloc_ufs2(snapvp, lblktosize(fs, (off_t)lbn), fs->fs_bsize, KERNCRED, BA_METAONLY, &bp); @@ -1746,6 +1750,8 @@ retry: goto retry; TAILQ_FOREACH(ip, &sn->sn_head, i_nextsnap) { vp = ITOV(ip); + if (DOINGSOFTDEP(vp)) + softdep_prealloc(vp, MNT_WAIT); /* * Lookup block being written. */ @@ -2268,6 +2274,8 @@ ffs_copyonwrite(devvp, bp) } TAILQ_FOREACH(ip, &sn->sn_head, i_nextsnap) { vp = ITOV(ip); + if (DOINGSOFTDEP(vp)) + softdep_prealloc(vp, MNT_WAIT); /* * We ensure that everything of our own that needs to be * copied will be done at the time that ffs_snapshot is Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri May 7 08:20:56 2010 (r207741) +++ head/sys/ufs/ffs/ffs_softdep.c Fri May 7 08:45:21 2010 (r207742) @@ -2475,7 +2475,8 @@ softdep_prealloc(vp, waitok) * Attempt to sync this vnode once to flush any journal * work attached to it. */ - ffs_syncvnode(vp, waitok); + if ((curthread->td_pflags & TDP_COWINPROGRESS) == 0) + ffs_syncvnode(vp, waitok); ACQUIRE_LOCK(&lk); process_removes(vp); if (journal_space(ump, 0) == 0) { From owner-svn-src-all@FreeBSD.ORG Fri May 7 11:12:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A5C71065674; Fri, 7 May 2010 11:12:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id ED6F98FC0C; Fri, 7 May 2010 11:11: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 o47BBxML078767; Fri, 7 May 2010 11:11:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47BBxjs078766; Fri, 7 May 2010 11:11:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005071111.o47BBxjs078766@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 7 May 2010 11:11:59 +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: r207743 - stable/8/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: Fri, 07 May 2010 11:12:00 -0000 Author: kib Date: Fri May 7 11:11:58 2010 New Revision: 207743 URL: http://svn.freebsd.org/changeset/base/207743 Log: MFC r207606: Fix typo in comment. Modified: stable/8/sys/kern/kern_thread.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_thread.c ============================================================================== --- stable/8/sys/kern/kern_thread.c Fri May 7 08:45:21 2010 (r207742) +++ stable/8/sys/kern/kern_thread.c Fri May 7 11:11:58 2010 (r207743) @@ -398,7 +398,7 @@ thread_exit(void) /* * The test below is NOT true if we are the - * sole exiting thread. P_STOPPED_SNGL is unset + * sole exiting thread. P_STOPPED_SINGLE is unset * in exit1() after it is the only survivor. */ if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { From owner-svn-src-all@FreeBSD.ORG Fri May 7 11:17:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B42651065674; Fri, 7 May 2010 11:17:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A32018FC1E; Fri, 7 May 2010 11:17: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 o47BHKe2080019; Fri, 7 May 2010 11:17:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47BHK4E080017; Fri, 7 May 2010 11:17:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005071117.o47BHK4E080017@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 7 May 2010 11:17: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: r207744 - stable/7/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: Fri, 07 May 2010 11:17:20 -0000 Author: kib Date: Fri May 7 11:17:20 2010 New Revision: 207744 URL: http://svn.freebsd.org/changeset/base/207744 Log: MFC r207606: Fix typo in comment. Modified: stable/7/sys/kern/kern_thread.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/kern/kern_thread.c ============================================================================== --- stable/7/sys/kern/kern_thread.c Fri May 7 11:11:58 2010 (r207743) +++ stable/7/sys/kern/kern_thread.c Fri May 7 11:17:20 2010 (r207744) @@ -469,7 +469,7 @@ thread_exit(void) /* * The test below is NOT true if we are the - * sole exiting thread. P_STOPPED_SNGL is unset + * sole exiting thread. P_STOPPED_SINGLE is unset * in exit1() after it is the only survivor. */ if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { From owner-svn-src-all@FreeBSD.ORG Fri May 7 14:30:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFC24106566B; Fri, 7 May 2010 14:30:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BF7808FC1C; Fri, 7 May 2010 14:30: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 o47EULRS022324; Fri, 7 May 2010 14:30:21 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47EULv6022323; Fri, 7 May 2010 14:30:21 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005071430.o47EULv6022323@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 7 May 2010 14:30: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: r207745 - 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: Fri, 07 May 2010 14:30:21 -0000 Author: trasz Date: Fri May 7 14:30:21 2010 New Revision: 207745 URL: http://svn.freebsd.org/changeset/base/207745 Log: Enforce RLIMIT_FSIZE in ZFS. Reviewed by: pjd@ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c 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 Fri May 7 11:17:20 2010 (r207744) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri May 7 14:30:21 2010 (r207745) @@ -3977,6 +3977,9 @@ zfs_freebsd_write(ap) } */ *ap; { + if (vn_rlimit_fsize(ap->a_vp, ap->a_uio, ap->a_uio->uio_td)) + return (EFBIG); + return (zfs_write(ap->a_vp, ap->a_uio, ap->a_ioflag, ap->a_cred, NULL)); } From owner-svn-src-all@FreeBSD.ORG Fri May 7 15:49:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64100106566C; Fri, 7 May 2010 15:49:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 522DE8FC12; Fri, 7 May 2010 15:49: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 o47FniW7040487; Fri, 7 May 2010 15:49:44 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47FniP8040479; Fri, 7 May 2010 15:49:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005071549.o47FniP8040479@svn.freebsd.org> From: Alan Cox Date: Fri, 7 May 2010 15:49: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: r207746 - in head/sys: fs/nfsclient fs/nwfs fs/smbfs nfsclient 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: Fri, 07 May 2010 15:49:44 -0000 Author: alc Date: Fri May 7 15:49:43 2010 New Revision: 207746 URL: http://svn.freebsd.org/changeset/base/207746 Log: Push down the page queues lock into vm_page_activate(). Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/nfsclient/nfs_bio.c head/sys/vm/vm_fault.c head/sys/vm/vm_page.c head/sys/vm/vnode_pager.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/fs/nfsclient/nfs_clbio.c Fri May 7 15:49:43 2010 (r207746) @@ -196,9 +196,6 @@ ncl_getpages(struct vop_getpages_args *a nextoff = toff + PAGE_SIZE; m = pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); - if (nextoff <= size) { /* * Read operation filled an entire page @@ -236,18 +233,22 @@ ncl_getpages(struct vop_getpages_args *a * now tell them that it is ok to use. */ if (!error) { - if (m->oflags & VPO_WANTED) + if (m->oflags & VPO_WANTED) { + vm_page_lock(m); vm_page_activate(m); - else + vm_page_unlock(m); + } else { + vm_page_lock(m); vm_page_deactivate(m); + vm_page_unlock(m); + } vm_page_wakeup(m); } else { + vm_page_lock(m); vm_page_free(m); + vm_page_unlock(m); } } - - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); return (0); Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/fs/nwfs/nwfs_io.c Fri May 7 15:49:43 2010 (r207746) @@ -446,9 +446,6 @@ nwfs_getpages(ap) nextoff = toff + PAGE_SIZE; m = pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); - if (nextoff <= size) { m->valid = VM_PAGE_BITS_ALL; KASSERT(m->dirty == 0, @@ -474,18 +471,22 @@ nwfs_getpages(ap) * now tell them that it is ok to use. */ if (!error) { - if (m->oflags & VPO_WANTED) + if (m->oflags & VPO_WANTED) { + vm_page_lock(m); vm_page_activate(m); - else + vm_page_unlock(m); + } else { + vm_page_lock(m); vm_page_deactivate(m); + vm_page_unlock(m); + } vm_page_wakeup(m); } else { + vm_page_lock(m); vm_page_free(m); + vm_page_unlock(m); } } - - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); return 0; Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/fs/smbfs/smbfs_io.c Fri May 7 15:49:43 2010 (r207746) @@ -497,9 +497,6 @@ smbfs_getpages(ap) nextoff = toff + PAGE_SIZE; m = pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); - if (nextoff <= size) { /* * Read operation filled an entire page @@ -538,18 +535,22 @@ smbfs_getpages(ap) * now tell them that it is ok to use. */ if (!error) { - if (m->oflags & VPO_WANTED) + if (m->oflags & VPO_WANTED) { + vm_page_lock(m); vm_page_activate(m); - else + vm_page_unlock(m); + } else { + vm_page_lock(m); vm_page_deactivate(m); + vm_page_unlock(m); + } vm_page_wakeup(m); } else { + vm_page_lock(m); vm_page_free(m); + vm_page_unlock(m); } } - - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); return 0; Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/nfsclient/nfs_bio.c Fri May 7 15:49:43 2010 (r207746) @@ -194,9 +194,6 @@ nfs_getpages(struct vop_getpages_args *a nextoff = toff + PAGE_SIZE; m = pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); - if (nextoff <= size) { /* * Read operation filled an entire page @@ -234,18 +231,22 @@ nfs_getpages(struct vop_getpages_args *a * now tell them that it is ok to use. */ if (!error) { - if (m->oflags & VPO_WANTED) + if (m->oflags & VPO_WANTED) { + vm_page_lock(m); vm_page_activate(m); - else + vm_page_unlock(m); + } else { + vm_page_lock(m); vm_page_deactivate(m); + vm_page_unlock(m); + } vm_page_wakeup(m); } else { + vm_page_lock(m); vm_page_free(m); + vm_page_unlock(m); } } - - vm_page_unlock_queues(); - vm_page_unlock(m); } VM_OBJECT_UNLOCK(object); return (0); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/vm/vm_fault.c Fri May 7 15:49:43 2010 (r207746) @@ -937,7 +937,6 @@ vnode_locked: vm_fault_prefault(fs.map->pmap, vaddr, fs.entry); VM_OBJECT_LOCK(fs.object); vm_page_lock(fs.m); - vm_page_lock_queues(); /* * If the page is not wired down, then put it where the pageout daemon @@ -948,10 +947,8 @@ vnode_locked: vm_page_wire(fs.m); else vm_page_unwire(fs.m, 1); - } else { + } else vm_page_activate(fs.m); - } - vm_page_unlock_queues(); vm_page_unlock(fs.m); vm_page_wakeup(fs.m); @@ -1267,9 +1264,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm vm_page_unlock(dst_m); } else { vm_page_lock(dst_m); - vm_page_lock_queues(); vm_page_activate(dst_m); - vm_page_unlock_queues(); vm_page_unlock(dst_m); } vm_page_wakeup(dst_m); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/vm/vm_page.c Fri May 7 15:49:43 2010 (r207746) @@ -1374,22 +1374,25 @@ vm_page_enqueue(int queue, vm_page_t m) * Ensure that act_count is at least ACT_INIT but do not otherwise * mess with it. * - * The page queues must be locked. + * The page must be locked. * This routine may not block. */ void vm_page_activate(vm_page_t m) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); vm_page_lock_assert(m, MA_OWNED); if (VM_PAGE_GETKNOWNQUEUE2(m) != PQ_ACTIVE) { - vm_pageq_remove(m); if (m->wire_count == 0 && (m->flags & PG_UNMANAGED) == 0) { if (m->act_count < ACT_INIT) m->act_count = ACT_INIT; + vm_page_lock_queues(); + vm_pageq_remove(m); vm_page_enqueue(PQ_ACTIVE, m); - } + vm_page_unlock_queues(); + } else + KASSERT(m->queue == PQ_NONE, + ("vm_page_activate: wired page %p is queued", m)); } else { if (m->act_count < ACT_INIT) m->act_count = ACT_INIT; Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Fri May 7 14:30:21 2010 (r207745) +++ head/sys/vm/vnode_pager.c Fri May 7 15:49:43 2010 (r207746) @@ -948,8 +948,6 @@ vnode_pager_generic_getpages(vp, m, byte nextoff = tfoff + PAGE_SIZE; mt = m[i]; - vm_page_lock(mt); - vm_page_lock_queues(); if (nextoff <= object->un_pager.vnp.vnp_size) { /* * Read filled up entire page. @@ -992,17 +990,22 @@ vnode_pager_generic_getpages(vp, m, byte * now tell them that it is ok to use */ if (!error) { - if (mt->oflags & VPO_WANTED) + if (mt->oflags & VPO_WANTED) { + vm_page_lock(mt); vm_page_activate(mt); - else + vm_page_unlock(mt); + } else { + vm_page_lock(mt); vm_page_deactivate(mt); + vm_page_unlock(mt); + } vm_page_wakeup(mt); } else { + vm_page_lock(mt); vm_page_free(mt); + vm_page_unlock(mt); } } - vm_page_unlock_queues(); - vm_page_unlock(mt); } VM_OBJECT_UNLOCK(object); if (error) { From owner-svn-src-all@FreeBSD.ORG Fri May 7 16:22:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6619B106564A; Fri, 7 May 2010 16:22:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 56A938FC15; Fri, 7 May 2010 16:22: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 o47GM6kj047603; Fri, 7 May 2010 16:22:06 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47GM6X0047601; Fri, 7 May 2010 16:22:06 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005071622.o47GM6X0047601@svn.freebsd.org> From: Alan Cox Date: Fri, 7 May 2010 16:22: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: r207747 - 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: Fri, 07 May 2010 16:22:06 -0000 Author: alc Date: Fri May 7 16:22:06 2010 New Revision: 207747 URL: http://svn.freebsd.org/changeset/base/207747 Log: Eliminate unnecessary page queues locking. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri May 7 15:49:43 2010 (r207746) +++ head/sys/vm/swap_pager.c Fri May 7 16:22:06 2010 (r207747) @@ -1140,16 +1140,12 @@ swap_pager_getpages(vm_object_t object, for (k = 0; k < i; ++k) { vm_page_lock(m[k]); - vm_page_lock_queues(); swp_pager_free_nrpage(m[k]); - vm_page_unlock_queues(); vm_page_unlock(m[k]); } for (k = j; k < count; ++k) { vm_page_lock(m[k]); - vm_page_lock_queues(); swp_pager_free_nrpage(m[k]); - vm_page_unlock_queues(); vm_page_unlock(m[k]); } } From owner-svn-src-all@FreeBSD.ORG Fri May 7 16:43:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6875106566B; Fri, 7 May 2010 16:43:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B69E88FC17; Fri, 7 May 2010 16:43: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 o47Gh03v052143; Fri, 7 May 2010 16:43:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47Gh0VV052141; Fri, 7 May 2010 16:43:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005071643.o47Gh0VV052141@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 7 May 2010 16:43: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: r207748 - head/sys/dev/fxp 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, 07 May 2010 16:43:00 -0000 Author: yongari Date: Fri May 7 16:43:00 2010 New Revision: 207748 URL: http://svn.freebsd.org/changeset/base/207748 Log: It seems controller has two types of promiscuous control, one for unicast and the other for multicast. To receive multicast frames that host didn't join in promiscuous mode, driver have to set promiscuous mode for multicast frames as well. The Open Source Software Developer Manual for i8255x was not clear how to handle promiscuous mode. PR: kern/145905 MFC after: 5 days Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Fri May 7 16:22:06 2010 (r207747) +++ head/sys/dev/fxp/if_fxp.c Fri May 7 16:43:00 2010 (r207748) @@ -2345,7 +2345,7 @@ fxp_init_body(struct fxp_softc *sc) cbp->force_fdx = 0; /* (don't) force full duplex */ cbp->fdx_pin_en = 1; /* (enable) FDX# pin */ cbp->multi_ia = 0; /* (don't) accept multiple IAs */ - cbp->mc_all = ifp->if_flags & IFF_ALLMULTI ? 1 : 0; + cbp->mc_all = ifp->if_flags & IFF_ALLMULTI ? 1 : prm; cbp->gamla_rx = sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0; cbp->vlan_strip_en = ((sc->flags & FXP_FLAG_EXT_RFA) != 0 && (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) ? 1 : 0; From owner-svn-src-all@FreeBSD.ORG Fri May 7 17:20:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D52C106564A; Fri, 7 May 2010 17:20:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3C6168FC12; Fri, 7 May 2010 17: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 o47HKGYF060409; Fri, 7 May 2010 17:20:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47HKGQS060407; Fri, 7 May 2010 17:20:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005071720.o47HKGQS060407@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 7 May 2010 17:20: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: r207749 - head/lib/libc/gen 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, 07 May 2010 17:20:16 -0000 Author: jilles Date: Fri May 7 17:20:15 2010 New Revision: 207749 URL: http://svn.freebsd.org/changeset/base/207749 Log: raise(3): Note that this sends a signal to the current thread, not process. This is how it works (with threading libraries loaded) and what POSIX requires. MFC after: 1 week Modified: head/lib/libc/gen/raise.3 Modified: head/lib/libc/gen/raise.3 ============================================================================== --- head/lib/libc/gen/raise.3 Fri May 7 16:43:00 2010 (r207748) +++ head/lib/libc/gen/raise.3 Fri May 7 17:20:15 2010 (r207749) @@ -32,12 +32,12 @@ .\" @(#)raise.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd May 7, 2010 .Dt RAISE 3 .Os .Sh NAME .Nm raise -.Nd send a signal to the current process +.Nd send a signal to the current thread .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -49,7 +49,7 @@ The .Fn raise function sends the signal .Fa sig -to the current process. +to the current thread. .Sh RETURN VALUES .Rv -std raise .Sh ERRORS From owner-svn-src-all@FreeBSD.ORG Fri May 7 18:03:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2419E1065675; Fri, 7 May 2010 18:03:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1401F8FC0C; Fri, 7 May 2010 18:03: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 o47I3ZdV069960; Fri, 7 May 2010 18:03:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47I3ZYO069958; Fri, 7 May 2010 18:03:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005071803.o47I3ZYO069958@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 7 May 2010 18:03: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: r207750 - head/sys/dev/fxp 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, 07 May 2010 18:03:36 -0000 Author: yongari Date: Fri May 7 18:03:35 2010 New Revision: 207750 URL: http://svn.freebsd.org/changeset/base/207750 Log: 8255x configure command requires number of bytes of configuration table. The default size of the configuration table was 22 bytes. To use extended feature of 82550/82551 the configuration table size was expanded to 32 bytes. The added configuration for 82550/82551 specifies VLAN hardware tagging and IPSec configuration as well as TCO. To make configuration easier fxp(4) used a configuration template and the template was copied to configuration table. After that, some parameters of the configuration table was changed depending on controller type and operation mode. However the size of template was 22 bytes so some configuration parameters were not properly initialized on 82550/82551. Fix this by increasing the template size. For 82557, 82558 and 82559 the size of the configuration is still 22 bytes. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Fri May 7 17:20:15 2010 (r207749) +++ head/sys/dev/fxp/if_fxp.c Fri May 7 18:03:35 2010 (r207750) @@ -106,9 +106,8 @@ static int tx_threshold = 64; /* * The configuration byte map has several undefined fields which - * must be one or must be zero. Set up a template for these bits - * only, (assuming a 82557 chip) leaving the actual configuration - * to fxp_init. + * must be one or must be zero. Set up a template for these bits. + * The actual configuration is performed in fxp_init. * * See struct fxp_cb_config for the bit definitions. */ @@ -137,7 +136,17 @@ static u_char fxp_cb_config_template[] = 0xf0, /* 18 */ 0x0, /* 19 */ 0x3f, /* 20 */ - 0x5 /* 21 */ + 0x5, /* 21 */ + 0x0, /* 22 */ + 0x0, /* 23 */ + 0x0, /* 24 */ + 0x0, /* 25 */ + 0x0, /* 26 */ + 0x0, /* 27 */ + 0x0, /* 28 */ + 0x0, /* 29 */ + 0x0, /* 30 */ + 0x0 /* 31 */ }; /* From owner-svn-src-all@FreeBSD.ORG Fri May 7 18:57:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3A36106567A; Fri, 7 May 2010 18:57:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 93D1E8FC21; Fri, 7 May 2010 18:57: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 o47IvQkl081846; Fri, 7 May 2010 18:57:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47IvQpG081844; Fri, 7 May 2010 18:57:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005071857.o47IvQpG081844@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 7 May 2010 18:57: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: r207752 - 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: Fri, 07 May 2010 18:57:26 -0000 Author: kib Date: Fri May 7 18:57:26 2010 New Revision: 207752 URL: http://svn.freebsd.org/changeset/base/207752 Log: One more use for vm_pageout_init_marker(). Reviewed by: alc Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri May 7 18:22:51 2010 (r207751) +++ head/sys/vm/vm_pageout.c Fri May 7 18:57:26 2010 (r207752) @@ -765,14 +765,7 @@ vm_pageout_scan(int pass) */ page_shortage = vm_paging_target() + addl_page_shortage_init; - /* - * Initialize our marker - */ - bzero(&marker, sizeof(marker)); - marker.flags = PG_FICTITIOUS | PG_MARKER; - marker.oflags = VPO_BUSY; - marker.queue = PQ_INACTIVE; - marker.wire_count = 1; + vm_pageout_marker_init(&marker, PQ_INACTIVE); /* * Start scanning the inactive queue for pages we can move to the From owner-svn-src-all@FreeBSD.ORG Fri May 7 18:59:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 277A8106568A; Fri, 7 May 2010 18:59:07 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 12E988FC23; Fri, 7 May 2010 18:59: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 o47Ix7l5082249; Fri, 7 May 2010 18:59:07 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47Ix7vf082244; Fri, 7 May 2010 18:59:07 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005071859.o47Ix7vf082244@svn.freebsd.org> From: Martin Matuska Date: Fri, 7 May 2010 18:59:07 +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: r207753 - in vendor/xz: . dist dist/po dist/src dist/src/common dist/src/liblzma dist/src/liblzma/api dist/src/liblzma/api/lzma dist/src/liblzma/check dist/src/liblzma/common dist/src/l... 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, 07 May 2010 18:59:07 -0000 Author: mm Date: Fri May 7 18:59:06 2010 New Revision: 207753 URL: http://svn.freebsd.org/changeset/base/207753 Log: Vendor import of xz (stripped) Git revision: a290cfee3e23f046889c022aa96b4eca2016fdda Approved by: delphij (mentor) Added: vendor/xz/ vendor/xz/dist/ vendor/xz/dist/AUTHORS vendor/xz/dist/COPYING vendor/xz/dist/ChangeLog vendor/xz/dist/README vendor/xz/dist/THANKS vendor/xz/dist/TODO vendor/xz/dist/po/ vendor/xz/dist/po/LINGUAS vendor/xz/dist/po/Makevars vendor/xz/dist/po/POTFILES.in vendor/xz/dist/po/cs.po vendor/xz/dist/src/ vendor/xz/dist/src/common/ vendor/xz/dist/src/common/mythread.h vendor/xz/dist/src/common/sysdefs.h vendor/xz/dist/src/common/tuklib_common.h vendor/xz/dist/src/common/tuklib_config.h vendor/xz/dist/src/common/tuklib_cpucores.c vendor/xz/dist/src/common/tuklib_cpucores.h vendor/xz/dist/src/common/tuklib_exit.c vendor/xz/dist/src/common/tuklib_exit.h vendor/xz/dist/src/common/tuklib_gettext.h vendor/xz/dist/src/common/tuklib_integer.h vendor/xz/dist/src/common/tuklib_open_stdxxx.c vendor/xz/dist/src/common/tuklib_open_stdxxx.h vendor/xz/dist/src/common/tuklib_physmem.c vendor/xz/dist/src/common/tuklib_physmem.h vendor/xz/dist/src/common/tuklib_progname.c vendor/xz/dist/src/common/tuklib_progname.h vendor/xz/dist/src/liblzma/ vendor/xz/dist/src/liblzma/api/ vendor/xz/dist/src/liblzma/api/lzma/ vendor/xz/dist/src/liblzma/api/lzma.h vendor/xz/dist/src/liblzma/api/lzma/base.h vendor/xz/dist/src/liblzma/api/lzma/bcj.h vendor/xz/dist/src/liblzma/api/lzma/block.h vendor/xz/dist/src/liblzma/api/lzma/check.h vendor/xz/dist/src/liblzma/api/lzma/container.h vendor/xz/dist/src/liblzma/api/lzma/delta.h vendor/xz/dist/src/liblzma/api/lzma/filter.h vendor/xz/dist/src/liblzma/api/lzma/hardware.h vendor/xz/dist/src/liblzma/api/lzma/index.h vendor/xz/dist/src/liblzma/api/lzma/index_hash.h vendor/xz/dist/src/liblzma/api/lzma/lzma.h vendor/xz/dist/src/liblzma/api/lzma/stream_flags.h vendor/xz/dist/src/liblzma/api/lzma/subblock.h vendor/xz/dist/src/liblzma/api/lzma/version.h vendor/xz/dist/src/liblzma/api/lzma/vli.h vendor/xz/dist/src/liblzma/check/ vendor/xz/dist/src/liblzma/check/check.c vendor/xz/dist/src/liblzma/check/check.h vendor/xz/dist/src/liblzma/check/crc32_fast.c vendor/xz/dist/src/liblzma/check/crc32_small.c vendor/xz/dist/src/liblzma/check/crc32_table.c vendor/xz/dist/src/liblzma/check/crc32_table_be.h vendor/xz/dist/src/liblzma/check/crc32_table_le.h vendor/xz/dist/src/liblzma/check/crc32_tablegen.c vendor/xz/dist/src/liblzma/check/crc32_x86.S vendor/xz/dist/src/liblzma/check/crc64_fast.c vendor/xz/dist/src/liblzma/check/crc64_small.c vendor/xz/dist/src/liblzma/check/crc64_table.c vendor/xz/dist/src/liblzma/check/crc64_table_be.h vendor/xz/dist/src/liblzma/check/crc64_table_le.h vendor/xz/dist/src/liblzma/check/crc64_tablegen.c vendor/xz/dist/src/liblzma/check/crc64_x86.S vendor/xz/dist/src/liblzma/check/crc_macros.h vendor/xz/dist/src/liblzma/check/sha256.c vendor/xz/dist/src/liblzma/common/ vendor/xz/dist/src/liblzma/common/alone_decoder.c vendor/xz/dist/src/liblzma/common/alone_decoder.h vendor/xz/dist/src/liblzma/common/alone_encoder.c vendor/xz/dist/src/liblzma/common/auto_decoder.c vendor/xz/dist/src/liblzma/common/block_buffer_decoder.c vendor/xz/dist/src/liblzma/common/block_buffer_encoder.c vendor/xz/dist/src/liblzma/common/block_decoder.c vendor/xz/dist/src/liblzma/common/block_decoder.h vendor/xz/dist/src/liblzma/common/block_encoder.c vendor/xz/dist/src/liblzma/common/block_encoder.h vendor/xz/dist/src/liblzma/common/block_header_decoder.c vendor/xz/dist/src/liblzma/common/block_header_encoder.c vendor/xz/dist/src/liblzma/common/block_util.c vendor/xz/dist/src/liblzma/common/chunk_size.c vendor/xz/dist/src/liblzma/common/common.c vendor/xz/dist/src/liblzma/common/common.h vendor/xz/dist/src/liblzma/common/easy_buffer_encoder.c vendor/xz/dist/src/liblzma/common/easy_decoder_memusage.c vendor/xz/dist/src/liblzma/common/easy_encoder.c vendor/xz/dist/src/liblzma/common/easy_encoder_memusage.c vendor/xz/dist/src/liblzma/common/easy_preset.c vendor/xz/dist/src/liblzma/common/easy_preset.h vendor/xz/dist/src/liblzma/common/filter_buffer_decoder.c vendor/xz/dist/src/liblzma/common/filter_buffer_encoder.c vendor/xz/dist/src/liblzma/common/filter_common.c vendor/xz/dist/src/liblzma/common/filter_common.h vendor/xz/dist/src/liblzma/common/filter_decoder.c vendor/xz/dist/src/liblzma/common/filter_decoder.h vendor/xz/dist/src/liblzma/common/filter_encoder.c vendor/xz/dist/src/liblzma/common/filter_encoder.h vendor/xz/dist/src/liblzma/common/filter_flags_decoder.c vendor/xz/dist/src/liblzma/common/filter_flags_encoder.c vendor/xz/dist/src/liblzma/common/hardware_physmem.c vendor/xz/dist/src/liblzma/common/index.c vendor/xz/dist/src/liblzma/common/index.h vendor/xz/dist/src/liblzma/common/index_decoder.c vendor/xz/dist/src/liblzma/common/index_encoder.c vendor/xz/dist/src/liblzma/common/index_encoder.h vendor/xz/dist/src/liblzma/common/index_hash.c vendor/xz/dist/src/liblzma/common/stream_buffer_decoder.c vendor/xz/dist/src/liblzma/common/stream_buffer_encoder.c vendor/xz/dist/src/liblzma/common/stream_decoder.c vendor/xz/dist/src/liblzma/common/stream_decoder.h vendor/xz/dist/src/liblzma/common/stream_encoder.c vendor/xz/dist/src/liblzma/common/stream_encoder.h vendor/xz/dist/src/liblzma/common/stream_flags_common.c vendor/xz/dist/src/liblzma/common/stream_flags_common.h vendor/xz/dist/src/liblzma/common/stream_flags_decoder.c vendor/xz/dist/src/liblzma/common/stream_flags_encoder.c vendor/xz/dist/src/liblzma/common/vli_decoder.c vendor/xz/dist/src/liblzma/common/vli_encoder.c vendor/xz/dist/src/liblzma/common/vli_size.c vendor/xz/dist/src/liblzma/delta/ vendor/xz/dist/src/liblzma/delta/delta_common.c vendor/xz/dist/src/liblzma/delta/delta_common.h vendor/xz/dist/src/liblzma/delta/delta_decoder.c vendor/xz/dist/src/liblzma/delta/delta_decoder.h vendor/xz/dist/src/liblzma/delta/delta_encoder.c vendor/xz/dist/src/liblzma/delta/delta_encoder.h vendor/xz/dist/src/liblzma/delta/delta_private.h vendor/xz/dist/src/liblzma/lz/ vendor/xz/dist/src/liblzma/lz/lz_decoder.c vendor/xz/dist/src/liblzma/lz/lz_decoder.h vendor/xz/dist/src/liblzma/lz/lz_encoder.c vendor/xz/dist/src/liblzma/lz/lz_encoder.h vendor/xz/dist/src/liblzma/lz/lz_encoder_hash.h vendor/xz/dist/src/liblzma/lz/lz_encoder_hash_table.h vendor/xz/dist/src/liblzma/lz/lz_encoder_mf.c vendor/xz/dist/src/liblzma/lzma/ vendor/xz/dist/src/liblzma/lzma/fastpos.h vendor/xz/dist/src/liblzma/lzma/fastpos_table.c vendor/xz/dist/src/liblzma/lzma/fastpos_tablegen.c vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.c vendor/xz/dist/src/liblzma/lzma/lzma2_decoder.h vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.c vendor/xz/dist/src/liblzma/lzma/lzma2_encoder.h vendor/xz/dist/src/liblzma/lzma/lzma_common.h vendor/xz/dist/src/liblzma/lzma/lzma_decoder.c vendor/xz/dist/src/liblzma/lzma/lzma_decoder.h vendor/xz/dist/src/liblzma/lzma/lzma_encoder.c vendor/xz/dist/src/liblzma/lzma/lzma_encoder.h vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_fast.c vendor/xz/dist/src/liblzma/lzma/lzma_encoder_optimum_normal.c vendor/xz/dist/src/liblzma/lzma/lzma_encoder_presets.c vendor/xz/dist/src/liblzma/lzma/lzma_encoder_private.h vendor/xz/dist/src/liblzma/rangecoder/ vendor/xz/dist/src/liblzma/rangecoder/price.h vendor/xz/dist/src/liblzma/rangecoder/price_table.c vendor/xz/dist/src/liblzma/rangecoder/price_tablegen.c vendor/xz/dist/src/liblzma/rangecoder/range_common.h vendor/xz/dist/src/liblzma/rangecoder/range_decoder.h vendor/xz/dist/src/liblzma/rangecoder/range_encoder.h vendor/xz/dist/src/liblzma/simple/ vendor/xz/dist/src/liblzma/simple/arm.c vendor/xz/dist/src/liblzma/simple/armthumb.c vendor/xz/dist/src/liblzma/simple/ia64.c vendor/xz/dist/src/liblzma/simple/powerpc.c vendor/xz/dist/src/liblzma/simple/simple_coder.c vendor/xz/dist/src/liblzma/simple/simple_coder.h vendor/xz/dist/src/liblzma/simple/simple_decoder.c vendor/xz/dist/src/liblzma/simple/simple_decoder.h vendor/xz/dist/src/liblzma/simple/simple_encoder.c vendor/xz/dist/src/liblzma/simple/simple_encoder.h vendor/xz/dist/src/liblzma/simple/simple_private.h vendor/xz/dist/src/liblzma/simple/sparc.c vendor/xz/dist/src/liblzma/simple/x86.c vendor/xz/dist/src/liblzma/subblock/ vendor/xz/dist/src/liblzma/subblock/subblock_decoder.c vendor/xz/dist/src/liblzma/subblock/subblock_decoder.h vendor/xz/dist/src/liblzma/subblock/subblock_decoder_helper.c vendor/xz/dist/src/liblzma/subblock/subblock_decoder_helper.h vendor/xz/dist/src/liblzma/subblock/subblock_encoder.c vendor/xz/dist/src/liblzma/subblock/subblock_encoder.h vendor/xz/dist/src/lzmainfo/ vendor/xz/dist/src/lzmainfo/lzmainfo.1 vendor/xz/dist/src/lzmainfo/lzmainfo.c vendor/xz/dist/src/xz/ vendor/xz/dist/src/xz/args.c vendor/xz/dist/src/xz/args.h vendor/xz/dist/src/xz/coder.c vendor/xz/dist/src/xz/coder.h vendor/xz/dist/src/xz/file_io.c vendor/xz/dist/src/xz/file_io.h vendor/xz/dist/src/xz/hardware.c vendor/xz/dist/src/xz/hardware.h vendor/xz/dist/src/xz/list.c vendor/xz/dist/src/xz/list.h vendor/xz/dist/src/xz/main.c vendor/xz/dist/src/xz/main.h vendor/xz/dist/src/xz/message.c vendor/xz/dist/src/xz/message.h vendor/xz/dist/src/xz/options.c vendor/xz/dist/src/xz/options.h vendor/xz/dist/src/xz/private.h vendor/xz/dist/src/xz/signals.c vendor/xz/dist/src/xz/signals.h vendor/xz/dist/src/xz/suffix.c vendor/xz/dist/src/xz/suffix.h vendor/xz/dist/src/xz/util.c vendor/xz/dist/src/xz/util.h vendor/xz/dist/src/xz/xz.1 vendor/xz/dist/src/xzdec/ vendor/xz/dist/src/xzdec/xzdec.1 vendor/xz/dist/src/xzdec/xzdec.c Added: vendor/xz/dist/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz/dist/AUTHORS Fri May 7 18:59:06 2010 (r207753) @@ -0,0 +1,27 @@ + +Authors of XZ Utils +=================== + + XZ Utils is developed and maintained by Lasse Collin + . + + Major parts of liblzma are based on code written by Igor Pavlov, + specifically the LZMA SDK . Without + this code, XZ Utils wouldn't exist. + + The SHA-256 implementation in liblzma is based on the code found from + 7-Zip , which has a modified version of the SHA-256 + code found from Crypto++ . The SHA-256 code + in Crypto++ was written by Kevin Springle and Wei Dai. + + Some scripts have been adapted from gzip. The original versions + were written by Jean-loup Gailly, Charles Levert, and Paul Eggert. + Andrew Dudman helped adapting the script and their man pages for + XZ Utils. + + The GNU Autotools based build system contains files from many authors, + which I'm not trying list here. + + Several people have contributed fixes or reported bugs. Most of them + are mentioned in the file THANKS. + Added: vendor/xz/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz/dist/COPYING Fri May 7 18:59:06 2010 (r207753) @@ -0,0 +1,65 @@ + +XZ Utils Licensing +================== + + Different licenses apply to different files in this package. Here + is a rough summary of which licenses apply to which parts of this + package (but check the individual files to be sure!): + + - liblzma is in the public domain. + + - xz, xzdec, and lzmadec command line tools are in the public + domain unless GNU getopt_long had to be compiled and linked + in from the lib directory. The getopt_long code is under + GNU LGPLv2.1+. + + - The scripts to grep, diff, and view compressed files have been + adapted from gzip. These scripts and their documentation are + under GNU GPLv2+. + + - All the documentation in the doc directory and most of the + XZ Utils specific documentation files in other directories + are in the public domain. + + - Translated messages are in the public domain. + + - The build system contains public domain files, and files that + are under GNU GPLv2+ or GNU GPLv3+. None of these files end up + in the binaries being built. + + - Test files and test code in the tests directory, and debugging + utilities in the debug directory are in the public domain. + + - The extra directory may contain public domain files, and files + that are under various free software licenses. + + You can do whatever you want with the files that have been put into + the public domain. If you find public domain legally problematic, + take the previous sentence as a license grant. If you still find + the lack of copyright legally problematic, you have too many + lawyers. + + As usual, this software is provided "as is", without any warranty. + + If you copy significant amounts of public domain code from XZ Utils + into your project, acknowledging this somewhere in your software is + polite (especially if it is proprietary, non-free software), but + naturally it is not legally required. Here is an example of a good + notice to put into "about box" or into documentation: + + This software includes code from XZ Utils . + + The following license texts are included in the following files: + - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1 + - COPYING.GPLv2: GNU General Public License version 2 + - COPYING.GPLv3: GNU General Public License version 3 + + Note that the toolchain (compiler, linker etc.) may add some code + pieces that are copyrighted. Thus, it is possible that e.g. liblzma + binary wouldn't actually be in the public domain in its entirety + even though it contains no copyrighted code from the XZ Utils source + package. + + If you have questions, don't hesitate to ask the author(s) for more + information. + Added: vendor/xz/dist/ChangeLog ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz/dist/ChangeLog Fri May 7 18:59:06 2010 (r207753) @@ -0,0 +1,4716 @@ +commit a290cfee3e23f046889c022aa96b4eca2016fdda +Author: Lasse Collin +Date: Mon Apr 12 21:55:56 2010 +0300 + + Show both elapsed time and estimated remaining time in xz -v. + + The extra space for showing both has been taken from the + sizes field. If the sizes grow big, bigger units than MiB + will be used. It makes it slightly difficult to see that + progress is still happening with huge files, but it should + be OK in practice. + + Thanks to Trent W. Buck for + and Jonathan Nieder for suggestions how to fix it. + +commit a1f7a986b8d708f9290da9799ca1b8d7082fad3e +Author: Lasse Collin +Date: Wed Mar 31 16:47:25 2010 +0300 + + Add a simple tip to faq.txt about tar and xz. + + Thanks to Gilles Espinasse. + +commit c737eec91d200d730aa82662affd6b06ebb0bff0 +Author: Lasse Collin +Date: Mon Mar 22 21:03:03 2010 +0200 + + Updated THANKS. + +commit f4b2b52624b802c786e4e2a8eb6895794dd93b24 +Author: Lasse Collin +Date: Sun Mar 7 19:52:25 2010 +0200 + + Fix xzgrep to not break if filenames have spaces or quotes. + + Thanks to someone who reported the bug on IRC. + +commit cf38da00a140bd3bd65b192390ae5553380fd774 +Author: Lasse Collin +Date: Sun Mar 7 13:59:32 2010 +0200 + + Treat all integer multiplier suffixes as base-2. + + Originally both base-2 and base-10 were supported, but since + there seems to be little need for base-10 in XZ Utils, treat + everything as base-2 and also be more relaxed about the case + of the first letter of the suffix. Now xz will accept e.g. + KiB, Ki, k, K, kB, and KB, and interpret them all as 1024. The + recommended spelling of the suffixes are still KiB, MiB, and GiB. + +commit 00fc1211ae7b687ac912098f4479112059deccbd +Author: Lasse Collin +Date: Sun Mar 7 13:50:23 2010 +0200 + + Consistently round up the memory usage limit in messages. + + It still feels a bit wrong to round 1 byte to 1 MiB but + at least it is now done consistently so that the same + byte value is always rounded the same way to MiB. + +commit 9886d436ff5615fc70eef32ff757b1e934069621 +Author: Lasse Collin +Date: Sun Mar 7 13:34:34 2010 +0200 + + Change the default of --enable-assume-ram from 32 to 128 MiB. + + This is to allow files created with "xz -9" to be decompressed + if the amount of RAM cannot be determined. + +commit 2672bcc9f85ba28ff648e092e9eb4cd9e69ce418 +Author: Lasse Collin +Date: Sun Mar 7 13:29:28 2010 +0200 + + Increase the default memory usage limit on "low-memory" systems. + + Previously the default limit was always 40 % of RAM. The + new limit is a little bit more complex: + + - If 40 % of RAM is at least 80 MiB, 40 % of RAM is used + as the limit. + + - If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit. + + - Otherwise 80 % of RAM is used as the limit. + + This should make it possible to decompress files created with + "xz -9" on more systems. Swapping is generally more expected + on systems with less RAM, so higher default limit on them + shouldn't cause too bad surprises in terms of heavy swapping. + Instead, the higher default limit should reduce the number of + bad surprises when it used to prevent decompression of files + created with "xz -9". The DoS prevention system shouldn't be + a DoS itself. + + Note that even with the new default limit, a system with 64 MiB + RAM cannot decompress files created with "xz -9" without user + overriding the limit. This should be OK, because if xz is going + to need more memory than the system has RAM, it will run very + very slowly and thus it's good that user has to override the limit + in that case. + +commit 5527b7269a997e7f335d60f237a64bbf225d9dc7 +Author: Lasse Collin +Date: Sat Mar 6 21:36:19 2010 +0200 + + Updated THANKS. + +commit d0d1c51aea4351288a7e533cce28cb7f852f6b05 +Author: Lasse Collin +Date: Sat Mar 6 21:17:20 2010 +0200 + + Fix missing initialization in lzma_strm_init(). + + With bad luck, lzma_code() could return LZMA_BUF_ERROR + when it shouldn't. + + This has been here since the early days of liblzma. + It got triggered by the modifications made to the xz + tool in commit 18c10c30d2833f394cd7bce0e6a821044b15832f + but only when decompressing .lzma files. Somehow I managed + to miss testing that with Valgrind earlier. + + This fixes . + Thanks to RafaÅ‚ MużyÅ‚o for helping to debug it on IRC. + +commit eb7d51a3faf9298c0c7aa9aaeae1023dcf9e37ea +Author: Lasse Collin +Date: Fri Feb 12 13:16:15 2010 +0200 + + Collection of language fixes to comments and docs. + + Thanks to Jonathan Nieder. + +commit 4785f2021aa6a23f1caf724fcc823e562584f225 +Author: Lasse Collin +Date: Fri Feb 12 12:41:20 2010 +0200 + + Fix jl -> jb in ASM files. + +commit 6b50c9429bf85521d355adc61745d06ee017f8c8 +Author: Lasse Collin +Date: Fri Feb 12 12:31:22 2010 +0200 + + Use __APPLE__ instead of __MACH__ in ASM files. + + This allows the files to work on HURD. + + Thanks to Jonathan Nieder. + +commit 6503fde658a5cdbdd907a788865470dd64771601 +Author: Lasse Collin +Date: Sun Feb 7 19:48:06 2010 +0200 + + Subtle change to liblzma Block handling API. + + lzma_block.version has to be initialized even for + lzma_block_header_decode(). This way a future version + of liblzma won't allocate memory in a way that an old + application doesn't know how to free it. + + The subtlety of this change is that all current apps + using lzma_block_header_decode() will keep working for + now, because the only possible version value is zero, + and lzma_block_header_decode() unconditionally sets the + version to zero even now. Unless fixed, these apps will + break in the future if a new version of the Block options + is ever needed. + +commit dd7c3841ff78cb94ce02b0220c6e4748460970f7 +Author: Lasse Collin +Date: Tue Feb 2 11:50:11 2010 +0200 + + Fix wrong assertion. + + This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735. + +commit 9d67588c1597849504a3e5ac8bf6f06e7d2ee8be +Author: Lasse Collin +Date: Mon Feb 1 22:48:42 2010 +0200 + + Updated TODO. + +commit fef6333f52c8801308c3b78acb7942988541d137 +Author: Lasse Collin +Date: Mon Feb 1 22:47:54 2010 +0200 + + Fix typos in comments. + +commit 455e68c030fde8a8c2f5e254c3b3ab9489bf3735 +Author: Lasse Collin +Date: Mon Feb 1 22:46:56 2010 +0200 + + Fix signal handling for --list. + +commit 82220a149015616f75641ee8bbea415137535b9b +Author: Lasse Collin +Date: Mon Feb 1 11:44:45 2010 +0200 + + Fix compression of symlinks with --force. + + xz --force accepted symlinks, but didn't remove + them after successful compression. Instead, an error + message was displayed. + +commit d4da177d5ba3d2ef7323a6f1e06ca16e0478810e +Author: Lasse Collin +Date: Mon Feb 1 10:20:57 2010 +0200 + + Fix a comment. + +commit f9dd797a423a148903cf345b4146cb1fe1eab11d +Author: Lasse Collin +Date: Sun Jan 31 23:43:54 2010 +0200 + + Updated THANKS. + +commit ee5ddb8b28419fe4923ded5c18a50570a762dcab +Author: Lasse Collin +Date: Sun Jan 31 23:41:29 2010 +0200 + + Updated TODO. + +commit 11936ad3f5a2e97bda3463c7a56a2f4bb9265ea6 +Author: Lasse Collin +Date: Sun Jan 31 23:35:04 2010 +0200 + + Mention TODO in README. + +commit 2901a8e7e82af05675b8cd8758a8ceddb111359f +Author: Lasse Collin +Date: Sun Jan 31 23:31:14 2010 +0200 + + Updated INSTALL. + +commit 8884e16864ba53fb4b58623d7537d7ef30c28e11 +Author: Lasse Collin +Date: Sun Jan 31 23:28:51 2010 +0200 + + Revise the Windows build files. + + The old Makefile + config.h was deleted, because it + becomes outdated too easily and building with the + Autotools based build system works fine even on Windows. + + windows/build.sh hasn't got much testing, but it should + work to build 32-bit x86 and x86-64 versions of XZ Utils + using MSYS, MinGW or MinGW-w32, and MinGW-w64. + + windows/INSTALL-Windows.txt describes what packages are + needed and how to install them. + + windows/README-Windows.txt is a readme file for the binary + package that build.sh hopefully builds. + + There are no instructions about using Autotools for now, + so those using a git snapshot may want to run + "autoreconf -fi && ./configure && make mydist" on a UN*X + box and then copy the resulting .tar.gz to a Windows. + +commit 34eb5e201d62f7f46bbe6fe97cfe08cb31b3b88c +Author: Lasse Collin +Date: Sun Jan 31 19:52:38 2010 +0200 + + Select the default integrity check type at runtime. + + Previously it was set statically to CRC64 or CRC32 + depending on options passed to the configure script. + +commit 96a4f840e3b9ca5c81e5711ff9c267b194f93ef1 +Author: Lasse Collin +Date: Sun Jan 31 18:17:50 2010 +0200 + + Improve displaying of the memory usage limit. + +commit b3cc4d8edd68a0250cc69680c99b9f7343f99cf2 +Author: Lasse Collin +Date: Sun Jan 31 12:53:56 2010 +0200 + + Don't use uninitialized sigset_t. + + If signal handlers haven't been established, then it's + useless to try to block them, especially since the sigset_t + used for blocking hasn't been initialized yet. + +commit 231c3c7098f1099a56abb8afece76fc9b8699f05 +Author: Lasse Collin +Date: Sun Jan 31 12:01:54 2010 +0200 + + Delay opening the destionation file and other fixes. + + The opening of the destination file is now delayed a little. + The coder is initialized, and if decompressing, the memory + usage of the first Block compared against the memory + usage limit before the destination file is opened. This + means that if --force was used, the old "target" file won't + be deleted so easily when something goes wrong very early. + Thanks to Mark K for the bug report. + + The above fix required some changes to progress message + handling. Now there is a separate function for setting and + printing the filename. It is used also in list.c. + + list_file() now handles stdin correctly (gives an error). + + A useless check for user_abort was removed from file_io.c. + +commit 0dbd0641db99d5e73d51d04ce7a71e52dc6b4105 +Author: Lasse Collin +Date: Fri Jan 29 22:48:04 2010 +0200 + + Add list.h to src/xz/Makefile.am. + + This should have been already in + 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1. + +commit b4b1a56e0cbd597157858264f5c7189201ac9018 +Author: Lasse Collin +Date: Fri Jan 29 13:24:27 2010 +0200 + + Add lzmainfo.1 to manfiles list to convert to .txt and .pdf. + +commit 5574d64e03ad3a3d6e00e4b0d3e81c7b5529ec95 +Author: Lasse Collin +Date: Wed Jan 27 16:42:11 2010 +0200 + + Silence two compiler warnings on DOS-like systems. + +commit b063cc34a30a4edf109343ff373b2b62b8ca72d3 +Author: Lasse Collin +Date: Wed Jan 27 13:31:03 2010 +0200 + + Use PACKAGE_URL instead of custom PACKAGE_HOMEPAGE. + +commit 38b8035b5cb5f56457c5fa5a891d6900fcf5984f +Author: Lasse Collin +Date: Tue Jan 26 23:37:46 2010 +0200 + + Add a missing space to an error message. + + Thanks to Robert Readman. + +commit e5496f9628ff5979392a80421d0b63a4de8015b4 +Author: Lasse Collin +Date: Tue Jan 26 22:53:37 2010 +0200 + + Use past tense in error message in io_unlink(). + + Added a note to translators too. + + Thanks to Robert Readman. + +commit d9a9800597ea540090e434132c3b511217df0a2b +Author: Lasse Collin +Date: Tue Jan 26 15:42:24 2010 +0200 + + Fix too small static buffer in util.c. + + This was introduced in + 0dd6d007669b946543ca939a44243833c79e08f4 two days ago. + +commit d0b4bbf5da068503c099cd456e294d7673548cc0 +Author: Lasse Collin +Date: Tue Jan 26 14:46:43 2010 +0200 + + Minor comment fix. + +commit 0bc9eab243dee3be764b3530433a7fcdc3f7c6a1 +Author: Lasse Collin +Date: Sun Jan 24 23:50:54 2010 +0200 + + Add initial version of xz --list. + + This is a bit rough but should be useful for basic things. + Ideas (with detailed examples) about the output format are + welcome. + + The output of --robot --list is not necessarily stable yet, + although I don't currently have any plans about changing it. + + The man page hasn't been updated yet. + +commit df254ce03be016e217b511e7acd5d493f9929ca5 +Author: Lasse Collin +Date: Sun Jan 24 22:46:11 2010 +0200 + + Add io_pread(). + + It will be used by --list. + +commit ef68dd4a92976276304de2aedfbe34ae91a86abb +Author: Lasse Collin +Date: Sun Jan 24 22:45:14 2010 +0200 + + Set LC_NUMERIC=C when --robot is used. + + It is to ensure that floating point numbers + will always have a dot as the decimal separator. + +commit 0dd6d007669b946543ca939a44243833c79e08f4 +Author: Lasse Collin +Date: Sun Jan 24 16:57:40 2010 +0200 + + Some improvements to printing sizes in xz. + +commit 2a98fdffd68c66371279c211c29153c808ad5c1d +Author: Lasse Collin +Date: Wed Jan 20 22:02:35 2010 +0200 + + Fix a typo in README. + + Thanks to R. Bijker. + +commit 07a11dad44e041b01dcfc73e8d4e00731158c06d +Author: Lasse Collin +Date: Sun Jan 17 11:59:54 2010 +0200 + + Updated windows/Makefile. + + Thanks to Dan Shechter for the patch. + + It is likely that windows/Makefile will be removed + completely, because Autotols based build nowadays + works well with both 32-bit and 64-bit MinGW (I + just need to update the docs). + +commit 37f31ead9d2b4e467df11450cf29ed7d7e3e25f3 +Author: Lasse Collin +Date: Fri Jan 15 11:05:11 2010 +0200 + + Update the xz man page to match the previous two commits. + +commit 3ffd5d81a43210c8da56da5c5b3637d3f8bc63c7 +Author: Lasse Collin +Date: Wed Jan 13 19:10:25 2010 +0200 + + Don't read compressed data from a terminal or write it + to a terminal even if --force is specified. + + It just seems more reasonable this way. + + The new behavior matches bzip2. The old one matched gzip. + +commit 23ac2c44c3ac76994825adb7f9a8f719f78b5ee4 +Author: Lasse Collin +Date: Wed Jan 13 18:12:40 2010 +0200 + + Don't compress or decompress special files unless writing + to stdout even if --force is used. + + --force will still enable compression of symlinks, but only + in case they point to a regular file. + + The new way simply seems more reasonable. It matches gzip's + behavior while the old one matched bzip2's behavior. + +commit cee12aa852ec0902983dc1f153346ef750157fb9 +Author: Lasse Collin +Date: Tue Jan 12 16:30:33 2010 +0200 + + Updated THANKS. + +commit 153c7740c54b3c90129dbd3d6153ac1303c4d605 +Author: Lasse Collin +Date: Tue Jan 12 16:18:14 2010 +0200 + + Add IRIX-specific code to tuklib_physmem and tuklib_cpucores. + + This is untested but it will get tested soon and, if needed, + fixed before 5.0.0. + + Thanks to Stuart Shelton. + +commit 8ea8dc754a7a5bc2d60db1eac201839cabdab6a1 +Author: Lasse Collin +Date: Fri Jan 1 00:29:10 2010 +0200 + + Fix _memconfig() functions. + + This affects lzma_memusage() and lzma_memlimit_get(). + +commit 1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691 +Author: Lasse Collin +Date: Thu Dec 31 22:45:53 2009 +0200 + + Revised the Index handling code. + + This breaks API and ABI but most apps are not affected + since most apps don't use this part of the API. You will + get a compile error if you are using anything that got + broken. + + Summary of changes: + + - Ability to store Stream Flags, which are needed + for random-access reading in multi-Stream files. + + - Separate function to set size of Stream Padding. + + - Iterator structure makes it possible to read the same + lzma_index from multiple threads at the same time. + + - A lot faster code to locate Blocks. + + - Removed lzma_index_equal() without adding anything + to replace it. I don't know what it should do exactly + with the new features and what actually needs this + function in the first place other than test_index.c, + which now has its own code to compare lzma_indexes. + +commit f29997a846e673cb3b8cbd57de47ed313b3978bb +Author: Lasse Collin +Date: Thu Dec 31 21:13:25 2009 +0200 + + Remove c-format tag in cs.po. + + It was fixed in the C code earlier. + +commit 097bad000363e0bf29f8274ad2d7ab59f7dbf644 +Author: Lasse Collin +Date: Thu Dec 31 21:11:05 2009 +0200 + + Add missing lzma_nothrow in filter.h. + +commit b56cb1fc31fa2381f92eefc040df85667048d626 +Author: Lasse Collin +Date: Wed Dec 9 18:13:44 2009 +0200 + + Remove redefinition of _(msgid) macro from lzmainfo.c. + +commit 171b03febfe09d9fae6ac8be6aa4518bcaf427d2 +Author: Jonathan Nieder +Date: Tue Dec 8 19:41:57 2009 -0600 + + update po/.gitignore + + Since the *.gmo files are deleted by the maintainer-clean target, + I assume they are not meant to be tracked. + + Also add the other files listed in the Makefile’s clean targets + (stamp-poT, xz.po, xz.[12].po, *.new.po, xz.mo) to make sure they + are not accidentally tracked. Most of these are intermediate + files that would not appear unless a build is interrupted or + fails. + + Split the list of untracked files by origin to make it easier to + tell if files are missing in the future. + + Signed-off-by: Jonathan Nieder + +commit f7e44c6c11f630519072971b8b07a5729c096c36 +Author: Lasse Collin +Date: Wed Dec 9 00:38:55 2009 +0200 + + Always rely on GCC's auto-import on Windows. + + I understood that this is nicer, because then people + don't need to worry about the LZMA_API_STATIC macro. + + Thanks to Charles Wilson and Keith Marshall. + +commit 7b76a3e2336f25088957cba92b0dbd854d9caa3c +Author: Lasse Collin +Date: Mon Dec 7 21:46:53 2009 +0200 + + Fix file_io.c on DOS-like systems. + + The problem was introduced when adding sparse file + support in 465d1b0d6518c5d980f2db4c2d769f9905bdd902. + + Thanks to Charles Wilson. + +commit 0696f5d268362221380e039bad48a86e29067c6a +Author: Lasse Collin +Date: Mon Dec 7 20:54:21 2009 +0200 + + Add Czech translation. + + Thanks to Marek ÄŒernocký. + + Other people planning to translate xz: Note that the + messages are a little bit in flux still. Translations + are still welcome, just be prepared to some extra work + in case there are changes. + +commit 5e817a50d276f0a3607638c1c1d449d50b9aa4e5 +Author: Lasse Collin +Date: Mon Dec 7 20:32:08 2009 +0200 + + Add a note for translators to add a bug reporting address + for translation bugs. + +commit 6db1c35be9e1e364cdacff6878910e1b7aac2a37 +Author: Lasse Collin +Date: Mon Dec 7 20:07:02 2009 +0200 + + Prevent xgettext from taking one regular string as a C format string. + + Thanks to Marek ÄŒernocký. + +commit e0c2776b6ffbd2b1900fde353aceac734edc93d7 +Author: Lasse Collin +Date: Sat Nov 28 17:45:22 2009 +0200 + + Remove duplicate code in io_open_dest(). + + Fix a missing _() in the error message too. + +commit f057a33c6f7c5992389479f2d4feabf2900ba7ee +Author: Lasse Collin +Date: Thu Nov 26 10:11:23 2009 +0200 + + Typo fix to sysdefs.h. + + Thanks to Jonathan Nieder. + +commit 8767b41534eafdf5e742e12190646bf5740b0cdb +Author: Lasse Collin +Date: Thu Nov 26 10:10:36 2009 +0200 + + Fix a memory leak in test_index.c. + + This was introduced in + bd13b04e202b6f495a68eb0766f97085b7c50a06. + + Thanks to Jim Meyering for noticing it. + +commit 919fbaff860acdaa4bcd216500a0b1c960a6db92 +Author: Lasse Collin +Date: Wed Nov 25 14:22:19 2009 +0200 + + Add missing error check to coder.c. + + With bad luck this could cause a segfault due to + reading (but not writing) past the end of the buffer. + +commit bd13b04e202b6f495a68eb0766f97085b7c50a06 +Author: Lasse Collin +Date: Wed Nov 25 13:04:10 2009 +0200 + + Fix bugs in lzma_index_read() and lzma_index_cat(). + + lzma_index_read() didn't skip over Stream Padding + if it was the first record in the Index. + + lzma_index_cat() didn't combine small Indexes correctly. + + The test suite was updated to check for these bugs. + + These bugs didn't affect the xz command line tool or + most users of liblzma in any way. + +commit 1f196909143b888e062bd9a0c4ba8c34d3019bfa +Author: Lasse Collin +Date: Wed Nov 25 12:52:56 2009 +0200 + + Index decoder fixes. + + The Index decoder code didn't perfectly match the API docs, + which said that *i will be set to point to the decoded Index + only after decoding has succeeded. The docs were a bit unclear + too. + + Now the decoder will initially set *i to NULL. *i will be set + to point to the decoded Index once decoding has succeeded. + This simplifies applications too, since it avoids dangling + pointers. + +commit 465d1b0d6518c5d980f2db4c2d769f9905bdd902 +Author: Lasse Collin +Date: Wed Nov 25 11:19:20 2009 +0200 + + Create sparse files by default when decompressing into + a regular file. + + Sparse file creation can be disabled with --no-sparse. + I don't promise yet that the name of this option won't + change before 5.0.0. It's possible that the code, that + checks when it is safe to use sparse output on stdout, + is not good enough, and a more flexible command line + option is needed to configure sparse file handling. + +commit 37de544414fc2dc5039471d1002ebd015eb3e627 +Author: Lasse Collin +Date: Sun Nov 22 12:43:06 2009 +0200 + + Updated THANKS. + +commit f1a28b96c900c658fe016852ff62f6c24d1f50fa +Author: Lasse Collin +Date: Sun Nov 22 12:05:33 2009 +0200 + + Add missing consts to pointer casts. + +commit b9b5c54cd438b3ae47b44cc211b71f3bc53e35ef +Author: Lasse Collin +Date: Sun Nov 22 12:00:30 2009 +0200 + + Enable assembler code only if it is known to work + on that operating system. + + I'm too lazy to think how to make a good Autoconf test + for this and it's not that important anyway. + + No longer define HAVE_ASM_X86 or HAVE_ASM_X86_64. + Inline assembler (if any) is used if a macro like + __i386__ or __x86_64__ is defined. + +commit 0733f4c9994db696420a405810d5f02c79ebc404 +Author: Lasse Collin +Date: Sun Nov 22 11:55:03 2009 +0200 + + Make fastpos.h use tuklib_integer.h instead of bsr.h + when --enable-small has been specified. + +commit 7ac3985d891dcc5773543f84cc5bce6c14841b12 +Author: Lasse Collin +Date: Sun Nov 22 11:52:30 2009 +0200 + + Update tuklib_integer.h with bit scan functions. + + Thanks to Joachim Henke for the original patch. + +commit c74c132f7f79a842c073c66575a4fdb985e4c2e3 +Author: Lasse Collin +Date: Fri Nov 20 12:51:19 2009 +0200 + + Update tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib, + which now use AC_CACHE_CHECK. Using the cache variable, + configure now warns if there is no method to detect the amount + of RAM and recommends using --enable-assume-ram. + +commit d315ca4930ff96e1428c6021c96f209e1abdd83e +Author: Lasse Collin +Date: Mon Nov 16 18:16:45 2009 +0200 + + Add support for --info-memory and --robot to xz. + + Currently --robot works only with --info-memory and + --version. --help and --long-help work too, but --robot + has no effect on them. + + Thanks to Jonathan Nieder for the original patches. + +commit e330fb7e6b8162894280c8a3dc22fdc05cd2d85e +Author: Lasse Collin +Date: Sun Nov 15 12:54:45 2009 +0200 + + Fix wrong indentation caused by incorrect settings + in the text editor. + +commit 93e418562cf127a9171e87bcd4e9af8e1bfcdae4 +Author: Lasse Collin +Date: Sun Nov 15 12:40:17 2009 +0200 + + Add lzma_physmem(). + + I had hoped to keep liblzma as purely a compression + library as possible (e.g. file I/O will go into + a different library), but it seems that applications + linking agaisnt liblzma need some way to determine + the memory usage limit, and knowing the amount of RAM + is one reasonable way to help making such decisions. + + Thanks to Jonathan Nieder for the original patch. + +commit cf39faca59083d38422058c6c97aa757ea7797d0 +Author: Lasse Collin +Date: Sat Nov 14 20:21:19 2009 +0200 + + Updated THANKS. + +commit 2ddcae247c284cc2f396b6cfdab57790c7588b5f +Author: Lasse Collin +Date: Sat Nov 14 20:20:03 2009 +0200 + + Some updates to xz man page. + +commit 19b2674f07f8b588dfaf6638396b4b42866d7e23 +Author: Lasse Collin +Date: Sat Nov 14 19:51:03 2009 +0200 + + Fix description of --memory in --long-help. + +commit 2291346f0cccf88e605d84b75c9c5aaaaddb5df8 +Author: Lasse Collin +Date: Sat Nov 14 19:45:39 2009 +0200 + + Update the debug programs so that they compile again. + +commit 418d64a32e8144210f98a810738fed5a897e8367 +Author: Lasse Collin +Date: Sat Nov 14 18:59:19 2009 +0200 + + Fix a design error in liblzma API. + + Originally the idea was that using LZMA_FULL_FLUSH + with Stream encoder would read the filter chain + from the same array that was used to intialize the + Stream encoder. Since most apps wouldn't use + LZMA_FULL_FLUSH, most apps wouldn't need to keep + the filter chain available after initializing the + Stream encoder. However, due to my mistake, it + actually required keeping the array always available. + + Since setting the new filter chain via the array + used at initialization time is not a nice way to do + it for a couple of reasons, this commit ditches it + and introduces lzma_filters_update(). This new function + replaces also the "persistent" flag used by LZMA2 + (and to-be-designed Subblock filter), which was also + an ugly thing to do. + + Thanks to Alexey Tourbin for reminding me about the problem + that Stream encoder used to require keeping the filter + chain allocated. + +commit f0bf7634b77263a4dd02b20c71861ab67995da68 +Author: Lasse Collin +Date: Sat Oct 17 11:11:58 2009 +0300 + + Fix wrong function name in the previous commit. + + It was meant to be lzma_filters_copy(), not lzma_filters_dup(). + +commit 6d118a0b9def82e96afba7386ec8d7da0b59649f +Author: Lasse Collin +Date: Sat Oct 17 01:47:07 2009 +0300 + + Add lzma_filters_copy(). + + This will be needed internally by liblzma once I fix + a design mistake in the encoder API. This function may + be useful to applications too so it's good to export it. + +commit 78e92c18470483e161388e679c1ee556adb3a691 +Author: Jonathan Nieder +Date: Thu Oct 15 20:44:13 2009 -0500 + + Escape dashes in xzmore.1 + + A minus sign is larger, easier to see in a printout, and more + likely to use the same glyph as ASCII hyphen-minus in a terminal + than a hyphen. Since broken manual pagers do not find hyphens + when the user searches for a hyphen-minus, minus signs are also + easier to search for. So use minus signs instead of hyphens to + render sample terminal output. + +commit 7b7fe902d98da28e5769e2aa1e0c08c92384f7ee +Author: Lasse Collin +Date: Fri Oct 16 20:35:39 2009 +0300 + + Mention --check=none in --long-help. It was already in + the man page though. + + Thanks to Jim Meyering for noticing this. + +commit ebfb2c5e1f344e5c6e549b9dedaa49b0749a4a24 +Author: Lasse Collin +Date: Sun Oct 4 22:57:12 2009 +0300 + + Use a tuklib module for integer handling. + + This replaces bswap.h and integer.h. + + The tuklib module uses on GNU, + on *BSDs and + on Solaris, which may contain optimized code + like inline assembly. + +commit 29fd321033276261b87da7be5223db33d879a4c7 +Author: Lasse Collin +Date: Fri Oct 2 14:35:56 2009 +0300 + + Add support for --enable-assume-ram=SIZE. + +commit 3782b3fee4812b0dd4ffdfa6563ed49f73060f25 +Author: Lasse Collin +Date: Fri Oct 2 11:28:17 2009 +0300 + + Use unaligned access (if possible) on both endiannesses + in lz_encoder_hash.h. + +commit c5f68b5cc79085a87f950fea53843e27f328068e +Author: Lasse Collin +Date: Fri Oct 2 11:03:26 2009 +0300 + + Make liblzma produce the same output on both endiannesses. + + Seems that it is a problem in some cases if the same + version of XZ Utils produces different output on different + endiannesses, so this commit fixes that problem. The output + will still vary between different XZ Utils versions, but I + cannot avoid that for now. + + This commit bloatens the code on big endian systems by 1 KiB, + which should be OK since liblzma is bloated already. ;-) + +commit 4a84d1adfda35e4fb4d41ecf0feb8223b100517a +Author: Mike Frysinger *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 7 19:02:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6158C106564A; Fri, 7 May 2010 19:02:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 384848FC16; Fri, 7 May 2010 19:02: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 o47J2W2I083058; Fri, 7 May 2010 19:02:32 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47J2WqB083057; Fri, 7 May 2010 19:02:32 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005071902.o47J2WqB083057@svn.freebsd.org> From: Martin Matuska Date: Fri, 7 May 2010 19:02:32 +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: r207754 - vendor/xz/20100412 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, 07 May 2010 19:02:32 -0000 Author: mm Date: Fri May 7 19:02:31 2010 New Revision: 207754 URL: http://svn.freebsd.org/changeset/base/207754 Log: Tag xz code as 20100412 (git revision a290cfee3e23f046889c022aa96b4eca2016fdda) Approved by: delphij (mentor) Added: vendor/xz/20100412/ - copied from r207753, vendor/xz/dist/ From owner-svn-src-all@FreeBSD.ORG Fri May 7 19:48:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18EEC1065670; Fri, 7 May 2010 19:48:51 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 074C18FC12; Fri, 7 May 2010 19:48: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 o47JmoRx093417; Fri, 7 May 2010 19:48:50 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47JmooH093415; Fri, 7 May 2010 19:48:50 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201005071948.o47JmooH093415@svn.freebsd.org> From: Fabien Thomas Date: Fri, 7 May 2010 19:48: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: r207755 - head/usr.sbin/pmcstat 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, 07 May 2010 19:48:51 -0000 Author: fabient Date: Fri May 7 19:48:50 2010 New Revision: 207755 URL: http://svn.freebsd.org/changeset/base/207755 Log: Rework the calltree top view by critical callchain. The percentage show is the sum of the cost for the codepath. MFC after: 1 week Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri May 7 19:02:31 2010 (r207754) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri May 7 19:48:50 2010 (r207755) @@ -120,8 +120,15 @@ struct pmcpl_ct_node_hash { struct pmcpl_ct_sample pmcpl_ct_callid; #define PMCPL_CT_MAXCOL PMC_CALLCHAIN_DEPTH_MAX -#define PMCPL_CT_MAXLINE 256 -struct pmcpl_ct_node *pmcpl_ct_topscreen[PMCPL_CT_MAXCOL][PMCPL_CT_MAXLINE]; +#define PMCPL_CT_MAXLINE 1024 /* TODO: dynamic. */ + +struct pmcpl_ct_line { + unsigned ln_sum; + unsigned ln_index; +}; + +struct pmcpl_ct_line pmcpl_ct_topmax[PMCPL_CT_MAXLINE+1]; +struct pmcpl_ct_node *pmcpl_ct_topscreen[PMCPL_CT_MAXCOL+1][PMCPL_CT_MAXLINE+1]; /* * All nodes indexed by function/image name are placed in a hash table. @@ -225,28 +232,6 @@ pmcpl_ct_arc_grow(int cursize, int *maxs } /* - * Compare two arc by samples value. - */ -static int -pmcpl_ct_arc_compare(void *thunk, const void *a, const void *b) -{ - const struct pmcpl_ct_arc *ct1, *ct2; - int pmcin = *(int *)thunk; - - ct1 = (const struct pmcpl_ct_arc *) a; - ct2 = (const struct pmcpl_ct_arc *) b; - - /* Sort in reverse order */ - if (PMCPL_CT_SAMPLE(pmcin, &ct1->pcta_samples) < - PMCPL_CT_SAMPLE(pmcin, &ct2->pcta_samples)) - return (1); - if (PMCPL_CT_SAMPLE(pmcin, &ct1->pcta_samples) > - PMCPL_CT_SAMPLE(pmcin, &ct2->pcta_samples)) - return (-1); - return (0); -} - -/* * Grow the instr table. */ @@ -366,9 +351,9 @@ pmcpl_ct_node_cleartag(void) static int pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_node *ct, - struct pmcpl_ct_sample *rsamples, int x, int *y, int maxy) + struct pmcpl_ct_sample *rsamples, int x, int *y) { - int i; + int i, terminal; if (ct->pct_flags & PMCPL_PCT_TAG) return 0; @@ -382,12 +367,21 @@ pmcpl_ct_node_dumptop(int pmcin, struct pmcpl_ct_topscreen[x][*y] = ct; /* - * This is a terminal node + * Check if this is a terminal node. + * We need to check that some samples exist + * for at least one arc for that PMC. */ - if (ct->pct_narc == 0) { + terminal = 1; + for (i = 0; i < ct->pct_narc; i++) + if (PMCPL_CT_SAMPLE(pmcin, + &ct->pct_arc[i].pcta_samples) != 0) { + terminal = 0; + break; + } + + if (ct->pct_narc == 0 || terminal) { pmcpl_ct_topscreen[x+1][*y] = NULL; - if (*y >= PMCPL_CT_MAXLINE || - *y >= maxy) + if (*y >= PMCPL_CT_MAXLINE) return 1; *y = *y + 1; for (i=0; i < x; i++) @@ -396,14 +390,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct return 0; } - /* - * Quicksort the arcs. - */ - qsort_r(ct->pct_arc, ct->pct_narc, sizeof(struct pmcpl_ct_arc), - &pmcin, pmcpl_ct_arc_compare); - for (i = 0; i < ct->pct_narc; i++) { - /* Skip this arc if there is no sample at all. */ if (PMCPL_CT_SAMPLE(pmcin, &ct->pct_arc[i].pcta_samples) == 0) continue; @@ -411,7 +398,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, ct->pct_arc[i].pcta_child, - rsamples, x+1, y, maxy)) + rsamples, x+1, y)) return 1; } } @@ -420,12 +407,36 @@ pmcpl_ct_node_dumptop(int pmcin, struct } /* + * Compare two top line by sum. + */ +static int +pmcpl_ct_line_compare(const void *a, const void *b) +{ + const struct pmcpl_ct_line *ct1, *ct2; + + ct1 = (const struct pmcpl_ct_line *) a; + ct2 = (const struct pmcpl_ct_line *) b; + + /* Sort in reverse order */ + if (ct1->ln_sum < ct2->ln_sum) + return (1); + if (ct1->ln_sum > ct2->ln_sum) + return (-1); + return (0); +} + +/* * Format and display given PMC index. */ static void pmcpl_ct_node_printtop(struct pmcpl_ct_sample *rsamples, int pmcin, int maxy) { +#undef TS +#undef TSI +#define TS(x, y) (pmcpl_ct_topscreen[x][y]) +#define TSI(x, y) (pmcpl_ct_topscreen[x][pmcpl_ct_topmax[y].ln_index]) + int v_attrs, ns_len, vs_len, is_len, width, indentwidth, x, y; float v; char ns[30], vs[10], is[20]; @@ -433,33 +444,60 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s struct pmcstat_symbol *sym; const char *space = " "; + /* + * Sort by line cost. + */ + for (y = 0; ; y++) { + ct = TS(1, y); + if (ct == NULL) + break; + + pmcpl_ct_topmax[y].ln_sum = 0; + pmcpl_ct_topmax[y].ln_index = y; + for (x = 1; TS(x, y) != NULL; x++) { + pmcpl_ct_topmax[y].ln_sum += + PMCPL_CT_SAMPLE(pmcin, &TS(x, y)->pct_samples); + } + } + qsort(pmcpl_ct_topmax, y, sizeof(pmcpl_ct_topmax[0]), + pmcpl_ct_line_compare); + pmcpl_ct_topmax[y].ln_index = y; + for (y = 0; y < maxy; y++) { - /* Output image. */ - ct = pmcpl_ct_topscreen[0][y]; - snprintf(is, sizeof(is), "%-10.10s", - pmcstat_string_unintern(ct->pct_image->pi_name)); - PMCSTAT_PRINTW("%s ", is); - width = indentwidth = 11; + ct = TSI(1, y); + if (ct == NULL) + break; - for (x = 0; pmcpl_ct_topscreen[x][y] !=NULL; x++) { + if (y > 0) + PMCSTAT_PRINTW("\n"); - ct = pmcpl_ct_topscreen[x][y]; + /* Output sum. */ + v = pmcpl_ct_topmax[y].ln_sum * 100.0 / + rsamples->sb[pmcin]; + snprintf(vs, sizeof(vs), "%.1f", v); + v_attrs = PMCSTAT_ATTRPERCENT(v); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("%5.5s ", vs); + PMCSTAT_ATTROFF(v_attrs); + + width = indentwidth = 5 + 1; + + for (x = 1; (ct = TSI(x, y)) != NULL; x++) { - ns[0] = '\0'; ns_len = 0; vs[0] = '\0'; vs_len = 0; is[0] = '\0'; is_len = 0; /* Format value. */ v = PMCPL_CT_SAMPLEP(pmcin, &ct->pct_samples); if (v > pmcstat_threshold) - vs_len = snprintf(vs, sizeof(vs), "(%.1f%%)", v); + vs_len = snprintf(vs, sizeof(vs), + "(%.1f%%)", v); v_attrs = PMCSTAT_ATTRPERCENT(v); if (pmcstat_skiplink && v <= pmcstat_threshold) { - PMCSTAT_PRINTW(". "); - width += 2; - continue; - } + strlcpy(ns, ".", sizeof(ns)); + ns_len = 1; + } else { sym = pmcstat_symbol_search(ct->pct_image, ct->pct_func); if (sym != NULL) { ns_len = snprintf(ns, sizeof(ns), "%s", @@ -469,12 +507,14 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s (void *)ct->pct_func); /* Format image. */ - if (x > 0 && pmcpl_ct_topscreen[x-1][y]->pct_image != ct->pct_image) + if (x == 1 || + TSI(x-1, y)->pct_image != ct->pct_image) is_len = snprintf(is, sizeof(is), "@%s", pmcstat_string_unintern(ct->pct_image->pi_name)); /* Check for line wrap. */ width += ns_len + is_len + vs_len + 1; + } if (width >= pmcstat_displaywidth) { maxy--; if (y >= maxy) @@ -487,7 +527,6 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s PMCSTAT_PRINTW("%s%s%s ", ns, is, vs); PMCSTAT_ATTROFF(v_attrs); } - PMCSTAT_PRINTW("\n"); } } @@ -498,46 +537,25 @@ pmcpl_ct_node_printtop(struct pmcpl_ct_s void pmcpl_ct_topdisplay(void) { - int i, x, y, pmcin; + int y; struct pmcpl_ct_sample r, *rsamples; rsamples = &r; pmcpl_ct_samples_root(rsamples); - PMCSTAT_PRINTW("%-10.10s %s\n", "IMAGE", "CALLTREE"); + pmcpl_ct_node_cleartag(); - for (pmcin = 0; pmcin < pmcstat_npmcs; pmcin++) { - /* Filter PMCs. */ - if (pmcstat_pmcinfilter != pmcin) - continue; + PMCSTAT_PRINTW("%5.5s %s\n", "%SAMP", "CALLTREE"); - pmcpl_ct_node_cleartag(); + y = 0; + if (pmcpl_ct_node_dumptop(pmcstat_pmcinfilter, + pmcpl_ct_root, rsamples, 0, &y)) + PMCSTAT_PRINTW("...\n"); + pmcpl_ct_topscreen[1][y] = NULL; - /* Quicksort the arcs. */ - qsort_r(pmcpl_ct_root->pct_arc, - pmcpl_ct_root->pct_narc, - sizeof(struct pmcpl_ct_arc), - &pmcin, pmcpl_ct_arc_compare); - - x = y = 0; - for (i = 0; i < pmcpl_ct_root->pct_narc; i++) { - /* Skip this arc if there is no sample at all. */ - if (PMCPL_CT_SAMPLE(pmcin, - &pmcpl_ct_root->pct_arc[i].pcta_samples) == 0) - continue; - if (PMCPL_CT_SAMPLEP(pmcin, - &pmcpl_ct_root->pct_arc[i].pcta_samples) <= - pmcstat_threshold) - continue; - if (pmcpl_ct_node_dumptop(pmcin, - pmcpl_ct_root->pct_arc[i].pcta_child, - rsamples, x, &y, pmcstat_displayheight - 2)) { - break; - } - } + pmcpl_ct_node_printtop(rsamples, + pmcstat_pmcinfilter, pmcstat_displayheight - 2); - pmcpl_ct_node_printtop(rsamples, pmcin, y); - } pmcpl_ct_samples_free(rsamples); } From owner-svn-src-all@FreeBSD.ORG Fri May 7 20:02:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 012A4106566C; Fri, 7 May 2010 20:02:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E255A8FC0C; Fri, 7 May 2010 20:02: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 o47K2aHC096484; Fri, 7 May 2010 20:02:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47K2aSk096479; Fri, 7 May 2010 20:02:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201005072002.o47K2aSk096479@svn.freebsd.org> From: Michael Tuexen Date: Fri, 7 May 2010 20:02: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: r207756 - stable/8/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, 07 May 2010 20:02:37 -0000 Author: tuexen Date: Fri May 7 20:02:36 2010 New Revision: 207756 URL: http://svn.freebsd.org/changeset/base/207756 Log: MFC 206758, 206840, 206891, 206892, 207099, 207191, 207197 * Fix a bug where SACKs are not sent when they should. * Get delayed SACK working again. * Really print the nr_mapping array when it should be printed. * Update highest_tsn variables when sliding mapping arrays. * Sending a FWDTSN chunk should not affect the retran count. * Cleanups. Modified: stable/8/sys/netinet/sctp_asconf.c stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctputil.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_asconf.c ============================================================================== --- stable/8/sys/netinet/sctp_asconf.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctp_asconf.c Fri May 7 20:02:36 2010 (r207756) @@ -1113,7 +1113,7 @@ sctp_assoc_immediate_retrans(struct sctp } SCTP_TCB_LOCK_ASSERT(stcb); #ifdef SCTP_AUDITING_ENABLED - sctp_auditing(4, stcb->sctp_ep, stcb->asoc.deleted_primary); + sctp_auditing(4, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary); #endif sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); if ((stcb->asoc.num_send_timers_up == 0) && Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctp_indata.c Fri May 7 20:02:36 2010 (r207756) @@ -1466,7 +1466,7 @@ sctp_process_a_data_chunk(struct sctp_tc asoc->send_sack = 1; } protocol_id = ch->dp.protocol_id; - ordered = ((ch->ch.chunk_flags & SCTP_DATA_UNORDERED) == 0); + ordered = ((chunk_flags & SCTP_DATA_UNORDERED) == 0); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_TSN_ENTERS); } @@ -2123,6 +2123,10 @@ failed_pdapi_express_del: } } finish_express_del: + if (tsn == (asoc->cumulative_tsn + 1)) { + /* Update cum-ack */ + asoc->cumulative_tsn = tsn; + } if (last_chunk) { *m = NULL; } @@ -2300,7 +2304,12 @@ sctp_slide_mapping_arrays(struct sctp_tc if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ /* highest becomes the cum-ack */ - int clr, i; + int clr; + +#ifdef INVARIANTS + unsigned int i; + +#endif /* clear the array */ clr = ((at + 7) >> 3); @@ -2309,12 +2318,14 @@ sctp_slide_mapping_arrays(struct sctp_tc } memset(asoc->mapping_array, 0, clr); memset(asoc->nr_mapping_array, 0, clr); +#ifdef INVARIANTS for (i = 0; i < asoc->mapping_array_size; i++) { if ((asoc->mapping_array[i]) || (asoc->nr_mapping_array[i])) { printf("Error Mapping array's not clean at clear\n"); sctp_print_mapping_array(asoc); } } +#endif asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map = asoc->cumulative_tsn; } else if (at >= 8) { @@ -2371,16 +2382,20 @@ sctp_slide_mapping_arrays(struct sctp_tc int ii; for (ii = 0; ii < distance; ii++) { - asoc->mapping_array[ii] = - asoc->mapping_array[slide_from + ii]; - asoc->nr_mapping_array[ii] = - asoc->nr_mapping_array[slide_from + ii]; + asoc->mapping_array[ii] = asoc->mapping_array[slide_from + ii]; + asoc->nr_mapping_array[ii] = asoc->nr_mapping_array[slide_from + ii]; } for (ii = distance; ii < asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } + if (asoc->highest_tsn_inside_map + 1 == asoc->mapping_array_base_tsn) { + asoc->highest_tsn_inside_map += (slide_from << 3); + } + if (asoc->highest_tsn_inside_nr_map + 1 == asoc->mapping_array_base_tsn) { + asoc->highest_tsn_inside_nr_map += (slide_from << 3); + } asoc->mapping_array_base_tsn += (slide_from << 3); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, @@ -2808,25 +2823,7 @@ sctp_process_data(struct mbuf **mm, int stcb->asoc.send_sack = 1; } /* Start a sack timer or QUEUE a SACK for sending */ - if ((stcb->asoc.cumulative_tsn == stcb->asoc.highest_tsn_inside_map) && - (stcb->asoc.mapping_array[0] != 0xff)) { - if ((stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) || - (stcb->asoc.delayed_ack == 0) || - (stcb->asoc.numduptsns) || - (stcb->asoc.send_sack == 1)) { - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); - } - sctp_send_sack(stcb); - } else { - if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } - } - } else { - sctp_sack_check(stcb, was_a_gap, &abort_flag); - } + sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) return (2); Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctp_output.c Fri May 7 20:02:36 2010 (r207756) @@ -8973,7 +8973,7 @@ sctp_chunk_retransmission(struct sctp_in /* (void)SCTP_GETTIME_TIMEVAL(&chk->whoTo->last_sent_time); */ *cnt_out += 1; chk->sent = SCTP_DATAGRAM_SENT; - sctp_ucount_decr(asoc->sent_queue_retran_cnt); + /* sctp_ucount_decr(asoc->sent_queue_retran_cnt); */ if (fwd_tsn == 0) { return (0); } else { Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctputil.c Fri May 7 20:02:36 2010 (r207756) @@ -674,7 +674,7 @@ sctp_auditing(int from, struct sctp_inpc sctp_audit_indx = 0; } rep = 1; - SCTP_PRINTF("tot_flt_book:%d\n", tot_book); + SCTP_PRINTF("tot_flt_book:%d\n", tot_book_cnt); stcb->asoc.total_flight_count = tot_book_cnt; } @@ -703,8 +703,8 @@ sctp_auditing(int from, struct sctp_inpc } } if (lnet->flight_size != tot_out) { - SCTP_PRINTF("net:%x flight was %d corrected to %d\n", - (uint32_t) lnet, lnet->flight_size, + SCTP_PRINTF("net:%p flight was %d corrected to %d\n", + lnet, lnet->flight_size, tot_out); lnet->flight_size = tot_out; } @@ -1215,7 +1215,7 @@ sctp_print_mapping_array(struct sctp_ass } printf("Non renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); + printf("%2.2x%c", asoc->nr_mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); } if (limit % 16) printf("\n"); From owner-svn-src-all@FreeBSD.ORG Fri May 7 20:46:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1D181065670; Fri, 7 May 2010 20:46:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 91CED8FC0A; Fri, 7 May 2010 20:46: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 o47KkMib006227; Fri, 7 May 2010 20:46:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47KkMmN006225; Fri, 7 May 2010 20:46:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005072046.o47KkMmN006225@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 7 May 2010 20:46: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: r207757 - 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: Fri, 07 May 2010 20:46:22 -0000 Author: jilles Date: Fri May 7 20:46:22 2010 New Revision: 207757 URL: http://svn.freebsd.org/changeset/base/207757 Log: sigprocmask(2): pthread_sigmask(3) must be used in threaded processes. Although libthr's pthread_sigmask() just calls sigprocmask() and this is unlikely to change, mention this POSIX requirement on applications. MFC after: 1 week Modified: head/lib/libc/sys/sigprocmask.2 Modified: head/lib/libc/sys/sigprocmask.2 ============================================================================== --- head/lib/libc/sys/sigprocmask.2 Fri May 7 20:02:36 2010 (r207756) +++ head/lib/libc/sys/sigprocmask.2 Fri May 7 20:46:22 2010 (r207757) @@ -28,7 +28,7 @@ .\" @(#)sigprocmask.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd May 7, 2010 .Dt SIGPROCMASK 2 .Os .Sh NAME @@ -96,6 +96,11 @@ quietly disallows or .Dv SIGSTOP to be blocked. +.Pp +In threaded applications, +.Xr pthread_sigmask 3 +must be used instead of +.Fn sigprocmask . .Sh RETURN VALUES .Rv -std sigprocmask .Sh ERRORS @@ -116,6 +121,7 @@ has a value other than those listed here .Xr sigpending 2 , .Xr sigsuspend 2 , .Xr fpsetmask 3 , +.Xr pthread_sigmask 3 , .Xr sigsetops 3 .Sh STANDARDS The From owner-svn-src-all@FreeBSD.ORG Fri May 7 20:58:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E87E71065673; Fri, 7 May 2010 20:58:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D708B8FC13; Fri, 7 May 2010 20:58: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 o47KwocB009005; Fri, 7 May 2010 20:58:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47KwoBx008998; Fri, 7 May 2010 20:58:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005072058.o47KwoBx008998@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 7 May 2010 20:58: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: r207758 - stable/8/contrib/telnet/telnet 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, 07 May 2010 20:58:51 -0000 Author: jilles Date: Fri May 7 20:58:50 2010 New Revision: 207758 URL: http://svn.freebsd.org/changeset/base/207758 Log: MFC r207449: telnet: Fix infinite loop if local output generates SIGPIPE. Instead of catching SIGPIPE and jumping out of the signal handler with longjmp, ignore it and handle write errors to the local output by exiting from there. I have changed the error message to mention the local output instead of NetBSD's wrong "Connection closed by foreign host". Write errors to the network were already handled by exiting immediately and this now applies to EPIPE too. The code assumed that SIGPIPE could only be generated by the network connection; if it was generated by the local output, it would longjmp out of the signal handler and write an error message which caused another SIGPIPE. PR: 19773 Obtained from: NetBSD Modified: stable/8/contrib/telnet/telnet/commands.c stable/8/contrib/telnet/telnet/externs.h stable/8/contrib/telnet/telnet/network.c stable/8/contrib/telnet/telnet/sys_bsd.c stable/8/contrib/telnet/telnet/telnet.c stable/8/contrib/telnet/telnet/terminal.c Directory Properties: stable/8/contrib/telnet/ (props changed) Modified: stable/8/contrib/telnet/telnet/commands.c ============================================================================== --- stable/8/contrib/telnet/telnet/commands.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/commands.c Fri May 7 20:58:50 2010 (r207758) @@ -2491,8 +2491,7 @@ tn(int argc, char *argv[]) env_export("USER"); } (void) call(status, "status", "notmuch", 0); - if (setjmp(peerdied) == 0) - telnet(user); + telnet(user); (void) NetClose(net); ExitString("Connection closed by foreign host.\n",1); /*NOTREACHED*/ Modified: stable/8/contrib/telnet/telnet/externs.h ============================================================================== --- stable/8/contrib/telnet/telnet/externs.h Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/externs.h Fri May 7 20:58:50 2010 (r207758) @@ -233,7 +233,6 @@ extern void SetNetTrace(char *); /* Function to change where debugging goes */ extern jmp_buf - peerdied, toplevel; /* For error conditions. */ extern void Modified: stable/8/contrib/telnet/telnet/network.c ============================================================================== --- stable/8/contrib/telnet/telnet/network.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/network.c Fri May 7 20:58:50 2010 (r207758) @@ -158,7 +158,7 @@ netflush(void) perror(hostname); (void)NetClose(net); ring_clear_mark(&netoring); - longjmp(peerdied, -1); + ExitString("Connection closed by foreign host.\n", 1); /*NOTREACHED*/ } n = 0; Modified: stable/8/contrib/telnet/telnet/sys_bsd.c ============================================================================== --- stable/8/contrib/telnet/telnet/sys_bsd.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/sys_bsd.c Fri May 7 20:58:50 2010 (r207758) @@ -809,14 +809,6 @@ NetNonblockingIO(int fd, int onoff) */ /* ARGSUSED */ -static SIG_FUNC_RET -deadpeer(int sig __unused) -{ - setcommandmode(); - longjmp(peerdied, -1); -} - -/* ARGSUSED */ SIG_FUNC_RET intr(int sig __unused) { @@ -884,7 +876,7 @@ sys_telnet_init(void) { (void) signal(SIGINT, intr); (void) signal(SIGQUIT, intr2); - (void) signal(SIGPIPE, deadpeer); + (void) signal(SIGPIPE, SIG_IGN); #ifdef SIGWINCH (void) signal(SIGWINCH, sendwin); #endif Modified: stable/8/contrib/telnet/telnet/telnet.c ============================================================================== --- stable/8/contrib/telnet/telnet/telnet.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/telnet.c Fri May 7 20:58:50 2010 (r207758) @@ -146,7 +146,6 @@ unsigned char telopt_environ = TELOPT_NE #endif jmp_buf toplevel; -jmp_buf peerdied; int flushline; int linemode; Modified: stable/8/contrib/telnet/telnet/terminal.c ============================================================================== --- stable/8/contrib/telnet/telnet/terminal.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/terminal.c Fri May 7 20:58:50 2010 (r207758) @@ -111,7 +111,8 @@ init_terminal(void) } /* - * Send as much data as possible to the terminal. + * Send as much data as possible to the terminal, else exits if + * it encounters a permanent failure when writing to the tty. * * Return value: * -1: No useful work done, data waiting to go out. @@ -152,8 +153,19 @@ ttyflush(int drop) } ring_consumed(&ttyoring, n); } - if (n < 0) + if (n < 0) { + if (errno == EAGAIN || errno == EINTR) { + return -1; + } else { + ring_consumed(&ttyoring, ring_full_count(&ttyoring)); + setconnmode(0); + setcommandmode(); + NetClose(net); + fprintf(stderr, "Write error on local output.\n"); + exit(1); + } return -1; + } if (n == n0) { if (n0) return -1; From owner-svn-src-all@FreeBSD.ORG Fri May 7 21:06:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5313B10656A4; Fri, 7 May 2010 21:06:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 437538FC1E; Fri, 7 May 2010 21:06: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 o47L6qSW010789; Fri, 7 May 2010 21:06:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47L6q9g010787; Fri, 7 May 2010 21:06:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201005072106.o47L6q9g010787@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 7 May 2010 21:06: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: r207759 - 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: Fri, 07 May 2010 21:06:52 -0000 Author: jkim Date: Fri May 7 21:06:52 2010 New Revision: 207759 URL: http://svn.freebsd.org/changeset/base/207759 Log: Fix a typo in the previous commit. Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri May 7 20:58:50 2010 (r207758) +++ head/sys/vm/vm_pageout.c Fri May 7 21:06:52 2010 (r207759) @@ -765,7 +765,7 @@ vm_pageout_scan(int pass) */ page_shortage = vm_paging_target() + addl_page_shortage_init; - vm_pageout_marker_init(&marker, PQ_INACTIVE); + vm_pageout_init_marker(&marker, PQ_INACTIVE); /* * Start scanning the inactive queue for pages we can move to the From owner-svn-src-all@FreeBSD.ORG Fri May 7 22:09:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB3481065672; Fri, 7 May 2010 22:09:17 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CAA0D8FC0C; Fri, 7 May 2010 22:09: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 o47M9Hqa024511; Fri, 7 May 2010 22:09:17 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47M9Hxf024507; Fri, 7 May 2010 22:09:17 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201005072209.o47M9Hxf024507@svn.freebsd.org> From: Fabien Thomas Date: Fri, 7 May 2010 22:09: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: r207761 - in head/sys: dev/bce dev/mxge 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, 07 May 2010 22:09:18 -0000 Author: fabient Date: Fri May 7 22:09:17 2010 New Revision: 207761 URL: http://svn.freebsd.org/changeset/base/207761 Log: Add a fastpath to allocate from packet zone when using m_getjcl. This will add support for packet zone for at least igb and ixgbe and will avoid to check for that in bce and mxge. MFC after: 1 week Modified: head/sys/dev/bce/if_bce.c head/sys/dev/mxge/if_mxge.c head/sys/sys/mbuf.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Fri May 7 21:48:51 2010 (r207760) +++ head/sys/dev/bce/if_bce.c Fri May 7 22:09:17 2010 (r207761) @@ -5059,11 +5059,8 @@ bce_get_rx_buf(struct bce_softc *sc, str #ifdef BCE_JUMBO_HDRSPLIT MGETHDR(m_new, M_DONTWAIT, MT_DATA); #else - if (sc->rx_bd_mbuf_alloc_size <= MCLBYTES) - m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - else - m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, - sc->rx_bd_mbuf_alloc_size); + m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + sc->rx_bd_mbuf_alloc_size); #endif if (m_new == NULL) { Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Fri May 7 21:48:51 2010 (r207760) +++ head/sys/dev/mxge/if_mxge.c Fri May 7 22:09:17 2010 (r207761) @@ -2400,10 +2400,7 @@ mxge_get_buf_big(struct mxge_slice_state mxge_rx_ring_t *rx = &ss->rx_big; int cnt, err, i; - if (rx->cl_size == MCLBYTES) - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - else - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size); + m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size); if (m == NULL) { rx->alloc_fail++; err = ENOBUFS; Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Fri May 7 21:48:51 2010 (r207760) +++ head/sys/sys/mbuf.h Fri May 7 22:09:17 2010 (r207761) @@ -523,6 +523,9 @@ m_getjcl(int how, short type, int flags, struct mbuf *m, *n; uma_zone_t zone; + if (size == MCLBYTES) + return m_getcl(how, type, flags); + args.flags = flags; args.type = type; From owner-svn-src-all@FreeBSD.ORG Fri May 7 22:58:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68DA31065675; Fri, 7 May 2010 22:58:15 +0000 (UTC) (envelope-from wes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3F91F8FC13; Fri, 7 May 2010 22:58: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 o47MwFE2035337; Fri, 7 May 2010 22:58:15 GMT (envelope-from wes@svn.freebsd.org) Received: (from wes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47MwFDN035335; Fri, 7 May 2010 22:58:15 GMT (envelope-from wes@svn.freebsd.org) Message-Id: <201005072258.o47MwFDN035335@svn.freebsd.org> From: Wes Peters Date: Fri, 7 May 2010 22:58:15 +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: r207762 - 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, 07 May 2010 22:58:15 -0000 Author: wes Date: Fri May 7 22:58:14 2010 New Revision: 207762 URL: http://svn.freebsd.org/changeset/base/207762 Log: Thaw zombie gordon in the hopes he's still alive. Approved by: core (general disinterest) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri May 7 22:09:17 2010 (r207761) +++ svnadmin/conf/access Fri May 7 22:58:14 2010 (r207762) @@ -86,6 +86,7 @@ gibbs glebius gnn gonzo +gordon green grehan grog From owner-svn-src-all@FreeBSD.ORG Fri May 7 23:05:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B874F1065678; Fri, 7 May 2010 23:05:27 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A84088FC13; Fri, 7 May 2010 23: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 o47N5R7Z036981; Fri, 7 May 2010 23:05:27 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47N5R61036979; Fri, 7 May 2010 23:05:27 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005072305.o47N5R61036979@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 7 May 2010 23: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: r207763 - head/sys/dev/re 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, 07 May 2010 23:05:27 -0000 Author: yongari Date: Fri May 7 23:05:27 2010 New Revision: 207763 URL: http://svn.freebsd.org/changeset/base/207763 Log: Don't change PCIe maximum read request size to 2048 on RTL810x controllers. It caused device timeouts. Reported by: McLone < mclone <> gmail dot com > Tested by: McLone < mclone <> gmail dot com > MFC after: 5 days Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Fri May 7 22:58:14 2010 (r207762) +++ head/sys/dev/re/if_re.c Fri May 7 23:05:27 2010 (r207763) @@ -1162,9 +1162,11 @@ re_attach(device_t dev) msic = 0; if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { sc->rl_flags |= RL_FLAG_PCIE; - /* Set PCIe maximum read request size to 2048. */ - if (pci_get_max_read_req(dev) < 2048) - pci_set_max_read_req(dev, 2048); + if (devid != RT_DEVICEID_8101E) { + /* Set PCIe maximum read request size to 2048. */ + if (pci_get_max_read_req(dev) < 2048) + pci_set_max_read_req(dev, 2048); + } msic = pci_msi_count(dev); if (bootverbose) device_printf(dev, "MSI count : %d\n", msic); From owner-svn-src-all@FreeBSD.ORG Sat May 8 01:24:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5435106566B; Sat, 8 May 2010 01:24:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D4C258FC0A; Sat, 8 May 2010 01:24: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 o481OI8U067243; Sat, 8 May 2010 01:24:18 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o481OIGb067241; Sat, 8 May 2010 01:24:18 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005080124.o481OIGb067241@svn.freebsd.org> From: Rick Macklem Date: Sat, 8 May 2010 01:24: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: r207764 - head/sys/fs/nfs 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, 08 May 2010 01:24:19 -0000 Author: rmacklem Date: Sat May 8 01:24:18 2010 New Revision: 207764 URL: http://svn.freebsd.org/changeset/base/207764 Log: Patch the experimental NFS client so that it works for NFSv2 by adding the necessary mapping from NFSv3 procedure numbers to NFSv2 procedure numbers when doing NFSv2 RPCs. MFC after: 1 week Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Fri May 7 23:05:27 2010 (r207763) +++ head/sys/fs/nfs/nfs_commonkrpc.c Sat May 8 01:24:18 2010 (r207764) @@ -97,14 +97,37 @@ static void nfs_up(struct nfsmount *, st int, int); static int nfs_msg(struct thread *, const char *, const char *, int); -extern int nfsv2_procid[]; - struct nfs_cached_auth { int ca_refs; /* refcount, including 1 from the cache */ uid_t ca_uid; /* uid that corresponds to this auth */ AUTH *ca_auth; /* RPC auth handle */ }; +static int nfsv2_procid[NFS_V3NPROCS] = { + NFSV2PROC_NULL, + NFSV2PROC_GETATTR, + NFSV2PROC_SETATTR, + NFSV2PROC_LOOKUP, + NFSV2PROC_NOOP, + NFSV2PROC_READLINK, + NFSV2PROC_READ, + NFSV2PROC_WRITE, + NFSV2PROC_CREATE, + NFSV2PROC_MKDIR, + NFSV2PROC_SYMLINK, + NFSV2PROC_CREATE, + NFSV2PROC_REMOVE, + NFSV2PROC_RMDIR, + NFSV2PROC_RENAME, + NFSV2PROC_LINK, + NFSV2PROC_READDIR, + NFSV2PROC_NOOP, + NFSV2PROC_STATFS, + NFSV2PROC_NOOP, + NFSV2PROC_NOOP, + NFSV2PROC_NOOP, +}; + /* * Initialize sockets and congestion for a new NFS connection. * We do not free the sockaddr if error. @@ -533,6 +556,15 @@ newnfs_request(struct nfsrv_descript *nd if (nmp != NULL) { NFSINCRGLOBAL(newnfsstats.rpcrequests); + + /* Map the procnum to the old NFSv2 one, as required. */ + if ((nd->nd_flag & ND_NFSV2) != 0) { + if (nd->nd_procnum < NFS_V3NPROCS) + procnum = nfsv2_procid[nd->nd_procnum]; + else + procnum = NFSV2PROC_NOOP; + } + /* * Now only used for the R_DONTRECOVER case, but until that is * supported within the krpc code, I need to keep a queue of From owner-svn-src-all@FreeBSD.ORG Sat May 8 11:56:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DEA531065672; Sat, 8 May 2010 11:56:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CEDC08FC12; Sat, 8 May 2010 11:56: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 o48Bu0cc006646; Sat, 8 May 2010 11:56:00 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Bu0ma006645; Sat, 8 May 2010 11:56:00 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201005081156.o48Bu0ma006645@svn.freebsd.org> From: Ed Maste Date: Sat, 8 May 2010 11:56: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: r207768 - head/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: Sat, 08 May 2010 11:56:01 -0000 Author: emaste Date: Sat May 8 11:56:00 2010 New Revision: 207768 URL: http://svn.freebsd.org/changeset/base/207768 Log: Add dummy function for ic_update_mcast (a la if_urtw) to avoid console spam. Modified: head/sys/dev/usb/wlan/if_rum.c Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Sat May 8 05:42:05 2010 (r207767) +++ head/sys/dev/usb/wlan/if_rum.c Sat May 8 11:56:00 2010 (r207768) @@ -197,6 +197,7 @@ static void rum_enable_tsf(struct rum_s static void rum_update_slot(struct ifnet *); static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); +static void rum_update_mcast(struct ifnet *); static void rum_update_promisc(struct ifnet *); static void rum_setpromisc(struct rum_softc *); static const char *rum_get_rf(int); @@ -514,6 +515,7 @@ rum_attach(device_t self) ic->ic_vap_create = rum_vap_create; ic->ic_vap_delete = rum_vap_delete; + ic->ic_update_mcast = rum_update_mcast; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), @@ -1815,6 +1817,13 @@ rum_update_promisc(struct ifnet *ifp) RUM_UNLOCK(sc); } +static void +rum_update_mcast(struct ifnet *ifp) +{ + + /* XXX do nothing? */ +} + static const char * rum_get_rf(int rev) { From owner-svn-src-all@FreeBSD.ORG Sat May 8 12:40:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E2591065673; Sat, 8 May 2010 12:40:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 63FF78FC1E; Sat, 8 May 2010 12:40: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 o48Cedwk016429; Sat, 8 May 2010 12:40:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Cedt7016428; Sat, 8 May 2010 12:40:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005081240.o48Cedt7016428@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 May 2010 12:40: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: r207769 - stable/8/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: Sat, 08 May 2010 12:40:39 -0000 Author: kib Date: Sat May 8 12:40:38 2010 New Revision: 207769 URL: http://svn.freebsd.org/changeset/base/207769 Log: MFC r207463: Remove debugging code that was not used once since commit. Modified: stable/8/sys/amd64/amd64/trap.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Sat May 8 11:56:00 2010 (r207768) +++ stable/8/sys/amd64/amd64/trap.c Sat May 8 12:40:38 2010 (r207769) @@ -172,52 +172,6 @@ SYSCTL_INT(_machdep, OID_AUTO, prot_faul extern char *syscallnames[]; -/* #define DEBUG 1 */ -#ifdef DEBUG -static void -report_seg_fault(const char *segn, struct trapframe *frame) -{ - struct proc_ldt *pldt; - struct trapframe *pf; - - pldt = curproc->p_md.md_ldt; - printf("%d: %s load fault %lx %p %d\n", - curproc->p_pid, segn, frame->tf_err, - pldt != NULL ? pldt->ldt_base : NULL, - pldt != NULL ? pldt->ldt_refcnt : 0); - kdb_backtrace(); - pf = (struct trapframe *)frame->tf_rsp; - printf("rdi %lx\n", pf->tf_rdi); - printf("rsi %lx\n", pf->tf_rsi); - printf("rdx %lx\n", pf->tf_rdx); - printf("rcx %lx\n", pf->tf_rcx); - printf("r8 %lx\n", pf->tf_r8); - printf("r9 %lx\n", pf->tf_r9); - printf("rax %lx\n", pf->tf_rax); - printf("rbx %lx\n", pf->tf_rbx); - printf("rbp %lx\n", pf->tf_rbp); - printf("r10 %lx\n", pf->tf_r10); - printf("r11 %lx\n", pf->tf_r11); - printf("r12 %lx\n", pf->tf_r12); - printf("r13 %lx\n", pf->tf_r13); - printf("r14 %lx\n", pf->tf_r14); - printf("r15 %lx\n", pf->tf_r15); - printf("fs %x\n", pf->tf_fs); - printf("gs %x\n", pf->tf_gs); - printf("es %x\n", pf->tf_es); - printf("ds %x\n", pf->tf_ds); - printf("tno %x\n", pf->tf_trapno); - printf("adr %lx\n", pf->tf_addr); - printf("flg %x\n", pf->tf_flags); - printf("err %lx\n", pf->tf_err); - printf("rip %lx\n", pf->tf_rip); - printf("cs %lx\n", pf->tf_cs); - printf("rfl %lx\n", pf->tf_rflags); - printf("rsp %lx\n", pf->tf_rsp); - printf("ss %lx\n", pf->tf_ss); -} -#endif - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -314,9 +268,7 @@ trap(struct trapframe *frame) */ printf("kernel trap %d with interrupts disabled\n", type); -#ifdef DEBUG - report_seg_fault("hlt", frame); -#endif + /* * We shouldn't enable interrupts while holding a * spin lock or servicing an NMI. @@ -532,33 +484,21 @@ trap(struct trapframe *frame) goto out; } if (frame->tf_rip == (long)ld_ds) { -#ifdef DEBUG - report_seg_fault("ds", frame); -#endif frame->tf_rip = (long)ds_load_fault; frame->tf_ds = _udatasel; goto out; } if (frame->tf_rip == (long)ld_es) { -#ifdef DEBUG - report_seg_fault("es", frame); -#endif frame->tf_rip = (long)es_load_fault; frame->tf_es = _udatasel; goto out; } if (frame->tf_rip == (long)ld_fs) { -#ifdef DEBUG - report_seg_fault("fs", frame); -#endif frame->tf_rip = (long)fs_load_fault; frame->tf_fs = _ufssel; goto out; } if (frame->tf_rip == (long)ld_gs) { -#ifdef DEBUG - report_seg_fault("gs", frame); -#endif frame->tf_rip = (long)gs_load_fault; frame->tf_gs = _ugssel; goto out; @@ -664,30 +604,6 @@ trap(struct trapframe *frame) ksi.ksi_addr = (void *)addr; trapsignal(td, &ksi); -#ifdef DEBUG -{ - register_t rg,rgk, rf; - - if (type <= MAX_TRAP_MSG) { - uprintf("fatal process exception: %s", - trap_msg[type]); - if ((type == T_PAGEFLT) || (type == T_PROTFLT)) - uprintf(", fault VA = 0x%lx", frame->tf_addr); - uprintf("\n"); - } - rf = rdmsr(0xc0000100); - rg = rdmsr(0xc0000101); - rgk = rdmsr(0xc0000102); - uprintf("pid %d TRAP %d rip %lx err %lx addr %lx cs %lx ss %lx ds %x " - "es %x fs %x fsbase %lx %lx gs %x gsbase %lx %lx %lx\n", - curproc->p_pid, type, frame->tf_rip, frame->tf_err, - frame->tf_addr, - frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, - frame->tf_fs, td->td_pcb->pcb_fsbase, rf, - frame->tf_gs, td->td_pcb->pcb_gsbase, rg, rgk); -} -#endif - user: userret(td, frame); mtx_assert(&Giant, MA_NOTOWNED); From owner-svn-src-all@FreeBSD.ORG Sat May 8 12:58:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C73E4106566B; Sat, 8 May 2010 12:58:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6B248FC0C; Sat, 8 May 2010 12:58: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 o48CwM9d020379; Sat, 8 May 2010 12:58:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48CwM8D020377; Sat, 8 May 2010 12:58:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081258.o48CwM8D020377@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 12:58: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: r207770 - stable/8/sys/cam/ata 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, 08 May 2010 12:58:22 -0000 Author: mav Date: Sat May 8 12:58:22 2010 New Revision: 207770 URL: http://svn.freebsd.org/changeset/base/207770 Log: MFC r207428: Report PMP absence using target 15, same as for precence (not a wildcard), to not confuse target ID checks at SIMs. Modified: stable/8/sys/cam/ata/ata_xpt.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sat May 8 12:40:38 2010 (r207769) +++ stable/8/sys/cam/ata/ata_xpt.c Sat May 8 12:58:22 2010 (r207770) @@ -1118,13 +1118,13 @@ ata_scan_bus(struct cam_periph *periph, work_ccb = request_ccb; /* Reuse the same CCB to query if a device was really found */ scan_info = (ata_scan_bus_info *)work_ccb->ccb_h.ppriv_ptr0; - /* Free the current request path- we're done with it. */ - xpt_free_path(work_ccb->ccb_h.path); /* If there is PMP... */ if ((scan_info->cpi->hba_inquiry & PI_SATAPM) && (scan_info->counter == scan_info->cpi->max_target)) { if (work_ccb->ccb_h.status == CAM_REQ_CMP) { - /* everything else willbe probed by it */ + /* everything else will be probed by it */ + /* Free the current request path- we're done with it. */ + xpt_free_path(work_ccb->ccb_h.path); goto done; } else { struct ccb_trans_settings cts; @@ -1132,7 +1132,7 @@ ata_scan_bus(struct cam_periph *periph, /* Report SIM that PM is absent. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, - scan_info->request_ccb->ccb_h.path, 1); + work_ccb->ccb_h.path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.pm_present = 0; @@ -1140,6 +1140,8 @@ ata_scan_bus(struct cam_periph *periph, xpt_action((union ccb *)&cts); } } + /* Free the current request path- we're done with it. */ + xpt_free_path(work_ccb->ccb_h.path); if (scan_info->counter == ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? 0 : scan_info->cpi->max_target)) { From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:02:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDD5C1065676; Sat, 8 May 2010 13:02:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CD08F8FC0C; Sat, 8 May 2010 13:02: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 o48D2qIe021495; Sat, 8 May 2010 13:02:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D2qZk021493; Sat, 8 May 2010 13:02:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081302.o48D2qZk021493@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:02: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: r207771 - stable/8/sys/dev/ahci 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, 08 May 2010 13:02:53 -0000 Author: mav Date: Sat May 8 13:02:52 2010 New Revision: 207771 URL: http://svn.freebsd.org/changeset/base/207771 Log: MFC r207430: Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent. Enforce PMA bit clearing when PMP detached to avoid further scan timeouts. Modified: stable/8/sys/dev/ahci/ahci.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat May 8 12:58:22 2010 (r207770) +++ stable/8/sys/dev/ahci/ahci.c Sat May 8 13:02:52 2010 (r207771) @@ -2077,6 +2077,7 @@ ahci_start(device_t dev, int fbs) } /* Start operations on this channel */ cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); + cmd &= ~AHCI_P_CMD_PMA; ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd | AHCI_P_CMD_ST | (ch->pm_present ? AHCI_P_CMD_PMA : 0)); } @@ -2375,6 +2376,24 @@ ahci_sata_phy_reset(device_t dev) return (1); } +static int +ahci_check_ids(device_t dev, union ccb *ccb) +{ + struct ahci_channel *ch = device_get_softc(dev); + + if (ccb->ccb_h.target_id > ((ch->caps & AHCI_CAP_SPM) ? 15 : 0)) { + ccb->ccb_h.status = CAM_TID_INVALID; + xpt_done(ccb); + return (-1); + } + if (ccb->ccb_h.target_lun != 0) { + ccb->ccb_h.status = CAM_LUN_INVALID; + xpt_done(ccb); + return (-1); + } + return (0); +} + static void ahciaction(struct cam_sim *sim, union ccb *ccb) { @@ -2390,9 +2409,12 @@ ahciaction(struct cam_sim *sim, union cc /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: - if (ch->devices == 0) { + if (ahci_check_ids(dev, ccb)) + return; + if (ch->devices == 0 || + (ch->pm_present == 0 && + ccb->ccb_h.target_id > 0 && ccb->ccb_h.target_id < 15)) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; - xpt_done(ccb); break; } /* Check for command collision. */ @@ -2404,7 +2426,7 @@ ahciaction(struct cam_sim *sim, union cc return; } ahci_begin_transaction(dev, ccb); - break; + return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ @@ -2412,13 +2434,14 @@ ahciaction(struct cam_sim *sim, union cc case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_SET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; struct ahci_device *d; + if (ahci_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -2436,7 +2459,6 @@ ahciaction(struct cam_sim *sim, union cc if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: @@ -2446,6 +2468,8 @@ ahciaction(struct cam_sim *sim, union cc struct ahci_device *d; uint32_t status; + if (ahci_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -2481,48 +2505,16 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } -#if 0 - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - uint32_t size_mb; - uint32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - if (size_mb >= 1024 && (aha->extended_trans != 0)) { - if (size_mb >= 2048) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 128; - ccg->secs_per_track = 32; - } - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } -#endif case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ ahci_reset(dev); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_PATH_INQ: /* Path routing inquiry */ { @@ -2558,14 +2550,13 @@ ahciaction(struct cam_sim *sim, union cc if (pci_get_devid(device_get_parent(dev)) == 0x43801002) cpi->maxio = min(cpi->maxio, 128 * 512); cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } default: ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; } + xpt_done(ccb); } static void From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:05:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A949B106566C; Sat, 8 May 2010 13:05:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 98A378FC13; Sat, 8 May 2010 13: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 o48D5RC6022129; Sat, 8 May 2010 13:05:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D5Rx6022127; Sat, 8 May 2010 13:05:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081305.o48D5Rx6022127@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:05: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: r207772 - stable/8/sys/dev/siis 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, 08 May 2010 13:05:27 -0000 Author: mav Date: Sat May 8 13:05:27 2010 New Revision: 207772 URL: http://svn.freebsd.org/changeset/base/207772 Log: MFC r207431: Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent. Modified: stable/8/sys/dev/siis/siis.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sat May 8 13:02:52 2010 (r207771) +++ stable/8/sys/dev/siis/siis.c Sat May 8 13:05:27 2010 (r207772) @@ -1610,6 +1610,23 @@ siis_sata_connect(struct siis_channel *c return (1); } +static int +siis_check_ids(device_t dev, union ccb *ccb) +{ + + if (ccb->ccb_h.target_id > 15) { + ccb->ccb_h.status = CAM_TID_INVALID; + xpt_done(ccb); + return (-1); + } + if (ccb->ccb_h.target_lun != 0) { + ccb->ccb_h.status = CAM_LUN_INVALID; + xpt_done(ccb); + return (-1); + } + return (0); +} + static void siisaction(struct cam_sim *sim, union ccb *ccb) { @@ -1626,9 +1643,12 @@ siisaction(struct cam_sim *sim, union cc /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: - if (ch->devices == 0) { + if (siis_check_ids(dev, ccb)) + return; + if (ch->devices == 0 || + (ch->pm_present == 0 && + ccb->ccb_h.target_id > 0 && ccb->ccb_h.target_id < 15)) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; - xpt_done(ccb); break; } /* Check for command collision. */ @@ -1640,7 +1660,7 @@ siisaction(struct cam_sim *sim, union cc return; } siis_begin_transaction(dev, ccb); - break; + return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ @@ -1648,13 +1668,14 @@ siisaction(struct cam_sim *sim, union cc case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_SET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; struct siis_device *d; + if (siis_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1677,7 +1698,6 @@ siisaction(struct cam_sim *sim, union cc if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: @@ -1687,6 +1707,8 @@ siisaction(struct cam_sim *sim, union cc struct siis_device *d; uint32_t status; + if (siis_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1722,48 +1744,16 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } -#if 0 - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - uint32_t size_mb; - uint32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - if (size_mb >= 1024 && (aha->extended_trans != 0)) { - if (size_mb >= 2048) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 128; - ccg->secs_per_track = 32; - } - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } -#endif case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ siis_reset(dev); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_PATH_INQ: /* Path routing inquiry */ { @@ -1790,14 +1780,13 @@ siisaction(struct cam_sim *sim, union cc cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->ccb_h.status = CAM_REQ_CMP; cpi->maxio = MAXPHYS; - xpt_done(ccb); break; } default: ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; } + xpt_done(ccb); } static void From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:07:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0A141065673; Sat, 8 May 2010 13:07:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C6B768FC0A; Sat, 8 May 2010 13:07: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 o48D7ofl022739; Sat, 8 May 2010 13:07:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D7oUC022737; Sat, 8 May 2010 13:07:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081307.o48D7oUC022737@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:07: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: r207773 - stable/8/sys/dev/ata 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, 08 May 2010 13:07:51 -0000 Author: mav Date: Sat May 8 13:07:50 2010 New Revision: 207773 URL: http://svn.freebsd.org/changeset/base/207773 Log: MFC r207432: Add Target/LUN ID checks. Modified: stable/8/sys/dev/ata/ata-all.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sat May 8 13:05:27 2010 (r207772) +++ stable/8/sys/dev/ata/ata-all.c Sat May 8 13:07:50 2010 (r207773) @@ -1430,6 +1430,24 @@ ata_cam_end_transaction(device_t dev, st ata_reinit(dev); } +static int +ata_check_ids(device_t dev, union ccb *ccb) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ccb->ccb_h.target_id > ((ch->flags & ATA_NO_SLAVE) ? 0 : 1)) { + ccb->ccb_h.status = CAM_TID_INVALID; + xpt_done(ccb); + return (-1); + } + if (ccb->ccb_h.target_lun != 0) { + ccb->ccb_h.status = CAM_LUN_INVALID; + xpt_done(ccb); + return (-1); + } + return (0); +} + static void ataaction(struct cam_sim *sim, union ccb *ccb) { @@ -1445,10 +1463,11 @@ ataaction(struct cam_sim *sim, union ccb /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: + if (ata_check_ids(dev, ccb)) + return; if ((ch->devices & ((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << ccb->ccb_h.target_id)) == 0) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; - xpt_done(ccb); break; } if (ch->running) @@ -1467,11 +1486,10 @@ ataaction(struct cam_sim *sim, union ccb res->lba_mid = 0x14; } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } ata_cam_begin_transaction(dev, ccb); - break; + return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ @@ -1479,13 +1497,14 @@ ataaction(struct cam_sim *sim, union ccb case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_SET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; struct ata_cam_device *d; + if (ata_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1520,7 +1539,6 @@ ataaction(struct cam_sim *sim, union ccb d->atapi = cts->xport_specific.ata.atapi; } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: @@ -1528,6 +1546,8 @@ ataaction(struct cam_sim *sim, union ccb struct ccb_trans_settings *cts = &ccb->cts; struct ata_cam_device *d; + if (ata_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1567,48 +1587,16 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.ata.valid |= CTS_ATA_VALID_ATAPI; } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } -#if 0 - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - uint32_t size_mb; - uint32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - if (size_mb >= 1024 && (aha->extended_trans != 0)) { - if (size_mb >= 2048) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 128; - ccg->secs_per_track = 32; - } - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } -#endif case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ ata_reinit(dev); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_PATH_INQ: /* Path routing inquiry */ { @@ -1643,14 +1631,13 @@ ataaction(struct cam_sim *sim, union ccb cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS; cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } default: ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; } + xpt_done(ccb); } static void From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:09:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F1E51065673; Sat, 8 May 2010 13:09:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8AE8FC1D; Sat, 8 May 2010 13:09: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 o48D9apH023190; Sat, 8 May 2010 13:09:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D9a2n023188; Sat, 8 May 2010 13:09:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081309.o48D9a2n023188@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:09: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: r207774 - stable/8/sys/cam 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, 08 May 2010 13:09:36 -0000 Author: mav Date: Sat May 8 13:09:36 2010 New Revision: 207774 URL: http://svn.freebsd.org/changeset/base/207774 Log: MFC r207433: Revert r198705. As scottl@ noticed, max_target/max_lun was intended to be only a hint for existing bus scanner. Some FC/SAS SIMs report fake values there, that are smaller then maximum supported IDs. In that case this check makes impossible manual scan outside hinted range. For ATA/SATA SIMs respective check was instead implemented at SIM level. Newer SCSI SIMs expected to have these checks at driver or firmware level. Some older SCSI SIMs have no this check and the issues will get back there. Modified: stable/8/sys/cam/cam_xpt.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Sat May 8 13:07:50 2010 (r207773) +++ stable/8/sys/cam/cam_xpt.c Sat May 8 13:09:36 2010 (r207774) @@ -462,34 +462,7 @@ xptioctl(struct cdev *dev, u_long cmd, c ccb = xpt_alloc_ccb(); CAM_SIM_LOCK(bus->sim); - /* Ensure passed in target/lun supported on this bus. */ - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD) || - (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD)) { - if (xpt_create_path(&ccb->ccb_h.path, - xpt_periph, - inccb->ccb_h.path_id, - CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - error = EINVAL; - CAM_SIM_UNLOCK(bus->sim); - xpt_free_ccb(ccb); - break; - } - xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, - inccb->ccb_h.pinfo.priority); - ccb->ccb_h.func_code = XPT_PATH_INQ; - xpt_action(ccb); - xpt_free_path(ccb->ccb_h.path); - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD && - inccb->ccb_h.target_id > ccb->cpi.max_target) || - (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD && - inccb->ccb_h.target_lun > ccb->cpi.max_lun)) { - error = EINVAL; - CAM_SIM_UNLOCK(bus->sim); - xpt_free_ccb(ccb); - break; - } - } + /* * Create a path using the bus, target, and lun the * user passed in. From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:12:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03962106564A; Sat, 8 May 2010 13:12:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E73868FC0A; Sat, 8 May 2010 13:12: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 o48DCqG3023978; Sat, 8 May 2010 13:12:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DCqeA023975; Sat, 8 May 2010 13:12:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081312.o48DCqeA023975@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:12: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: r207775 - stable/8/sbin/camcontrol 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, 08 May 2010 13:12:53 -0000 Author: mav Date: Sat May 8 13:12:52 2010 New Revision: 207775 URL: http://svn.freebsd.org/changeset/base/207775 Log: MFC r207498: Add -d and -f arguments to `camcontrol cmd`, to execute DMA ATA commands. Modified: stable/8/sbin/camcontrol/camcontrol.8 stable/8/sbin/camcontrol/camcontrol.c Directory Properties: stable/8/sbin/camcontrol/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.8 Sat May 8 13:09:36 2010 (r207774) +++ stable/8/sbin/camcontrol/camcontrol.8 Sat May 8 13:12:52 2010 (r207775) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2010 +.Dd May 2, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -123,6 +123,8 @@ .Op generic args .Aq Fl a Ar cmd Op args .Aq Fl c Ar cmd Op args +.Op Fl d +.Op Fl f .Op Fl i Ar len Ar fmt .Bk -words .Op Fl o Ar len Ar fmt Op args @@ -530,6 +532,10 @@ lba_high_exp, features_exp, sector_count .It Fl c Ar cmd Op args This specifies the SCSI CDB. SCSI CDBs may be 6, 10, 12 or 16 bytes. +.It Fl d +Specifies DMA protocol to be used for ATA command. +.It Fl f +Specifies FPDMA (NCQ) protocol to be used for ATA command. .It Fl i Ar len Ar fmt This specifies the amount of data to read, and how it should be displayed. If the format is Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Sat May 8 13:09:36 2010 (r207774) +++ stable/8/sbin/camcontrol/camcontrol.c Sat May 8 13:12:52 2010 (r207775) @@ -123,7 +123,7 @@ struct camcontrol_opts { }; #ifndef MINIMALISTIC -static const char scsicmd_opts[] = "a:c:i:o:r"; +static const char scsicmd_opts[] = "a:c:dfi:o:r"; static const char readdefect_opts[] = "f:GP"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; #endif @@ -2184,6 +2184,8 @@ scsicmd(struct cam_device *device, int a int c, data_bytes = 0; int cdb_len = 0; int atacmd_len = 0; + int dmacmd = 0; + int fpdmacmd = 0; int need_res = 0; char *datastr = NULL, *tstr, *resstr = NULL; int error = 0; @@ -2246,6 +2248,12 @@ scsicmd(struct cam_device *device, int a */ optind += hook.got; break; + case 'd': + dmacmd = 1; + break; + case 'f': + fpdmacmd = 1; + break; case 'i': if (arglist & CAM_ARG_CMD_OUT) { warnx("command must either be " @@ -2422,6 +2430,10 @@ scsicmd(struct cam_device *device, int a bcopy(atacmd, &ccb->ataio.cmd.command, atacmd_len); if (need_res) ccb->ataio.cmd.flags |= CAM_ATAIO_NEEDRESULT; + if (dmacmd) + ccb->ataio.cmd.flags |= CAM_ATAIO_DMA; + if (fpdmacmd) + ccb->ataio.cmd.flags |= CAM_ATAIO_FPDMA; cam_fill_ataio(&ccb->ataio, /*retries*/ retry_count, @@ -4353,7 +4365,7 @@ usage(int verbose) " [-P pagectl][-e | -b][-d]\n" " camcontrol cmd [dev_id][generic args]\n" " <-a cmd [args] | -c cmd [args]>\n" -" [-i len fmt|-o len fmt [args]] [-r fmt]\n" +" [-d] [-f] [-i len fmt|-o len fmt [args]] [-r fmt]\n" " camcontrol debug [-I][-P][-T][-S][-X][-c]\n" " \n" " camcontrol tags [dev_id][generic args] [-N tags] [-q] [-v]\n" From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:21:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41B561065670; Sat, 8 May 2010 13:21:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF718FC15; Sat, 8 May 2010 13:21: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 o48DLN1s025911; Sat, 8 May 2010 13:21:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DLNSM025906; Sat, 8 May 2010 13:21:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081321.o48DLNSM025906@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207776 - in stable/6/gnu/usr.bin/gdb: . gdbserver 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, 08 May 2010 13:21:23 -0000 Author: imp Date: Sat May 8 13:21:22 2010 New Revision: 207776 URL: http://svn.freebsd.org/changeset/base/207776 Log: Merge gdbserver support for arm from head (r185023). Added: stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c Modified: stable/6/gnu/usr.bin/gdb/Makefile stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/6/gnu/usr.bin/gdb/ (props changed) stable/6/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/6/gnu/usr.bin/gdb/Makefile ============================================================================== --- stable/6/gnu/usr.bin/gdb/Makefile Sat May 8 13:12:52 2010 (r207775) +++ stable/6/gnu/usr.bin/gdb/Makefile Sat May 8 13:21:22 2010 (r207776) @@ -2,7 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" SUBDIR+=gdbserver .endif Modified: stable/6/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:12:52 2010 (r207775) +++ stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:21:22 2010 (r207776) @@ -10,9 +10,17 @@ GDBDIR= ${.CURDIR}/../../../../contrib/g PROG= gdbserver -SRCS= i387-fp.c inferiors.c mem-break.c regcache.c remote-utils.c \ - server.c signals.c target.c reg-i386.c utils.c -SRCS+= fbsd-low.c fbsd-i386-low.c +SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \ + server.c signals.c target.c utils.c +SRCS+= fbsd-low.c + +.if ${MACHINE_ARCH} == "i386" +SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c +.endif + +.if ${MACHINE_ARCH} == "arm" +SRCS+= fbsd-arm-low.c reg-arm.c +.endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver Copied: stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c Sat May 8 13:21:22 2010 (r207776, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) @@ -0,0 +1,146 @@ +/* FreeBSD/ARM specific low level interface, for the remote server for GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#ifdef HAVE_SYS_REG_H +#include +#endif + +#include +#include + +#define arm_num_regs 26 + +static int arm_regmap[] = { + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + 64 +}; + +static int +arm_cannot_store_register (int regno) +{ + return (regno >= arm_num_regs); +} + +static int +arm_cannot_fetch_register (int regno) +{ + return (regno >= arm_num_regs); +} + +extern int debug_threads; + +static CORE_ADDR +arm_get_pc () +{ + unsigned long pc; + collect_register_by_name ("pc", &pc); + if (debug_threads) + fprintf (stderr, "stop pc is %08lx\n", pc); + return pc; +} + +static void +arm_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. We do not support Thumb yet. */ +static const unsigned long arm_breakpoint = 0xef9f0001; +#define arm_breakpoint_len 4 + +static int +arm_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == arm_breakpoint) + return 1; + + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +/* We only place breakpoints in empty marker functions, and thread locking + is outside of the function. So rather than importing software single-step, + we can just run until exit. */ +static CORE_ADDR +arm_reinsert_addr () +{ + unsigned long pc; + collect_register_by_name ("lr", &pc); + return pc; +} + +static void +arm_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + collect_register (i, ((char *) buf) + arm_regmap[i]); + +} + +static void +arm_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + supply_register (i, ((char *) buf) + arm_regmap[i]); + +} + + +struct regset_info target_regsets[] = { + {PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + arm_fill_gregset, arm_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + arm_num_regs, + arm_regmap, + arm_cannot_fetch_register, + arm_cannot_store_register, + arm_get_pc, + arm_set_pc, + (const char *) &arm_breakpoint, + arm_breakpoint_len, + arm_reinsert_addr, + 0, + arm_breakpoint_at, +}; Copied: stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c Sat May 8 13:21:22 2010 (r207776, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) @@ -0,0 +1,68 @@ +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file was created with the aid of ``regdat.sh'' and ``reg-arm.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_arm[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "sp", 416, 32 }, + { "lr", 448, 32 }, + { "pc", 480, 32 }, + { "f0", 512, 96 }, + { "f1", 608, 96 }, + { "f2", 704, 96 }, + { "f3", 800, 96 }, + { "f4", 896, 96 }, + { "f5", 992, 96 }, + { "f6", 1088, 96 }, + { "f7", 1184, 96 }, + { "fps", 1280, 32 }, + { "cpsr", 1312, 32 }, +}; + +const char *expedite_regs_arm[] = { "r11", "sp", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_arm, + sizeof (regs_arm) / sizeof (regs_arm[0])); + gdbserver_expedite_regs = expedite_regs_arm; +} From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:23:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7F04106566C; Sat, 8 May 2010 13:23:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B631D8FC15; Sat, 8 May 2010 13:23: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 o48DNvUm026526; Sat, 8 May 2010 13:23:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DNvpt026521; Sat, 8 May 2010 13:23:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081323.o48DNvpt026521@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:23:57 +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: r207777 - in stable/7/gnu/usr.bin/gdb: . gdbserver 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, 08 May 2010 13:23:57 -0000 Author: imp Date: Sat May 8 13:23:57 2010 New Revision: 207777 URL: http://svn.freebsd.org/changeset/base/207777 Log: MFC 185023 (by raj): Initial gdbserver support for ARM. Obtained from: Juniper Networks, Semihalf Added: stable/7/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c stable/7/gnu/usr.bin/gdb/gdbserver/reg-arm.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c Modified: stable/7/gnu/usr.bin/gdb/Makefile stable/7/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/7/gnu/usr.bin/gdb/ (props changed) stable/7/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/7/gnu/usr.bin/gdb/Makefile ============================================================================== --- stable/7/gnu/usr.bin/gdb/Makefile Sat May 8 13:21:22 2010 (r207776) +++ stable/7/gnu/usr.bin/gdb/Makefile Sat May 8 13:23:57 2010 (r207777) @@ -2,7 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" SUBDIR+=gdbserver .endif Modified: stable/7/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/7/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:21:22 2010 (r207776) +++ stable/7/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:23:57 2010 (r207777) @@ -10,9 +10,17 @@ GDBDIR= ${.CURDIR}/../../../../contrib/g PROG= gdbserver -SRCS= i387-fp.c inferiors.c mem-break.c regcache.c remote-utils.c \ - server.c signals.c target.c reg-i386.c utils.c -SRCS+= fbsd-low.c fbsd-i386-low.c +SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \ + server.c signals.c target.c utils.c +SRCS+= fbsd-low.c + +.if ${MACHINE_ARCH} == "i386" +SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c +.endif + +.if ${MACHINE_ARCH} == "arm" +SRCS+= fbsd-arm-low.c reg-arm.c +.endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver Copied: stable/7/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c Sat May 8 13:23:57 2010 (r207777, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) @@ -0,0 +1,146 @@ +/* FreeBSD/ARM specific low level interface, for the remote server for GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#ifdef HAVE_SYS_REG_H +#include +#endif + +#include +#include + +#define arm_num_regs 26 + +static int arm_regmap[] = { + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + 64 +}; + +static int +arm_cannot_store_register (int regno) +{ + return (regno >= arm_num_regs); +} + +static int +arm_cannot_fetch_register (int regno) +{ + return (regno >= arm_num_regs); +} + +extern int debug_threads; + +static CORE_ADDR +arm_get_pc () +{ + unsigned long pc; + collect_register_by_name ("pc", &pc); + if (debug_threads) + fprintf (stderr, "stop pc is %08lx\n", pc); + return pc; +} + +static void +arm_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. We do not support Thumb yet. */ +static const unsigned long arm_breakpoint = 0xef9f0001; +#define arm_breakpoint_len 4 + +static int +arm_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == arm_breakpoint) + return 1; + + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +/* We only place breakpoints in empty marker functions, and thread locking + is outside of the function. So rather than importing software single-step, + we can just run until exit. */ +static CORE_ADDR +arm_reinsert_addr () +{ + unsigned long pc; + collect_register_by_name ("lr", &pc); + return pc; +} + +static void +arm_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + collect_register (i, ((char *) buf) + arm_regmap[i]); + +} + +static void +arm_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + supply_register (i, ((char *) buf) + arm_regmap[i]); + +} + + +struct regset_info target_regsets[] = { + {PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + arm_fill_gregset, arm_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + arm_num_regs, + arm_regmap, + arm_cannot_fetch_register, + arm_cannot_store_register, + arm_get_pc, + arm_set_pc, + (const char *) &arm_breakpoint, + arm_breakpoint_len, + arm_reinsert_addr, + 0, + arm_breakpoint_at, +}; Copied: stable/7/gnu/usr.bin/gdb/gdbserver/reg-arm.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/gnu/usr.bin/gdb/gdbserver/reg-arm.c Sat May 8 13:23:57 2010 (r207777, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) @@ -0,0 +1,68 @@ +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file was created with the aid of ``regdat.sh'' and ``reg-arm.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_arm[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "sp", 416, 32 }, + { "lr", 448, 32 }, + { "pc", 480, 32 }, + { "f0", 512, 96 }, + { "f1", 608, 96 }, + { "f2", 704, 96 }, + { "f3", 800, 96 }, + { "f4", 896, 96 }, + { "f5", 992, 96 }, + { "f6", 1088, 96 }, + { "f7", 1184, 96 }, + { "fps", 1280, 32 }, + { "cpsr", 1312, 32 }, +}; + +const char *expedite_regs_arm[] = { "r11", "sp", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_arm, + sizeof (regs_arm) / sizeof (regs_arm[0])); + gdbserver_expedite_regs = expedite_regs_arm; +} From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:41:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3439B106566C; Sat, 8 May 2010 13:41:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 23E808FC1A; Sat, 8 May 2010 13:41: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 o48Df2TO030288; Sat, 8 May 2010 13:41:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Df2bC030286; Sat, 8 May 2010 13:41:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081341.o48Df2bC030286@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207778 - in stable/6/lib/libthread_db: . arch/arm 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, 08 May 2010 13:41:02 -0000 Author: imp Date: Sat May 8 13:41:01 2010 New Revision: 207778 URL: http://svn.freebsd.org/changeset/base/207778 Log: MFC r173703(cognet): Add arm support in libthread_db Added: stable/6/lib/libthread_db/arch/arm/ - copied from r173703, head/lib/libthread_db/arch/arm/ Modified: stable/6/lib/libthread_db/Makefile Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/Makefile ============================================================================== --- stable/6/lib/libthread_db/Makefile Sat May 8 13:23:57 2010 (r207777) +++ stable/6/lib/libthread_db/Makefile Sat May 8 13:41:01 2010 (r207778) @@ -6,7 +6,11 @@ LIB= thread_db SHLIB_MAJOR= 2 SRCS= thread_db.c SRCS+= libpthread_db.c libpthread_md.c +# libc_r not supported on arm +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "ia64" && \ + ${MACHINE_ARCH} != "poewrpc" && !defined(NO_LIBC_R) SRCS+= libc_r_db.c libc_r_md.c +.endif SRCS+= libthr_db.c INCS= thread_db.h WARNS?= 6 From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:41:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2764106564A; Sat, 8 May 2010 13:41:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B25818FC18; Sat, 8 May 2010 13: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 o48DfwYX030547; Sat, 8 May 2010 13:41:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DfwMI030545; Sat, 8 May 2010 13:41:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081341.o48DfwMI030545@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207779 - stable/6/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, 08 May 2010 13:41:58 -0000 Author: imp Date: Sat May 8 13:41:58 2010 New Revision: 207779 URL: http://svn.freebsd.org/changeset/base/207779 Log: Hand merge in support for compiling libthread_db on arm (from change r173703). Given the large delta between this and head, mergeinfo likely would do more harm than good. Modified: stable/6/lib/Makefile Modified: stable/6/lib/Makefile ============================================================================== --- stable/6/lib/Makefile Sat May 8 13:41:01 2010 (r207778) +++ stable/6/lib/Makefile Sat May 8 13:41:58 2010 (r207779) @@ -101,7 +101,7 @@ _libpthread= libpthread _libthr= libthr .endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" _libthread_db= libthread_db .endif From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:47:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AF3D1065672; Sat, 8 May 2010 13:47:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9098FC18; Sat, 8 May 2010 13:47: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 o48DkxHr031734; Sat, 8 May 2010 13:47:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Dkxpx031732; Sat, 8 May 2010 13:46:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081346.o48Dkxpx031732@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207780 - stable/6/lib/libthread_db/arch/arm 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, 08 May 2010 13:47:00 -0000 Author: imp Date: Sat May 8 13:46:59 2010 New Revision: 207780 URL: http://svn.freebsd.org/changeset/base/207780 Log: MFC r181044 (marcel): Cleanup for WARNS 2. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:41:58 2010 (r207779) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:46:59 2010 (r207780) @@ -97,7 +97,6 @@ pt_fpreg_to_ucontext(const struct fpreg void pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) { - const mcontext_t *mc = &uc->uc_mcontext; /* XXX */ memset(r, 0, sizeof(*r)); @@ -113,4 +112,5 @@ pt_reg_sstep(struct reg *reg, int step) { /* XXX */ + return (0); } From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:48:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C600F106567B; Sat, 8 May 2010 13:48:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B58418FC1E; Sat, 8 May 2010 13:48:31 +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 o48DmVVg032117; Sat, 8 May 2010 13:48:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DmVtY032115; Sat, 8 May 2010 13:48:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081348.o48DmVtY032115@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207781 - stable/6/lib/libthread_db/arch/arm 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, 08 May 2010 13:48:31 -0000 Author: imp Date: Sat May 8 13:48:31 2010 New Revision: 207781 URL: http://svn.freebsd.org/changeset/base/207781 Log: MFC r181059: Cleanup for WARNS 3. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:46:59 2010 (r207780) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:48:31 2010 (r207781) @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" From owner-svn-src-all@FreeBSD.ORG Sat May 8 13:49:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D7361065670; Sat, 8 May 2010 13:49:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCD68FC08; Sat, 8 May 2010 13:49: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 o48Dnh2W032429; Sat, 8 May 2010 13:49:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DnhFj032427; Sat, 8 May 2010 13:49:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081349.o48DnhFj032427@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207782 - stable/6/lib/libthread_db/arch/arm 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, 08 May 2010 13:49:43 -0000 Author: imp Date: Sat May 8 13:49:43 2010 New Revision: 207782 URL: http://svn.freebsd.org/changeset/base/207782 Log: MFC r181341 (marcel): Cleanup for WARNS 6. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:48:31 2010 (r207781) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:49:43 2010 (r207782) @@ -85,7 +85,7 @@ pt_ucontext_to_reg(const ucontext_t *uc, } void -pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc) { mcontext_t *mc = &uc->uc_mcontext; @@ -94,7 +94,7 @@ pt_fpreg_to_ucontext(const struct fpreg } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r) { /* XXX */ @@ -107,7 +107,7 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { /* XXX */ From owner-svn-src-all@FreeBSD.ORG Sat May 8 14:00:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DA5B106566C; Sat, 8 May 2010 14:00:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3E6468FC1A; Sat, 8 May 2010 14:00: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 o48E02Kv034732; Sat, 8 May 2010 14:00:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48E02TR034730; Sat, 8 May 2010 14:00:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005081400.o48E02TR034730@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 8 May 2010 14:00: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: r207783 - head/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, 08 May 2010 14:00:08 -0000 Author: jilles Date: Sat May 8 14:00:01 2010 New Revision: 207783 URL: http://svn.freebsd.org/changeset/base/207783 Log: sh: Have only one copy of _PATH_STDPATH in the binary. Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat May 8 13:49:43 2010 (r207782) +++ head/bin/sh/eval.c Sat May 8 14:00:01 2010 (r207783) @@ -1089,8 +1089,7 @@ breakcmd(int argc, char **argv) int commandcmd(int argc, char **argv) { - static char stdpath[] = _PATH_STDPATH; - char *path; + const char *path; int ch; int cmd = -1; @@ -1101,7 +1100,7 @@ commandcmd(int argc, char **argv) while ((ch = getopt(argc, argv, "pvV")) != -1) { switch (ch) { case 'p': - path = stdpath; + path = _PATH_STDPATH; break; case 'v': cmd = TYPECMD_SMALLV; From owner-svn-src-all@FreeBSD.ORG Sat May 8 14:12:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B67361065675; Sat, 8 May 2010 14:12:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A65658FC0C; Sat, 8 May 2010 14:12: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 o48EC4GK037379; Sat, 8 May 2010 14:12:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48EC4mf037377; Sat, 8 May 2010 14:12:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081412.o48EC4mf037377@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 14:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207784 - stable/6/gnu/usr.bin 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, 08 May 2010 14:12:04 -0000 Author: imp Date: Sat May 8 14:12:04 2010 New Revision: 207784 URL: http://svn.freebsd.org/changeset/base/207784 Log: gdb compiles and seems to work on arm on stable/6, so enable building it. Modified: stable/6/gnu/usr.bin/Makefile Modified: stable/6/gnu/usr.bin/Makefile ============================================================================== --- stable/6/gnu/usr.bin/Makefile Sat May 8 14:00:01 2010 (r207783) +++ stable/6/gnu/usr.bin/Makefile Sat May 8 14:12:04 2010 (r207784) @@ -21,7 +21,7 @@ SUBDIR= bc \ sort \ texinfo -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" NO_GDB= # not yet .endif From owner-svn-src-all@FreeBSD.ORG Sat May 8 14:50:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81E981065672; Sat, 8 May 2010 14:50:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 723B48FC12; Sat, 8 May 2010 14:50: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 o48EoCeh045662; Sat, 8 May 2010 14:50:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48EoCR6045659; Sat, 8 May 2010 14:50:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005081450.o48EoCR6045659@svn.freebsd.org> From: Rick Macklem Date: Sat, 8 May 2010 14:50:12 +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: r207785 - head/sys/fs/nfs 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, 08 May 2010 14:50:12 -0000 Author: rmacklem Date: Sat May 8 14:50:12 2010 New Revision: 207785 URL: http://svn.freebsd.org/changeset/base/207785 Log: Fix typos in macros. PR: kern/146375 Submitted by: simon AT comsys.ntu-kpi.kiev.ua MFC after: 1 week Modified: head/sys/fs/nfs/nfskpiport.h head/sys/fs/nfs/nfsport.h Modified: head/sys/fs/nfs/nfskpiport.h ============================================================================== --- head/sys/fs/nfs/nfskpiport.h Sat May 8 14:12:04 2010 (r207784) +++ head/sys/fs/nfs/nfskpiport.h Sat May 8 14:50:12 2010 (r207785) @@ -27,7 +27,7 @@ */ #ifndef _NFS_NFSKPIPORT_H_ -#define _NFSKPIPORT_NFS_H_ +#define _NFS_NFSKPIPORT_H_ /* * These definitions are needed since the generic code is now using Darwin8 * KPI stuff. (I know, seems a bit silly, but I want the code to build on @@ -70,4 +70,4 @@ typedef struct mbuf * mbuf_t; #define uio_iov_len(p) ((p)->uio_iov->iov_len) #define uio_iov_len_add(p, v) ((p)->uio_iov->iov_len += (v)) -#endif /* _NFSKPIPORT_NFS_H */ +#endif /* _NFS_NFSKPIPORT_H */ Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sat May 8 14:12:04 2010 (r207784) +++ head/sys/fs/nfs/nfsport.h Sat May 8 14:50:12 2010 (r207785) @@ -33,7 +33,7 @@ */ #ifndef _NFS_NFSPORT_H_ -#define _NFSPORT_NFS_H_ +#define _NFS_NFSPORT_H_ /* * In general, I'm not fond of #includes in .h files, but this seems @@ -918,4 +918,4 @@ struct nfsreq { #endif /* _KERNEL */ -#endif /* _NFSPORT_NFS_H */ +#endif /* _NFS_NFSPORT_H */ From owner-svn-src-all@FreeBSD.ORG Sat May 8 15:43:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1572106564A; Sat, 8 May 2010 15:43:59 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7FF8FC12; Sat, 8 May 2010 15:43: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 o48FhxnT057489; Sat, 8 May 2010 15:43:59 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Fhxbg057487; Sat, 8 May 2010 15:43:59 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201005081543.o48Fhxbg057487@svn.freebsd.org> From: Tim Kientzle Date: Sat, 8 May 2010 15:43: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: r207786 - head/usr.bin/tar 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, 08 May 2010 15:43:59 -0000 Author: kientzle Date: Sat May 8 15:43:59 2010 New Revision: 207786 URL: http://svn.freebsd.org/changeset/base/207786 Log: Various manpage updates, including many long-option synonyms that were previously undocumented. Modified: head/usr.bin/tar/bsdtar.1 Modified: head/usr.bin/tar/bsdtar.1 ============================================================================== --- head/usr.bin/tar/bsdtar.1 Sat May 8 14:50:12 2010 (r207785) +++ head/usr.bin/tar/bsdtar.1 Sat May 8 15:43:59 2010 (r207786) @@ -51,7 +51,7 @@ .Nm creates and manipulates streaming archive files. This implementation can extract from tar, pax, cpio, zip, jar, ar, -and ISO 9660 cdrom images and can create tar, pax, cpio, ar, +xar, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, and shar archives. .Pp The first synopsis form shows a @@ -67,6 +67,8 @@ is a mode indicator from the following l .Bl -tag -compact -width indent .It Fl c Create a new archive containing the specified items. +The long option form is +.Fl Fl create . .It Fl r Like .Fl c , @@ -75,8 +77,12 @@ Note that this only works on uncompresse The .Fl f option is required. +The long option form is +.Fl Fl append . .It Fl t List archive contents to stdout. +The long option form is +.Fl Fl list . .It Fl u Like .Fl r , @@ -86,11 +92,15 @@ Note that this only works on uncompresse The .Fl f option is required. +The long form is +.Fl Fl update . .It Fl x Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. +The long option form is +.Fl Fl extract . .El .Pp In @@ -127,14 +137,18 @@ In contrast, .Dl Nm Fl c Fl f Pa - Pa newfile Pa original.tar creates a new archive with only two entries. Similarly, -.Dl Nm Fl czf Pa - Fl -format Cm pax Cm @ Ns Pa - +.Dl Nm Fl czf Pa - Fl Fl format Cm pax Cm @ Ns Pa - reads an archive from standard input (whose format will be determined automatically) and converts it into a gzip-compressed pax-format archive on stdout. In this way, .Nm can be used to convert archives from one format to another. -.It Fl b Ar blocksize +.It Fl B , Fl Fl read-full-blocks +Ignored for compatibility with other +.Xr tar 1 +implementations. +.It Fl b Ar blocksize , Fl Fl block-size Ar blocksize Specify the block size, in 512-byte records, for tape drive I/O. As a rule, this argument is only needed when reading from or writing to tape drives, and usually not even then as the default block size of @@ -144,21 +158,22 @@ In c and r mode, this changes the direct the following files. In x mode, change directories after opening the archive but before extracting entries from the archive. -.It Fl -check-links -(c and r modes only) -Issue a warning message unless all links to each file are archived. -.It Fl -chroot +.It Fl Fl chroot (x mode only) .Fn chroot to the current directory after processing any .Fl C options and before extracting any files. -.It Fl -exclude Ar pattern +.It Fl Fl disable-copyfile +Mac OS X specific. +Disable the use of +.Xr copyfile 3 . +.It Fl Fl exclude Ar pattern Do not process files or directories that match the specified pattern. Note that exclusions take precedence over patterns or filenames specified on the command line. -.It Fl -format Ar format +.It Fl Fl format Ar format (c, r, u mode only) Use the specified format for the created archive. Supported formats include @@ -172,16 +187,39 @@ Other formats may also be supported; see for more information about currently-supported formats. In r and u modes, when extending an existing archive, the format specified here must be compatible with the format of the existing archive on disk. -.It Fl f Ar file +.It Fl f Ar file , Fl Fl file Ar file Read the archive from or write the archive to the specified file. The filename can be .Pa - for standard input or standard output. -If not specified, the default tape device will be used. -(On +The default varies by system; +on .Fx , -the default tape device is -.Pa /dev/sa0 . ) +the default is +.Pa /dev/sa0 ; +on Linux, the default is +.Pa /dev/st0 . +.It Fl Fl gid Ar id +Use the provided group id number. +On extract, this overrides the group id in the archive; +the group name in the archive will be ignored. +On create, this overrides the group id read from disk; +if +.Fl Fl gname +is not also specified, the group name will be set to +match the group id. +.It Fl Fl gname Ar name +Use the provided group name. +On extract, this overrides the group name in the archive; +if the provided group name does not exist on the system, +the group id +(from the archive or from the +.Fl Fl gid +option) +will be used instead. +On create, this sets the group name that will be stored +in the archive; +the name will not be verified against the system group database. .It Fl H (c and r mode only) Symbolic links named on the command line will be followed; the @@ -193,25 +231,36 @@ Synonym for .It Fl I Synonym for .Fl T . -.It Fl -include Ar pattern +.It Fl Fl help +Show usage. +.It Fl Fl include Ar pattern Process only files or directories that match the specified pattern. Note that exclusions specified with -.Fl -exclude +.Fl Fl exclude take precedence over inclusions. If no inclusions are explicitly specified, all entries are processed by default. The -.Fl -include +.Fl Fl include option is especially useful when filtering archives. For example, the command -.Dl Nm Fl c Fl f Pa new.tar Fl -include='*foo*' Cm @ Ns Pa old.tgz +.Dl Nm Fl c Fl f Pa new.tar Fl Fl include='*foo*' Cm @ Ns Pa old.tgz creates a new archive .Pa new.tar containing only the entries from .Pa old.tgz containing the string .Sq foo . -.It Fl j +.It Fl J , Fl Fl xz +(c mode only) +Compress the resulting archive with +.Xr xz 1 . +In extract or list modes, this option is ignored. +Note that, unlike other +.Nm tar +implementations, this implementation recognizes XZ compression +automatically when reading archives. +.It Fl j , Fl Fl bzip , Fl Fl bzip2 , Fl Fl bunzip2 (c mode only) Compress the resulting archive with .Xr bzip2 1 . @@ -220,69 +269,99 @@ Note that, unlike other .Nm tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. -.It Fl k +.It Fl k , Fl Fl keep-old-files (x mode only) Do not overwrite existing files. In particular, if a file appears more than once in an archive, later copies will not overwrite earlier copies. -.It Fl -keep-newer-files +.It Fl Fl keep-newer-files (x mode only) Do not overwrite existing files that are newer than the versions appearing in the archive being extracted. -.It Fl L +.It Fl L , Fl Fl dereference (c and r mode only) All symbolic links will be followed. Normally, symbolic links are archived as such. With this option, the target of the link will be archived instead. -.It Fl l -This is a synonym for the -.Fl -check-links -option. -.It Fl m +.It Fl l , Fl Fl check-links +(c and r modes only) +Issue a warning message unless all links to each file are archived. +.It Fl Fl lzma +(c mode only) Compress the resulting archive with the original LZMA algorithm. +Use of this option is discouraged and new archives should be created with +.Fl Fl xz +instead. +Note that, unlike other +.Nm tar +implementations, this implementation recognizes LZMA compression +automatically when reading archives. +.It Fl m , Fl Fl modification-time (x mode only) Do not extract modification time. By default, the modification time is set to the time stored in the archive. -.It Fl n +.It Fl n , Fl Fl norecurse , Fl Fl no-recursion (c, r, u modes only) Do not recursively archive the contents of directories. -.It Fl -newer Ar date +.It Fl Fl newer Ar date (c, r, u modes only) Only include files and directories newer than the specified date. This compares ctime entries. -.It Fl -newer-mtime Ar date +.It Fl Fl newer-mtime Ar date (c, r, u modes only) Like -.Fl -newer , +.Fl Fl newer , except it compares mtime entries instead of ctime entries. -.It Fl -newer-than Pa file +.It Fl Fl newer-than Pa file (c, r, u modes only) Only include files and directories newer than the specified file. This compares ctime entries. -.It Fl -newer-mtime-than Pa file +.It Fl Fl newer-mtime-than Pa file (c, r, u modes only) Like -.Fl -newer-than , +.Fl Fl newer-than , except it compares mtime entries instead of ctime entries. -.It Fl -nodump +.It Fl Fl nodump (c and r modes only) Honor the nodump file flag by skipping this file. -.It Fl -null +.It Fl Fl null (use with -.Fl I , -.Fl T , +.Fl I or -.Fl X ) +.Fl T ) Filenames or patterns are separated by null characters, not by newlines. This is often used to read filenames output by the .Fl print0 option to .Xr find 1 . -.It Fl -numeric-owner +.It Fl Fl no-same-owner +(x mode only) +Do not extract owner and group IDs. +This is the reverse of +.Fl Fl same-owner +and the default behavior if +.Nm +is run as non-root. +.It Fl Fl no-same-permissions (x mode only) -Ignore symbolic user and group names when restoring archives to disk, -only numeric uid and gid values will be obeyed. -.It Fl O +Do not extract full permissions (SGID, SUID, sticky bit, ACLs, +extended attributes or extended file flags). +This is the reverse of +.Fl p +and the default behavior if +.Nm +is run as non-root. +.It Fl Fl numeric-owner +This is equivalent to +.Fl Fl uname +.Qq +.Fl Fl gname +.Qq . +On extract, it causes user and group names in the archive +to be ignored in favor of the numeric user and group ids. +On create, it causes user and group names to not be stored +in the archive. +.It Fl O , Fl Fl to-stdout (x, t modes only) In extract (-x) mode, files will be written to standard out rather than being extracted to disk. @@ -301,11 +380,11 @@ the archive will be discarded. .It Fl o (c, r, u mode) A synonym for -.Fl -format Ar ustar -.It Fl -one-file-system +.Fl Fl format Ar ustar +.It Fl Fl one-file-system (c, r, and u modes) Do not cross mount points. -.It Fl -options Ar options +.It Fl Fl options Ar options Select optional behaviors for particular modules. The argument is a text string containing comma-separated keywords and values. @@ -376,7 +455,7 @@ Supported values are store (uncompressed .El If a provided option is not supported by any module, that is a fatal error. -.It Fl P +.It Fl P , Fl Fl absolute-paths Preserve pathnames. By default, absolute pathnames (those that begin with a / character) have the leading slash removed both when creating archives @@ -387,21 +466,22 @@ will refuse to extract archive entries w .Pa .. or whose target directory would be altered by a symlink. This option suppresses these behaviors. -.It Fl p +.It Fl p , Fl Fl insecure , Fl Fl preserve-permissions (x mode only) Preserve file permissions. Attempt to restore the full permissions, including owner, file modes, file flags and ACLs, if available, for each item extracted from the archive. -By default, newly-created files are owned by the user running -.Nm , -the file mode is restored for newly-created regular files, and -all other types of entries receive default permissions. -If +This is the default, if .Nm -is being run by root, the default is to restore the owner unless the -.Fl o -option is also specified. -.It Fl q ( Fl -fast-read ) +is being run by root and can be overriden by also specifying +.Fl Fl no-same-owner +and +.Fl Fl no-same-permissions . +.It Fl Fl posix +(c, r, u mode only) +Synonym for +.Fl Fl format Ar pax +.It Fl q , Fl Fl fast-read (x and t mode only) Extract or list only the first archive entry that matches each pattern or filename operand. @@ -416,7 +496,15 @@ Extract files as sparse files. For every block on disk, check first if it contains only NULL bytes and seek over it otherwise. This works similiar to the conv=sparse option of dd. -.It Fl -strip-components Ar count +.It Fl Fl same-owner +(x mode only) +Extract owner and group IDs. +This is the reverse of +.Fl Fl no-same-owner +and the default behavior if +.Nm +is run as root. +.It Fl Fl strip-components Ar count (x mode only) Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. @@ -439,7 +527,7 @@ If is not matched, the pattern is skipped. Within .Ar new , -~ is substituted with the match, \1 to \9 with the content of +~ is substituted with the match, \e1 to \e9 with the content of the corresponding captured group. The optional trailing g specifies that matching should continue after the matched part and stopped on the first unmatched pattern. @@ -448,7 +536,7 @@ of symbolic links. The optional trailing p specifies that after a successful substitution the original path name and the new path name should be printed to standard error. -.It Fl T Ar filename +.It Fl T Ar filename , Fl Fl files-from Ar filename In x or t mode, .Nm will read the list of names to be extracted from @@ -462,25 +550,50 @@ The special name on a line by itself will cause the current directory to be changed to the directory specified on the following line. Names are terminated by newlines unless -.Fl -null +.Fl Fl null is specified. Note that -.Fl -null +.Fl Fl null also disables the special handling of lines containing .Dq -C . -.It Fl U +.It Fl Fl totals +(c, r, u mode only) +After archiving all files, print a summary to stderr. +.It Fl U , Fl Fl unlink , Fl Fl unlink-first (x mode only) Unlink files before creating them. -Without this option, -.Nm -overwrites existing files, which preserves existing hardlinks. -With this option, existing hardlinks will be broken, as will any -symlink that would affect the location of an extracted file. -.It Fl -use-compress-program Ar program +This can be a minor performance optimization if most files +already exist, but can make things slower if most files +do not already exist. +This flag also causes +.Nm +to remove intervening directory symlinks instead of +reporting an error. +See the SECURITY section below for more details. +.It Fl Fl uid Ar id +Use the provided user id number and ignore the user +name from the archive. +On create, if +.Fl Fl uname +is not also specified, the user name will be set to +match the user id. +.It Fl Fl uname Ar name +Use the provided user name. +On extract, this overrides the user name in the archive; +if the provided user name does not exist on the system, +it will be ignored and the user id +(from the archive or from the +.Fl Fl uid +option) +will be used instead. +On create, this sets the user name that will be stored +in the archive; +the name is not verified against the system user database. +.It Fl Fl use-compress-program Ar program Pipe the input (in x or t mode) or the output (in c mode) through .Pa program instead of using the builtin compression support. -.It Fl v +.It Fl v , Fl Fl verbose Produce verbose output. In create and extract modes, .Nm @@ -493,18 +606,18 @@ will produce output similar to that of Additional .Fl v options will provide additional detail. -.It Fl -version +.It Fl Fl version Print version of .Nm and .Nm libarchive , and exit. -.It Fl w +.It Fl w , Fl Fl confirmation , Fl Fl interactive Ask for confirmation for every action. -.It Fl X Ar filename +.It Fl X Ar filename , Fl Fl exclude-from Ar filename Read a list of exclusion patterns from the specified file. See -.Fl -exclude +.Fl Fl exclude for more information about the handling of exclusions. .It Fl y (c mode only) @@ -515,25 +628,27 @@ Note that, unlike other .Nm tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. -.It Fl z +.It Fl Z , Fl Fl compress , Fl Fl uncompress (c mode only) Compress the resulting archive with -.Xr gzip 1 . +.Xr compress 1 . In extract or list modes, this option is ignored. Note that, unlike other .Nm tar -implementations, this implementation recognizes gzip compression +implementations, this implementation recognizes compress compression automatically when reading archives. -.It Fl Z +.It Fl z , Fl Fl gunzip , Fl Fl gzip (c mode only) Compress the resulting archive with -.Xr compress 1 . +.Xr gzip 1 . In extract or list modes, this option is ignored. Note that, unlike other .Nm tar -implementations, this implementation recognizes compress compression +implementations, this implementation recognizes gzip compression automatically when reading archives. .El +.Sh EXIT STATUS +.Ex -std .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : @@ -544,27 +659,19 @@ See .Xr environ 7 for more information. .It Ev TAPE -The default tape device. +The default device. The .Fl f option overrides this. +Please see the description of the +.Fl f +option above for more details. .It Ev TZ The timezone to use when displaying dates. See .Xr environ 7 for more information. .El -.Sh FILES -.Bl -tag -width ".Ev BLOCKSIZE" -.It Pa /dev/sa0 -The default tape device, if not overridden by the -.Ev TAPE -environment variable or the -.Fl f -option. -.El -.Sh EXIT STATUS -.Ex -std .Sh EXAMPLES The following creates a new archive called @@ -627,9 +734,9 @@ permissions, or names that differ from e .Dl $ tar -cvf output.tar @input.mtree .Pp The -.Fl -newer +.Fl Fl newer and -.Fl -newer-mtime +.Fl Fl newer-mtime switches accept a variety of common date and time specifications, including .Dq 12 Mar 2005 7:14:29pm , .Dq 2005-03-12 19:14 , @@ -638,7 +745,7 @@ and .Dq 19:14 PST May 1 . .Pp The -.Fl -options +.Fl Fl options argument can be used to control various details of archive generation or reading. For example, you can generate mtree output which only contains @@ -646,9 +753,9 @@ For example, you can generate mtree outp and .Cm uid keywords: -.Dl Nm Fl cf Pa file.tar Fl -format=mtree Fl -options='!all,type,time,uid' Pa dir +.Dl Nm Fl cf Pa file.tar Fl Fl format=mtree Fl Fl options='!all,type,time,uid' Pa dir or you can set the compression level used by gzip or xz compression: -.Dl Nm Fl czf Pa file.tar Fl -options='compression-level=9' . +.Dl Nm Fl czf Pa file.tar Fl Fl options='compression-level=9' . For more details, see the explanation of the .Fn archive_read_set_options and @@ -794,6 +901,7 @@ components, or symlinks to other directo .Xr mt 1 , .Xr pax 1 , .Xr shar 1 , +.Xr xz 1 , .Xr libarchive 3 , .Xr libarchive-formats 5 , .Xr tar 5 @@ -803,7 +911,7 @@ in .St -p1003.1-96 but was dropped from .St -p1003.1-2001 . -The options used by this implementation were developed by surveying a +The options supported by this implementation were developed by surveying a number of existing tar implementations as well as the old POSIX specification for tar and the current POSIX specification for pax. .Pp @@ -829,6 +937,9 @@ beginning with This is a complete re-implementation based on the .Xr libarchive 3 library. +It was first released with +.Fx 5.4 +in May, 2005. .Sh BUGS This program follows .St -p1003.1-96 @@ -838,7 +949,7 @@ option. Note that GNU tar prior to version 1.15 treated .Fl l as a synonym for the -.Fl -one-file-system +.Fl Fl one-file-system option. .Pp The @@ -916,6 +1027,3 @@ Converting between dissimilar archive fo convention can cause hard link information to be lost. (This is a consequence of the incompatible ways that different archive formats store hardlink information.) -.Pp -There are alternative long options for many of the short options that -are deliberately not documented. From owner-svn-src-all@FreeBSD.ORG Sat May 8 16:06:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59FA7106566B; Sat, 8 May 2010 16:06:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 114C38FC0A; Sat, 8 May 2010 16:06: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 o48G6tgW062535; Sat, 8 May 2010 16:06:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48G6sZr062526; Sat, 8 May 2010 16:06:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081606.o48G6sZr062526@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 16:06: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: r207787 - in stable/8: sbin/camcontrol sys/cam sys/cam/ata sys/dev/ahci sys/dev/siis 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, 08 May 2010 16:06:56 -0000 Author: mav Date: Sat May 8 16:06:54 2010 New Revision: 207787 URL: http://svn.freebsd.org/changeset/base/207787 Log: MFC r207499: Make SATA XPT negotiate and enable some additional SATA features, such as: - device initiated power management (some devices support only this way); - Automatic Partial to Slumber Transition (more power saving); - DMA auto-activation (expected to slightly improve performance). More features could be added later, when hardware supports. Modified: stable/8/sbin/camcontrol/camcontrol.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam_ccb.h stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h stable/8/sys/dev/siis/siis.c stable/8/sys/dev/siis/siis.h Directory Properties: stable/8/sbin/camcontrol/ (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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sbin/camcontrol/camcontrol.c Sat May 8 16:06:54 2010 (r207787) @@ -2855,6 +2855,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sNumber of tags: %d\n", pathstr, sata->tags); } + if ((sata->valid & CTS_SATA_VALID_CAPS) != 0) { + fprintf(stdout, "%sSATA capabilities: %08x\n", pathstr, + sata->caps); + } } if (cts->protocol == PROTO_SCSI) { struct ccb_trans_settings_scsi *scsi= Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/cam/ata/ata_pmp.c Sat May 8 16:06:54 2010 (r207787) @@ -101,6 +101,7 @@ struct pmp_softc { int events; #define PMP_EV_RESET 1 #define PMP_EV_RESCAN 2 + u_int caps; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -457,6 +458,14 @@ pmpstart(struct cam_periph *periph, unio ata_pm_read_cmd(ataio, 2, 15); break; case PMP_STATE_PRECONFIG: + /* Get/update host SATA capabilities. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + softc->caps = cts.xport_specific.sata.caps; cam_fill_ataio(ataio, pmp_retry_count, pmpdone, @@ -644,14 +653,16 @@ pmpdone(struct cam_periph *periph, union (done_ccb->ataio.res.lba_mid << 16) + (done_ccb->ataio.res.lba_low << 8) + done_ccb->ataio.res.sector_count; - if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) { + if (((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) || + (res & 0x600) != 0) { if (bootverbose) { printf("%s%d: port %d status: %08x\n", periph->periph_name, periph->unit_number, softc->pm_step, res); } - /* Report device speed. */ - if (xpt_create_path(&dpath, periph, + /* Report device speed if it is online. */ + if ((res & 0xf0f) == 0x103 && + xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), softc->pm_step, 0) == CAM_REQ_CMP) { bzero(&cts, sizeof(cts)); @@ -660,6 +671,9 @@ pmpdone(struct cam_periph *periph, union cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.revision = (res & 0x0f0) >> 4; cts.xport_specific.sata.valid = CTS_SATA_VALID_REVISION; + cts.xport_specific.sata.caps = softc->caps & + (CTS_SATA_CAPS_H_PMREQ | CTS_SATA_CAPS_H_DMAAA); + cts.xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); xpt_free_path(dpath); } Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/cam/ata/ata_xpt.c Sat May 8 16:06:54 2010 (r207787) @@ -88,6 +88,9 @@ typedef enum { PROBE_IDENTIFY, PROBE_SPINUP, PROBE_SETMODE, + PROBE_SETPM, + PROBE_SETAPST, + PROBE_SETDMAAA, PROBE_SET_MULTI, PROBE_INQUIRY, PROBE_FULL_INQUIRY, @@ -101,6 +104,9 @@ static char *probe_action_text[] = { "PROBE_IDENTIFY", "PROBE_SPINUP", "PROBE_SETMODE", + "PROBE_SETPM", + "PROBE_SETAPST", + "PROBE_SETDMAAA", "PROBE_SET_MULTI", "PROBE_INQUIRY", "PROBE_FULL_INQUIRY", @@ -132,6 +138,7 @@ typedef struct { uint32_t pm_prv; int restart; int spinup; + u_int caps; struct cam_periph *periph; } probe_softc; @@ -393,6 +400,45 @@ negotiate: ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode); break; } + case PROBE_SETPM: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_PMREQ) ? 0x10 : 0x90, + 0, 0x03); + break; + case PROBE_SETAPST: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_APST) ? 0x10 : 0x90, + 0, 0x07); + break; + case PROBE_SETDMAAA: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_DMAAA) ? 0x10 : 0x90, + 0, 0x02); + break; case PROBE_SET_MULTI: { u_int sectors, bytecount; @@ -685,6 +731,7 @@ probedone(struct cam_periph *periph, uni probe_softc *softc; struct cam_path *path; u_int32_t priority; + u_int caps; int found = 1; CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n")); @@ -879,6 +926,67 @@ noerror: xpt_schedule(periph, priority); return; case PROBE_SETMODE: + if (path->device->transport != XPORT_SATA) + goto notsata; + /* Set supported bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else + caps = 0; + if (ident_buf->satacapabilities != 0xffff) { + if (ident_buf->satacapabilities & ATA_SUPPORT_IFPWRMNGTRCV) + caps |= CTS_SATA_CAPS_D_PMREQ; + if (ident_buf->satacapabilities & ATA_SUPPORT_HAPST) + caps |= CTS_SATA_CAPS_D_APST; + } + /* Mask unwanted bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps &= cts.xport_specific.sata.caps; + /* Store result to SIM. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + xpt_action((union ccb *)&cts); + softc->caps = caps; + if (ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) { + PROBE_SET_ACTION(softc, PROBE_SETPM); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETPM: + if (ident_buf->satacapabilities != 0xffff && + ident_buf->satacapabilities & ATA_SUPPORT_DAPST) { + PROBE_SET_ACTION(softc, PROBE_SETAPST); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETAPST: + if (ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) { + PROBE_SET_ACTION(softc, PROBE_SETDMAAA); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETDMAAA: +notsata: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); } else { @@ -964,6 +1072,35 @@ noerror: snprintf(ident_buf->revision, sizeof(ident_buf->revision), "%04x", softc->pm_prv); path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; + /* Set supported bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else + caps = 0; + /* All PMPs must support PM requests. */ + caps |= CTS_SATA_CAPS_D_PMREQ; + /* Mask unwanted bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps &= cts.xport_specific.sata.caps; + /* Store result to SIM. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + xpt_action((union ccb *)&cts); + softc->caps = caps; if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/cam/cam_ccb.h Sat May 8 16:06:54 2010 (r207787) @@ -837,12 +837,21 @@ struct ccb_trans_settings_sata { #define CTS_SATA_VALID_PM 0x08 #define CTS_SATA_VALID_TAGS 0x10 #define CTS_SATA_VALID_ATAPI 0x20 +#define CTS_SATA_VALID_CAPS 0x40 int mode; /* Legacy PATA mode */ u_int bytecount; /* Length of PIO transaction */ int revision; /* SATA revision */ u_int pm_present; /* PM is present (XPT->SIM) */ u_int tags; /* Number of allowed tags */ u_int atapi; /* Length of ATAPI CDB */ + u_int caps; /* Device and host SATA caps. */ +#define CTS_SATA_CAPS_H 0x0000ffff +#define CTS_SATA_CAPS_H_PMREQ 0x00000001 +#define CTS_SATA_CAPS_H_APST 0x00000002 +#define CTS_SATA_CAPS_H_DMAAA 0x00000010 /* Auto-activation */ +#define CTS_SATA_CAPS_D 0xffff0000 +#define CTS_SATA_CAPS_D_PMREQ 0x00010000 +#define CTS_SATA_CAPS_D_APST 0x00020000 }; /* Get/Set transfer rate/width/disconnection/tag queueing settings */ Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/ahci/ahci.c Sat May 8 16:06:54 2010 (r207787) @@ -111,6 +111,7 @@ static struct { #define AHCI_Q_EDGEIS 64 #define AHCI_Q_SATA2 128 #define AHCI_Q_NOBSYRES 256 +#define AHCI_Q_NOAA 512 } ahci_ids[] = { {0x43801002, 0x00, "ATI IXP600", 0}, {0x43901002, 0x00, "ATI IXP700", 0}, @@ -167,75 +168,75 @@ static struct { {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x044c10de, 0x00, "NVIDIA MCP65", 0}, - {0x044d10de, 0x00, "NVIDIA MCP65", 0}, - {0x044e10de, 0x00, "NVIDIA MCP65", 0}, - {0x044f10de, 0x00, "NVIDIA MCP65", 0}, - {0x045c10de, 0x00, "NVIDIA MCP65", 0}, - {0x045d10de, 0x00, "NVIDIA MCP65", 0}, - {0x045e10de, 0x00, "NVIDIA MCP65", 0}, - {0x045f10de, 0x00, "NVIDIA MCP65", 0}, - {0x055010de, 0x00, "NVIDIA MCP67", 0}, - {0x055110de, 0x00, "NVIDIA MCP67", 0}, - {0x055210de, 0x00, "NVIDIA MCP67", 0}, - {0x055310de, 0x00, "NVIDIA MCP67", 0}, - {0x055410de, 0x00, "NVIDIA MCP67", 0}, - {0x055510de, 0x00, "NVIDIA MCP67", 0}, - {0x055610de, 0x00, "NVIDIA MCP67", 0}, - {0x055710de, 0x00, "NVIDIA MCP67", 0}, - {0x055810de, 0x00, "NVIDIA MCP67", 0}, - {0x055910de, 0x00, "NVIDIA MCP67", 0}, - {0x055A10de, 0x00, "NVIDIA MCP67", 0}, - {0x055B10de, 0x00, "NVIDIA MCP67", 0}, - {0x058410de, 0x00, "NVIDIA MCP67", 0}, - {0x07f010de, 0x00, "NVIDIA MCP73", 0}, - {0x07f110de, 0x00, "NVIDIA MCP73", 0}, - {0x07f210de, 0x00, "NVIDIA MCP73", 0}, - {0x07f310de, 0x00, "NVIDIA MCP73", 0}, - {0x07f410de, 0x00, "NVIDIA MCP73", 0}, - {0x07f510de, 0x00, "NVIDIA MCP73", 0}, - {0x07f610de, 0x00, "NVIDIA MCP73", 0}, - {0x07f710de, 0x00, "NVIDIA MCP73", 0}, - {0x07f810de, 0x00, "NVIDIA MCP73", 0}, - {0x07f910de, 0x00, "NVIDIA MCP73", 0}, - {0x07fa10de, 0x00, "NVIDIA MCP73", 0}, - {0x07fb10de, 0x00, "NVIDIA MCP73", 0}, - {0x0ad010de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad110de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad210de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad310de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad410de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad510de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad610de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad710de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad810de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad910de, 0x00, "NVIDIA MCP77", 0}, - {0x0ada10de, 0x00, "NVIDIA MCP77", 0}, - {0x0adb10de, 0x00, "NVIDIA MCP77", 0}, - {0x0ab410de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab510de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab610de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab710de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab810de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab910de, 0x00, "NVIDIA MCP79", 0}, - {0x0aba10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abb10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abc10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abd10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abe10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abf10de, 0x00, "NVIDIA MCP79", 0}, - {0x0d8410de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8510de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8610de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8710de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8810de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8910de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8a10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8b10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8c10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8d10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8e10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8f10de, 0x00, "NVIDIA MCP89", 0}, + {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x055010de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055110de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055210de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055310de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055510de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055610de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055710de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055810de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055910de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055A10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055B10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x058410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x07f010de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f110de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f210de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f310de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f410de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f510de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f610de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f710de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f810de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f910de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07fa10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07fb10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x0ad010de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad110de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad210de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad310de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad410de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad510de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad610de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad710de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad810de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad910de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ada10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0adb10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ab410de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab510de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab610de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab710de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab810de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab910de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0aba10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abb10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abc10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abd10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abe10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abf10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0d8410de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8510de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8610de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8710de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8810de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8910de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8a10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8b10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8c10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x33491106, 0x00, "VIA VT8251", 0}, {0x62871106, 0x00, "VIA VT8251", 0}, {0x11841039, 0x00, "SiS 966", 0}, @@ -854,7 +855,14 @@ ahci_ch_attach(device_t dev) ch->user[i].mode = 0; ch->user[i].bytecount = 8192; ch->user[i].tags = ch->numslots; + ch->user[i].caps = 0; ch->curr[i] = ch->user[i]; + if (ch->pm_level) { + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ | + CTS_SATA_CAPS_H_APST | + CTS_SATA_CAPS_D_PMREQ | CTS_SATA_CAPS_D_APST; + } + ch->user[i].caps |= CTS_SATA_CAPS_H_DMAAA; } rid = ch->unit; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -1954,7 +1962,8 @@ ahci_end_transaction(struct ahci_slot *s et != AHCI_ERR_TIMEOUT) ahci_rearm_timeout(dev); /* Start PM timer. */ - if (ch->numrslots == 0 && ch->pm_level > 3) { + if (ch->numrslots == 0 && ch->pm_level > 3 && + (ch->curr[ch->pm_present ? 15 : 0].caps & CTS_SATA_CAPS_D_PMREQ)) { callout_schedule(&ch->pm_timer, (ch->pm_level == 4) ? hz / 1000 : hz / 8); } @@ -2458,6 +2467,8 @@ ahciaction(struct cam_sim *sim, union cc ch->pm_present = cts->xport_specific.sata.pm_present; if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -2490,9 +2501,24 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) { + if (ch->caps & (AHCI_CAP_PSC | AHCI_CAP_SSC)) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + if (ch->caps2 & AHCI_CAP2_APST) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_APST; + } + if ((ch->caps & AHCI_CAP_SNCQ) && + (ch->quirks & AHCI_Q_NOAA) == 0) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_DMAAA; + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE; Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/ahci/ahci.h Sat May 8 16:06:54 2010 (r207787) @@ -372,6 +372,7 @@ struct ahci_device { u_int bytecount; u_int atapi; u_int tags; + u_int caps; }; /* structure describing an ATA channel */ Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/siis/siis.c Sat May 8 16:06:54 2010 (r207787) @@ -448,6 +448,8 @@ siis_ch_attach(device_t dev) ch->user[i].bytecount = 8192; ch->user[i].tags = SIIS_MAX_SLOTS; ch->curr[i] = ch->user[i]; + if (ch->pm_level) + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ; } mtx_init(&ch->mtx, "SIIS channel lock", NULL, MTX_DEF); rid = ch->unit; @@ -1697,6 +1699,8 @@ siisaction(struct cam_sim *sim, union cc } if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -1729,9 +1733,17 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE; Modified: stable/8/sys/dev/siis/siis.h ============================================================================== --- stable/8/sys/dev/siis/siis.h Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/siis/siis.h Sat May 8 16:06:54 2010 (r207787) @@ -358,6 +358,7 @@ struct siis_device { u_int bytecount; u_int atapi; u_int tags; + u_int caps; }; /* structure describing an ATA channel */ From owner-svn-src-all@FreeBSD.ORG Sat May 8 16:10:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 158751065672; Sat, 8 May 2010 16:10:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 059928FC16; Sat, 8 May 2010 16: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 o48GAsJC063463; Sat, 8 May 2010 16:10:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48GAsGP063461; Sat, 8 May 2010 16:10:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081610.o48GAsGP063461@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 16:10: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: r207788 - stable/8/sys/dev/ahci 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, 08 May 2010 16:10:55 -0000 Author: mav Date: Sat May 8 16:10:54 2010 New Revision: 207788 URL: http://svn.freebsd.org/changeset/base/207788 Log: MFC r207511: Enable PCI busmastering explicitly to be sure. Modified: stable/8/sys/dev/ahci/ahci.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat May 8 16:06:54 2010 (r207787) +++ stable/8/sys/dev/ahci/ahci.c Sat May 8 16:10:54 2010 (r207788) @@ -340,6 +340,7 @@ ahci_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); } + pci_enable_busmaster(dev); /* Reset controller */ if ((error = ahci_ctlr_reset(dev)) != 0) { bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); From owner-svn-src-all@FreeBSD.ORG Sat May 8 16:19:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84932106566C; Sat, 8 May 2010 16:19:17 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 752FA8FC0C; Sat, 8 May 2010 16: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 o48GJHnO065336; Sat, 8 May 2010 16:19:17 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48GJHA2065334; Sat, 8 May 2010 16:19:17 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201005081619.o48GJHA2065334@svn.freebsd.org> From: Ulf Lilleengen Date: Sat, 8 May 2010 16:19: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: r207789 - head/sys/geom/vinum 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, 08 May 2010 16:19:17 -0000 Author: lulf Date: Sat May 8 16:19:17 2010 New Revision: 207789 URL: http://svn.freebsd.org/changeset/base/207789 Log: - Remove obsolete flags. MFC after: 1 week Modified: head/sys/geom/vinum/geom_vinum_var.h Modified: head/sys/geom/vinum/geom_vinum_var.h ============================================================================== --- head/sys/geom/vinum/geom_vinum_var.h Sat May 8 16:10:54 2010 (r207788) +++ head/sys/geom/vinum/geom_vinum_var.h Sat May 8 16:19:17 2010 (r207789) @@ -335,9 +335,6 @@ struct gv_plex { int flags; #define GV_PLEX_ADDED 0x01 /* Added to an existing volume. */ #define GV_PLEX_SYNCING 0x02 /* Plex is syncing from another plex. */ -#define GV_PLEX_THREAD_ACTIVE 0x04 /* Plex has an active RAID5 thread. */ -#define GV_PLEX_THREAD_DIE 0x08 /* Signal the RAID5 thread to die. */ -#define GV_PLEX_THREAD_DEAD 0x10 /* The RAID5 thread has died. */ #define GV_PLEX_NEWBORN 0x20 /* The plex was just created. */ #define GV_PLEX_REBUILDING 0x40 /* The plex is rebuilding. */ #define GV_PLEX_GROWING 0x80 /* The plex is growing. */ @@ -371,9 +368,6 @@ struct gv_volume { #define GV_VOL_UP 1 int flags; -#define GV_VOL_THREAD_ACTIVE 0x01 /* Volume has an active thread. */ -#define GV_VOL_THREAD_DIE 0x02 /* Signal the thread to die. */ -#define GV_VOL_THREAD_DEAD 0x04 /* The thread has died. */ #define GV_VOL_NEWBORN 0x08 /* The volume was just created. */ LIST_HEAD(,gv_plex) plexes; /* List of attached plexes. */ From owner-svn-src-all@FreeBSD.ORG Sat May 8 16:28:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C00FB106566B; Sat, 8 May 2010 16:28:22 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id AF6298FC13; Sat, 8 May 2010 16:28: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 o48GSMa0067365; Sat, 8 May 2010 16:28:22 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48GSM9s067363; Sat, 8 May 2010 16:28:22 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201005081628.o48GSM9s067363@svn.freebsd.org> From: Tim Kientzle Date: Sat, 8 May 2010 16:28: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: r207790 - head/usr.bin/tar 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, 08 May 2010 16:28:22 -0000 Author: kientzle Date: Sat May 8 16:28:22 2010 New Revision: 207790 URL: http://svn.freebsd.org/changeset/base/207790 Log: Config updates. Modified: head/usr.bin/tar/config_freebsd.h Modified: head/usr.bin/tar/config_freebsd.h ============================================================================== --- head/usr.bin/tar/config_freebsd.h Sat May 8 16:19:17 2010 (r207789) +++ head/usr.bin/tar/config_freebsd.h Sat May 8 16:28:22 2010 (r207790) @@ -30,6 +30,7 @@ #undef HAVE_ATTR_XATTR_H #define HAVE_CHROOT 1 +#undef HAVE_DIRECT_H #define HAVE_DIRENT_D_NAMLEN 1 #define HAVE_DIRENT_H 1 #define HAVE_D_MD_ORDER 1 @@ -38,32 +39,43 @@ #define HAVE_FCHDIR 1 #define HAVE_FCNTL_H 1 #define HAVE_GRP_H 1 +#undef HAVE_IO_H #define HAVE_LANGINFO_H 1 +#undef HAVE_LIBACL #define HAVE_LIBARCHIVE 1 #define HAVE_LIMITS_H 1 #undef HAVE_LINUX_EXT2_FS_H #undef HAVE_LINUX_FS_H #define HAVE_LOCALE_H 1 -#if __FreeBSD_version >= 450002 /* nl_langinfo introduced */ +#define HAVE_MBTOWC 1 +#undef HAVE_NDIR_H #define HAVE_NL_LANGINFO 1 -#endif #define HAVE_PATHS_H 1 #define HAVE_PWD_H 1 #define HAVE_REGEX_H 1 #define HAVE_SETLOCALE 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL_H 1 #define HAVE_STDARG_H 1 +#define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 +#undef HAVE_STRNCPY_S #define HAVE_STRUCT_STAT_ST_FLAGS 1 -#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 +#undef HAVE_STRUCT_STAT_ST_MTIME_N +#undef HAVE_STRUCT_STAT_ST_MTIME_USEC +#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC +#undef HAVE_STRUCT_STAT_ST_UMTIME +#define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_DIR_H 1 #define HAVE_SYS_IOCTL_H 1 +#undef HAVE_SYS_NDIR_H #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_STAT_H 1 -#define HAVE_TIME_H 1 #define HAVE_SYS_TYPES_H 1 -#define HAVE_UINTMAX_T 1 +#define HAVE_TIME_H 1 #define HAVE_UNISTD_H 1 -#define HAVE_UNSIGNED_LONG_LONG #define HAVE_WCTYPE_H 1 -#undef MAJOR_IN_MKDEV +#undef HAVE_WINDOWS_H + From owner-svn-src-all@FreeBSD.ORG Sat May 8 16:29:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 396A2106566B; Sat, 8 May 2010 16:29:03 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 10D208FC08; Sat, 8 May 2010 16:29: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 o48GT2Rg067533; Sat, 8 May 2010 16:29:02 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48GT2f8067531; Sat, 8 May 2010 16:29:02 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201005081629.o48GT2f8067531@svn.freebsd.org> From: Tim Kientzle Date: Sat, 8 May 2010 16:29: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: r207791 - head/usr.bin/tar 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, 08 May 2010 16:29:03 -0000 Author: kientzle Date: Sat May 8 16:29:02 2010 New Revision: 207791 URL: http://svn.freebsd.org/changeset/base/207791 Log: FreeBSD is now using bsdtar 2.8.3. Modified: head/usr.bin/tar/Makefile Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Sat May 8 16:28:22 2010 (r207790) +++ head/usr.bin/tar/Makefile Sat May 8 16:29:02 2010 (r207791) @@ -2,7 +2,7 @@ .include PROG= bsdtar -BSDTAR_VERSION_STRING=2.7.0 +BSDTAR_VERSION_STRING=2.8.3 SRCS= bsdtar.c \ cmdline.c \ err.c \ From owner-svn-src-all@FreeBSD.ORG Sat May 8 16:47:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71FDE106566C; Sat, 8 May 2010 16:47:33 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 60B4F8FC0C; Sat, 8 May 2010 16:47: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 o48GlXgS071720; Sat, 8 May 2010 16:47:33 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48GlXxV071713; Sat, 8 May 2010 16:47:33 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201005081647.o48GlXxV071713@svn.freebsd.org> From: Tim Kientzle Date: Sat, 8 May 2010 16:47: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: r207792 - head/usr.bin/cpio 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, 08 May 2010 16:47:33 -0000 Author: kientzle Date: Sat May 8 16:47:33 2010 New Revision: 207792 URL: http://svn.freebsd.org/changeset/base/207792 Log: bsdcpio 2.8.3 Added: head/usr.bin/cpio/err.h (contents, props changed) head/usr.bin/cpio/line_reader.c (contents, props changed) head/usr.bin/cpio/line_reader.h (contents, props changed) Modified: head/usr.bin/cpio/Makefile head/usr.bin/cpio/bsdcpio.1 head/usr.bin/cpio/cmdline.c head/usr.bin/cpio/config_freebsd.h head/usr.bin/cpio/cpio.c head/usr.bin/cpio/cpio.h head/usr.bin/cpio/cpio_platform.h head/usr.bin/cpio/err.c head/usr.bin/cpio/matching.c head/usr.bin/cpio/matching.h head/usr.bin/cpio/pathmatch.c head/usr.bin/cpio/pathmatch.h Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Sat May 8 16:29:02 2010 (r207791) +++ head/usr.bin/cpio/Makefile Sat May 8 16:47:33 2010 (r207792) @@ -3,8 +3,8 @@ .include PROG= bsdcpio -BSDCPIO_VERSION_STRING=2.7.0 -SRCS= cpio.c cmdline.c err.c matching.c pathmatch.c +BSDCPIO_VERSION_STRING=2.8.3 +SRCS= cpio.c cmdline.c err.c line_reader.c matching.c pathmatch.c CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" .ifdef RELEASE_CRUNCH Modified: head/usr.bin/cpio/bsdcpio.1 ============================================================================== --- head/usr.bin/cpio/bsdcpio.1 Sat May 8 16:29:02 2010 (r207791) +++ head/usr.bin/cpio/bsdcpio.1 Sat May 8 16:47:33 2010 (r207792) @@ -80,6 +80,9 @@ specified directory. Unless specifically stated otherwise, options are applicable in all operating modes. .Bl -tag -width indent +.It Fl 0 +Read filenames separated by NUL characters instead of newlines. +This is necessary if any of the filenames being read might contain newlines. .It Fl A (o mode only) Append to the specified archive. @@ -142,6 +145,11 @@ for more complete information about the formats currently supported by the underlying .Xr libarchive 3 library. +.It Fl H Ar format +Synonym for +.Fl -format . +.It Fl h , Fl -help +Print usage information. .It Fl I Ar file Read archive from .Ar file . @@ -154,6 +162,14 @@ Disable security checks during extractio This allows extraction via symbolic links and path names containing .Sq .. in the name. +.It Fl J +(o mode only) +Compress the file with xz-compatible compression before writing it. +In input mode, this option is ignored; xz compression is recognized +automatically on input. +.It Fl j +Synonym for +.Fl y . .It Fl L (o and p modes) All symbolic links will be followed. @@ -163,6 +179,11 @@ With this option, the target of the link (p mode only) Create links from the target directory to the original files, instead of copying. +.It Fl lzma +(o mode only) +Compress the file with lzma-compatible compression before writing it. +In input mode, this option is ignored; lzma compression is recognized +automatically on input. .It Fl m (i and p modes) Set file modification time on created files to match @@ -176,6 +197,10 @@ By default, displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. +.It Fl no-preserve-owner +(i mode only) +Do not attempt to restore file ownership. +This is the default when run by non-root users. .It Fl O Ar file Write archive to .Ar file . @@ -185,6 +210,10 @@ See above for description. .It Fl p Pass-through mode. See above for description. +.It Fl preserve-owner +(i mode only) +Restore file ownership. +This is the default when run by the root user. .It Fl -quiet Suppress unnecessary messages. .It Fl R Oo user Oc Ns Oo : Oc Ns Oo group Oc @@ -266,7 +295,7 @@ for more information. .Sh EXAMPLES The .Nm -command is traditionally used to copy file hierarchies in conjunction +command is traditionally used to copy file heirarchies in conjunction with the .Xr find 1 command. Modified: head/usr.bin/cpio/cmdline.c ============================================================================== --- head/usr.bin/cpio/cmdline.c Sat May 8 16:29:02 2010 (r207791) +++ head/usr.bin/cpio/cmdline.c Sat May 8 16:47:33 2010 (r207792) @@ -46,11 +46,12 @@ __FBSDID("$FreeBSD$"); #endif #include "cpio.h" +#include "err.h" /* * Short options for cpio. Please keep this sorted. */ -static const char *short_options = "0AaBC:F:O:cdE:f:H:hijLlmnopR:rtuvVW:yZz"; +static const char *short_options = "0AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuvW:yZz"; /* * Long options for cpio. Please keep this sorted. @@ -61,7 +62,6 @@ static const struct option { int equivalent; /* Equivalent short option. */ } cpio_longopts[] = { { "create", 0, 'o' }, - { "dot", 0, 'V' }, { "extract", 0, 'i' }, { "file", 1, 'F' }, { "format", 1, 'H' }, @@ -69,6 +69,7 @@ static const struct option { { "insecure", 0, OPTION_INSECURE }, { "link", 0, 'l' }, { "list", 0, 't' }, + { "lzma", 0, OPTION_LZMA }, { "make-directories", 0, 'd' }, { "no-preserve-owner", 0, OPTION_NO_PRESERVE_OWNER }, { "null", 0, '0' }, @@ -76,10 +77,12 @@ static const struct option { { "owner", 1, 'R' }, { "pass-through", 0, 'p' }, { "preserve-modification-time", 0, 'm' }, + { "preserve-owner", 0, OPTION_PRESERVE_OWNER }, { "quiet", 0, OPTION_QUIET }, { "unconditional", 0, 'u' }, { "verbose", 0, 'v' }, { "version", 0, OPTION_VERSION }, + { "xz", 0, 'J' }, { NULL, 0, 0 } }; @@ -172,7 +175,7 @@ cpio_getopt(struct cpio *cpio) /* Otherwise, pick up the next word. */ opt_word = *cpio->argv; if (opt_word == NULL) { - cpio_warnc(0, + warnc(0, "Option -%c requires an argument", opt); return ('?'); @@ -223,13 +226,13 @@ cpio_getopt(struct cpio *cpio) /* Fail if there wasn't a unique match. */ if (match == NULL) { - cpio_warnc(0, + warnc(0, "Option %s%s is not supported", long_prefix, opt_word); return ('?'); } if (match2 != NULL) { - cpio_warnc(0, + warnc(0, "Ambiguous option %s%s (matches --%s and --%s)", long_prefix, opt_word, match->name, match2->name); return ('?'); @@ -241,7 +244,7 @@ cpio_getopt(struct cpio *cpio) if (cpio->optarg == NULL) { cpio->optarg = *cpio->argv; if (cpio->optarg == NULL) { - cpio_warnc(0, + warnc(0, "Option %s%s requires an argument", long_prefix, match->name); return ('?'); @@ -252,7 +255,7 @@ cpio_getopt(struct cpio *cpio) } else { /* Argument forbidden: fail if there is one. */ if (cpio->optarg != NULL) { - cpio_warnc(0, + warnc(0, "Option %s%s does not allow an argument", long_prefix, match->name); return ('?'); @@ -283,17 +286,20 @@ cpio_getopt(struct cpio *cpio) * * Sets uid/gid return as appropriate, -1 indicates uid/gid not specified. * + * Returns NULL if no error, otherwise returns error string for display. + * */ -int +const char * owner_parse(const char *spec, int *uid, int *gid) { + static char errbuff[128]; const char *u, *ue, *g; *uid = -1; *gid = -1; if (spec[0] == '\0') - return (1); + return ("Invalid empty user/group spec"); /* * Split spec into [user][:.][group] @@ -321,10 +327,8 @@ owner_parse(const char *spec, int *uid, struct passwd *pwent; user = (char *)malloc(ue - u + 1); - if (user == NULL) { - cpio_warnc(errno, "Couldn't allocate memory"); - return (1); - } + if (user == NULL) + return ("Couldn't allocate memory"); memcpy(user, u, ue - u); user[ue - u] = '\0'; if ((pwent = getpwnam(user)) != NULL) { @@ -336,9 +340,10 @@ owner_parse(const char *spec, int *uid, errno = 0; *uid = strtoul(user, &end, 10); if (errno || *end != '\0') { - cpio_warnc(errno, + snprintf(errbuff, sizeof(errbuff), "Couldn't lookup user ``%s''", user); - return (1); + errbuff[sizeof(errbuff) - 1] = '\0'; + return (errbuff); } } free(user); @@ -353,11 +358,12 @@ owner_parse(const char *spec, int *uid, errno = 0; *gid = strtoul(g, &end, 10); if (errno || *end != '\0') { - cpio_warnc(errno, + snprintf(errbuff, sizeof(errbuff), "Couldn't lookup group ``%s''", g); - return (1); + errbuff[sizeof(errbuff) - 1] = '\0'; + return (errbuff); } } } - return (0); + return (NULL); } Modified: head/usr.bin/cpio/config_freebsd.h ============================================================================== --- head/usr.bin/cpio/config_freebsd.h Sat May 8 16:29:02 2010 (r207791) +++ head/usr.bin/cpio/config_freebsd.h Sat May 8 16:47:33 2010 (r207792) @@ -25,83 +25,32 @@ * $FreeBSD$ */ -/* A default configuration for FreeBSD, used if there is no config.h. */ +/* A hand-tooled configuration for FreeBSD. */ #include /* __FreeBSD_version */ -#if __FreeBSD__ > 4 -#define HAVE_ACL_GET_PERM 0 -#define HAVE_ACL_GET_PERM_NP 1 -#define HAVE_ACL_PERMSET_T 1 -#define HAVE_ACL_USER 1 -#endif -#undef HAVE_ATTR_XATTR_H -#define HAVE_BZLIB_H 1 -#define HAVE_CHFLAGS 1 -#define HAVE_DECL_OPTARG 1 -#define HAVE_DECL_OPTIND 1 -#define HAVE_DIRENT_D_NAMLEN 1 #define HAVE_DIRENT_H 1 -#define HAVE_D_MD_ORDER 1 #define HAVE_ERRNO_H 1 -#undef HAVE_EXT2FS_EXT2_FS_H -#define HAVE_FCHDIR 1 #define HAVE_FCNTL_H 1 -#define HAVE_FNMATCH 1 -#define HAVE_FNMATCH_H 1 -#define HAVE_FNM_LEADING_DIR 1 -#define HAVE_FTRUNCATE 1 #define HAVE_FUTIMES 1 -#undef HAVE_GETXATTR #define HAVE_GRP_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_LANGINFO_H 1 -#undef HAVE_LGETXATTR -#undef HAVE_LIBACL #define HAVE_LIBARCHIVE 1 -#define HAVE_LIBBZ2 1 -#define HAVE_LIBZ 1 -#define HAVE_LIMITS_H 1 -#undef HAVE_LINUX_EXT2_FS_H -#undef HAVE_LINUX_FS_H -#undef HAVE_LISTXATTR -#undef HAVE_LLISTXATTR -#define HAVE_LOCALE_H 1 +#define HAVE_LINK 1 +#define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 -#define HAVE_MALLOC 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 -#define HAVE_MEMSET 1 -#if __FreeBSD_version >= 450002 /* nl_langinfo introduced */ -#define HAVE_NL_LANGINFO 1 -#endif -#define HAVE_PATHS_H 1 #define HAVE_PWD_H 1 -#define HAVE_SETLOCALE 1 +#define HAVE_READLINK 1 #define HAVE_STDARG_H 1 -#define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 -#define HAVE_STRCHR 1 -#define HAVE_STRDUP 1 -#define HAVE_STRERROR 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRINGS_H 1 #define HAVE_STRING_H 1 -#define HAVE_STRRCHR 1 -#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 -#define HAVE_SYS_ACL_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYS_CDEFS_H 1 #define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 #define HAVE_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 #define HAVE_UINTMAX_T 1 #define HAVE_UNISTD_H 1 #define HAVE_UNSIGNED_LONG_LONG 1 +#define HAVE_UTIME_H 1 #define HAVE_UTIMES 1 -#define HAVE_VPRINTF 1 -#define HAVE_ZLIB_H 1 -#undef MAJOR_IN_MKDEV -#define STDC_HEADERS 1 Modified: head/usr.bin/cpio/cpio.c ============================================================================== --- head/usr.bin/cpio/cpio.c Sat May 8 16:29:02 2010 (r207791) +++ head/usr.bin/cpio/cpio.c Sat May 8 16:47:33 2010 (r207792) @@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_STDARG_H #include #endif +#ifdef HAVE_STDINT_H +#include +#endif #include #ifdef HAVE_STDLIB_H #include @@ -74,11 +77,17 @@ __FBSDID("$FreeBSD$"); #endif #include "cpio.h" +#include "err.h" +#include "line_reader.h" #include "matching.h" /* Fixed size of uname/gname caches. */ #define name_cache_size 101 +#ifndef O_BINARY +#define O_BINARY 0 +#endif + struct name_cache { int probes; int hits; @@ -89,7 +98,8 @@ struct name_cache { } cache[name_cache_size]; }; -static int copy_data(struct archive *, struct archive *); +static int extract_data(struct archive *, struct archive *); +const char * cpio_i64toa(int64_t); static const char *cpio_rename(const char *name); static int entry_to_archive(struct cpio *, struct archive_entry *); static int file_to_archive(struct cpio *, const char *); @@ -117,6 +127,7 @@ main(int argc, char *argv[]) static char buff[16384]; struct cpio _cpio; /* Allocated on stack. */ struct cpio *cpio; + const char *errmsg; int uid, gid; int opt; @@ -124,33 +135,26 @@ main(int argc, char *argv[]) memset(cpio, 0, sizeof(*cpio)); cpio->buff = buff; cpio->buff_size = sizeof(buff); -#if defined(_WIN32) && !defined(__CYGWIN__) - /* Make sure open() function will be used with a binary mode. */ - /* on cygwin, we need something similar, but instead link against */ - /* a special startup object, binmode.o */ - _set_fmode(_O_BINARY); -#endif - /* Need cpio_progname before calling cpio_warnc. */ + /* Need progname before calling warnc. */ if (*argv == NULL) - cpio_progname = "bsdcpio"; + progname = "bsdcpio"; else { #if defined(_WIN32) && !defined(__CYGWIN__) - cpio_progname = strrchr(*argv, '\\'); + progname = strrchr(*argv, '\\'); #else - cpio_progname = strrchr(*argv, '/'); + progname = strrchr(*argv, '/'); #endif - if (cpio_progname != NULL) - cpio_progname++; + if (progname != NULL) + progname++; else - cpio_progname = *argv; + progname = *argv; } cpio->uid_override = -1; cpio->gid_override = -1; cpio->argv = argv; cpio->argc = argc; - cpio->line_separator = '\n'; cpio->mode = '\0'; cpio->verbose = 0; cpio->compress = '\0'; @@ -161,19 +165,17 @@ main(int argc, char *argv[]) cpio->extract_flags |= ARCHIVE_EXTRACT_PERM; cpio->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; cpio->extract_flags |= ARCHIVE_EXTRACT_ACL; -#if defined(_WIN32) || defined(__CYGWIN__) - if (bsdcpio_is_privileged()) -#else +#if !defined(_WIN32) && !defined(__CYGWIN__) if (geteuid() == 0) -#endif cpio->extract_flags |= ARCHIVE_EXTRACT_OWNER; +#endif cpio->bytes_per_block = 512; cpio->filename = NULL; while ((opt = cpio_getopt(cpio)) != -1) { switch (opt) { case '0': /* GNU convention: --null, -0 */ - cpio->line_separator = '\0'; + cpio->option_null = 1; break; case 'A': /* NetBSD/OpenBSD */ cpio->option_append = 1; @@ -187,7 +189,7 @@ main(int argc, char *argv[]) case 'C': /* NetBSD/OpenBSD */ cpio->bytes_per_block = atoi(cpio->optarg); if (cpio->bytes_per_block <= 0) - cpio_errc(1, 0, "Invalid blocksize %s", cpio->optarg); + errc(1, 0, "Invalid blocksize %s", cpio->optarg); break; case 'c': /* POSIX 1997 */ cpio->format = "odc"; @@ -196,13 +198,14 @@ main(int argc, char *argv[]) cpio->extract_flags &= ~ARCHIVE_EXTRACT_NO_AUTODIR; break; case 'E': /* NetBSD/OpenBSD */ - include_from_file(cpio, cpio->optarg); + include_from_file(&cpio->matching, + cpio->optarg, cpio->option_null); break; case 'F': /* NetBSD/OpenBSD/GNU cpio */ cpio->filename = cpio->optarg; break; case 'f': /* POSIX 1997 */ - exclude(cpio, cpio->optarg); + exclude(&cpio->matching, cpio->optarg); break; case 'H': /* GNU cpio (also --format) */ cpio->format = cpio->optarg; @@ -215,10 +218,16 @@ main(int argc, char *argv[]) break; case 'i': /* POSIX 1997 */ if (cpio->mode != '\0') - cpio_errc(1, 0, + errc(1, 0, "Cannot use both -i and -%c", cpio->mode); cpio->mode = opt; break; + case 'J': /* GNU tar, others */ + cpio->compress = opt; + break; + case 'j': /* GNU tar, others */ + cpio->compress = opt; + break; case OPTION_INSECURE: cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_SYMLINKS; cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT; @@ -229,6 +238,9 @@ main(int argc, char *argv[]) case 'l': /* POSIX 1997 */ cpio->option_link = 1; break; + case OPTION_LZMA: /* GNU tar, others */ + cpio->compress = opt; + break; case 'm': /* POSIX 1997 */ cpio->extract_flags |= ARCHIVE_EXTRACT_TIME; break; @@ -243,23 +255,29 @@ main(int argc, char *argv[]) break; case 'o': /* POSIX 1997 */ if (cpio->mode != '\0') - cpio_errc(1, 0, + errc(1, 0, "Cannot use both -o and -%c", cpio->mode); cpio->mode = opt; break; case 'p': /* POSIX 1997 */ if (cpio->mode != '\0') - cpio_errc(1, 0, + errc(1, 0, "Cannot use both -p and -%c", cpio->mode); cpio->mode = opt; cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT; break; + case OPTION_PRESERVE_OWNER: + cpio->extract_flags |= ARCHIVE_EXTRACT_OWNER; + break; case OPTION_QUIET: /* GNU cpio */ cpio->quiet = 1; break; case 'R': /* GNU cpio, also --owner */ - if (owner_parse(cpio->optarg, &uid, &gid)) + errmsg = owner_parse(cpio->optarg, &uid, &gid); + if (errmsg) { + warnc(-1, "%s", errmsg); usage(); + } if (uid != -1) cpio->uid_override = uid; if (gid != -1) @@ -278,9 +296,6 @@ main(int argc, char *argv[]) case 'v': /* POSIX 1997 */ cpio->verbose++; break; - case 'V': /* GNU cpio */ - cpio->dot++; - break; case OPTION_VERSION: /* GNU convention */ version(); break; @@ -293,23 +308,13 @@ main(int argc, char *argv[]) break; #endif case 'y': /* tar convention */ -#if HAVE_LIBBZ2 cpio->compress = opt; -#else - cpio_warnc(0, "bzip2 compression not supported by " - "this version of bsdcpio"); -#endif break; case 'Z': /* tar convention */ cpio->compress = opt; break; case 'z': /* tar convention */ -#if HAVE_LIBZ cpio->compress = opt; -#else - cpio_warnc(0, "gzip compression not supported by " - "this version of bsdcpio"); -#endif break; default: usage(); @@ -324,19 +329,16 @@ main(int argc, char *argv[]) cpio->mode = 'i'; /* -t requires -i */ if (cpio->option_list && cpio->mode != 'i') - cpio_errc(1, 0, "Option -t requires -i", cpio->mode); + errc(1, 0, "Option -t requires -i"); /* -n requires -it */ if (cpio->option_numeric_uid_gid && !cpio->option_list) - cpio_errc(1, 0, "Option -n requires -it"); + errc(1, 0, "Option -n requires -it"); /* Can only specify format when writing */ if (cpio->format != NULL && cpio->mode != 'o') - cpio_errc(1, 0, "Option --format requires -o"); + errc(1, 0, "Option --format requires -o"); /* -l requires -p */ if (cpio->option_link && cpio->mode != 'p') - cpio_errc(1, 0, "Option -l requires -p"); - /* -v overrides -V */ - if (cpio->dot && cpio->verbose) - cpio->dot = 0; + errc(1, 0, "Option -l requires -p"); /* TODO: Flag other nonsensical combinations. */ switch (cpio->mode) { @@ -350,7 +352,7 @@ main(int argc, char *argv[]) break; case 'i': while (*cpio->argv != NULL) { - include(cpio, *cpio->argv); + include(&cpio->matching, *cpio->argv); --cpio->argc; ++cpio->argv; } @@ -361,26 +363,26 @@ main(int argc, char *argv[]) break; case 'p': if (*cpio->argv == NULL || **cpio->argv == '\0') - cpio_errc(1, 0, + errc(1, 0, "-p mode requires a target directory"); mode_pass(cpio, *cpio->argv); break; default: - cpio_errc(1, 0, + errc(1, 0, "Must specify at least one of -i, -o, or -p"); } free_cache(cpio->gname_cache); free_cache(cpio->uname_cache); - return (0); + return (cpio->return_value); } -void +static void usage(void) { const char *p; - p = cpio_progname; + p = progname; fprintf(stderr, "Brief Usage:\n"); fprintf(stderr, " List: %s -it < archive\n", p); @@ -394,14 +396,9 @@ static const char *long_help_msg = "First option must be a mode specifier:\n" " -i Input -o Output -p Pass\n" "Common Options:\n" - " -v Verbose filenames -V one dot per file\n" + " -v Verbose\n" "Create: %p -o [options] < [list of files] > [archive]\n" -#ifdef HAVE_BZLIB_H - " -y Compress archive with bzip2\n" -#endif -#ifdef HAVE_ZLIB_H - " -z Compress archive with gzip\n" -#endif + " -J,-y,-z,--lzma Compress archive with xz/bzip2/gzip/lzma\n" " --format {odc|newc|ustar} Select archive format\n" "List: %p -it < [archive]\n" "Extract: %p -i [options] < [archive]\n"; @@ -423,7 +420,7 @@ long_help(void) const char *prog; const char *p; - prog = cpio_progname; + prog = progname; fflush(stderr); @@ -455,19 +452,33 @@ version(void) static void mode_out(struct cpio *cpio) { - unsigned long blocks; struct archive_entry *entry, *spare; struct line_reader *lr; const char *p; int r; if (cpio->option_append) - cpio_errc(1, 0, "Append mode not yet supported."); + errc(1, 0, "Append mode not yet supported."); + + cpio->archive_read_disk = archive_read_disk_new(); + if (cpio->archive_read_disk == NULL) + errc(1, 0, "Failed to allocate archive object"); + if (cpio->option_follow_links) + archive_read_disk_set_symlink_logical(cpio->archive_read_disk); + else + archive_read_disk_set_symlink_physical(cpio->archive_read_disk); + archive_read_disk_set_standard_lookup(cpio->archive_read_disk); + cpio->archive = archive_write_new(); if (cpio->archive == NULL) - cpio_errc(1, 0, "Failed to allocate archive object"); + errc(1, 0, "Failed to allocate archive object"); switch (cpio->compress) { -#ifndef SMALLER + case 'J': + r = archive_write_set_compression_xz(cpio->archive); + break; + case OPTION_LZMA: + r = archive_write_set_compression_lzma(cpio->archive); + break; case 'j': case 'y': r = archive_write_set_compression_bzip2(cpio->archive); break; @@ -477,41 +488,30 @@ mode_out(struct cpio *cpio) case 'Z': r = archive_write_set_compression_compress(cpio->archive); break; -#endif - case '\0': + default: r = archive_write_set_compression_none(cpio->archive); break; - default: - cpio_errc(1, 0, "Unrecognized compression option"); } - if (r != ARCHIVE_OK) - cpio_errc(1, 0, "Unsupported compression format"); -#ifdef SMALLER - if (strcmp(cpio->format, "cpio")) - r = archive_write_set_format_cpio(cpio->archive); - else if (strcmp(cpio->format, "odc")) - r = archive_write_set_format_cpio(cpio->archive); - else if (strcmp(cpio->format, "newc")) - r = archive_write_set_format_cpio(cpio->archive); - else if (strcmp(cpio->format, "ustar")) - r = archive_write_set_format_cpio(cpio->archive); -#else + if (r < ARCHIVE_WARN) + errc(1, 0, "Requested compression not available"); r = archive_write_set_format_by_name(cpio->archive, cpio->format); -#endif if (r != ARCHIVE_OK) - cpio_errc(1, 0, archive_error_string(cpio->archive)); + errc(1, 0, "%s", archive_error_string(cpio->archive)); archive_write_set_bytes_per_block(cpio->archive, cpio->bytes_per_block); cpio->linkresolver = archive_entry_linkresolver_new(); archive_entry_linkresolver_set_strategy(cpio->linkresolver, archive_format(cpio->archive)); + /* + * The main loop: Copy each file into the output archive. + */ r = archive_write_open_file(cpio->archive, cpio->filename); if (r != ARCHIVE_OK) - cpio_errc(1, 0, archive_error_string(cpio->archive)); - lr = process_lines_init("-", cpio->line_separator); - while ((p = process_lines_next(lr)) != NULL) + errc(1, 0, "%s", archive_error_string(cpio->archive)); + lr = line_reader("-", cpio->option_null); + while ((p = line_reader_next(lr)) != NULL) file_to_archive(cpio, p); - process_lines_free(lr); + line_reader_free(lr); /* * The hardlink detection may have queued up a couple of entries @@ -527,15 +527,14 @@ mode_out(struct cpio *cpio) } r = archive_write_close(cpio->archive); - if (cpio->dot) - fprintf(stderr, "\n"); if (r != ARCHIVE_OK) - cpio_errc(1, 0, archive_error_string(cpio->archive)); + errc(1, 0, "%s", archive_error_string(cpio->archive)); if (!cpio->quiet) { - blocks = (archive_position_uncompressed(cpio->archive) + 511) - / 512; - fprintf(stderr, "%lu %s\n", blocks, + int64_t blocks = + (archive_position_uncompressed(cpio->archive) + 511) + / 512; + fprintf(stderr, "%lu %s\n", (unsigned long)blocks, blocks == 1 ? "block" : "blocks"); } archive_write_finish(cpio->archive); @@ -549,57 +548,37 @@ mode_out(struct cpio *cpio) static int file_to_archive(struct cpio *cpio, const char *srcpath) { - struct stat st; const char *destpath; struct archive_entry *entry, *spare; size_t len; const char *p; -#if !defined(_WIN32) || defined(__CYGWIN__) - int lnklen; -#endif int r; /* * Create an archive_entry describing the source file. * - * XXX TODO: rework to use archive_read_disk_entry_from_file() */ entry = archive_entry_new(); if (entry == NULL) - cpio_errc(1, 0, "Couldn't allocate entry"); + errc(1, 0, "Couldn't allocate entry"); archive_entry_copy_sourcepath(entry, srcpath); - - /* Get stat information. */ - if (cpio->option_follow_links) - r = stat(srcpath, &st); - else - r = lstat(srcpath, &st); - if (r != 0) { - cpio_warnc(errno, "Couldn't stat \"%s\"", srcpath); - archive_entry_free(entry); - return (0); + r = archive_read_disk_entry_from_file(cpio->archive_read_disk, + entry, -1, NULL); + if (r < ARCHIVE_FAILED) + errc(1, 0, "%s", + archive_error_string(cpio->archive_read_disk)); + if (r < ARCHIVE_OK) + warnc(0, "%s", + archive_error_string(cpio->archive_read_disk)); + if (r <= ARCHIVE_FAILED) { + cpio->return_value = 1; + return (r); } if (cpio->uid_override >= 0) - st.st_uid = cpio->uid_override; + archive_entry_set_uid(entry, cpio->uid_override); if (cpio->gid_override >= 0) - st.st_gid = cpio->gid_override; - archive_entry_copy_stat(entry, &st); - -#if !defined(_WIN32) || defined(__CYGWIN__) - /* If its a symlink, pull the target. */ - if (S_ISLNK(st.st_mode)) { - lnklen = readlink(srcpath, cpio->buff, cpio->buff_size); - if (lnklen < 0) { - cpio_warnc(errno, - "%s: Couldn't read symbolic link", srcpath); - archive_entry_free(entry); - return (0); - } - cpio->buff[lnklen] = 0; - archive_entry_set_symlink(entry, cpio->buff); - } -#endif + archive_entry_set_gid(entry, cpio->gid_override); /* * Generate a destination path for this entry. @@ -618,7 +597,7 @@ file_to_archive(struct cpio *cpio, const free(cpio->pass_destpath); cpio->pass_destpath = malloc(cpio->pass_destpath_alloc); if (cpio->pass_destpath == NULL) - cpio_errc(1, ENOMEM, + errc(1, ENOMEM, "Can't allocate path buffer"); } strcpy(cpio->pass_destpath, cpio->destdir); @@ -639,18 +618,18 @@ file_to_archive(struct cpio *cpio, const */ spare = NULL; if (cpio->linkresolver != NULL - && !S_ISDIR(st.st_mode)) { + && archive_entry_filetype(entry) != AE_IFDIR) { archive_entry_linkify(cpio->linkresolver, &entry, &spare); } if (entry != NULL) { r = entry_to_archive(cpio, entry); archive_entry_free(entry); - } - if (spare != NULL) { - if (r == 0) - r = entry_to_archive(cpio, spare); - archive_entry_free(spare); + if (spare != NULL) { + if (r == 0) + r = entry_to_archive(cpio, spare); + archive_entry_free(spare); + } } return (r); } @@ -667,8 +646,6 @@ entry_to_archive(struct cpio *cpio, stru /* Print out the destination name to the user. */ if (cpio->verbose) fprintf(stderr,"%s", destpath); - if (cpio->dot) - fprintf(stderr, "."); /* * Option_link only makes sense in pass mode and for @@ -686,7 +663,7 @@ entry_to_archive(struct cpio *cpio, stru /* Save the original entry in case we need it later. */ t = archive_entry_clone(entry); if (t == NULL) - cpio_errc(1, ENOMEM, "Can't create link"); + errc(1, ENOMEM, "Can't create link"); /* Note: link(2) doesn't create parent directories, * so we use archive_write_header() instead as a * convenience. */ @@ -696,15 +673,15 @@ entry_to_archive(struct cpio *cpio, stru r = archive_write_header(cpio->archive, t); archive_entry_free(t); if (r != ARCHIVE_OK) - cpio_warnc(archive_errno(cpio->archive), - archive_error_string(cpio->archive)); + warnc(archive_errno(cpio->archive), + "%s", archive_error_string(cpio->archive)); if (r == ARCHIVE_FATAL) exit(1); #ifdef EXDEV if (r != ARCHIVE_OK && archive_errno(cpio->archive) == EXDEV) { /* Cross-device link: Just fall through and use * the original entry to copy the file over. */ - cpio_warnc(0, "Copying file instead"); + warnc(0, "Copying file instead"); } else #endif return (0); @@ -716,9 +693,9 @@ entry_to_archive(struct cpio *cpio, stru */ if (archive_entry_filetype(entry) == AE_IFREG) { if (archive_entry_size(entry) > 0) { - fd = open(srcpath, O_RDONLY); + fd = open(srcpath, O_RDONLY | O_BINARY); if (fd < 0) { - cpio_warnc(errno, + warnc(errno, "%s: could not open file", srcpath); goto cleanup; } @@ -730,7 +707,7 @@ entry_to_archive(struct cpio *cpio, stru r = archive_write_header(cpio->archive, entry); if (r != ARCHIVE_OK) - cpio_warnc(archive_errno(cpio->archive), + warnc(archive_errno(cpio->archive), "%s: %s", srcpath, archive_error_string(cpio->archive)); @@ -744,10 +721,10 @@ entry_to_archive(struct cpio *cpio, stru r = archive_write_data(cpio->archive, cpio->buff, bytes_read); if (r < 0) - cpio_errc(1, archive_errno(cpio->archive), - archive_error_string(cpio->archive)); + errc(1, archive_errno(cpio->archive), + "%s", archive_error_string(cpio->archive)); if (r < bytes_read) { - cpio_warnc(0, + warnc(0, "Truncated write; file may have grown while being archived."); } bytes_read = read(fd, cpio->buff, cpio->buff_size); @@ -776,7 +753,7 @@ restore_time(struct cpio *cpio, struct a (void)name; /* UNUSED */ if (!warned) - cpio_warnc(0, "Can't restore access times on this platform"); + warnc(0, "Can't restore access times on this platform"); warned = 1; return (fd); #else @@ -795,7 +772,7 @@ restore_time(struct cpio *cpio, struct a times[0].tv_sec = archive_entry_atime(entry); times[0].tv_usec = archive_entry_atime_nsec(entry) / 1000; -#ifdef HAVE_FUTIMES +#if defined(HAVE_FUTIMES) && !defined(__CYGWIN__) if (fd >= 0 && futimes(fd, times) == 0) return (fd); #endif @@ -811,9 +788,10 @@ restore_time(struct cpio *cpio, struct a #ifdef HAVE_LUTIMES if (lutimes(name, times) != 0) #else - if (!S_ISLNK(archive_entry_mode(entry)) && utimes(name, times) != 0) + if ((AE_IFLNK != archive_entry_filetype(entry)) + && utimes(name, times) != 0) #endif - cpio_warnc(errno, "Can't update time for %s", name); + warnc(errno, "Can't update time for %s", name); #endif return (fd); } @@ -826,38 +804,32 @@ mode_in(struct cpio *cpio) struct archive_entry *entry; struct archive *ext; const char *destpath; - unsigned long blocks; int r; ext = archive_write_disk_new(); if (ext == NULL) - cpio_errc(1, 0, "Couldn't allocate restore object"); + errc(1, 0, "Couldn't allocate restore object"); r = archive_write_disk_set_options(ext, cpio->extract_flags); if (r != ARCHIVE_OK) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 8 18:54:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16CBD1065670; Sat, 8 May 2010 18:54:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 036098FC12; Sat, 8 May 2010 18:54:48 +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 o48Isl55099535; Sat, 8 May 2010 18:54:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48IslRS099525; Sat, 8 May 2010 18:54:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005081854.o48IslRS099525@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 May 2010 18:54: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: r207793 - in stable/8/sys: amd64/include arm/include i386/include ia64/include kern mips/include powerpc/include sparc64/include sun4v/include 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: Sat, 08 May 2010 18:54:48 -0000 Author: kib Date: Sat May 8 18:54:47 2010 New Revision: 207793 URL: http://svn.freebsd.org/changeset/base/207793 Log: MFC r204051 (by imp): n64 has a different size for KINFO_PROC_SIZE. Approved by: imp MFC r207152: Move the constants specifying the size of struct kinfo_proc into machine-specific header files. Add KINFO_PROC32_SIZE for struct kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add CTASSERT for the size of struct kinfo_proc32. MFC r207269: Style: use #define instead of #define. Modified: stable/8/sys/amd64/include/proc.h stable/8/sys/arm/include/proc.h stable/8/sys/i386/include/proc.h stable/8/sys/ia64/include/proc.h stable/8/sys/kern/kern_proc.c stable/8/sys/mips/include/proc.h stable/8/sys/powerpc/include/proc.h stable/8/sys/sparc64/include/proc.h stable/8/sys/sun4v/include/proc.h stable/8/sys/sys/user.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) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/include/proc.h ============================================================================== --- stable/8/sys/amd64/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/amd64/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -53,6 +53,9 @@ struct mdproc { struct system_segment_descriptor md_ldt_sd; }; +#define KINFO_PROC_SIZE 1088 +#define KINFO_PROC32_SIZE 768 + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ Modified: stable/8/sys/arm/include/proc.h ============================================================================== --- stable/8/sys/arm/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/arm/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -60,4 +60,6 @@ struct mdproc { void *md_sigtramp; }; +#define KINFO_PROC_SIZE 792 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/i386/include/proc.h ============================================================================== --- stable/8/sys/i386/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/i386/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -57,6 +57,8 @@ struct mdproc { struct proc_ldt *md_ldt; /* (t) per-process ldt */ }; +#define KINFO_PROC_SIZE 768 + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ Modified: stable/8/sys/ia64/include/proc.h ============================================================================== --- stable/8/sys/ia64/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/ia64/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -38,4 +38,7 @@ struct mdproc { int __dummy; /* Avoid having an empty struct. */ }; +#define KINFO_PROC_SIZE 1088 +#define KINFO_PROC32_SIZE 768 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/kern/kern_proc.c Sat May 8 18:54:47 2010 (r207793) @@ -151,6 +151,9 @@ int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); +#ifdef COMPAT_FREEBSD32 +CTASSERT(sizeof(struct kinfo_proc32) == KINFO_PROC32_SIZE); +#endif /* * Initialize global process hashing structures. Modified: stable/8/sys/mips/include/proc.h ============================================================================== --- stable/8/sys/mips/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/mips/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -68,4 +68,10 @@ struct thread; void mips_cpu_switch(struct thread *, struct thread *, struct mtx *); void mips_cpu_throw(struct thread *, struct thread *); +#ifdef __mips_n64 +#define KINFO_PROC_SIZE 1088 +#else +#define KINFO_PROC_SIZE 816 +#endif + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/powerpc/include/proc.h ============================================================================== --- stable/8/sys/powerpc/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/powerpc/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -46,4 +46,6 @@ struct mdthread { struct mdproc { }; +#define KINFO_PROC_SIZE 768 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/sparc64/include/proc.h ============================================================================== --- stable/8/sys/sparc64/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/sparc64/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -51,4 +51,6 @@ struct mdproc { void *md_sigtramp; }; +#define KINFO_PROC_SIZE 1088 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/sun4v/include/proc.h ============================================================================== --- stable/8/sys/sun4v/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/sun4v/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -51,4 +51,6 @@ struct mdproc { void *md_sigtramp; }; +#define KINFO_PROC_SIZE 1088 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/sys/user.h ============================================================================== --- stable/8/sys/sys/user.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/sys/user.h Sat May 8 18:54:47 2010 (r207793) @@ -87,30 +87,11 @@ #define KI_NSPARE_LONG 12 #define KI_NSPARE_PTR 7 -#ifdef __amd64__ -#define KINFO_PROC_SIZE 1088 -#endif -#ifdef __arm__ -#define KINFO_PROC_SIZE 792 -#endif -#ifdef __ia64__ -#define KINFO_PROC_SIZE 1088 -#endif -#ifdef __i386__ -#define KINFO_PROC_SIZE 768 -#endif -#ifdef __mips__ -#define KINFO_PROC_SIZE 816 -#endif -#ifdef __powerpc__ -#define KINFO_PROC_SIZE 768 -#endif -#ifdef __sparc64__ -#define KINFO_PROC_SIZE 1088 -#endif +#ifndef _KERNEL #ifndef KINFO_PROC_SIZE #error "Unknown architecture" #endif +#endif /* !_KERNEL */ #define WMESGLEN 8 /* size of returned wchan message */ #define LOCKNAMELEN 8 /* size of returned lock name */ From owner-svn-src-all@FreeBSD.ORG Sat May 8 20:02:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36C301065672; Sat, 8 May 2010 20:02:40 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 24F238FC16; Sat, 8 May 2010 20:02: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 o48K2exe014680; Sat, 8 May 2010 20:02:40 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48K2eXj014678; Sat, 8 May 2010 20:02:40 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201005082002.o48K2eXj014678@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 8 May 2010 20:02:39 +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: r207794 - stable/7/usr.sbin/iostat 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, 08 May 2010 20:02:40 -0000 Author: keramida (doc committer) Date: Sat May 8 20:02:39 2010 New Revision: 207794 URL: http://svn.freebsd.org/changeset/base/207794 Log: MFC r196254 iostat: add a bit of space between tty in/out columns The columns for tty input and output may bump against each other if the tty output needs more than 5 columns. Add a bit of space that pushes everything 1 column to the right, but also avoids the problem. Approved by: rwatson Modified: stable/7/usr.sbin/iostat/iostat.c Directory Properties: stable/7/usr.sbin/iostat/ (props changed) Modified: stable/7/usr.sbin/iostat/iostat.c ============================================================================== --- stable/7/usr.sbin/iostat/iostat.c Sat May 8 18:54:47 2010 (r207793) +++ stable/7/usr.sbin/iostat/iostat.c Sat May 8 20:02:39 2010 (r207794) @@ -589,7 +589,7 @@ main(int argc, char **argv) } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -676,7 +676,7 @@ phdr(void) return; if (Tflag > 0) - (void)printf(" tty"); + (void)printf(" tty"); for (i = 0, printed=0;(i < num_devices) && (printed < maxshowdevs);i++){ int di; if ((dev_select[i].selected != 0) @@ -699,7 +699,7 @@ phdr(void) (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout"); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) @@ -744,7 +744,7 @@ devstats(int perf_select, long double et if (xflag > 0) { printf(" extended device statistics "); if (Tflag > 0) - printf(" tty "); + printf(" tty "); if (Cflag > 0) printf(" cpu "); printf("\n"); @@ -757,7 +757,7 @@ devstats(int perf_select, long double et "device r/i w/i kr/i kw/i wait svc_t %%b " ); if (Tflag > 0) - printf("tin tout "); + printf("tin tout "); if (Cflag > 0) printf("us ni sy in id "); printf("\n"); @@ -898,7 +898,7 @@ devstats(int perf_select, long double et */ printf("%52s",""); if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); if (Cflag > 0) cpustats(); From owner-svn-src-all@FreeBSD.ORG Sat May 8 20:34:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BFC81065674; Sat, 8 May 2010 20:34:02 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 489E28FC0C; Sat, 8 May 2010 20:34: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 o48KY2Zp021665; Sat, 8 May 2010 20:34:02 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48KY1vZ021646; Sat, 8 May 2010 20:34:01 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005082034.o48KY1vZ021646@svn.freebsd.org> From: Alan Cox Date: Sat, 8 May 2010 20:34: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: r207796 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 kern mips/mips powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v 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: Sat, 08 May 2010 20:34:02 -0000 Author: alc Date: Sat May 8 20:34:01 2010 New Revision: 207796 URL: http://svn.freebsd.org/changeset/base/207796 Log: Push down the page queues into vm_page_cache(), vm_page_try_to_cache(), and vm_page_try_to_free(). Consequently, push down the page queues lock into pmap_enter_quick(), pmap_page_wired_mapped(), pmap_remove_all(), and pmap_remove_write(). Push down the page queues lock into Xen's pmap_page_is_mapped(). (I overlooked the Xen pmap in r207702.) Switch to a per-processor counter for the total number of pages cached. Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/ia64/ia64/pmap.c head/sys/kern/subr_uio.c head/sys/kern/vfs_bio.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/sun4v/sun4v/pmap.c head/sys/sys/vmmeter.h head/sys/vm/swap_pager.c head/sys/vm/vm_fault.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_pageout.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/amd64/amd64/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -2796,7 +2796,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->flags & PG_FICTITIOUS) == 0, ("pmap_remove_all: page %p is fictitious", m)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); @@ -2834,6 +2834,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pmap); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* @@ -3414,8 +3415,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pmap); - (void) pmap_enter_quick_locked(pmap, va, m, prot, NULL); + (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -3926,8 +3929,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); + vm_page_lock_queues(); count = pmap_pvh_wired_mappings(&m->md, count); - return (pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count)); + count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); + vm_page_unlock_queues(); + return (count); } /* @@ -4237,7 +4243,7 @@ pmap_remove_write(vm_page_t m) if ((m->flags & PG_FICTITIOUS) != 0 || (m->flags & PG_WRITEABLE) == 0) return; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { pmap = PV_PMAP(pv); @@ -4268,6 +4274,7 @@ retry: PMAP_UNLOCK(pmap); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/arm/arm/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -3118,18 +3118,11 @@ pmap_remove_all(vm_page_t m) pmap_t curpm; int flags = 0; -#if defined(PMAP_DEBUG) - /* - * XXX This makes pmap_remove_all() illegal for non-managed pages! - */ - if (m->flags & PG_FICTITIOUS) { - panic("pmap_remove_all: illegal for unmanaged page, va: 0x%x", VM_PAGE_TO_PHYS(m)); - } -#endif - + KASSERT((m->flags & PG_FICTITIOUS) == 0, + ("pmap_remove_all: page %p is fictitious", m)); if (TAILQ_EMPTY(&m->md.pv_list)) return; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); pmap_remove_write(m); curpm = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { @@ -3180,6 +3173,7 @@ pmap_remove_all(vm_page_t m) pmap_tlb_flushD(curpm); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } @@ -3615,9 +3609,11 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE, M_NOWAIT); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -4450,10 +4446,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) if ((pv->pv_flags & PVF_WIRED) != 0) count++; + vm_page_unlock_queues(); return (count); } @@ -4530,8 +4527,11 @@ void pmap_remove_write(vm_page_t m) { - if (m->flags & PG_WRITEABLE) + if (m->flags & PG_WRITEABLE) { + vm_page_lock_queues(); pmap_clearbit(m, PVF_WRITE); + vm_page_unlock_queues(); + } } Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/i386/i386/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -2900,7 +2900,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->flags & PG_FICTITIOUS) == 0, ("pmap_remove_all: page %p is fictitious", m)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); sched_pin(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { @@ -2940,6 +2940,7 @@ pmap_remove_all(vm_page_t m) } vm_page_flag_clear(m, PG_WRITEABLE); sched_unpin(); + vm_page_unlock_queues(); } /* @@ -3544,8 +3545,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pmap); - (void) pmap_enter_quick_locked(pmap, va, m, prot, NULL); + (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -4088,8 +4091,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); + vm_page_lock_queues(); count = pmap_pvh_wired_mappings(&m->md, count); - return (pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count)); + count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); + vm_page_unlock_queues(); + return (count); } /* @@ -4404,10 +4410,10 @@ pmap_remove_write(vm_page_t m) pt_entry_t oldpte, *pte; vm_offset_t va; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & PG_FICTITIOUS) != 0 || (m->flags & PG_WRITEABLE) == 0) return; + vm_page_lock_queues(); sched_pin(); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { @@ -4445,6 +4451,7 @@ retry: } vm_page_flag_clear(m, PG_WRITEABLE); sched_unpin(); + vm_page_unlock_queues(); } /* Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/i386/xen/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -2485,16 +2485,9 @@ pmap_remove_all(vm_page_t m) pt_entry_t *pte, tpte; vm_page_t free; -#if defined(PMAP_DIAGNOSTIC) - /* - * XXX This makes pmap_remove_all() illegal for non-managed pages! - */ - if (m->flags & PG_FICTITIOUS) { - panic("pmap_remove_all: illegal for unmanaged page, va: 0x%jx", - VM_PAGE_TO_PHYS(m) & 0xffffffff); - } -#endif - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + KASSERT((m->flags & PG_FICTITIOUS) == 0, + ("pmap_remove_all: page %p is fictitious", m)); + vm_page_lock_queues(); sched_pin(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); @@ -2531,6 +2524,7 @@ pmap_remove_all(vm_page_t m) if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); + vm_page_unlock_queues(); } /* @@ -2946,10 +2940,12 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ CTR4(KTR_PMAP, "pmap_enter_quick: pmap=%p va=0x%x m=%p prot=0x%x", pmap, va, m, prot); + vm_page_lock_queues(); PMAP_LOCK(pmap); - (void) pmap_enter_quick_locked(&mclp, &count, pmap, va, m, prot, NULL); + (void)pmap_enter_quick_locked(&mclp, &count, pmap, va, m, prot, NULL); if (count) HYPERVISOR_multicall(&mcl, count); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -3504,7 +3500,7 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3515,6 +3511,7 @@ pmap_page_wired_mappings(vm_page_t m) PMAP_UNLOCK(pmap); } sched_unpin(); + vm_page_unlock_queues(); return (count); } @@ -3525,16 +3522,15 @@ pmap_page_wired_mappings(vm_page_t m) boolean_t pmap_page_is_mapped(vm_page_t m) { - struct md_page *pvh; + boolean_t rv; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) return (FALSE); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (TAILQ_EMPTY(&m->md.pv_list)) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - return (!TAILQ_EMPTY(&pvh->pv_list)); - } else - return (TRUE); + vm_page_lock_queues(); + rv = !TAILQ_EMPTY(&m->md.pv_list) || + !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list); + vm_page_unlock_queues(); + return (rv); } /* @@ -3784,10 +3780,10 @@ pmap_remove_write(vm_page_t m) pmap_t pmap; pt_entry_t oldpte, *pte; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & PG_FICTITIOUS) != 0 || (m->flags & PG_WRITEABLE) == 0) return; + vm_page_lock_queues(); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3818,6 +3814,7 @@ retry: if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); + vm_page_unlock_queues(); } /* Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/ia64/ia64/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -1392,15 +1392,9 @@ pmap_remove_all(vm_page_t m) pmap_t oldpmap; pv_entry_t pv; -#if defined(DIAGNOSTIC) - /* - * XXX This makes pmap_remove_all() illegal for non-managed pages! - */ - if (m->flags & PG_FICTITIOUS) { - panic("pmap_remove_all: illegal for unmanaged page, va: 0x%lx", VM_PAGE_TO_PHYS(m)); - } -#endif - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + KASSERT((m->flags & PG_FICTITIOUS) == 0, + ("pmap_remove_all: page %p is fictitious", m)); + vm_page_lock_queues(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { struct ia64_lpte *pte; pmap_t pmap = pv->pv_pmap; @@ -1417,6 +1411,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pmap); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* @@ -1655,9 +1650,11 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ { pmap_t oldpmap; + vm_page_lock_queues(); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); pmap_enter_quick_locked(pmap, va, m, prot); + vm_page_unlock_queues(); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } @@ -1875,7 +1872,7 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = pv->pv_pmap; PMAP_LOCK(pmap); @@ -1887,6 +1884,7 @@ pmap_page_wired_mappings(vm_page_t m) pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } + vm_page_unlock_queues(); return (count); } @@ -2118,10 +2116,10 @@ pmap_remove_write(vm_page_t m) pv_entry_t pv; vm_prot_t prot; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & PG_FICTITIOUS) != 0 || (m->flags & PG_WRITEABLE) == 0) return; + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = pv->pv_pmap; PMAP_LOCK(pmap); @@ -2142,6 +2140,7 @@ pmap_remove_write(vm_page_t m) PMAP_UNLOCK(pmap); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/kern/subr_uio.c Sat May 8 20:34:01 2010 (r207796) @@ -105,7 +105,6 @@ retry: if (vm_page_sleep_if_busy(user_pg, TRUE, "vm_pgmoveco")) goto retry; vm_page_lock(user_pg); - vm_page_lock_queues(); pmap_remove_all(user_pg); vm_page_free(user_pg); vm_page_unlock(user_pg); @@ -117,11 +116,9 @@ retry: */ if (uobject->backing_object != NULL) pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); - vm_page_lock_queues(); } vm_page_insert(kern_pg, uobject, upindex); vm_page_dirty(kern_pg); - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(uobject); vm_map_lookup_done(map, entry); return(KERN_SUCCESS); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/kern/vfs_bio.c Sat May 8 20:34:01 2010 (r207796) @@ -1579,7 +1579,6 @@ vfs_vmio_release(struct buf *bp) */ if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && m->wire_count == 0) { - vm_page_lock_queues(); /* * Might as well free the page if we can and it has * no valid data. We also free the page if the @@ -1593,7 +1592,6 @@ vfs_vmio_release(struct buf *bp) } else if (buf_vm_page_count_severe()) { vm_page_try_to_cache(m); } - vm_page_unlock_queues(); } vm_page_unlock(m); } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/mips/mips/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -1595,7 +1595,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->flags & PG_FICTITIOUS) == 0, ("pmap_remove_all: page %p is fictitious", m)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); if (m->md.pv_flags & PV_TABLE_REF) vm_page_flag_set(m, PG_REFERENCED); @@ -1646,6 +1646,7 @@ pmap_remove_all(vm_page_t m) vm_page_flag_clear(m, PG_WRITEABLE); m->md.pv_flags &= ~(PV_TABLE_REF | PV_TABLE_MOD); + vm_page_unlock_queues(); } /* @@ -1921,8 +1922,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -2510,10 +2513,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) if (pv->pv_wired) count++; + vm_page_unlock_queues(); return (count); } @@ -2527,12 +2531,14 @@ pmap_remove_write(vm_page_t m) vm_offset_t va; pt_entry_t *pte; - if ((m->flags & PG_WRITEABLE) == 0) + if ((m->flags & PG_FICTITIOUS) != 0 || + (m->flags & PG_WRITEABLE) == 0) return; /* * Loop over all current mappings setting/clearing as appropos. */ + vm_page_lock_queues(); for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = npv) { npv = TAILQ_NEXT(pv, pv_plist); pte = pmap_pte(pv->pv_pmap, pv->pv_va); @@ -2545,6 +2551,7 @@ pmap_remove_write(vm_page_t m) VM_PROT_READ | VM_PROT_EXECUTE); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/powerpc/aim/mmu_oea.c Sat May 8 20:34:01 2010 (r207796) @@ -1208,11 +1208,12 @@ moea_enter_quick(mmu_t mmu, pmap_t pm, v vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pm); moea_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); + vm_page_unlock_queues(); PMAP_UNLOCK(pm); - } vm_paddr_t @@ -1322,10 +1323,10 @@ moea_remove_write(mmu_t mmu, vm_page_t m pmap_t pmap; u_int lo; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || (m->flags & PG_WRITEABLE) == 0) return; + vm_page_lock_queues(); lo = moea_attr_fetch(m); powerpc_sync(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { @@ -1351,6 +1352,7 @@ moea_remove_write(mmu_t mmu, vm_page_t m vm_page_dirty(m); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* @@ -1518,10 +1520,11 @@ moea_page_wired_mappings(mmu_t mmu, vm_p count = 0; if (!moea_initialized || (m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) if ((pvo->pvo_vaddr & PVO_WIRED) != 0) count++; + vm_page_unlock_queues(); return (count); } @@ -1732,8 +1735,7 @@ moea_remove_all(mmu_t mmu, vm_page_t m) struct pvo_entry *pvo, *next_pvo; pmap_t pmap; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - + vm_page_lock_queues(); pvo_head = vm_page_to_pvoh(m); for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { next_pvo = LIST_NEXT(pvo, pvo_vlink); @@ -1749,6 +1751,7 @@ moea_remove_all(mmu_t mmu, vm_page_t m) vm_page_dirty(m); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/powerpc/aim/mmu_oea64.c Sat May 8 20:34:01 2010 (r207796) @@ -1341,11 +1341,13 @@ void moea64_enter_quick(mmu_t mmu, pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + + vm_page_lock_queues(); PMAP_LOCK(pm); moea64_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); + vm_page_unlock_queues(); PMAP_UNLOCK(pm); - } vm_paddr_t @@ -1517,10 +1519,10 @@ moea64_remove_write(mmu_t mmu, vm_page_t pmap_t pmap; uint64_t lo; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || (m->flags & PG_WRITEABLE) == 0) return; + vm_page_lock_queues(); lo = moea64_attr_fetch(m); SYNC(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { @@ -1547,6 +1549,7 @@ moea64_remove_write(mmu_t mmu, vm_page_t vm_page_dirty(m); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* @@ -1710,10 +1713,11 @@ moea64_page_wired_mappings(mmu_t mmu, vm count = 0; if (!moea64_initialized || (m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) if ((pvo->pvo_vaddr & PVO_WIRED) != 0) count++; + vm_page_unlock_queues(); return (count); } @@ -1929,8 +1933,7 @@ moea64_remove_all(mmu_t mmu, vm_page_t m struct pvo_entry *pvo, *next_pvo; pmap_t pmap; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - + vm_page_lock_queues(); pvo_head = vm_page_to_pvoh(m); for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { next_pvo = LIST_NEXT(pvo, pvo_vlink); @@ -1946,6 +1949,7 @@ moea64_remove_all(mmu_t mmu, vm_page_t m vm_page_dirty(m); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/powerpc/booke/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -1722,9 +1722,11 @@ mmu_booke_enter_quick(mmu_t mmu, pmap_t vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pmap); mmu_booke_enter_locked(mmu, pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -1783,8 +1785,7 @@ mmu_booke_remove_all(mmu_t mmu, vm_page_ pv_entry_t pv, pvn; uint8_t hold_flag; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - + vm_page_lock_queues(); for (pv = TAILQ_FIRST(&m->md.pv_list); pv != NULL; pv = pvn) { pvn = TAILQ_NEXT(pv, pv_link); @@ -1794,6 +1795,7 @@ mmu_booke_remove_all(mmu_t mmu, vm_page_ PMAP_UNLOCK(pv->pv_pmap); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } /* @@ -1939,11 +1941,10 @@ mmu_booke_remove_write(mmu_t mmu, vm_pag pv_entry_t pv; pte_t *pte; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || (m->flags & PG_WRITEABLE) == 0) return; - + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_link) { PMAP_LOCK(pv->pv_pmap); if ((pte = pte_find(mmu, pv->pv_pmap, pv->pv_va)) != NULL) { @@ -1967,6 +1968,7 @@ mmu_booke_remove_write(mmu_t mmu, vm_pag PMAP_UNLOCK(pv->pv_pmap); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } static void @@ -2388,8 +2390,7 @@ mmu_booke_page_wired_mappings(mmu_t mmu, if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_link) { PMAP_LOCK(pv->pv_pmap); if ((pte = pte_find(mmu, pv->pv_pmap, pv->pv_va)) != NULL) @@ -2397,7 +2398,7 @@ mmu_booke_page_wired_mappings(mmu_t mmu, count++; PMAP_UNLOCK(pv->pv_pmap); } - + vm_page_unlock_queues(); return (count); } Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/sparc64/sparc64/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -1240,7 +1240,7 @@ pmap_remove_all(vm_page_t m) struct tte *tp; vm_offset_t va; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); for (tp = TAILQ_FIRST(&m->md.tte_list); tp != NULL; tp = tpn) { tpn = TAILQ_NEXT(tp, tte_link); if ((tp->tte_data & TD_PV) == 0) @@ -1263,6 +1263,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pm); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } int @@ -1502,9 +1503,11 @@ void pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + vm_page_lock_queues(); PMAP_LOCK(pm); pmap_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); + vm_page_unlock_queues(); PMAP_UNLOCK(pm); } @@ -1809,10 +1812,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) if ((tp->tte_data & (TD_PV | TD_WIRED)) == (TD_PV | TD_WIRED)) count++; + vm_page_unlock_queues(); return (count); } @@ -1981,10 +1985,10 @@ pmap_remove_write(vm_page_t m) struct tte *tp; u_long data; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || (m->flags & PG_WRITEABLE) == 0) return; + vm_page_lock_queues(); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -1995,6 +1999,7 @@ pmap_remove_write(vm_page_t m) } } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } int Modified: head/sys/sun4v/sun4v/pmap.c ============================================================================== --- head/sys/sun4v/sun4v/pmap.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/sun4v/sun4v/pmap.c Sat May 8 20:34:01 2010 (r207796) @@ -1211,8 +1211,11 @@ pmap_enter_object(pmap_t pmap, vm_offset void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { + + vm_page_lock_queues(); PMAP_LOCK(pmap); pmap_enter_quick_locked(pmap, va, m, prot); + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } @@ -1714,7 +1717,7 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = pv->pv_pmap; PMAP_LOCK(pmap); @@ -1723,6 +1726,7 @@ pmap_page_wired_mappings(vm_page_t m) count++; PMAP_UNLOCK(pmap); } + vm_page_unlock_queues(); return (count); } @@ -1732,12 +1736,15 @@ pmap_page_wired_mappings(vm_page_t m) void pmap_remove_write(vm_page_t m) { + if ((m->flags & PG_WRITEABLE) == 0) return; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); tte_clear_phys_bit(m, VTD_SW_W|VTD_W); vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } + /* * Initialize the pmap associated with process 0. */ @@ -1956,7 +1963,7 @@ pmap_remove_all(vm_page_t m) uint64_t tte_data; DPRINTF("pmap_remove_all 0x%lx\n", VM_PAGE_TO_PHYS(m)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + vm_page_lock_queues(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { PMAP_LOCK(pv->pv_pmap); pv->pv_pmap->pm_stats.resident_count--; @@ -1986,6 +1993,7 @@ pmap_remove_all(vm_page_t m) free_pv_entry(pv); } vm_page_flag_clear(m, PG_WRITEABLE); + vm_page_unlock_queues(); } static void Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Sat May 8 20:08:01 2010 (r207795) +++ head/sys/sys/vmmeter.h Sat May 8 20:34:01 2010 (r207796) @@ -72,7 +72,7 @@ struct vmmeter { u_int v_pdwakeups; /* (f) times daemon has awaken from sleep */ u_int v_pdpages; /* (q) pages analyzed by daemon */ - u_int v_tcached; /* (q) total pages cached */ + u_int v_tcached; /* (p) total pages cached */ u_int v_dfree; /* (q) pages freed by daemon */ u_int v_pfree; /* (p) pages freed by exiting processes */ u_int v_tfree; /* (p) total pages freed */ Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/vm/swap_pager.c Sat May 8 20:34:01 2010 (r207796) @@ -382,8 +382,10 @@ static void swp_pager_free_nrpage(vm_page_t m) { + vm_page_lock(m); if (m->wire_count == 0) vm_page_free(m); + vm_page_unlock(m); } /* @@ -1137,17 +1139,10 @@ swap_pager_getpages(vm_object_t object, if (0 < i || j < count) { int k; - - for (k = 0; k < i; ++k) { - vm_page_lock(m[k]); + for (k = 0; k < i; ++k) swp_pager_free_nrpage(m[k]); - vm_page_unlock(m[k]); - } - for (k = j; k < count; ++k) { - vm_page_lock(m[k]); + for (k = j; k < count; ++k) swp_pager_free_nrpage(m[k]); - vm_page_unlock(m[k]); - } } /* @@ -1514,8 +1509,6 @@ swp_pager_async_iodone(struct buf *bp) for (i = 0; i < bp->b_npages; ++i) { vm_page_t m = bp->b_pages[i]; - vm_page_lock(m); - vm_page_lock_queues(); m->oflags &= ~VPO_SWAPINPROG; if (bp->b_ioflags & BIO_ERROR) { @@ -1558,7 +1551,9 @@ swp_pager_async_iodone(struct buf *bp) * then finish the I/O. */ vm_page_dirty(m); + vm_page_lock(m); vm_page_activate(m); + vm_page_unlock(m); vm_page_io_finish(m); } } else if (bp->b_iocmd == BIO_READ) { @@ -1593,11 +1588,12 @@ swp_pager_async_iodone(struct buf *bp) * left busy. */ if (i != bp->b_pager.pg_reqpage) { + vm_page_lock(m); vm_page_deactivate(m); + vm_page_unlock(m); vm_page_wakeup(m); - } else { + } else vm_page_flash(m); - } } else { /* * For write success, clear the dirty @@ -1609,11 +1605,12 @@ swp_pager_async_iodone(struct buf *bp) " protected", m)); vm_page_undirty(m); vm_page_io_finish(m); - if (vm_page_count_severe()) + if (vm_page_count_severe()) { + vm_page_lock(m); vm_page_try_to_cache(m); + vm_page_unlock(m); + } } - vm_page_unlock_queues(); - vm_page_unlock(m); } /* Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/vm/vm_fault.c Sat May 8 20:34:01 2010 (r207796) @@ -487,20 +487,16 @@ readrest: (mt->oflags & VPO_BUSY)) continue; vm_page_lock(mt); - vm_page_lock_queues(); if (mt->hold_count || mt->wire_count) { - vm_page_unlock_queues(); vm_page_unlock(mt); continue; } pmap_remove_all(mt); - if (mt->dirty) { + if (mt->dirty != 0) vm_page_deactivate(mt); - } else { + else vm_page_cache(mt); - } - vm_page_unlock_queues(); vm_page_unlock(mt); } ahead += behind; @@ -1025,13 +1021,8 @@ vm_fault_prefault(pmap_t pmap, vm_offset break; } if (m->valid == VM_PAGE_BITS_ALL && - (m->flags & PG_FICTITIOUS) == 0) { - vm_page_lock(m); - vm_page_lock_queues(); + (m->flags & PG_FICTITIOUS) == 0) pmap_enter_quick(pmap, addr, m, entry->protection); - vm_page_unlock_queues(); - vm_page_unlock(m); - } VM_OBJECT_UNLOCK(lobject); } } Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat May 8 20:08:01 2010 (r207795) +++ head/sys/vm/vm_object.c Sat May 8 20:34:01 2010 (r207796) @@ -876,13 +876,8 @@ vm_object_page_clean(vm_object_t object, p->oflags |= VPO_CLEANCHK; if ((flags & OBJPC_NOSYNC) && (p->oflags & VPO_NOSYNC)) clearobjflags = 0; - else { - vm_page_lock(p); - vm_page_lock_queues(); + else pmap_remove_write(p); - vm_page_unlock_queues(); - vm_page_unlock(p); - } } if (clearobjflags && (tstart == 0) && (tend == object->size)) @@ -1048,11 +1043,7 @@ vm_object_page_collect_flush(vm_object_t vm_pageout_flush(ma, runlen, pagerflags); for (i = 0; i < runlen; i++) { if (ma[i]->dirty) { - vm_page_lock(ma[i]); - vm_page_lock_queues(); pmap_remove_write(ma[i]); - vm_page_unlock_queues(); - vm_page_unlock(ma[i]); ma[i]->oflags |= VPO_CLEANCHK; /* @@ -1968,7 +1959,6 @@ again: * if "clean_only" is FALSE. */ vm_page_lock(p); - vm_page_lock_queues(); if ((wirings = p->wire_count) != 0 && (wirings = pmap_page_wired_mappings(p)) != p->wire_count) { /* Fictitious pages do not have managed mappings. */ @@ -1980,7 +1970,6 @@ again: p->valid = 0; vm_page_undirty(p); } - vm_page_unlock_queues(); vm_page_unlock(p); continue; } @@ -1991,7 +1980,6 @@ again: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 8 21:18:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 535101065670; Sat, 8 May 2010 21:18:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 429DF8FC18; Sat, 8 May 2010 21:18: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 o48LINnN031453; Sat, 8 May 2010 21:18:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48LINMG031452; Sat, 8 May 2010 21:18:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082118.o48LINMG031452@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 21:18:23 +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: r207797 - stable/8/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: Sat, 08 May 2010 21:18:23 -0000 Author: dougb Date: Sat May 8 21:18:22 2010 New Revision: 207797 URL: http://svn.freebsd.org/changeset/base/207797 Log: MFC r206686: Make 'stop' work even if ${name}_enable is not set. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Sat May 8 20:34:01 2010 (r207796) +++ stable/8/etc/rc.subr Sat May 8 21:18:22 2010 (r207797) @@ -663,12 +663,12 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, and $1 is not - # "rcvar", then run + # if ${rcvar} is set, $1 is not "rcvar" + # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 From owner-svn-src-all@FreeBSD.ORG Sat May 8 21:35:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6DD6106566B; Sat, 8 May 2010 21:35:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D717B8FC14; Sat, 8 May 2010 21:35: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 o48LZpS1035389; Sat, 8 May 2010 21:35:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48LZpkK035386; Sat, 8 May 2010 21:35:51 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005082135.o48LZpkK035386@svn.freebsd.org> From: Alan Cox Date: Sat, 8 May 2010 21:35: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: r207798 - 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: Sat, 08 May 2010 21:35:52 -0000 Author: alc Date: Sat May 8 21:35:51 2010 New Revision: 207798 URL: http://svn.freebsd.org/changeset/base/207798 Log: Minimize the scope of the page queues lock in vm_fault(). Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat May 8 21:18:22 2010 (r207797) +++ head/sys/vm/vm_fault.c Sat May 8 21:35:51 2010 (r207798) @@ -306,7 +306,6 @@ RetryFault:; * which is not what we want. */ vm_page_lock(fs.m); - vm_page_lock_queues(); if ((fs.m->cow) && (fault_type & VM_PROT_WRITE) && (fs.object == fs.first_object)) { @@ -337,6 +336,7 @@ RetryFault:; * sleeping so that the page daemon is less * likely to reclaim it. */ + vm_page_lock_queues(); vm_page_flag_set(fs.m, PG_REFERENCED); vm_page_unlock_queues(); vm_page_unlock(fs.m); @@ -363,6 +363,7 @@ RetryFault:; vm_object_deallocate(fs.first_object); goto RetryFault; } + vm_page_lock_queues(); vm_pageq_remove(fs.m); vm_page_unlock_queues(); vm_page_unlock(fs.m); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat May 8 21:18:22 2010 (r207797) +++ head/sys/vm/vm_page.c Sat May 8 21:35:51 2010 (r207798) @@ -2233,6 +2233,7 @@ vm_page_cowfault(vm_page_t m) vm_object_t object; vm_pindex_t pindex; + mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); vm_page_lock_assert(m, MA_OWNED); object = m->object; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -2243,7 +2244,6 @@ vm_page_cowfault(vm_page_t m) retry_alloc: pmap_remove_all(m); - vm_page_unlock_queues(); vm_page_remove(m); mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); if (mnew == NULL) { @@ -2254,7 +2254,6 @@ vm_page_cowfault(vm_page_t m) VM_OBJECT_LOCK(object); if (m == vm_page_lookup(object, pindex)) { vm_page_lock(m); - vm_page_lock_queues(); goto retry_alloc; } else { /* @@ -2272,9 +2271,7 @@ vm_page_cowfault(vm_page_t m) */ vm_page_unlock(m); vm_page_lock(mnew); - vm_page_lock_queues(); vm_page_free(mnew); - vm_page_unlock_queues(); vm_page_unlock(mnew); vm_page_insert(m, object, pindex); } else { /* clear COW & copy page */ From owner-svn-src-all@FreeBSD.ORG Sat May 8 22:13:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 131E91065673; Sat, 8 May 2010 22:13:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0276C8FC14; Sat, 8 May 2010 22:13: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 o48MDmY1043786; Sat, 8 May 2010 22:13:48 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MDmKv043785; Sat, 8 May 2010 22:13:48 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082213.o48MDmKv043785@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:13:48 +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: r207800 - stable/7/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: Sat, 08 May 2010 22:13:49 -0000 Author: dougb Date: Sat May 8 22:13:48 2010 New Revision: 207800 URL: http://svn.freebsd.org/changeset/base/207800 Log: MFC r179870: Move the check for enabled knobs further down in run_rc_command() so that bogus commands cause usage information to be printed instead of diagnostics about enabling the knob. This is a prerequisite for merging r206686. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat May 8 21:42:28 2010 (r207799) +++ stable/7/etc/rc.subr Sat May 8 22:13:48 2010 (r207800) @@ -603,23 +603,26 @@ run_rc_command() fi fi + eval $_pidcmd # determine the pid if necessary + + for _elem in $_keywords; do + if [ "$_elem" != "$rc_arg" ]; then + continue + fi # if ${rcvar} is set, and $1 is not # "rcvar", then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then - if ! checkyesno ${rcvar}; then - return 0 + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if ! checkyesno ${rcvar}; then + echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " + echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " + echo "instead of '${rc_arg}'." + return 0 + fi fi - fi - - eval $_pidcmd # determine the pid if necessary - for _elem in $_keywords; do - if [ "$_elem" != "$rc_arg" ]; then - continue - fi # if there's a custom ${XXX_cmd}, # run that instead of the default # From owner-svn-src-all@FreeBSD.ORG Sat May 8 22:15:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC26D1065670; Sat, 8 May 2010 22:15:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id ABF788FC0C; Sat, 8 May 2010 22:15: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 o48MF5bf044104; Sat, 8 May 2010 22:15:05 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MF5eo044102; Sat, 8 May 2010 22:15:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082215.o48MF5eo044102@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:15:05 +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: r207801 - stable/7/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: Sat, 08 May 2010 22:15:05 -0000 Author: dougb Date: Sat May 8 22:15:05 2010 New Revision: 207801 URL: http://svn.freebsd.org/changeset/base/207801 Log: MFC r206686: Make 'stop' work even if ${name}_enable is not set. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat May 8 22:13:48 2010 (r207800) +++ stable/7/etc/rc.subr Sat May 8 22:15:05 2010 (r207801) @@ -609,12 +609,12 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, and $1 is not - # "rcvar", then run + # if ${rcvar} is set, $1 is not "rcvar" + # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " From owner-svn-src-all@FreeBSD.ORG Sat May 8 22:24:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7393106566B; Sat, 8 May 2010 22:24:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6B998FC0C; Sat, 8 May 2010 22:24:01 +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 o48MO1J2046112; Sat, 8 May 2010 22:24:01 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MO1Ab046110; Sat, 8 May 2010 22:24:01 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082224.o48MO1Ab046110@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:24:01 +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: r207802 - stable/8/etc/rc.d 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, 08 May 2010 22:24:01 -0000 Author: dougb Date: Sat May 8 22:24:01 2010 New Revision: 207802 URL: http://svn.freebsd.org/changeset/base/207802 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/8/etc/rc.d/named Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/named ============================================================================== --- stable/8/etc/rc.d/named Sat May 8 22:15:05 2010 (r207801) +++ stable/8/etc/rc.d/named Sat May 8 22:24:01 2010 (r207802) @@ -192,6 +192,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -201,7 +208,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -263,8 +270,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -272,7 +278,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}" From owner-svn-src-all@FreeBSD.ORG Sat May 8 22:24:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D5181065672; Sat, 8 May 2010 22:24:31 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCD68FC1A; Sat, 8 May 2010 22:24:31 +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 o48MOVk8046259; Sat, 8 May 2010 22:24:31 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MOVa5046257; Sat, 8 May 2010 22:24:31 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082224.o48MOVa5046257@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:24:31 +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: r207803 - stable/7/etc/rc.d 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, 08 May 2010 22:24:31 -0000 Author: dougb Date: Sat May 8 22:24:31 2010 New Revision: 207803 URL: http://svn.freebsd.org/changeset/base/207803 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/7/etc/rc.d/named Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.d/named ============================================================================== --- stable/7/etc/rc.d/named Sat May 8 22:24:01 2010 (r207802) +++ stable/7/etc/rc.d/named Sat May 8 22:24:31 2010 (r207803) @@ -192,6 +192,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -201,7 +208,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -263,8 +270,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -272,7 +278,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}" From owner-svn-src-all@FreeBSD.ORG Sat May 8 22:25:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97C7B1065675; Sat, 8 May 2010 22:25:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 874568FC17; Sat, 8 May 2010 22:25: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 o48MPbJS046543; Sat, 8 May 2010 22:25:37 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MPb4n046541; Sat, 8 May 2010 22:25:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082225.o48MPb4n046541@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207804 - stable/6/etc/rc.d 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, 08 May 2010 22:25:37 -0000 Author: dougb Date: Sat May 8 22:25:37 2010 New Revision: 207804 URL: http://svn.freebsd.org/changeset/base/207804 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/6/etc/rc.d/named Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/rc.d/named ============================================================================== --- stable/6/etc/rc.d/named Sat May 8 22:24:31 2010 (r207803) +++ stable/6/etc/rc.d/named Sat May 8 22:25:37 2010 (r207804) @@ -193,6 +193,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -202,7 +209,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -264,8 +271,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -273,7 +279,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}" From owner-svn-src-all@FreeBSD.ORG Sat May 8 23:01:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A366106566B; Sat, 8 May 2010 23:01:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7AA458FC13; Sat, 8 May 2010 23:01: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 o48N1lAK054511; Sat, 8 May 2010 23:01:47 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48N1l0p054509; Sat, 8 May 2010 23:01:47 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005082301.o48N1l0p054509@svn.freebsd.org> From: Alan Cox Date: Sat, 8 May 2010 23:01: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: r207805 - 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: Sat, 08 May 2010 23:01:47 -0000 Author: alc Date: Sat May 8 23:01:47 2010 New Revision: 207805 URL: http://svn.freebsd.org/changeset/base/207805 Log: Update a comment: It no longer makes sense to talk about the page queues lock here. Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sat May 8 22:25:37 2010 (r207804) +++ head/sys/kern/sys_pipe.c Sat May 8 23:01:47 2010 (r207805) @@ -767,13 +767,10 @@ pipe_build_write_buffer(wpipe, uio) return (EFAULT); for (i = 0; addr < endaddr; addr += PAGE_SIZE, i++) { /* - * vm_fault_quick() can sleep. Consequently, - * vm_page_lock_queue() and vm_page_unlock_queue() - * should not be performed outside of this loop. + * vm_fault_quick() can sleep. */ race: if (vm_fault_quick((caddr_t)addr, VM_PROT_READ) < 0) { - for (j = 0; j < i; j++) { vm_page_lock(wpipe->pipe_map.ms[j]); vm_page_unhold(wpipe->pipe_map.ms[j]);