From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 01:30:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02B0F106566B; Sun, 11 Apr 2010 01:30:16 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB9688FC13; Sun, 11 Apr 2010 01:30: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 o3B1UFHK050705; Sun, 11 Apr 2010 01:30:15 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3B1UFSo050703; Sun, 11 Apr 2010 01:30:15 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004110130.o3B1UFSo050703@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 01:30: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: r206463 - 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: Sun, 11 Apr 2010 01:30:16 -0000 Author: kientzle Date: Sun Apr 11 01:30:15 2010 New Revision: 206463 URL: http://svn.freebsd.org/changeset/base/206463 Log: Correct the markup for the -s option, document the iso9660:rockridge and mtree:indent options Modified: head/usr.bin/tar/bsdtar.1 Modified: head/usr.bin/tar/bsdtar.1 ============================================================================== --- head/usr.bin/tar/bsdtar.1 Sat Apr 10 22:24:03 2010 (r206462) +++ head/usr.bin/tar/bsdtar.1 Sun Apr 11 01:30:15 2010 (r206463) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2009 +.Dd Oct 12, 2009 .Dt BSDTAR 1 .Os .Sh NAME @@ -336,6 +336,13 @@ This is enabled by default, use or .Cm iso9660:!joliet to disable. +.It Cm iso9660:rockridge +Support Rock Ridge extensions. +This is enabled by default, use +.Cm !rockridge +or +.Cm iso9660:!rockridge +to disable. .It Cm gzip:compression-level A decimal integer from 0 to 9 specifying the gzip compression level. .It Cm xz:compression-level @@ -359,7 +366,13 @@ Enable generation of .Cm /set lines in the output. .It Cm mtree:indent -XXX need explanation XXX +Produce human-readable output by indenting options and splitting lines +to fit into 80 columns. +.It Cm zip:compression Ns = Ns Ar type +Use +.Ar type +as compression method. +Supported values are store (uncompressed) and deflate (gzip algorithm). .El If a provided option is not supported by any module, that is a fatal error. @@ -412,11 +425,21 @@ but before security checks. .It Fl s Ar pattern Modify file or archive member names according to .Pa pattern . -The pattern has the format /old/new/[gps]. -old is a basic regular expression. -If it doesn't apply, the pattern is skipped. -new is the replacement string of the matched part. -~ is substituted with the match, \e1 to \e9 with the content of +The pattern has the format +.Ar /old/new/ Ns Op gps +where +.Ar old +is a basic regular expression, +.Ar new +is the replacement string of the matched part, +and the optional trailing letters modify +how the replacement is handled. +If +.Ar old +is not matched, the pattern is skipped. +Within +.Ar new , +~ is substituted with the match, \1 to \9 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. From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 01:31:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9606F106566B; Sun, 11 Apr 2010 01:31:50 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854BE8FC0A; Sun, 11 Apr 2010 01:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3B1VoWd051070; Sun, 11 Apr 2010 01:31:50 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3B1Vonx051067; Sun, 11 Apr 2010 01:31:50 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004110131.o3B1Vonx051067@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 01:31: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: r206464 - 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: Sun, 11 Apr 2010 01:31:50 -0000 Author: kientzle Date: Sun Apr 11 01:31:50 2010 New Revision: 206464 URL: http://svn.freebsd.org/changeset/base/206464 Log: Remove an unnecessary include and conditionalize some code. Modified: head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar_platform.h Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sun Apr 11 01:30:15 2010 (r206463) +++ head/usr.bin/tar/bsdtar.c Sun Apr 11 01:31:50 2010 (r206464) @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include "bsdtar.h" #include "err.h" -#include "matching.h" /* * Per POSIX.1-1988, tar defaults to reading/writing archives to/from @@ -180,8 +179,10 @@ main(int argc, char **argv) time(&now); +#if HAVE_SETLOCALE if (setlocale(LC_ALL, "") == NULL) bsdtar_warnc(0, "Failed to set default locale"); +#endif #if defined(HAVE_NL_LANGINFO) && defined(HAVE_D_MD_ORDER) bsdtar->day_first = (*nl_langinfo(D_MD_ORDER) == 'd'); #endif Modified: head/usr.bin/tar/bsdtar_platform.h ============================================================================== --- head/usr.bin/tar/bsdtar_platform.h Sun Apr 11 01:30:15 2010 (r206463) +++ head/usr.bin/tar/bsdtar_platform.h Sun Apr 11 01:31:50 2010 (r206464) @@ -62,6 +62,10 @@ #include "archive_entry.h" #endif +#ifdef HAVE_LIBACL +#include +#endif + /* * Include "dirent.h" (or it's equivalent on several different platforms). * From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 01:32:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F6BF106564A; Sun, 11 Apr 2010 01:32:30 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC888FC0A; Sun, 11 Apr 2010 01:32:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3B1WU9U051270; Sun, 11 Apr 2010 01:32:30 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3B1WURr051268; Sun, 11 Apr 2010 01:32:30 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004110132.o3B1WURr051268@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 01:32: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: r206465 - 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: Sun, 11 Apr 2010 01:32:30 -0000 Author: kientzle Date: Sun Apr 11 01:32:30 2010 New Revision: 206465 URL: http://svn.freebsd.org/changeset/base/206465 Log: Consistently specify O_BINARY when opening files. Modified: head/usr.bin/tar/write.c Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sun Apr 11 01:31:50 2010 (r206464) +++ head/usr.bin/tar/write.c Sun Apr 11 01:32:30 2010 (r206465) @@ -95,6 +95,10 @@ __FBSDID("$FreeBSD$"); /* Fixed size of uname/gname caches. */ #define name_cache_size 101 +#ifndef O_BINARY +#define O_BINARY 0 +#endif + static const char * const NO_NAME = "(noname)"; struct archive_dir_entry { @@ -256,9 +260,9 @@ tar_mode_r(struct bsdtar *bsdtar) format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED; #if defined(__BORLANDC__) - bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT); + bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY); #else - bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT, 0666); + bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY, 0666); #endif if (bsdtar->fd < 0) bsdtar_errc(1, errno, @@ -353,7 +357,7 @@ tar_mode_u(struct bsdtar *bsdtar) /* Sanity-test some arguments and the file. */ test_for_append(bsdtar); - bsdtar->fd = open(bsdtar->filename, O_RDWR); + bsdtar->fd = open(bsdtar->filename, O_RDWR | O_BINARY); if (bsdtar->fd < 0) bsdtar_errc(1, errno, "Cannot open %s", bsdtar->filename); @@ -843,7 +847,7 @@ write_hierarchy(struct bsdtar *bsdtar, s #if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL) /* Linux uses ioctl to read flags. */ if (bsdtar->option_honor_nodump) { - int fd = open(name, O_RDONLY | O_NONBLOCK); + int fd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY); if (fd >= 0) { unsigned long fflags; int r = ioctl(fd, EXT2_IOC_GETFLAGS, &fflags); @@ -913,7 +917,7 @@ write_entry_backend(struct bsdtar *bsdta if (archive_entry_size(entry) > 0) { const char *pathname = archive_entry_sourcepath(entry); - fd = open(pathname, O_RDONLY); + fd = open(pathname, O_RDONLY | O_BINARY); if (fd == -1) { if (!bsdtar->verbose) bsdtar_warnc(errno, From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 01:36:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 039F9106564A; Sun, 11 Apr 2010 01:36:11 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E722B8FC0C; Sun, 11 Apr 2010 01:36: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 o3B1aATx052110; Sun, 11 Apr 2010 01:36:10 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3B1aAY9052108; Sun, 11 Apr 2010 01:36:10 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004110136.o3B1aAY9052108@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 01:36: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: r206466 - 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: Sun, 11 Apr 2010 01:36:11 -0000 Author: kientzle Date: Sun Apr 11 01:36:10 2010 New Revision: 206466 URL: http://svn.freebsd.org/changeset/base/206466 Log: Fix -X. Modified: head/usr.bin/tar/matching.c Modified: head/usr.bin/tar/matching.c ============================================================================== --- head/usr.bin/tar/matching.c Sun Apr 11 01:32:30 2010 (r206465) +++ head/usr.bin/tar/matching.c Sun Apr 11 01:36:10 2010 (r206466) @@ -89,7 +89,7 @@ lafe_exclude_from_file(struct lafe_match const char *p; int ret = 0; - lr = lafe_line_reader(pathname, '\n'); + lr = lafe_line_reader(pathname, 0); while ((p = lafe_line_reader_next(lr)) != NULL) { if (lafe_exclude(matching, p) != 0) ret = -1; From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 09:16:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7412106566B; Sun, 11 Apr 2010 09:16:16 +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 79EAA8FC12; Sun, 11 Apr 2010 09:16:16 +0000 (UTC) Received: from c122-106-168-84.carlnfd1.nsw.optusnet.com.au (c122-106-168-84.carlnfd1.nsw.optusnet.com.au [122.106.168.84]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o3B9GCxI012004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Apr 2010 19:16:14 +1000 Date: Sun, 11 Apr 2010 19:16:12 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Roman Divacky In-Reply-To: <201004091521.o39FLBqx035856@svn.freebsd.org> Message-ID: <20100411175432.S10835@delplex.bde.org> References: <201004091521.o39FLBqx035856@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: r206424 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Apr 2010 09:16:17 -0000 On Fri, 9 Apr 2010, Roman Divacky wrote: > Log: > Rename the ALIGN macro to LINT_ALIGN so it does not clash with machine/param.h > > Bump the alignment to 16bytes because lint1 memory allocator is used for > objects that require 16bytes alignment on amd64 (ie. val_t). This makes > lint1 work when compiled with compiler(s) that use SSE for memcpy on amd64. > (e.g. clang). This seems to be mostly backwards. xlint wants to use the system ALIGN(), since it has no way of knowing the correct alignment. However, the system might not supply ALIGN(), so it provided its own probably-incorrect ALIGN() as a fallback. FreeBSD has a system ALIGN() and it should have always been used. xlint get the includes correct for this, though this is fragile. However2, the system ALIGN() on amd64 doesn't know the correct alignment either (both essentially had 64 bits hard-coded). Now xlint uses a different hard-coded alignment (128 bits). For a non-backwards fix, you need to follow the comment in xlint which says ALIGN should go away [in xlint]. Other compilers might need a working system ALIGN() in other places. I think only memory allocator in xlint needs a working ALIGN() (just 1 instance). Perhaps the allocator should just use malloc(). The only other uses of ALIGN() are in getbound(). These seem to be all completely wrong. The all use ALIGN(1), where ALIGN() is the host or hard-coded ALIGN() which gives maximal alignment and 1 is the size of a char, where SALIGN(type), where SALIGN() is the source ALIGN() which gives the (usually non-maximal) alignment of a type and the `type' parameter must contain type info and not be just the size of the type (certainly not the size of another type) since types of the same size may have different alignment. SALIGN() is much more impossible to write as a portable macro. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 09:26:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E31EC106566B; Sun, 11 Apr 2010 09:26:29 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 962F38FC1A; Sun, 11 Apr 2010 09:26:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1B1759CB099; Sun, 11 Apr 2010 11:24:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j6QW7gblIOUC; Sun, 11 Apr 2010 11:24:18 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id D88CD9CB0F4; Sun, 11 Apr 2010 11:24:17 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o3B9OHb8038206; Sun, 11 Apr 2010 11:24:17 +0200 (CEST) (envelope-from rdivacky) Date: Sun, 11 Apr 2010 11:24:17 +0200 From: Roman Divacky To: Bruce Evans Message-ID: <20100411092417.GA37528@freebsd.org> References: <201004091521.o39FLBqx035856@svn.freebsd.org> <20100411175432.S10835@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100411175432.S10835@delplex.bde.org> 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: r206424 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Apr 2010 09:26:30 -0000 On Sun, Apr 11, 2010 at 07:16:12PM +1000, Bruce Evans wrote: > On Fri, 9 Apr 2010, Roman Divacky wrote: > > >Log: > > Rename the ALIGN macro to LINT_ALIGN so it does not clash with > > machine/param.h > > > > Bump the alignment to 16bytes because lint1 memory allocator is used for > > objects that require 16bytes alignment on amd64 (ie. val_t). This makes > > lint1 work when compiled with compiler(s) that use SSE for memcpy on > > amd64. > > (e.g. clang). > > This seems to be mostly backwards. xlint wants to use the system > ALIGN(), since it has no way of knowing the correct alignment. However, > the system might not supply ALIGN(), so it provided its own > probably-incorrect ALIGN() as a fallback. FreeBSD has a system ALIGN() > and it should have always been used. xlint get the includes correct > for this, though this is fragile. However2, the system ALIGN() on > amd64 doesn't know the correct alignment either (both essentially had > 64 bits hard-coded). Now xlint uses a different hard-coded alignment > (128 bits). so you suggest fixing the ALIGN on amd64? ie. to make it 128bit? > For a non-backwards fix, you need to follow the comment in xlint which > says ALIGN should go away [in xlint]. Other compilers might need a > working system ALIGN() in other places. I think only memory allocator > in xlint needs a working ALIGN() (just 1 instance). Perhaps the allocator > should just use malloc(). The only other uses of ALIGN() are in getbound(). > These seem to be all completely wrong. The all use ALIGN(1), where ALIGN() > is the host or hard-coded ALIGN() which gives maximal alignment and 1 is > the size of a char, where SALIGN(type), where SALIGN() is the source > ALIGN() which gives the (usually non-maximal) alignment of a type and > the `type' parameter must contain type info and not be just the size of > the type (certainly not the size of another type) since types of the same > size may have different alignment. SALIGN() is much more impossible to > write as a portable macro. the xlint allocator uses malloc and builds upon it. fixing this wont be trivial and I have no interest in it :( From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 10:13:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A12C8106566C; Sun, 11 Apr 2010 10:13:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7588FC0A; Sun, 11 Apr 2010 10:13:43 +0000 (UTC) Received: from besplex.bde.org (c122-106-168-84.carlnfd1.nsw.optusnet.com.au [122.106.168.84]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o3BADecX027220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Apr 2010 20:13:41 +1000 Date: Sun, 11 Apr 2010 20:13:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Roman Divacky In-Reply-To: <20100411092417.GA37528@freebsd.org> Message-ID: <20100411200313.G2454@besplex.bde.org> References: <201004091521.o39FLBqx035856@svn.freebsd.org> <20100411175432.S10835@delplex.bde.org> <20100411092417.GA37528@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, Bruce Evans Subject: Re: svn commit: r206424 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Apr 2010 10:13:44 -0000 On Sun, 11 Apr 2010, Roman Divacky wrote: > On Sun, Apr 11, 2010 at 07:16:12PM +1000, Bruce Evans wrote: >> .... However2, the system ALIGN() on >> amd64 doesn't know the correct alignment either (both essentially had >> 64 bits hard-coded). Now xlint uses a different hard-coded alignment >> (128 bits). > > so you suggest fixing the ALIGN on amd64? ie. to make it 128bit? It's an ABI change, thus needs careful release engineering. _ALIGN (= ALIGN) is used in the CMSG ABI in so I think would affect public ABIs. amd64 has a strict ABI which I think involves 128-byte alignment for long doubles (not sure if it specifies anything for non-C things like copies of SSE registers). The system should have a macro to support the maximal alignment and it is easiest to use ALIGN() for this (otherwise you would need a new macro for this and keep ALIGN() for pointers and longs...). Bruce From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 11:49:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E93DD106566C; Sun, 11 Apr 2010 11:49:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D74AD8FC12; Sun, 11 Apr 2010 11:49: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 o3BBnOYY088192; Sun, 11 Apr 2010 11:49:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BBnOOm088190; Sun, 11 Apr 2010 11:49:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004111149.o3BBnOOm088190@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 11 Apr 2010 11:49: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: r206469 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 11:49:25 -0000 Author: bz Date: Sun Apr 11 11:49:24 2010 New Revision: 206469 URL: http://svn.freebsd.org/changeset/base/206469 Log: In if_detach_internal() only try to do the detach run if if_attachdomain1() has actually succeeded to initialize and attach. There is a theoretical possibility to drop out early in if_attachdomain1() leaving the array uninitialized if we cannot get the lock. Discussed with: rwatson MFC after: 10 days Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Apr 11 11:27:19 2010 (r206468) +++ head/sys/net/if.c Sun Apr 11 11:49:24 2010 (r206469) @@ -898,7 +898,7 @@ if_detach_internal(struct ifnet *ifp, in if_delgroups(ifp); IF_AFDATA_LOCK(ifp); - for (dp = domains; dp; dp = dp->dom_next) { + for (dp = domains; ifp->if_afdata_initialized > 0 && dp; dp = dp->dom_next) { if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family]) (*dp->dom_ifdetach)(ifp, ifp->if_afdata[dp->dom_family]); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 11:51:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 483AA106567E; Sun, 11 Apr 2010 11:51:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 366CE8FC2C; Sun, 11 Apr 2010 11:51: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 o3BBpjt9088726; Sun, 11 Apr 2010 11:51:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BBpjlJ088724; Sun, 11 Apr 2010 11:51:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004111151.o3BBpjlJ088724@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 11 Apr 2010 11:51: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: r206470 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 11:51:45 -0000 Author: bz Date: Sun Apr 11 11:51:44 2010 New Revision: 206470 URL: http://svn.freebsd.org/changeset/base/206470 Log: In if_detach_internal() we cannot hold the af_data lock over the dom_ifdetach() calls as they might sleep for callout_drain(). Do as we do in if_attachdomain1() [r121470] and handle if_afdata_initialized earlier and call dom_ifdetach() unlocked. Discussed with: rwatson MFC after: 10 days Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Apr 11 11:49:24 2010 (r206469) +++ head/sys/net/if.c Sun Apr 11 11:51:44 2010 (r206470) @@ -897,14 +897,20 @@ if_detach_internal(struct ifnet *ifp, in devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL); if_delgroups(ifp); + /* + * We cannot hold the lock over dom_ifdetach calls as they might + * sleep, for example trying to drain a callout, thus open up the + * theoretical race with re-attaching. + */ IF_AFDATA_LOCK(ifp); - for (dp = domains; ifp->if_afdata_initialized > 0 && dp; dp = dp->dom_next) { + i = ifp->if_afdata_initialized; + ifp->if_afdata_initialized = 0; + IF_AFDATA_UNLOCK(ifp); + for (dp = domains; i > 0 && dp; dp = dp->dom_next) { if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family]) (*dp->dom_ifdetach)(ifp, ifp->if_afdata[dp->dom_family]); } - ifp->if_afdata_initialized = 0; - IF_AFDATA_UNLOCK(ifp); } #ifdef VIMAGE From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 12:02:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497B01065670; Sun, 11 Apr 2010 12:02:14 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377628FC1C; Sun, 11 Apr 2010 12:02: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 o3BC2EWc091078; Sun, 11 Apr 2010 12:02:14 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BC2ED7091075; Sun, 11 Apr 2010 12:02:14 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004111202.o3BC2ED7091075@svn.freebsd.org> From: Ed Schouten Date: Sun, 11 Apr 2010 12:02: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: r206471 - head/usr.sbin/lastlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Apr 2010 12:02:14 -0000 Author: ed Date: Sun Apr 11 12:02:13 2010 New Revision: 206471 URL: http://svn.freebsd.org/changeset/base/206471 Log: Alphabetically sort the output of lastlogin(8). According to the manpage, the entries have to be sorted by uid. This is no longer possible, since our utmpx implementation is completely unaware of user IDs. You can safely add entries for multiple users sharing the same uid. Make the output less random by sorting everything by name. Modified: head/usr.sbin/lastlogin/lastlogin.8 head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/lastlogin.8 ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.8 Sun Apr 11 11:51:44 2010 (r206470) +++ head/usr.sbin/lastlogin/lastlogin.8 Sun Apr 11 12:02:13 2010 (r206471) @@ -55,7 +55,7 @@ If more than one is given, the session information for each user is printed in the order given on the command line. Otherwise, information -for all users is printed, sorted by uid. +for all users is printed, sorted by name. .Pp The .Nm Modified: head/usr.sbin/lastlogin/lastlogin.c ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.c Sun Apr 11 11:51:44 2010 (r206470) +++ head/usr.sbin/lastlogin/lastlogin.c Sun Apr 11 12:02:13 2010 (r206471) @@ -39,6 +39,7 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998 #include #include #include +#include #include #include #include @@ -47,11 +48,19 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998 static void output(struct utmpx *); static void usage(void); +static int +utcmp(const void *u1, const void *u2) +{ + + return (strcmp(((const struct utmpx *)u1)->ut_user, + ((const struct utmpx *)u2)->ut_user)); +} + int main(int argc, char *argv[]) { - int ch, i; - struct utmpx *u; + int ch, i, ulistsize; + struct utmpx *u, *ulist; while ((ch = getopt(argc, argv, "")) != -1) { usage(); @@ -74,12 +83,21 @@ main(int argc, char *argv[]) else { if (setutxdb(UTXDB_LASTLOGIN, NULL) != 0) errx(1, "failed to open lastlog database"); + ulist = NULL; + ulistsize = 0; while ((u = getutxent()) != NULL) { if (u->ut_type != USER_PROCESS) continue; - output(u); + if ((ulistsize % 16) == 0) + ulist = realloc(ulist, + (ulistsize + 16) * sizeof(struct utmpx)); + ulist[ulistsize++] = *u; } endutxent(); + + qsort(ulist, ulistsize, sizeof(struct utmpx), utcmp); + for (i = 0; i < ulistsize; i++) + output(&ulist[i]); } exit(0); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 12:07:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D85106566C; Sun, 11 Apr 2010 12:07:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45F518FC0A; Sun, 11 Apr 2010 12:07: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 o3BC74Cm092149; Sun, 11 Apr 2010 12:07:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BC74Lf092147; Sun, 11 Apr 2010 12:07:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201004111207.o3BC74Lf092147@svn.freebsd.org> From: Ed Schouten Date: Sun, 11 Apr 2010 12:07: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: r206472 - head/usr.sbin/lastlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Apr 2010 12:07:04 -0000 Author: ed Date: Sun Apr 11 12:07:03 2010 New Revision: 206472 URL: http://svn.freebsd.org/changeset/base/206472 Log: Don't forget to catch realloc() errors. Modified: head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/lastlogin.c ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.c Sun Apr 11 12:02:13 2010 (r206471) +++ head/usr.sbin/lastlogin/lastlogin.c Sun Apr 11 12:07:03 2010 (r206472) @@ -88,9 +88,12 @@ main(int argc, char *argv[]) while ((u = getutxent()) != NULL) { if (u->ut_type != USER_PROCESS) continue; - if ((ulistsize % 16) == 0) + if ((ulistsize % 16) == 0) { ulist = realloc(ulist, (ulistsize + 16) * sizeof(struct utmpx)); + if (ulist == NULL) + err(1, "malloc"); + } ulist[ulistsize++] = *u; } endutxent(); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 12:24:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0712B106564A; Sun, 11 Apr 2010 12:24:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E983E8FC18; Sun, 11 Apr 2010 12:24: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 o3BCOlCS096041; Sun, 11 Apr 2010 12:24:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BCOl4j096038; Sun, 11 Apr 2010 12:24:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004111224.o3BCOl4j096038@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 11 Apr 2010 12:24: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: r206473 - 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: Sun, 11 Apr 2010 12:24:48 -0000 Author: jilles Date: Sun Apr 11 12:24:47 2010 New Revision: 206473 URL: http://svn.freebsd.org/changeset/base/206473 Log: sh: Partially revert r206146, allowing double-quotes in arithmetic. These do pretty much nothing (except that parentheses are ignored), but people seem to use them and allowing them does not hurt much. Single-quotes seem not to be used and cause silently different behaviour with ksh93 character constants. Modified: head/bin/sh/mksyntax.c head/bin/sh/parser.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Sun Apr 11 12:07:03 2010 (r206472) +++ head/bin/sh/mksyntax.c Sun Apr 11 12:24:47 2010 (r206473) @@ -232,6 +232,7 @@ main(int argc __unused, char **argv __un add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); + add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun Apr 11 12:07:03 2010 (r206472) +++ head/bin/sh/parser.c Sun Apr 11 12:24:47 2010 (r206473) @@ -1223,7 +1223,10 @@ readtoken1(int firstc, char const *initi if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); else { - state[level].syntax = BASESYNTAX; + if (state[level].category == TSTATE_ARITH) + state[level].syntax = ARISYNTAX; + else + state[level].syntax = BASESYNTAX; quotef++; } break; From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 13:46:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 548EC106566B; Sun, 11 Apr 2010 13:46:43 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440F08FC13; Sun, 11 Apr 2010 13:46: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 o3BDkhRl014051; Sun, 11 Apr 2010 13:46:43 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BDkhX2014049; Sun, 11 Apr 2010 13:46:43 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004111346.o3BDkhX2014049@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 11 Apr 2010 13:46: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: r206474 - 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: Sun, 11 Apr 2010 13:46:43 -0000 Author: bschmidt Date: Sun Apr 11 13:46:42 2010 New Revision: 206474 URL: http://svn.freebsd.org/changeset/base/206474 Log: Add some missing protoypes. Approved by: rpaulo (mentor) MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Apr 11 12:24:47 2010 (r206473) +++ head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:46:42 2010 (r206474) @@ -82,11 +82,12 @@ static struct ieee80211vap *iwn_vap_crea const uint8_t mac[IEEE80211_ADDR_LEN]); static void iwn_vap_delete(struct ieee80211vap *); static int iwn_cleanup(device_t); -static int iwn_detach(device_t); +static int iwn_detach(device_t); int iwn_nic_lock(struct iwn_softc *); int iwn_eeprom_lock(struct iwn_softc *); int iwn_init_otprom(struct iwn_softc *); int iwn_read_prom_data(struct iwn_softc *, uint32_t, void *, int); +static void iwn_dma_map_addr(void *, bus_dma_segment_t *, int, int); static int iwn_dma_contig_alloc(struct iwn_softc *, struct iwn_dma_info *, void **, bus_size_t, bus_size_t, int); static void iwn_dma_contig_free(struct iwn_dma_info *); @@ -111,6 +112,11 @@ int iwn_read_eeprom(struct iwn_softc *, void iwn4965_read_eeprom(struct iwn_softc *); void iwn4965_print_power_group(struct iwn_softc *, int); void iwn5000_read_eeprom(struct iwn_softc *); +static uint32_t iwn_eeprom_channel_flags(struct iwn_eeprom_chan *); +static void iwn_read_eeprom_band(struct iwn_softc *, int); +#if 0 /* HT */ +static void iwn_read_eeprom_ht40(struct iwn_softc *, int); +#endif static void iwn_read_eeprom_channels(struct iwn_softc *, int, uint32_t); void iwn_read_eeprom_enhinfo(struct iwn_softc *); @@ -150,6 +156,7 @@ void iwn4965_update_sched(struct iwn_so void iwn5000_update_sched(struct iwn_softc *, int, int, uint8_t, uint16_t); void iwn5000_reset_sched(struct iwn_softc *, int, int); +static uint8_t iwn_plcp_signal(int); int iwn_tx_data(struct iwn_softc *, struct mbuf *, struct ieee80211_node *, struct iwn_tx_ring *); static int iwn_raw_xmit(struct ieee80211_node *, struct mbuf *, @@ -195,6 +202,22 @@ int iwn_config(struct iwn_softc *); int iwn_scan(struct iwn_softc *); int iwn_auth(struct iwn_softc *, struct ieee80211vap *vap); int iwn_run(struct iwn_softc *, struct ieee80211vap *vap); +#if 0 /* HT */ +static int iwn_ampdu_rx_start(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +static void iwn_ampdu_rx_stop(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +static int iwn_ampdu_tx_start(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +static void iwn_ampdu_tx_stop(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +static void iwn4965_ampdu_tx_start(struct iwn_softc *, + struct ieee80211_node *, uint8_t, uint16_t); +static void iwn4965_ampdu_tx_stop(struct iwn_softc *, uint8_t, uint16_t); +static void iwn5000_ampdu_tx_start(struct iwn_softc *, + struct ieee80211_node *, uint8_t, uint16_t); +static void iwn5000_ampdu_tx_stop(struct iwn_softc *, uint8_t, uint16_t); +#endif int iwn5000_query_calibration(struct iwn_softc *); int iwn5000_send_calibration(struct iwn_softc *); int iwn5000_send_wimax_coex(struct iwn_softc *); @@ -225,6 +248,8 @@ static void iwn_scan_end(struct ieee802 static void iwn_set_channel(struct ieee80211com *); static void iwn_scan_curchan(struct ieee80211_scan_state *, unsigned long); static void iwn_scan_mindwell(struct ieee80211_scan_state *); +static struct iwn_eeprom_chan *iwn_find_eeprom_channel(struct iwn_softc *, + struct ieee80211_channel *); static int iwn_setregdomain(struct ieee80211com *, struct ieee80211_regdomain *, int, struct ieee80211_channel []); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 13:47:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9180D1065672; Sun, 11 Apr 2010 13:47:46 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 813CC8FC14; Sun, 11 Apr 2010 13:47: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 o3BDlkqF014318; Sun, 11 Apr 2010 13:47:46 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BDlkjL014316; Sun, 11 Apr 2010 13:47:46 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004111347.o3BDlkjL014316@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 11 Apr 2010 13:47: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: r206475 - 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: Sun, 11 Apr 2010 13:47:46 -0000 Author: bschmidt Date: Sun Apr 11 13:47:46 2010 New Revision: 206475 URL: http://svn.freebsd.org/changeset/base/206475 Log: iwn5000_reset_sched() is not used; #ifdef it. Approved by: rpaulo (mentor) MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:46:42 2010 (r206474) +++ head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:47:46 2010 (r206475) @@ -155,7 +155,9 @@ void iwn4965_update_sched(struct iwn_so uint16_t); void iwn5000_update_sched(struct iwn_softc *, int, int, uint8_t, uint16_t); +#ifdef notyet void iwn5000_reset_sched(struct iwn_softc *, int, int); +#endif static uint8_t iwn_plcp_signal(int); int iwn_tx_data(struct iwn_softc *, struct mbuf *, struct ieee80211_node *, struct iwn_tx_ring *); @@ -2818,6 +2820,7 @@ iwn5000_update_sched(struct iwn_softc *s } } +#ifdef notyet void iwn5000_reset_sched(struct iwn_softc *sc, int qid, int idx) { @@ -2832,6 +2835,7 @@ iwn5000_reset_sched(struct iwn_softc *sc BUS_DMASYNC_PREWRITE); } } +#endif static uint8_t iwn_plcp_signal(int rate) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 13:48:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C151065670; Sun, 11 Apr 2010 13:48:52 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97B778FC13; Sun, 11 Apr 2010 13:48: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 o3BDmq1c014619; Sun, 11 Apr 2010 13:48:52 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BDmqMv014617; Sun, 11 Apr 2010 13:48:52 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004111348.o3BDmqMv014617@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 11 Apr 2010 13:48: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: r206476 - 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: Sun, 11 Apr 2010 13:48:54 -0000 Author: bschmidt Date: Sun Apr 11 13:48:52 2010 New Revision: 206476 URL: http://svn.freebsd.org/changeset/base/206476 Log: Hook ieee80211_media_change() to ieee80211_vap_attach(). Approved by: rpaulo (mentor) MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:47:46 2010 (r206475) +++ head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:48:52 2010 (r206476) @@ -787,8 +787,7 @@ iwn_vap_create(struct ieee80211com *ic, ieee80211_ratectl_init(vap); /* Complete setup. */ - ieee80211_vap_attach(vap, ieee80211_media_change, - ieee80211_media_status); + ieee80211_vap_attach(vap, iwn_media_change, ieee80211_media_status); ic->ic_opmode = opmode; return vap; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 13:51:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53F0E106566B; Sun, 11 Apr 2010 13:51:20 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 427A88FC12; Sun, 11 Apr 2010 13: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 o3BDpKYu015179; Sun, 11 Apr 2010 13:51:20 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BDpKWP015177; Sun, 11 Apr 2010 13:51:20 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004111351.o3BDpKWP015177@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 11 Apr 2010 13:51: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: r206477 - 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: Sun, 11 Apr 2010 13:51:20 -0000 Author: bschmidt Date: Sun Apr 11 13:51:20 2010 New Revision: 206477 URL: http://svn.freebsd.org/changeset/base/206477 Log: Declare all functions as static. Approved by: rpaulo (mentor) MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:48:52 2010 (r206476) +++ head/sys/dev/iwn/if_iwn.c Sun Apr 11 13:51:20 2010 (r206477) @@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$"); static int iwn_probe(device_t); static int iwn_attach(device_t); -const struct iwn_hal *iwn_hal_attach(struct iwn_softc *); -void iwn_radiotap_attach(struct iwn_softc *); +static const struct iwn_hal *iwn_hal_attach(struct iwn_softc *); +static void iwn_radiotap_attach(struct iwn_softc *); static struct ieee80211vap *iwn_vap_create(struct ieee80211com *, const char name[IFNAMSIZ], int unit, int opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], @@ -83,35 +83,35 @@ static struct ieee80211vap *iwn_vap_crea static void iwn_vap_delete(struct ieee80211vap *); static int iwn_cleanup(device_t); static int iwn_detach(device_t); -int iwn_nic_lock(struct iwn_softc *); -int iwn_eeprom_lock(struct iwn_softc *); -int iwn_init_otprom(struct iwn_softc *); -int iwn_read_prom_data(struct iwn_softc *, uint32_t, void *, int); +static int iwn_nic_lock(struct iwn_softc *); +static int iwn_eeprom_lock(struct iwn_softc *); +static int iwn_init_otprom(struct iwn_softc *); +static int iwn_read_prom_data(struct iwn_softc *, uint32_t, void *, int); static void iwn_dma_map_addr(void *, bus_dma_segment_t *, int, int); static int iwn_dma_contig_alloc(struct iwn_softc *, struct iwn_dma_info *, void **, bus_size_t, bus_size_t, int); static void iwn_dma_contig_free(struct iwn_dma_info *); -int iwn_alloc_sched(struct iwn_softc *); -void iwn_free_sched(struct iwn_softc *); -int iwn_alloc_kw(struct iwn_softc *); -void iwn_free_kw(struct iwn_softc *); -int iwn_alloc_ict(struct iwn_softc *); -void iwn_free_ict(struct iwn_softc *); -int iwn_alloc_fwmem(struct iwn_softc *); -void iwn_free_fwmem(struct iwn_softc *); -int iwn_alloc_rx_ring(struct iwn_softc *, struct iwn_rx_ring *); -void iwn_reset_rx_ring(struct iwn_softc *, struct iwn_rx_ring *); -void iwn_free_rx_ring(struct iwn_softc *, struct iwn_rx_ring *); -int iwn_alloc_tx_ring(struct iwn_softc *, struct iwn_tx_ring *, +static int iwn_alloc_sched(struct iwn_softc *); +static void iwn_free_sched(struct iwn_softc *); +static int iwn_alloc_kw(struct iwn_softc *); +static void iwn_free_kw(struct iwn_softc *); +static int iwn_alloc_ict(struct iwn_softc *); +static void iwn_free_ict(struct iwn_softc *); +static int iwn_alloc_fwmem(struct iwn_softc *); +static void iwn_free_fwmem(struct iwn_softc *); +static int iwn_alloc_rx_ring(struct iwn_softc *, struct iwn_rx_ring *); +static void iwn_reset_rx_ring(struct iwn_softc *, struct iwn_rx_ring *); +static void iwn_free_rx_ring(struct iwn_softc *, struct iwn_rx_ring *); +static int iwn_alloc_tx_ring(struct iwn_softc *, struct iwn_tx_ring *, int); -void iwn_reset_tx_ring(struct iwn_softc *, struct iwn_tx_ring *); -void iwn_free_tx_ring(struct iwn_softc *, struct iwn_tx_ring *); -void iwn5000_ict_reset(struct iwn_softc *); -int iwn_read_eeprom(struct iwn_softc *, +static void iwn_reset_tx_ring(struct iwn_softc *, struct iwn_tx_ring *); +static void iwn_free_tx_ring(struct iwn_softc *, struct iwn_tx_ring *); +static void iwn5000_ict_reset(struct iwn_softc *); +static int iwn_read_eeprom(struct iwn_softc *, uint8_t macaddr[IEEE80211_ADDR_LEN]); -void iwn4965_read_eeprom(struct iwn_softc *); -void iwn4965_print_power_group(struct iwn_softc *, int); -void iwn5000_read_eeprom(struct iwn_softc *); +static void iwn4965_read_eeprom(struct iwn_softc *); +static void iwn4965_print_power_group(struct iwn_softc *, int); +static void iwn5000_read_eeprom(struct iwn_softc *); static uint32_t iwn_eeprom_channel_flags(struct iwn_eeprom_chan *); static void iwn_read_eeprom_band(struct iwn_softc *, int); #if 0 /* HT */ @@ -119,91 +119,91 @@ static void iwn_read_eeprom_ht40(struct #endif static void iwn_read_eeprom_channels(struct iwn_softc *, int, uint32_t); -void iwn_read_eeprom_enhinfo(struct iwn_softc *); -struct ieee80211_node *iwn_node_alloc(struct ieee80211vap *, +static void iwn_read_eeprom_enhinfo(struct iwn_softc *); +static struct ieee80211_node *iwn_node_alloc(struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN]); -void iwn_newassoc(struct ieee80211_node *, int); -int iwn_media_change(struct ifnet *); -int iwn_newstate(struct ieee80211vap *, enum ieee80211_state, int); -void iwn_rx_phy(struct iwn_softc *, struct iwn_rx_desc *, +static void iwn_newassoc(struct ieee80211_node *, int); +static int iwn_media_change(struct ifnet *); +static int iwn_newstate(struct ieee80211vap *, enum ieee80211_state, int); +static void iwn_rx_phy(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); static void iwn_timer_timeout(void *); static void iwn_calib_reset(struct iwn_softc *); -void iwn_rx_done(struct iwn_softc *, struct iwn_rx_desc *, +static void iwn_rx_done(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); #if 0 /* HT */ -void iwn_rx_compressed_ba(struct iwn_softc *, struct iwn_rx_desc *, +static void iwn_rx_compressed_ba(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); #endif -void iwn5000_rx_calib_results(struct iwn_softc *, +static void iwn5000_rx_calib_results(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); -void iwn_rx_statistics(struct iwn_softc *, struct iwn_rx_desc *, +static void iwn_rx_statistics(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); -void iwn4965_tx_done(struct iwn_softc *, struct iwn_rx_desc *, +static void iwn4965_tx_done(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); -void iwn5000_tx_done(struct iwn_softc *, struct iwn_rx_desc *, +static void iwn5000_tx_done(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); -void iwn_tx_done(struct iwn_softc *, struct iwn_rx_desc *, int, +static void iwn_tx_done(struct iwn_softc *, struct iwn_rx_desc *, int, uint8_t); -void iwn_cmd_done(struct iwn_softc *, struct iwn_rx_desc *); -void iwn_notif_intr(struct iwn_softc *); -void iwn_wakeup_intr(struct iwn_softc *); -void iwn_rftoggle_intr(struct iwn_softc *); -void iwn_fatal_intr(struct iwn_softc *); -void iwn_intr(void *); -void iwn4965_update_sched(struct iwn_softc *, int, int, uint8_t, +static void iwn_cmd_done(struct iwn_softc *, struct iwn_rx_desc *); +static void iwn_notif_intr(struct iwn_softc *); +static void iwn_wakeup_intr(struct iwn_softc *); +static void iwn_rftoggle_intr(struct iwn_softc *); +static void iwn_fatal_intr(struct iwn_softc *); +static void iwn_intr(void *); +static void iwn4965_update_sched(struct iwn_softc *, int, int, uint8_t, uint16_t); -void iwn5000_update_sched(struct iwn_softc *, int, int, uint8_t, +static void iwn5000_update_sched(struct iwn_softc *, int, int, uint8_t, uint16_t); #ifdef notyet -void iwn5000_reset_sched(struct iwn_softc *, int, int); +static void iwn5000_reset_sched(struct iwn_softc *, int, int); #endif static uint8_t iwn_plcp_signal(int); -int iwn_tx_data(struct iwn_softc *, struct mbuf *, +static int iwn_tx_data(struct iwn_softc *, struct mbuf *, struct ieee80211_node *, struct iwn_tx_ring *); static int iwn_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -void iwn_start(struct ifnet *); -void iwn_start_locked(struct ifnet *); +static void iwn_start(struct ifnet *); +static void iwn_start_locked(struct ifnet *); static void iwn_watchdog(struct iwn_softc *sc); -int iwn_ioctl(struct ifnet *, u_long, caddr_t); -int iwn_cmd(struct iwn_softc *, int, const void *, int, int); -int iwn4965_add_node(struct iwn_softc *, struct iwn_node_info *, +static int iwn_ioctl(struct ifnet *, u_long, caddr_t); +static int iwn_cmd(struct iwn_softc *, int, const void *, int, int); +static int iwn4965_add_node(struct iwn_softc *, struct iwn_node_info *, int); -int iwn5000_add_node(struct iwn_softc *, struct iwn_node_info *, +static int iwn5000_add_node(struct iwn_softc *, struct iwn_node_info *, int); -int iwn_set_link_quality(struct iwn_softc *, uint8_t, int); -int iwn_add_broadcast_node(struct iwn_softc *, int); -int iwn_wme_update(struct ieee80211com *); +static int iwn_set_link_quality(struct iwn_softc *, uint8_t, int); +static int iwn_add_broadcast_node(struct iwn_softc *, int); +static int iwn_wme_update(struct ieee80211com *); static void iwn_update_mcast(struct ifnet *); -void iwn_set_led(struct iwn_softc *, uint8_t, uint8_t, uint8_t); -int iwn_set_critical_temp(struct iwn_softc *); -int iwn_set_timing(struct iwn_softc *, struct ieee80211_node *); -void iwn4965_power_calibration(struct iwn_softc *, int); -int iwn4965_set_txpower(struct iwn_softc *, +static void iwn_set_led(struct iwn_softc *, uint8_t, uint8_t, uint8_t); +static int iwn_set_critical_temp(struct iwn_softc *); +static int iwn_set_timing(struct iwn_softc *, struct ieee80211_node *); +static void iwn4965_power_calibration(struct iwn_softc *, int); +static int iwn4965_set_txpower(struct iwn_softc *, struct ieee80211_channel *, int); -int iwn5000_set_txpower(struct iwn_softc *, +static int iwn5000_set_txpower(struct iwn_softc *, struct ieee80211_channel *, int); -int iwn4965_get_rssi(struct iwn_softc *, struct iwn_rx_stat *); -int iwn5000_get_rssi(struct iwn_softc *, struct iwn_rx_stat *); -int iwn_get_noise(const struct iwn_rx_general_stats *); -int iwn4965_get_temperature(struct iwn_softc *); -int iwn5000_get_temperature(struct iwn_softc *); -int iwn_init_sensitivity(struct iwn_softc *); -void iwn_collect_noise(struct iwn_softc *, +static int iwn4965_get_rssi(struct iwn_softc *, struct iwn_rx_stat *); +static int iwn5000_get_rssi(struct iwn_softc *, struct iwn_rx_stat *); +static int iwn_get_noise(const struct iwn_rx_general_stats *); +static int iwn4965_get_temperature(struct iwn_softc *); +static int iwn5000_get_temperature(struct iwn_softc *); +static int iwn_init_sensitivity(struct iwn_softc *); +static void iwn_collect_noise(struct iwn_softc *, const struct iwn_rx_general_stats *); -int iwn4965_init_gains(struct iwn_softc *); -int iwn5000_init_gains(struct iwn_softc *); -int iwn4965_set_gains(struct iwn_softc *); -int iwn5000_set_gains(struct iwn_softc *); -void iwn_tune_sensitivity(struct iwn_softc *, +static int iwn4965_init_gains(struct iwn_softc *); +static int iwn5000_init_gains(struct iwn_softc *); +static int iwn4965_set_gains(struct iwn_softc *); +static int iwn5000_set_gains(struct iwn_softc *); +static void iwn_tune_sensitivity(struct iwn_softc *, const struct iwn_rx_stats *); -int iwn_send_sensitivity(struct iwn_softc *); -int iwn_set_pslevel(struct iwn_softc *, int, int, int); -int iwn_config(struct iwn_softc *); -int iwn_scan(struct iwn_softc *); -int iwn_auth(struct iwn_softc *, struct ieee80211vap *vap); -int iwn_run(struct iwn_softc *, struct ieee80211vap *vap); +static int iwn_send_sensitivity(struct iwn_softc *); +static int iwn_set_pslevel(struct iwn_softc *, int, int, int); +static int iwn_config(struct iwn_softc *); +static int iwn_scan(struct iwn_softc *); +static int iwn_auth(struct iwn_softc *, struct ieee80211vap *vap); +static int iwn_run(struct iwn_softc *, struct ieee80211vap *vap); #if 0 /* HT */ static int iwn_ampdu_rx_start(struct ieee80211com *, struct ieee80211_node *, uint8_t); @@ -220,31 +220,31 @@ static void iwn5000_ampdu_tx_start(struc struct ieee80211_node *, uint8_t, uint16_t); static void iwn5000_ampdu_tx_stop(struct iwn_softc *, uint8_t, uint16_t); #endif -int iwn5000_query_calibration(struct iwn_softc *); -int iwn5000_send_calibration(struct iwn_softc *); -int iwn5000_send_wimax_coex(struct iwn_softc *); -int iwn4965_post_alive(struct iwn_softc *); -int iwn5000_post_alive(struct iwn_softc *); -int iwn4965_load_bootcode(struct iwn_softc *, const uint8_t *, +static int iwn5000_query_calibration(struct iwn_softc *); +static int iwn5000_send_calibration(struct iwn_softc *); +static int iwn5000_send_wimax_coex(struct iwn_softc *); +static int iwn4965_post_alive(struct iwn_softc *); +static int iwn5000_post_alive(struct iwn_softc *); +static int iwn4965_load_bootcode(struct iwn_softc *, const uint8_t *, int); -int iwn4965_load_firmware(struct iwn_softc *); -int iwn5000_load_firmware_section(struct iwn_softc *, uint32_t, +static int iwn4965_load_firmware(struct iwn_softc *); +static int iwn5000_load_firmware_section(struct iwn_softc *, uint32_t, const uint8_t *, int); -int iwn5000_load_firmware(struct iwn_softc *); -int iwn_read_firmware(struct iwn_softc *); -int iwn_clock_wait(struct iwn_softc *); -int iwn_apm_init(struct iwn_softc *); -void iwn_apm_stop_master(struct iwn_softc *); -void iwn_apm_stop(struct iwn_softc *); -int iwn4965_nic_config(struct iwn_softc *); -int iwn5000_nic_config(struct iwn_softc *); -int iwn_hw_prepare(struct iwn_softc *); -int iwn_hw_init(struct iwn_softc *); -void iwn_hw_stop(struct iwn_softc *); -void iwn_init_locked(struct iwn_softc *); -void iwn_init(void *); -void iwn_stop_locked(struct iwn_softc *); -void iwn_stop(struct iwn_softc *); +static int iwn5000_load_firmware(struct iwn_softc *); +static int iwn_read_firmware(struct iwn_softc *); +static int iwn_clock_wait(struct iwn_softc *); +static int iwn_apm_init(struct iwn_softc *); +static void iwn_apm_stop_master(struct iwn_softc *); +static void iwn_apm_stop(struct iwn_softc *); +static int iwn4965_nic_config(struct iwn_softc *); +static int iwn5000_nic_config(struct iwn_softc *); +static int iwn_hw_prepare(struct iwn_softc *); +static int iwn_hw_init(struct iwn_softc *); +static void iwn_hw_stop(struct iwn_softc *); +static void iwn_init_locked(struct iwn_softc *); +static void iwn_init(void *); +static void iwn_stop_locked(struct iwn_softc *); +static void iwn_stop(struct iwn_softc *); static void iwn_scan_start(struct ieee80211com *); static void iwn_scan_end(struct ieee80211com *); static void iwn_set_channel(struct ieee80211com *); @@ -673,7 +673,7 @@ fail: return error; } -const struct iwn_hal * +static const struct iwn_hal * iwn_hal_attach(struct iwn_softc *sc) { sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> 4) & 0xf; @@ -750,7 +750,7 @@ iwn_hal_attach(struct iwn_softc *sc) /* * Attach the interface to 802.11 radiotap. */ -void +static void iwn_radiotap_attach(struct iwn_softc *sc) { struct ifnet *ifp = sc->sc_ifp; @@ -802,7 +802,7 @@ iwn_vap_delete(struct ieee80211vap *vap) free(ivp, M_80211_VAP); } -int +static int iwn_cleanup(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); @@ -857,7 +857,7 @@ iwn_detach(device_t dev) return 0; } -int +static int iwn_nic_lock(struct iwn_softc *sc) { int ntries; @@ -963,7 +963,7 @@ iwn_mem_set_region_4(struct iwn_softc *s iwn_mem_write(sc, addr, val); } -int +static int iwn_eeprom_lock(struct iwn_softc *sc) { int i, ntries; @@ -994,7 +994,7 @@ iwn_eeprom_unlock(struct iwn_softc *sc) * Initialize access by host to One Time Programmable ROM. * NB: This kind of ROM can be found on 1000 or 6000 Series only. */ -int +static int iwn_init_otprom(struct iwn_softc *sc) { uint16_t prev, base, next; @@ -1048,7 +1048,7 @@ iwn_init_otprom(struct iwn_softc *sc) return 0; } -int +static int iwn_read_prom_data(struct iwn_softc *sc, uint32_t addr, void *data, int count) { uint32_t val, tmp; @@ -1140,7 +1140,7 @@ fail: return error; } -void +static void iwn_dma_contig_free(struct iwn_dma_info *dma) { if (dma->tag != NULL) { @@ -1156,7 +1156,7 @@ iwn_dma_contig_free(struct iwn_dma_info } } -int +static int iwn_alloc_sched(struct iwn_softc *sc) { /* TX scheduler rings must be aligned on a 1KB boundary. */ @@ -1164,13 +1164,13 @@ iwn_alloc_sched(struct iwn_softc *sc) (void **)&sc->sched, sc->sc_hal->schedsz, 1024, BUS_DMA_NOWAIT); } -void +static void iwn_free_sched(struct iwn_softc *sc) { iwn_dma_contig_free(&sc->sched_dma); } -int +static int iwn_alloc_kw(struct iwn_softc *sc) { /* "Keep Warm" page must be aligned on a 4KB boundary. */ @@ -1178,13 +1178,13 @@ iwn_alloc_kw(struct iwn_softc *sc) BUS_DMA_NOWAIT); } -void +static void iwn_free_kw(struct iwn_softc *sc) { iwn_dma_contig_free(&sc->kw_dma); } -int +static int iwn_alloc_ict(struct iwn_softc *sc) { /* ICT table must be aligned on a 4KB boundary. */ @@ -1192,13 +1192,13 @@ iwn_alloc_ict(struct iwn_softc *sc) (void **)&sc->ict, IWN_ICT_SIZE, 4096, BUS_DMA_NOWAIT); } -void +static void iwn_free_ict(struct iwn_softc *sc) { iwn_dma_contig_free(&sc->ict_dma); } -int +static int iwn_alloc_fwmem(struct iwn_softc *sc) { /* Must be aligned on a 16-byte boundary. */ @@ -1206,13 +1206,13 @@ iwn_alloc_fwmem(struct iwn_softc *sc) sc->sc_hal->fwsz, 16, BUS_DMA_NOWAIT); } -void +static void iwn_free_fwmem(struct iwn_softc *sc) { iwn_dma_contig_free(&sc->fw_dma); } -int +static int iwn_alloc_rx_ring(struct iwn_softc *sc, struct iwn_rx_ring *ring) { bus_size_t size; @@ -1302,7 +1302,7 @@ fail: return error; } -void +static void iwn_reset_rx_ring(struct iwn_softc *sc, struct iwn_rx_ring *ring) { int ntries; @@ -1326,7 +1326,7 @@ iwn_reset_rx_ring(struct iwn_softc *sc, sc->last_rx_valid = 0; } -void +static void iwn_free_rx_ring(struct iwn_softc *sc, struct iwn_rx_ring *ring) { int i; @@ -1348,7 +1348,7 @@ iwn_free_rx_ring(struct iwn_softc *sc, s } } -int +static int iwn_alloc_tx_ring(struct iwn_softc *sc, struct iwn_tx_ring *ring, int qid) { bus_size_t size; @@ -1422,7 +1422,7 @@ fail: return error; } -void +static void iwn_reset_tx_ring(struct iwn_softc *sc, struct iwn_tx_ring *ring) { int i; @@ -1445,7 +1445,7 @@ iwn_reset_tx_ring(struct iwn_softc *sc, ring->cur = 0; } -void +static void iwn_free_tx_ring(struct iwn_softc *sc, struct iwn_tx_ring *ring) { int i; @@ -1467,7 +1467,7 @@ iwn_free_tx_ring(struct iwn_softc *sc, s } } -void +static void iwn5000_ict_reset(struct iwn_softc *sc) { /* Disable interrupts. */ @@ -1492,7 +1492,7 @@ iwn5000_ict_reset(struct iwn_softc *sc) IWN_WRITE(sc, IWN_INT_MASK, sc->int_mask); } -int +static int iwn_read_eeprom(struct iwn_softc *sc, uint8_t macaddr[IEEE80211_ADDR_LEN]) { const struct iwn_hal *hal = sc->sc_hal; @@ -1553,7 +1553,7 @@ iwn_read_eeprom(struct iwn_softc *sc, ui return 0; } -void +static void iwn4965_read_eeprom(struct iwn_softc *sc) { uint32_t addr; @@ -1601,7 +1601,7 @@ iwn4965_read_eeprom(struct iwn_softc *sc } #ifdef IWN_DEBUG -void +static void iwn4965_print_power_group(struct iwn_softc *sc, int i) { struct iwn4965_eeprom_band *band = &sc->bands[i]; @@ -1635,7 +1635,7 @@ iwn4965_print_power_group(struct iwn_sof } #endif -void +static void iwn5000_read_eeprom(struct iwn_softc *sc) { struct iwn5000_eeprom_calib_hdr hdr; @@ -1847,7 +1847,7 @@ iwn_read_eeprom_channels(struct iwn_soft #define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) -void +static void iwn_read_eeprom_enhinfo(struct iwn_softc *sc) { struct iwn_eeprom_enhinfo enhinfo[35]; @@ -1884,20 +1884,20 @@ iwn_read_eeprom_enhinfo(struct iwn_softc } } -struct ieee80211_node * +static struct ieee80211_node * iwn_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { return malloc(sizeof (struct iwn_node), M_80211_NODE,M_NOWAIT | M_ZERO); } -void +static void iwn_newassoc(struct ieee80211_node *ni, int isnew) { /* XXX move */ ieee80211_ratectl_node_init(ni); } -int +static int iwn_media_change(struct ifnet *ifp) { int error = ieee80211_media_change(ifp); @@ -1905,7 +1905,7 @@ iwn_media_change(struct ifnet *ifp) return (error == ENETRESET ? 0 : error); } -int +static int iwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct iwn_vap *ivp = IWN_VAP(vap); @@ -1952,7 +1952,7 @@ iwn_newstate(struct ieee80211vap *vap, e * Process an RX_PHY firmware notification. This is usually immediately * followed by an MPDU_RX_DONE notification. */ -void +static void iwn_rx_phy(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -1996,7 +1996,7 @@ iwn_calib_reset(struct iwn_softc *sc) * Process an RX_DONE (4965AGN only) or MPDU_RX_DONE firmware notification. * Each MPDU_RX_DONE notification must be preceded by an RX_PHY one. */ -void +static void iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -2146,7 +2146,7 @@ iwn_rx_done(struct iwn_softc *sc, struct #if 0 /* HT */ /* Process an incoming Compressed BlockAck. */ -void +static void iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -2162,7 +2162,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s * Process a CALIBRATION_RESULT notification sent by the initialization * firmware on response to a CMD_CALIB_CONFIG command (5000 only.) */ -void +static void iwn5000_rx_calib_results(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -2220,7 +2220,7 @@ iwn5000_rx_calib_results(struct iwn_soft * Process an RX_STATISTICS or BEACON_STATISTICS firmware notification. * The latter is sent by the firmware after each received beacon. */ -void +static void iwn_rx_statistics(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -2277,7 +2277,7 @@ iwn_rx_statistics(struct iwn_softc *sc, * Process a TX_DONE firmware notification. Unfortunately, the 4965AGN * and 5000 adapters have different incompatible TX status formats. */ -void +static void iwn4965_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -2293,7 +2293,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st iwn_tx_done(sc, desc, stat->ackfailcnt, le32toh(stat->status) & 0xff); } -void +static void iwn5000_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { @@ -2317,7 +2317,7 @@ iwn5000_tx_done(struct iwn_softc *sc, st /* * Adapter-independent backend for TX_DONE firmware notifications. */ -void +static void iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt, uint8_t status) { @@ -2389,7 +2389,7 @@ iwn_tx_done(struct iwn_softc *sc, struct * Process a "command done" firmware notification. This is where we wakeup * processes waiting for a synchronous command completion. */ -void +static void iwn_cmd_done(struct iwn_softc *sc, struct iwn_rx_desc *desc) { struct iwn_tx_ring *ring = &sc->txq[4]; @@ -2412,7 +2412,7 @@ iwn_cmd_done(struct iwn_softc *sc, struc /* * Process an INT_FH_RX or INT_SW_RX interrupt. */ -void +static void iwn_notif_intr(struct iwn_softc *sc) { struct ifnet *ifp = sc->sc_ifp; @@ -2590,7 +2590,7 @@ iwn_notif_intr(struct iwn_softc *sc) * Process an INT_WAKEUP interrupt raised when the microcontroller wakes up * from power-down sleep mode. */ -void +static void iwn_wakeup_intr(struct iwn_softc *sc) { int qid; @@ -2606,7 +2606,7 @@ iwn_wakeup_intr(struct iwn_softc *sc) } } -void +static void iwn_rftoggle_intr(struct iwn_softc *sc) { struct ifnet *ifp = sc->sc_ifp; @@ -2628,7 +2628,7 @@ iwn_rftoggle_intr(struct iwn_softc *sc) * we can't debug the firmware because it is neither open source nor free, it * can help us to identify certain classes of problems. */ -void +static void iwn_fatal_intr(struct iwn_softc *sc) { const struct iwn_hal *hal = sc->sc_hal; @@ -2688,7 +2688,7 @@ iwn_fatal_intr(struct iwn_softc *sc) printf(" rx ring: cur=%d\n", sc->rxq.cur); } -void +static void iwn_intr(void *arg) { struct iwn_softc *sc = arg; @@ -2786,7 +2786,7 @@ done: * Update TX scheduler ring when transmitting an 802.11 frame (4965AGN and * 5000 adapters use a slightly different format.) */ -void +static void iwn4965_update_sched(struct iwn_softc *sc, int qid, int idx, uint8_t id, uint16_t len) { @@ -2802,7 +2802,7 @@ iwn4965_update_sched(struct iwn_softc *s } } -void +static void iwn5000_update_sched(struct iwn_softc *sc, int qid, int idx, uint8_t id, uint16_t len) { @@ -2820,7 +2820,7 @@ iwn5000_update_sched(struct iwn_softc *s } #ifdef notyet -void +static void iwn5000_reset_sched(struct iwn_softc *sc, int qid, int idx) { uint16_t *w = &sc->sched[qid * IWN5000_SCHED_COUNT + idx]; @@ -2848,7 +2848,7 @@ iwn_plcp_signal(int rate) { return 0; } -int +static int iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni, struct iwn_tx_ring *ring) { @@ -3326,7 +3326,7 @@ iwn_raw_xmit(struct ieee80211_node *ni, return error; } -void +static void iwn_start(struct ifnet *ifp) { struct iwn_softc *sc = ifp->if_softc; @@ -3336,7 +3336,7 @@ iwn_start(struct ifnet *ifp) IWN_UNLOCK(sc); } -void +static void iwn_start_locked(struct ifnet *ifp) { struct iwn_softc *sc = ifp->if_softc; @@ -3379,7 +3379,7 @@ iwn_watchdog(struct iwn_softc *sc) } } -int +static int iwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct iwn_softc *sc = ifp->if_softc; @@ -3425,7 +3425,7 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd, /* * Send a command to the firmware. */ -int +static int iwn_cmd(struct iwn_softc *sc, int code, const void *buf, int size, int async) { struct iwn_tx_ring *ring = &sc->txq[4]; @@ -3498,7 +3498,7 @@ iwn_cmd(struct iwn_softc *sc, int code, return async ? 0 : msleep(desc, &sc->sc_mtx, PCATCH, "iwncmd", hz); } -int +static int iwn4965_add_node(struct iwn_softc *sc, struct iwn_node_info *node, int async) { struct iwn4965_node_info hnode; @@ -3517,7 +3517,7 @@ iwn4965_add_node(struct iwn_softc *sc, s return iwn_cmd(sc, IWN_CMD_ADD_NODE, &hnode, sizeof hnode, async); } -int +static int iwn5000_add_node(struct iwn_softc *sc, struct iwn_node_info *node, int async) { /* Direct mapping. */ @@ -3548,7 +3548,7 @@ static const uint8_t iwn_prev_ridx[] = { * Configure hardware link parameters for the specified * node operating on the specified channel. */ -int +static int iwn_set_link_quality(struct iwn_softc *sc, uint8_t id, int async) { struct ifnet *ifp = sc->sc_ifp; @@ -3621,7 +3621,7 @@ iwn_set_link_quality(struct iwn_softc *s /* * Broadcast node is used to send group-addressed and management frames. */ -int +static int iwn_add_broadcast_node(struct iwn_softc *sc, int async) { const struct iwn_hal *hal = sc->sc_hal; @@ -3641,7 +3641,7 @@ iwn_add_broadcast_node(struct iwn_softc return error; } -int +static int iwn_wme_update(struct ieee80211com *ic) { #define IWN_EXP2(x) ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */ @@ -3677,7 +3677,7 @@ iwn_update_mcast(struct ifnet *ifp) /* Ignore */ } -void +static void iwn_set_led(struct iwn_softc *sc, uint8_t which, uint8_t off, uint8_t on) { struct iwn_cmd_led led; @@ -3696,7 +3696,7 @@ iwn_set_led(struct iwn_softc *sc, uint8_ * Set the critical temperature at which the firmware will stop the radio * and notify us. */ -int +static int iwn_set_critical_temp(struct iwn_softc *sc) { struct iwn_critical_temp crit; @@ -3717,7 +3717,7 @@ iwn_set_critical_temp(struct iwn_softc * return iwn_cmd(sc, IWN_CMD_SET_CRITICAL_TEMP, &crit, sizeof crit, 0); } -int +static int iwn_set_timing(struct iwn_softc *sc, struct ieee80211_node *ni) { struct iwn_cmd_timing cmd; @@ -3739,7 +3739,7 @@ iwn_set_timing(struct iwn_softc *sc, str return iwn_cmd(sc, IWN_CMD_TIMING, &cmd, sizeof cmd, 1); } -void +static void iwn4965_power_calibration(struct iwn_softc *sc, int temp) { struct ifnet *ifp = sc->sc_ifp; @@ -3760,7 +3760,7 @@ iwn4965_power_calibration(struct iwn_sof * This function takes into account the regulatory information from EEPROM, * the current temperature and the current voltage. */ -int +static int iwn4965_set_txpower(struct iwn_softc *sc, struct ieee80211_channel *ch, int async) { @@ -3912,7 +3912,7 @@ iwn4965_set_txpower(struct iwn_softc *sc #undef fdivround } -int +static int iwn5000_set_txpower(struct iwn_softc *sc, struct ieee80211_channel *ch, int async) { @@ -3933,7 +3933,7 @@ iwn5000_set_txpower(struct iwn_softc *sc /* * Retrieve the maximum RSSI (in dBm) among receivers. */ -int +static int iwn4965_get_rssi(struct iwn_softc *sc, struct iwn_rx_stat *stat) { struct iwn4965_rx_phystat *phy = (void *)stat->phybuf; @@ -3964,7 +3964,7 @@ iwn4965_get_rssi(struct iwn_softc *sc, s return rssi - agc - IWN_RSSI_TO_DBM; } -int +static int iwn5000_get_rssi(struct iwn_softc *sc, struct iwn_rx_stat *stat) { struct iwn5000_rx_phystat *phy = (void *)stat->phybuf; @@ -3987,7 +3987,7 @@ iwn5000_get_rssi(struct iwn_softc *sc, s /* * Retrieve the average noise (in dBm) among receivers. */ -int +static int iwn_get_noise(const struct iwn_rx_general_stats *stats) { int i, total, nbant, noise; @@ -4006,7 +4006,7 @@ iwn_get_noise(const struct iwn_rx_genera /* * Compute temperature (in degC) from last received statistics. */ -int +static int iwn4965_get_temperature(struct iwn_softc *sc) { struct iwn_ucode_info *uc = &sc->ucode_info; @@ -4031,7 +4031,7 @@ iwn4965_get_temperature(struct iwn_softc return IWN_KTOC(temp); } -int +static int iwn5000_get_temperature(struct iwn_softc *sc) { int32_t temp; @@ -4052,7 +4052,7 @@ iwn5000_get_temperature(struct iwn_softc /* * Initialize sensitivity calibration state machine. */ -int +static int iwn_init_sensitivity(struct iwn_softc *sc) { const struct iwn_hal *hal = sc->sc_hal; @@ -4094,7 +4094,7 @@ iwn_init_sensitivity(struct iwn_softc *s * after association and use them to determine connected antennas and * to set differential gains. */ -void +static void iwn_collect_noise(struct iwn_softc *sc, const struct iwn_rx_general_stats *stats) { @@ -4142,7 +4142,7 @@ iwn_collect_noise(struct iwn_softc *sc, #endif } -int +static int iwn4965_init_gains(struct iwn_softc *sc) { struct iwn_phy_calib_gain cmd; @@ -4155,7 +4155,7 @@ iwn4965_init_gains(struct iwn_softc *sc) return iwn_cmd(sc, IWN_CMD_PHY_CALIB, &cmd, sizeof cmd, 1); } -int +static int iwn5000_init_gains(struct iwn_softc *sc) { struct iwn_phy_calib cmd; @@ -4169,7 +4169,7 @@ iwn5000_init_gains(struct iwn_softc *sc) return iwn_cmd(sc, IWN_CMD_PHY_CALIB, &cmd, sizeof cmd, 1); } -int +static int iwn4965_set_gains(struct iwn_softc *sc) { struct iwn_calib_state *calib = &sc->calib; @@ -4202,7 +4202,7 @@ iwn4965_set_gains(struct iwn_softc *sc) return iwn_cmd(sc, IWN_CMD_PHY_CALIB, &cmd, sizeof cmd, 1); } -int +static int iwn5000_set_gains(struct iwn_softc *sc) { struct iwn_calib_state *calib = &sc->calib; @@ -4240,7 +4240,7 @@ iwn5000_set_gains(struct iwn_softc *sc) * Tune RF RX sensitivity based on the number of false alarms detected * during the last beacon period. */ -void +static void iwn_tune_sensitivity(struct iwn_softc *sc, const struct iwn_rx_stats *stats) { #define inc(val, inc, max) \ @@ -4392,7 +4392,7 @@ iwn_tune_sensitivity(struct iwn_softc *s #undef inc } -int +static int iwn_send_sensitivity(struct iwn_softc *sc) { struct iwn_calib_state *calib = &sc->calib; @@ -4427,7 +4427,7 @@ iwn_send_sensitivity(struct iwn_softc *s * Set STA mode power saving level (between 0 and 5). * Level 0 is CAM (Continuously Aware Mode), 5 is for maximum power saving. */ -int +static int iwn_set_pslevel(struct iwn_softc *sc, int dtim, int level, int async) { const struct iwn_pmgt *pmgt; @@ -4478,7 +4478,7 @@ iwn_set_pslevel(struct iwn_softc *sc, in return iwn_cmd(sc, IWN_CMD_SET_POWER_MODE, &cmd, sizeof cmd, async); } -int +static int iwn_config(struct iwn_softc *sc) { const struct iwn_hal *hal = sc->sc_hal; @@ -4591,7 +4591,7 @@ iwn_config(struct iwn_softc *sc) return 0; } -int +static int iwn_scan(struct iwn_softc *sc) { struct ifnet *ifp = sc->sc_ifp; @@ -4762,7 +4762,7 @@ iwn_scan(struct iwn_softc *sc) return error; } -int +static int iwn_auth(struct iwn_softc *sc, struct ieee80211vap *vap) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 15:17:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5337E106566C; Sun, 11 Apr 2010 15:17:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 432408FC0A; Sun, 11 Apr 2010 15:17: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 o3BFHrlB034206; Sun, 11 Apr 2010 15:17:53 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BFHrAU034204; Sun, 11 Apr 2010 15:17:53 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004111517.o3BFHrAU034204@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 11 Apr 2010 15:17: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: r206478 - stable/8/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 15:17:53 -0000 Author: ume Date: Sun Apr 11 15:17:52 2010 New Revision: 206478 URL: http://svn.freebsd.org/changeset/base/206478 Log: MFC r206266: Set net.inet6.ip6.fw.enable as well. Modified: stable/8/sbin/ipfw/ipfw2.c Directory Properties: stable/8/sbin/ipfw/ (props changed) Modified: stable/8/sbin/ipfw/ipfw2.c ============================================================================== --- stable/8/sbin/ipfw/ipfw2.c Sun Apr 11 13:51:20 2010 (r206477) +++ stable/8/sbin/ipfw/ipfw2.c Sun Apr 11 15:17:52 2010 (r206478) @@ -1740,6 +1740,8 @@ ipfw_sysctl_handler(char *av[], int whic } else if (_substrcmp(*av, "firewall") == 0) { sysctlbyname("net.inet.ip.fw.enable", NULL, 0, &which, sizeof(which)); + sysctlbyname("net.inet6.ip6.fw.enable", NULL, 0, + &which, sizeof(which)); } else if (_substrcmp(*av, "one_pass") == 0) { sysctlbyname("net.inet.ip.fw.one_pass", NULL, 0, &which, sizeof(which)); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 15:31:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6A871065672; Sun, 11 Apr 2010 15:31:09 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A740E8FC0A; Sun, 11 Apr 2010 15:31: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 o3BFV9su037165; Sun, 11 Apr 2010 15:31:09 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BFV9mH037163; Sun, 11 Apr 2010 15:31:09 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004111531.o3BFV9mH037163@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 11 Apr 2010 15:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206479 - 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: Sun, 11 Apr 2010 15:31:09 -0000 Author: ume Date: Sun Apr 11 15:31:09 2010 New Revision: 206479 URL: http://svn.freebsd.org/changeset/base/206479 Log: Fix grammar in comment. Submitted by: "b. f." MFC after: 3 days Modified: head/etc/rc.firewall Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Sun Apr 11 15:17:52 2010 (r206478) +++ head/etc/rc.firewall Sun Apr 11 15:31:09 2010 (r206479) @@ -425,11 +425,11 @@ case ${firewall_type} in # firewall_myservices: List of TCP ports on which this host # offers services. # firewall_allowservices: List of IPv4 and/or IPv6 addresses - # which has access to + # that have access to # $firewall_myservices. # firewall_trusted: List of IPv4 and/or IPv6 addresses - # which has full access to this host. - # Be very carefull when setting this. + # that have full access to this host. + # Be very careful when setting this. # This option can seriously degrade # the level of protection provided by # the firewall. From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 15:35:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8419C106564A; Sun, 11 Apr 2010 15:35:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7456B8FC0A; Sun, 11 Apr 2010 15:35: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 o3BFZIXj038129; Sun, 11 Apr 2010 15:35:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BFZIs8038127; Sun, 11 Apr 2010 15:35:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004111535.o3BFZIs8038127@svn.freebsd.org> From: Marius Strobl Date: Sun, 11 Apr 2010 15:35: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: r206480 - head/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, 11 Apr 2010 15:35:18 -0000 Author: marius Date: Sun Apr 11 15:35:17 2010 New Revision: 206480 URL: http://svn.freebsd.org/changeset/base/206480 Log: Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs. Modified: head/sys/sparc64/include/lsu.h Modified: head/sys/sparc64/include/lsu.h ============================================================================== --- head/sys/sparc64/include/lsu.h Sun Apr 11 15:31:09 2010 (r206479) +++ head/sys/sparc64/include/lsu.h Sun Apr 11 15:35:17 2010 (r206480) @@ -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 Apr 11 16:04:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBE4A106564A; Sun, 11 Apr 2010 16:04:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB90D8FC08; Sun, 11 Apr 2010 16:04: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 o3BG48Hx044437; Sun, 11 Apr 2010 16:04:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BG48rI044430; Sun, 11 Apr 2010 16:04:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004111604.o3BG48rI044430@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 11 Apr 2010 16:04: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: r206481 - in head/sys: net 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, 11 Apr 2010 16:04:09 -0000 Author: bz Date: Sun Apr 11 16:04:08 2010 New Revision: 206481 URL: http://svn.freebsd.org/changeset/base/206481 Log: Plug reference leaks in the link-layer code ("new-arp") that previously prevented the link-layer entry from being freed. In both in.c and in6.c (though that code path seems to be basically dead) plug a reference leak in case of a pending callout being drained. In if_ether.c consistently add a reference before resetting the callout and in case we canceled a pending one remove the reference for that. In the final case in arptimer, before freeing the expired entry, remove the reference again and explicitly call callout_stop() to clear the active flag. In nd6.c:nd6_free() we are only ever called from the callout function and thus need to remove the reference there as well before calling into llentry_free(). In if_llatbl.c when freeing entire tables make sure that in case we cancel a pending callout to remove the reference as well. Reviewed by: qingli (earlier version) MFC after: 10 days Problem observed, patch tested by: simon on ipv6gw.f.o, Christian Kratzer (ck cksoft.de), Evgenii Davidov (dado korolev-net.ru) PR: kern/144564 Configurations still affected: with options FLOWTABLE Modified: head/sys/net/if_llatbl.c head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet6/in6.c head/sys/netinet6/nd6.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sun Apr 11 15:35:17 2010 (r206480) +++ head/sys/net/if_llatbl.c Sun Apr 11 16:04:08 2010 (r206481) @@ -170,9 +170,12 @@ lltable_free(struct lltable *llt) for (i=0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { + int canceled; - callout_drain(&lle->la_timer); + canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); + if (canceled) + LLE_REMREF(lle); llentry_free(lle); } } Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Apr 11 15:35:17 2010 (r206480) +++ head/sys/netinet/if_ether.c Sun Apr 11 16:04:08 2010 (r206481) @@ -180,6 +180,8 @@ arptimer(void *arg) else { if (!callout_pending(&lle->la_timer) && callout_active(&lle->la_timer)) { + callout_stop(&lle->la_timer); + LLE_REMREF(lle); (void) llentry_free(lle); ARPSTAT_INC(timeouts); } @@ -382,9 +384,14 @@ retry: EHOSTUNREACH : EHOSTDOWN; if (renew) { + int canceled; + LLE_ADDREF(la); la->la_expire = time_second + V_arpt_down; - callout_reset(&la->la_timer, hz * V_arpt_down, arptimer, la); + canceled = callout_reset(&la->la_timer, hz * V_arpt_down, + arptimer, la); + if (canceled) + LLE_REMREF(la); la->la_asked++; LLE_WUNLOCK(la); arprequest(ifp, NULL, &SIN(dst)->sin_addr, @@ -696,9 +703,14 @@ match: EVENTHANDLER_INVOKE(arp_update_event, la); if (!(la->la_flags & LLE_STATIC)) { + int canceled; + + LLE_ADDREF(la); la->la_expire = time_second + V_arpt_keep; - callout_reset(&la->la_timer, hz * V_arpt_keep, - arptimer, la); + canceled = callout_reset(&la->la_timer, + hz * V_arpt_keep, arptimer, la); + if (canceled) + LLE_REMREF(la); } la->la_asked = 0; la->la_preempt = V_arp_maxtries; Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Apr 11 15:35:17 2010 (r206480) +++ head/sys/netinet/in.c Sun Apr 11 16:04:08 2010 (r206481) @@ -1357,8 +1357,12 @@ in_lltable_prefix_free(struct lltable *l if (IN_ARE_MASKED_ADDR_EQUAL((struct sockaddr_in *)L3_ADDR(lle), pfx, msk)) { - callout_drain(&lle->la_timer); + int canceled; + + canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); + if (canceled) + LLE_REMREF(lle); llentry_free(lle); } } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sun Apr 11 15:35:17 2010 (r206480) +++ head/sys/netinet6/in6.c Sun Apr 11 16:04:08 2010 (r206481) @@ -2344,8 +2344,12 @@ in6_lltable_prefix_free(struct lltable * &((struct sockaddr_in6 *)L3_ADDR(lle))->sin6_addr, &pfx->sin6_addr, &msk->sin6_addr)) { - callout_drain(&lle->la_timer); + int canceled; + + canceled = callout_drain(&lle->la_timer); LLE_WLOCK(lle); + if (canceled) + LLE_REMREF(lle); llentry_free(lle); } } Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Apr 11 15:35:17 2010 (r206480) +++ head/sys/netinet6/nd6.c Sun Apr 11 16:04:08 2010 (r206481) @@ -1125,6 +1125,7 @@ nd6_free(struct llentry *ln, int gc) ifp = ln->lle_tbl->llt_ifp; IF_AFDATA_LOCK(ifp); LLE_WLOCK(ln); + LLE_REMREF(ln); llentry_free(ln); IF_AFDATA_UNLOCK(ifp); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 16:06:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 952DE106566B; Sun, 11 Apr 2010 16:06:09 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 856F68FC14; Sun, 11 Apr 2010 16:06: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 o3BG691T044931; Sun, 11 Apr 2010 16:06:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BG69Zd044929; Sun, 11 Apr 2010 16:06:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201004111606.o3BG69Zd044929@svn.freebsd.org> From: Attilio Rao Date: Sun, 11 Apr 2010 16:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206482 - 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, 11 Apr 2010 16:06:09 -0000 Author: attilio Date: Sun Apr 11 16:06:09 2010 New Revision: 206482 URL: http://svn.freebsd.org/changeset/base/206482 Log: - Introduce a blessed list for sxlocks that prevents the deadlkres to panic on those ones. [0] - Fix ticks counter wrap-up Sponsored by: Sandvine Incorporated [0] Reported by: jilles [0] Tested by: jilles MFC: 1 week Modified: head/sys/kern/kern_clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Sun Apr 11 16:04:08 2010 (r206481) +++ head/sys/kern/kern_clock.c Sun Apr 11 16:06:09 2010 (r206482) @@ -162,6 +162,11 @@ SYSCTL_PROC(_kern, OID_AUTO, cp_times, C 0,0, sysctl_kern_cp_times, "LU", "per-CPU time statistics"); #ifdef DEADLKRES +static const char *blessed[] = { + "so_snd_sx", + "so_rcv_sx", + NULL +}; static int slptime_threshold = 1800; static int blktime_threshold = 900; static int sleepfreq = 3; @@ -172,7 +177,7 @@ deadlkres(void) struct proc *p; struct thread *td; void *wchan; - int blkticks, slpticks, slptype, tryl, tticks; + int blkticks, i, slpticks, slptype, tryl, tticks; tryl = 0; for (;;) { @@ -205,6 +210,10 @@ deadlkres(void) * turnstile channel is in good state. */ MPASS(td->td_blocked != NULL); + + /* Handle ticks wrap-up. */ + if (ticks < td->td_blktick) + continue; tticks = ticks - td->td_blktick; thread_unlock(td); if (tticks > blkticks) { @@ -222,6 +231,10 @@ deadlkres(void) } } else if (TD_IS_SLEEPING(td)) { + /* Handle ticks wrap-up. */ + if (ticks < td->td_blktick) + continue; + /* * Check if the thread is sleeping on a * lock, otherwise skip the check. @@ -242,7 +255,24 @@ deadlkres(void) * thresholds, this thread is * stuck for too long on a * sleepqueue. + * However, being on a + * sleepqueue, we might still + * check for the blessed + * list. */ + tryl = 0; + for (i = 0; blessed[i] != NULL; + i++) { + if (!strcmp(blessed[i], + td->td_wmesg)) { + tryl = 1; + break; + } + } + if (tryl != 0) { + tryl = 0; + continue; + } PROC_UNLOCK(p); sx_sunlock(&allproc_lock); panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 16:20:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EACD7106566C; Sun, 11 Apr 2010 16:20:22 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-relay2.uni-muenster.de (ZIVM-RELAY2.UNI-MUENSTER.DE [128.176.192.13]) by mx1.freebsd.org (Postfix) with ESMTP id 54EE18FC0C; Sun, 11 Apr 2010 16:20:21 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.52,185,1270418400"; d="scan'208";a="241506458" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 11 Apr 2010 18:20:20 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 2FF081B0769; Sun, 11 Apr 2010 18:20:20 +0200 (CEST) Date: Sun, 11 Apr 2010 18:20:19 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Tim Kientzle Message-ID: 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 Subject: Re: svn commit: r206466 - 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: Sun, 11 Apr 2010 16:20:23 -0000 does this commit fix bin/144786 entirely? cheers. -- Alexander Best From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 16:26:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56187106566B; Sun, 11 Apr 2010 16:26:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45A7F8FC20; Sun, 11 Apr 2010 16:26: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 o3BGQ89T049336; Sun, 11 Apr 2010 16:26:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BGQ8Ah049332; Sun, 11 Apr 2010 16:26:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004111626.o3BGQ8Ah049332@svn.freebsd.org> From: Alan Cox Date: Sun, 11 Apr 2010 16:26: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: r206483 - in head/sys: 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, 11 Apr 2010 16:26:08 -0000 Author: alc Date: Sun Apr 11 16:26:07 2010 New Revision: 206483 URL: http://svn.freebsd.org/changeset/base/206483 Log: Initialize the virtual memory-related resource limits in a single place. Previously, one of these limits was initialized in two places to a different value in each place. Moreover, because an unsigned int was used to represent the amount of pageable physical memory, some of these limits were incorrectly initialized on 64-bit architectures. (Currently, this error is masked by login.conf's default settings.) Make vm_thread_swapin() and vm_thread_swapout() static. Submitted by: bde (an earlier version) Reviewed by: kib Modified: head/sys/kern/init_main.c head/sys/vm/vm_extern.h head/sys/vm/vm_glue.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sun Apr 11 16:06:09 2010 (r206482) +++ head/sys/kern/init_main.c Sun Apr 11 16:26:07 2010 (r206483) @@ -382,8 +382,9 @@ static void proc0_init(void *dummy __unused) { struct proc *p; - unsigned i; struct thread *td; + vm_paddr_t pageablemem; + int i; GIANT_REQUIRED; p = &proc0; @@ -493,10 +494,16 @@ proc0_init(void *dummy __unused) p->p_limit->pl_rlimit[RLIMIT_NOFILE].rlim_max = maxfiles; p->p_limit->pl_rlimit[RLIMIT_NPROC].rlim_cur = p->p_limit->pl_rlimit[RLIMIT_NPROC].rlim_max = maxproc; - i = ptoa(cnt.v_free_count); - p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_max = i; - p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = i; - p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = i / 3; + p->p_limit->pl_rlimit[RLIMIT_DATA].rlim_cur = dfldsiz; + p->p_limit->pl_rlimit[RLIMIT_DATA].rlim_max = maxdsiz; + p->p_limit->pl_rlimit[RLIMIT_STACK].rlim_cur = dflssiz; + p->p_limit->pl_rlimit[RLIMIT_STACK].rlim_max = maxssiz; + /* Cast to avoid overflow on i386/PAE. */ + pageablemem = ptoa((vm_paddr_t)cnt.v_free_count); + p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_cur = + p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_max = pageablemem; + p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = pageablemem / 3; + p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = pageablemem; p->p_cpulimit = RLIM_INFINITY; p->p_stats = pstats_alloc(); Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Sun Apr 11 16:06:09 2010 (r206482) +++ head/sys/vm/vm_extern.h Sun Apr 11 16:26:07 2010 (r206483) @@ -84,7 +84,5 @@ struct sf_buf *vm_imgact_map_page(vm_obj void vm_imgact_unmap_page(struct sf_buf *sf); void vm_thread_dispose(struct thread *td); int vm_thread_new(struct thread *td, int pages); -void vm_thread_swapin(struct thread *td); -void vm_thread_swapout(struct thread *td); #endif /* _KERNEL */ #endif /* !_VM_EXTERN_H_ */ Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Sun Apr 11 16:06:09 2010 (r206482) +++ head/sys/vm/vm_glue.c Sun Apr 11 16:26:07 2010 (r206483) @@ -99,12 +99,6 @@ extern int maxslp; /* * System initialization * - * Note: proc0 from proc.h - */ -static void vm_init_limits(void *); -SYSINIT(vm_limits, SI_SUB_VM_CONF, SI_ORDER_FIRST, vm_init_limits, &proc0); - -/* * THIS MUST BE THE LAST INITIALIZATION ITEM!!! * * Note: run scheduling should be divorced from the vm system. @@ -115,6 +109,8 @@ SYSINIT(scheduler, SI_SUB_RUN_SCHEDULER, #ifndef NO_SWAPPING static int swapout(struct proc *); static void swapclear(struct proc *); +static void vm_thread_swapin(struct thread *td); +static void vm_thread_swapout(struct thread *td); #endif /* @@ -498,10 +494,11 @@ kstack_cache_init(void *nulll) MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); +#ifndef NO_SWAPPING /* * Allow a thread's kernel stack to be paged out. */ -void +static void vm_thread_swapout(struct thread *td) { vm_object_t ksobj; @@ -528,7 +525,7 @@ vm_thread_swapout(struct thread *td) /* * Bring the kernel stack for a specified thread back in. */ -void +static void vm_thread_swapin(struct thread *td) { vm_object_t ksobj; @@ -556,6 +553,7 @@ vm_thread_swapin(struct thread *td) pmap_qenter(td->td_kstack, ma, pages); cpu_thread_swapin(td); } +#endif /* !NO_SWAPPING */ /* * Implement fork's actions on an address space. @@ -629,38 +627,6 @@ vm_waitproc(p) vmspace_exitfree(p); /* and clean-out the vmspace */ } -/* - * Set default limits for VM system. - * Called for proc 0, and then inherited by all others. - * - * XXX should probably act directly on proc0. - */ -static void -vm_init_limits(udata) - void *udata; -{ - struct proc *p = udata; - struct plimit *limp; - int rss_limit; - - /* - * Set up the initial limits on process VM. Set the maximum resident - * set size to be half of (reasonably) available memory. Since this - * is a soft limit, it comes into effect only when the system is out - * of memory - half of main memory helps to favor smaller processes, - * and reduces thrashing of the object cache. - */ - limp = p->p_limit; - limp->pl_rlimit[RLIMIT_STACK].rlim_cur = dflssiz; - limp->pl_rlimit[RLIMIT_STACK].rlim_max = maxssiz; - limp->pl_rlimit[RLIMIT_DATA].rlim_cur = dfldsiz; - limp->pl_rlimit[RLIMIT_DATA].rlim_max = maxdsiz; - /* limit the limit to no less than 2MB */ - rss_limit = max(cnt.v_free_count, 512); - limp->pl_rlimit[RLIMIT_RSS].rlim_cur = ptoa(rss_limit); - limp->pl_rlimit[RLIMIT_RSS].rlim_max = RLIM_INFINITY; -} - void faultin(p) struct proc *p; From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 16:27:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8AB3106564A; Sun, 11 Apr 2010 16:27:38 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8FC08FC16; Sun, 11 Apr 2010 16:27: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 o3BGRcRX049726; Sun, 11 Apr 2010 16:27:38 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BGRcfo049724; Sun, 11 Apr 2010 16:27:38 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004111627.o3BGRcfo049724@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 16:27: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: r206484 - 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: Sun, 11 Apr 2010 16:27:38 -0000 Author: kientzle Date: Sun Apr 11 16:27:38 2010 New Revision: 206484 URL: http://svn.freebsd.org/changeset/base/206484 Log: Diff reduction against bsdtar 2.8.3 Modified: head/usr.bin/tar/subst.c Modified: head/usr.bin/tar/subst.c ============================================================================== --- head/usr.bin/tar/subst.c Sun Apr 11 16:26:07 2010 (r206483) +++ head/usr.bin/tar/subst.c Sun Apr 11 16:27:38 2010 (r206484) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #if HAVE_REGEX_H #include "bsdtar.h" -#include "err.h" #include #include @@ -39,6 +38,8 @@ __FBSDID("$FreeBSD$"); #define REG_BASIC 0 #endif +#include "err.h" + struct subst_rule { struct subst_rule *next; regex_t re; From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 16:28:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0691065673; Sun, 11 Apr 2010 16:28:10 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 828FE8FC2A; Sun, 11 Apr 2010 16:28: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 o3BGSAfj049871; Sun, 11 Apr 2010 16:28:10 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BGSAPE049869; Sun, 11 Apr 2010 16:28:10 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004111628.o3BGSAPE049869@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 16:28: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: r206485 - 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: Sun, 11 Apr 2010 16:28:10 -0000 Author: kientzle Date: Sun Apr 11 16:28:10 2010 New Revision: 206485 URL: http://svn.freebsd.org/changeset/base/206485 Log: Diff reduction against bsdtar 2.8.3 Modified: head/usr.bin/tar/tree.h Modified: head/usr.bin/tar/tree.h ============================================================================== --- head/usr.bin/tar/tree.h Sun Apr 11 16:27:38 2010 (r206484) +++ head/usr.bin/tar/tree.h Sun Apr 11 16:28:10 2010 (r206485) @@ -53,16 +53,17 @@ void tree_close(struct tree *); /* * tree_next() returns Zero if there is no next entry, non-zero if - * there is. Note that directories are potentially visited three - * times. Directories are always visited first as part of enumerating - * their parent. If tree_descend() is invoked at that time, the - * directory is added to a work list and will subsequently be visited - * two more times: once just after descending into the directory and - * again just after ascending back to the parent. + * there is. Note that directories are visited three times. + * Directories are always visited first as part of enumerating their + * parent; that is a "regular" visit. If tree_descend() is invoked at + * that time, the directory is added to a work list and will + * subsequently be visited two more times: once just after descending + * into the directory ("postdescent") and again just after ascending + * back to the parent ("postascent"). * * TREE_ERROR_DIR is returned if the descent failed (because the * directory couldn't be opened, for instance). This is returned - * instead of TREE_PREVISIT/TREE_POSTVISIT. TREE_ERROR_DIR is not a + * instead of TREE_POSTDESCENT/TREE_POSTASCENT. TREE_ERROR_DIR is not a * fatal error, but it does imply that the relevant subtree won't be * visited. TREE_ERROR_FATAL is returned for an error that left the * traversal completely hosed. Right now, this is only returned for @@ -96,10 +97,23 @@ void tree_descend(struct tree *); int tree_current_depth(struct tree *); /* - * The current full pathname, length of the full pathname, - * and a name that can be used to access the file. - * Because tree does use chdir extensively, the access path is - * almost never the same as the full current path. + * The current full pathname, length of the full pathname, and a name + * that can be used to access the file. Because tree does use chdir + * extensively, the access path is almost never the same as the full + * current path. + * + * TODO: Flesh out this interface to provide other information. In + * particular, Windows can provide file size, mode, and some permission + * information without invoking stat() at all. + * + * TODO: On platforms that support it, use openat()-style operations + * to eliminate the chdir() operations entirely while still supporting + * arbitrarily deep traversals. This makes access_path troublesome to + * support, of course, which means we'll need a rich enough interface + * that clients can function without it. (In particular, we'll need + * tree_current_open() that returns an open file descriptor.) + * + * TODO: Provide tree_current_archive_entry(). */ const char *tree_current_path(struct tree *); size_t tree_current_pathlen(struct tree *); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 17:31:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 347581065673; Sun, 11 Apr 2010 17:31:17 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id E772B8FC08; Sun, 11 Apr 2010 17:31:16 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o3BHVTfb013217; Sun, 11 Apr 2010 17:31:29 GMT (envelope-from kientzle@freebsd.org) Received: from horton.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id vf2v46srm6c735d7u5ahejn62i; Sun, 11 Apr 2010 17:31:29 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4BC20762.9030504@freebsd.org> Date: Sun, 11 Apr 2010 10:31:14 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.23) Gecko/20100314 SeaMonkey/1.1.18 MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r206466 - 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: Sun, 11 Apr 2010 17:31:17 -0000 Alexander Best wrote: > does this commit fix bin/144786 entirely? It fixes the problems listed in that bug. In testing that bug, I've uncovered some other problems with the inclusion/exclusion logic that I'm still working through. Tim From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 18:41:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5116A106564A; Sun, 11 Apr 2010 18:41:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 407A68FC13; Sun, 11 Apr 2010 18:41: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 o3BIfWXm079066; Sun, 11 Apr 2010 18:41:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BIfWxG079064; Sun, 11 Apr 2010 18:41:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004111841.o3BIfWxG079064@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 11 Apr 2010 18:41: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: r206486 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 18:41:32 -0000 Author: bz Date: Sun Apr 11 18:41:31 2010 New Revision: 206486 URL: http://svn.freebsd.org/changeset/base/206486 Log: Check that the interface is on the list of cloned interfaces before trying to remove it to avoid panics in case of two threads trying to remove it in parallel. PR: kern/116837 Submitted by: Takahiro Kurosawa (takahiro.kurosawa gmail.com) (orig version) MFC after: 10 days Modified: head/sys/net/if_clone.c Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sun Apr 11 16:28:10 2010 (r206485) +++ head/sys/net/if_clone.c Sun Apr 11 18:41:31 2010 (r206486) @@ -234,6 +234,7 @@ int if_clone_destroyif(struct if_clone *ifc, struct ifnet *ifp) { int err; + struct ifnet *ifcifp; if (ifc->ifc_destroy == NULL) return(EOPNOTSUPP); @@ -246,8 +247,17 @@ if_clone_destroyif(struct if_clone *ifc, CURVNET_SET_QUIET(ifp->if_vnet); IF_CLONE_LOCK(ifc); - IFC_IFLIST_REMOVE(ifc, ifp); + LIST_FOREACH(ifcifp, &ifc->ifc_iflist, if_clones) { + if (ifcifp == ifp) { + IFC_IFLIST_REMOVE(ifc, ifp); + break; + } + } IF_CLONE_UNLOCK(ifc); + if (ifcifp == NULL) { + CURVNET_RESTORE(); + return (ENXIO); /* ifp is not on the list. */ + } if_delgroup(ifp, ifc->ifc_name); From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 18:44:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B76106564A; Sun, 11 Apr 2010 18:44:42 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 557EE8FC16; Sun, 11 Apr 2010 18:44: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 o3BIig7S079855; Sun, 11 Apr 2010 18:44:42 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BIigLU079853; Sun, 11 Apr 2010 18:44:42 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201004111844.o3BIigLU079853@svn.freebsd.org> From: Tim Kientzle Date: Sun, 11 Apr 2010 18:44: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: r206487 - 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: Sun, 11 Apr 2010 18:44:42 -0000 Author: kientzle Date: Sun Apr 11 18:44:42 2010 New Revision: 206487 URL: http://svn.freebsd.org/changeset/base/206487 Log: If a file is specifically both included and excluded, then: * It is not extracted (because it is excluded) * If it's not present in the archive, then an error is reported (because the file was requested and not found) * If it is present in the archive, no error is reported. Previously, this would always report an error because the exclusion prevented the entry from matching the inclusion. Also, tar is now more reluctant to report unmatched inclusions. Previously, "tar x file1 'file*'" against an archive that contained a single entry "file1" would match file1 and then report an error for the second pattern because it wasn't matched. It now considers both inclusions to be matched and reports no error. Modified: head/usr.bin/tar/matching.c Modified: head/usr.bin/tar/matching.c ============================================================================== --- head/usr.bin/tar/matching.c Sun Apr 11 18:41:31 2010 (r206486) +++ head/usr.bin/tar/matching.c Sun Apr 11 18:44:42 2010 (r206487) @@ -156,40 +156,41 @@ lafe_excluded(struct lafe_matching *matc if (matching == NULL) return (0); + /* Mark off any unmatched inclusions. */ + /* In particular, if a filename does appear in the archive and + * is explicitly included and excluded, then we don't report + * it as missing even though we don't extract it. + */ + matched = NULL; + for (match = matching->inclusions; match != NULL; match = match->next){ + if (match->matches == 0 + && match_inclusion(match, pathname)) { + matching->inclusions_unmatched_count--; + match->matches++; + matched = match; + } + } + /* Exclusions take priority */ for (match = matching->exclusions; match != NULL; match = match->next){ if (match_exclusion(match, pathname)) return (1); } - /* Then check for inclusions */ - matched = NULL; + /* It's not excluded and we found an inclusion above, so it's included. */ + if (matched != NULL) + return (0); + + + /* We didn't find an unmatched inclusion, check the remaining ones. */ for (match = matching->inclusions; match != NULL; match = match->next){ - if (match_inclusion(match, pathname)) { - /* - * If this pattern has never been matched, - * then we're done. - */ - if (match->matches == 0) { - match->matches++; - matching->inclusions_unmatched_count--; - return (0); - } - /* - * Otherwise, remember the match but keep checking - * in case we can tick off an unmatched pattern. - */ - matched = match; + /* We looked at previously-unmatched inclusions already. */ + if (match->matches > 0 + && match_inclusion(match, pathname)) { + match->matches++; + return (0); } } - /* - * We didn't find a pattern that had never been matched, but - * we did find a match, so count it and exit. - */ - if (matched != NULL) { - matched->matches++; - return (0); - } /* If there were inclusions, default is to exclude. */ if (matching->inclusions != NULL) From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 18:47:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C50A106566B; Sun, 11 Apr 2010 18:47:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BC298FC14; Sun, 11 Apr 2010 18:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3BIldtt080556; Sun, 11 Apr 2010 18:47:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BIldr9080554; Sun, 11 Apr 2010 18:47:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004111847.o3BIldr9080554@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 11 Apr 2010 18:47: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: r206488 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 18:47:39 -0000 Author: bz Date: Sun Apr 11 18:47:38 2010 New Revision: 206488 URL: http://svn.freebsd.org/changeset/base/206488 Log: Take a reference to make sure that the interface cannot go away during if_clone_destroy() in case parallel threads try to. PR: kern/116837 Submitted by: Mikolaj Golub (to.my.trociny gmail.com) MFC after: 10 days Modified: head/sys/net/if_clone.c Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sun Apr 11 18:44:42 2010 (r206487) +++ head/sys/net/if_clone.c Sun Apr 11 18:47:38 2010 (r206488) @@ -196,10 +196,11 @@ if_clone_createif(struct if_clone *ifc, int if_clone_destroy(const char *name) { + int err; struct if_clone *ifc; struct ifnet *ifp; - ifp = ifunit(name); + ifp = ifunit_ref(name); if (ifp == NULL) return (ENXIO); @@ -221,10 +222,14 @@ if_clone_destroy(const char *name) } #endif IF_CLONERS_UNLOCK(); - if (ifc == NULL) + if (ifc == NULL) { + if_rele(ifp); return (EINVAL); + } - return (if_clone_destroyif(ifc, ifp)); + err = if_clone_destroyif(ifc, ifp); + if_rele(ifp); + return err; } /* From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 19:58:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 935811065670; Sun, 11 Apr 2010 19:58:01 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 829048FC1A; Sun, 11 Apr 2010 19:58: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 o3BJw1sl096005; Sun, 11 Apr 2010 19:58:01 GMT (envelope-from rene@svn.freebsd.org) Received: (from rene@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BJw1f3096003; Sun, 11 Apr 2010 19:58:01 GMT (envelope-from rene@svn.freebsd.org) Message-Id: <201004111958.o3BJw1f3096003@svn.freebsd.org> From: Rene Ladan Date: Sun, 11 Apr 2010 19:58: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: r206489 - head/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: Sun, 11 Apr 2010 19:58:01 -0000 Author: rene (doc,ports committer) Date: Sun Apr 11 19:58:01 2010 New Revision: 206489 URL: http://svn.freebsd.org/changeset/base/206489 Log: Add myself to the ports committers graph Approved by: tabthorpe (mentor, implicit) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Sun Apr 11 18:47:38 2010 (r206488) +++ head/share/misc/committers-ports.dot Sun Apr 11 19:58:01 2010 (r206489) @@ -136,6 +136,7 @@ pgj [label="Gabor Pali\npgj@FreeBSD.org\ philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"] pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"] +rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"] romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"] sat [label="Andrew Pantyukhin\nsat@FreeBSD.org\n2006/05/06"] @@ -347,6 +348,7 @@ tabthorpe -> avl tabthorpe -> jacula tabthorpe -> jadawin tabthorpe -> pgj +tabthorpe -> rene thierry -> jadawin From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 20:08:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B3B41065678; Sun, 11 Apr 2010 20:08:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 892C08FC22; Sun, 11 Apr 2010 20:08: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 o3BK8slY098461; Sun, 11 Apr 2010 20:08:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BK8sUg098459; Sun, 11 Apr 2010 20:08:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004112008.o3BK8sUg098459@svn.freebsd.org> From: Marius Strobl Date: Sun, 11 Apr 2010 20:08: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: r206490 - head/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, 11 Apr 2010 20:08:54 -0000 Author: marius Date: Sun Apr 11 20:08:54 2010 New Revision: 206490 URL: http://svn.freebsd.org/changeset/base/206490 Log: 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: head/lib/libc/softfloat/softfloat-specialize Modified: head/lib/libc/softfloat/softfloat-specialize ============================================================================== --- head/lib/libc/softfloat/softfloat-specialize Sun Apr 11 19:58:01 2010 (r206489) +++ head/lib/libc/softfloat/softfloat-specialize Sun Apr 11 20:08:54 2010 (r206490) @@ -44,6 +44,9 @@ 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; /* From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 20:21:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA6D0106564A; Sun, 11 Apr 2010 20:21:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D91C58FC18; Sun, 11 Apr 2010 20:21: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 o3BKLYDF001406; Sun, 11 Apr 2010 20:21:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BKLYKO001404; Sun, 11 Apr 2010 20:21:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004112021.o3BKLYKO001404@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 11 Apr 2010 20:21: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: r206491 - head/tools/regression/bin/sh/parameters X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Apr 2010 20:21:35 -0000 Author: jilles Date: Sun Apr 11 20:21:34 2010 New Revision: 206491 URL: http://svn.freebsd.org/changeset/base/206491 Log: sh: Test that bogus values of PWD are not imported from the environment. Current versions pass this test trivially by never importing PWD, but I plan to change sh to import PWD if it is an absolute pathname for the current directory, possibly containing symlinks. Added: head/tools/regression/bin/sh/parameters/pwd1.0 (contents, props changed) Added: head/tools/regression/bin/sh/parameters/pwd1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/pwd1.0 Sun Apr 11 20:21:34 2010 (r206491) @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Check that bogus PWD values are not accepted from the environment. + +cd / || exit 3 +failures=0 +[ "$(PWD=foo sh -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/var/empty sh -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/var/empty/foo sh -c 'pwd')" = / ] || : $((failures += 1)) +[ "$(PWD=/bin/ls sh -c 'pwd')" = / ] || : $((failures += 1)) + +exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 21:22:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC441065672; Sun, 11 Apr 2010 21:22:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 798808FC20; Sun, 11 Apr 2010 21:22: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 o3BLM3RQ014706; Sun, 11 Apr 2010 21:22:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3BLM3s1014704; Sun, 11 Apr 2010 21:22:03 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004112122.o3BLM3s1014704@svn.freebsd.org> From: Marius Strobl Date: Sun, 11 Apr 2010 21:22: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: r206492 - head/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, 11 Apr 2010 21:22:03 -0000 Author: marius Date: Sun Apr 11 21:22:02 2010 New Revision: 206492 URL: http://svn.freebsd.org/changeset/base/206492 Log: Add #endif missed in r206490. Modified: head/lib/libc/softfloat/softfloat-specialize Modified: head/lib/libc/softfloat/softfloat-specialize ============================================================================== --- head/lib/libc/softfloat/softfloat-specialize Sun Apr 11 20:21:34 2010 (r206491) +++ head/lib/libc/softfloat/softfloat-specialize Sun Apr 11 21:22:02 2010 (r206492) @@ -48,6 +48,7 @@ static 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 Apr 11 22:44:32 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E64C9106564A; Sun, 11 Apr 2010 22:44:32 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id A42AC8FC17; Sun, 11 Apr 2010 22:44:32 +0000 (UTC) Received: from ice.local ([10.0.0.115]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id o3BMiV3q063673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Apr 2010 15:44:32 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4BC250CF.30600@errno.com> Date: Sun, 11 Apr 2010 15:44:31 -0700 From: Sam Leffler User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Rui Paulo References: <201004091206.o39C6JBo046371@svn.freebsd.org> In-Reply-To: <201004091206.o39C6JBo046371@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-DCC-CTc-dcc2-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206419 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 22:44:33 -0000 Rui Paulo wrote: > Author: rpaulo > Date: Fri Apr 9 12:06:19 2010 > New Revision: 206419 > URL: http://svn.freebsd.org/changeset/base/206419 > > Log: > Use M_NOWAIT instead of M_WAITOK to avoid race conditions. > Can you describe these race conditions (or at least one of them)? Sam From owner-svn-src-all@FreeBSD.ORG Sun Apr 11 22:50:27 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F0881065672; Sun, 11 Apr 2010 22:50:27 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 700168FC24; Sun, 11 Apr 2010 22:50:27 +0000 (UTC) Received: from ice.local ([10.0.0.115]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id o3BMoQVi063718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Apr 2010 15:50:27 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4BC25232.9070601@errno.com> Date: Sun, 11 Apr 2010 15:50:26 -0700 From: Sam Leffler User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Jack F Vogel References: <201004091842.o39IgFbb031014@svn.freebsd.org> In-Reply-To: <201004091842.o39IgFbb031014@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-DCC-CTc-dcc2-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206429 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 22:50:27 -0000 Jack F Vogel wrote: > Author: jfv > Date: Fri Apr 9 18:42:15 2010 > New Revision: 206429 > URL: http://svn.freebsd.org/changeset/base/206429 > > Log: > Incorporate suggested improvements from yongari. > > Also, from feedback, make the multiqueue code an > option (EM_MULTIQUEUE) that is off by default. > Problems have been seen with UDP when its on. It is usually a good idea to say what the "suggested improvements" are as it's unlikely anyone looking at the commit will have the needed context (I certainly did not). It also seems that you roll-up unrelated changes in one commit; this is not advisable. Sam From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 08:27:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B24D9106564A; Mon, 12 Apr 2010 08:27:53 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A12D08FC17; Mon, 12 Apr 2010 08:27: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 o3C8RrEj069280; Mon, 12 Apr 2010 08:27:53 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3C8RrN6069279; Mon, 12 Apr 2010 08:27:53 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004120827.o3C8RrN6069279@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 12 Apr 2010 08:27: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: r206494 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 08:27:53 -0000 Author: luigi Date: Mon Apr 12 08:27:53 2010 New Revision: 206494 URL: http://svn.freebsd.org/changeset/base/206494 Log: fix a buffer overflow with large (100k+) number of input lines. MFC after: 3 days Modified: head/sbin/ipfw/main.c Modified: head/sbin/ipfw/main.c ============================================================================== --- head/sbin/ipfw/main.c Sun Apr 11 21:59:23 2010 (r206493) +++ head/sbin/ipfw/main.c Mon Apr 12 08:27:53 2010 (r206494) @@ -553,11 +553,11 @@ ipfw_readfile(int ac, char *av[]) } while (fgets(buf, BUFSIZ, f)) { /* read commands */ - char linename[10]; + char linename[20]; char *args[2]; lineno++; - sprintf(linename, "Line %d", lineno); + snprintf(linename, sizeof(linename), "Line %d", lineno); setprogname(linename); /* XXX */ args[0] = progname; args[1] = buf; From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 12:28:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5136106566B; Mon, 12 Apr 2010 12:28:22 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D47128FC12; Mon, 12 Apr 2010 12: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 o3CCSMUK024515; Mon, 12 Apr 2010 12:28:22 GMT (envelope-from fluffy@svn.freebsd.org) Received: (from fluffy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CCSMLi024514; Mon, 12 Apr 2010 12:28:22 GMT (envelope-from fluffy@svn.freebsd.org) Message-Id: <201004121228.o3CCSMLi024514@svn.freebsd.org> From: Dima Panov Date: Mon, 12 Apr 2010 12: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: r206495 - head/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, 12 Apr 2010 12:28:23 -0000 Author: fluffy (ports committer) Date: Mon Apr 12 12:28:22 2010 New Revision: 206495 URL: http://svn.freebsd.org/changeset/base/206495 Log: - Add myself to the ports committers graph Forgot to do it when gain my commit bit :) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon Apr 12 08:27:53 2010 (r206494) +++ head/share/misc/committers-ports.dot Mon Apr 12 12:28:22 2010 (r206495) @@ -77,6 +77,7 @@ eik [label="Oliver Eikemeier\neik@FreeBS erwin [label="Erwin Lansing\nerwin@FreeBSD.org\n2003/06/04"] farrokhi [label="Babak Farrokhi\nfarrokhi@FreeBSD.org\n2006/11/07"] fjoe [label="Max Khon\nfjoe@FreeBSD.org\n2001/08/06"] +fluffy [label="Dima Panov\nfluffy@FreeBSD.org\n2009/08/10"] flz [label="Florent Thoumie\nflz@FreeBSD.org\n2005/03/01"] gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2006/12/05"] gahr [label="Pietro Cerutti\ngahr@FreeBSD.org\n2008/02/20"] @@ -290,6 +291,7 @@ miwi -> avilla miwi -> beat miwi -> decke miwi -> farrokhi +miwi -> fluffy miwi -> gahr miwi -> makc miwi -> mandree @@ -345,6 +347,7 @@ steve -> netchild tabthorpe -> avilla tabthorpe -> avl +tabthorpe -> fluffy tabthorpe -> jacula tabthorpe -> jadawin tabthorpe -> pgj From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 13:46:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91356106564A; Mon, 12 Apr 2010 13:46:21 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 666AC8FC1A; Mon, 12 Apr 2010 13:46: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 o3CDkLSg041761; Mon, 12 Apr 2010 13:46:21 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CDkLKV041760; Mon, 12 Apr 2010 13:46:21 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004121346.o3CDkLKV041760@svn.freebsd.org> From: Rui Paulo Date: Mon, 12 Apr 2010 13:46: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: r206496 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 13:46:21 -0000 Author: rpaulo Date: Mon Apr 12 13:46:20 2010 New Revision: 206496 URL: http://svn.freebsd.org/changeset/base/206496 Log: Remove svn:executable prop. Modified: Directory Properties: head/sys/dev/ath/ath_hal/ar5416/ar9160.ini (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 14:33:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 923E6106564A; Mon, 12 Apr 2010 14:33:58 +0000 (UTC) (envelope-from rpaulo@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 B6DCE8FC28; Mon, 12 Apr 2010 14:33:57 +0000 (UTC) Received: by ewy24 with SMTP id 24so968512ewy.33 for ; Mon, 12 Apr 2010 07:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Op6WhIDdIyb1Zq/CCiBOqDpZhj+7nObfTB8H/C2325s=; b=cwyGTvJ99b052O+9PZit2LkzkW+F/Ie7tLSeIIiLwA5Hn2nlYuqKPkqkbJP9Ks/MuR cccohOE03E3u1XP3+0/iLoTA6edHTLqngbak3d3K9kdLzpnToBv+x7wWD84iyg8UxJQB UBnRCud2Cg9uY/gcHIzqjRyHz3+5Loro6zayk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=FtJtRFfU20sY+KiMaUuz4+Sc+S1QTKROOKxaNplH/ZP5PDHvG64G+c9k70qql5faC6 a+Yj7NQYiJaK7nu/+/gQAzyBYt4kehJged0bdWVEE2vqmSSsUHGhYLGFHBhl3Mf2Um9s kF7tqDqabwReMuPIxnRzfuy9Y/B2cf4QcWUjg= Received: by 10.103.81.12 with SMTP id i12mr2058662mul.89.1271082836420; Mon, 12 Apr 2010 07:33:56 -0700 (PDT) Received: from [10.0.10.2] (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id j10sm17587345mue.18.2010.04.12.07.33.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Apr 2010 07:33:54 -0700 (PDT) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <4BC250CF.30600@errno.com> Date: Mon, 12 Apr 2010 15:33:52 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <256D847F-E64D-4802-8266-C2AC4DCDFF72@FreeBSD.org> References: <201004091206.o39C6JBo046371@svn.freebsd.org> <4BC250CF.30600@errno.com> To: Sam Leffler 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: r206419 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 14:33:58 -0000 On 11 Apr 2010, at 23:44, Sam Leffler wrote: > Rui Paulo wrote: >> Author: rpaulo >> Date: Fri Apr 9 12:06:19 2010 >> New Revision: 206419 >> URL: http://svn.freebsd.org/changeset/base/206419 >> Log: >> Use M_NOWAIT instead of M_WAITOK to avoid race conditions. >> =20 >=20 > Can you describe these race conditions (or at least one of them)? Some drivers call ratectl functions with locks held. I saw similar = allocations in the net80211 stack that used M_NOWAIT and printed an = error if the allocation failed, but didn't notify the caller (for = example ieee80211_node_table_init()). If I use M_WAITOK here I'll also get WITNESS warnings. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 16:37:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D692D1065674; Mon, 12 Apr 2010 16:37:45 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18E48FC1C; Mon, 12 Apr 2010 16: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 o3CGbjJY080073; Mon, 12 Apr 2010 16:37:45 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CGbjSK080066; Mon, 12 Apr 2010 16:37:45 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004121637.o3CGbjSK080066@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 12 Apr 2010 16: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: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 16:37:45 -0000 Author: luigi Date: Mon Apr 12 16:37:45 2010 New Revision: 206497 URL: http://svn.freebsd.org/changeset/base/206497 Log: Bring in geom_sched, support for scheduling disk I/O requests in a device independent manner. Also include an example anticipatory scheduler, gsched_rr, which gives very nice performance improvements in presence of competing random access patterns. This is joint work with Fabio Checconi, developed last year and presented at BSDCan 2009. You can find details in the README file or at http://info.iet.unipi.it/~luigi/geom_sched/ Added: head/sbin/geom/class/sched/ head/sbin/geom/class/sched/Makefile (contents, props changed) head/sbin/geom/class/sched/geom_sched.c (contents, props changed) head/sbin/geom/class/sched/gsched.8 (contents, props changed) head/sys/geom/sched/ head/sys/geom/sched/README (contents, props changed) head/sys/geom/sched/g_sched.c (contents, props changed) head/sys/geom/sched/g_sched.h (contents, props changed) head/sys/geom/sched/gs_rr.c (contents, props changed) head/sys/geom/sched/gs_scheduler.h (contents, props changed) head/sys/geom/sched/subr_disk.c (contents, props changed) head/sys/modules/geom/geom_sched/ head/sys/modules/geom/geom_sched/Makefile (contents, props changed) head/sys/modules/geom/geom_sched/Makefile.inc (contents, props changed) head/sys/modules/geom/geom_sched/gs_sched/ head/sys/modules/geom/geom_sched/gs_sched/Makefile (contents, props changed) head/sys/modules/geom/geom_sched/gsched_rr/ head/sys/modules/geom/geom_sched/gsched_rr/Makefile (contents, props changed) Modified: head/sbin/geom/class/Makefile head/sys/modules/geom/Makefile Modified: head/sbin/geom/class/Makefile ============================================================================== --- head/sbin/geom/class/Makefile Mon Apr 12 13:46:20 2010 (r206496) +++ head/sbin/geom/class/Makefile Mon Apr 12 16:37:45 2010 (r206497) @@ -15,6 +15,7 @@ SUBDIR+=multipath SUBDIR+=nop SUBDIR+=part SUBDIR+=raid3 +SUBDIR+=sched SUBDIR+=shsec SUBDIR+=stripe SUBDIR+=virstor Added: head/sbin/geom/class/sched/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/sched/Makefile Mon Apr 12 16:37:45 2010 (r206497) @@ -0,0 +1,19 @@ +# GEOM_LIBRARY_PATH +# $FreeBSD$ + +.PATH: /usr/src/sbin/geom/misc + +CFLAGS += -I/usr/src/sbin/geom + +CLASS=sched + +WARNS?= 6 +CLASS_DIR?=/lib/geom + +SHLIBDIR?=${CLASS_DIR} +SHLIB_NAME?=geom_${CLASS}.so +LINKS= ${BINDIR}/geom ${BINDIR}/g${CLASS} +MAN= g${CLASS}.8 +SRCS+= geom_${CLASS}.c subr.c + +.include Added: head/sbin/geom/class/sched/geom_sched.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/sched/geom_sched.c Mon Apr 12 16:37:45 2010 (r206497) @@ -0,0 +1,123 @@ +/*- + * Copyright (c) 2009 Fabio Checconi, Luigi Rizzo + * 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 AUTHORS 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 AUTHORS 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. + */ + +/* + * $Id$ + * $FreeBSD$ + * + * This file implements the userspace library used by the 'geom' + * command to load and manipulate disk schedulers. + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "core/geom.h" +#include "misc/subr.h" + +#define G_SCHED_VERSION 0 + +uint32_t lib_version = G_LIB_VERSION; +uint32_t version = G_SCHED_VERSION; + +/* + * storage for parameters used by this geom class. + * Right now only the scheduler name is used. + */ +static char algo[] = "rr"; /* default scheduler */ + +/* + * Adapt to differences in geom library. + * in V1 struct g_command misses gc_argname, eld, and G_BOOL is undefined + */ +#if G_LIB_VERSION == 1 +#define G_ARGNAME +#define G_TYPE_BOOL G_TYPE_NUMBER +#else +#define G_ARGNAME NULL, +#endif + +static void +gcmd_createinsert(struct gctl_req *req, unsigned flags __unused) +{ + const char *reqalgo; + char name[64]; + + if (gctl_has_param(req, "algo")) + reqalgo = gctl_get_ascii(req, "algo"); + else + reqalgo = algo; + + snprintf(name, sizeof(name), "gsched_%s", reqalgo); + /* + * Do not complain about errors here, gctl_issue() + * will fail anyway. + */ + if (modfind(name) < 0) + kldload(name); + gctl_issue(req); +} + +struct g_command class_commands[] = { + { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, gcmd_createinsert, + { + { 'a', "algo", algo, G_TYPE_STRING }, + G_OPT_SENTINEL + }, + G_ARGNAME "[-v] [-a algorithm_name] dev ..." + }, + { "insert", G_FLAG_VERBOSE | G_FLAG_LOADKLD, gcmd_createinsert, + { + { 'a', "algo", algo, G_TYPE_STRING }, + G_OPT_SENTINEL + }, + G_ARGNAME "[-v] [-a algorithm_name] dev ..." + }, + { "configure", G_FLAG_VERBOSE, NULL, + { + { 'a', "algo", algo, G_TYPE_STRING }, + G_OPT_SENTINEL + }, + G_ARGNAME "[-v] [-a algorithm_name] prov ..." + }, + { "destroy", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + G_ARGNAME "[-fv] prov ..." + }, + { "reset", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + G_ARGNAME "[-v] prov ..." + }, + G_CMD_SENTINEL +}; Added: head/sbin/geom/class/sched/gsched.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/sched/gsched.8 Mon Apr 12 16:37:45 2010 (r206497) @@ -0,0 +1,161 @@ +.\" Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo +.\" All rights reserved. +.\" $FreeBSD$ +.\" +.\" 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 AUTHORS 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 AUTHORS 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. +.\" +.Dd April 12, 2010 +.Dt GSCHED 8 +.Os +.Sh NAME +.Nm gsched +.Nd "control utility for disk scheduler GEOM class" +.Sh SYNOPSIS +.Nm +.Cm create +.Op Fl v +.Op Fl a Ar algorithm +.Ar provider ... +.Nm +.Cm insert +.Op Fl v +.Op Fl a Ar algorithm +.Ar provider ... +.Nm +.Cm configure +.Op Fl v +.Op Fl a Ar algorithm +.Ar node ... +.Nm +.Cm destroy +.Op Fl fv +.Ar node ... +.Nm +.Cm reset +.Op Fl v +.Ar node ... +.Nm +.Cm { list | status | load | unload } +.Sh DESCRIPTION +The +.Nm +utility (also callable as +.Nm geom sched ... ) +changes the scheduling policy of the requests going to a provider. +.Pp +The first argument to +.Nm +indicates an action to be performed: +.Bl -tag -width ".Cm configure" +.It Cm create +Create a new provider and geom node using the specified scheduling algorithm. +.Ar algorithm +is the name of the scheduling algorithm used for the provider. +Available algorithms include: +.Ar rr , +which implements anticipatory scheduling with round robin service +among clients; +.Ar as , +which implements a simple form of anticipatory scheduling with +no per-client queue. +.Pp +If the operation succeeds, the new provider should appear with name +.Pa /dev/ Ns Ao Ar dev Ac Ns Pa .sched. . +The kernel module +.Pa geom_sched.ko +will be loaded if it is not loaded already. +.It Cm insert +Operates as "create", but the insertion is "transparent", +i.e. the existing provider is rerouted to the newly created geom, +which in turn forwards requests to the existing geom. +This operation allows one to start/stop a scheduling service +on an already existing provider. +.Pp +A subsequent 'destroy' will remove the newly created geom and +hook the provider back to the original geom. +.Ar algorithm +.It Cm configure +Configure existing scheduling provider. It supports the same options +as the +.Nm create +command. +.It Cm destroy +Destroy the geom specified in the parameter. +.It Cm reset +Do nothing. +.It Cm list | status | load | unload +See +.Xr geom 8 . +.El +.Pp +Additional options: +.Bl -tag -width ".Fl f" +.It Fl f +Force the removal of the specified provider. +.It Fl v +Be more verbose. +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variables can be used to control the behavior of the +.Nm SCHED +GEOM class. +The default value is shown next to each variable. +.Bl -tag -width indent +.It Va kern.geom.sched.debug : No 0 +Debug level of the +.Nm SCHED +GEOM class. +This can be set to a number between 0 and 2 inclusive. +If set to 0 minimal debug information is printed, and if set to 2 the +maximum amount of debug information is printed. +.El +.Sh EXIT STATUS +Exit status is 0 on success, and 1 if the command fails. +.Sh EXAMPLES +The following example shows how to create a scheduling provider for disk +.Pa /dev/da0 +, and how to destroy it. +.Bd -literal -offset indent +# Load the geom_sched module: +kldload geom_sched +# Load some scheduler classes used by geom_sched: +kldload gsched_rr gsched_as +# Configure device ad0 to use scheduler 'rr': +geom sched insert -s rr ad0 +# Now provider ad0 uses the 'rr' algorithm; +# the new geom is ad0.sched. +# Remove the scheduler on the device: +geom sched destroy -v ad0.sched. +.Ed +.Pp +.Sh SEE ALSO +.Xr geom 4 , +.Xr geom 8 +.Sh HISTORY +The +.Nm +utility appeared in April 2010. +.Sh AUTHORS +.An Fabio Checconi Aq fabio@FreeBSD.org +.An Luigi Rizzo Aq luigi@FreeBSD.org Added: head/sys/geom/sched/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/sched/README Mon Apr 12 16:37:45 2010 (r206497) @@ -0,0 +1,162 @@ + + --- GEOM BASED DISK SCHEDULERS FOR FREEBSD --- + +This code contains a framework for GEOM-based disk schedulers and a +couple of sample scheduling algorithms that use the framework and +implement two forms of "anticipatory scheduling" (see below for more +details). + +As a quick example of what this code can give you, try to run "dd", +"tar", or some other program with highly SEQUENTIAL access patterns, +together with "cvs", "cvsup", "svn" or other highly RANDOM access patterns +(this is not a made-up example: it is pretty common for developers +to have one or more apps doing random accesses, and others that do +sequential accesses e.g., loading large binaries from disk, checking +the integrity of tarballs, watching media streams and so on). + +These are the results we get on a local machine (AMD BE2400 dual +core CPU, SATA 250GB disk): + + /mnt is a partition mounted on /dev/ad0s1f + + cvs: cvs -d /mnt/home/ncvs-local update -Pd /mnt/ports + dd-read: dd bs=128k of=/dev/null if=/dev/ad0 (or ad0-sched-) + dd-writew dd bs=128k if=/dev/zero of=/mnt/largefile + + NO SCHEDULER RR SCHEDULER + dd cvs dd cvs + + dd-read only 72 MB/s ---- 72 MB/s --- + dd-write only 55 MB/s --- 55 MB/s --- + dd-read+cvs 6 MB/s ok 30 MB/s ok + dd-write+cvs 55 MB/s slooow 14 MB/s ok + +As you can see, when a cvs is running concurrently with dd, the +performance drops dramatically, and depending on read or write mode, +one of the two is severely penalized. The use of the RR scheduler +in this example makes the dd-reader go much faster when competing +with cvs, and lets cvs progress when competing with a writer. + +To try it out: + +1. USERS OF FREEBSD 7, PLEASE READ CAREFULLY THE FOLLOWING: + + On loading, this module patches one kernel function (g_io_request()) + so that I/O requests ("bio's") carry a classification tag, useful + for scheduling purposes. + + ON FREEBSD 7, the tag is stored in an existing (though rarely used) + field of the "struct bio", a solution which makes this module + incompatible with other modules using it, such as ZFS and gjournal. + Additionally, g_io_request() is patched in-memory to add a call + to the function that initializes this field (i386/amd64 only; + for other architectures you need to manually patch sys/geom/geom_io.c). + See details in the file g_sched.c. + + On FreeBSD 8.0 and above, the above trick is not necessary, + as the struct bio contains dedicated fields for the classifier, + and hooks for request classifiers. + + If you don't like the above, don't run this code. + +2. PLEASE MAKE SURE THAT THE DISK THAT YOU WILL BE USING FOR TESTS + DOES NOT CONTAIN PRECIOUS DATA. + This is experimental code, so we make no guarantees, though + I am routinely using it on my desktop and laptop. + +3. EXTRACT AND BUILD THE PROGRAMS + A 'make install' in the directory should work (with root privs), + or you can even try the binary modules. + If you want to build the modules yourself, look at the Makefile. + +4. LOAD THE MODULE, CREATE A GEOM NODE, RUN TESTS + + The scheduler's module must be loaded first: + + # kldload gsched_rr + + substitute with gsched_as to test AS. Then, supposing that you are + using /dev/ad0 for testing, a scheduler can be attached to it with: + + # geom sched insert ad0 + + The scheduler is inserted transparently in the geom chain, so + mounted partitions and filesystems will keep working, but + now requests will go through the scheduler. + + To change scheduler on-the-fly, you can reconfigure the geom: + + # geom sched configure -a as ad0.sched. + + assuming that gsched_as was loaded previously. + +5. SCHEDULER REMOVAL + + In principle it is possible to remove the scheduler module + even on an active chain by doing + + # geom sched destroy ad0.sched. + + However, there is some race in the geom subsystem which makes + the removal unsafe if there are active requests on a chain. + So, in order to reduce the risk of data losses, make sure + you don't remove a scheduler from a chain with ongoing transactions. + +--- NOTES ON THE SCHEDULERS --- + +The important contribution of this code is the framework to experiment +with different scheduling algorithms. 'Anticipatory scheduling' +is a very powerful technique based on the following reasoning: + + The disk throughput is much better if it serves sequential requests. + If we have a mix of sequential and random requests, and we see a + non-sequential request, do not serve it immediately but instead wait + a little bit (2..5ms) to see if there is another one coming that + the disk can serve more efficiently. + +There are many details that should be added to make sure that the +mechanism is effective with different workloads and systems, to +gain a few extra percent in performance, to improve fairness, +insulation among processes etc. A discussion of the vast literature +on the subject is beyond the purpose of this short note. + +-------------------------------------------------------------------------- + +TRANSPARENT INSERT/DELETE + +geom_sched is an ordinary geom module, however it is convenient +to plug it transparently into the geom graph, so that one can +enable or disable scheduling on a mounted filesystem, and the +names in /etc/fstab do not depend on the presence of the scheduler. + +To understand how this works in practice, remember that in GEOM +we have "providers" and "geom" objects. +Say that we want to hook a scheduler on provider "ad0", +accessible through pointer 'pp'. Originally, pp is attached to +geom "ad0" (same name, different object) accessible through pointer old_gp + + BEFORE ---> [ pp --> old_gp ...] + +A normal "geom sched create ad0" call would create a new geom node +on top of provider ad0/pp, and export a newly created provider +("ad0.sched." accessible through pointer newpp). + + AFTER create ---> [ newpp --> gp --> cp ] ---> [ pp --> old_gp ... ] + +On top of newpp, a whole tree will be created automatically, and we +can e.g. mount partitions on /dev/ad0.sched.s1d, and those requests +will go through the scheduler, whereas any partition mounted on +the pre-existing device entries will not go through the scheduler. + +With the transparent insert mechanism, the original provider "ad0"/pp +is hooked to the newly created geom, as follows: + + AFTER insert ---> [ pp --> gp --> cp ] ---> [ newpp --> old_gp ... ] + +so anything that was previously using provider pp will now have +the requests routed through the scheduler node. + +A removal ("geom sched destroy ad0.sched.") will restore the original +configuration. + +# $FreeBSD$ Added: head/sys/geom/sched/g_sched.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/sched/g_sched.c Mon Apr 12 16:37:45 2010 (r206497) @@ -0,0 +1,1901 @@ +/*- + * Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo + * 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 AUTHORS 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 AUTHORS 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. + */ + +/* + * $Id$ + * $FreeBSD$ + * + * Main control module for geom-based disk schedulers ('sched'). + * + * USER VIEW + * A 'sched' node is typically inserted transparently between + * an existing provider pp and its original geom gp + * + * [pp --> gp ..] + * + * using the command "geom sched insert " and + * resulting in the following topology + * + * [pp --> sched_gp --> cp] [new_pp --> gp ... ] + * + * Deletion "geom sched destroy .sched." restores the + * original chain. The normal "geom sched create " + * is also supported. + * + * INTERNALS + * Internally, the 'sched' uses the following data structures + * + * geom{} g_sched_softc{} g_gsched{} + * +----------+ +---------------+ +-------------+ + * | softc *-|--->| sc_gsched *-|-->| gs_init | + * | ... | | | | gs_fini | + * | | | [ hash table] | | gs_start | + * +----------+ | | | ... | + * | | +-------------+ + * | | + * | | g_*_softc{} + * | | +-------------+ + * | sc_data *-|-->| | + * +---------------+ | algorithm- | + * | specific | + * +-------------+ + * + * A g_sched_softc{} is created with a "geom sched insert" call. + * In turn this instantiates a specific scheduling algorithm, + * which sets sc_gsched to point to the algorithm callbacks, + * and calls gs_init() to create the g_*_softc{} . + * The other callbacks (gs_start, gs_next, ...) are invoked + * as needed + * + * g_sched_softc{} is defined in g_sched.h and mostly used here; + * g_gsched{}, and the gs_callbacks, are documented in gs_scheduler.h; + * g_*_softc{} is defined/implemented by each algorithm (gs_*.c) + * + * DATA MOVING + * When a bio is received on the provider, it goes to the + * g_sched_start() which calls gs_start() to initially queue it; + * then we call g_sched_dispatch() that loops around gs_next() + * to select zero or more bio's to be sent downstream. + * + * g_sched_dispatch() can also be called as a result of a timeout, + * e.g. when doing anticipation or pacing requests. + * + * When a bio comes back, it goes to g_sched_done() which in turn + * calls gs_done(). The latter does any necessary housekeeping in + * the scheduling algorithm, and may decide to call g_sched_dispatch() + * to send more bio's downstream. + * + * If an algorithm needs per-flow queues, these are created + * calling gs_init_class() and destroyed with gs_fini_class(), + * and they are also inserted in the hash table implemented in + * the g_sched_softc{} + * + * If an algorithm is replaced, or a transparently-inserted node is + * removed with "geom sched destroy", we need to remove all references + * to the g_*_softc{} and g_sched_softc from the bio's still in + * the scheduler. g_sched_forced_dispatch() helps doing this. + * XXX need to explain better. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* we access curthread */ +#include +#include "gs_scheduler.h" +#include "g_sched.h" /* geom hooks */ + +/* + * Size of the per-geom hash table storing traffic classes. + * We may decide to change it at a later time, it has no ABI + * implications as it is only used for run-time allocations. + */ +#define G_SCHED_HASH_SIZE 32 + +static int g_sched_destroy(struct g_geom *gp, boolean_t force); +static int g_sched_destroy_geom(struct gctl_req *req, + struct g_class *mp, struct g_geom *gp); +static void g_sched_config(struct gctl_req *req, struct g_class *mp, + const char *verb); +static struct g_geom *g_sched_taste(struct g_class *mp, + struct g_provider *pp, int flags __unused); +static void g_sched_dumpconf(struct sbuf *sb, const char *indent, + struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); +static void g_sched_init(struct g_class *mp); +static void g_sched_fini(struct g_class *mp); + +struct g_class g_sched_class = { + .name = G_SCHED_CLASS_NAME, + .version = G_VERSION, + .ctlreq = g_sched_config, + .taste = g_sched_taste, + .destroy_geom = g_sched_destroy_geom, + .init = g_sched_init, + .fini = g_sched_fini +}; + +MALLOC_DEFINE(M_GEOM_SCHED, "GEOM_SCHED", "Geom schedulers data structures"); + +/* + * Global variables describing the state of the geom_sched module. + * There is only one static instance of this structure. + */ +LIST_HEAD(gs_list, g_gsched); /* type, link field */ +struct geom_sched_vars { + struct mtx gs_mtx; + struct gs_list gs_scheds; /* list of algorithms */ + u_int gs_debug; + u_int gs_sched_count; /* how many algorithms ? */ + u_int gs_patched; /* g_io_request was patched */ + + u_int gs_initialized; + u_int gs_expire_secs; /* expiration of hash entries */ + + struct bio_queue_head gs_pending; + u_int gs_npending; + + /* The following are for stats, usually protected by gs_mtx. */ + u_long gs_requests; /* total requests */ + u_long gs_done; /* total done */ + u_int gs_in_flight; /* requests in flight */ + u_int gs_writes_in_flight; + u_int gs_bytes_in_flight; + u_int gs_write_bytes_in_flight; + + char gs_names[256]; /* names of schedulers */ +}; + +static struct geom_sched_vars me = { + .gs_expire_secs = 10, +}; + +SYSCTL_DECL(_kern_geom); +SYSCTL_NODE(_kern_geom, OID_AUTO, sched, CTLFLAG_RW, 0, + "GEOM_SCHED stuff"); + +SYSCTL_INT(_kern_geom_sched, OID_AUTO, in_flight_wb, CTLFLAG_RD, + &me.gs_write_bytes_in_flight, 0, "Write bytes in flight"); + +SYSCTL_INT(_kern_geom_sched, OID_AUTO, in_flight_b, CTLFLAG_RD, + &me.gs_bytes_in_flight, 0, "Bytes in flight"); + +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight_w, CTLFLAG_RD, + &me.gs_writes_in_flight, 0, "Write Requests in flight"); + +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight, CTLFLAG_RD, + &me.gs_in_flight, 0, "Requests in flight"); + +SYSCTL_ULONG(_kern_geom_sched, OID_AUTO, done, CTLFLAG_RD, + &me.gs_done, 0, "Total done"); + +SYSCTL_ULONG(_kern_geom_sched, OID_AUTO, requests, CTLFLAG_RD, + &me.gs_requests, 0, "Total requests"); + +SYSCTL_STRING(_kern_geom_sched, OID_AUTO, algorithms, CTLFLAG_RD, + &me.gs_names, 0, "Algorithm names"); + +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, alg_count, CTLFLAG_RD, + &me.gs_sched_count, 0, "Number of algorithms"); + +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, debug, CTLFLAG_RW, + &me.gs_debug, 0, "Debug level"); + +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, expire_secs, CTLFLAG_RW, + &me.gs_expire_secs, 0, "Expire time in seconds"); + +/* + * g_sched calls the scheduler algorithms with this lock held. + * The locking functions are exposed so the scheduler algorithms can also + * protect themselves e.g. when running a callout handler. + */ +void +g_sched_lock(struct g_geom *gp) +{ + struct g_sched_softc *sc = gp->softc; + + mtx_lock(&sc->sc_mtx); +} + +void +g_sched_unlock(struct g_geom *gp) +{ + struct g_sched_softc *sc = gp->softc; + + mtx_unlock(&sc->sc_mtx); +} + +/* + * Support functions to handle references to the module, + * which are coming from devices using this scheduler. + */ +static inline void +g_gsched_ref(struct g_gsched *gsp) +{ + + atomic_add_int(&gsp->gs_refs, 1); +} + +static inline void +g_gsched_unref(struct g_gsched *gsp) +{ + + atomic_add_int(&gsp->gs_refs, -1); +} + +/* + * Update the stats when this request is done. + */ +static void +g_sched_update_stats(struct bio *bio) +{ + + me.gs_done++; + me.gs_in_flight--; + me.gs_bytes_in_flight -= bio->bio_length; + if (bio->bio_cmd & BIO_WRITE) { + me.gs_writes_in_flight--; + me.gs_write_bytes_in_flight -= bio->bio_length; + } +} + +/* + * Dispatch any pending request. + */ +static void +g_sched_forced_dispatch(struct g_geom *gp) +{ + struct g_sched_softc *sc = gp->softc; + struct g_gsched *gsp = sc->sc_gsched; + struct bio *bp; + + KASSERT(mtx_owned(&sc->sc_mtx), + ("sc_mtx not owned during forced dispatch")); + + while ((bp = gsp->gs_next(sc->sc_data, 1)) != NULL) + g_io_request(bp, LIST_FIRST(&gp->consumer)); +} + +/* + * The main dispatch loop, called either here after the start + * routine, or by scheduling algorithms when they receive a timeout + * or a 'done' notification. Does not share code with the forced + * dispatch path, since the gs_done() callback can call us. + */ +void +g_sched_dispatch(struct g_geom *gp) +{ + struct g_sched_softc *sc = gp->softc; + struct g_gsched *gsp = sc->sc_gsched; + struct bio *bp; + + KASSERT(mtx_owned(&sc->sc_mtx), ("sc_mtx not owned during dispatch")); + + if ((sc->sc_flags & G_SCHED_FLUSHING)) + return; + + while ((bp = gsp->gs_next(sc->sc_data, 0)) != NULL) + g_io_request(bp, LIST_FIRST(&gp->consumer)); +} + +/* + * Recent (8.0 and above) versions of FreeBSD have support to + * register classifiers of disk requests. The classifier is + * invoked by g_io_request(), and stores the information into + * bp->bio_classifier1. + * + * Support for older versions, which is left here only for + * documentation purposes, relies on two hacks: + * 1. classification info is written into the bio_caller1 + * field of the topmost node in the bio chain. This field + * is rarely used, but this module is incompatible with + * those that use bio_caller1 for other purposes, + * such as ZFS and gjournal; + * 2. g_io_request() is patched in-memory when the module is + * loaded, so that the function calls a classifier as its + * first thing. g_io_request() is restored when the module + * is unloaded. This functionality is only supported for + * x86 and amd64, other architectures need source code changes. + */ + +/* + * Lookup the identity of the issuer of the original request. + * In the current implementation we use the curthread of the + * issuer, but different mechanisms may be implemented later + * so we do not make assumptions on the return value which for + * us is just an opaque identifier. + */ + +static inline u_long +g_sched_classify(struct bio *bp) +{ + +#if __FreeBSD_version > 800098 + /* we have classifier fields in the struct bio */ +#define HAVE_BIO_CLASSIFIER + return ((u_long)bp->bio_classifier1); +#else +#warning old version!!! + while (bp->bio_parent != NULL) + bp = bp->bio_parent; + + return ((u_long)bp->bio_caller1); +#endif +} + +/* Return the hash chain for the given key. */ +static inline struct g_hash * +g_sched_hash(struct g_sched_softc *sc, u_long key) +{ + + return (&sc->sc_hash[key & sc->sc_mask]); +} + +/* + * Helper function for the children classes, which takes + * a geom and a bio and returns the private descriptor + * associated to the request. This involves fetching + * the classification field and [al]locating the + * corresponding entry in the hash table. + */ +void * +g_sched_get_class(struct g_geom *gp, struct bio *bp) +{ + struct g_sched_softc *sc; + struct g_sched_class *gsc; + struct g_gsched *gsp; + struct g_hash *bucket; + u_long key; + + sc = gp->softc; + key = g_sched_classify(bp); + bucket = g_sched_hash(sc, key); + LIST_FOREACH(gsc, bucket, gsc_clist) { + if (key == gsc->gsc_key) { + gsc->gsc_refs++; + return (gsc->gsc_priv); + } + } + + gsp = sc->sc_gsched; + gsc = malloc(sizeof(*gsc) + gsp->gs_priv_size, + M_GEOM_SCHED, M_NOWAIT | M_ZERO); + if (!gsc) + return (NULL); + + if (gsp->gs_init_class(sc->sc_data, gsc->gsc_priv)) { + free(gsc, M_GEOM_SCHED); + return (NULL); + } + + gsc->gsc_refs = 2; /* 1 for the hash table, 1 for the caller. */ + gsc->gsc_key = key; + LIST_INSERT_HEAD(bucket, gsc, gsc_clist); + + gsc->gsc_expire = ticks + me.gs_expire_secs * hz; + + return (gsc->gsc_priv); +} + +/* + * Release a reference to the per-client descriptor, + */ +void +g_sched_put_class(struct g_geom *gp, void *priv) +{ + struct g_sched_class *gsc; + struct g_sched_softc *sc; + + gsc = g_sched_priv2class(priv); + gsc->gsc_expire = ticks + me.gs_expire_secs * hz; + + if (--gsc->gsc_refs > 0) + return; + + sc = gp->softc; + sc->sc_gsched->gs_fini_class(sc->sc_data, priv); + + LIST_REMOVE(gsc, gsc_clist); + free(gsc, M_GEOM_SCHED); +} + +static void +g_sched_hash_fini(struct g_geom *gp, struct g_hash *hp, u_long mask, + struct g_gsched *gsp, void *data) +{ + struct g_sched_class *cp, *cp2; + int i; + + if (!hp) + return; + + if (data && gsp->gs_hash_unref) + gsp->gs_hash_unref(data); + + for (i = 0; i < G_SCHED_HASH_SIZE; i++) { + LIST_FOREACH_SAFE(cp, &hp[i], gsc_clist, cp2) + g_sched_put_class(gp, cp->gsc_priv); + } + + hashdestroy(hp, M_GEOM_SCHED, mask); +} + +static struct g_hash * +g_sched_hash_init(struct g_gsched *gsp, u_long *mask, int flags) +{ + struct g_hash *hash; + + if (gsp->gs_priv_size == 0) + return (NULL); + + hash = hashinit_flags(G_SCHED_HASH_SIZE, M_GEOM_SCHED, mask, flags); + + return (hash); +} + +static void +g_sched_flush_classes(struct g_geom *gp) +{ + struct g_sched_softc *sc; + struct g_sched_class *cp, *cp2; + int i; + + sc = gp->softc; + + if (!sc->sc_hash || ticks - sc->sc_flush_ticks <= 0) + return; + + for (i = 0; i < G_SCHED_HASH_SIZE; i++) { + LIST_FOREACH_SAFE(cp, &sc->sc_hash[i], gsc_clist, cp2) { + if (cp->gsc_refs == 1 && ticks - cp->gsc_expire > 0) + g_sched_put_class(gp, cp->gsc_priv); + } + } + + sc->sc_flush_ticks = ticks + me.gs_expire_secs * hz; +} + +/* + * Wait for the completion of any outstanding request. To ensure + * that this does not take forever the caller has to make sure that + * no new request enter the scehduler before calling us. + * + * Must be called with the gp mutex held and topology locked. + */ +static int +g_sched_wait_pending(struct g_geom *gp) +{ + struct g_sched_softc *sc = gp->softc; + int endticks = ticks + hz; + + g_topology_assert(); + + while (sc->sc_pending && endticks - ticks >= 0) + msleep(gp, &sc->sc_mtx, 0, "sched_wait_pending", hz / 4); + + return (sc->sc_pending ? ETIMEDOUT : 0); +} + +static int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 17:43:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5DAE1065676; Mon, 12 Apr 2010 17:43:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 934EA8FC2A; Mon, 12 Apr 2010 17:43: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 o3CHhw1L094718; Mon, 12 Apr 2010 17:43:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CHhwMG094706; Mon, 12 Apr 2010 17:43:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004121743.o3CHhwMG094706@svn.freebsd.org> From: Xin LI Date: Mon, 12 Apr 2010 17:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206499 - vendor/libz/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 17:43:58 -0000 Author: delphij Date: Mon Apr 12 17:43:58 2010 New Revision: 206499 URL: http://svn.freebsd.org/changeset/base/206499 Log: Import zlib 1.2.4.3 (trimmed). Modified: vendor/libz/dist/ChangeLog vendor/libz/dist/README vendor/libz/dist/deflate.c vendor/libz/dist/gzguts.h vendor/libz/dist/gzlib.c vendor/libz/dist/inftrees.c vendor/libz/dist/minigzip.c vendor/libz/dist/zconf.h vendor/libz/dist/zlib.3 vendor/libz/dist/zlib.h vendor/libz/dist/zutil.h Modified: vendor/libz/dist/ChangeLog ============================================================================== --- vendor/libz/dist/ChangeLog Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/ChangeLog Mon Apr 12 17:43:58 2010 (r206499) @@ -1,6 +1,34 @@ ChangeLog file for zlib +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + Changes in 1.2.4.1 (28 Mar 2010) - Remove the use of [a-z] constructs for sed in configure [gentoo 310225] - Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] Modified: vendor/libz/dist/README ============================================================================== --- vendor/libz/dist/README Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/README Mon Apr 12 17:43:58 2010 (r206499) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4.1 is a general purpose data compression library. All the code is +zlib 1.2.4.3 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -16,7 +16,8 @@ minigzip.c. To compile all files and run the test program, follow the instructions given at the top of Makefile.in. In short "./configure; make test", and if that goes well, "make install" should work for most flavors of Unix. For Windows, use one -of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. +of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +make_vms.com. Questions about zlib should be sent to , or to Gilles Vollant for the Windows DLL version. The zlib home page is @@ -30,7 +31,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4.1 are documented in the file ChangeLog. +The changes made in version 1.2.4.3 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: vendor/libz/dist/deflate.c ============================================================================== --- vendor/libz/dist/deflate.c Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/deflate.c Mon Apr 12 17:43:58 2010 (r206499) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.4.3 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot Modified: vendor/libz/dist/gzguts.h ============================================================================== --- vendor/libz/dist/gzguts.h Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/gzguts.h Mon Apr 12 17:43:58 2010 (r206499) @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#if _LARGEFILE64_SOURCE == 1 +#ifdef _LARGEFILE64_SOURCE # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif @@ -56,10 +56,12 @@ # endif #endif -#if _LARGEFILE64_SOURCE == 1 -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); #endif /* default i/o buffer size -- double this for output when reading */ Modified: vendor/libz/dist/gzlib.c ============================================================================== --- vendor/libz/dist/gzlib.c Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/gzlib.c Mon Apr 12 17:43:58 2010 (r206499) @@ -5,7 +5,7 @@ #include "gzguts.h" -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 # define LSEEK lseek64 #else # define LSEEK lseek @@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode) O_APPEND))), 0666); if (state->fd == -1) { + free(state->path); free(state); return NULL; } @@ -432,7 +433,8 @@ int ZEXPORT gzeof(file) return 0; /* return end-of-file state */ - return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0; + return state->mode == GZ_READ ? + (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0; } /* -- see zlib.h -- */ Modified: vendor/libz/dist/inftrees.c ============================================================================== --- vendor/libz/dist/inftrees.c Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/inftrees.c Mon Apr 12 17:43:58 2010 (r206499) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4.1 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.4.3 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 195, 66}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: vendor/libz/dist/minigzip.c ============================================================================== --- vendor/libz/dist/minigzip.c Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/minigzip.c Mon Apr 12 17:43:58 2010 (r206499) @@ -32,6 +32,9 @@ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) # include # include +# ifdef UNDER_CE +# include +# endif # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) #else # define SET_BINARY_MODE(file) @@ -50,9 +53,11 @@ # include /* for fileno */ #endif +#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) #ifndef WIN32 /* unlink already in stdio.h for WIN32 */ extern int unlink OF((const char *)); #endif +#endif #if defined(UNDER_CE) # include Modified: vendor/libz/dist/zconf.h ============================================================================== --- vendor/libz/dist/zconf.h Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/zconf.h Mon Apr 12 17:43:58 2010 (r206499) @@ -364,8 +364,11 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) || _LARGEFILE64_SOURCE == 1 +#ifdef STDC # include /* for off_t */ +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_* and off_t */ # ifdef VMS # include /* for off_t */ @@ -385,6 +388,12 @@ typedef uLong FAR uLongf; # define z_off_t long #endif +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + #if defined(__OS400__) # define NO_vsnprintf #endif Modified: vendor/libz/dist/zlib.3 ============================================================================== --- vendor/libz/dist/zlib.3 Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/zlib.3 Mon Apr 12 17:43:58 2010 (r206499) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "28 Mar 2010" +.TH ZLIB 3 "10 Apr 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4.1 +Version 1.2.4.3 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP Modified: vendor/libz/dist/zlib.h ============================================================================== --- vendor/libz/dist/zlib.h Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/zlib.h Mon Apr 12 17:43:58 2010 (r206499) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4.1, March 28th, 2010 + version 1.2.4.3, April 10th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4.1" -#define ZLIB_VERNUM 0x1241 +#define ZLIB_VERSION "1.2.4.3" +#define ZLIB_VERNUM 0x1243 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 4 -#define ZLIB_VER_SUBREVISION 1 +#define ZLIB_VER_SUBREVISION 3 /* The 'zlib' compression library provides in-memory compression and @@ -1556,29 +1556,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); - ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 && _LFS64_LARGEFILE == 1 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 -# if _LARGEFILE64_SOURCE != 1 +# ifdef _LARGEFILE64_SOURCE ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); # endif #else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); @@ -1589,10 +1595,12 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); #endif +/* hack for buggy compilers */ #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ + struct internal_state {int dummy;}; #endif +/* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); Modified: vendor/libz/dist/zutil.h ============================================================================== --- vendor/libz/dist/zutil.h Mon Apr 12 16:51:29 2010 (r206498) +++ vendor/libz/dist/zutil.h Mon Apr 12 17:43:58 2010 (r206499) @@ -154,20 +154,10 @@ extern const char * const z_errmsg[10]; #pragma warn -8066 #endif -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t -#endif - /* provide prototypes for these when building zlib without LFS */ -#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif /* common defaults */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 17:44:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AAB9106566B; Mon, 12 Apr 2010 17:44:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F350D8FC25; Mon, 12 Apr 2010 17:44: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 o3CHigIE094934; Mon, 12 Apr 2010 17:44:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CHigcU094933; Mon, 12 Apr 2010 17:44:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004121744.o3CHigcU094933@svn.freebsd.org> From: Xin LI Date: Mon, 12 Apr 2010 17:44:42 +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: r206500 - vendor/libz/1.2.4.3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 17:44:43 -0000 Author: delphij Date: Mon Apr 12 17:44:42 2010 New Revision: 206500 URL: http://svn.freebsd.org/changeset/base/206500 Log: Tag zlib 1.2.4.3. Added: vendor/libz/1.2.4.3/ - copied from r206499, vendor/libz/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 18:28:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 838E0106564A; Mon, 12 Apr 2010 18:28:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7222F8FC1E; Mon, 12 Apr 2010 18:28: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 o3CIS8No004713; Mon, 12 Apr 2010 18:28:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CIS8Pt004711; Mon, 12 Apr 2010 18:28:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004121828.o3CIS8Pt004711@svn.freebsd.org> From: Warner Losh Date: Mon, 12 Apr 2010 18:28: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: r206501 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 18:28:08 -0000 Author: imp Date: Mon Apr 12 18:28:08 2010 New Revision: 206501 URL: http://svn.freebsd.org/changeset/base/206501 Log: bce, bwi, bwn, mfi, mpt and siba_bwn all now compile that arm and mips have added a BUS_SPACE_UNSPECIFIED definition. Add them back to the mix on these platforms. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 12 17:44:42 2010 (r206500) +++ head/sys/modules/Makefile Mon Apr 12 18:28:08 2010 (r206501) @@ -35,15 +35,15 @@ SUBDIR= ${_3dfx} \ ata \ ath \ ${_auxio} \ - ${_bce} \ + bce \ bfe \ bge \ ${_bios} \ ${_bktr} \ ${_bm} \ bridgestp \ - ${_bwi} \ - ${_bwn} \ + bwi \ + bwn \ cam \ ${_canbepm} \ ${_canbus} \ @@ -176,13 +176,13 @@ SUBDIR= ${_3dfx} \ mcd \ md \ mem \ - ${_mfi} \ + mfi \ mii \ mlx \ ${_mly} \ mmc \ mmcsd \ - ${_mpt} \ + mpt \ mqueue \ msdosfs \ msdosfs_iconv \ @@ -252,7 +252,7 @@ SUBDIR= ${_3dfx} \ sdhci \ sem \ sf \ - ${_siba_bwn} \ + _siba_bwn \ siis \ sis \ sk \ @@ -321,12 +321,6 @@ _vpo= vpo .if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" # no BUS_SPACE_UNSPECIFIED -_bce= bce -_bwi= bwi -_bwn= bwn -_mfi= mfi -_mpt= mpt -_siba_bwn= siba_bwn # No barrier instruction support (specific to this driver) _sym= sym # no uart_cpu_$MACHINE_ARCH From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 20:12:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997D41065674; Mon, 12 Apr 2010 20:12:50 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 540FF8FC18; Mon, 12 Apr 2010 20:12:50 +0000 (UTC) Received: by pwi9 with SMTP id 9so5286035pwi.13 for ; Mon, 12 Apr 2010 13:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lzLf+gE73PSofLC/iC4JNZgJsdpv3d5Ug9Ao0twLSR4=; b=vKFxWtBblEI+xZPtJvxFfoU/p9p9SrIjPVhAvTebEp39dzHHXrxOzBvFlQJG6Y5UVS wPDM3epY+HyAUpgxJghoOxjvgKlLtsZjh52zMVYzpIBYNBLO3hJXcy8M6VFeFIESqfcr bQ66n2nrz72GnoHHKtlquthwh1uqnD1SqcTJI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=cPxlFPHyreIX0SpmZrOxDuBUERjKtjqrM4udov6if/8UQhjhA9+4fI/IQ7OYpKcp6e 40lrLP1ijekZG9/zNYWYQve+oOTyEHMQmi2t7Qbcm6S76FlFcwOdngUu9azyajLGTFm3 NBgCsvmRlR/WP3tY1OwCXkr+VMyvjVw2faU7I= MIME-Version: 1.0 Received: by 10.231.213.16 with HTTP; Mon, 12 Apr 2010 13:12:45 -0700 (PDT) In-Reply-To: <201004121637.o3CGbjSK080066@svn.freebsd.org> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> Date: Mon, 12 Apr 2010 13:12:45 -0700 Received: by 10.141.15.4 with SMTP id s4mr1571256rvi.112.1271103165559; Mon, 12 Apr 2010 13:12:45 -0700 (PDT) Message-ID: From: Navdeep Parhar To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 20:12:50 -0000 On Mon, Apr 12, 2010 at 9:37 AM, Luigi Rizzo wrote: > Author: luigi > Date: Mon Apr 12 16:37:45 2010 > New Revision: 206497 > URL: http://svn.freebsd.org/changeset/base/206497 > > Log: > =A0Bring in geom_sched, support for scheduling disk I/O requests > =A0in a device independent manner. Also include an example anticipatory > =A0scheduler, gsched_rr, which gives very nice performance improvements > =A0in presence of competing random access patterns. > > =A0This is joint work with Fabio Checconi, developed last year > =A0and presented at BSDCan 2009. You can find details in the > =A0README file or at > > =A0http://info.iet.unipi.it/~luigi/geom_sched/ Doesn't build with "options KTR". cc1: warnings being treated as errors /usr/src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sche= d.c: In function 'g_sched_issuer_pid': /usr/src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sche= d.c:759: warning: implicit declaration of function 'g_sched_issuer' /usr/src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sche= d.c:759: warning: nested extern declaration of 'g_sched_issuer' /usr/src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sche= d.c:759: warning: initialization makes pointer from integer without a cast Regards, Navdeep From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 20:49:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588B21065670; Mon, 12 Apr 2010 20:49:33 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 8C13F8FC16; Mon, 12 Apr 2010 20:49:32 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 8E62E45F22; Mon, 12 Apr 2010 22:49:29 +0200 (CEST) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4B9C445EE5; Mon, 12 Apr 2010 22:49:24 +0200 (CEST) Date: Mon, 12 Apr 2010 22:49:26 +0200 From: Pawel Jakub Dawidek To: Luigi Rizzo Message-ID: <20100412204926.GB1743@garage.freebsd.pl> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline In-Reply-To: <201004121637.o3CGbjSK080066@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 20:49:33 -0000 --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 12, 2010 at 04:37:45PM +0000, Luigi Rizzo wrote: > Author: luigi > Date: Mon Apr 12 16:37:45 2010 > New Revision: 206497 > URL: http://svn.freebsd.org/changeset/base/206497 >=20 > Log: > Bring in geom_sched, support for scheduling disk I/O requests > in a device independent manner. Also include an example anticipatory > scheduler, gsched_rr, which gives very nice performance improvements > in presence of competing random access patterns. Nice work:) > Added: head/sbin/geom/class/sched/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/geom/class/sched/Makefile Mon Apr 12 16:37:45 2010 (r206497) > @@ -0,0 +1,19 @@ > +# GEOM_LIBRARY_PATH > +# $FreeBSD$ > + > +.PATH: /usr/src/sbin/geom/misc > + > +CFLAGS +=3D -I/usr/src/sbin/geom This doesn't look right. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --24zk1gE8NUlDmwG9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvDh1YACgkQForvXbEpPzS2EwCeKP8XHcrF0HrI/LdzVOAdbu1w DdYAn1NIxuo6+OGMhQNzBeXIb1ws5hlT =L+Jq -----END PGP SIGNATURE----- --24zk1gE8NUlDmwG9-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 20:53:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8903C106564A; Mon, 12 Apr 2010 20:53:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 773FE8FC13; Mon, 12 Apr 2010 20:53: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 o3CKrHF0037332; Mon, 12 Apr 2010 20:53:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CKrHK9037330; Mon, 12 Apr 2010 20:53:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122053.o3CKrHK9037330@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 20:53: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: r206502 - stable/8/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, 12 Apr 2010 20:53:17 -0000 Author: avg Date: Mon Apr 12 20:53:17 2010 New Revision: 206502 URL: http://svn.freebsd.org/changeset/base/206502 Log: MFC r206098: mountmsdosfs: reject too high value of bytes per cluster Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 18:28:08 2010 (r206501) +++ stable/8/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 20:53:17 2010 (r206502) @@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) || (pmp->pm_HugeSectors == 0) || (pmp->pm_FATsecs == 0) + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) ) { error = EINVAL; goto error_exit; From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 20:54:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EADB4106564A; Mon, 12 Apr 2010 20:54:51 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 97B8E8FC08; Mon, 12 Apr 2010 20:54:50 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 77C21730A1; Mon, 12 Apr 2010 23:05:12 +0200 (CEST) Date: Mon, 12 Apr 2010 23:05:12 +0200 From: Luigi Rizzo To: Pawel Jakub Dawidek Message-ID: <20100412210512.GB94885@onelab2.iet.unipi.it> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100412204926.GB1743@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 20:54:52 -0000 On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: ... > > @@ -0,0 +1,19 @@ > > +# GEOM_LIBRARY_PATH > > +# $FreeBSD$ > > + > > +.PATH: /usr/src/sbin/geom/misc > > + > > +CFLAGS += -I/usr/src/sbin/geom > > This doesn't look right. probably a leftover from older versions of this code for 6.x . I will do more tests tomorrow (for 7.x at this point, there is no point in trying to support 6.x I believe) and try to remove it if not necessary. From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 20:54:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBDF1106566B; Mon, 12 Apr 2010 20:54:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA01C8FC14; Mon, 12 Apr 2010 20:54:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CKsuAU037742; Mon, 12 Apr 2010 20:54:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CKsuh3037740; Mon, 12 Apr 2010 20:54:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122054.o3CKsuh3037740@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 20:54:56 +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: r206503 - 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, 12 Apr 2010 20:54:56 -0000 Author: avg Date: Mon Apr 12 20:54:56 2010 New Revision: 206503 URL: http://svn.freebsd.org/changeset/base/206503 Log: MFC r206098: mountmsdosfs: reject too high value of bytes per cluster Modified: stable/7/sys/fs/msdosfs/msdosfs_vfsops.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/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- stable/7/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 20:53:17 2010 (r206502) +++ stable/7/sys/fs/msdosfs/msdosfs_vfsops.c Mon Apr 12 20:54:56 2010 (r206503) @@ -558,6 +558,7 @@ mountmsdosfs(struct vnode *devvp, struct || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) || (pmp->pm_HugeSectors == 0) || (pmp->pm_FATsecs == 0) + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) ) { error = EINVAL; goto error_exit; From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:03:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 150851065705; Mon, 12 Apr 2010 21:03:00 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E02888FC25; Mon, 12 Apr 2010 21:02:58 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA04401; Tue, 13 Apr 2010 00:02:56 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O1QmW-000Iu9-Cx; Tue, 13 Apr 2010 00:02:56 +0300 Message-ID: <4BC38A7F.4040003@freebsd.org> Date: Tue, 13 Apr 2010 00:02:55 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201004021522.o32FMNgu095467@svn.freebsd.org> In-Reply-To: <201004021522.o32FMNgu095467@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r206098 - head/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, 12 Apr 2010 21:03:00 -0000 on 02/04/2010 18:22 Andriy Gapon said the following: > Author: avg > Date: Fri Apr 2 15:22:23 2010 > New Revision: 206098 > URL: http://svn.freebsd.org/changeset/base/206098 > > Log: > mountmsdosfs: reject too high value of bytes per cluster > > Bytes per cluster are calcuated as bytes per sector times sectors per > cluster. Too high value can overflow an internal variable with type > that can hold only values in valid range. Trying to use a wider type > results in an attempt to read more than MAXBSIZE at once, a panic. > Unfortunately, it is FreeBSD newfs_msdos that produces filesystems > with invalid parameters for certain types of media. Now that this change is MFC-ed I want to state for the record that I am not sure that this is the best or even correct fix. Couple of things are mixed here: 1. Constraint violation of original FAT spec with implied 512-byte sector size. 2. Violation of FreeBSD buffer cache limit on block size. The fix might be overly defensive. Perhaps msdos code needs to be taught how to properly handle bytes/cluster ratio greater than MAXBSIZE. Those two are not related and msdos code should know better than to make too large reads, it should split them in smaller reads of allowed size. > Reported by: Fabian Keil , > Paul B. Mahol > Discussed with: bde, kib > MFC after: 1 week > X-ToDo: fix newfs_msdos > > Modified: > head/sys/fs/msdosfs/msdosfs_vfsops.c > > Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c > ============================================================================== > --- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Apr 2 15:12:31 2010 (r206097) > +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri Apr 2 15:22:23 2010 (r206098) > @@ -580,6 +580,7 @@ mountmsdosfs(struct vnode *devvp, struct > || (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1)) > || (pmp->pm_HugeSectors == 0) > || (pmp->pm_FATsecs == 0) > + || (SecPerClust * pmp->pm_BlkPerSec > MAXBSIZE / DEV_BSIZE) > ) { > error = EINVAL; > goto error_exit; -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:04:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A6F6106566C; Mon, 12 Apr 2010 21:04:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EC2F8FC1B; Mon, 12 Apr 2010 21:04: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 o3CL4aBK039925; Mon, 12 Apr 2010 21:04:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL4a2g039920; Mon, 12 Apr 2010 21:04:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122104.o3CL4a2g039920@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:04: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: r206504 - stable/8/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 21:04:36 -0000 Author: avg Date: Mon Apr 12 21:04:35 2010 New Revision: 206504 URL: http://svn.freebsd.org/changeset/base/206504 Log: MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types Modified: stable/8/usr.bin/indent/args.c stable/8/usr.bin/indent/indent.1 stable/8/usr.bin/indent/indent_globs.h stable/8/usr.bin/indent/lexi.c Directory Properties: stable/8/usr.bin/indent/ (props changed) Modified: stable/8/usr.bin/indent/args.c ============================================================================== --- stable/8/usr.bin/indent/args.c Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/args.c Mon Apr 12 21:04:35 2010 (r206504) @@ -157,6 +157,7 @@ struct pro { {"sc", PRO_BOOL, true, ON, &star_comment_cont}, {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, + {"ta", PRO_BOOL, false, ON, &auto_typedefs}, {"troff", PRO_BOOL, false, ON, &troff}, {"ut", PRO_BOOL, true, ON, &use_tabs}, {"v", PRO_BOOL, false, ON, &verbose}, Modified: stable/8/usr.bin/indent/indent.1 ============================================================================== --- stable/8/usr.bin/indent/indent.1 Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/indent.1 Mon Apr 12 21:04:35 2010 (r206504) @@ -80,6 +80,7 @@ .Op Fl sob | Fl nsob .Ek .Op Fl \&st +.Op Fl \&ta .Op Fl troff .Op Fl ut | Fl nut .Op Fl v | Fl \&nv @@ -377,6 +378,9 @@ Default: Causes .Nm to take its input from stdin and put its output to stdout. +.It Fl ta +Automatically add all identifiers ending in "_t" to the list +of type keywords. .It Fl T Ns Ar typename Adds .Ar typename Modified: stable/8/usr.bin/indent/indent_globs.h ============================================================================== --- stable/8/usr.bin/indent/indent_globs.h Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/indent_globs.h Mon Apr 12 21:04:35 2010 (r206504) @@ -204,6 +204,8 @@ int function_brace_split; /* split f * brace onto separate lines */ int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ +int auto_typedefs; /* set true to recognize identifiers + * ending in "_t" like typedefs */ /* -troff font state information */ Modified: stable/8/usr.bin/indent/lexi.c ============================================================================== --- stable/8/usr.bin/indent/lexi.c Mon Apr 12 20:54:56 2010 (r206503) +++ stable/8/usr.bin/indent/lexi.c Mon Apr 12 21:04:35 2010 (r206504) @@ -249,6 +249,17 @@ lexi(void) last_code = ident; /* Remember that this is the code we will * return */ + if (auto_typedefs) { + const char *q = s_token; + /* Check if we have an "_t" in the end */ + if (q[0] && q[1] && + (strcmp(q + strlen(q) - 2, "_t") == 0)) { + ps.its_a_keyword = true; + ps.last_u_d = true; + goto found_auto_typedef; + } + } + /* * This loop will check if the token is a keyword. */ @@ -285,6 +296,7 @@ lexi(void) /* FALLTHROUGH */ case 4: /* one of the declaration keywords */ + found_auto_typedef: if (ps.p_l_follow) { ps.cast_mask |= (1 << ps.p_l_follow) & ~ps.sizeof_mask; break; /* inside parens: cast, param list or sizeof */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:05:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCF78106567C; Mon, 12 Apr 2010 21:05:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B06408FC21; Mon, 12 Apr 2010 21:05: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 o3CL5anu040182; Mon, 12 Apr 2010 21:05:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL5aRI040177; Mon, 12 Apr 2010 21:05:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122105.o3CL5aRI040177@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206505 - stable/7/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 21:05:37 -0000 Author: avg Date: Mon Apr 12 21:05:36 2010 New Revision: 206505 URL: http://svn.freebsd.org/changeset/base/206505 Log: MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types Modified: stable/7/usr.bin/indent/args.c stable/7/usr.bin/indent/indent.1 stable/7/usr.bin/indent/indent_globs.h stable/7/usr.bin/indent/lexi.c Directory Properties: stable/7/usr.bin/indent/ (props changed) Modified: stable/7/usr.bin/indent/args.c ============================================================================== --- stable/7/usr.bin/indent/args.c Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/args.c Mon Apr 12 21:05:36 2010 (r206505) @@ -157,6 +157,7 @@ struct pro { {"sc", PRO_BOOL, true, ON, &star_comment_cont}, {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, + {"ta", PRO_BOOL, false, ON, &auto_typedefs}, {"troff", PRO_BOOL, false, ON, &troff}, {"ut", PRO_BOOL, true, ON, &use_tabs}, {"v", PRO_BOOL, false, ON, &verbose}, Modified: stable/7/usr.bin/indent/indent.1 ============================================================================== --- stable/7/usr.bin/indent/indent.1 Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/indent.1 Mon Apr 12 21:05:36 2010 (r206505) @@ -80,6 +80,7 @@ .Op Fl sob | Fl nsob .Ek .Op Fl \&st +.Op Fl \&ta .Op Fl troff .Op Fl ut | Fl nut .Op Fl v | Fl \&nv @@ -377,6 +378,9 @@ Default: Causes .Nm to take its input from stdin and put its output to stdout. +.It Fl ta +Automatically add all identifiers ending in "_t" to the list +of type keywords. .It Fl T Ns Ar typename Adds .Ar typename Modified: stable/7/usr.bin/indent/indent_globs.h ============================================================================== --- stable/7/usr.bin/indent/indent_globs.h Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/indent_globs.h Mon Apr 12 21:05:36 2010 (r206505) @@ -204,6 +204,8 @@ int function_brace_split; /* split f * brace onto separate lines */ int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ +int auto_typedefs; /* set true to recognize identifiers + * ending in "_t" like typedefs */ /* -troff font state information */ Modified: stable/7/usr.bin/indent/lexi.c ============================================================================== --- stable/7/usr.bin/indent/lexi.c Mon Apr 12 21:04:35 2010 (r206504) +++ stable/7/usr.bin/indent/lexi.c Mon Apr 12 21:05:36 2010 (r206505) @@ -249,6 +249,17 @@ lexi(void) last_code = ident; /* Remember that this is the code we will * return */ + if (auto_typedefs) { + const char *q = s_token; + /* Check if we have an "_t" in the end */ + if (q[0] && q[1] && + (strcmp(q + strlen(q) - 2, "_t") == 0)) { + ps.its_a_keyword = true; + ps.last_u_d = true; + goto found_auto_typedef; + } + } + /* * This loop will check if the token is a keyword. */ @@ -285,6 +296,7 @@ lexi(void) /* FALLTHROUGH */ case 4: /* one of the declaration keywords */ + found_auto_typedef: if (ps.p_l_follow) { ps.cast_mask |= (1 << ps.p_l_follow) & ~ps.sizeof_mask; break; /* inside parens: cast, param list or sizeof */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:07:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDCB7106564A; Mon, 12 Apr 2010 21:07:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC7578FC13; Mon, 12 Apr 2010 21:07: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 o3CL7whX040755; Mon, 12 Apr 2010 21:07:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL7wFF040753; Mon, 12 Apr 2010 21:07:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122107.o3CL7wFF040753@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206506 - stable/8/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: Mon, 12 Apr 2010 21:07:58 -0000 Author: avg Date: Mon Apr 12 21:07:58 2010 New Revision: 206506 URL: http://svn.freebsd.org/changeset/base/206506 Log: MFC r206128: ffs_mount: remove redundant assignment of to devvp.v_bufobj Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:05:36 2010 (r206505) +++ stable/8/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:07:58 2010 (r206506) @@ -650,7 +650,6 @@ ffs_mountfs(devvp, mp, td) if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - devvp->v_bufobj.bo_private = cp; devvp->v_bufobj.bo_ops = &ffs_ops; fs = NULL; From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:09:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D2B11065672; Mon, 12 Apr 2010 21:09:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC928FC16; Mon, 12 Apr 2010 21:09: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 o3CL9Dq9041072; Mon, 12 Apr 2010 21:09:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CL9D4p041070; Mon, 12 Apr 2010 21:09:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122109.o3CL9D4p041070@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:09: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: r206507 - stable/7/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: Mon, 12 Apr 2010 21:09:13 -0000 Author: avg Date: Mon Apr 12 21:09:13 2010 New Revision: 206507 URL: http://svn.freebsd.org/changeset/base/206507 Log: MFC r206128: ffs_mount: remove redundant assignment to devvp.v_bufobj Modified: stable/7/sys/ufs/ffs/ffs_vfsops.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/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:07:58 2010 (r206506) +++ stable/7/sys/ufs/ffs/ffs_vfsops.c Mon Apr 12 21:09:13 2010 (r206507) @@ -649,7 +649,6 @@ ffs_mountfs(devvp, mp, td) if (mp->mnt_iosize_max > MAXPHYS) mp->mnt_iosize_max = MAXPHYS; - devvp->v_bufobj.bo_private = cp; devvp->v_bufobj.bo_ops = &ffs_ops; fs = NULL; From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:12:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74DA7106566C; Mon, 12 Apr 2010 21:12:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634AA8FC08; Mon, 12 Apr 2010 21:12: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 o3CLC39Y041796; Mon, 12 Apr 2010 21:12:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLC30K041793; Mon, 12 Apr 2010 21:12:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122112.o3CLC30K041793@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:12:03 +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: r206508 - stable/8/lib/libc/db/hash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 21:12:03 -0000 Author: avg Date: Mon Apr 12 21:12:03 2010 New Revision: 206508 URL: http://svn.freebsd.org/changeset/base/206508 Log: MFC r206178: ibc/db/hash: cap auto-tuned block size Modified: stable/8/lib/libc/db/hash/hash.c stable/8/lib/libc/db/hash/hash.h Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/db/hash/hash.c ============================================================================== --- stable/8/lib/libc/db/hash/hash.c Mon Apr 12 21:09:13 2010 (r206507) +++ stable/8/lib/libc/db/hash/hash.c Mon Apr 12 21:12:03 2010 (r206508) @@ -293,6 +293,8 @@ init_hash(HTAB *hashp, const char *file, if (stat(file, &statbuf)) return (NULL); hashp->BSIZE = statbuf.st_blksize; + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; hashp->BSHIFT = __log2(hashp->BSIZE); } Modified: stable/8/lib/libc/db/hash/hash.h ============================================================================== --- stable/8/lib/libc/db/hash/hash.h Mon Apr 12 21:09:13 2010 (r206507) +++ stable/8/lib/libc/db/hash/hash.h Mon Apr 12 21:12:03 2010 (r206508) @@ -118,7 +118,7 @@ typedef struct htab { /* Memory reside /* * Constants */ -#define MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */ #define MIN_BUFFERS 6 #define MINHDRSIZE 512 #define DEF_BUFSIZE 65536 /* 64 K */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:13:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C2A106566C; Mon, 12 Apr 2010 21:13:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 577E78FC1C; Mon, 12 Apr 2010 21:13: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 o3CLD31W042075; Mon, 12 Apr 2010 21:13:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLD3ht042072; Mon, 12 Apr 2010 21:13:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122113.o3CLD3ht042072@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:13: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: r206509 - stable/7/lib/libc/db/hash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 21:13:03 -0000 Author: avg Date: Mon Apr 12 21:13:03 2010 New Revision: 206509 URL: http://svn.freebsd.org/changeset/base/206509 Log: MFC r206178: ibc/db/hash: cap auto-tuned block size Modified: stable/7/lib/libc/db/hash/hash.c stable/7/lib/libc/db/hash/hash.h Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/db/hash/hash.c ============================================================================== --- stable/7/lib/libc/db/hash/hash.c Mon Apr 12 21:12:03 2010 (r206508) +++ stable/7/lib/libc/db/hash/hash.c Mon Apr 12 21:13:03 2010 (r206509) @@ -309,6 +309,8 @@ init_hash(hashp, file, info) if (stat(file, &statbuf)) return (NULL); hashp->BSIZE = statbuf.st_blksize; + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; hashp->BSHIFT = __log2(hashp->BSIZE); } Modified: stable/7/lib/libc/db/hash/hash.h ============================================================================== --- stable/7/lib/libc/db/hash/hash.h Mon Apr 12 21:12:03 2010 (r206508) +++ stable/7/lib/libc/db/hash/hash.h Mon Apr 12 21:13:03 2010 (r206509) @@ -118,7 +118,7 @@ typedef struct htab { /* Memory reside /* * Constants */ -#define MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */ #define MIN_BUFFERS 6 #define MINHDRSIZE 512 #define DEF_BUFSIZE 65536 /* 64 K */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:18:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D4801065676; Mon, 12 Apr 2010 21:18:28 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 2C9568FC14; Mon, 12 Apr 2010 21:18:27 +0000 (UTC) Received: from [10.170.20.44] (nat-170-141-177-44.tn.gov [170.141.177.44]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id o3CLIPVx045336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Apr 2010 17:18:26 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) Message-ID: <4BC38E17.1040709@FreeBSD.org> Date: Mon, 12 Apr 2010 16:18:15 -0500 From: Robert Noland Organization: FreeBSD User-Agent: Thunderbird 2.0.0.19 (X11/20090218) MIME-Version: 1.0 To: Warner Losh References: <201004121828.o3CIS8Pt004711@svn.freebsd.org> In-Reply-To: <201004121828.o3CIS8Pt004711@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.1 required=5.0 tests=AWL, BAYES_00, FH_DATE_PAST_20XX, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206501 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:18:28 -0000 Warner Losh wrote: > Author: imp > Date: Mon Apr 12 18:28:08 2010 > New Revision: 206501 > URL: http://svn.freebsd.org/changeset/base/206501 > > Log: > bce, bwi, bwn, mfi, mpt and siba_bwn all now compile that arm and mips > have added a BUS_SPACE_UNSPECIFIED definition. Add them back to the > mix on these platforms. > > Modified: > head/sys/modules/Makefile > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Mon Apr 12 17:44:42 2010 (r206500) > +++ head/sys/modules/Makefile Mon Apr 12 18:28:08 2010 (r206501) > @@ -35,15 +35,15 @@ SUBDIR= ${_3dfx} \ > ata \ > ath \ > ${_auxio} \ > - ${_bce} \ > + bce \ > bfe \ > bge \ > ${_bios} \ > ${_bktr} \ > ${_bm} \ > bridgestp \ > - ${_bwi} \ > - ${_bwn} \ > + bwi \ > + bwn \ > cam \ > ${_canbepm} \ > ${_canbus} \ > @@ -176,13 +176,13 @@ SUBDIR= ${_3dfx} \ > mcd \ > md \ > mem \ > - ${_mfi} \ > + mfi \ > mii \ > mlx \ > ${_mly} \ > mmc \ > mmcsd \ > - ${_mpt} \ > + mpt \ > mqueue \ > msdosfs \ > msdosfs_iconv \ > @@ -252,7 +252,7 @@ SUBDIR= ${_3dfx} \ > sdhci \ > sem \ > sf \ > - ${_siba_bwn} \ > + _siba_bwn \ This typo has broken the build. s/_siba_bwn/siba_bwn/ robert. > siis \ > sis \ > sk \ > @@ -321,12 +321,6 @@ _vpo= vpo > > .if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" > # no BUS_SPACE_UNSPECIFIED > -_bce= bce > -_bwi= bwi > -_bwn= bwn > -_mfi= mfi > -_mpt= mpt > -_siba_bwn= siba_bwn > # No barrier instruction support (specific to this driver) > _sym= sym > # no uart_cpu_$MACHINE_ARCH From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:18:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24741065677; Mon, 12 Apr 2010 21:18:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B63FE8FC1D; Mon, 12 Apr 2010 21:18: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 o3CLIwrc043475; Mon, 12 Apr 2010 21:18:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLIw5R043473; Mon, 12 Apr 2010 21:18:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122118.o3CLIw5R043473@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206510 - stable/8/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 21:18:59 -0000 Author: avg Date: Mon Apr 12 21:18:58 2010 New Revision: 206510 URL: http://svn.freebsd.org/changeset/base/206510 Log: MFC r206102,206103,206175,206176: add example indent.pro file Added: stable/8/share/examples/indent/ - copied from r206102, head/share/examples/indent/ Modified: stable/8/share/examples/indent/indent.pro Directory Properties: stable/8/share/examples/ (props changed) Modified: stable/8/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) +++ stable/8/share/examples/indent/indent.pro Mon Apr 12 21:18:58 2010 (r206510) @@ -1,122 +1,11 @@ -TFILE --T__sighandler_t --Tblist_t --Tblmeta_t --Tboolean_t --Tbus_addr_t --Tbus_dma_segment_t --Tbus_dma_tag_t --Tbus_dmamap_t --Tbus_size_t --Tbus_space_handle_t --Tc_db_sym_t --Tc_linker_sym_t --Tcaddr_t --Tclock_t --Tcomp_t --Tctor_t --Td_close_t --Td_ioctl_t --Td_open_t --Td_thread_t --Tdaddr_t --Tdb_addr_t --Tdb_expr_t --Tdb_sym_t --Tdev_t --Tdevice_t --Tdriver_intr_t --Tdriver_t --Tdumper_t --Telf_file_t -Tfd_mask -Tfd_set --Tfixpt_t --Tgid_t --Tin_addr_t --Tino_t --Tint16_t --Tint32_t --Tint64_t --Tint8_t --Tintmax_t --Tintptr_t --Tkey_t --Tkobj_class_t --Tkobj_t --Tlinker_file_t -Tlinker_sym_tT --Tlinker_symval_t --Tmode_t --Tmodeventhand_t --Tmodeventtype_t --Tmodspecific_t --Tmoduledata_t --Tnetisr_t --Tng_ID_t --Tnlink_t --Toff_t --Tpd_entry_t --Tpid_t --Tpmap_t --Tpoll_handler_t --Tpps_params_t --Tprfpregset_t --Tprpsinfo_t --Tprstatus_t --Tpt_entry_t --Tqaddr_t --Tquad_t --Tregister_t --Trlim_t --Tsa_family_t --Tsemid_t --Tsiginfo_t --Tsigset_t --Tsize_t --Tsocklen_t --Tspeed_t --Tssize_t --Tstack_t --Tsy_call_t --Tsysinit_cfunc_t --Ttime_t -Tu_char --Tu_daddr_t -Tu_int --Tu_int16_t --Tu_int32_t --Tu_int64_t --Tu_int8_t -Tu_long --Tu_quad_t -Tu_short --Tudev_t --Tufs1_daddr_t --Tufs2_daddr_t --Tuid_t --Tuint16_t --Tuint32_t --Tuint64_t --Tuint8_t --Tuintfptr_t --Tuintmax_t --Tuintptr_t --Tuma_slab_t --Tuma_zone_t --Tuoff_t --Tv_caddr_t --Tvaddr_t --Tvm_map_t --Tvm_object_t --Tvm_offset_t --Tvm_ooffset_t --Tvm_paddr_t --Tvm_page_t --Tvm_pindex_t --Tvm_size_t --Tvop_t --Txdrproc_t -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD @@ -125,5 +14,33 @@ -TSTAILQ_ENTRY -TSLIST_HEAD -TSLIST_ENTRY --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv +-bad +-bap +-nbbb +-nbc +-br +-nbs +-c41 +-cd41 +-cdb +-ce +-ci4 +-cli0 +-d0 +-di8 +-ndj +-ei +-nfc1 +-nfcb +-i8 +-ip8 +-l79 +-lc77 +-ldi0 +-nlp +-npcs +-psl +-sc +-nsob +-ta +-nv From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:29:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B01106564A; Mon, 12 Apr 2010 21:29:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 969818FC1B; Mon, 12 Apr 2010 21:29: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 o3CLT4J3045871; Mon, 12 Apr 2010 21:29:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLT4nE045869; Mon, 12 Apr 2010 21:29:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004122129.o3CLT4nE045869@svn.freebsd.org> From: Andriy Gapon Date: Mon, 12 Apr 2010 21:29:04 +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: r206511 - stable/7/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 21:29:04 -0000 Author: avg Date: Mon Apr 12 21:29:04 2010 New Revision: 206511 URL: http://svn.freebsd.org/changeset/base/206511 Log: MFC r206102,206103,206175,206176: add example indent.pro file Added: stable/7/share/examples/indent/ - copied from r206102, head/share/examples/indent/ Modified: stable/7/share/examples/indent/indent.pro Directory Properties: stable/7/share/examples/ (props changed) Modified: stable/7/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Fri Apr 2 16:06:46 2010 (r206102) +++ stable/7/share/examples/indent/indent.pro Mon Apr 12 21:29:04 2010 (r206511) @@ -1,122 +1,11 @@ -TFILE --T__sighandler_t --Tblist_t --Tblmeta_t --Tboolean_t --Tbus_addr_t --Tbus_dma_segment_t --Tbus_dma_tag_t --Tbus_dmamap_t --Tbus_size_t --Tbus_space_handle_t --Tc_db_sym_t --Tc_linker_sym_t --Tcaddr_t --Tclock_t --Tcomp_t --Tctor_t --Td_close_t --Td_ioctl_t --Td_open_t --Td_thread_t --Tdaddr_t --Tdb_addr_t --Tdb_expr_t --Tdb_sym_t --Tdev_t --Tdevice_t --Tdriver_intr_t --Tdriver_t --Tdumper_t --Telf_file_t -Tfd_mask -Tfd_set --Tfixpt_t --Tgid_t --Tin_addr_t --Tino_t --Tint16_t --Tint32_t --Tint64_t --Tint8_t --Tintmax_t --Tintptr_t --Tkey_t --Tkobj_class_t --Tkobj_t --Tlinker_file_t -Tlinker_sym_tT --Tlinker_symval_t --Tmode_t --Tmodeventhand_t --Tmodeventtype_t --Tmodspecific_t --Tmoduledata_t --Tnetisr_t --Tng_ID_t --Tnlink_t --Toff_t --Tpd_entry_t --Tpid_t --Tpmap_t --Tpoll_handler_t --Tpps_params_t --Tprfpregset_t --Tprpsinfo_t --Tprstatus_t --Tpt_entry_t --Tqaddr_t --Tquad_t --Tregister_t --Trlim_t --Tsa_family_t --Tsemid_t --Tsiginfo_t --Tsigset_t --Tsize_t --Tsocklen_t --Tspeed_t --Tssize_t --Tstack_t --Tsy_call_t --Tsysinit_cfunc_t --Ttime_t -Tu_char --Tu_daddr_t -Tu_int --Tu_int16_t --Tu_int32_t --Tu_int64_t --Tu_int8_t -Tu_long --Tu_quad_t -Tu_short --Tudev_t --Tufs1_daddr_t --Tufs2_daddr_t --Tuid_t --Tuint16_t --Tuint32_t --Tuint64_t --Tuint8_t --Tuintfptr_t --Tuintmax_t --Tuintptr_t --Tuma_slab_t --Tuma_zone_t --Tuoff_t --Tv_caddr_t --Tvaddr_t --Tvm_map_t --Tvm_object_t --Tvm_offset_t --Tvm_ooffset_t --Tvm_paddr_t --Tvm_page_t --Tvm_pindex_t --Tvm_size_t --Tvop_t --Txdrproc_t -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD @@ -125,5 +14,33 @@ -TSTAILQ_ENTRY -TSLIST_HEAD -TSLIST_ENTRY --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv +-bad +-bap +-nbbb +-nbc +-br +-nbs +-c41 +-cd41 +-cdb +-ce +-ci4 +-cli0 +-d0 +-di8 +-ndj +-ei +-nfc1 +-nfcb +-i8 +-ip8 +-l79 +-lc77 +-ldi0 +-nlp +-npcs +-psl +-sc +-nsob +-ta +-nv From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:33:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0FA61065673; Mon, 12 Apr 2010 21:33:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 864198FC08; Mon, 12 Apr 2010 21:33: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 o3CLX6T5046814; Mon, 12 Apr 2010 21:33:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLX69K046812; Mon, 12 Apr 2010 21:33:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004122133.o3CLX69K046812@svn.freebsd.org> From: Warner Losh Date: Mon, 12 Apr 2010 21:33: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: r206512 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:33:06 -0000 Author: imp Date: Mon Apr 12 21:33:06 2010 New Revision: 206512 URL: http://svn.freebsd.org/changeset/base/206512 Log: Doh! Last minute changes bites me in the butt.... Remove _ to make things build again. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 12 21:29:04 2010 (r206511) +++ head/sys/modules/Makefile Mon Apr 12 21:33:06 2010 (r206512) @@ -252,7 +252,7 @@ SUBDIR= ${_3dfx} \ sdhci \ sem \ sf \ - _siba_bwn \ + siba_bwn \ siis \ sis \ sk \ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:37:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B825E106564A; Mon, 12 Apr 2010 21:37:28 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5D448FC13; Mon, 12 Apr 2010 21:37: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 o3CLbSLF047826; Mon, 12 Apr 2010 21:37:28 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLbSB1047821; Mon, 12 Apr 2010 21:37:28 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004122137.o3CLbSB1047821@svn.freebsd.org> From: Fabien Thomas Date: Mon, 12 Apr 2010 21: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: r206513 - stable/8/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: Mon, 12 Apr 2010 21:37:28 -0000 Author: fabient Date: Mon Apr 12 21:37:28 2010 New Revision: 206513 URL: http://svn.freebsd.org/changeset/base/206513 Log: MFC r206090: Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c stable/8/usr.sbin/pmcstat/pmcpl_calltree.c stable/8/usr.sbin/pmcstat/pmcstat_log.c stable/8/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:37:28 2010 (r206513) @@ -341,6 +341,7 @@ pmcpl_cg_process(struct pmcstat_process parent = pmcstat_cgnode_hash_lookup_pc(pp, pmcid, pc, usermode); if (parent == NULL) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/8/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:37:28 2010 (r206513) @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct &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; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) 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_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:37:28 2010 (r206513) @@ -247,6 +247,7 @@ static int pmcstat_string_compute_hash(c static void pmcstat_string_initialize(void); static int pmcstat_string_lookup_hash(pmcstat_interned_string _is); static void pmcstat_string_shutdown(void); +static void pmcstat_stats_reset(void); /* * A simple implementation of interned strings. Each interned string @@ -274,6 +275,21 @@ int pmcstat_npmcs; */ int pmcstat_pause; +static void +pmcstat_stats_reset(void) +{ + struct pmcstat_pmcrecord *pr; + + /* Flush PMCs stats. */ + LIST_FOREACH(pr, &pmcstat_pmcs, pr_next) { + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; + } + + /* Flush global stats. */ + bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); +} + /* * Compute a 'hash' value for a string. */ @@ -1009,6 +1025,8 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcsta pr->pr_pmcid = pmcid; pr->pr_pmcname = ps; pr->pr_pmcin = pmcstat_npmcs++; + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; pr->pr_merge = prm == NULL ? pr : prm; LIST_INSERT_HEAD(&pmcstat_pmcs, pr, pr_next); @@ -1387,6 +1405,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1420,6 +1439,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_cc.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1787,32 +1807,46 @@ pmcstat_process_log(void) static void pmcstat_refresh_top(void) { + int v_attrs; + float v; char pmcname[40]; - const char *s; + struct pmcstat_pmcrecord *pmcpr; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; /* Wait until PMC pop in the log. */ - s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); - if (s == NULL) + pmcpr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (pmcpr == NULL) return; /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", s); + snprintf(pmcname, sizeof(pmcname), "[%s]", + pmcstat_string_unintern(pmcpr->pr_pmcname)); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - s, pmcstat_pmcinfilter); + pmcstat_string_unintern(pmcpr->pr_pmcname), + pmcstat_pmcinfilter); + + /* Format samples count. */ + if (pmcstat_stats.ps_samples_total > 0) + v = (pmcpr->pr_samples * 100.0) / + pmcstat_stats.ps_samples_total; + else + v = 0.; + v_attrs = PMCSTAT_ATTRPERCENT(v); PMCSTAT_PRINTBEGIN(); - PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", + PMCSTAT_PRINTW("PMC: %s Samples: %u ", pmcname, - pmcstat_stats.ps_samples_total, - pmcstat_stats.ps_samples_unknown_offset + - pmcstat_stats.ps_samples_indeterminable + - pmcstat_stats.ps_callchain_dubious_frames); + pmcpr->pr_samples); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("(%.1f%%) ", v); + PMCSTAT_ATTROFF(v_attrs); + PMCSTAT_PRINTW(", %u unresolved\n\n", + pmcpr->pr_dubious_frames); if (plugins[args.pa_plugin].pl_topdisplay != NULL) plugins[args.pa_plugin].pl_topdisplay(); PMCSTAT_PRINTEND(); @@ -1879,7 +1913,7 @@ pmcstat_keypress_log(void) */ if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); @@ -1900,7 +1934,7 @@ pmcstat_keypress_log(void) } while (plugins[args.pa_plugin].pl_topdisplay == NULL); /* Open new plugin. */ - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); wprintw(w, "switching to plugin %s", @@ -1949,7 +1983,7 @@ pmcstat_display_log(void) if (args.pa_topmode == PMCSTAT_TOP_DELTA) { if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); } Modified: stable/8/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:33:06 2010 (r206512) +++ stable/8/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:37:28 2010 (r206513) @@ -146,6 +146,8 @@ struct pmcstat_pmcrecord { pmc_id_t pr_pmcid; int pr_pmcin; pmcstat_interned_string pr_pmcname; + int pr_samples; + int pr_dubious_frames; struct pmcstat_pmcrecord *pr_merge; }; extern LIST_HEAD(pmcstat_pmcs, pmcstat_pmcrecord) pmcstat_pmcs; /* PMC list */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 21:42:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92A64106566C; Mon, 12 Apr 2010 21:42:01 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 805A88FC08; Mon, 12 Apr 2010 21:42: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 o3CLg1qp048874; Mon, 12 Apr 2010 21:42:01 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CLg1LI048869; Mon, 12 Apr 2010 21:42:01 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004122142.o3CLg1LI048869@svn.freebsd.org> From: Fabien Thomas Date: Mon, 12 Apr 2010 21:42: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: r206514 - stable/7/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: Mon, 12 Apr 2010 21:42:01 -0000 Author: fabient Date: Mon Apr 12 21:42:01 2010 New Revision: 206514 URL: http://svn.freebsd.org/changeset/base/206514 Log: MFC r206090: Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c stable/7/usr.sbin/pmcstat/pmcpl_calltree.c stable/7/usr.sbin/pmcstat/pmcstat_log.c stable/7/usr.sbin/pmcstat/pmcstat_log.h Directory Properties: stable/7/usr.sbin/pmcstat/ (props changed) Modified: stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcpl_callgraph.c Mon Apr 12 21:42:01 2010 (r206514) @@ -341,6 +341,7 @@ pmcpl_cg_process(struct pmcstat_process parent = pmcstat_cgnode_hash_lookup_pc(pp, pmcid, pc, usermode); if (parent == NULL) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/7/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcpl_calltree.c Mon Apr 12 21:42:01 2010 (r206514) @@ -403,6 +403,10 @@ pmcpl_ct_node_dumptop(int pmcin, struct &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; if (PMCPL_CT_SAMPLEP(pmcin, &ct->pct_arc[i].pcta_samples) > pmcstat_threshold) { if (pmcpl_ct_node_dumptop(pmcin, @@ -516,6 +520,10 @@ pmcpl_ct_topdisplay(void) 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_node_dumptop(pmcin, pmcpl_ct_root->pct_arc[i].pcta_child, &rsamples, x, &y, pmcstat_displayheight - 2)) { @@ -693,6 +701,7 @@ pmcpl_ct_process(struct pmcstat_process } if (n-- == 0) { pmcstat_stats.ps_callchain_dubious_frames++; + pmcr->pr_dubious_frames++; return; } Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.c Mon Apr 12 21:42:01 2010 (r206514) @@ -247,6 +247,7 @@ static int pmcstat_string_compute_hash(c static void pmcstat_string_initialize(void); static int pmcstat_string_lookup_hash(pmcstat_interned_string _is); static void pmcstat_string_shutdown(void); +static void pmcstat_stats_reset(void); /* * A simple implementation of interned strings. Each interned string @@ -274,6 +275,21 @@ int pmcstat_npmcs; */ int pmcstat_pause; +static void +pmcstat_stats_reset(void) +{ + struct pmcstat_pmcrecord *pr; + + /* Flush PMCs stats. */ + LIST_FOREACH(pr, &pmcstat_pmcs, pr_next) { + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; + } + + /* Flush global stats. */ + bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); +} + /* * Compute a 'hash' value for a string. */ @@ -1009,6 +1025,8 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcsta pr->pr_pmcid = pmcid; pr->pr_pmcname = ps; pr->pr_pmcin = pmcstat_npmcs++; + pr->pr_samples = 0; + pr->pr_dubious_frames = 0; pr->pr_merge = prm == NULL ? pr : prm; LIST_INSERT_HEAD(&pmcstat_pmcs, pr, pr_next); @@ -1387,6 +1405,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1420,6 +1439,7 @@ pmcstat_analyze_log(void) /* Get PMC record. */ pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_cc.pl_pmcid); assert(pmcr != NULL); + pmcr->pr_samples++; /* * Call the plugins processing @@ -1787,32 +1807,46 @@ pmcstat_process_log(void) static void pmcstat_refresh_top(void) { + int v_attrs; + float v; char pmcname[40]; - const char *s; + struct pmcstat_pmcrecord *pmcpr; /* If in pause mode do not refresh display. */ if (pmcstat_pause) return; /* Wait until PMC pop in the log. */ - s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter); - if (s == NULL) + pmcpr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (pmcpr == NULL) return; /* Format PMC name. */ if (pmcstat_mergepmc) - snprintf(pmcname, sizeof(pmcname), "[%s]", s); + snprintf(pmcname, sizeof(pmcname), "[%s]", + pmcstat_string_unintern(pmcpr->pr_pmcname)); else snprintf(pmcname, sizeof(pmcname), "%s.%d", - s, pmcstat_pmcinfilter); + pmcstat_string_unintern(pmcpr->pr_pmcname), + pmcstat_pmcinfilter); + + /* Format samples count. */ + if (pmcstat_stats.ps_samples_total > 0) + v = (pmcpr->pr_samples * 100.0) / + pmcstat_stats.ps_samples_total; + else + v = 0.; + v_attrs = PMCSTAT_ATTRPERCENT(v); PMCSTAT_PRINTBEGIN(); - PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n", + PMCSTAT_PRINTW("PMC: %s Samples: %u ", pmcname, - pmcstat_stats.ps_samples_total, - pmcstat_stats.ps_samples_unknown_offset + - pmcstat_stats.ps_samples_indeterminable + - pmcstat_stats.ps_callchain_dubious_frames); + pmcpr->pr_samples); + PMCSTAT_ATTRON(v_attrs); + PMCSTAT_PRINTW("(%.1f%%) ", v); + PMCSTAT_ATTROFF(v_attrs); + PMCSTAT_PRINTW(", %u unresolved\n\n", + pmcpr->pr_dubious_frames); if (plugins[args.pa_plugin].pl_topdisplay != NULL) plugins[args.pa_plugin].pl_topdisplay(); PMCSTAT_PRINTEND(); @@ -1879,7 +1913,7 @@ pmcstat_keypress_log(void) */ if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); @@ -1900,7 +1934,7 @@ pmcstat_keypress_log(void) } while (plugins[args.pa_plugin].pl_topdisplay == NULL); /* Open new plugin. */ - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); wprintw(w, "switching to plugin %s", @@ -1949,7 +1983,7 @@ pmcstat_display_log(void) if (args.pa_topmode == PMCSTAT_TOP_DELTA) { if (plugins[args.pa_plugin].pl_shutdown != NULL) plugins[args.pa_plugin].pl_shutdown(NULL); - bzero(&pmcstat_stats, sizeof(struct pmcstat_stats)); + pmcstat_stats_reset(); if (plugins[args.pa_plugin].pl_init != NULL) plugins[args.pa_plugin].pl_init(); } Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.h ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:37:28 2010 (r206513) +++ stable/7/usr.sbin/pmcstat/pmcstat_log.h Mon Apr 12 21:42:01 2010 (r206514) @@ -146,6 +146,8 @@ struct pmcstat_pmcrecord { pmc_id_t pr_pmcid; int pr_pmcin; pmcstat_interned_string pr_pmcname; + int pr_samples; + int pr_dubious_frames; struct pmcstat_pmcrecord *pr_merge; }; extern LIST_HEAD(pmcstat_pmcs, pmcstat_pmcrecord) pmcstat_pmcs; /* PMC list */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 23:35:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 607C81065674; Mon, 12 Apr 2010 23:35:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 510B38FC15; Mon, 12 Apr 2010 23:35:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3CNZwbj075227; Mon, 12 Apr 2010 23:35:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CNZwNT075225; Mon, 12 Apr 2010 23:35:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004122335.o3CNZwNT075225@svn.freebsd.org> From: Warner Losh Date: Mon, 12 Apr 2010 23:35: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: r206530 - head/gnu/usr.bin/gdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Apr 2010 23:35:58 -0000 Author: imp Date: Mon Apr 12 23:35:58 2010 New Revision: 206530 URL: http://svn.freebsd.org/changeset/base/206530 Log: Simplify how we select which architectures to add gdbserver for. If the MD files exist, compile it, otherwise omit it. Modified: head/gnu/usr.bin/gdb/Makefile Modified: head/gnu/usr.bin/gdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/Makefile Mon Apr 12 23:22:32 2010 (r206529) +++ head/gnu/usr.bin/gdb/Makefile Mon Apr 12 23:35:58 2010 (r206530) @@ -3,8 +3,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb TARGET_ARCH?= ${MACHINE_ARCH} -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "arm" || \ - ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc" +.if exists(${.CURDIR}/gdbserver/reg-${TARGET_ARCH}.c) SUBDIR+=gdbserver .endif From owner-svn-src-all@FreeBSD.ORG Mon Apr 12 23:47:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FFD71065678; Mon, 12 Apr 2010 23:47:29 +0000 (UTC) (envelope-from sahil@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8105F8FC2E; Mon, 12 Apr 2010 23:47: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 o3CNlTMA077847; Mon, 12 Apr 2010 23:47:29 GMT (envelope-from sahil@svn.freebsd.org) Received: (from sahil@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3CNlTtF077845; Mon, 12 Apr 2010 23:47:29 GMT (envelope-from sahil@svn.freebsd.org) Message-Id: <201004122347.o3CNlTtF077845@svn.freebsd.org> From: Sahil Tandon Date: Mon, 12 Apr 2010 23:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206532 - head/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, 12 Apr 2010 23:47:29 -0000 Author: sahil (ports committer) Date: Mon Apr 12 23:47:29 2010 New Revision: 206532 URL: http://svn.freebsd.org/changeset/base/206532 Log: - Add an entry for myself to committers-ports.dot Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon Apr 12 23:44:45 2010 (r206531) +++ head/share/misc/committers-ports.dot Mon Apr 12 23:47:29 2010 (r206532) @@ -140,6 +140,7 @@ rafan [label="Rong-En Fan\nrafan@FreeBSD rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"] romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"] +sahil [label="Sahil Tandon\nsahil@FreeBSD.org\n2010/04/11"] sat [label="Andrew Pantyukhin\nsat@FreeBSD.org\n2006/05/06"] sem [label="Sergey Matveychuk\nsem@FreeBSD.org\n2004/07/07"] sergei [label="Sergei Kolobov\nsergei@FreeBSD.org\n2003/10/21"] @@ -251,6 +252,7 @@ ijliao -> leeym itetcu -> araujo itetcu -> dryice +itetcu -> sahil joerg -> netchild @@ -360,6 +362,7 @@ tmclaugh -> xride will -> lioux +wxs -> sahil wxs -> skreuzer } From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 00:20:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EDC81065686; Tue, 13 Apr 2010 00:20:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7EF8FC15; Tue, 13 Apr 2010 00:20: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 o3D0Kecb085190; Tue, 13 Apr 2010 00:20:40 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0Ke20085188; Tue, 13 Apr 2010 00:20:40 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004130020.o3D0Ke20085188@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 00:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206533 - stable/7/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 00:20:40 -0000 Author: emaste Date: Tue Apr 13 00:20:40 2010 New Revision: 206533 URL: http://svn.freebsd.org/changeset/base/206533 Log: MFC r201758: Remove extraneous semicolons, no functional changes. Modified: stable/7/sys/dev/aac/aac.c Modified: stable/7/sys/dev/aac/aac.c ============================================================================== --- stable/7/sys/dev/aac/aac.c Mon Apr 12 23:47:29 2010 (r206532) +++ stable/7/sys/dev/aac/aac.c Tue Apr 13 00:20:40 2010 (r206533) @@ -530,7 +530,7 @@ aac_alloc(struct aac_softc *sc) 0, /* flags */ NULL, NULL, /* No locking needed */ &sc->aac_fib_dmat)) { - device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");; + device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n"); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 00:33:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D768E106566B; Tue, 13 Apr 2010 00:33:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C67708FC18; Tue, 13 Apr 2010 00:33: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 o3D0X74a088003; Tue, 13 Apr 2010 00:33:07 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0X7r5087995; Tue, 13 Apr 2010 00:33:07 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004130033.o3D0X7r5087995@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 00:33: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: r206534 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 00:33:07 -0000 Author: emaste Date: Tue Apr 13 00:33:07 2010 New Revision: 206534 URL: http://svn.freebsd.org/changeset/base/206534 Log: Whitespace cleanup, in advance of next sync with Adaptec's driver. No functional change. Modified: head/sys/dev/aac/aac.c head/sys/dev/aac/aac_cam.c head/sys/dev/aac/aac_debug.c head/sys/dev/aac/aac_disk.c head/sys/dev/aac/aac_pci.c head/sys/dev/aac/aacreg.h head/sys/dev/aac/aacvar.h Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aac.c Tue Apr 13 00:33:07 2010 (r206534) @@ -2004,7 +2004,7 @@ aac_setup_intr(struct aac_softc *sc) } if (sc->flags & AAC_FLAGS_NEW_COMM) { if (bus_setup_intr(sc->aac_dev, sc->aac_irq, - INTR_MPSAFE|INTR_TYPE_BIO, NULL, + INTR_MPSAFE|INTR_TYPE_BIO, NULL, aac_new_intr, sc, &sc->aac_intr)) { device_printf(sc->aac_dev, "can't set up interrupt\n"); return (EINVAL); Modified: head/sys/dev/aac/aac_cam.c ============================================================================== --- head/sys/dev/aac/aac_cam.c Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aac_cam.c Tue Apr 13 00:33:07 2010 (r206534) @@ -395,7 +395,7 @@ aac_cam_action(struct cam_sim *sim, unio srb->cdb_len); /* Set command */ - fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? + fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? ScsiPortCommandU64 : ScsiPortCommand; /* Map the s/g list. XXX 32bit addresses only! */ @@ -512,7 +512,7 @@ aac_cam_complete(struct aac_command *cm) scsi_sense_len = sizeof(struct scsi_sense_data); bzero(&ccb->csio.sense_data, scsi_sense_len); - sense_len = (srbr->sense_len > + sense_len = (srbr->sense_len > scsi_sense_len) ? scsi_sense_len : srbr->sense_len; bcopy(&srbr->sense[0], &ccb->csio.sense_data, Modified: head/sys/dev/aac/aac_debug.c ============================================================================== --- head/sys/dev/aac/aac_debug.c Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aac_debug.c Tue Apr 13 00:33:07 2010 (r206534) @@ -62,62 +62,62 @@ aac_print_queues(struct aac_softc *sc) device_printf(sc->aac_dev, "FIB queue header at %p queues at %p\n", &sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][0], &sc->aac_queues->qt_HostNormCmdQueue[0]); - device_printf(sc->aac_dev, "HOST_NORM_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_NORM_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_HOST_NORM_CMD_ENTRIES); - device_printf(sc->aac_dev, "HOST_HIGH_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_HIGH_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_HOST_HIGH_CMD_ENTRIES); - device_printf(sc->aac_dev, "ADAP_NORM_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_NORM_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_ADAP_NORM_CMD_ENTRIES); - device_printf(sc->aac_dev, "ADAP_HIGH_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_HIGH_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_ADAP_HIGH_CMD_ENTRIES); - device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_HOST_NORM_RESP_ENTRIES); - device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_HOST_HIGH_RESP_ENTRIES); - device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_ADAP_NORM_RESP_ENTRIES); - device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_ADAP_HIGH_RESP_ENTRIES); - device_printf(sc->aac_dev, "AACQ_FREE %d/%d\n", + device_printf(sc->aac_dev, "AACQ_FREE %d/%d\n", sc->aac_qstat[AACQ_FREE].q_length, sc->aac_qstat[AACQ_FREE].q_max); - device_printf(sc->aac_dev, "AACQ_BIO %d/%d\n", + device_printf(sc->aac_dev, "AACQ_BIO %d/%d\n", sc->aac_qstat[AACQ_BIO].q_length, sc->aac_qstat[AACQ_BIO].q_max); - device_printf(sc->aac_dev, "AACQ_READY %d/%d\n", + device_printf(sc->aac_dev, "AACQ_READY %d/%d\n", sc->aac_qstat[AACQ_READY].q_length, sc->aac_qstat[AACQ_READY].q_max); - device_printf(sc->aac_dev, "AACQ_BUSY %d/%d\n", + device_printf(sc->aac_dev, "AACQ_BUSY %d/%d\n", sc->aac_qstat[AACQ_BUSY].q_length, sc->aac_qstat[AACQ_BUSY].q_max); } @@ -225,8 +225,8 @@ aac_print_fib(struct aac_softc *sc, stru if (br->Command == VM_CtBlockRead) { device_printf(sc->aac_dev, - " BlockRead: container %d 0x%x/%d\n", - br->ContainerId, br->BlockNumber, + " BlockRead: container %d 0x%x/%d\n", + br->ContainerId, br->BlockNumber, br->ByteCount); sg = &br->SgMap; } @@ -234,7 +234,7 @@ aac_print_fib(struct aac_softc *sc, stru device_printf(sc->aac_dev, " BlockWrite: container %d 0x%x/%d " "(%s)\n", bw->ContainerId, - bw->BlockNumber, bw->ByteCount, + bw->BlockNumber, bw->ByteCount, bw->Stable == CSTABLE ? "stable" : "unstable"); sg = &bw->SgMap; @@ -267,7 +267,7 @@ aac_print_aif(struct aac_softc *sc, stru device_printf(sc->aac_dev, "EventNotify(%d)\n", aif->seqNumber); switch(aif->data.EN.type) { case AifEnGeneric: /* Generic notification */ - device_printf(sc->aac_dev, "(Generic) %.*s\n", + device_printf(sc->aac_dev, "(Generic) %.*s\n", (int)sizeof(aif->data.EN.data.EG), aif->data.EN.data.EG.text); break; @@ -281,21 +281,21 @@ aac_print_aif(struct aac_softc *sc, stru case AifEnContainerChange: /* Adapter specific container * configuration change */ device_printf(sc->aac_dev, "(ContainerChange) " - "container %d,%d\n", - aif->data.EN.data.ECC.container[0], + "container %d,%d\n", + aif->data.EN.data.ECC.container[0], aif->data.EN.data.ECC.container[1]); break; case AifEnDeviceFailure: /* SCSI device failed */ device_printf(sc->aac_dev, "(DeviceFailure) " - "handle %d\n", + "handle %d\n", aif->data.EN.data.EDF.deviceHandle); break; case AifEnMirrorFailover: /* Mirror failover started */ device_printf(sc->aac_dev, "(MirrorFailover) " "container %d failed, " "migrating from slice %d to %d\n", - aif->data.EN.data.EMF.container, - aif->data.EN.data.EMF.failedSlice, + aif->data.EN.data.EMF.container, + aif->data.EN.data.EMF.failedSlice, aif->data.EN.data.EMF.creatingSlice); break; case AifEnContainerEvent: /* Significant container @@ -325,7 +325,7 @@ aac_print_aif(struct aac_softc *sc, stru device_printf(sc->aac_dev, "(EnclosureManagement) " "EMPID %d unit %d " "event %d\n", aif->data.EN.data.EEE.empID, - aif->data.EN.data.EEE.unitID, + aif->data.EN.data.EEE.unitID, aif->data.EN.data.EEE.eventType); break; case AifEnBatteryEvent: /* Significant NV battery @@ -348,14 +348,14 @@ aac_print_aif(struct aac_softc *sc, stru device_printf(sc->aac_dev, "(BatteryNeedsRecond)\n"); break; case AifEnClusterEvent: /* Some cluster event */ - device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", + device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", aif->data.EN.data.ECLE.eventType); break; case AifEnDiskSetEvent: /* A disk set event occured. */ device_printf(sc->aac_dev, "(DiskSetEvent) event %d " "diskset %jd creator %jd\n", - aif->data.EN.data.EDS.eventType, - (intmax_t)aif->data.EN.data.EDS.DsNum, + aif->data.EN.data.EDS.eventType, + (intmax_t)aif->data.EN.data.EDS.DsNum, (intmax_t)aif->data.EN.data.EDS.CreatorId); break; case AifDenMorphComplete: /* A morph operation @@ -392,7 +392,7 @@ aac_print_aif(struct aac_softc *sc, stru } device_printf(sc->aac_dev, "JobProgress (%d) - %s (%d, %d)\n", - aif->seqNumber, status, + aif->seqNumber, status, aif->data.PR[0].currentTick, aif->data.PR[0].finalTick); switch(aif->data.PR[0].jd.type) { @@ -418,12 +418,12 @@ aac_print_aif(struct aac_softc *sc, stru break; case AifJobCtrZero: /* Container clear operation */ device_printf(sc->aac_dev, - "(ContainerZero) container %d\n", + "(ContainerZero) container %d\n", aif->data.PR[0].jd.client.container.src); break; case AifJobCtrCopy: /* Container copy operation */ device_printf(sc->aac_dev, - "(ContainerCopy) container %d to %d\n", + "(ContainerCopy) container %d to %d\n", aif->data.PR[0].jd.client.container.src, aif->data.PR[0].jd.client.container.dst); break; @@ -456,12 +456,12 @@ aac_print_aif(struct aac_softc *sc, stru case AifJobCtrScrubRaid5: /* Container Scrub Raid5 * operation */ device_printf(sc->aac_dev, - "(ContainerScrubRaid5) container %d\n", + "(ContainerScrubRaid5) container %d\n", aif->data.PR[0].jd.client.container.src); break; case AifJobCtrMorph: /* Container morph operation */ device_printf(sc->aac_dev, - "(ContainerMorph) container %d\n", + "(ContainerMorph) container %d\n", aif->data.PR[0].jd.client.container.src); /* XXX two containers? */ break; @@ -476,13 +476,13 @@ aac_print_aif(struct aac_softc *sc, stru case AifJobCtrRebuildMirror: /* Container Rebuild Mirror * operation */ device_printf(sc->aac_dev, - "(ContainerRebuildMirror) container " + "(ContainerRebuildMirror) container " "%d\n", aif->data.PR[0].jd.client.container.src); break; case AifJobCtrCrazyCache: /* crazy cache */ device_printf(sc->aac_dev, - "(ContainerCrazyCache) container %d\n", + "(ContainerCrazyCache) container %d\n", aif->data.PR[0].jd.client.container.src); /* XXX two containers? */ break; Modified: head/sys/dev/aac/aac_disk.c ============================================================================== --- head/sys/dev/aac/aac_disk.c Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aac_disk.c Tue Apr 13 00:33:07 2010 (r206534) @@ -87,7 +87,7 @@ DRIVER_MODULE(aacd, aac, aac_disk_driver /* * Handle open from generic layer. * - * This is called by the diskslice code on first open in order to get the + * This is called by the diskslice code on first open in order to get the * basic device geometry paramters. */ static int Modified: head/sys/dev/aac/aac_pci.c ============================================================================== --- head/sys/dev/aac/aac_pci.c Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aac_pci.c Tue Apr 13 00:33:07 2010 (r206534) @@ -353,7 +353,7 @@ aac_pci_attach(device_t dev) /* assume failure is 'not configured' */ error = ENXIO; - /* + /* * Verify that the adapter is correctly set up in PCI space. */ command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2); @@ -401,7 +401,7 @@ aac_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for our PCI interface. - * + * * Note that some of these controllers are 64-bit capable. */ if (bus_dma_tag_create(NULL, /* parent */ @@ -419,7 +419,7 @@ aac_pci_attach(device_t dev) goto out; } - /* + /* * Detect the hardware interface version, set up the bus interface * indirection. */ Modified: head/sys/dev/aac/aacreg.h ============================================================================== --- head/sys/dev/aac/aacreg.h Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aacreg.h Tue Apr 13 00:33:07 2010 (r206534) @@ -220,20 +220,20 @@ typedef enum { IsAdapterPaused = 704, SendHostTime = 705, RequestSupplementAdapterInfo = 706, /* Supp. Info for set in UCC - * use only if supported + * use only if supported * (RequestAdapterInfo first) */ LastMiscCommand = 707, - - OnLineDiagnostic = 800, - FduAdapterTest = 801, + + OnLineDiagnostic = 800, + FduAdapterTest = 801, RequestCompatibilityId = 802, AdapterEnvironmentInfo = 803, /* temp. sensors */ NvsramEventLog = 900, ResetNvsramEventLogPointers = 901, EnableEventLog = 902, DisableEventLog = 903, - EncryptedKeyTransportFIB= 904, - KeyableFeaturesFIB= 905 + EncryptedKeyTransportFIB= 904, + KeyableFeaturesFIB= 905 } AAC_FibCommands; /* @@ -283,7 +283,7 @@ typedef enum { #define AAC_ERROR_FIB_DEALLOCATION_FAILED 0x08 /* - * Adapter Init Structure: this is passed to the adapter with the + * Adapter Init Structure: this is passed to the adapter with the * AAC_MONKER_INITSTRUCT command to point it at our control structures. */ struct aac_adapter_init { @@ -329,14 +329,14 @@ typedef enum { CT_MORPH, CT_PASSTHRU, CT_RAID4, - CT_RAID10, /* stripe of mirror */ - CT_RAID00, /* stripe of stripe */ - CT_VOLUME_OF_MIRRORS, /* volume of mirror */ - CT_PSEUDO_RAID3, /* really raid4 */ - CT_RAID50, /* stripe of raid5 */ - CT_RAID5D, /* raid5 distributed hot-sparing */ + CT_RAID10, /* stripe of mirror */ + CT_RAID00, /* stripe of stripe */ + CT_VOLUME_OF_MIRRORS, /* volume of mirror */ + CT_PSEUDO_RAID3, /* really raid4 */ + CT_RAID50, /* stripe of raid5 */ + CT_RAID5D, /* raid5 distributed hot-sparing */ CT_RAID5D0, - CT_RAID1E, /* extended raid1 mirroring */ + CT_RAID1E, /* extended raid1 mirroring */ CT_RAID6, CT_RAID60, } AAC_FSAVolType; @@ -345,23 +345,23 @@ typedef enum { * Host-addressable object types */ typedef enum { - FT_REG = 1, /* regular file */ - FT_DIR, /* directory */ - FT_BLK, /* "block" device - reserved */ - FT_CHR, /* "character special" device - reserved */ - FT_LNK, /* symbolic link */ - FT_SOCK, /* socket */ - FT_FIFO, /* fifo */ - FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */ - FT_DRIVE, /* physical disk - addressable in scsi by b/t/l */ - FT_SLICE, /* virtual disk - raw volume - slice */ - FT_PARTITION, /* FSA partition - carved out of a slice - building + FT_REG = 1, /* regular file */ + FT_DIR, /* directory */ + FT_BLK, /* "block" device - reserved */ + FT_CHR, /* "character special" device - reserved */ + FT_LNK, /* symbolic link */ + FT_SOCK, /* socket */ + FT_FIFO, /* fifo */ + FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */ + FT_DRIVE, /* physical disk - addressable in scsi by b/t/l */ + FT_SLICE, /* virtual disk - raw volume - slice */ + FT_PARTITION, /* FSA partition - carved out of a slice - building * block for containers */ - FT_VOLUME, /* Container - Volume Set */ - FT_STRIPE, /* Container - Stripe Set */ - FT_MIRROR, /* Container - Mirror Set */ - FT_RAID5, /* Container - Raid 5 Set */ - FT_DATABASE /* Storage object with "foreign" content manager */ + FT_VOLUME, /* Container - Volume Set */ + FT_STRIPE, /* Container - Stripe Set */ + FT_MIRROR, /* Container - Mirror Set */ + FT_RAID5, /* Container - Raid 5 Set */ + FT_DATABASE /* Storage object with "foreign" content manager */ } AAC_FType; /* @@ -467,7 +467,7 @@ typedef enum { CPU_MIPS, CPU_XSCALE, CPU__last -} AAC_CpuType; +} AAC_CpuType; typedef enum { CPUI960_JX = 1, @@ -544,7 +544,7 @@ typedef enum { * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT */ typedef enum -{ +{ PLATFORM_BAT_REQ_PRESENT = 1, /* BATTERY REQUIRED AND PRESENT */ PLATFORM_BAT_REQ_NOTPRESENT, /* BATTERY REQUIRED AND NOT PRESENT */ PLATFORM_BAT_OPT_PRESENT, /* BATTERY OPTIONAL AND PRESENT */ @@ -552,9 +552,9 @@ typedef enum PLATFORM_BAT_NOT_SUPPORTED /* BATTERY NOT SUPPORTED */ } AAC_BatteryPlatform; -/* +/* * options supported by this board - * there has to be a one to one mapping of these defines and the ones in + * there has to be a one to one mapping of these defines and the ones in * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT */ #define AAC_SUPPORTED_SNAPSHOT 0x01 @@ -577,24 +577,24 @@ typedef enum #define AAC_SUPPORTED_64BIT_ARRAYSIZE 0x40000 #define AAC_SUPPORTED_HEAT_SENSOR 0x80000 -/* +/* * Structure used to respond to a RequestAdapterInfo fib. */ struct aac_adapter_info { - AAC_Platform PlatformBase; /* adapter type */ + AAC_Platform PlatformBase; /* adapter type */ AAC_CpuType CpuArchitecture; /* adapter CPU type */ - AAC_CpuSubType CpuVariant; /* adapter CPU subtype */ - u_int32_t ClockSpeed; /* adapter CPU clockspeed */ - u_int32_t ExecutionMem; /* adapter Execution Memory + AAC_CpuSubType CpuVariant; /* adapter CPU subtype */ + u_int32_t ClockSpeed; /* adapter CPU clockspeed */ + u_int32_t ExecutionMem; /* adapter Execution Memory * size */ - u_int32_t BufferMem; /* adapter Data Memory */ - u_int32_t TotalMem; /* adapter Total Memory */ + u_int32_t BufferMem; /* adapter Data Memory */ + u_int32_t TotalMem; /* adapter Total Memory */ struct FsaRevision KernelRevision; /* adapter Kernel Software * Revision */ struct FsaRevision MonitorRevision; /* adapter Monitor/Diagnostic * Software Revision */ struct FsaRevision HardwareRevision;/* TBD */ - struct FsaRevision BIOSRevision; /* adapter BIOS Revision */ + struct FsaRevision BIOSRevision; /* adapter BIOS Revision */ u_int32_t ClusteringEnabled; u_int32_t ClusterChannelMask; u_int64_t SerialNumber; @@ -604,7 +604,7 @@ struct aac_adapter_info { AAC_OemFlavor OemVariant; } __packed; -/* +/* * Structure used to respond to a RequestSupplementAdapterInfo fib. */ struct vpd_info { @@ -692,7 +692,7 @@ struct aac_supplement_adapter_info { #define AAC_KERNEL_PANIC 0x00000100 /* - * Data types relating to control and monitoring of the NVRAM/WriteCache + * Data types relating to control and monitoring of the NVRAM/WriteCache * subsystem. */ @@ -867,7 +867,7 @@ typedef enum { AifEnGeneric = 1, /* Generic notification */ AifEnTaskComplete, /* Task has completed */ AifEnConfigChange, /* Adapter config change occurred */ - AifEnContainerChange, /* Adapter specific container + AifEnContainerChange, /* Adapter specific container * configuration change */ AifEnDeviceFailure, /* SCSI device failed */ AifEnMirrorFailover, /* Mirror failover started */ @@ -881,7 +881,7 @@ typedef enum { AifEnBatteryEvent, /* Significant NV battery event */ AifEnAddContainer, /* A new container was created. */ AifEnDeleteContainer, /* A container was deleted. */ - AifEnSMARTEvent, /* SMART Event */ + AifEnSMARTEvent, /* SMART Event */ AifEnBatteryNeedsRecond, /* The battery needs reconditioning */ AifEnClusterEvent, /* Some cluster event */ AifEnDiskSetEvent, /* A disk set event occured. */ @@ -967,7 +967,7 @@ struct aac_AifEventNotify { /* * Adapter Initiated FIB command structures. Start with the adapter * initiated FIBs that really come from the adapter, and get responded - * to by the host. + * to by the host. */ #define AAC_AIF_REPORT_MAX_SIZE 64 @@ -1120,7 +1120,7 @@ typedef enum _VM_COMMANDS { VM_CtHostRead64, VM_CtHostWrite64, VM_DrvErrTblLog, /* drive error table/log type of command */ - VM_NameServe64 + VM_NameServe64 } AAC_VMCommand; /* @@ -1526,7 +1526,7 @@ enum { /* * The adapter can request the host print a message by setting the * DB_PRINTF flag in DOORBELL0. The driver responds by collecting the - * message from the printf buffer, clearing the DB_PRINTF flag in + * message from the printf buffer, clearing the DB_PRINTF flag in * DOORBELL0 and setting it in DOORBELL1. * (ODBR and IDBR respectively for the i960Rx adapters) */ Modified: head/sys/dev/aac/aacvar.h ============================================================================== --- head/sys/dev/aac/aacvar.h Tue Apr 13 00:20:40 2010 (r206533) +++ head/sys/dev/aac/aacvar.h Tue Apr 13 00:33:07 2010 (r206534) @@ -56,7 +56,7 @@ */ /* - * The firmware interface allows for a 16-bit s/g list length. We limit + * The firmware interface allows for a 16-bit s/g list length. We limit * ourselves to a reasonable maximum and ensure alignment. */ #define AAC_MAXSGENTRIES 64 /* max S/G entries, limit 65535 */ @@ -78,7 +78,7 @@ #define AAC_PRINTF_BUFSIZE 256 /* - * We wait this many seconds for the adapter to come ready if it is still + * We wait this many seconds for the adapter to come ready if it is still * booting */ #define AAC_BOOT_TIMEOUT (3 * 60) @@ -126,7 +126,7 @@ struct aac_sim /* * Per-disk structure */ -struct aac_disk +struct aac_disk { device_t ad_dev; struct aac_softc *ad_controller; @@ -216,7 +216,7 @@ struct aac_common { AAC_QUEUE_ALIGN]; /* buffer for text messages from the controller */ - char ac_printf[AAC_PRINTF_BUFSIZE]; + char ac_printf[AAC_PRINTF_BUFSIZE]; /* fib for synchronous commands */ struct aac_fib ac_sync_fib; @@ -225,7 +225,7 @@ struct aac_common { /* * Interface operations */ -struct aac_interface +struct aac_interface { int (*aif_get_fwstatus)(struct aac_softc *sc); void (*aif_qnotify)(struct aac_softc *sc, int qbit); @@ -300,7 +300,7 @@ struct aac_fib_context { /* * Per-controller structure. */ -struct aac_softc +struct aac_softc { /* bus connections */ device_t aac_dev; @@ -347,7 +347,7 @@ struct aac_softc struct aac_command *aac_commands; /* command management */ - TAILQ_HEAD(,aac_command) aac_free; /* command structures + TAILQ_HEAD(,aac_command) aac_free; /* command structures * available for reuse */ TAILQ_HEAD(,aac_command) aac_ready; /* commands on hold for * controller resources */ @@ -416,7 +416,7 @@ struct aac_softc struct callout aac_daemontime; /* clock daemon callout */ - u_int32_t aac_max_fibs; /* max. FIB count */ + u_int32_t aac_max_fibs; /* max. FIB count */ u_int32_t aac_max_fibs_alloc; /* max. alloc. per alloc_commands() */ u_int32_t aac_max_fib_size; /* max. FIB size */ u_int32_t aac_sg_tablesize; /* max. sg count from host */ @@ -447,7 +447,7 @@ extern void aac_free(struct aac_softc * extern int aac_attach(struct aac_softc *sc); extern int aac_detach(device_t dev); extern int aac_shutdown(device_t dev); -extern int aac_suspend(device_t dev); +extern int aac_suspend(device_t dev); extern int aac_resume(device_t dev); extern void aac_new_intr(void *arg); extern int aac_filter(void *arg); @@ -561,7 +561,7 @@ aac_dequeue_ ## name (struct aac_softc * if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) { \ if ((cm->cm_flags & AAC_ON_ ## index) == 0) { \ printf("command %p not in queue, flags = %#x, " \ - "bit = %#x\n", cm, cm->cm_flags, \ + "bit = %#x\n", cm, cm->cm_flags, \ AAC_ON_ ## index); \ panic("command not in queue"); \ } \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 00:48:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8DF0106564A; Tue, 13 Apr 2010 00:48:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6A688FC13; Tue, 13 Apr 2010 00:48: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 o3D0msJN091569; Tue, 13 Apr 2010 00:48:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0msej091565; Tue, 13 Apr 2010 00:48:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130048.o3D0msej091565@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 00:48: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: r206535 - in stable/8/usr.sbin: . dumpcis makefs makefs/ffs mfiutil rpcbind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 00:48:54 -0000 Author: imp Date: Tue Apr 13 00:48:54 2010 New Revision: 206535 URL: http://svn.freebsd.org/changeset/base/206535 Log: MFC r203710: When you have multiple addresses on the same network on different interfaces (such as when you are part of a carp pool), and you run rpcbind -h to restrict which interfaces have rpc services, rpcbind can none-the-less return addresses that aren't in the -h list. This patch enforces the rule that when you specify -h on the command line, then services returned from rpcbind must be to one of the addresses listed in -h, or be a loopback address (since localhost is implicit when running -h). The root cause of this is the assumption in addrmerge that there can be only one interface that matches a given network IP address. This turns out not to be the case. To retain historical behavior, I didn't try to fix the routine to prefer the address that the request came into, since I didn't know the side effects that might cause in the normal case. My quick analysis suggests that it wouldn't be a problem, but since this code is tricky I opted for the more conservative patch of only restricting the reply when -h is in effect. Hence, this change will have no effect when you are running rpcbind without -h. Reviewed by: alfred@ Sponsored by: iX Systems MFC after: 2 weeks Modified: stable/8/usr.sbin/rpcbind/rpcbind.c stable/8/usr.sbin/rpcbind/rpcbind.h stable/8/usr.sbin/rpcbind/util.c Directory Properties: stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/Makefile (props changed) stable/8/usr.sbin/acpi/ (props changed) stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/bsnmpd/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/cdcontrol/ (props changed) stable/8/usr.sbin/chown/ (props changed) stable/8/usr.sbin/cpucontrol/ (props changed) stable/8/usr.sbin/crashinfo/ (props changed) stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/crunch/examples/ (props changed) stable/8/usr.sbin/cxgbtool/ (props changed) stable/8/usr.sbin/diskinfo/ (props changed) stable/8/usr.sbin/dumpcis/cardinfo.h (props changed) stable/8/usr.sbin/dumpcis/cis.h (props changed) stable/8/usr.sbin/faithd/ (props changed) stable/8/usr.sbin/freebsd-update/ (props changed) stable/8/usr.sbin/inetd/ (props changed) stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/jail/ (props changed) stable/8/usr.sbin/jls/ (props changed) stable/8/usr.sbin/lpr/ (props changed) stable/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) stable/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed) stable/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) stable/8/usr.sbin/makefs/getid.c (props changed) stable/8/usr.sbin/mergemaster/ (props changed) stable/8/usr.sbin/mfiutil/mfiutil.8 (props changed) stable/8/usr.sbin/mptutil/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/newsyslog/ (props changed) stable/8/usr.sbin/ntp/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/powerd/ (props changed) stable/8/usr.sbin/ppp/ (props changed) stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/rpc.umntall/ (props changed) stable/8/usr.sbin/rtsold/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/syslogd/ (props changed) stable/8/usr.sbin/traceroute/ (props changed) stable/8/usr.sbin/traceroute6/ (props changed) stable/8/usr.sbin/usbconfig/ (props changed) stable/8/usr.sbin/vidcontrol/ (props changed) stable/8/usr.sbin/wpa/ (props changed) stable/8/usr.sbin/ypserv/ (props changed) stable/8/usr.sbin/zic/ (props changed) Modified: stable/8/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- stable/8/usr.sbin/rpcbind/rpcbind.c Tue Apr 13 00:33:07 2010 (r206534) +++ stable/8/usr.sbin/rpcbind/rpcbind.c Tue Apr 13 00:48:54 2010 (r206535) @@ -92,6 +92,7 @@ int oldstyle_local = 0; int verboselog = 0; char **hosts = NULL; +struct sockaddr **bound_sa; int ipv6_only = 0; int nhosts = 0; int on = 1; @@ -119,6 +120,7 @@ static void rbllist_add(rpcprog_t, rpcve struct netbuf *); static void terminate(int); static void parseargs(int, char *[]); +static void update_bound_sa(void); int main(int argc, char *argv[]) @@ -130,6 +132,8 @@ main(int argc, char *argv[]) parseargs(argc, argv); + update_bound_sa(); + /* Check that another rpcbind isn't already running. */ if ((rpcbindlockfd = (open(RPCBINDDLOCK, O_RDONLY|O_CREAT, 0444))) == -1) @@ -323,8 +327,7 @@ init_transport(struct netconfig *nconf) * If no hosts were specified, just bind to INADDR_ANY. * Otherwise make sure 127.0.0.1 is added to the list. */ - nhostsbak = nhosts; - nhostsbak++; + nhostsbak = nhosts + 1; hosts = realloc(hosts, nhostsbak * sizeof(char *)); if (nhostsbak == 1) hosts[0] = "*"; @@ -657,6 +660,75 @@ error: return (1); } +/* + * Create the list of addresses that we're bound to. Normally, this + * list is empty because we're listening on the wildcard address + * (nhost == 0). If -h is specified on the command line, then + * bound_sa will have a list of the addresses that the program binds + * to specifically. This function takes that list and converts them to + * struct sockaddr * and stores them in bound_sa. + */ +static void +update_bound_sa(void) +{ + struct addrinfo hints, *res = NULL; + int i; + + if (nhosts == 0) + return; + bound_sa = malloc(sizeof(*bound_sa) * nhosts); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + for (i = 0; i < nhosts; i++) { + if (getaddrinfo(hosts[i], NULL, &hints, &res) != 0) + continue; + bound_sa[i] = malloc(res->ai_addrlen); + memcpy(bound_sa[i], res->ai_addr, res->ai_addrlen); + } +} + +/* + * Match the sa against the list of addresses we've bound to. If + * we've not specifically bound to anything, we match everything. + * Otherwise, if the IPv4 or IPv6 address matches one of the addresses + * in bound_sa, we return true. If not, we return false. + */ +int +listen_addr(const struct sockaddr *sa) +{ + int i; + + /* + * If nhosts == 0, then there were no -h options on the + * command line, so all addresses are addresses we're + * listening to. + */ + if (nhosts == 0) + return 1; + for (i = 0; i < nhosts; i++) { + if (bound_sa[i] == NULL || + sa->sa_family != bound_sa[i]->sa_family) + continue; + switch (sa->sa_family) { + case AF_INET: + if (memcmp(&SA2SINADDR(sa), &SA2SINADDR(bound_sa[i]), + sizeof(struct in_addr)) == 0) + return (1); + break; +#ifdef INET6 + case AF_INET6: + if (memcmp(&SA2SIN6ADDR(sa), &SA2SIN6ADDR(bound_sa[i]), + sizeof(struct in6_addr)) == 0) + return (1); + break; +#endif + default: + break; + } + } + return (0); +} + static void rbllist_add(rpcprog_t prog, rpcvers_t vers, struct netconfig *nconf, struct netbuf *addr) Modified: stable/8/usr.sbin/rpcbind/rpcbind.h ============================================================================== --- stable/8/usr.sbin/rpcbind/rpcbind.h Tue Apr 13 00:33:07 2010 (r206534) +++ stable/8/usr.sbin/rpcbind/rpcbind.h Tue Apr 13 00:48:54 2010 (r206535) @@ -134,6 +134,7 @@ void read_warmstart(void); char *addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr, char *netid); +int listen_addr(const struct sockaddr *sa); void network_init(void); struct sockaddr *local_sa(int); @@ -141,4 +142,12 @@ struct sockaddr *local_sa(int); #define RPCB_ALLVERS 0 #define RPCB_ONEVERS 1 +/* To convert a struct sockaddr to IPv4 or IPv6 address */ +#define SA2SIN(sa) ((struct sockaddr_in *)(sa)) +#define SA2SINADDR(sa) (SA2SIN(sa)->sin_addr) +#ifdef INET6 +#define SA2SIN6(sa) ((struct sockaddr_in6 *)(sa)) +#define SA2SIN6ADDR(sa) (SA2SIN6(sa)->sin6_addr) +#endif + #endif /* rpcbind_h */ Modified: stable/8/usr.sbin/rpcbind/util.c ============================================================================== --- stable/8/usr.sbin/rpcbind/util.c Tue Apr 13 00:33:07 2010 (r206534) +++ stable/8/usr.sbin/rpcbind/util.c Tue Apr 13 00:48:54 2010 (r206535) @@ -58,13 +58,6 @@ #include "rpcbind.h" -#define SA2SIN(sa) ((struct sockaddr_in *)(sa)) -#define SA2SINADDR(sa) (SA2SIN(sa)->sin_addr) -#ifdef INET6 -#define SA2SIN6(sa) ((struct sockaddr_in6 *)(sa)) -#define SA2SIN6ADDR(sa) (SA2SIN6(sa)->sin6_addr) -#endif - static struct sockaddr_in *local_in4; #ifdef INET6 static struct sockaddr_in6 *local_in6; @@ -176,9 +169,13 @@ addrmerge(struct netbuf *caller, char *s goto freeit; /* - * Loop through all interfaces. For each interface, see if the - * network portion of its address is equal to that of the client. - * If so, we have found the interface that we want to use. + * Loop through all interfaces. For each interface, see if it + * is either the loopback interface (which we always listen + * on) or is one of the addresses the program bound to (the + * wildcard by default, or a subset if -h is specified) and + * the network portion of its address is equal to that of the + * client. If so, we have found the interface that we want to + * use. */ bestif = NULL; for (ifap = ifp; ifap != NULL; ifap = ifap->ifa_next) { @@ -189,6 +186,9 @@ addrmerge(struct netbuf *caller, char *s !(ifap->ifa_flags & IFF_UP)) continue; + if (!(ifap->ifa_flags & IFF_LOOPBACK) && !listen_addr(ifsa)) + continue; + switch (hint_sa->sa_family) { case AF_INET: /* From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 00:57:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E1D8106566B; Tue, 13 Apr 2010 00:57:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 415F68FC08; Tue, 13 Apr 2010 00:57: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 o3D0vsm9093656; Tue, 13 Apr 2010 00:57:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0vsZg093654; Tue, 13 Apr 2010 00:57:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130057.o3D0vsZg093654@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 00:57: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: r206537 - stable/8/tools/tools/nanobsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 00:57:55 -0000 Author: imp Date: Tue Apr 13 00:57:54 2010 New Revision: 206537 URL: http://svn.freebsd.org/changeset/base/206537 Log: MFC 205980: Stop hard coding i386 as the arch for the build. Instead, default to the processor we're running on. Also, supply amd64 version of create_diskimage that's the same as i386's. # didn't fix the confusion between using the processor for this and using # the machine (which would be more appropriate). NANO_ARCH smashes the two # together right now. MFC after: 7 days Modified: stable/8/tools/tools/nanobsd/nanobsd.sh Directory Properties: stable/8/tools/tools/nanobsd/ (props changed) Modified: stable/8/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/8/tools/tools/nanobsd/nanobsd.sh Tue Apr 13 00:55:11 2010 (r206536) +++ stable/8/tools/tools/nanobsd/nanobsd.sh Tue Apr 13 00:57:54 2010 (r206537) @@ -134,7 +134,7 @@ PPLEVEL=3 ####################################################################### # Not a variable at this time -NANO_ARCH=i386 +NANO_ARCH=`uname -p` ####################################################################### # @@ -238,6 +238,9 @@ install_etc ( ) ( ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.etc 2>&1 + # make.conf doesn't get created by default, but some ports need it + # so they can spam it. + cp /dev/null ${NANO_WORLDDIR}/etc/make.conf ) install_kernel ( ) ( @@ -497,6 +500,11 @@ create_i386_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) +# i386 and amd64 are identical for disk images +create_amd64_diskimage ( ) ( + create_i386_diskimage +) + last_orders () ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 01:02:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2AE106566C; Tue, 13 Apr 2010 01:02:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62E698FC13; Tue, 13 Apr 2010 01:02: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 o3D12KBW094696; Tue, 13 Apr 2010 01:02:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D12KKd094693; Tue, 13 Apr 2010 01:02:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130102.o3D12KKd094693@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 01:02: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: r206538 - stable/8/usr.bin/sed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 01:02:20 -0000 Author: imp Date: Tue Apr 13 01:02:20 2010 New Revision: 206538 URL: http://svn.freebsd.org/changeset/base/206538 Log: MFC: 205992 Make -r mean exactly the same thing as -E for increased compatibility with GNU sed. MFC after: 7 days Modified: stable/8/usr.bin/sed/main.c stable/8/usr.bin/sed/sed.1 Directory Properties: stable/8/usr.bin/ (props changed) stable/8/usr.bin/awk/ (props changed) stable/8/usr.bin/calendar/ (props changed) stable/8/usr.bin/catman/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/fetch/ (props changed) stable/8/usr.bin/find/ (props changed) stable/8/usr.bin/finger/ (props changed) stable/8/usr.bin/fstat/ (props changed) stable/8/usr.bin/gcore/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/indent/ (props changed) stable/8/usr.bin/kdump/ (props changed) stable/8/usr.bin/locale/ (props changed) stable/8/usr.bin/look/ (props changed) stable/8/usr.bin/makewhatis/ (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/perror/ (props changed) stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/script/ (props changed) stable/8/usr.bin/systat/ (props changed) stable/8/usr.bin/tftp/ (props changed) stable/8/usr.bin/touch/ (props changed) stable/8/usr.bin/truss/ (props changed) stable/8/usr.bin/unifdef/ (props changed) stable/8/usr.bin/uniq/ (props changed) stable/8/usr.bin/vmstat/ (props changed) stable/8/usr.bin/w/ (props changed) stable/8/usr.bin/whois/ (props changed) stable/8/usr.bin/xlint/ (props changed) Modified: stable/8/usr.bin/sed/main.c ============================================================================== --- stable/8/usr.bin/sed/main.c Tue Apr 13 00:57:54 2010 (r206537) +++ stable/8/usr.bin/sed/main.c Tue Apr 13 01:02:20 2010 (r206538) @@ -130,8 +130,9 @@ main(int argc, char *argv[]) fflag = 0; inplace = NULL; - while ((c = getopt(argc, argv, "EI:ae:f:i:ln")) != -1) + while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1) switch (c) { + case 'r': /* Gnu sed compat */ case 'E': rflags = REG_EXTENDED; break; Modified: stable/8/usr.bin/sed/sed.1 ============================================================================== --- stable/8/usr.bin/sed/sed.1 Tue Apr 13 00:57:54 2010 (r206537) +++ stable/8/usr.bin/sed/sed.1 Tue Apr 13 01:02:20 2010 (r206538) @@ -39,11 +39,11 @@ .Nd stream editor .Sh SYNOPSIS .Nm -.Op Fl Ealn +.Op Fl Ealnr .Ar command .Op Ar .Nm -.Op Fl Ealn +.Op Fl Ealnr .Op Fl e Ar command .Op Fl f Ar command_file .Op Fl I Ar extension @@ -144,6 +144,10 @@ all of the commands have been applied to The .Fl n option suppresses this behavior. +.It Fl r +Same as +.Fl E +for compatibility with GNU sed. .El .Pp The form of a From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 01:04:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C96C106564A; Tue, 13 Apr 2010 01:04:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AFF28FC12; Tue, 13 Apr 2010 01:04: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 o3D14BO0095154; Tue, 13 Apr 2010 01:04:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D14BJt095151; Tue, 13 Apr 2010 01:04:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130104.o3D14BJt095151@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 01:04: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: r206539 - stable/8/tools/tools/nanobsd/gateworks X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 01:04:11 -0000 Author: imp Date: Tue Apr 13 01:04:11 2010 New Revision: 206539 URL: http://svn.freebsd.org/changeset/base/206539 Log: MFC: 205994 Two fixes: (1) We don't need a custom install_kernel. We can install without symbols by adding INSTALL_NODEBUG (which likely should be WITHOUT_KERNEL_SYMBOLS_FILE, or something shorter) to CONF_INSTALL (2) for make buildenv stage, use NANO_MAKE_CONF_BUILD rather than the non-existant NANO_MAKE_CONF. MFC after: 7 days Modified: stable/8/tools/tools/nanobsd/gateworks/common Directory Properties: stable/8/tools/tools/nanobsd/ (props changed) Modified: stable/8/tools/tools/nanobsd/gateworks/common ============================================================================== --- stable/8/tools/tools/nanobsd/gateworks/common Tue Apr 13 01:02:20 2010 (r206538) +++ stable/8/tools/tools/nanobsd/gateworks/common Tue Apr 13 01:04:11 2010 (r206539) @@ -37,7 +37,7 @@ NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_ins buildenv() { cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ DESTDIR=${NANO_WORLDDIR} make buildenv } @@ -146,22 +146,9 @@ WITHOUT_TCSH=true CONF_INSTALL="$CONF_BUILD WITHOUT_TOOLCHAIN=true WITHOUT_INSTALLLIB=true +INSTALL_NODEBUG=true " -# NB: override to suppress install of kernel.symbols -install_kernel() -{ - pprint 2 "install kernel" - pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" - - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ - INSTALL_NODEBUG=true \ - DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ - > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 -} - # NB: override to force / on s1 instead of s1a setup_nanobsd_etc() { From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 01:16:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70198106566B; Tue, 13 Apr 2010 01:16:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54CDC8FC14; Tue, 13 Apr 2010 01:16: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 o3D1GFng097819; Tue, 13 Apr 2010 01:16:15 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D1GFgQ097814; Tue, 13 Apr 2010 01:16:15 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004130116.o3D1GFgQ097814@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 01:16: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: r206540 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 01:16:15 -0000 Author: emaste Date: Tue Apr 13 01:16:15 2010 New Revision: 206540 URL: http://svn.freebsd.org/changeset/base/206540 Log: Sync some minor items with the upstream driver. Should have no functional change. Modified: head/sys/dev/aac/aac.c head/sys/dev/aac/aac_pci.c head/sys/dev/aac/aac_tables.h head/sys/dev/aac/aacreg.h Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Tue Apr 13 01:04:11 2010 (r206539) +++ head/sys/dev/aac/aac.c Tue Apr 13 01:16:15 2010 (r206540) @@ -1880,7 +1880,7 @@ aac_init(struct aac_softc *sc) ip->InitFlags = 0; if (sc->flags & AAC_FLAGS_NEW_COMM) { - ip->InitFlags = INITFLAGS_NEW_COMM_SUPPORTED; + ip->InitFlags |= AAC_INITFLAGS_NEW_COMM_SUPPORTED; device_printf(sc->aac_dev, "New comm. interface enabled\n"); } Modified: head/sys/dev/aac/aac_pci.c ============================================================================== --- head/sys/dev/aac/aac_pci.c Tue Apr 13 01:04:11 2010 (r206539) +++ head/sys/dev/aac/aac_pci.c Tue Apr 13 01:16:15 2010 (r206540) @@ -177,7 +177,7 @@ struct aac_ident {0x9005, 0x0285, 0x1014, 0x0312, AAC_HWIF_I960RX, 0, "IBM ServeRAID 8i"}, {0x9005, 0x0285, 0x9005, 0x0298, AAC_HWIF_I960RX, 0, - "Adaptec SAS RAID 4000SAS"}, + "Adaptec RAID 4000"}, {0x9005, 0x0285, 0x9005, 0x0299, AAC_HWIF_I960RX, 0, "Adaptec SAS RAID 4800SAS"}, {0x9005, 0x0285, 0x9005, 0x029a, AAC_HWIF_I960RX, 0, Modified: head/sys/dev/aac/aac_tables.h ============================================================================== --- head/sys/dev/aac/aac_tables.h Tue Apr 13 01:04:11 2010 (r206539) +++ head/sys/dev/aac/aac_tables.h Tue Apr 13 01:16:15 2010 (r206540) @@ -57,6 +57,7 @@ static struct aac_code_lookup aac_comman {"quota exceeded", 69}, {"stale file handle", 70}, {"too many levels of remote in path", 71}, + {"device busy (spinning up)", 72}, {"bad file handle", 10001}, {"not sync", 10002}, {"bad cookie", 10003}, @@ -68,6 +69,7 @@ static struct aac_code_lookup aac_comman {"not mounted", 10009}, {"in maintenance mode", 10010}, {"stale ACL", 10011}, + {"bus reset - command aborted", 20001}, {NULL, 0}, {"unknown command status", 0} }; Modified: head/sys/dev/aac/aacreg.h ============================================================================== --- head/sys/dev/aac/aacreg.h Tue Apr 13 01:04:11 2010 (r206539) +++ head/sys/dev/aac/aacreg.h Tue Apr 13 01:16:15 2010 (r206540) @@ -306,7 +306,7 @@ struct aac_adapter_init { u_int32_t HostElapsedSeconds; /* ADAPTER_INIT_STRUCT_REVISION_4 begins here */ u_int32_t InitFlags; /* flags for supported features */ -#define INITFLAGS_NEW_COMM_SUPPORTED 1 +#define AAC_INITFLAGS_NEW_COMM_SUPPORTED 1 u_int32_t MaxIoCommands; /* max outstanding commands */ u_int32_t MaxIoSize; /* largest I/O command */ u_int32_t MaxFibSize; /* largest FIB to adapter */ @@ -1081,6 +1081,7 @@ typedef enum { ST_DQUOT = 69, ST_STALE = 70, ST_REMOTE = 71, + ST_NOT_READY = 72, ST_BADHANDLE = 10001, ST_NOT_SYNC = 10002, ST_BAD_COOKIE = 10003, @@ -1091,7 +1092,8 @@ typedef enum { ST_JUKEBOX = 10008, ST_NOTMOUNTED = 10009, ST_MAINTMODE = 10010, - ST_STALEACL = 10011 + ST_STALEACL = 10011, + ST_BUS_RESET = 20001 } AAC_FSAStatus; /* From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 01:22:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95665106564A; Tue, 13 Apr 2010 01:22:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 843CE8FC12; Tue, 13 Apr 2010 01:22: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 o3D0tCEQ093011; Tue, 13 Apr 2010 00:55:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D0tCL1093009; Tue, 13 Apr 2010 00:55:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004130055.o3D0tCL1093009@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 00:55: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: r206536 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 01:22:17 -0000 Author: imp Date: Tue Apr 13 00:55:11 2010 New Revision: 206536 URL: http://svn.freebsd.org/changeset/base/206536 Log: MFC 205838: Mark the vtoc.h structure as packed so that it is the right size and layout on arm. MFC after: 7 days Modified: stable/8/sys/sys/vtoc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/vtoc.h ============================================================================== --- stable/8/sys/sys/vtoc.h Tue Apr 13 00:48:54 2010 (r206535) +++ stable/8/sys/sys/vtoc.h Tue Apr 13 00:55:11 2010 (r206536) @@ -97,7 +97,7 @@ struct vtoc8 { } map[VTOC8_NPARTS]; uint16_t magic; uint16_t cksum; -}; +} __packed; #ifdef CTASSERT CTASSERT(sizeof(struct vtoc8) == 512); From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 03:10:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1FC0106566C; Tue, 13 Apr 2010 03:10:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDD9A8FC08; Tue, 13 Apr 2010 03:10: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 o3D3Ac4d023317; Tue, 13 Apr 2010 03:10:38 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D3Ac8G023315; Tue, 13 Apr 2010 03:10:38 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004130310.o3D3Ac8G023315@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 13 Apr 2010 03:10: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: r206541 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 03:10:39 -0000 Author: marcel Date: Tue Apr 13 03:10:38 2010 New Revision: 206541 URL: http://svn.freebsd.org/changeset/base/206541 Log: Sync up to SDM 2.2. Modified: head/sys/ia64/include/pal.h Modified: head/sys/ia64/include/pal.h ============================================================================== --- head/sys/ia64/include/pal.h Tue Apr 13 01:16:15 2010 (r206540) +++ head/sys/ia64/include/pal.h Tue Apr 13 03:10:38 2010 (r206541) @@ -54,11 +54,11 @@ #define PAL_VERSION 20 #define PAL_MC_CLEAR_LOG 21 #define PAL_MC_DRAIN 22 +#define PAL_MC_EXPECTED 23 #define PAL_MC_DYNAMIC_STATE 24 #define PAL_MC_ERROR_INFO 25 -#define PAL_MC_EXPECTED 23 +#define PAL_MC_RESUME 26 #define PAL_MC_REGISTER_MEM 27 -#define PAL_MC_RESUME 26 #define PAL_HALT 28 #define PAL_HALT_LIGHT 29 #define PAL_COPY_INFO 30 @@ -66,11 +66,16 @@ #define PAL_PMI_ENTRYPOINT 32 #define PAL_ENTER_IA_32_ENV 33 #define PAL_VM_PAGE_SIZE 34 -#define PAL_MEM_FOR_TEST 37 +#define PAL_TEST_INFO 37 #define PAL_CACHE_PROT_INFO 38 #define PAL_REGISTER_INFO 39 -#define PAL_SHUTDOWN 40 #define PAL_PREFETCH_VISIBILITY 41 +#define PAL_LOGICAL_TO_PHYSICAL 42 +#define PAL_CACHE_SHARED_INFO 43 +#define PAL_PSTATE_INFO 44 +#define PAL_SHUTDOWN 45 +#define PAL_GET_HW_POLICY 48 +#define PAL_SET_HW_POLICY 49 /* * Architected stacked calling convention procedures. @@ -81,6 +86,19 @@ #define PAL_CACHE_READ 259 #define PAL_CACHE_WRITE 260 #define PAL_VM_TR_READ 261 +#define PAL_GET_PSTATE 262 +#define PAL_SET_PSTATE 263 +#define PAL_VP_CREATE 265 +#define PAL_VP_ENV_INFO 266 +#define PAL_VP_EXIT_ENV 267 +#define PAL_VP_INIT_ENV 268 +#define PAL_VP_REGISTER 269 +#define PAL_VP_RESTORE 270 +#define PAL_VP_SAVE 271 +#define PAL_VP_TERMINATE 272 +#define PAL_BRAND_INFO 274 +#define PAL_MC_ERROR_INJECT 276 +#define PAL_MEMORY_BUFFER 277 /* * Default physical address of the Processor Interrupt Block (PIB). From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 06:01:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 671AB1065670; Tue, 13 Apr 2010 06:01:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54CBB8FC0A; Tue, 13 Apr 2010 06:01: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 o3D61PCH060992; Tue, 13 Apr 2010 06:01:25 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D61PYS060991; Tue, 13 Apr 2010 06:01:25 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201004130601.o3D61PYS060991@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 13 Apr 2010 06:01: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: r206542 - stable/8/lib/libc/posix1e X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 06:01:25 -0000 Author: trasz Date: Tue Apr 13 06:01:24 2010 New Revision: 206542 URL: http://svn.freebsd.org/changeset/base/206542 Log: MFC r205796: Make acl_to_text_np(3) not crash on long group or user names in NFSv4 ACLs. PR: amd64/145091 Modified: stable/8/lib/libc/posix1e/acl_to_text_nfs4.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/posix1e/acl_to_text_nfs4.c ============================================================================== --- stable/8/lib/libc/posix1e/acl_to_text_nfs4.c Tue Apr 13 03:10:38 2010 (r206541) +++ stable/8/lib/libc/posix1e/acl_to_text_nfs4.c Tue Apr 13 06:01:24 2010 (r206542) @@ -167,7 +167,7 @@ format_additional_id(char *str, size_t s static int format_entry(char *str, size_t size, const acl_entry_t entry, int flags) { - size_t off = 0, padding_length, maximum_who_field_length = 18; + size_t off = 0, min_who_field_length = 18; acl_permset_t permset; acl_flagset_t flagset; int error, len; @@ -188,12 +188,9 @@ format_entry(char *str, size_t size, con if (error) return (error); len = strlen(buf); - padding_length = maximum_who_field_length - len; - if (padding_length > 0) { - memset(str, ' ', padding_length); - off += padding_length; - } - off += snprintf(str + off, size - off, "%s:", buf); + if (len < min_who_field_length) + len = min_who_field_length; + off += snprintf(str + off, size - off, "%*s:", len, buf); error = _nfs4_format_access_mask(buf, sizeof(buf), *permset, flags & ACL_TEXT_VERBOSE); From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 06:05:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 505571065670; Tue, 13 Apr 2010 06:05:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9908FC16; Tue, 13 Apr 2010 06:05: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 o3D65GLk061872; Tue, 13 Apr 2010 06:05:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D65GbG061870; Tue, 13 Apr 2010 06:05:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201004130605.o3D65GbG061870@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 13 Apr 2010 06:05: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: r206543 - stable/8/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 06:05:16 -0000 Author: trasz Date: Tue Apr 13 06:05:15 2010 New Revision: 206543 URL: http://svn.freebsd.org/changeset/base/206543 Log: MFC r205853: Add myself. Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd Directory Properties: stable/8/usr.bin/calendar/ (props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Tue Apr 13 06:01:24 2010 (r206542) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Tue Apr 13 06:05:15 2010 (r206543) @@ -107,6 +107,7 @@ 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 04/05 Stacey Son born in Burley, Idaho, United States. 1967 +04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 04/11 Bruce A. Mah born in Fresno, California, United States, 1969 From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 06:27:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D61211065672; Tue, 13 Apr 2010 06:27:02 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4BC18FC08; Tue, 13 Apr 2010 06:27: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 o3D6R2R5066730; Tue, 13 Apr 2010 06:27:02 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D6R28c066727; Tue, 13 Apr 2010 06:27:02 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201004130627.o3D6R28c066727@svn.freebsd.org> From: Kevin Lo Date: Tue, 13 Apr 2010 06:27: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: r206544 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 06:27:02 -0000 Author: kevlo Date: Tue Apr 13 06:27:02 2010 New Revision: 206544 URL: http://svn.freebsd.org/changeset/base/206544 Log: The Quanta Q101 modem has a different type of cdrom driver disk, add the product id and use a standard scsi eject. Reviewed by: thompsa MFC after: 3 days Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Tue Apr 13 06:05:15 2010 (r206543) +++ head/sys/dev/usb/serial/u3g.c Tue Apr 13 06:27:02 2010 (r206544) @@ -501,6 +501,7 @@ static const struct usb_device_id u3g_de U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), U3G_DEV(QUALCOMMINC, ZTE_STOR2, U3GINIT_SCSIEJECT), + U3G_DEV(QUANTA, Q101_STOR, U3GINIT_SCSIEJECT), U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Apr 13 06:05:15 2010 (r206543) +++ head/sys/dev/usb/usbdevs Tue Apr 13 06:27:02 2010 (r206544) @@ -2519,6 +2519,7 @@ product QUALCOMMINC E2003 0x2003 3G mode /* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 +product QUANTA Q101_STOR 0x1000 USB Q101 Storage product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 06:48:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94C29106564A; Tue, 13 Apr 2010 06:48:37 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D368FC0C; Tue, 13 Apr 2010 06:48: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 o3D6mbTS071597; Tue, 13 Apr 2010 06:48:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D6mbX7071595; Tue, 13 Apr 2010 06:48:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004130648.o3D6mbX7071595@svn.freebsd.org> From: Alan Cox Date: Tue, 13 Apr 2010 06:48: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: r206545 - 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, 13 Apr 2010 06:48:37 -0000 Author: alc Date: Tue Apr 13 06:48:37 2010 New Revision: 206545 URL: http://svn.freebsd.org/changeset/base/206545 Log: Simplify vm_thread_swapin(). Modified: head/sys/vm/vm_glue.c Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Tue Apr 13 06:27:02 2010 (r206544) +++ head/sys/vm/vm_glue.c Tue Apr 13 06:48:37 2010 (r206545) @@ -536,7 +536,8 @@ vm_thread_swapin(struct thread *td) ksobj = td->td_kstack_obj; VM_OBJECT_LOCK(ksobj); for (i = 0; i < pages; i++) { - m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | + VM_ALLOC_WIRED); if (m->valid != VM_PAGE_BITS_ALL) { rv = vm_pager_get_pages(ksobj, &m, 1, 0); if (rv != VM_PAGER_OK) @@ -544,9 +545,6 @@ vm_thread_swapin(struct thread *td) m = vm_page_lookup(ksobj, i); } ma[i] = m; - vm_page_lock_queues(); - vm_page_wire(m); - vm_page_unlock_queues(); vm_page_wakeup(m); } VM_OBJECT_UNLOCK(ksobj); From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 08:45:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6DB9106566B; Tue, 13 Apr 2010 08:45:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95A5D8FC0A; Tue, 13 Apr 2010 08:45: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 o3D8jttH097469; Tue, 13 Apr 2010 08:45:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D8jt4n097467; Tue, 13 Apr 2010 08:45:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004130845.o3D8jt4n097467@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 08:45: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: r206546 - 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, 13 Apr 2010 08:45:55 -0000 Author: kib Date: Tue Apr 13 08:45:55 2010 New Revision: 206546 URL: http://svn.freebsd.org/changeset/base/206546 Log: Remove XXX comment. Add another comment, describing why f_vnode assignment is useful. MFC after: 3 days Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Apr 13 06:48:37 2010 (r206545) +++ head/sys/kern/vfs_syscalls.c Tue Apr 13 08:45:55 2010 (r206546) @@ -1124,7 +1124,12 @@ kern_openat(struct thread *td, int fd, c NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; - fp->f_vnode = vp; /* XXX Does devfs need this? */ + /* + * Store the vnode, for any f_type. Typically, the vnode use + * count is decremented by direct call to vn_closefile() for + * files that switched type in the cdevsw fdopen() method. + */ + fp->f_vnode = vp; /* * If the file wasn't claimed by devfs bind it to the normal * vnode operations here. From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 08:52:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E065106564A; Tue, 13 Apr 2010 08:52:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2228FC0C; Tue, 13 Apr 2010 08:52: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 o3D8qKb6098938; Tue, 13 Apr 2010 08:52:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D8qKNd098936; Tue, 13 Apr 2010 08:52:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004130852.o3D8qKNd098936@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 08:52: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: r206547 - 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, 13 Apr 2010 08:52:20 -0000 Author: kib Date: Tue Apr 13 08:52:20 2010 New Revision: 206547 URL: http://svn.freebsd.org/changeset/base/206547 Log: Handle a case in kern_openat() when vn_open() change file type from DTYPE_VNODE. Only acquire locks for O_EXLOCK/O_SHLOCK if file type is still vnode, since we allow for fcntl(2) to process with advisory locks for DTYPE_VNODE only. Another reason is that all fo_close() routines need to check and release locks otherwise. For O_TRUNC, call fo_truncate() instead of truncating the vnode. Discussed with: rwatson MFC after: 2 week Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Apr 13 08:45:55 2010 (r206546) +++ head/sys/kern/vfs_syscalls.c Tue Apr 13 08:52:20 2010 (r206547) @@ -1047,8 +1047,6 @@ kern_openat(struct thread *td, int fd, c struct filedesc *fdp = p->p_fd; struct file *fp; struct vnode *vp; - struct vattr vat; - struct mount *mp; int cmode; struct file *nfp; int type, indx, error; @@ -1141,7 +1139,7 @@ kern_openat(struct thread *td, int fd, c } VOP_UNLOCK(vp, 0); - if (flags & (O_EXLOCK | O_SHLOCK)) { + if (fp->f_type == DTYPE_VNODE && (flags & (O_EXLOCK | O_SHLOCK)) != 0) { lf.l_whence = SEEK_SET; lf.l_start = 0; lf.l_len = 0; @@ -1158,18 +1156,7 @@ kern_openat(struct thread *td, int fd, c atomic_set_int(&fp->f_flag, FHASLOCK); } if (flags & O_TRUNC) { - if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) - goto bad; - VATTR_NULL(&vat); - vat.va_size = 0; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); -#ifdef MAC - error = mac_vnode_check_write(td->td_ucred, fp->f_cred, vp); - if (error == 0) -#endif - error = VOP_SETATTR(vp, &vat, td->td_ucred); - VOP_UNLOCK(vp, 0); - vn_finished_write(mp); + error = fo_truncate(fp, 0, td->td_ucred, td); if (error) goto bad; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 08:54:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 509DE106566C; Tue, 13 Apr 2010 08:54:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC518FC17; Tue, 13 Apr 2010 08:54: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 o3D8ssjl099531; Tue, 13 Apr 2010 08:54:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D8ssgC099529; Tue, 13 Apr 2010 08:54:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004130854.o3D8ssgC099529@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 08:54: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: r206548 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 08:54:54 -0000 Author: kib Date: Tue Apr 13 08:54:53 2010 New Revision: 206548 URL: http://svn.freebsd.org/changeset/base/206548 Log: Update the list of the process flags for P_WKILLED. MFC after: 4 weeks Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Tue Apr 13 08:52:20 2010 (r206547) +++ head/bin/ps/ps.1 Tue Apr 13 08:54:53 2010 (r206548) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 17, 2010 +.Dd April 13, 2010 .Dt PS 1 .Os .Sh NAME @@ -298,6 +298,7 @@ the include file .It Dv "P_WAITED" Ta No "0x01000 Someone is waiting for us" .It Dv "P_WEXIT" Ta No "0x02000 Working on exiting" .It Dv "P_EXEC" Ta No "0x04000 Process called exec" +.It Dv "P_WKILLED" Ta No "0x08000 Killed, shall go to kernel/user boundary ASAP" .It Dv "P_CONTINUED" Ta No "0x10000 Proc has continued from a stopped state" .It Dv "P_STOPPED_SIG" Ta No "0x20000 Stopped due to SIGSTOP/SIGTSTP" .It Dv "P_STOPPED_TRACE" Ta No "0x40000 Stopped because of tracing" From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 08:56:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C64741065675; Tue, 13 Apr 2010 08:56:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF89F8FC13; Tue, 13 Apr 2010 08:56: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 o3D8u3g6099847; Tue, 13 Apr 2010 08:56:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D8u3Nr099845; Tue, 13 Apr 2010 08:56:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004130856.o3D8u3Nr099845@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 08:56: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: r206549 - 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, 13 Apr 2010 08:56:03 -0000 Author: kib Date: Tue Apr 13 08:56:03 2010 New Revision: 206549 URL: http://svn.freebsd.org/changeset/base/206549 Log: Align the declaration for sa_sigaction with POSIX. MFC after: 3 days Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Tue Apr 13 08:54:53 2010 (r206548) +++ head/lib/libc/sys/sigaction.2 Tue Apr 13 08:56:03 2010 (r206549) @@ -28,7 +28,7 @@ .\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd June 7, 2004 +.Dd April 13, 2010 .Dt SIGACTION 2 .Os .Sh NAME @@ -42,7 +42,7 @@ struct sigaction { union { void (*__sa_handler)(int); - void (*__sa_sigaction)(int, struct __siginfo *, void *); + void (*__sa_sigaction)(int, siginfo_t *, void *); } __sigaction_u; /* signal handler */ int sa_flags; /* see signal options below */ sigset_t sa_mask; /* signal mask to apply */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 09:18:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86CA4106564A; Tue, 13 Apr 2010 09:18:54 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6D58FC24; Tue, 13 Apr 2010 09:18:53 +0000 (UTC) Received: by bwz8 with SMTP id 8so3950864bwz.3 for ; Tue, 13 Apr 2010 02:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=tHma7y76gWkRATNNSjSnj9ZUq+TQNOwPzJLs+5hPdBM=; b=PaHvgntbnJ2uYIVFHiC+XK5sjyFcKDdjD+wxH7ycfMfkXbWX1aktxKrgvLL2S5b3Mj 1tc7VYH/BHVdrjbr+jNoL7mY3sHxo3KJOMnRigvvods5Ier9q6gGe9I2ctcBUVVLw4kc M76HjG+zpzV6t0Y/mDRPykGvy1dLnUiqKvT1k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=bQlApyOwoNw7sC63La3wqfEMhBGENu0RxD11spC933VdvgG7iRMZ7AICz4rFsqLQaN PSi515h2jlQsoNkf+U/BAWzTUQ+YyAmqFC/Y76EVGZteIcuIaYUyPh5o1t3PQSrBN/f3 j7GMRjkr02SQkTPUlZRO35r7NZI0P58sJNBFA= Received: by 10.103.85.17 with SMTP id n17mr2854380mul.50.1271150332051; Tue, 13 Apr 2010 02:18:52 -0700 (PDT) Received: from [10.0.10.2] (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id b9sm22029756mug.13.2010.04.13.02.18.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 13 Apr 2010 02:18:49 -0700 (PDT) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <20100412210512.GB94885@onelab2.iet.unipi.it> Date: Tue, 13 Apr 2010 10:18:48 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <445CC969-4E21-4EA8-BE19-1754F4B2C583@freebsd.org> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, Pawel Jakub Dawidek , svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 09:18:54 -0000 On 12 Apr 2010, at 22:05, Luigi Rizzo wrote: > On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: > ... >>> @@ -0,0 +1,19 @@ >>> +# GEOM_LIBRARY_PATH >>> +# $FreeBSD$ >>> + >>> +.PATH: /usr/src/sbin/geom/misc >>> + >>> +CFLAGS +=3D -I/usr/src/sbin/geom >>=20 >> This doesn't look right. >=20 > probably a leftover from older versions of this code for 6.x . > I will do more tests tomorrow (for 7.x at this point, there is > no point in trying to support 6.x I believe) and try to remove > it if not necessary. Even if you need geom/misc, this is not the correct way to include it. M=3D ${.CURDIR}/../../misc .PATH: ${M} CFLAGS+=3D-I${M} is probably what you want. There are many people out there (me included) = that don't use /usr/src. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 09:52:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFE4D106564A; Tue, 13 Apr 2010 09:52:42 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AED838FC1C; Tue, 13 Apr 2010 09:52: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 o3D9qgiB012415; Tue, 13 Apr 2010 09:52:42 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D9qgJs012413; Tue, 13 Apr 2010 09:52:42 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004130952.o3D9qgJs012413@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 13 Apr 2010 09:52: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: r206550 - head/sbin/geom/class/sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 09:52:42 -0000 Author: luigi Date: Tue Apr 13 09:52:42 2010 New Revision: 206550 URL: http://svn.freebsd.org/changeset/base/206550 Log: use correct .PATH, remove unused CFLAGS Modified: head/sbin/geom/class/sched/Makefile Modified: head/sbin/geom/class/sched/Makefile ============================================================================== --- head/sbin/geom/class/sched/Makefile Tue Apr 13 08:56:03 2010 (r206549) +++ head/sbin/geom/class/sched/Makefile Tue Apr 13 09:52:42 2010 (r206550) @@ -1,9 +1,8 @@ # GEOM_LIBRARY_PATH # $FreeBSD$ -.PATH: /usr/src/sbin/geom/misc - -CFLAGS += -I/usr/src/sbin/geom +.PATH: ${.CURDIR}/../../misc +#CFLAGS += -I/usr/src/sbin/geom CLASS=sched From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 09:53:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCB3310657C0; Tue, 13 Apr 2010 09:53:08 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBE908FC24; Tue, 13 Apr 2010 09: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 o3D9r8VC012554; Tue, 13 Apr 2010 09:53:08 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D9r8r0012552; Tue, 13 Apr 2010 09:53:08 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004130953.o3D9r8r0012552@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 13 Apr 2010 09:53: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: r206551 - head/sys/geom/sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 09:53:08 -0000 Author: luigi Date: Tue Apr 13 09:53:08 2010 New Revision: 206551 URL: http://svn.freebsd.org/changeset/base/206551 Log: make code compile with KTR Modified: head/sys/geom/sched/g_sched.c Modified: head/sys/geom/sched/g_sched.c ============================================================================== --- head/sys/geom/sched/g_sched.c Tue Apr 13 09:52:42 2010 (r206550) +++ head/sys/geom/sched/g_sched.c Tue Apr 13 09:53:08 2010 (r206551) @@ -753,13 +753,6 @@ g_gsched_modevent(module_t mod, int cmd, #ifdef KTR #define TRC_BIO_EVENT(e, bp) g_sched_trace_bio_ ## e (bp) -static inline int -g_sched_issuer_pid(struct bio *bp) -{ - struct thread *thread = g_sched_issuer(bp); - - return (thread->td_tid); -} static inline char g_sched_type(struct bio *bp) @@ -776,7 +769,7 @@ static inline void g_sched_trace_bio_START(struct bio *bp) { - CTR5(KTR_GSCHED, "S %d %c %lu/%lu %lu", g_sched_issuer_pid(bp), + CTR5(KTR_GSCHED, "S %lu %c %lu/%lu %lu", g_sched_classify(bp), g_sched_type(bp), bp->bio_offset / ULONG_MAX, bp->bio_offset, bp->bio_length); } @@ -785,13 +778,13 @@ static inline void g_sched_trace_bio_DONE(struct bio *bp) { - CTR5(KTR_GSCHED, "D %d %c %lu/%lu %lu", g_sched_issuer_pid(bp), + CTR5(KTR_GSCHED, "D %lu %c %lu/%lu %lu", g_sched_classify(bp), g_sched_type(bp), bp->bio_offset / ULONG_MAX, bp->bio_offset, bp->bio_length); } -#else +#else /* !KTR */ #define TRC_BIO_EVENT(e, bp) -#endif +#endif /* !KTR */ /* * g_sched_done() and g_sched_start() dispatch the geom requests to From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 09:56:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70D341065670; Tue, 13 Apr 2010 09:56:17 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEFB8FC19; Tue, 13 Apr 2010 09:56: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 o3D9uHwj013299; Tue, 13 Apr 2010 09:56:17 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3D9uHQU013292; Tue, 13 Apr 2010 09:56:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004130956.o3D9uHQU013292@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 13 Apr 2010 09:56: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: r206552 - in head: sbin/geom/class/sched sys/geom/sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 09:56:17 -0000 Author: luigi Date: Tue Apr 13 09:56:17 2010 New Revision: 206552 URL: http://svn.freebsd.org/changeset/base/206552 Log: fix copyright format, as requested by Joel Dahl Modified: head/sbin/geom/class/sched/geom_sched.c head/sbin/geom/class/sched/gsched.8 head/sys/geom/sched/g_sched.c head/sys/geom/sched/g_sched.h head/sys/geom/sched/gs_rr.c head/sys/geom/sched/gs_scheduler.h Modified: head/sbin/geom/class/sched/geom_sched.c ============================================================================== --- head/sbin/geom/class/sched/geom_sched.c Tue Apr 13 09:53:08 2010 (r206551) +++ head/sbin/geom/class/sched/geom_sched.c Tue Apr 13 09:56:17 2010 (r206552) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009 Fabio Checconi, Luigi Rizzo + * Copyright (c) 2009 Fabio Checconi + * Copyright (c) 2010 Luigi Rizzo, Universita` di Pisa * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sbin/geom/class/sched/gsched.8 ============================================================================== --- head/sbin/geom/class/sched/gsched.8 Tue Apr 13 09:53:08 2010 (r206551) +++ head/sbin/geom/class/sched/gsched.8 Tue Apr 13 09:56:17 2010 (r206552) @@ -1,6 +1,6 @@ -.\" Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo +.\" Copyright (c) 2009-2010 Fabio Checconi +.\" Copyright (c) 2009-2010 Luigi Rizzo, Universita` di Pisa .\" All rights reserved. -.\" $FreeBSD$ .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,6 +23,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" +.\" $FreeBSD$ +.\" .Dd April 12, 2010 .Dt GSCHED 8 .Os Modified: head/sys/geom/sched/g_sched.c ============================================================================== --- head/sys/geom/sched/g_sched.c Tue Apr 13 09:53:08 2010 (r206551) +++ head/sys/geom/sched/g_sched.c Tue Apr 13 09:56:17 2010 (r206552) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo + * Copyright (c) 2009-2010 Fabio Checconi + * Copyright (c) 2009-2010 Luigi Rizzo, Universita` di Pisa * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/sched/g_sched.h ============================================================================== --- head/sys/geom/sched/g_sched.h Tue Apr 13 09:53:08 2010 (r206551) +++ head/sys/geom/sched/g_sched.h Tue Apr 13 09:56:17 2010 (r206552) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo + * Copyright (c) 2009-2010 Fabio Checconi + * Copyright (c) 2009-2010 Luigi Rizzo, Universita` di Pisa * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/sched/gs_rr.c ============================================================================== --- head/sys/geom/sched/gs_rr.c Tue Apr 13 09:53:08 2010 (r206551) +++ head/sys/geom/sched/gs_rr.c Tue Apr 13 09:56:17 2010 (r206552) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo + * Copyright (c) 2009-2010 Fabio Checconi + * Copyright (c) 2009-2010 Luigi Rizzo, Universita` di Pisa * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/sched/gs_scheduler.h ============================================================================== --- head/sys/geom/sched/gs_scheduler.h Tue Apr 13 09:53:08 2010 (r206551) +++ head/sys/geom/sched/gs_scheduler.h Tue Apr 13 09:56:17 2010 (r206552) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo + * Copyright (c) 2009-2010 Fabio Checconi + * Copyright (c) 2009-2010 Luigi Rizzo, Universita` di Pisa * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 10:12:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D655106564A; Tue, 13 Apr 2010 10:12:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ADD88FC21; Tue, 13 Apr 2010 10:12: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 o3DACwbj017107; Tue, 13 Apr 2010 10:12:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DACwMq017101; Tue, 13 Apr 2010 10:12:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004131012.o3DACwMq017101@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 10:12: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: r206553 - in head/sys: amd64/amd64 amd64/ia32 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: Tue, 13 Apr 2010 10:12:59 -0000 Author: kib Date: Tue Apr 13 10:12:58 2010 New Revision: 206553 URL: http://svn.freebsd.org/changeset/base/206553 Log: Change printf() calls to uprintf() for sigreturn() and trap() complaints about inacessible or wrong mcontext, and for dreaded "kernel trap with interrupts disabled" situation. The later is changed when trap is generated from user mode (shall never be ?). Normalize the messages to include both pid and thread name. MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/trap.c head/sys/amd64/ia32/ia32_signal.c head/sys/i386/i386/machdep.c head/sys/i386/i386/trap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Tue Apr 13 09:56:17 2010 (r206552) +++ head/sys/amd64/amd64/machdep.c Tue Apr 13 10:12:58 2010 (r206553) @@ -424,13 +424,14 @@ sigreturn(td, uap) error = copyin(uap->sigcntxp, &uc, sizeof(uc)); if (error != 0) { - printf("sigreturn (pid %d): copyin failed\n", p->p_pid); + uprintf("pid %d (%s): sigreturn copyin failed\n", + p->p_pid, td->td_name); return (error); } ucp = &uc; if ((ucp->uc_mcontext.mc_flags & ~_MC_FLAG_MASK) != 0) { - printf("sigreturn (pid %d): mc_flags %x\n", p->p_pid, - ucp->uc_mcontext.mc_flags); + uprintf("pid %d (%s): sigreturn mc_flags %x\n", p->p_pid, + td->td_name, ucp->uc_mcontext.mc_flags); return (EINVAL); } regs = td->td_frame; @@ -449,8 +450,8 @@ sigreturn(td, uap) * one less debugger trap, so allowing it is fairly harmless. */ if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { - printf("sigreturn (pid %d): rflags = 0x%lx\n", p->p_pid, - rflags); + uprintf("pid %d (%s): sigreturn rflags = 0x%lx\n", p->p_pid, + td->td_name, rflags); return (EINVAL); } @@ -461,7 +462,8 @@ sigreturn(td, uap) */ cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { - printf("sigreturn (pid %d): cs = 0x%x\n", p->p_pid, cs); + uprintf("pid %d (%s): sigreturn cs = 0x%x\n", p->p_pid, + td->td_name, cs); ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; @@ -473,7 +475,8 @@ sigreturn(td, uap) ret = set_fpcontext(td, &ucp->uc_mcontext); if (ret != 0) { - printf("sigreturn (pid %d): set_fpcontext\n", p->p_pid); + uprintf("pid %d (%s): sigreturn set_fpcontext err %d\n", + p->p_pid, td->td_name, ret); return (ret); } bcopy(&ucp->uc_mcontext.mc_rdi, regs, sizeof(*regs)); Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Tue Apr 13 09:56:17 2010 (r206552) +++ head/sys/amd64/amd64/trap.c Tue Apr 13 10:12:58 2010 (r206553) @@ -303,7 +303,7 @@ trap(struct trapframe *frame) * enabled later. */ if (ISPL(frame->tf_cs) == SEL_UPL) - printf( + uprintf( "pid %ld (%s): trap %d with interrupts disabled\n", (long)curproc->p_pid, curthread->td_name, type); else if (type != T_NMI && type != T_BPTFLT && Modified: head/sys/amd64/ia32/ia32_signal.c ============================================================================== --- head/sys/amd64/ia32/ia32_signal.c Tue Apr 13 09:56:17 2010 (r206552) +++ head/sys/amd64/ia32/ia32_signal.c Tue Apr 13 10:12:58 2010 (r206553) @@ -565,7 +565,8 @@ freebsd4_freebsd32_sigreturn(td, uap) * one less debugger trap, so allowing it is fairly harmless. */ if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { - printf("freebsd4_freebsd32_sigreturn: eflags = 0x%x\n", eflags); + uprintf("pid %d (%s): freebsd4_freebsd32_sigreturn eflags = 0x%x\n", + td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); } @@ -576,7 +577,8 @@ freebsd4_freebsd32_sigreturn(td, uap) */ cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { - printf("freebsd4_sigreturn: cs = 0x%x\n", cs); + uprintf("pid %d (%s): freebsd4_sigreturn cs = 0x%x\n", + td->td_proc->p_pid, td->td_name, cs); ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; @@ -647,7 +649,8 @@ freebsd32_sigreturn(td, uap) * one less debugger trap, so allowing it is fairly harmless. */ if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { - printf("freebsd32_sigreturn: eflags = 0x%x\n", eflags); + uprintf("pid %d (%s): freebsd32_sigreturn eflags = 0x%x\n", + td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); } @@ -658,7 +661,8 @@ freebsd32_sigreturn(td, uap) */ cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { - printf("sigreturn: cs = 0x%x\n", cs); + uprintf("pid %d (%s): sigreturn cs = 0x%x\n", + td->td_proc->p_pid, td->td_name, cs); ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Apr 13 09:56:17 2010 (r206552) +++ head/sys/i386/i386/machdep.c Tue Apr 13 10:12:58 2010 (r206553) @@ -944,7 +944,8 @@ freebsd4_sigreturn(td, uap) * one less debugger trap, so allowing it is fairly harmless. */ if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { - printf("freebsd4_sigreturn: eflags = 0x%x\n", eflags); + uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", + td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); } @@ -955,7 +956,8 @@ freebsd4_sigreturn(td, uap) */ cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { - printf("freebsd4_sigreturn: cs = 0x%x\n", cs); + uprintf("pid %d (%s): freebsd4_sigreturn cs = 0x%x\n", + td->td_proc->p_pid, td->td_name, cs); ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; @@ -1056,7 +1058,8 @@ sigreturn(td, uap) * one less debugger trap, so allowing it is fairly harmless. */ if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { - printf("sigreturn: eflags = 0x%x\n", eflags); + uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", + td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); } @@ -1067,7 +1070,8 @@ sigreturn(td, uap) */ cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { - printf("sigreturn: cs = 0x%x\n", cs); + uprintf("pid %d (%s): sigreturn cs = 0x%x\n", + td->td_proc->p_pid, td->td_name, cs); ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGBUS; ksi.ksi_code = BUS_OBJERR; Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Tue Apr 13 09:56:17 2010 (r206552) +++ head/sys/i386/i386/trap.c Tue Apr 13 10:12:58 2010 (r206553) @@ -277,7 +277,7 @@ trap(struct trapframe *frame) * enabled later. */ if (ISPL(frame->tf_cs) == SEL_UPL || (frame->tf_eflags & PSL_VM)) - printf( + uprintf( "pid %ld (%s): trap %d with interrupts disabled\n", (long)curproc->p_pid, curthread->td_name, type); else if (type != T_BPTFLT && type != T_TRCTRAP && @@ -507,7 +507,7 @@ trap(struct trapframe *frame) if (npxdna()) goto userout; #endif - printf("pid %d killed due to lack of floating point\n", + uprintf("pid %d killed due to lack of floating point\n", p->p_pid); i = SIGKILL; ucode = 0; From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 10:20:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 598C3106566B; Tue, 13 Apr 2010 10:20: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 C30278FC1E; Tue, 13 Apr 2010 10:20: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 o3DAKiql090947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Apr 2010 13:20: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 o3DAKh3S059700; Tue, 13 Apr 2010 13:20:43 +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 o3DAKhuj059699; Tue, 13 Apr 2010 13:20:43 +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: Tue, 13 Apr 2010 13:20:43 +0300 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100413102043.GF2415@deviant.kiev.zoral.com.ua> References: <201004131012.o3DACwMq017101@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1uCEzVPnDDIqSP+G" Content-Disposition: inline In-Reply-To: <201004131012.o3DACwMq017101@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r206553 - in head/sys: amd64/amd64 amd64/ia32 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: Tue, 13 Apr 2010 10:20:49 -0000 --1uCEzVPnDDIqSP+G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 13, 2010 at 10:12:58AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Tue Apr 13 10:12:58 2010 > New Revision: 206553 > URL: http://svn.freebsd.org/changeset/base/206553 >=20 > Log: > Change printf() calls to uprintf() for sigreturn() and trap() complaints > about inacessible or wrong mcontext, and for dreaded "kernel trap with > interrupts disabled" situation. The later is changed when trap is > generated from user mode (shall never be ?). > =20 > Normalize the messages to include both pid and thread name. > =20 > MFC after: 1 week I think that printfs from sigreturn should be changed to signal delivery or even a call to trap_fatal(), but this is for other commit. Anyway, the current situation where messages could be found in daily periodic run (sigreturn pid 23334: cs=3D0xffff, so what ? pid is long time gone) is not very useful for noting the issue. --1uCEzVPnDDIqSP+G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvERXsACgkQC3+MBN1Mb4jjvgCeKgN7fJ5msD1niDo7W/mw+Z5a 1v8AoIEODNBD2WRAzjg50U4JWAUSFx1A =jfmE -----END PGP SIGNATURE----- --1uCEzVPnDDIqSP+G-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 10:23:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82AEF1065672; Tue, 13 Apr 2010 10:23:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70A2E8FC1B; Tue, 13 Apr 2010 10:23: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 o3DAN3Fj019382; Tue, 13 Apr 2010 10:23:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DAN3Nv019378; Tue, 13 Apr 2010 10:23:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004131023.o3DAN3Nv019378@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 13 Apr 2010 10:23:03 +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: r206554 - in stable/8/sys/amd64: amd64 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: Tue, 13 Apr 2010 10:23:03 -0000 Author: kib Date: Tue Apr 13 10:23:03 2010 New Revision: 206554 URL: http://svn.freebsd.org/changeset/base/206554 Log: MFC r206459: Handle a case when non-canonical address is loaded into the fsbase or gsbase MSR. Modified: stable/8/sys/amd64/amd64/exception.S stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/include/md_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Tue Apr 13 10:12:58 2010 (r206553) +++ stable/8/sys/amd64/amd64/exception.S Tue Apr 13 10:23:03 2010 (r206554) @@ -668,7 +668,8 @@ ld_fs: movw %ax,%fs movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx - wrmsr + .globl ld_fsbase +ld_fsbase: wrmsr 1: /* Restore %gs and gsbase */ movw TF_GS(%rsp),%si @@ -685,7 +686,8 @@ ld_gs: movw %si,%gs movl $MSR_KGSBASE,%ecx movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx - wrmsr + .globl ld_gsbase +ld_gsbase: wrmsr 1: .globl ld_es ld_es: movw TF_ES(%rsp),%es .globl ld_ds @@ -798,6 +800,30 @@ gs_load_fault: call trap movw $KUG32SEL,TF_GS(%rsp) jmp doreti + + ALIGN_TEXT + .globl fsbase_load_fault +fsbase_load_fault: + movl $T_PROTFLT,TF_TRAPNO(%rsp) + movq %rsp, %rdi + call trap + movq PCPU(CURTHREAD),%r8 + movq TD_PCB(%r8),%r8 + movq $0,PCB_FSBASE(%r8) + jmp doreti + + ALIGN_TEXT + .globl gsbase_load_fault +gsbase_load_fault: + popfq + movl $T_PROTFLT,TF_TRAPNO(%rsp) + movq %rsp, %rdi + call trap + movq PCPU(CURTHREAD),%r8 + movq TD_PCB(%r8),%r8 + movq $0,PCB_GSBASE(%r8) + jmp doreti + #ifdef HWPMC_HOOKS ENTRY(end_exceptions) #endif Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Tue Apr 13 10:12:58 2010 (r206553) +++ stable/8/sys/amd64/amd64/trap.c Tue Apr 13 10:23:03 2010 (r206554) @@ -563,6 +563,14 @@ trap(struct trapframe *frame) frame->tf_gs = _ugssel; goto out; } + if (frame->tf_rip == (long)ld_gsbase) { + frame->tf_rip = (long)gsbase_load_fault; + goto out; + } + if (frame->tf_rip == (long)ld_fsbase) { + frame->tf_rip = (long)fsbase_load_fault; + goto out; + } if (PCPU_GET(curpcb)->pcb_onfault != NULL) { frame->tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; Modified: stable/8/sys/amd64/include/md_var.h ============================================================================== --- stable/8/sys/amd64/include/md_var.h Tue Apr 13 10:12:58 2010 (r206553) +++ stable/8/sys/amd64/include/md_var.h Tue Apr 13 10:23:03 2010 (r206554) @@ -83,10 +83,14 @@ void ld_ds(void) __asm(__STRING(ld_ds)); void ld_es(void) __asm(__STRING(ld_es)); void ld_fs(void) __asm(__STRING(ld_fs)); void ld_gs(void) __asm(__STRING(ld_gs)); +void ld_fsbase(void) __asm(__STRING(ld_fsbase)); +void ld_gsbase(void) __asm(__STRING(ld_gsbase)); void ds_load_fault(void) __asm(__STRING(ds_load_fault)); void es_load_fault(void) __asm(__STRING(es_load_fault)); void fs_load_fault(void) __asm(__STRING(fs_load_fault)); void gs_load_fault(void) __asm(__STRING(gs_load_fault)); +void fsbase_load_fault(void) __asm(__STRING(fsbase_load_fault)); +void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void initializecpu(void); From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 12:10:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F39EA1065670; Tue, 13 Apr 2010 12:10:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D95518FC0C; Tue, 13 Apr 2010 12: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 o3DCAtE9044794; Tue, 13 Apr 2010 12:10:55 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DCAtFF044792; Tue, 13 Apr 2010 12:10:55 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004131210.o3DCAtFF044792@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 12:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206555 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 12:10:56 -0000 Author: emaste Date: Tue Apr 13 12:10:55 2010 New Revision: 206555 URL: http://svn.freebsd.org/changeset/base/206555 Log: Use enums in the aac_command_status_table rather than duplicating the same values in two places. Suggested by: Garrett Cooper Modified: head/sys/dev/aac/aac_tables.h Modified: head/sys/dev/aac/aac_tables.h ============================================================================== --- head/sys/dev/aac/aac_tables.h Tue Apr 13 10:23:03 2010 (r206554) +++ head/sys/dev/aac/aac_tables.h Tue Apr 13 12:10:55 2010 (r206555) @@ -34,42 +34,42 @@ * relevant only to FSA operations. */ static struct aac_code_lookup aac_command_status_table[] = { - {"OK", 0}, - {"operation not permitted", 1}, - {"not found", 2}, - {"I/O error", 5}, - {"device not configured", 6}, - {"too big", 7}, - {"permission denied", 13}, - {"file exists", 17}, - {"cross-device link", 18}, - {"operation not supported by device", 19}, - {"not a directory", 20}, - {"is a directory", 21}, - {"invalid argument", 22}, - {"file too large", 27}, - {"no space on device", 28}, - {"readonly filesystem", 30}, - {"too many links", 31}, - {"operation would block", 35}, - {"file name too long", 63}, - {"directory not empty", 66}, - {"quota exceeded", 69}, - {"stale file handle", 70}, - {"too many levels of remote in path", 71}, - {"device busy (spinning up)", 72}, - {"bad file handle", 10001}, - {"not sync", 10002}, - {"bad cookie", 10003}, - {"operation not supported", 10004}, - {"too small", 10005}, - {"server fault", 10006}, - {"bad type", 10007}, - {"jukebox", 10008}, - {"not mounted", 10009}, - {"in maintenance mode", 10010}, - {"stale ACL", 10011}, - {"bus reset - command aborted", 20001}, + {"OK", ST_OK}, + {"operation not permitted", ST_PERM}, + {"not found", ST_NOENT}, + {"I/O error", ST_IO}, + {"device not configured", ST_NXIO}, + {"too big", ST_E2BIG}, + {"permission denied", ST_ACCES}, + {"file exists", ST_EXIST}, + {"cross-device link", ST_XDEV}, + {"operation not supported by device", ST_NODEV}, + {"not a directory", ST_NOTDIR}, + {"is a directory", ST_ISDIR}, + {"invalid argument", ST_INVAL}, + {"file too large", ST_FBIG}, + {"no space on device", ST_NOSPC}, + {"readonly filesystem", ST_ROFS}, + {"too many links", ST_MLINK}, + {"operation would block", ST_WOULDBLOCK}, + {"file name too long", ST_NAMETOOLONG}, + {"directory not empty", ST_NOTEMPTY}, + {"quota exceeded", ST_DQUOT}, + {"stale file handle", ST_STALE}, + {"too many levels of remote in path", ST_REMOTE}, + {"device busy (spinning up)", ST_NOT_READY}, + {"bad file handle", ST_BADHANDLE}, + {"not sync", ST_NOT_SYNC}, + {"bad cookie", ST_BAD_COOKIE}, + {"operation not supported", ST_NOTSUPP}, + {"too small", ST_TOOSMALL}, + {"server fault", ST_SERVERFAULT}, + {"bad type", ST_BADTYPE}, + {"jukebox", ST_JUKEBOX}, + {"not mounted", ST_NOTMOUNTED}, + {"in maintenance mode", ST_MAINTMODE}, + {"stale ACL", ST_STALEACL}, + {"bus reset - command aborted", ST_BUS_RESET}, {NULL, 0}, {"unknown command status", 0} }; From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 15:51:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AA871065672; Tue, 13 Apr 2010 15:51:26 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8038FC0A; Tue, 13 Apr 2010 15:51: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 o3DFpQpb094517; Tue, 13 Apr 2010 15:51:26 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DFpQGP094501; Tue, 13 Apr 2010 15:51:26 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004131551.o3DFpQGP094501@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 13 Apr 2010 15:51: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: r206556 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 15:51:26 -0000 Author: marcel Date: Tue Apr 13 15:51:25 2010 New Revision: 206556 URL: http://svn.freebsd.org/changeset/base/206556 Log: o s/u_int64_t/uint64_t/g o style(9) fixes. Modified: head/sys/ia64/include/pal.h Modified: head/sys/ia64/include/pal.h ============================================================================== --- head/sys/ia64/include/pal.h Tue Apr 13 12:10:55 2010 (r206555) +++ head/sys/ia64/include/pal.h Tue Apr 13 15:51:25 2010 (r206556) @@ -108,20 +108,19 @@ struct ia64_pal_result { int64_t pal_status; - u_int64_t pal_result[3]; + uint64_t pal_result[3]; }; -extern struct ia64_pal_result - ia64_call_pal_static(u_int64_t proc, u_int64_t arg1, - u_int64_t arg2, u_int64_t arg3); -extern struct ia64_pal_result - ia64_call_pal_static_physical(u_int64_t proc, u_int64_t arg1, - u_int64_t arg2, u_int64_t arg3); -extern struct ia64_pal_result - ia64_call_pal_stacked(u_int64_t proc, u_int64_t arg1, - u_int64_t arg2, u_int64_t arg3); -extern struct ia64_pal_result - ia64_call_pal_stacked_physical(u_int64_t proc, u_int64_t arg1, - u_int64_t arg2, u_int64_t arg3); +struct ia64_pal_result ia64_call_pal_static(uint64_t proc, uint64_t arg1, + uint64_t arg2, uint64_t arg3); + +struct ia64_pal_result ia64_call_pal_static_physical(uint64_t proc, + uint64_t arg1, uint64_t arg2, uint64_t arg3); + +struct ia64_pal_result ia64_call_pal_stacked(uint64_t proc, uint64_t arg1, + uint64_t arg2, uint64_t arg3); + +struct ia64_pal_result ia64_call_pal_stacked_physical(uint64_t proc, + uint64_t arg1, uint64_t arg2, uint64_t arg3); #endif /* _MACHINE_PAL_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 15:53:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA98B1065670; Tue, 13 Apr 2010 15:53:04 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 912F48FC18; Tue, 13 Apr 2010 15: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 o3DFr4Tu094904; Tue, 13 Apr 2010 15:53:04 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DFr429094902; Tue, 13 Apr 2010 15:53:04 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004131553.o3DFr429094902@svn.freebsd.org> From: Hajimu UMEMOTO Date: Tue, 13 Apr 2010 15: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: r206557 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 15:53:04 -0000 Author: ume Date: Tue Apr 13 15:53:04 2010 New Revision: 206557 URL: http://svn.freebsd.org/changeset/base/206557 Log: Nuke the descriptions about ipv6_firewall_* as they were unified into firewall_*. MFC after: 3 days Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Apr 13 15:51:25 2010 (r206556) +++ head/share/man/man5/rc.conf.5 Tue Apr 13 15:53:04 2010 (r206557) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 09, 2010 +.Dd April 14, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -427,27 +427,11 @@ the kernel module will be loaded. See also .Va ipfilter_enable . -.It Va ipv6_firewall_enable -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_enable . -Set to -.Dq Li YES -to load IPv6 firewall rules at startup. -If the kernel was not built with -.Cd "options IPV6FIREWALL" , -the -.Pa ipfw.ko -kernel module will be loaded. .It Va firewall_script .Pq Vt str This variable specifies the full path to the firewall script to run. The default is .Pa /etc/rc.firewall . -.It Va ipv6_firewall_script -.Pq Vt str -The IPv6 equivalent of -.Va firewall_script . .It Va firewall_type .Pq Vt str Names the firewall type from the selection in @@ -471,19 +455,11 @@ basic protection for a LAN. .Pp If a filename is specified, the full path must be given. -.It Va ipv6_firewall_type -.Pq Vt str -The IPv6 equivalent of -.Va firewall_type . .It Va firewall_quiet .Pq Vt bool Set to .Dq Li YES to disable the display of firewall rules on the console during boot. -.It Va ipv6_firewall_quiet -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_quiet . .It Va firewall_logging .Pq Vt bool Set to @@ -492,10 +468,6 @@ to enable firewall event logging. This is equivalent to the .Dv IPFIREWALL_VERBOSE kernel option. -.It Va ipv6_firewall_logging -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_logging . .It Va firewall_flags .Pq Vt str Flags passed to @@ -503,10 +475,6 @@ Flags passed to if .Va firewall_type specifies a filename. -.It Va ipv6_firewall_flags -.Pq Vt str -The IPv6 equivalent of -.Va firewall_flags . .It Va firewall_coscripts .Pq Vt str List of executables and/or rc scripts to run after firewall starts/stops. From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 15:55:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F74710656A5; Tue, 13 Apr 2010 15:55:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F7C58FC24; Tue, 13 Apr 2010 15: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 o3DFtIbl095493; Tue, 13 Apr 2010 15:55:18 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DFtIwF095491; Tue, 13 Apr 2010 15:55:18 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004131555.o3DFtIwF095491@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 13 Apr 2010 15:55: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: r206558 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 15:55:19 -0000 Author: marcel Date: Tue Apr 13 15:55:18 2010 New Revision: 206558 URL: http://svn.freebsd.org/changeset/base/206558 Log: Change the (generic) argument to ia64_store_mca_state() from the cpuid to the struct pcpu of the CPU. We casting between pointer types only then. Modified: head/sys/ia64/ia64/mp_machdep.c Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Tue Apr 13 15:53:04 2010 (r206557) +++ head/sys/ia64/ia64/mp_machdep.c Tue Apr 13 15:55:18 2010 (r206558) @@ -152,13 +152,15 @@ cpu_topo(void) static void ia64_store_mca_state(void* arg) { - unsigned int ncpu = (unsigned int)(uintptr_t)arg; - struct thread* td; + struct pcpu *pc = arg; + struct thread *td = curthread; - /* ia64_mca_save_state() is CPU-sensitive, so bind ourself to our target CPU */ - td = curthread; + /* + * ia64_mca_save_state() is CPU-sensitive, so bind ourself to our + * target CPU. + */ thread_lock(td); - sched_bind(td, ncpu); + sched_bind(td, pc->pc_cpuid); thread_unlock(td); /* @@ -362,8 +364,7 @@ cpu_mp_unleash(void *dummy) SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { cpus++; if (pc->pc_md.awake) { - kproc_create(ia64_store_mca_state, - (void*)((uintptr_t)pc->pc_cpuid), NULL, 0, 0, + kproc_create(ia64_store_mca_state, pc, NULL, 0, 0, "mca %u", pc->pc_cpuid); smp_cpus++; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 18:46:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5719106566B; Tue, 13 Apr 2010 18:46:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C30878FC08; Tue, 13 Apr 2010 18:46: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 o3DIkIxq033434; Tue, 13 Apr 2010 18:46:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DIkIT1033428; Tue, 13 Apr 2010 18:46:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004131846.o3DIkIT1033428@svn.freebsd.org> From: Ed Maste Date: Tue, 13 Apr 2010 18:46: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: r206559 - 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, 13 Apr 2010 18:46:19 -0000 Author: emaste Date: Tue Apr 13 18:46:18 2010 New Revision: 206559 URL: http://svn.freebsd.org/changeset/base/206559 Log: MFC r205880 by ru: - Handle calloc() allocation failures. - Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper Also fix endinclude() prototype to avoid compiler warning. Modified: stable/8/usr.sbin/config/config.y stable/8/usr.sbin/config/lang.l stable/8/usr.sbin/config/main.c stable/8/usr.sbin/config/mkmakefile.c stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/config.y ============================================================================== --- stable/8/usr.sbin/config/config.y Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/config.y Tue Apr 13 18:46:18 2010 (r206559) @@ -166,6 +166,8 @@ Config_spec: CPU Save_id { struct cputype *cp = (struct cputype *)calloc(1, sizeof (struct cputype)); + if (cp == NULL) + err(EXIT_FAILURE, "calloc"); cp->cpu_name = $2; SLIST_INSERT_HEAD(&cputype, cp, cpu_next); } | @@ -197,6 +199,8 @@ Config_spec: struct hint *hint; hint = (struct hint *)calloc(1, sizeof (struct hint)); + if (hint == NULL) + err(EXIT_FAILURE, "calloc"); hint->hint_name = $2; STAILQ_INSERT_TAIL(&hints, hint, hint_next); hintmode = 1; @@ -331,6 +335,8 @@ newfile(char *name) struct files_name *nl; nl = (struct files_name *) calloc(1, sizeof *nl); + if (nl == NULL) + err(EXIT_FAILURE, "calloc"); nl->f_name = name; STAILQ_INSERT_TAIL(&fntab, nl, f_next); } @@ -364,6 +370,8 @@ newdev(char *name) } np = (struct device *) calloc(1, sizeof *np); + if (np == NULL) + err(EXIT_FAILURE, "calloc"); np->d_name = name; STAILQ_INSERT_TAIL(&dtab, np, d_next); } @@ -422,6 +430,8 @@ newopt(struct opt_head *list, char *name } op = (struct opt *)calloc(1, sizeof (struct opt)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = name; op->op_ownfile = 0; op->op_value = value; Modified: stable/8/usr.sbin/config/lang.l ============================================================================== --- stable/8/usr.sbin/config/lang.l Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/lang.l Tue Apr 13 18:46:18 2010 (r206559) @@ -33,6 +33,7 @@ #include #include +#include #include #include "y.tab.h" #include "config.h" @@ -220,6 +221,8 @@ cfgfile_add(const char *fname) struct cfgfile *cf; cf = calloc(1, sizeof(*cf)); + if (cf == NULL) + err(EXIT_FAILURE, "calloc"); assert(cf != NULL); asprintf(&cf->cfg_path, "%s", fname); STAILQ_INSERT_TAIL(&cfgfiles, cf, cfg_next); @@ -285,7 +288,7 @@ include(const char *fname, int ateof) * Terminate the most recent inclusion. */ static int -endinclude() +endinclude(void) { struct incl *in; int ateof; Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/main.c Tue Apr 13 18:46:18 2010 (r206559) @@ -120,7 +120,7 @@ main(int argc, char **argv) if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); else - errx(2, "directory already set"); + errx(EXIT_FAILURE, "directory already set"); break; case 'g': debugging++; @@ -175,7 +175,7 @@ main(int argc, char **argv) if (mkdir(p, 0777)) err(2, "%s", p); } else if (!S_ISDIR(buf.st_mode)) - errx(2, "%s isn't a directory", p); + errx(EXIT_FAILURE, "%s isn't a directory", p); SLIST_INIT(&cputype); SLIST_INIT(&mkopt); @@ -256,7 +256,7 @@ get_srcdir(void) int i; if (realpath("../..", srcdir) == NULL) - errx(2, "Unable to find root of source tree"); + err(EXIT_FAILURE, "Unable to find root of source tree"); if ((pwd = getenv("PWD")) != NULL && *pwd == '/' && (pwd = strdup(pwd)) != NULL) { /* Remove the last two path components. */ @@ -513,7 +513,7 @@ configfile(void) } sbuf_finish(sb); /* - * We print first part of the tamplate, replace our tag with + * We print first part of the template, replace our tag with * configuration files content and later continue writing our * template. */ @@ -650,6 +650,8 @@ remember(const char *file) } } hl = calloc(1, sizeof(*hl)); + if (hl == NULL) + err(EXIT_FAILURE, "calloc"); hl->h_name = s; hl->h_next = htab; htab = hl; @@ -671,19 +673,19 @@ kernconfdump(const char *file) r = open(file, O_RDONLY); if (r == -1) - errx(EXIT_FAILURE, "Couldn't open file '%s'", file); + err(EXIT_FAILURE, "Couldn't open file '%s'", file); error = fstat(r, &st); if (error == -1) - errx(EXIT_FAILURE, "fstat() failed"); + err(EXIT_FAILURE, "fstat() failed"); if (S_ISDIR(st.st_mode)) errx(EXIT_FAILURE, "'%s' is a directory", file); fp = fdopen(r, "r"); if (fp == NULL) - errx(EXIT_FAILURE, "fdopen() failed"); + err(EXIT_FAILURE, "fdopen() failed"); osz = 1024; o = calloc(1, osz); if (o == NULL) - errx(EXIT_FAILURE, "Couldn't allocate memory"); + 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); @@ -703,7 +705,7 @@ kernconfdump(const char *file) "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) - errx(EXIT_FAILURE, "fseek() failed"); + err(EXIT_FAILURE, "fseek() failed"); for (i = 0; i < size - 1; i++) { r = fgetc(fp); if (r == EOF) Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/mkmakefile.c Tue Apr 13 18:46:18 2010 (r206559) @@ -98,6 +98,8 @@ new_fent(void) struct file_list *fp; fp = (struct file_list *) calloc(1, sizeof *fp); + if (fp == NULL) + err(EXIT_FAILURE, "calloc"); STAILQ_INSERT_TAIL(&ftab, fp, f_next); return (fp); } Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Tue Apr 13 15:55:18 2010 (r206558) +++ stable/8/usr.sbin/config/mkoptions.c Tue Apr 13 18:46:18 2010 (r206559) @@ -70,6 +70,8 @@ options(void) /* Fake the cpu types as options. */ SLIST_FOREACH(cp, &cputype, cpu_next) { op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(cp->cpu_name); SLIST_INSERT_HEAD(&opt, op, op_next); } @@ -84,6 +86,8 @@ options(void) /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns("MAXUSERS"); snprintf(buf, sizeof(buf), "%d", maxusers); op->op_value = ns(buf); @@ -199,6 +203,8 @@ do_option(char *name) tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = inw; op->op_value = invalue; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -225,6 +231,8 @@ do_option(char *name) if (value && !seen) { /* New option appears */ op = (struct opt *) calloc(1, sizeof *op); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); op->op_name = ns(name); op->op_value = value ? ns(value) : NULL; SLIST_INSERT_HEAD(&op_head, op, op_next); @@ -336,6 +344,8 @@ next: } po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; SLIST_INSERT_HEAD(&otab, po, o_next); From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 18:53:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D363C1065672; Tue, 13 Apr 2010 18:53:39 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A97088FC15; Tue, 13 Apr 2010 18:53: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 o3DIrdbx035081; Tue, 13 Apr 2010 18:53:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DIrdOT035078; Tue, 13 Apr 2010 18:53:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201004131853.o3DIrdOT035078@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 13 Apr 2010 18:53: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: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 18:53:39 -0000 Author: jh Date: Tue Apr 13 18:53:39 2010 New Revision: 206560 URL: http://svn.freebsd.org/changeset/base/206560 Log: - Ignore and report duplicate and empty device names in devfs_populate_loop() instead of causing erratic behavior. Currently make_dev(9) can't fail, so there is no way to report an error to make_dev(9) callers. - Disallow using "." and ".." in device path names. It didn't work previously but now it is reported rather than panicing. - Treat multiple sequential slashes as single in device path names. Discussed with: pjd Modified: head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_int.h Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Tue Apr 13 18:46:18 2010 (r206559) +++ head/sys/fs/devfs/devfs_devs.c Tue Apr 13 18:53:39 2010 (r206560) @@ -408,6 +408,9 @@ devfs_populate_loop(struct devfs_mount * continue; KASSERT((cdp->cdp_flags & CDP_ACTIVE), ("Bogons, I tell ya'!")); + if (cdp->cdp_flags & CDP_INVALID) + continue; + if (dm->dm_idx <= cdp->cdp_maxdirent && cdp->cdp_dirents[dm->dm_idx] != NULL) { de = cdp->cdp_dirents[dm->dm_idx]; @@ -425,6 +428,8 @@ devfs_populate_loop(struct devfs_mount * dd = dm->dm_rootdir; s = cdp->cdp_c.si_name; for (;;) { + while (*s == '/') + s++; for (q = s; *q != '/' && *q != '\0'; q++) continue; if (*q != '/') @@ -434,6 +439,24 @@ devfs_populate_loop(struct devfs_mount * de = devfs_vmkdir(dm, s, q - s, dd, 0); s = q + 1; dd = de; + if (dd->de_flags & (DE_DOT | DE_DOTDOT)) + break; + } + + /* + * XXX: Ignore duplicate and empty device names. + * XXX: Currently there is no way to report the error to + * XXX: the make_dev(9) caller. + */ + if (dd->de_dirent->d_type != DT_DIR || + dd->de_flags & (DE_DOT | DE_DOTDOT) || q - s < 1 || + devfs_find(dd, s, q - s) != NULL) { + dev_lock(); + cdp->cdp_flags |= CDP_INVALID; + dev_unlock(); + printf("%s: %s: invalid or duplicate device name\n", + __func__, cdp->cdp_c.si_name); + return (1); } de = devfs_newdirent(s, q - s); Modified: head/sys/fs/devfs/devfs_int.h ============================================================================== --- head/sys/fs/devfs/devfs_int.h Tue Apr 13 18:46:18 2010 (r206559) +++ head/sys/fs/devfs/devfs_int.h Tue Apr 13 18:53:39 2010 (r206560) @@ -55,6 +55,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_INVALID (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 19:37:18 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F9EC106566C; Tue, 13 Apr 2010 19:37:18 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 880758FC1A; Tue, 13 Apr 2010 19:37:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 67F479CB0E4; Tue, 13 Apr 2010 21:35:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x5lKU-zrBDGu; Tue, 13 Apr 2010 21:35:00 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4CFEC9CB25F; Tue, 13 Apr 2010 21:35:00 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o3DJZ0Vg046947; Tue, 13 Apr 2010 21:35:00 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 13 Apr 2010 21:35:00 +0200 From: Roman Divacky To: Luigi Rizzo Message-ID: <20100413193500.GA46839@freebsd.org> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201004121637.o3CGbjSK080066@svn.freebsd.org> 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: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 19:37:18 -0000 you dont seem to have commited the anticipatory scheduler gsched_as. why? On Mon, Apr 12, 2010 at 04:37:45PM +0000, Luigi Rizzo wrote: > Author: luigi > Date: Mon Apr 12 16:37:45 2010 > New Revision: 206497 > URL: http://svn.freebsd.org/changeset/base/206497 > > Log: > Bring in geom_sched, support for scheduling disk I/O requests > in a device independent manner. Also include an example anticipatory > scheduler, gsched_rr, which gives very nice performance improvements > in presence of competing random access patterns. > > This is joint work with Fabio Checconi, developed last year > and presented at BSDCan 2009. You can find details in the > README file or at > > http://info.iet.unipi.it/~luigi/geom_sched/ > > Added: > head/sbin/geom/class/sched/ > head/sbin/geom/class/sched/Makefile (contents, props changed) > head/sbin/geom/class/sched/geom_sched.c (contents, props changed) > head/sbin/geom/class/sched/gsched.8 (contents, props changed) > head/sys/geom/sched/ > head/sys/geom/sched/README (contents, props changed) > head/sys/geom/sched/g_sched.c (contents, props changed) > head/sys/geom/sched/g_sched.h (contents, props changed) > head/sys/geom/sched/gs_rr.c (contents, props changed) > head/sys/geom/sched/gs_scheduler.h (contents, props changed) > head/sys/geom/sched/subr_disk.c (contents, props changed) > head/sys/modules/geom/geom_sched/ > head/sys/modules/geom/geom_sched/Makefile (contents, props changed) > head/sys/modules/geom/geom_sched/Makefile.inc (contents, props changed) > head/sys/modules/geom/geom_sched/gs_sched/ > head/sys/modules/geom/geom_sched/gs_sched/Makefile (contents, props changed) > head/sys/modules/geom/geom_sched/gsched_rr/ > head/sys/modules/geom/geom_sched/gsched_rr/Makefile (contents, props changed) > Modified: > head/sbin/geom/class/Makefile > head/sys/modules/geom/Makefile > > Modified: head/sbin/geom/class/Makefile > ============================================================================== > --- head/sbin/geom/class/Makefile Mon Apr 12 13:46:20 2010 (r206496) > +++ head/sbin/geom/class/Makefile Mon Apr 12 16:37:45 2010 (r206497) > @@ -15,6 +15,7 @@ SUBDIR+=multipath > SUBDIR+=nop > SUBDIR+=part > SUBDIR+=raid3 > +SUBDIR+=sched > SUBDIR+=shsec > SUBDIR+=stripe > SUBDIR+=virstor > > Added: head/sbin/geom/class/sched/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/geom/class/sched/Makefile Mon Apr 12 16:37:45 2010 (r206497) > @@ -0,0 +1,19 @@ > +# GEOM_LIBRARY_PATH > +# $FreeBSD$ > + > +.PATH: /usr/src/sbin/geom/misc > + > +CFLAGS += -I/usr/src/sbin/geom > + > +CLASS=sched > + > +WARNS?= 6 > +CLASS_DIR?=/lib/geom > + > +SHLIBDIR?=${CLASS_DIR} > +SHLIB_NAME?=geom_${CLASS}.so > +LINKS= ${BINDIR}/geom ${BINDIR}/g${CLASS} > +MAN= g${CLASS}.8 > +SRCS+= geom_${CLASS}.c subr.c > + > +.include > > Added: head/sbin/geom/class/sched/geom_sched.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/geom/class/sched/geom_sched.c Mon Apr 12 16:37:45 2010 (r206497) > @@ -0,0 +1,123 @@ > +/*- > + * Copyright (c) 2009 Fabio Checconi, Luigi Rizzo > + * 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 AUTHORS 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 AUTHORS 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. > + */ > + > +/* > + * $Id$ > + * $FreeBSD$ > + * > + * This file implements the userspace library used by the 'geom' > + * command to load and manipulate disk schedulers. > + */ > + > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include "core/geom.h" > +#include "misc/subr.h" > + > +#define G_SCHED_VERSION 0 > + > +uint32_t lib_version = G_LIB_VERSION; > +uint32_t version = G_SCHED_VERSION; > + > +/* > + * storage for parameters used by this geom class. > + * Right now only the scheduler name is used. > + */ > +static char algo[] = "rr"; /* default scheduler */ > + > +/* > + * Adapt to differences in geom library. > + * in V1 struct g_command misses gc_argname, eld, and G_BOOL is undefined > + */ > +#if G_LIB_VERSION == 1 > +#define G_ARGNAME > +#define G_TYPE_BOOL G_TYPE_NUMBER > +#else > +#define G_ARGNAME NULL, > +#endif > + > +static void > +gcmd_createinsert(struct gctl_req *req, unsigned flags __unused) > +{ > + const char *reqalgo; > + char name[64]; > + > + if (gctl_has_param(req, "algo")) > + reqalgo = gctl_get_ascii(req, "algo"); > + else > + reqalgo = algo; > + > + snprintf(name, sizeof(name), "gsched_%s", reqalgo); > + /* > + * Do not complain about errors here, gctl_issue() > + * will fail anyway. > + */ > + if (modfind(name) < 0) > + kldload(name); > + gctl_issue(req); > +} > + > +struct g_command class_commands[] = { > + { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, gcmd_createinsert, > + { > + { 'a', "algo", algo, G_TYPE_STRING }, > + G_OPT_SENTINEL > + }, > + G_ARGNAME "[-v] [-a algorithm_name] dev ..." > + }, > + { "insert", G_FLAG_VERBOSE | G_FLAG_LOADKLD, gcmd_createinsert, > + { > + { 'a', "algo", algo, G_TYPE_STRING }, > + G_OPT_SENTINEL > + }, > + G_ARGNAME "[-v] [-a algorithm_name] dev ..." > + }, > + { "configure", G_FLAG_VERBOSE, NULL, > + { > + { 'a', "algo", algo, G_TYPE_STRING }, > + G_OPT_SENTINEL > + }, > + G_ARGNAME "[-v] [-a algorithm_name] prov ..." > + }, > + { "destroy", G_FLAG_VERBOSE, NULL, > + { > + { 'f', "force", NULL, G_TYPE_BOOL }, > + G_OPT_SENTINEL > + }, > + G_ARGNAME "[-fv] prov ..." > + }, > + { "reset", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, > + G_ARGNAME "[-v] prov ..." > + }, > + G_CMD_SENTINEL > +}; > > Added: head/sbin/geom/class/sched/gsched.8 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/geom/class/sched/gsched.8 Mon Apr 12 16:37:45 2010 (r206497) > @@ -0,0 +1,161 @@ > +.\" Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo > +.\" All rights reserved. > +.\" $FreeBSD$ > +.\" > +.\" 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 AUTHORS 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 AUTHORS 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. > +.\" > +.Dd April 12, 2010 > +.Dt GSCHED 8 > +.Os > +.Sh NAME > +.Nm gsched > +.Nd "control utility for disk scheduler GEOM class" > +.Sh SYNOPSIS > +.Nm > +.Cm create > +.Op Fl v > +.Op Fl a Ar algorithm > +.Ar provider ... > +.Nm > +.Cm insert > +.Op Fl v > +.Op Fl a Ar algorithm > +.Ar provider ... > +.Nm > +.Cm configure > +.Op Fl v > +.Op Fl a Ar algorithm > +.Ar node ... > +.Nm > +.Cm destroy > +.Op Fl fv > +.Ar node ... > +.Nm > +.Cm reset > +.Op Fl v > +.Ar node ... > +.Nm > +.Cm { list | status | load | unload } > +.Sh DESCRIPTION > +The > +.Nm > +utility (also callable as > +.Nm geom sched ... ) > +changes the scheduling policy of the requests going to a provider. > +.Pp > +The first argument to > +.Nm > +indicates an action to be performed: > +.Bl -tag -width ".Cm configure" > +.It Cm create > +Create a new provider and geom node using the specified scheduling algorithm. > +.Ar algorithm > +is the name of the scheduling algorithm used for the provider. > +Available algorithms include: > +.Ar rr , > +which implements anticipatory scheduling with round robin service > +among clients; > +.Ar as , > +which implements a simple form of anticipatory scheduling with > +no per-client queue. > +.Pp > +If the operation succeeds, the new provider should appear with name > +.Pa /dev/ Ns Ao Ar dev Ac Ns Pa .sched. . > +The kernel module > +.Pa geom_sched.ko > +will be loaded if it is not loaded already. > +.It Cm insert > +Operates as "create", but the insertion is "transparent", > +i.e. the existing provider is rerouted to the newly created geom, > +which in turn forwards requests to the existing geom. > +This operation allows one to start/stop a scheduling service > +on an already existing provider. > +.Pp > +A subsequent 'destroy' will remove the newly created geom and > +hook the provider back to the original geom. > +.Ar algorithm > +.It Cm configure > +Configure existing scheduling provider. It supports the same options > +as the > +.Nm create > +command. > +.It Cm destroy > +Destroy the geom specified in the parameter. > +.It Cm reset > +Do nothing. > +.It Cm list | status | load | unload > +See > +.Xr geom 8 . > +.El > +.Pp > +Additional options: > +.Bl -tag -width ".Fl f" > +.It Fl f > +Force the removal of the specified provider. > +.It Fl v > +Be more verbose. > +.El > +.Sh SYSCTL VARIABLES > +The following > +.Xr sysctl 8 > +variables can be used to control the behavior of the > +.Nm SCHED > +GEOM class. > +The default value is shown next to each variable. > +.Bl -tag -width indent > +.It Va kern.geom.sched.debug : No 0 > +Debug level of the > +.Nm SCHED > +GEOM class. > +This can be set to a number between 0 and 2 inclusive. > +If set to 0 minimal debug information is printed, and if set to 2 the > +maximum amount of debug information is printed. > +.El > +.Sh EXIT STATUS > +Exit status is 0 on success, and 1 if the command fails. > +.Sh EXAMPLES > +The following example shows how to create a scheduling provider for disk > +.Pa /dev/da0 > +, and how to destroy it. > +.Bd -literal -offset indent > +# Load the geom_sched module: > +kldload geom_sched > +# Load some scheduler classes used by geom_sched: > +kldload gsched_rr gsched_as > +# Configure device ad0 to use scheduler 'rr': > +geom sched insert -s rr ad0 > +# Now provider ad0 uses the 'rr' algorithm; > +# the new geom is ad0.sched. > +# Remove the scheduler on the device: > +geom sched destroy -v ad0.sched. > +.Ed > +.Pp > +.Sh SEE ALSO > +.Xr geom 4 , > +.Xr geom 8 > +.Sh HISTORY > +The > +.Nm > +utility appeared in April 2010. > +.Sh AUTHORS > +.An Fabio Checconi Aq fabio@FreeBSD.org > +.An Luigi Rizzo Aq luigi@FreeBSD.org > > Added: head/sys/geom/sched/README > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/geom/sched/README Mon Apr 12 16:37:45 2010 (r206497) > @@ -0,0 +1,162 @@ > + > + --- GEOM BASED DISK SCHEDULERS FOR FREEBSD --- > + > +This code contains a framework for GEOM-based disk schedulers and a > +couple of sample scheduling algorithms that use the framework and > +implement two forms of "anticipatory scheduling" (see below for more > +details). > + > +As a quick example of what this code can give you, try to run "dd", > +"tar", or some other program with highly SEQUENTIAL access patterns, > +together with "cvs", "cvsup", "svn" or other highly RANDOM access patterns > +(this is not a made-up example: it is pretty common for developers > +to have one or more apps doing random accesses, and others that do > +sequential accesses e.g., loading large binaries from disk, checking > +the integrity of tarballs, watching media streams and so on). > + > +These are the results we get on a local machine (AMD BE2400 dual > +core CPU, SATA 250GB disk): > + > + /mnt is a partition mounted on /dev/ad0s1f > + > + cvs: cvs -d /mnt/home/ncvs-local update -Pd /mnt/ports > + dd-read: dd bs=128k of=/dev/null if=/dev/ad0 (or ad0-sched-) > + dd-writew dd bs=128k if=/dev/zero of=/mnt/largefile > + > + NO SCHEDULER RR SCHEDULER > + dd cvs dd cvs > + > + dd-read only 72 MB/s ---- 72 MB/s --- > + dd-write only 55 MB/s --- 55 MB/s --- > + dd-read+cvs 6 MB/s ok 30 MB/s ok > + dd-write+cvs 55 MB/s slooow 14 MB/s ok > + > +As you can see, when a cvs is running concurrently with dd, the > +performance drops dramatically, and depending on read or write mode, > +one of the two is severely penalized. The use of the RR scheduler > +in this example makes the dd-reader go much faster when competing > +with cvs, and lets cvs progress when competing with a writer. > + > +To try it out: > + > +1. USERS OF FREEBSD 7, PLEASE READ CAREFULLY THE FOLLOWING: > + > + On loading, this module patches one kernel function (g_io_request()) > + so that I/O requests ("bio's") carry a classification tag, useful > + for scheduling purposes. > + > + ON FREEBSD 7, the tag is stored in an existing (though rarely used) > + field of the "struct bio", a solution which makes this module > + incompatible with other modules using it, such as ZFS and gjournal. > + Additionally, g_io_request() is patched in-memory to add a call > + to the function that initializes this field (i386/amd64 only; > + for other architectures you need to manually patch sys/geom/geom_io.c). > + See details in the file g_sched.c. > + > + On FreeBSD 8.0 and above, the above trick is not necessary, > + as the struct bio contains dedicated fields for the classifier, > + and hooks for request classifiers. > + > + If you don't like the above, don't run this code. > + > +2. PLEASE MAKE SURE THAT THE DISK THAT YOU WILL BE USING FOR TESTS > + DOES NOT CONTAIN PRECIOUS DATA. > + This is experimental code, so we make no guarantees, though > + I am routinely using it on my desktop and laptop. > + > +3. EXTRACT AND BUILD THE PROGRAMS > + A 'make install' in the directory should work (with root privs), > + or you can even try the binary modules. > + If you want to build the modules yourself, look at the Makefile. > + > +4. LOAD THE MODULE, CREATE A GEOM NODE, RUN TESTS > + > + The scheduler's module must be loaded first: > + > + # kldload gsched_rr > + > + substitute with gsched_as to test AS. Then, supposing that you are > + using /dev/ad0 for testing, a scheduler can be attached to it with: > + > + # geom sched insert ad0 > + > + The scheduler is inserted transparently in the geom chain, so > + mounted partitions and filesystems will keep working, but > + now requests will go through the scheduler. > + > + To change scheduler on-the-fly, you can reconfigure the geom: > + > + # geom sched configure -a as ad0.sched. > + > + assuming that gsched_as was loaded previously. > + > +5. SCHEDULER REMOVAL > + > + In principle it is possible to remove the scheduler module > + even on an active chain by doing > + > + # geom sched destroy ad0.sched. > + > + However, there is some race in the geom subsystem which makes > + the removal unsafe if there are active requests on a chain. > + So, in order to reduce the risk of data losses, make sure > + you don't remove a scheduler from a chain with ongoing transactions. > + > +--- NOTES ON THE SCHEDULERS --- > + > +The important contribution of this code is the framework to experiment > +with different scheduling algorithms. 'Anticipatory scheduling' > +is a very powerful technique based on the following reasoning: > + > + The disk throughput is much better if it serves sequential requests. > + If we have a mix of sequential and random requests, and we see a > + non-sequential request, do not serve it immediately but instead wait > + a little bit (2..5ms) to see if there is another one coming that > + the disk can serve more efficiently. > + > +There are many details that should be added to make sure that the > +mechanism is effective with different workloads and systems, to > +gain a few extra percent in performance, to improve fairness, > +insulation among processes etc. A discussion of the vast literature > +on the subject is beyond the purpose of this short note. > + > +-------------------------------------------------------------------------- > + > +TRANSPARENT INSERT/DELETE > + > +geom_sched is an ordinary geom module, however it is convenient > +to plug it transparently into the geom graph, so that one can > +enable or disable scheduling on a mounted filesystem, and the > +names in /etc/fstab do not depend on the presence of the scheduler. > + > +To understand how this works in practice, remember that in GEOM > +we have "providers" and "geom" objects. > +Say that we want to hook a scheduler on provider "ad0", > +accessible through pointer 'pp'. Originally, pp is attached to > +geom "ad0" (same name, different object) accessible through pointer old_gp > + > + BEFORE ---> [ pp --> old_gp ...] > + > +A normal "geom sched create ad0" call would create a new geom node > +on top of provider ad0/pp, and export a newly created provider > +("ad0.sched." accessible through pointer newpp). > + > + AFTER create ---> [ newpp --> gp --> cp ] ---> [ pp --> old_gp ... ] > + > +On top of newpp, a whole tree will be created automatically, and we > +can e.g. mount partitions on /dev/ad0.sched.s1d, and those requests > +will go through the scheduler, whereas any partition mounted on > +the pre-existing device entries will not go through the scheduler. > + > +With the transparent insert mechanism, the original provider "ad0"/pp > +is hooked to the newly created geom, as follows: > + > + AFTER insert ---> [ pp --> gp --> cp ] ---> [ newpp --> old_gp ... ] > + > +so anything that was previously using provider pp will now have > +the requests routed through the scheduler node. > + > +A removal ("geom sched destroy ad0.sched.") will restore the original > +configuration. > + > +# $FreeBSD$ > > Added: head/sys/geom/sched/g_sched.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/geom/sched/g_sched.c Mon Apr 12 16:37:45 2010 (r206497) > @@ -0,0 +1,1901 @@ > +/*- > + * Copyright (c) 2009-2010 Fabio Checconi, Luigi Rizzo > + * 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 AUTHORS 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 AUTHORS 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. > + */ > + > +/* > + * $Id$ > + * $FreeBSD$ > + * > + * Main control module for geom-based disk schedulers ('sched'). > + * > + * USER VIEW > + * A 'sched' node is typically inserted transparently between > + * an existing provider pp and its original geom gp > + * > + * [pp --> gp ..] > + * > + * using the command "geom sched insert " and > + * resulting in the following topology > + * > + * [pp --> sched_gp --> cp] [new_pp --> gp ... ] > + * > + * Deletion "geom sched destroy .sched." restores the > + * original chain. The normal "geom sched create " > + * is also supported. > + * > + * INTERNALS > + * Internally, the 'sched' uses the following data structures > + * > + * geom{} g_sched_softc{} g_gsched{} > + * +----------+ +---------------+ +-------------+ > + * | softc *-|--->| sc_gsched *-|-->| gs_init | > + * | ... | | | | gs_fini | > + * | | | [ hash table] | | gs_start | > + * +----------+ | | | ... | > + * | | +-------------+ > + * | | > + * | | g_*_softc{} > + * | | +-------------+ > + * | sc_data *-|-->| | > + * +---------------+ | algorithm- | > + * | specific | > + * +-------------+ > + * > + * A g_sched_softc{} is created with a "geom sched insert" call. > + * In turn this instantiates a specific scheduling algorithm, > + * which sets sc_gsched to point to the algorithm callbacks, > + * and calls gs_init() to create the g_*_softc{} . > + * The other callbacks (gs_start, gs_next, ...) are invoked > + * as needed > + * > + * g_sched_softc{} is defined in g_sched.h and mostly used here; > + * g_gsched{}, and the gs_callbacks, are documented in gs_scheduler.h; > + * g_*_softc{} is defined/implemented by each algorithm (gs_*.c) > + * > + * DATA MOVING > + * When a bio is received on the provider, it goes to the > + * g_sched_start() which calls gs_start() to initially queue it; > + * then we call g_sched_dispatch() that loops around gs_next() > + * to select zero or more bio's to be sent downstream. > + * > + * g_sched_dispatch() can also be called as a result of a timeout, > + * e.g. when doing anticipation or pacing requests. > + * > + * When a bio comes back, it goes to g_sched_done() which in turn > + * calls gs_done(). The latter does any necessary housekeeping in > + * the scheduling algorithm, and may decide to call g_sched_dispatch() > + * to send more bio's downstream. > + * > + * If an algorithm needs per-flow queues, these are created > + * calling gs_init_class() and destroyed with gs_fini_class(), > + * and they are also inserted in the hash table implemented in > + * the g_sched_softc{} > + * > + * If an algorithm is replaced, or a transparently-inserted node is > + * removed with "geom sched destroy", we need to remove all references > + * to the g_*_softc{} and g_sched_softc from the bio's still in > + * the scheduler. g_sched_forced_dispatch() helps doing this. > + * XXX need to explain better. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include /* we access curthread */ > +#include > +#include "gs_scheduler.h" > +#include "g_sched.h" /* geom hooks */ > + > +/* > + * Size of the per-geom hash table storing traffic classes. > + * We may decide to change it at a later time, it has no ABI > + * implications as it is only used for run-time allocations. > + */ > +#define G_SCHED_HASH_SIZE 32 > + > +static int g_sched_destroy(struct g_geom *gp, boolean_t force); > +static int g_sched_destroy_geom(struct gctl_req *req, > + struct g_class *mp, struct g_geom *gp); > +static void g_sched_config(struct gctl_req *req, struct g_class *mp, > + const char *verb); > +static struct g_geom *g_sched_taste(struct g_class *mp, > + struct g_provider *pp, int flags __unused); > +static void g_sched_dumpconf(struct sbuf *sb, const char *indent, > + struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); > +static void g_sched_init(struct g_class *mp); > +static void g_sched_fini(struct g_class *mp); > + > +struct g_class g_sched_class = { > + .name = G_SCHED_CLASS_NAME, > + .version = G_VERSION, > + .ctlreq = g_sched_config, > + .taste = g_sched_taste, > + .destroy_geom = g_sched_destroy_geom, > + .init = g_sched_init, > + .fini = g_sched_fini > +}; > + > +MALLOC_DEFINE(M_GEOM_SCHED, "GEOM_SCHED", "Geom schedulers data structures"); > + > +/* > + * Global variables describing the state of the geom_sched module. > + * There is only one static instance of this structure. > + */ > +LIST_HEAD(gs_list, g_gsched); /* type, link field */ > +struct geom_sched_vars { > + struct mtx gs_mtx; > + struct gs_list gs_scheds; /* list of algorithms */ > + u_int gs_debug; > + u_int gs_sched_count; /* how many algorithms ? */ > + u_int gs_patched; /* g_io_request was patched */ > + > + u_int gs_initialized; > + u_int gs_expire_secs; /* expiration of hash entries */ > + > + struct bio_queue_head gs_pending; > + u_int gs_npending; > + > + /* The following are for stats, usually protected by gs_mtx. */ > + u_long gs_requests; /* total requests */ > + u_long gs_done; /* total done */ > + u_int gs_in_flight; /* requests in flight */ > + u_int gs_writes_in_flight; > + u_int gs_bytes_in_flight; > + u_int gs_write_bytes_in_flight; > + > + char gs_names[256]; /* names of schedulers */ > +}; > + > +static struct geom_sched_vars me = { > + .gs_expire_secs = 10, > +}; > + > +SYSCTL_DECL(_kern_geom); > +SYSCTL_NODE(_kern_geom, OID_AUTO, sched, CTLFLAG_RW, 0, > + "GEOM_SCHED stuff"); > + > +SYSCTL_INT(_kern_geom_sched, OID_AUTO, in_flight_wb, CTLFLAG_RD, > + &me.gs_write_bytes_in_flight, 0, "Write bytes in flight"); > + > +SYSCTL_INT(_kern_geom_sched, OID_AUTO, in_flight_b, CTLFLAG_RD, > + &me.gs_bytes_in_flight, 0, "Bytes in flight"); > + > +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight_w, CTLFLAG_RD, > + &me.gs_writes_in_flight, 0, "Write Requests in flight"); > + > +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight, CTLFLAG_RD, > + &me.gs_in_flight, 0, "Requests in flight"); > + > +SYSCTL_ULONG(_kern_geom_sched, OID_AUTO, done, CTLFLAG_RD, > + &me.gs_done, 0, "Total done"); > + > +SYSCTL_ULONG(_kern_geom_sched, OID_AUTO, requests, CTLFLAG_RD, > + &me.gs_requests, 0, "Total requests"); > + > +SYSCTL_STRING(_kern_geom_sched, OID_AUTO, algorithms, CTLFLAG_RD, > + &me.gs_names, 0, "Algorithm names"); > + > +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, alg_count, CTLFLAG_RD, > + &me.gs_sched_count, 0, "Number of algorithms"); > + > +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, debug, CTLFLAG_RW, > + &me.gs_debug, 0, "Debug level"); > + > +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, expire_secs, CTLFLAG_RW, > + &me.gs_expire_secs, 0, "Expire time in seconds"); > + > +/* > + * g_sched calls the scheduler algorithms with this lock held. > + * The locking functions are exposed so the scheduler algorithms can also > + * protect themselves e.g. when running a callout handler. > + */ > +void > +g_sched_lock(struct g_geom *gp) > +{ > + struct g_sched_softc *sc = gp->softc; > + > + mtx_lock(&sc->sc_mtx); > +} > + > +void > +g_sched_unlock(struct g_geom *gp) > +{ > + struct g_sched_softc *sc = gp->softc; > + > + mtx_unlock(&sc->sc_mtx); > +} > + > +/* > + * Support functions to handle references to the module, > + * which are coming from devices using this scheduler. > + */ > +static inline void > +g_gsched_ref(struct g_gsched *gsp) > +{ > + > + atomic_add_int(&gsp->gs_refs, 1); > +} > + > +static inline void > +g_gsched_unref(struct g_gsched *gsp) > +{ > + > + atomic_add_int(&gsp->gs_refs, -1); > +} > + > +/* > + * Update the stats when this request is done. > + */ > +static void > +g_sched_update_stats(struct bio *bio) > +{ > + > + me.gs_done++; > + me.gs_in_flight--; > + me.gs_bytes_in_flight -= bio->bio_length; > + if (bio->bio_cmd & BIO_WRITE) { > + me.gs_writes_in_flight--; > + me.gs_write_bytes_in_flight -= bio->bio_length; > + } > +} > + > +/* > + * Dispatch any pending request. > + */ > +static void > +g_sched_forced_dispatch(struct g_geom *gp) > +{ > + struct g_sched_softc *sc = gp->softc; > + struct g_gsched *gsp = sc->sc_gsched; > + struct bio *bp; > + > + KASSERT(mtx_owned(&sc->sc_mtx), > + ("sc_mtx not owned during forced dispatch")); > + > + while ((bp = gsp->gs_next(sc->sc_data, 1)) != NULL) > + g_io_request(bp, LIST_FIRST(&gp->consumer)); > +} > + > +/* > + * The main dispatch loop, called either here after the start > + * routine, or by scheduling algorithms when they receive a timeout > + * or a 'done' notification. Does not share code with the forced > + * dispatch path, since the gs_done() callback can call us. > + */ > +void > +g_sched_dispatch(struct g_geom *gp) > +{ > + struct g_sched_softc *sc = gp->softc; > + struct g_gsched *gsp = sc->sc_gsched; > + struct bio *bp; > + > + KASSERT(mtx_owned(&sc->sc_mtx), ("sc_mtx not owned during dispatch")); > + > + if ((sc->sc_flags & G_SCHED_FLUSHING)) > + return; > + > + while ((bp = gsp->gs_next(sc->sc_data, 0)) != NULL) > + g_io_request(bp, LIST_FIRST(&gp->consumer)); > +} > + > +/* > + * Recent (8.0 and above) versions of FreeBSD have support to > + * register classifiers of disk requests. The classifier is > + * invoked by g_io_request(), and stores the information into > + * bp->bio_classifier1. > + * > + * Support for older versions, which is left here only for > + * documentation purposes, relies on two hacks: > + * 1. classification info is written into the bio_caller1 > + * field of the topmost node in the bio chain. This field > + * is rarely used, but this module is incompatible with > + * those that use bio_caller1 for other purposes, > + * such as ZFS and gjournal; > + * 2. g_io_request() is patched in-memory when the module is > + * loaded, so that the function calls a classifier as its > + * first thing. g_io_request() is restored when the module > + * is unloaded. This functionality is only supported for > + * x86 and amd64, other architectures need source code changes. > + */ > + > +/* > + * Lookup the identity of the issuer of the original request. > + * In the current implementation we use the curthread of the > + * issuer, but different mechanisms may be implemented later > + * so we do not make assumptions on the return value which for > + * us is just an opaque identifier. > + */ > + > +static inline u_long > +g_sched_classify(struct bio *bp) > +{ > + > +#if __FreeBSD_version > 800098 > + /* we have classifier fields in the struct bio */ > +#define HAVE_BIO_CLASSIFIER > + return ((u_long)bp->bio_classifier1); > +#else > +#warning old version!!! > + while (bp->bio_parent != NULL) > + bp = bp->bio_parent; > + > + return ((u_long)bp->bio_caller1); > +#endif > +} > + > +/* Return the hash chain for the given key. */ > +static inline struct g_hash * > +g_sched_hash(struct g_sched_softc *sc, u_long key) > +{ > + > + return (&sc->sc_hash[key & sc->sc_mask]); > +} > + > +/* > + * Helper function for the children classes, which takes > + * a geom and a bio and returns the private descriptor > + * associated to the request. This involves fetching > + * the classification field and [al]locating the > + * corresponding entry in the hash table. > + */ > +void * > +g_sched_get_class(struct g_geom *gp, struct bio *bp) > +{ > + struct g_sched_softc *sc; > + struct g_sched_class *gsc; > + struct g_gsched *gsp; > + struct g_hash *bucket; > + u_long key; > + > + sc = gp->softc; > + key = g_sched_classify(bp); > + bucket = g_sched_hash(sc, key); > + LIST_FOREACH(gsc, bucket, gsc_clist) { > + if (key == gsc->gsc_key) { > + gsc->gsc_refs++; > + return (gsc->gsc_priv); > + } > + } > + > + gsp = sc->sc_gsched; > + gsc = malloc(sizeof(*gsc) + gsp->gs_priv_size, > + M_GEOM_SCHED, M_NOWAIT | M_ZERO); > + if (!gsc) > + return (NULL); > + > + if (gsp->gs_init_class(sc->sc_data, gsc->gsc_priv)) { > + free(gsc, M_GEOM_SCHED); > + return (NULL); > + } > + > + gsc->gsc_refs = 2; /* 1 for the hash table, 1 for the caller. */ > + gsc->gsc_key = key; > + LIST_INSERT_HEAD(bucket, gsc, gsc_clist); > + > + gsc->gsc_expire = ticks + me.gs_expire_secs * hz; > + > + return (gsc->gsc_priv); > +} > + > +/* > + * Release a reference to the per-client descriptor, > + */ > +void > +g_sched_put_class(struct g_geom *gp, void *priv) > +{ > + struct g_sched_class *gsc; > + struct g_sched_softc *sc; > + > + gsc = g_sched_priv2class(priv); > + gsc->gsc_expire = ticks + me.gs_expire_secs * hz; > + > + if (--gsc->gsc_refs > 0) > + return; > + > + sc = gp->softc; > + sc->sc_gsched->gs_fini_class(sc->sc_data, priv); > + > + LIST_REMOVE(gsc, gsc_clist); > + free(gsc, M_GEOM_SCHED); > +} > + > +static void > +g_sched_hash_fini(struct g_geom *gp, struct g_hash *hp, u_long mask, > + struct g_gsched *gsp, void *data) > +{ > + struct g_sched_class *cp, *cp2; > + int i; > + > + if (!hp) > + return; > + > + if (data && gsp->gs_hash_unref) > + gsp->gs_hash_unref(data); > + > + for (i = 0; i < G_SCHED_HASH_SIZE; i++) { > + LIST_FOREACH_SAFE(cp, &hp[i], gsc_clist, cp2) > + g_sched_put_class(gp, cp->gsc_priv); > + } > + > + hashdestroy(hp, M_GEOM_SCHED, mask); > +} > + > +static struct g_hash * > +g_sched_hash_init(struct g_gsched *gsp, u_long *mask, int flags) > +{ > + struct g_hash *hash; > + > + if (gsp->gs_priv_size == 0) > + return (NULL); > + > + hash = hashinit_flags(G_SCHED_HASH_SIZE, M_GEOM_SCHED, mask, flags); > + > + return (hash); > +} > + > +static void > +g_sched_flush_classes(struct g_geom *gp) > +{ > + struct g_sched_softc *sc; > + struct g_sched_class *cp, *cp2; > + int i; > + > + sc = gp->softc; > + > + if (!sc->sc_hash || ticks - sc->sc_flush_ticks <= 0) > + return; > + > + for (i = 0; i < G_SCHED_HASH_SIZE; i++) { > + LIST_FOREACH_SAFE(cp, &sc->sc_hash[i], gsc_clist, cp2) { > + if (cp->gsc_refs == 1 && ticks - cp->gsc_expire > 0) > + g_sched_put_class(gp, cp->gsc_priv); > + } > + } > + > + sc->sc_flush_ticks = ticks + me.gs_expire_secs * hz; > +} > + > +/* > + * Wait for the completion of any outstanding request. To ensure > + * that this does not take forever the caller has to make sure that > + * no new request enter the scehduler before calling us. > + * > + * Must be called with the gp mutex held and topology locked. > + */ > +static int > +g_sched_wait_pending(struct g_geom *gp) > +{ > + struct g_sched_softc *sc = gp->softc; > + int endticks = ticks + hz; > + > + g_topology_assert(); > + > + while (sc->sc_pending && endticks - ticks >= 0) > + msleep(gp, &sc->sc_mtx, 0, "sched_wait_pending", hz / 4); > + > + return (sc->sc_pending ? ETIMEDOUT : 0); > +} > + > +static int > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 19:43:01 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ABCF106566B; Tue, 13 Apr 2010 19:43:01 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 459CE8FC0C; Tue, 13 Apr 2010 19:43:01 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id AE9F2730A1; Tue, 13 Apr 2010 21:53:26 +0200 (CEST) Date: Tue, 13 Apr 2010 21:53:26 +0200 From: Luigi Rizzo To: Roman Divacky Message-ID: <20100413195326.GA47657@onelab2.iet.unipi.it> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100413193500.GA46839@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100413193500.GA46839@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 19:43:01 -0000 On Tue, Apr 13, 2010 at 09:35:00PM +0200, Roman Divacky wrote: > you dont seem to have commited the anticipatory scheduler gsched_as. > > why? gsched_rr has anticipation too, and is the "production quality" one, so i only included that one in the svn repository. You can find other schedulers in the tarball on the web page, but gsched_as is only a proof of concept, and others need more debugging and cleanup before being imported. cheers luigi From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 19:43:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5663A106566C; Tue, 13 Apr 2010 19:43:17 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44A3A8FC18; Tue, 13 Apr 2010 19:43: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 o3DJhHGO046060; Tue, 13 Apr 2010 19:43:17 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DJhHJm046058; Tue, 13 Apr 2010 19:43:17 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201004131943.o3DJhHJm046058@svn.freebsd.org> From: Nick Hibma Date: Tue, 13 Apr 2010 19:43: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: r206561 - stable/7/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 19:43:17 -0000 Author: n_hibma Date: Tue Apr 13 19:43:16 2010 New Revision: 206561 URL: http://svn.freebsd.org/changeset/base/206561 Log: Make the list of allocated ports dynamic. The Option GTM382 has 10 serial ports (yes, 10, it has a built in GPS and other stuff) and we need to access the last one for PPP access to the card. Other ports are HSO (Option specific protocol; see Linux driver). Reviewed by: thompsa Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Tue Apr 13 18:53:39 2010 (r206560) +++ stable/7/sys/dev/usb/u3g.c Tue Apr 13 19:43:16 2010 (r206561) @@ -58,10 +58,8 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, &u3gdebug, 0, "u3g debug level"); #define DPRINTF(x...) if (u3gdebug) device_printf(sc->sc_dev, ##x) -#define U3G_MAXPORTS 6 - struct u3g_softc { - struct ucom_softc sc_ucom[U3G_MAXPORTS]; + struct ucom_softc *sc_ucom; device_t sc_dev; usbd_device_handle sc_udev; u_int8_t sc_speed; @@ -254,9 +252,8 @@ u3g_attach(device_t self) sc->sc_init = u3g_dev_type->init; sc->sc_speed = u3g_dev_type->speed; - sprintf(devnamefmt,"U%d.%%d", device_get_unit(self)); int portno = 0; - for (i = 0; i < uaa->nifaces && portno < U3G_MAXPORTS; i++) { + for (i = 0; i < uaa->nifaces; i++) { DPRINTF("Interface %d of %d, %sin use\n", i, uaa->nifaces, (uaa->ifaces[i]? "not ":"")); @@ -279,7 +276,7 @@ u3g_attach(device_t self) int bulkin_no = -1, bulkout_no = -1; int claim_iface = 0; - for (n = 0; n < id->bNumEndpoints && portno < U3G_MAXPORTS; n++) { + for (n = 0; n < id->bNumEndpoints; n++) { ed = usbd_interface2endpoint_descriptor(uaa->ifaces[i], n); DPRINTF(" Endpoint %d of %d%s\n", n, id->bNumEndpoints, @@ -298,6 +295,7 @@ u3g_attach(device_t self) * the bulk-in and bulk-out endpoints appear in pairs. */ if (bulkin_no != -1 && bulkout_no != -1) { + sc->sc_ucom = realloc(sc->sc_ucom, (portno+1)*sizeof(struct ucom_softc), M_USBDEV, M_WAITOK); struct ucom_softc *ucom = &sc->sc_ucom[portno]; ucom->sc_dev = self; @@ -318,13 +316,6 @@ u3g_attach(device_t self) portno, i, ucom->sc_bulkin_no, ucom->sc_bulkout_no); -#if __FreeBSD_version < 700000 - ucom_attach_tty(ucom, MINOR_CALLOUT, devnamefmt, portno); -#elif __FreeBSD_version < 800000 - ucom_attach_tty(ucom, TS_CALLOUT, devnamefmt, portno); -#else - ucom_attach_tty(ucom, devnamefmt, portno); -#endif claim_iface = 1; portno++; @@ -336,6 +327,19 @@ u3g_attach(device_t self) } sc->sc_numports = portno; + sprintf(devnamefmt,"U%d.%%d", device_get_unit(self)); + for (portno = 0; portno < sc->sc_numports; portno++) { + struct ucom_softc *ucom = &sc->sc_ucom[portno]; + +#if __FreeBSD_version < 700000 + ucom_attach_tty(ucom, MINOR_CALLOUT, devnamefmt, portno); +#elif __FreeBSD_version < 800000 + ucom_attach_tty(ucom, TS_CALLOUT, devnamefmt, portno); +#else + ucom_attach_tty(ucom, devnamefmt, portno); +#endif + } + device_printf(self, "configured %d serial ports (%s)\n", sc->sc_numports, devnamefmt); return 0; @@ -357,6 +361,9 @@ u3g_detach(device_t self) } } + if (sc->sc_ucom) + free(sc->sc_ucom, M_USBDEV); + return 0; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 20:07:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5F681065672; Tue, 13 Apr 2010 20:07:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955588FC12; Tue, 13 Apr 2010 20:07: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 o3DK7qvM051560; Tue, 13 Apr 2010 20:07:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DK7qcq051557; Tue, 13 Apr 2010 20:07:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004132007.o3DK7qcq051557@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Apr 2010 20:07: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: r206563 - head/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: Tue, 13 Apr 2010 20:07:52 -0000 Author: yongari Date: Tue Apr 13 20:07:52 2010 New Revision: 206563 URL: http://svn.freebsd.org/changeset/base/206563 Log: Add Agere ET1011 PHY which is found on Belkin F5D5055 USB controller. Unlike Agere ET1011C, Agere ET1011 does not seem to need special DSP programming to workaround silicon bug. Modified: head/sys/dev/mii/miidevs head/sys/dev/mii/truephy.c Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Tue Apr 13 19:58:32 2010 (r206562) +++ head/sys/dev/mii/miidevs Tue Apr 13 20:07:52 2010 (r206563) @@ -102,6 +102,7 @@ oui xxREALTEK 0x000732 */ /* Agere Systems PHYs */ +model AGERE ET1011 0x0001 ET1011 10/100/1000baseT PHY model AGERE ET1011C 0x0004 ET1011C 10/100/1000baseT PHY /* Altima Communications PHYs */ Modified: head/sys/dev/mii/truephy.c ============================================================================== --- head/sys/dev/mii/truephy.c Tue Apr 13 19:58:32 2010 (r206562) +++ head/sys/dev/mii/truephy.c Tue Apr 13 20:07:52 2010 (r206563) @@ -76,6 +76,7 @@ static device_method_t truephy_methods[] }; static const struct mii_phydesc truephys[] = { + MII_PHY_DESC(AGERE, ET1011), MII_PHY_DESC(AGERE, ET1011C), MII_PHY_END }; @@ -161,7 +162,10 @@ truephy_attach(device_t dev) mii->mii_instance++; - truephy_reset(sc); + if (MII_MODEL(ma->mii_id2) == MII_MODEL_AGERE_ET1011) + mii_phy_reset(sc); + else + truephy_reset(sc); sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; if (sc->mii_capabilities & BMSR_EXTSTAT) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 20:33:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33116106566C; Tue, 13 Apr 2010 20:33:35 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 089048FC1A; Tue, 13 Apr 2010 20:33:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DKXYUo057447; Tue, 13 Apr 2010 20:33:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKXYBL057446; Tue, 13 Apr 2010 20:33:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132033.o3DKXYBL057446@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:33: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: r206564 - in stable/8/etc: . mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 20:33:35 -0000 Author: dougb Date: Tue Apr 13 20:33:34 2010 New Revision: 206564 URL: http://svn.freebsd.org/changeset/base/206564 Log: Pull mergeinfo from r201203 up into the etc directory Modified: Directory Properties: stable/8/etc/ (props changed) stable/8/etc/mtree/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 20:36:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC86B1065673; Tue, 13 Apr 2010 20:36:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB0758FC13; Tue, 13 Apr 2010 20:36: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 o3DKascU058231; Tue, 13 Apr 2010 20:36:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKasKA058229; Tue, 13 Apr 2010 20:36:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132036.o3DKasKA058229@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206565 - 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: Tue, 13 Apr 2010 20:36:54 -0000 Author: dougb Date: Tue Apr 13 20:36:54 2010 New Revision: 206565 URL: http://svn.freebsd.org/changeset/base/206565 Log: MFC r206248: Change where we nap so that if pwait(1) returns but kill -0 still sees a zombie we don't print an endless string of the same pid number until the zombie exits. While I'm here, local'ize the variables that this function uses. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Tue Apr 13 20:33:34 2010 (r206564) +++ stable/8/etc/rc.subr Tue Apr 13 20:36:54 2010 (r206565) @@ -372,6 +372,8 @@ _find_processes() # wait_for_pids() { + local _list _prefix _nlist _j + _list="$@" if [ -z "$_list" ]; then return @@ -382,6 +384,7 @@ wait_for_pids() for _j in $_list; do if kill -0 $_j 2>/dev/null; then _nlist="${_nlist}${_nlist:+ }$_j" + [ -n "$_prefix" ] && sleep 1 fi done if [ -z "$_nlist" ]; then @@ -390,7 +393,7 @@ wait_for_pids() _list=$_nlist echo -n ${_prefix:-"Waiting for PIDS: "}$_list _prefix=", " - pwait $_list 2>/dev/null || sleep 2 + pwait $_list 2>/dev/null done if [ -n "$_prefix" ]; then echo "." From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 20:44:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295081065673; Tue, 13 Apr 2010 20:44:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 160348FC1E; Tue, 13 Apr 2010 20:44: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 o3DKiHsk059931; Tue, 13 Apr 2010 20:44:17 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKiGmG059926; Tue, 13 Apr 2010 20:44:16 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132044.o3DKiGmG059926@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:44: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: r206566 - in stable/8/games/fortune: . datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:44:18 -0000 Author: dougb Date: Tue Apr 13 20:44:16 2010 New Revision: 206566 URL: http://svn.freebsd.org/changeset/base/206566 Log: MFC r205995: Massive cleanup and synchronization with other *BSDs Modified: stable/8/games/fortune/Notes stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/fortunes-o.real stable/8/games/fortune/datfiles/fortunes.sp.ok stable/8/games/fortune/datfiles/limerick stable/8/games/fortune/datfiles/startrek stable/8/games/fortune/datfiles/zippy Directory Properties: stable/8/games/fortune/ (props changed) stable/8/games/fortune/datfiles/ (props changed) Modified: stable/8/games/fortune/Notes ============================================================================== --- stable/8/games/fortune/Notes Tue Apr 13 20:36:54 2010 (r206565) +++ stable/8/games/fortune/Notes Tue Apr 13 20:44:16 2010 (r206566) @@ -19,13 +19,13 @@ Warning: /usr/share/games/fortune. A fortune file has two parts: the source file (which contains the fortunes themselves) and the data file which describes the fortunes. The data file always has the same name as the fortune file -with the string ".dat" concatenated, i.e. "fort" is the standard fortune -database, and "fort.dat" is the data file which describes it. See +with the string ".dat" concatenated, i.e. "fortunes" is the standard fortune +database, and "fortunes.dat" is the data file which describes it. See strfile(8) for more information on creating the data files. Fortunes are split into potentially offensive and not potentially offensive parts. The offensive version of a file has the same name as the -non-offensive version with "-o" concatenated, i.e. "fort" is the standard -fortune database, and "fort-o" is the standard offensive database. The +non-offensive version with "-o" concatenated, i.e. "fortunes" is the standard +fortune database, and "fortunes-o" is the standard offensive database. The fortune program automatically assumes that any file with a name ending in "-o" is potentially offensive, and should therefore only be displayed if explicitly requested, either with the -o option or by specifying a file name @@ -42,10 +42,10 @@ MUST be in the potentially offensive dat explicit language (see George Carlin's recent updated list) MUST be in the potentially offensive database. Political and religious opinions are often sequestered in the potentially offensive section as well. Anything which -assumes as a world view blatantly racist, mysogynist (sexist), or homophobic +assumes as a world view blatantly racist, misogynist (sexist), or homophobic ideas should not be in either, since they are not really funny unless *you* -are racist, mysogynist, or homophobic. - The point of this is that people have should have a reasonable +are racist, misogynist, or homophobic. + The point of this is that people should have a reasonable expectation that, should they just run "fortune", they will not be offended. We know that some people take offense at anything, but normal people do have opinions, too, and have a right not to have their sensibilities offended by @@ -53,7 +53,7 @@ a program which is supposed to be entert -o" or "fortune -a" are saying, in effect, that they are willing to have their sensibilities tweaked. However, they should not have their personal worth seriously (i.e., not in jest) assaulted. Jokes which depend for their -humor on racist, mysogynist, or homophobic stereotypes *do* seriously +humor on racist, misogynist, or homophobic stereotypes *do* seriously assault individual personal worth, and in a general entertainment medium we should be able to get by without it. Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Tue Apr 13 20:36:54 2010 (r206565) +++ stable/8/games/fortune/datfiles/fortunes Tue Apr 13 20:44:16 2010 (r206566) @@ -368,8 +368,10 @@ OR'd together, outta sight! Double bucky, I'd like a whole word of Double bucky, I'm happy I heard of Double bucky, I'd like a whole word of you! - - -- (C) 1978 by Guy L. Steele, Jr. + -- Guy L. Steele, Jr., (C) 1978 + (to Nicholas Wirth, who suggested that an extra bit + be added to terminal codes on 36-bit machines for use + by screen editors.) % Hard Copies and Chmod @@ -834,7 +836,7 @@ would like on it. "Here lies an honest lawyer. "Sorry, but I can't do that," replied the stonecutter. "In this state, it's against the law to bury two people in the same grave. However, -I could put ``here lies an honest lawyer'', if that would be okay." +I could put `here lies an honest lawyer', if that would be okay." "But that won't let people know who it is" protested the lawyer. "Certainly will," retorted the stonecutter. "people will read it and exclaim, "That's Strange!" @@ -1146,7 +1148,7 @@ strings of pearls. The spirit and inten throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity. - A program should follow the 'Law of Least Astonishment'. What is this + A program should follow the "Law of Least Astonishment." What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program, no matter how complex, should act as a single unit. The @@ -1161,7 +1163,7 @@ program. conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their -clothes were wrinkled and old. They crashed out hospitality suites and they +clothes were wrinkled and old. They crashed our hospitality suites and they made rude noises during my presentation." The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, @@ -1466,7 +1468,7 @@ generalizable. The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile". - -- Frederick Brooks, "The Mythical Man Month" + -- Frederick Brooks, Jr., "The Mythical Man-Month" % An eighty-year-old woman is rocking away the afternoon on her porch when she sees an old, tarnished lamp sitting near the steps. She @@ -1513,7 +1515,7 @@ over canoe frames, for my people need tr and we offer you a chance to kill yourself with our ceremonial knife." The Englishman accepts the knife and yells, "God Save the Queen", while plunging the knife into his heart. - The Frenchman removes the knife from the fallen body, and yells, + The Frenchman removes the knife from the fallen body, and yells, "Vive la France", while plunging the knife into his heart. The American removes the knife from the fallen body, and yells, while stabbing himself all over his body, "Here's your lousy canoe!" @@ -1562,7 +1564,7 @@ a postcard?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." "That was the curious incident." - -- A. Conan Doyle, "Silver Blaze" + -- Sir Arthur Conan Doyle, "Silver Blaze" % Approaching the gates of the monastery, Hakuin found Ken the Zen preaching to a group of disciples. @@ -1609,8 +1611,8 @@ Los Angeles fainted from hyperoxygenatio under the exhaust of a bus until he revived. % Before he became a hermit, Zarathud was a young Priest, and - took great delight in making fools of his opponents in front of -his followers. +took great delight in making fools of his opponents in front of his +followers. One day Zarathud took his students to a pleasant pasture and there he confronted The Sacred Chao while She was contentedly grazing. "Tell me, you dumb beast," demanded the Priest in his @@ -1626,7 +1628,7 @@ Chinese ideogram for NO-THING.) and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - -- Kurt Vonnegut, "Cat's Cradle" + -- Kurt Vonnegut, Jr., "Cat's Cradle" % Bubba, Jim Bob, and Leroy were fishing out on the lake last November, and, when Bubba tipped his head back to empty the Jim Beam, he fell out of the @@ -1694,7 +1696,7 @@ way I ought to go from here?" the Cat. "I don't care much where--" said Alice. "Then it doesn't matter which way you go," said the Cat. - -- Lewis Carroll + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more @@ -1877,7 +1879,7 @@ how to be excellent: "In Search of Excel So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" % - Exxon's 'Universe of Energy' tends to the peculiar rather than the + Exxon's "Universe of Energy" tends to the peculiar rather than the humorous ... After [an incomprehensible film montage about wind and sun and rain and strip mines and] two or three minutes of mechanical confusion, the seats locomote through a short tunnel filled with clock-work dinosaurs. @@ -1923,9 +1925,9 @@ of events, there lurks a singular, sinis "MINE! HA-HA!" % "Found it," the Mouse replied rather crossly: -"of course you know what 'it' means." +"of course you know what `it' means." - "I know what 'it' means well enough, when I find a thing," + "I know what `it' means well enough, when I find a thing," said the Duck: "it's generally a frog or a worm. The question is, what did the archbishop find?" @@ -1937,15 +1939,15 @@ such as a "pride of lions" or a "gaggle One of the professors noticed a group of prostitutes down the block, and posed the question, "What name would be given to that group?" The four fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about 'a Jam of Tarts'?" The others nodded + At last, one spoke: "How about `a Jam of Tarts'?" The others nodded in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest 'an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose 'a Flourish of Strumpets.'" +professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others +nodded. A third spoke: "I propose `a Flourish of Strumpets.'" They continued their walk in silence, until the first professor remarked to the remaining professor, who was the most senior and learned of the four, "You haven't suggested a name for our ladies. What are your thoughts?" - Replied the fourth professor, "'An Anthology of Prose.'" + Replied the fourth professor, "`An Anthology of Prose.'" % Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" @@ -1958,12 +1960,11 @@ and sarcastic?" "Of course not," said a sympathetic friend. "Well," retorted Frank, "neither would Jennifer." % - "Gee, Mudhead, everyone at More Science High has an + "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." - - -- Firesign Theater + -- The Firesign Theatre % "Gentlemen of the jury," said the defense attorney, now beginning to warm to his summation, "the real question here before you is, shall this @@ -2261,7 +2262,7 @@ each other up: the floor.) S-word. Excuse me. Look, Bob, I'm going to have to get back to you. Bob: Fine. - -- Dave Barry + -- Dave Barry, "$#$%#^%!^%&@%@!" % "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't -- @@ -2276,7 +2277,9 @@ less." so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." - -- Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For @@ -2328,7 +2331,7 @@ operation - namely, to remove those irri "And then he will be sane?" "Then he will be perfectly sane, and a quite admirable citizen." "Thank heaven for science!" said old Yacob. - -- H.G. Wells, "The Country of the Blind" + -- H. G. Wells, "The Country of the Blind" % "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" @@ -2403,7 +2406,7 @@ more simply -- `Never imagine yourself n might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" - -- Lewis Carroll, "Alice in Wonderland" + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % I said, "Preacher, give me strength for round 5." He said, "What you need is to grow up, son." @@ -2567,7 +2570,7 @@ man. Mud-as-man alone could speak. "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, "Between Time and Timbuktu" + -- Kurt Vonnegut, Jr., "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -2815,7 +2818,7 @@ guzzled in one gulp and then smashed on the man stuffed the broken bottle in his mouth, munched broken glass and smacked his lips with relish. "Can I, ah, uh, get you another, sir?" the drifter stammered. - "Naw, I gotta git outa here, boy," the man grunted. "Big Mike's + "Naw, I gotta git outta here, boy," the man grunted. "Big Mike's a-comin'." % Love's Drug @@ -3002,7 +3005,7 @@ confirm who I am. -- Captain Freedom % Old Barlow was a crossing-tender at a junction where an express train -demolished an automobile and it's occupants. Being the chief witness, his +demolished an automobile and its occupants. Being the chief witness, his testimony was vitally important. Barlow explained that the night was dark, and he waved his lantern frantically, but the driver of the car paid no attention to the signal. @@ -3072,7 +3075,7 @@ and it was very juicy. I stood up and t when my mother at the kitchen window called my name in a sharp voice. I had to decide quickly. I decided. A rotten Big Boy hitting the target is a memorable sound, like a fat -man doing a belly-flop. With a whoop and a yell the tomatoe came after +man doing a belly-flop. With a whoop and a yell the tomatoee came after me faster than I knew she could run, and grabbed my shirt and was about to brain me when Mother called her name in a sharp voice. And my sister, who was a good person, obeyed and let go -- and burst into tears. I guess she knew that @@ -3164,7 +3167,7 @@ biggest, strongest fish he had ever caug until, finally, he managed to bring it to the surface. Looking of the edge of the boat, he saw the head of this huge fish breaking the surface. Smiling with pride, he reached over the edge to pull the fish up. Unfortunately, he -accidently caught his watch on the edge, and, before he knew it, there was a +accidentally caught his watch on the edge, and, before he knew it, there was a snap, and his watch tumbled into the water next to the fish with a loud "sploosh!" Distracted by this shiny object, the fish made a sudden lunge, simultaneously snapping the line, and swallowing the watch. Sadly, the @@ -3539,12 +3542,14 @@ know." "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said 'Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. - "Too proud?" the other enquired. + "Too proud?" the other enquired. Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." - -- Lewis Carroll, "Through the Looking-Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % Several students were asked to prove that all odd integers are prime. The first student to try to do this was a math student. "Hmmm... @@ -3732,7 +3737,7 @@ she'd been she said she'd spent the nigh % "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." - -- e.e. cummings last service call + -- e. e. cummings last service call % "The best thing for being sad," replied Merlin, beginning to puff and blow, "is to learn something. That's the only thing that never fails. @@ -3907,7 +3912,7 @@ married! You're a sadist, that's what!" THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE Named after the famous French philosopher and mathematician Rene -DesCartes, RENE is a language used for artificial intelligence. The +Descartes, RENE is a language used for artificial intelligence. The language is being developed at the Chicago Center of Machine Politics and Programming under a grant from the Jane Byrne Victory Fund. A spokesman described the language as "Just as great as dis [sic] city of @@ -4030,7 +4035,9 @@ called 'Ways and Means': but that's onl time completely bewildered. "I was coming to that," the Knight said. "The song really is "A-sitting on a Gate": and the tune's my own invention." - --Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % The only real game in the world, I think, is baseball... You've got to start way down, at the bottom, when you're six or seven years @@ -4065,7 +4072,8 @@ blocks of wood. Opaque, like black pool "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" - -- Firesign Theater, "How Can You Be In Two Places At + -- The Firesign Theatre, + "How Can You Be In Two Places At Once When You're Not Anywhere At All" % The salesman and the system analyst took off to spend a weekend in the @@ -4157,8 +4165,8 @@ make sure that they are Earthlings. The when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! -THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! -TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD +THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! +TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. Before they go to bust a bookie joint they mortar it first. -- M. Christensen, "A Portland Innocent in LA" @@ -4270,7 +4278,7 @@ you the Widow Miffin?" a small boy asked "Oh, no?" replied the little boy. "Wait 'til you see what they're carrying upstairs!" % - There was a mad scientist (a mad... social... scientist) who kidnaped + There was a mad scientist (a mad... social... scientist) who kidnapped three colleagues, an engineer, a physicist, and a mathematician, and locked each of them in separate cells with plenty of canned food and water but no can opener. @@ -4282,13 +4290,13 @@ and escaped. off the tin cans by throwing them against the wall. She was developing a good pitching arm and a new quantum theory. The mathematician had stacked the unopened cans into a surprising -solution to the kissing problem; his dessicated corpse was propped calmly +solution to the kissing problem; his desiccated corpse was propped calmly against a wall, and this was inscribed on the floor: Theorem: If I can't open these cans, I'll die. Proof: assume the opposite... % There was once a programmer who was attached to the court of the -warlord Wu. The warlord asked the programmer: "Which is easier to design: +warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. The warlord uttered an exclamation of disbelief. "Surely an @@ -4328,7 +4336,7 @@ demands from him more than his utmost st sinew and brain and hope and fear and dreams -- and still calls for more. They are fools that think otherwise. No great effort was ever bought. No painting, no music, no poem, no cathedral in stone, no church, no state was -ever raised into being for payment of any kind. No parthenon, no Thermopylae +ever raised into being for payment of any kind. No Parthenon, no Thermopylae was ever built or fought for pay or glory; no Bukhara sacked, or China ground beneath Mongol heel, for loot or power alone. The payment for doing these things was itself the doing of them. @@ -4393,14 +4401,14 @@ be as easily led to beauty as to uglines relations, to joy as to bitterness, be said to be suffering from Hunter Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. - -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt + -- Kurt Vonnegut, Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" % - To A Quick Young Fox + To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? -Guy fed by work, quiz Jove's xanthic lamp-- +Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog % @@ -4565,7 +4573,7 @@ let him lie there all night." "Don't worry about that. They have a guard station in front of the White House that's open 24 hours a day. The guards would recognize Colson... and by that time of course his wife would have called the cops and reported -that a bunch of thugs had kidnaped him." +that a bunch of thugs had kidnapped him." "Wouldn't it be a little kinder if you drove about four more blocks and stopped at a phone box to ring the hospital and say, 'Would you mind going around to the front of the White House? There's a naked man lying outside @@ -4574,7 +4582,7 @@ in the street, bleeding to death...'" "It would be quite a story for the newspapers, wouldn't it?" "Yeah, I think it's safe to say we'd see some headlines on that one." -- Hunter S. Thompson, talking to R. Steadman on C. Colson, - ex-Marine captain, now born again, of Watergate fame. + ex-Marine captain, now born again, of Watergate fame. % "Well, it's garish, ugly, and derelicts have used it for a toilet. The rides are dilapidated to the point of being lethal, and could easily @@ -4593,7 +4601,7 @@ an End-user of Very Little Brain, and lo "Well, that was a piece of cake, eh K-9?" "Piece of cake, Master? Radial slice of baked confection ... coefficient of relevance to Key of Time: zero." - -- Dr. Who + -- "Doctor Who" % "We're running out of adjectives to describe our situation. We had crisis, then we went into chaos, and now what do we call this?" said @@ -4691,7 +4699,7 @@ ever happened to me... the most dreadful "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." - -- Jeff MacNelley, "Shoe" + -- Jeff MacNelly, "Shoe" % "When I drink, *everybody* drinks!" a man shouted to the assembled bar patrons. A loud general cheer went up. After downing his @@ -4860,14 +4868,14 @@ There, that ought to patch it. Dist it "The famous scientific criminal, as famous among crooks as --" "My blushes, Watson," Holmes murmured, in a deprecating voice. "I was about to say 'as he is unknown to the public.'" - -- A. Conan Doyle, "The Valley of Fear" + -- Sir Arthur Conan Doyle, "The Valley of Fear" % "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" - "I don't know, I didn't listen." + "I don't know, I didn't listen!" -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % "You mean, if you allow the master to be uncivil, to treat you @@ -5076,7 +5084,7 @@ please communicate them by one of the fo ARPA: WastebasketSLMHQ.ARPA UUCP: [berkeley, seismo, harpo]!fubar!thekid!slmhq!wastebasket - Non-network sites: Federal Express to: + Non-network sites: Federal Express to: Wastebasket Room NE43-926 Copernicus, The Moon, 12345-6789 @@ -5223,7 +5231,7 @@ III. Any body passing through solid matt 8. Babes in Boyland 9. Santa's Magic Lap 10. Hot Buttered Elves - -- David Letterman's "Top Ten Christmas Movies in Times + -- David Letterman, "Top Ten Christmas Movies in Times Square" % ... A booming voice says, "Wrong, cretin!", and you notice that you @@ -5337,7 +5345,7 @@ other's private parts. ... computer hardware progress is so fast. No other technology since civilization began has seen six orders of magnitude in performance-price gain in 30 years. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... [concerning quotation marks] even if we *_d_i_d* quote anybody in this business, it probably would be gibberish. @@ -5350,8 +5358,6 @@ introduction of Christianity, have been yet we have not advanced one inch towards uniformity. -- Thomas Jefferson, "Notes on Virginia" % - Eat drink and be merry, for tomorrow they may make it illegal. -% <<<<< EVACUATION ROUTE <<<<< % ... "fire" does not matter, "earth" and "air" and "water" do not matter. @@ -5440,14 +5446,14 @@ legally ... impeccable! -- Individuals who make their abode in vitreous edifices would be well advised to refrain from catapulting projectiles. -- Neophyte's serendipity. --- Exclusive dedication to necessitious chores without interludes of hedonistic +-- Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders John a hebetudinous fellow. -- A revolving concretion of earthy or mineral matter accumulates no congeries of small, green bryophytic plant. -- Abstention from any aleatory undertaking precludes a potential escalation of a lucrative nature. -- Missiles of ligneous or osteal consistency have the potential of fracturing - osseous structure, but appelations will eternally remain innocuous. + osseous structure, but appellations will eternally remain innocuous. % ** MAXIMUM TERMINALS ACTIVE. TRY AGAIN LATER ** % @@ -5492,7 +5498,7 @@ their C programs. -- Robert Firth % ... Our second completely true news item was sent to me by Mr. H. Boyce -Connell Jr. of Atlanta, Ga., where he is involved in a law firm. One +Connell, Jr. of Atlanta, Ga., where he is involved in a law firm. One thing I like about the South is, folks there care about tradition. If somebody gets handed a name like "H. Boyce," he hangs on to it, puts it on his legal stationery, even passes it to his son, rather than do what @@ -5519,7 +5525,7 @@ awareness of the great goals for Man and galled saucepan does not reach 212 degrees Fahrenheit. % ... so long as the people do not care to exercise their freedom, those -who wish to tyrranize will do so; for tyrants are active and ardent, +who wish to tyrannize will do so; for tyrants are active and ardent, and will devote themselves in the name of any number of gods, religious and otherwise, to put shackles upon sleeping men. -- Voltarine de Cleyre @@ -5596,13 +5602,13 @@ cleanersayingIllgetyoumyprettyandyourlit % ... this is an awesome sight. The entire rebel resistance buried under six million hardbound copies of "The Naked Lunch." - -- The Firesign Theater + -- The Firesign Theatre % ... though his invention worked superbly -- his theory was a crock of sewage from beginning to end. -- Vernor Vinge, "The Peace War" % - U X + U X e dUdX, e dX, cosine, secant, tangent, sine, 3.14159... % * UNIX is a Trademark of Bell Laboratories. @@ -5647,7 +5653,7 @@ into doubt. % ... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... which reminds me of the Carrot family: Ma Carrot, Pa Carrot, and Baby Carrot. One fine spring day they decided to go out for a picnic. They all @@ -5708,20 +5714,20 @@ QED: A sheet of paper is a lazy dog. 10. The city does not employ so called "Wallet Inspectors". -- David Letterman, "Top Ten New York City Pedestrian Tips" % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, all horses are black. % 1. Avoid fried meats which angry up the blood. @@ -5792,7 +5798,7 @@ you have to (always catch the buyer hung 2. I, David Letterman, will never rent out my farm again. 1. We are stardust. We are golden. We are going to look really stupid to future generations. - -- David Letterman, Top Ten Lessons of Woodstock + -- David Letterman, "Top Ten Lessons of Woodstock" % 10 Reasons Why a Beer is Better Than a Woman: @@ -5801,8 +5807,8 @@ you have to (always catch the buyer hung 3. A beer doesn't think baseball is stupid simply because the guys spit. 4. A beer doesn't give a [expletive deleted] if you keep a bunch of other beers on the side. - 5. A beer will not call you a sexist pig if you say "doberman" instead of - "doberperson". + 5. A beer will not call you a sexist pig if you say "Doberman" instead of + "Doberperson." 6. A beer won't get a job as a DJ and play 5 straight hours of lesbian folk music on yer fave radio station. 7. A beer understands why The Three Stooges are funny. @@ -5820,7 +5826,7 @@ FF buckets of bits on the bus FF buckets of bits on the bus FF buckets of bits Take one down, short it to ground -FE buckets of bits on the bus... +FE buckets of bits on the bus ad infinitum... % @@ -5932,13 +5938,13 @@ It isn't just a good idea, it's the law! What 20th Century U.S. President was almost impeached and what office did he later hold? % -3 syncs represent the trinity - init, the child and the eternal zombie +3 syncs represent the trinity -- init, the child and the eternal zombie process. In doing 3, you're paying homage to each and I think such traditions are important in this shallow, mercurial business we find ourselves in. -- Jordan K. Hubbard % -$3,000,000. +$3,000,000 % 355/113 -- Not the famous irrational number PI, but an incredible simulation. @@ -6050,7 +6056,7 @@ A beautiful woman is a blessing from Hea -- Kipling % A beautiful woman is a picture which drives all beholders nobly mad. - -- Emerson + -- Ralph Waldo Emerson % A beer delayed is a beer denied. % @@ -6067,7 +6073,7 @@ A billion hours ago man had not yet walk A billion dollars ago was late yesterday afternoon at the U.S. Treasury. % A biologist, a statistician, a mathematician and a computer scientist are on -a photo-safari in Africa. As they're driving along the savanna in their +a photo-safari in Africa. As they're driving along the savannah in their jeep, they stop and scout the horizon with their binoculars. The biologist: "Look! A herd of zebras! And there's a white zebra! @@ -6203,7 +6209,7 @@ invariably sat silent. The monk had alr and a moonlit night. One day he brought to Tortue a piece of string, and asked the same question. In reply, the Grand Tortue grasped the loop between his feet and, with a few simple manipulations, created a complex -string which he proferred wordlessly to the monk. At that moment, the monk +string which he proffered wordlessly to the monk. At that moment, the monk was enlightened. From then on, the monk did not bother Tortue. Instead, he made string after @@ -6261,9 +6267,10 @@ A city is a large community where people % A clash of doctrine is not a disaster - it is an opportunity. % -A classic is something that everyone wants to have read +A classic is something that everybody wants to have read and nobody wants to read. - -- Mark Twain, "The Disappearance of Literature" + -- Mark Twain quoting Professor Winchester, + "The Disappearance of Literature" % A clever prophet makes sure of the event first. % @@ -6438,7 +6445,7 @@ damned things is ample. A couch is as good as a chair. % A countryman between two lawyers is like a fish between two cats. - -- Ben Franklin + -- Benjamin Franklin % A couple of young fellers were fishing at their special pond off the beaten track when out of the bushes jumped the Game Warden. Immediately, @@ -6535,7 +6542,7 @@ A diplomatic husband said to his wife, " your birthday when you never look any older?" % A diplomat's life consists of three things: protocol, Geritol, and alcohol. - -- Adlai Stevenson + -- Adlai E. Stevenson % A distraught patient phoned her doctor's office. "Was it true," the woman inquired, "that the medication the doctor had prescribed was for the rest @@ -6544,7 +6551,7 @@ of her life?" the woman proceeded bravely on. "Well, I'm wondering, then, how serious my condition is. This prescription is marked `NO REFILLS'". % -A diva who specializes in risque arias is an off-coloratura soprano. +A diva who specializes in risqu'e arias is an off-coloratura soprano. % A doctor calls his patient to give him the results of his tests. "I have some bad news," says the doctor, "and some worse news." The bad news is @@ -6708,7 +6715,7 @@ dimension strictly exceeds the topologic -- Mandelbrot, "The Fractal Geometry of Nature" % A free society is one where it is safe to be unpopular. - -- Adlai Stevenson + -- Adlai E. Stevenson % A freelancer is one who gets paid by the word -- per piece or perhaps. -- Robert Benchley @@ -6728,11 +6735,11 @@ lawyers more than he hates his wife. A friend with weed is a friend indeed. % A full belly makes a dull brain. - -- Ben Franklin + -- Benjamin Franklin [and the local candy machine man. Ed] % -A 'full' life in my experience is usually full only of other +A "full" life in my experience is usually full only of other people's demands. % A furore Normanorum libera nos, O Domine! @@ -6782,7 +6789,7 @@ A gift of a flower will soon be made to A girl and a boy bump into each other -- surely an accident. A girl and a boy bump and her handkerchief drops -- surely another accident. But when a girl gives a boy a dead squid -- *_t_h_a_t _h_a_d _t_o _m_e_a_n _s_o_m_e_t_h_i_n_g*. - -- S. Morganstern, "The Silent Gondoliers" + -- S. Morgenstern, "The Silent Gondoliers" % A girl with a future avoids the man with a past. -- Evan Esar, "The Humor of Humor" @@ -6847,7 +6854,7 @@ then asks the backhoe operator for direc A GOOD WAY TO THREATEN somebody is to light a stick of dynamite. Then you call the guy and hold the burning fuse to the phone. "Hear that?" you say. "That's dynamite, baby." - -- Jack Handey, The New Mexican, 1988 + -- Jack Handey, "The New Mexican" (1988) % A gossip is one who talks to you about others, a bore is one who talks to you about himself; and a brilliant conversationalist is one who talks to @@ -6867,7 +6874,7 @@ to take it all away. A grammarian's life is always intense. % A great empire, like a great cake, is most easily diminished at the edges. - -- Ben Franklin + -- Benjamin Franklin % A great many people think they are thinking when they are merely rearranging their prejudices. @@ -6883,7 +6890,7 @@ indicating two directions at once. Full bushy black moustache and, at their corners, sank into little folds filled with disapproval and potato chip crumbs. In the shadow under the green visor of the cap Ignatius J. Reilly's supercilious blue and yellow eyes looked down -upon the other people waiting under the clock at the D.H. Holmes department +upon the other people waiting under the clock at the D. H. Holmes department store, studying the crowd of people for signs of bad taste in dress. Several of the outfits, Ignatius noticed, were new enough and expensive enough to be properly considered offenses against taste and decency. Possession of @@ -6981,19 +6988,19 @@ Stormtroopers, who can't hit the broad s -- Tom Galloway % A is for Amy who fell down the stairs, B is for Basil assaulted by bears. -C is for Clair who wasted away, D is for Desmond thrown out of the sleigh. +C is for Clara who wasted away, D is for Desmond thrown out of the sleigh. E is for Ernest who choked on a peach, F is for Fanny, sucked dry by a leech. G is for George, smothered under a rug, H is for Hector, done in by a thug. I is for Ida who drowned in the lake, J is for James who took lye, by mistake. K is for Kate who was struck with an axe, L is for Leo who swallowed some tacks. -M is for Maud who was swept out to sea, N is for Nevil who died of ennui. +M is for Maud who was swept out to sea, N is for Neville who died of ennui. O is for Olive, run through with an awl, P is for Prue, trampled flat in a brawl -Q is for Quinton who sank in a mire, R is for Rhoda, consumed by a fire. -S is for Susan who parished of fits, T is for Titas who flew into bits. +Q is for Quentin who sank in a mire, R is for Rhoda, consumed by a fire. +S is for Susan who parished of fits, T is for Titus who flew into bits. U is for Una who slipped down a drain, V is for Victor, squashed under a train. -W is for Winie, embedded in ice, X is for Xercies, devoured by mice. -Y is for Yoric whose head was bashed in, Z is for Zilla who drank too much gin. - -- Edward Gorey "The Gastly Crumb Tines" +W is for Winnie, embedded in ice, X is for Xerxes, devoured by mice. +Y is for Yorick whose head was bashed in, Z is for Zillah who drank too much gin. + -- Edward Gorey, "The Gashlycrumb Tinies" % A is for Apple. -- Hester Pryne @@ -7077,7 +7084,7 @@ The lady, indignant, removed her ear. % A language that doesn't affect the way you think about programming is not worth knowing. - -- Alan Perlis + -- Alan J. Perlis % A language that doesn't have everything is actually easier to program in than some that do. @@ -7138,7 +7145,7 @@ A lie in time saves nine. % A lie is an abomination unto the Lord and a very present help in time of trouble. - -- Adlai Stevenson + -- Adlai E. Stevenson % A life lived in fear is a life half lived. % @@ -7160,10 +7167,10 @@ And the clean ones so seldom are comical % A LISP programmer knows the value of everything, but the cost of nothing. - -- Alan Perlis + -- Alan J. Perlis % A list is only as strong as its weakest link. - -- Don Knuth + -- Donald E. Knuth % A little experience often upsets a lot of theory. % @@ -7171,7 +7178,7 @@ A little inaccuracy saves a world of exp -- C. E. Ayres % A little inaccuracy sometimes saves tons of explanation. - -- H. H. Munro, "Saki" + -- H. H. Munroe a.k.a. Saki, "The Square Egg" (1924) % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you @@ -7185,7 +7192,7 @@ those software systems that have excited the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and MS-DOS. - -- Fred Brooks + -- Frederick Brooks, Jr. % A little word of doubtful number, A foe to rest and peaceful slumber. @@ -7208,7 +7215,7 @@ A lot of people are afraid of heights. -- Steven Wright % A lot of people I know believe in positive thinking, -and so do I. I believe everything positively stinks. +and so do I. I believe everything positively stinks. -- Lew Col % A lover without indiscretion is no lover at all. @@ -7228,7 +7235,7 @@ a beautiful woman. Somewhere, somebody' % A man always remembers his first love with special tenderness, but after that begins to bunch them. - -- Mencken + -- H. L. Mencken % A man arrived home early to find his wife in the arms of his best friend, who swore how much they were in love. To quiet the enraged husband, the @@ -7288,7 +7295,7 @@ staggers up to the door and confronts th "I'm sorry, sir, ties required." % A man is known by the company he organizes. - -- A. Bierce + -- Ambrose Bierce % A man is like a rusty wheel on a rusty cart, He sings his song as he rattles along and then he falls apart. @@ -7366,7 +7373,7 @@ Tell, me who is buried here?" "My wife's first husband." % A man who cannot seduce men cannot save them either. - -- Soren Kierkegaard + -- S. A. Kierkegaard (1813-1855) % A man who carries a cat by its tail learns something he can learn in no other way. @@ -7444,7 +7451,7 @@ but to protect the writer. % A method of solution is perfect if we can foresee from the start, and even prove, that following that method we shall attain our aim. - -- Leibnitz + -- Gottfried Wilhelm Leibniz % A Mexican newspaper reports that bored Royal Air Force pilots stationed on the Falkland Islands have devised what they consider a marvelous new @@ -7454,28 +7461,24 @@ along it at the water's edge. Perhaps t heads in unison watching the planes go by, and when the pilots turn around and fly back, the birds turn their heads in the opposite direction, like spectators at a slow-motion tennis match. Then, the -paper reports "The pilots fly out to sea and directly to the penguin +paper reports, "The pilots fly out to sea and directly to the penguin colony and overfly it. Heads go up, up, up, and ten thousand penguins fall over gently onto their backs. - -- Audobon Society Magazine - -2001-02-02, from http://news.bbc.co.uk: + -- Audubon Society Magazine -For five weeks, a team from the British Antarctic Survey (BAS) -monitored 1,000 king penguins on the island of South Georgia as -Lynx helicopters passed overhead. - -"Not one king penguin fell over when the helicopters came over," -said team leader Dr Richard Stone. - -"As the aircraft approached, the birds went quiet and stopped +[From the BBC, 2001-02-02: + For five weeks, a team from the British Antarctic Survey (BAS) +monitored 1,000 king penguins on the island of South Georgia as Lynx +helicopters passed overhead. + "Not one king penguin fell over when the helicopters came over," +said team leader Dr. Richard Stone. + "As the aircraft approached, the birds went quiet and stopped calling to each other, and adolescent birds that were not associated with nests began walking away from the noise. Pure animal instinct, really." - -The conclusion, said Dr Stone, is that flights over 305 metres -(1,000 feet) caused "only minor and transitory ecological effects" -on king penguins. + The conclusion, said Dr. Stone, is that flights over 305 metres +(1,000 feet) caused "only minor and transitory ecological effects" on +king penguins.] % A mighty creature is the germ, Though smaller than the pachyderm. @@ -7613,7 +7616,7 @@ A nickel ain't worth a dime anymore. % A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. - -- Mahatma Ghandi + -- Mahatma Gandhi % A novice of the temple once approached the Chief Priest with a question. @@ -7684,12 +7687,12 @@ A person who has something looks at all % A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. - -- Donald Knuth + -- Donald E. Knuth % A pessimist is a man who has been compelled to live with an optimist. -- Elbert Hubbard % -A physicist is an atoms way of knowing about atoms. +A physicist is an atom's way of knowing about atoms. -- George Wald % A pickup with three guys in it pulls into the lumber yard. One of the men @@ -7756,7 +7759,7 @@ paycheck?" % A political man can have as his aim the realization of freedom, but he has no means to realize it other than through violence. - -- Jean Paul Sartre + -- Jean-Paul Sartre % A possum must be himself, and being himself he is honest. -- Walt Kelly @@ -7764,7 +7767,7 @@ A possum must be himself, and being hims A pound of salt will not sweeten a single cup of tea. % A power so great, it can only be used for Good or Evil! - -- Firesign Theatre, "The Giant Rat of Summatra" + -- The Firesign Theatre, "The Giant Rat of Sumatra" % A "practical joker" deserves applause for his wit according to its quality. Bastinado is about right. For exceptional wit one might grant keelhauling. @@ -7777,7 +7780,7 @@ A prediction is worth twenty explanation A pretty foot is one of the greatest gifts of nature... please send me your last pair of shoes, already worn out in dancing... so I can have something of yours to press against my heart. - -- Goethe + -- Johann Wolfgang von Goethe % A pretty woman can do anything; an ugly woman must do everything. % @@ -7831,7 +7834,7 @@ when its programs require attention to t % A prohibitionist is the sort of man one wouldn't care to drink with -- even if he drank. - -- Mencken + -- H. L. Mencken % A prominent broadcaster, on a big-game safari in Africa, was taken to a watering hole where the life of the jungle could be observed. As he @@ -8019,7 +8022,7 @@ die and a new generation grows up that i % A sect or party is an elegant incognito devised to save a man from the vexation of thinking. - -- Ralph Waldo Emerson, Journals, 1831 + -- Ralph Waldo Emerson, "Journals" (1831) % A sense of desolation and uncertainty, of futility, of the baselessness of aspirations, of the vanity of endeavor, and a thirst for a life giving @@ -8197,7 +8200,7 @@ Lord of the Rings LITE(tm) Some guys take a long vacation to throw a ring into a volcano. Hamlet LITE(tm) - -- by Wm. Shakespeare + -- by William Shakespeare A college student on vacation with family problems, a screwy girl-friend and a mother who won't act her age. @@ -8210,7 +8213,7 @@ A Tale of Two Cities LITE(tm) lady who knits. Crime and Punishment LITE(tm) - -- by Fyodor Dostoevski + -- by Fyodor Dostoyevsky A man sends a nasty letter to a pawnbroker, but later *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 20:47:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 994D8106564A; Tue, 13 Apr 2010 20:47:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85D288FC1C; Tue, 13 Apr 2010 20:47: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 o3DKlDso060620; Tue, 13 Apr 2010 20:47:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKlB2l060616; Tue, 13 Apr 2010 20:47:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004132047.o3DKlB2l060616@svn.freebsd.org> From: Doug Barton Date: Tue, 13 Apr 2010 20:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206567 - in stable/7/games/fortune: . datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:47:13 -0000 Author: dougb Date: Tue Apr 13 20:47:11 2010 New Revision: 206567 URL: http://svn.freebsd.org/changeset/base/206567 Log: MFC r205995: Massive cleanup and synchronization with other *BSDs Modified: stable/7/games/fortune/Notes stable/7/games/fortune/datfiles/fortunes stable/7/games/fortune/datfiles/fortunes-o.real stable/7/games/fortune/datfiles/fortunes.sp.ok stable/7/games/fortune/datfiles/limerick stable/7/games/fortune/datfiles/startrek stable/7/games/fortune/datfiles/zippy Directory Properties: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) Modified: stable/7/games/fortune/Notes ============================================================================== --- stable/7/games/fortune/Notes Tue Apr 13 20:44:16 2010 (r206566) +++ stable/7/games/fortune/Notes Tue Apr 13 20:47:11 2010 (r206567) @@ -19,13 +19,13 @@ Warning: /usr/share/games/fortune. A fortune file has two parts: the source file (which contains the fortunes themselves) and the data file which describes the fortunes. The data file always has the same name as the fortune file -with the string ".dat" concatenated, i.e. "fort" is the standard fortune -database, and "fort.dat" is the data file which describes it. See +with the string ".dat" concatenated, i.e. "fortunes" is the standard fortune +database, and "fortunes.dat" is the data file which describes it. See strfile(8) for more information on creating the data files. Fortunes are split into potentially offensive and not potentially offensive parts. The offensive version of a file has the same name as the -non-offensive version with "-o" concatenated, i.e. "fort" is the standard -fortune database, and "fort-o" is the standard offensive database. The +non-offensive version with "-o" concatenated, i.e. "fortunes" is the standard +fortune database, and "fortunes-o" is the standard offensive database. The fortune program automatically assumes that any file with a name ending in "-o" is potentially offensive, and should therefore only be displayed if explicitly requested, either with the -o option or by specifying a file name @@ -42,10 +42,10 @@ MUST be in the potentially offensive dat explicit language (see George Carlin's recent updated list) MUST be in the potentially offensive database. Political and religious opinions are often sequestered in the potentially offensive section as well. Anything which -assumes as a world view blatantly racist, mysogynist (sexist), or homophobic +assumes as a world view blatantly racist, misogynist (sexist), or homophobic ideas should not be in either, since they are not really funny unless *you* -are racist, mysogynist, or homophobic. - The point of this is that people have should have a reasonable +are racist, misogynist, or homophobic. + The point of this is that people should have a reasonable expectation that, should they just run "fortune", they will not be offended. We know that some people take offense at anything, but normal people do have opinions, too, and have a right not to have their sensibilities offended by @@ -53,7 +53,7 @@ a program which is supposed to be entert -o" or "fortune -a" are saying, in effect, that they are willing to have their sensibilities tweaked. However, they should not have their personal worth seriously (i.e., not in jest) assaulted. Jokes which depend for their -humor on racist, mysogynist, or homophobic stereotypes *do* seriously +humor on racist, misogynist, or homophobic stereotypes *do* seriously assault individual personal worth, and in a general entertainment medium we should be able to get by without it. Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Tue Apr 13 20:44:16 2010 (r206566) +++ stable/7/games/fortune/datfiles/fortunes Tue Apr 13 20:47:11 2010 (r206567) @@ -368,8 +368,10 @@ OR'd together, outta sight! Double bucky, I'd like a whole word of Double bucky, I'm happy I heard of Double bucky, I'd like a whole word of you! - - -- (C) 1978 by Guy L. Steele, Jr. + -- Guy L. Steele, Jr., (C) 1978 + (to Nicholas Wirth, who suggested that an extra bit + be added to terminal codes on 36-bit machines for use + by screen editors.) % Hard Copies and Chmod @@ -834,7 +836,7 @@ would like on it. "Here lies an honest lawyer. "Sorry, but I can't do that," replied the stonecutter. "In this state, it's against the law to bury two people in the same grave. However, -I could put ``here lies an honest lawyer'', if that would be okay." +I could put `here lies an honest lawyer', if that would be okay." "But that won't let people know who it is" protested the lawyer. "Certainly will," retorted the stonecutter. "people will read it and exclaim, "That's Strange!" @@ -1146,7 +1148,7 @@ strings of pearls. The spirit and inten throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity. - A program should follow the 'Law of Least Astonishment'. What is this + A program should follow the "Law of Least Astonishment." What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program, no matter how complex, should act as a single unit. The @@ -1161,7 +1163,7 @@ program. conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their -clothes were wrinkled and old. They crashed out hospitality suites and they +clothes were wrinkled and old. They crashed our hospitality suites and they made rude noises during my presentation." The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, @@ -1466,7 +1468,7 @@ generalizable. The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile". - -- Frederick Brooks, "The Mythical Man Month" + -- Frederick Brooks, Jr., "The Mythical Man-Month" % An eighty-year-old woman is rocking away the afternoon on her porch when she sees an old, tarnished lamp sitting near the steps. She @@ -1513,7 +1515,7 @@ over canoe frames, for my people need tr and we offer you a chance to kill yourself with our ceremonial knife." The Englishman accepts the knife and yells, "God Save the Queen", while plunging the knife into his heart. - The Frenchman removes the knife from the fallen body, and yells, + The Frenchman removes the knife from the fallen body, and yells, "Vive la France", while plunging the knife into his heart. The American removes the knife from the fallen body, and yells, while stabbing himself all over his body, "Here's your lousy canoe!" @@ -1562,7 +1564,7 @@ a postcard?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." "That was the curious incident." - -- A. Conan Doyle, "Silver Blaze" + -- Sir Arthur Conan Doyle, "Silver Blaze" % Approaching the gates of the monastery, Hakuin found Ken the Zen preaching to a group of disciples. @@ -1609,8 +1611,8 @@ Los Angeles fainted from hyperoxygenatio under the exhaust of a bus until he revived. % Before he became a hermit, Zarathud was a young Priest, and - took great delight in making fools of his opponents in front of -his followers. +took great delight in making fools of his opponents in front of his +followers. One day Zarathud took his students to a pleasant pasture and there he confronted The Sacred Chao while She was contentedly grazing. "Tell me, you dumb beast," demanded the Priest in his @@ -1626,7 +1628,7 @@ Chinese ideogram for NO-THING.) and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - -- Kurt Vonnegut, "Cat's Cradle" + -- Kurt Vonnegut, Jr., "Cat's Cradle" % Bubba, Jim Bob, and Leroy were fishing out on the lake last November, and, when Bubba tipped his head back to empty the Jim Beam, he fell out of the @@ -1694,7 +1696,7 @@ way I ought to go from here?" the Cat. "I don't care much where--" said Alice. "Then it doesn't matter which way you go," said the Cat. - -- Lewis Carroll + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more @@ -1877,7 +1879,7 @@ how to be excellent: "In Search of Excel So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" % - Exxon's 'Universe of Energy' tends to the peculiar rather than the + Exxon's "Universe of Energy" tends to the peculiar rather than the humorous ... After [an incomprehensible film montage about wind and sun and rain and strip mines and] two or three minutes of mechanical confusion, the seats locomote through a short tunnel filled with clock-work dinosaurs. @@ -1923,9 +1925,9 @@ of events, there lurks a singular, sinis "MINE! HA-HA!" % "Found it," the Mouse replied rather crossly: -"of course you know what 'it' means." +"of course you know what `it' means." - "I know what 'it' means well enough, when I find a thing," + "I know what `it' means well enough, when I find a thing," said the Duck: "it's generally a frog or a worm. The question is, what did the archbishop find?" @@ -1937,15 +1939,15 @@ such as a "pride of lions" or a "gaggle One of the professors noticed a group of prostitutes down the block, and posed the question, "What name would be given to that group?" The four fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about 'a Jam of Tarts'?" The others nodded + At last, one spoke: "How about `a Jam of Tarts'?" The others nodded in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest 'an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose 'a Flourish of Strumpets.'" +professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others +nodded. A third spoke: "I propose `a Flourish of Strumpets.'" They continued their walk in silence, until the first professor remarked to the remaining professor, who was the most senior and learned of the four, "You haven't suggested a name for our ladies. What are your thoughts?" - Replied the fourth professor, "'An Anthology of Prose.'" + Replied the fourth professor, "`An Anthology of Prose.'" % Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" @@ -1958,12 +1960,11 @@ and sarcastic?" "Of course not," said a sympathetic friend. "Well," retorted Frank, "neither would Jennifer." % - "Gee, Mudhead, everyone at More Science High has an + "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." - - -- Firesign Theater + -- The Firesign Theatre % "Gentlemen of the jury," said the defense attorney, now beginning to warm to his summation, "the real question here before you is, shall this @@ -2261,7 +2262,7 @@ each other up: the floor.) S-word. Excuse me. Look, Bob, I'm going to have to get back to you. Bob: Fine. - -- Dave Barry + -- Dave Barry, "$#$%#^%!^%&@%@!" % "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't -- @@ -2276,7 +2277,9 @@ less." so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." - -- Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For @@ -2328,7 +2331,7 @@ operation - namely, to remove those irri "And then he will be sane?" "Then he will be perfectly sane, and a quite admirable citizen." "Thank heaven for science!" said old Yacob. - -- H.G. Wells, "The Country of the Blind" + -- H. G. Wells, "The Country of the Blind" % "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" @@ -2403,7 +2406,7 @@ more simply -- `Never imagine yourself n might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" - -- Lewis Carroll, "Alice in Wonderland" + -- Lewis Carroll, "Alice's Adventures in Wonderland" (1865) % I said, "Preacher, give me strength for round 5." He said, "What you need is to grow up, son." @@ -2567,7 +2570,7 @@ man. Mud-as-man alone could speak. "Certainly," said man. "Then I leave it to you to think of one for all of this," said God. And He went away. - -- Kurt Vonnegut, "Between Time and Timbuktu" + -- Kurt Vonnegut, Jr., "Between Time and Timbuktu" % In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of @@ -2815,7 +2818,7 @@ guzzled in one gulp and then smashed on the man stuffed the broken bottle in his mouth, munched broken glass and smacked his lips with relish. "Can I, ah, uh, get you another, sir?" the drifter stammered. - "Naw, I gotta git outa here, boy," the man grunted. "Big Mike's + "Naw, I gotta git outta here, boy," the man grunted. "Big Mike's a-comin'." % Love's Drug @@ -3002,7 +3005,7 @@ confirm who I am. -- Captain Freedom % Old Barlow was a crossing-tender at a junction where an express train -demolished an automobile and it's occupants. Being the chief witness, his +demolished an automobile and its occupants. Being the chief witness, his testimony was vitally important. Barlow explained that the night was dark, and he waved his lantern frantically, but the driver of the car paid no attention to the signal. @@ -3072,7 +3075,7 @@ and it was very juicy. I stood up and t when my mother at the kitchen window called my name in a sharp voice. I had to decide quickly. I decided. A rotten Big Boy hitting the target is a memorable sound, like a fat -man doing a belly-flop. With a whoop and a yell the tomatoe came after +man doing a belly-flop. With a whoop and a yell the tomatoee came after me faster than I knew she could run, and grabbed my shirt and was about to brain me when Mother called her name in a sharp voice. And my sister, who was a good person, obeyed and let go -- and burst into tears. I guess she knew that @@ -3164,7 +3167,7 @@ biggest, strongest fish he had ever caug until, finally, he managed to bring it to the surface. Looking of the edge of the boat, he saw the head of this huge fish breaking the surface. Smiling with pride, he reached over the edge to pull the fish up. Unfortunately, he -accidently caught his watch on the edge, and, before he knew it, there was a +accidentally caught his watch on the edge, and, before he knew it, there was a snap, and his watch tumbled into the water next to the fish with a loud "sploosh!" Distracted by this shiny object, the fish made a sudden lunge, simultaneously snapping the line, and swallowing the watch. Sadly, the @@ -3539,12 +3542,14 @@ know." "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said 'Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. - "Too proud?" the other enquired. + "Too proud?" the other enquired. Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." - -- Lewis Carroll, "Through the Looking-Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % Several students were asked to prove that all odd integers are prime. The first student to try to do this was a math student. "Hmmm... @@ -3732,7 +3737,7 @@ she'd been she said she'd spent the nigh % "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." - -- e.e. cummings last service call + -- e. e. cummings last service call % "The best thing for being sad," replied Merlin, beginning to puff and blow, "is to learn something. That's the only thing that never fails. @@ -3907,7 +3912,7 @@ married! You're a sadist, that's what!" THE LESSER-KNOWN PROGRAMMING LANGUAGES #2: RENE Named after the famous French philosopher and mathematician Rene -DesCartes, RENE is a language used for artificial intelligence. The +Descartes, RENE is a language used for artificial intelligence. The language is being developed at the Chicago Center of Machine Politics and Programming under a grant from the Jane Byrne Victory Fund. A spokesman described the language as "Just as great as dis [sic] city of @@ -4030,7 +4035,9 @@ called 'Ways and Means': but that's onl time completely bewildered. "I was coming to that," the Knight said. "The song really is "A-sitting on a Gate": and the tune's my own invention." - --Lewis Carroll, "Through the Looking Glass" + -- Lewis Carroll, + "Through the Looking-Glass, + and What Alice Found There" (1871) % The only real game in the world, I think, is baseball... You've got to start way down, at the bottom, when you're six or seven years @@ -4065,7 +4072,8 @@ blocks of wood. Opaque, like black pool "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" - -- Firesign Theater, "How Can You Be In Two Places At + -- The Firesign Theatre, + "How Can You Be In Two Places At Once When You're Not Anywhere At All" % The salesman and the system analyst took off to spend a weekend in the @@ -4157,8 +4165,8 @@ make sure that they are Earthlings. The when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! -THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! -TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD +THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! +TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. Before they go to bust a bookie joint they mortar it first. -- M. Christensen, "A Portland Innocent in LA" @@ -4270,7 +4278,7 @@ you the Widow Miffin?" a small boy asked "Oh, no?" replied the little boy. "Wait 'til you see what they're carrying upstairs!" % - There was a mad scientist (a mad... social... scientist) who kidnaped + There was a mad scientist (a mad... social... scientist) who kidnapped three colleagues, an engineer, a physicist, and a mathematician, and locked each of them in separate cells with plenty of canned food and water but no can opener. @@ -4282,13 +4290,13 @@ and escaped. off the tin cans by throwing them against the wall. She was developing a good pitching arm and a new quantum theory. The mathematician had stacked the unopened cans into a surprising -solution to the kissing problem; his dessicated corpse was propped calmly +solution to the kissing problem; his desiccated corpse was propped calmly against a wall, and this was inscribed on the floor: Theorem: If I can't open these cans, I'll die. Proof: assume the opposite... % There was once a programmer who was attached to the court of the -warlord Wu. The warlord asked the programmer: "Which is easier to design: +warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. The warlord uttered an exclamation of disbelief. "Surely an @@ -4328,7 +4336,7 @@ demands from him more than his utmost st sinew and brain and hope and fear and dreams -- and still calls for more. They are fools that think otherwise. No great effort was ever bought. No painting, no music, no poem, no cathedral in stone, no church, no state was -ever raised into being for payment of any kind. No parthenon, no Thermopylae +ever raised into being for payment of any kind. No Parthenon, no Thermopylae was ever built or fought for pay or glory; no Bukhara sacked, or China ground beneath Mongol heel, for loot or power alone. The payment for doing these things was itself the doing of them. @@ -4393,14 +4401,14 @@ be as easily led to beauty as to uglines relations, to joy as to bitterness, be said to be suffering from Hunter Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. - -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt + -- Kurt Vonnegut, Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" % - To A Quick Young Fox + To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? -Guy fed by work, quiz Jove's xanthic lamp-- +Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog % @@ -4565,7 +4573,7 @@ let him lie there all night." "Don't worry about that. They have a guard station in front of the White House that's open 24 hours a day. The guards would recognize Colson... and by that time of course his wife would have called the cops and reported -that a bunch of thugs had kidnaped him." +that a bunch of thugs had kidnapped him." "Wouldn't it be a little kinder if you drove about four more blocks and stopped at a phone box to ring the hospital and say, 'Would you mind going around to the front of the White House? There's a naked man lying outside @@ -4574,7 +4582,7 @@ in the street, bleeding to death...'" "It would be quite a story for the newspapers, wouldn't it?" "Yeah, I think it's safe to say we'd see some headlines on that one." -- Hunter S. Thompson, talking to R. Steadman on C. Colson, - ex-Marine captain, now born again, of Watergate fame. + ex-Marine captain, now born again, of Watergate fame. % "Well, it's garish, ugly, and derelicts have used it for a toilet. The rides are dilapidated to the point of being lethal, and could easily @@ -4593,7 +4601,7 @@ an End-user of Very Little Brain, and lo "Well, that was a piece of cake, eh K-9?" "Piece of cake, Master? Radial slice of baked confection ... coefficient of relevance to Key of Time: zero." - -- Dr. Who + -- "Doctor Who" % "We're running out of adjectives to describe our situation. We had crisis, then we went into chaos, and now what do we call this?" said @@ -4691,7 +4699,7 @@ ever happened to me... the most dreadful "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." - -- Jeff MacNelley, "Shoe" + -- Jeff MacNelly, "Shoe" % "When I drink, *everybody* drinks!" a man shouted to the assembled bar patrons. A loud general cheer went up. After downing his @@ -4860,14 +4868,14 @@ There, that ought to patch it. Dist it "The famous scientific criminal, as famous among crooks as --" "My blushes, Watson," Holmes murmured, in a deprecating voice. "I was about to say 'as he is unknown to the public.'" - -- A. Conan Doyle, "The Valley of Fear" + -- Sir Arthur Conan Doyle, "The Valley of Fear" % "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" - "I don't know, I didn't listen." + "I don't know, I didn't listen!" -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % "You mean, if you allow the master to be uncivil, to treat you @@ -5076,7 +5084,7 @@ please communicate them by one of the fo ARPA: WastebasketSLMHQ.ARPA UUCP: [berkeley, seismo, harpo]!fubar!thekid!slmhq!wastebasket - Non-network sites: Federal Express to: + Non-network sites: Federal Express to: Wastebasket Room NE43-926 Copernicus, The Moon, 12345-6789 @@ -5223,7 +5231,7 @@ III. Any body passing through solid matt 8. Babes in Boyland 9. Santa's Magic Lap 10. Hot Buttered Elves - -- David Letterman's "Top Ten Christmas Movies in Times + -- David Letterman, "Top Ten Christmas Movies in Times Square" % ... A booming voice says, "Wrong, cretin!", and you notice that you @@ -5337,7 +5345,7 @@ other's private parts. ... computer hardware progress is so fast. No other technology since civilization began has seen six orders of magnitude in performance-price gain in 30 years. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... [concerning quotation marks] even if we *_d_i_d* quote anybody in this business, it probably would be gibberish. @@ -5350,8 +5358,6 @@ introduction of Christianity, have been yet we have not advanced one inch towards uniformity. -- Thomas Jefferson, "Notes on Virginia" % - Eat drink and be merry, for tomorrow they may make it illegal. -% <<<<< EVACUATION ROUTE <<<<< % ... "fire" does not matter, "earth" and "air" and "water" do not matter. @@ -5440,14 +5446,14 @@ legally ... impeccable! -- Individuals who make their abode in vitreous edifices would be well advised to refrain from catapulting projectiles. -- Neophyte's serendipity. --- Exclusive dedication to necessitious chores without interludes of hedonistic +-- Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders John a hebetudinous fellow. -- A revolving concretion of earthy or mineral matter accumulates no congeries of small, green bryophytic plant. -- Abstention from any aleatory undertaking precludes a potential escalation of a lucrative nature. -- Missiles of ligneous or osteal consistency have the potential of fracturing - osseous structure, but appelations will eternally remain innocuous. + osseous structure, but appellations will eternally remain innocuous. % ** MAXIMUM TERMINALS ACTIVE. TRY AGAIN LATER ** % @@ -5492,7 +5498,7 @@ their C programs. -- Robert Firth % ... Our second completely true news item was sent to me by Mr. H. Boyce -Connell Jr. of Atlanta, Ga., where he is involved in a law firm. One +Connell, Jr. of Atlanta, Ga., where he is involved in a law firm. One thing I like about the South is, folks there care about tradition. If somebody gets handed a name like "H. Boyce," he hangs on to it, puts it on his legal stationery, even passes it to his son, rather than do what @@ -5519,7 +5525,7 @@ awareness of the great goals for Man and galled saucepan does not reach 212 degrees Fahrenheit. % ... so long as the people do not care to exercise their freedom, those -who wish to tyrranize will do so; for tyrants are active and ardent, +who wish to tyrannize will do so; for tyrants are active and ardent, and will devote themselves in the name of any number of gods, religious and otherwise, to put shackles upon sleeping men. -- Voltarine de Cleyre @@ -5596,13 +5602,13 @@ cleanersayingIllgetyoumyprettyandyourlit % ... this is an awesome sight. The entire rebel resistance buried under six million hardbound copies of "The Naked Lunch." - -- The Firesign Theater + -- The Firesign Theatre % ... though his invention worked superbly -- his theory was a crock of sewage from beginning to end. -- Vernor Vinge, "The Peace War" % - U X + U X e dUdX, e dX, cosine, secant, tangent, sine, 3.14159... % * UNIX is a Trademark of Bell Laboratories. @@ -5647,7 +5653,7 @@ into doubt. % ... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - -- Fred Brooks + -- Frederick Brooks, Jr. % ... which reminds me of the Carrot family: Ma Carrot, Pa Carrot, and Baby Carrot. One fine spring day they decided to go out for a picnic. They all @@ -5708,20 +5714,20 @@ QED: A sheet of paper is a lazy dog. 10. The city does not employ so called "Wallet Inspectors". -- David Letterman, "Top Ten New York City Pedestrian Tips" % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. % -[1] Alexander the Great was a great general. -[2] Great generals are forewarned. -[3] Forewarned is forearmed. -[4] Four is an even number. -[5] Four is certainly an odd number of arms for a man to have. -[6] The only number that is both even and odd is infinity. +(1) Alexander the Great was a great general. +(2) Great generals are forewarned. +(3) Forewarned is forearmed. +(4) Four is an even number. +(5) Four is certainly an odd number of arms for a man to have. +(6) The only number that is both even and odd is infinity. Therefore, all horses are black. % 1. Avoid fried meats which angry up the blood. @@ -5792,7 +5798,7 @@ you have to (always catch the buyer hung 2. I, David Letterman, will never rent out my farm again. 1. We are stardust. We are golden. We are going to look really stupid to future generations. - -- David Letterman, Top Ten Lessons of Woodstock + -- David Letterman, "Top Ten Lessons of Woodstock" % 10 Reasons Why a Beer is Better Than a Woman: @@ -5801,8 +5807,8 @@ you have to (always catch the buyer hung 3. A beer doesn't think baseball is stupid simply because the guys spit. 4. A beer doesn't give a [expletive deleted] if you keep a bunch of other beers on the side. - 5. A beer will not call you a sexist pig if you say "doberman" instead of - "doberperson". + 5. A beer will not call you a sexist pig if you say "Doberman" instead of + "Doberperson." 6. A beer won't get a job as a DJ and play 5 straight hours of lesbian folk music on yer fave radio station. 7. A beer understands why The Three Stooges are funny. @@ -5820,7 +5826,7 @@ FF buckets of bits on the bus FF buckets of bits on the bus FF buckets of bits Take one down, short it to ground -FE buckets of bits on the bus... +FE buckets of bits on the bus ad infinitum... % @@ -5932,13 +5938,13 @@ It isn't just a good idea, it's the law! What 20th Century U.S. President was almost impeached and what office did he later hold? % -3 syncs represent the trinity - init, the child and the eternal zombie +3 syncs represent the trinity -- init, the child and the eternal zombie process. In doing 3, you're paying homage to each and I think such traditions are important in this shallow, mercurial business we find ourselves in. -- Jordan K. Hubbard % -$3,000,000. +$3,000,000 % 355/113 -- Not the famous irrational number PI, but an incredible simulation. @@ -6050,7 +6056,7 @@ A beautiful woman is a blessing from Hea -- Kipling % A beautiful woman is a picture which drives all beholders nobly mad. - -- Emerson + -- Ralph Waldo Emerson % A beer delayed is a beer denied. % @@ -6067,7 +6073,7 @@ A billion hours ago man had not yet walk A billion dollars ago was late yesterday afternoon at the U.S. Treasury. % A biologist, a statistician, a mathematician and a computer scientist are on -a photo-safari in Africa. As they're driving along the savanna in their +a photo-safari in Africa. As they're driving along the savannah in their jeep, they stop and scout the horizon with their binoculars. The biologist: "Look! A herd of zebras! And there's a white zebra! @@ -6203,7 +6209,7 @@ invariably sat silent. The monk had alr and a moonlit night. One day he brought to Tortue a piece of string, and asked the same question. In reply, the Grand Tortue grasped the loop between his feet and, with a few simple manipulations, created a complex -string which he proferred wordlessly to the monk. At that moment, the monk +string which he proffered wordlessly to the monk. At that moment, the monk was enlightened. From then on, the monk did not bother Tortue. Instead, he made string after @@ -6261,9 +6267,10 @@ A city is a large community where people % A clash of doctrine is not a disaster - it is an opportunity. % -A classic is something that everyone wants to have read +A classic is something that everybody wants to have read and nobody wants to read. - -- Mark Twain, "The Disappearance of Literature" + -- Mark Twain quoting Professor Winchester, + "The Disappearance of Literature" % A clever prophet makes sure of the event first. % @@ -6438,7 +6445,7 @@ damned things is ample. A couch is as good as a chair. % A countryman between two lawyers is like a fish between two cats. - -- Ben Franklin + -- Benjamin Franklin % A couple of young fellers were fishing at their special pond off the beaten track when out of the bushes jumped the Game Warden. Immediately, @@ -6535,7 +6542,7 @@ A diplomatic husband said to his wife, " your birthday when you never look any older?" % A diplomat's life consists of three things: protocol, Geritol, and alcohol. - -- Adlai Stevenson + -- Adlai E. Stevenson % A distraught patient phoned her doctor's office. "Was it true," the woman inquired, "that the medication the doctor had prescribed was for the rest @@ -6544,7 +6551,7 @@ of her life?" the woman proceeded bravely on. "Well, I'm wondering, then, how serious my condition is. This prescription is marked `NO REFILLS'". % -A diva who specializes in risque arias is an off-coloratura soprano. +A diva who specializes in risqu'e arias is an off-coloratura soprano. % A doctor calls his patient to give him the results of his tests. "I have some bad news," says the doctor, "and some worse news." The bad news is @@ -6708,7 +6715,7 @@ dimension strictly exceeds the topologic -- Mandelbrot, "The Fractal Geometry of Nature" % A free society is one where it is safe to be unpopular. - -- Adlai Stevenson + -- Adlai E. Stevenson % A freelancer is one who gets paid by the word -- per piece or perhaps. -- Robert Benchley @@ -6728,11 +6735,11 @@ lawyers more than he hates his wife. A friend with weed is a friend indeed. % A full belly makes a dull brain. - -- Ben Franklin + -- Benjamin Franklin [and the local candy machine man. Ed] % -A 'full' life in my experience is usually full only of other +A "full" life in my experience is usually full only of other people's demands. % A furore Normanorum libera nos, O Domine! @@ -6782,7 +6789,7 @@ A gift of a flower will soon be made to A girl and a boy bump into each other -- surely an accident. A girl and a boy bump and her handkerchief drops -- surely another accident. But when a girl gives a boy a dead squid -- *_t_h_a_t _h_a_d _t_o _m_e_a_n _s_o_m_e_t_h_i_n_g*. - -- S. Morganstern, "The Silent Gondoliers" + -- S. Morgenstern, "The Silent Gondoliers" % A girl with a future avoids the man with a past. -- Evan Esar, "The Humor of Humor" @@ -6847,7 +6854,7 @@ then asks the backhoe operator for direc A GOOD WAY TO THREATEN somebody is to light a stick of dynamite. Then you call the guy and hold the burning fuse to the phone. "Hear that?" you say. "That's dynamite, baby." - -- Jack Handey, The New Mexican, 1988 + -- Jack Handey, "The New Mexican" (1988) % A gossip is one who talks to you about others, a bore is one who talks to you about himself; and a brilliant conversationalist is one who talks to @@ -6867,7 +6874,7 @@ to take it all away. A grammarian's life is always intense. % A great empire, like a great cake, is most easily diminished at the edges. - -- Ben Franklin + -- Benjamin Franklin % A great many people think they are thinking when they are merely rearranging their prejudices. @@ -6883,7 +6890,7 @@ indicating two directions at once. Full bushy black moustache and, at their corners, sank into little folds filled with disapproval and potato chip crumbs. In the shadow under the green visor of the cap Ignatius J. Reilly's supercilious blue and yellow eyes looked down -upon the other people waiting under the clock at the D.H. Holmes department +upon the other people waiting under the clock at the D. H. Holmes department store, studying the crowd of people for signs of bad taste in dress. Several of the outfits, Ignatius noticed, were new enough and expensive enough to be properly considered offenses against taste and decency. Possession of @@ -6981,19 +6988,19 @@ Stormtroopers, who can't hit the broad s -- Tom Galloway % A is for Amy who fell down the stairs, B is for Basil assaulted by bears. -C is for Clair who wasted away, D is for Desmond thrown out of the sleigh. +C is for Clara who wasted away, D is for Desmond thrown out of the sleigh. E is for Ernest who choked on a peach, F is for Fanny, sucked dry by a leech. G is for George, smothered under a rug, H is for Hector, done in by a thug. I is for Ida who drowned in the lake, J is for James who took lye, by mistake. K is for Kate who was struck with an axe, L is for Leo who swallowed some tacks. -M is for Maud who was swept out to sea, N is for Nevil who died of ennui. +M is for Maud who was swept out to sea, N is for Neville who died of ennui. O is for Olive, run through with an awl, P is for Prue, trampled flat in a brawl -Q is for Quinton who sank in a mire, R is for Rhoda, consumed by a fire. -S is for Susan who parished of fits, T is for Titas who flew into bits. +Q is for Quentin who sank in a mire, R is for Rhoda, consumed by a fire. +S is for Susan who parished of fits, T is for Titus who flew into bits. U is for Una who slipped down a drain, V is for Victor, squashed under a train. -W is for Winie, embedded in ice, X is for Xercies, devoured by mice. -Y is for Yoric whose head was bashed in, Z is for Zilla who drank too much gin. - -- Edward Gorey "The Gastly Crumb Tines" +W is for Winnie, embedded in ice, X is for Xerxes, devoured by mice. +Y is for Yorick whose head was bashed in, Z is for Zillah who drank too much gin. + -- Edward Gorey, "The Gashlycrumb Tinies" % A is for Apple. -- Hester Pryne @@ -7077,7 +7084,7 @@ The lady, indignant, removed her ear. % A language that doesn't affect the way you think about programming is not worth knowing. - -- Alan Perlis + -- Alan J. Perlis % A language that doesn't have everything is actually easier to program in than some that do. @@ -7138,7 +7145,7 @@ A lie in time saves nine. % A lie is an abomination unto the Lord and a very present help in time of trouble. - -- Adlai Stevenson + -- Adlai E. Stevenson % A life lived in fear is a life half lived. % @@ -7160,10 +7167,10 @@ And the clean ones so seldom are comical % A LISP programmer knows the value of everything, but the cost of nothing. - -- Alan Perlis + -- Alan J. Perlis % A list is only as strong as its weakest link. - -- Don Knuth + -- Donald E. Knuth % A little experience often upsets a lot of theory. % @@ -7171,7 +7178,7 @@ A little inaccuracy saves a world of exp -- C. E. Ayres % A little inaccuracy sometimes saves tons of explanation. - -- H. H. Munro, "Saki" + -- H. H. Munroe a.k.a. Saki, "The Square Egg" (1924) % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you @@ -7185,7 +7192,7 @@ those software systems that have excited the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and MS-DOS. - -- Fred Brooks + -- Frederick Brooks, Jr. % A little word of doubtful number, A foe to rest and peaceful slumber. @@ -7208,7 +7215,7 @@ A lot of people are afraid of heights. -- Steven Wright % A lot of people I know believe in positive thinking, -and so do I. I believe everything positively stinks. +and so do I. I believe everything positively stinks. -- Lew Col % A lover without indiscretion is no lover at all. @@ -7228,7 +7235,7 @@ a beautiful woman. Somewhere, somebody' % A man always remembers his first love with special tenderness, but after that begins to bunch them. - -- Mencken + -- H. L. Mencken % A man arrived home early to find his wife in the arms of his best friend, who swore how much they were in love. To quiet the enraged husband, the @@ -7288,7 +7295,7 @@ staggers up to the door and confronts th "I'm sorry, sir, ties required." % A man is known by the company he organizes. - -- A. Bierce + -- Ambrose Bierce % A man is like a rusty wheel on a rusty cart, He sings his song as he rattles along and then he falls apart. @@ -7366,7 +7373,7 @@ Tell, me who is buried here?" "My wife's first husband." % A man who cannot seduce men cannot save them either. - -- Soren Kierkegaard + -- S. A. Kierkegaard (1813-1855) % A man who carries a cat by its tail learns something he can learn in no other way. @@ -7444,7 +7451,7 @@ but to protect the writer. % A method of solution is perfect if we can foresee from the start, and even prove, that following that method we shall attain our aim. - -- Leibnitz + -- Gottfried Wilhelm Leibniz % A Mexican newspaper reports that bored Royal Air Force pilots stationed on the Falkland Islands have devised what they consider a marvelous new @@ -7454,28 +7461,24 @@ along it at the water's edge. Perhaps t heads in unison watching the planes go by, and when the pilots turn around and fly back, the birds turn their heads in the opposite direction, like spectators at a slow-motion tennis match. Then, the -paper reports "The pilots fly out to sea and directly to the penguin +paper reports, "The pilots fly out to sea and directly to the penguin colony and overfly it. Heads go up, up, up, and ten thousand penguins fall over gently onto their backs. - -- Audobon Society Magazine - -2001-02-02, from http://news.bbc.co.uk: + -- Audubon Society Magazine -For five weeks, a team from the British Antarctic Survey (BAS) -monitored 1,000 king penguins on the island of South Georgia as -Lynx helicopters passed overhead. - -"Not one king penguin fell over when the helicopters came over," -said team leader Dr Richard Stone. - -"As the aircraft approached, the birds went quiet and stopped +[From the BBC, 2001-02-02: + For five weeks, a team from the British Antarctic Survey (BAS) +monitored 1,000 king penguins on the island of South Georgia as Lynx +helicopters passed overhead. + "Not one king penguin fell over when the helicopters came over," +said team leader Dr. Richard Stone. + "As the aircraft approached, the birds went quiet and stopped calling to each other, and adolescent birds that were not associated with nests began walking away from the noise. Pure animal instinct, really." - -The conclusion, said Dr Stone, is that flights over 305 metres -(1,000 feet) caused "only minor and transitory ecological effects" -on king penguins. + The conclusion, said Dr. Stone, is that flights over 305 metres +(1,000 feet) caused "only minor and transitory ecological effects" on +king penguins.] % A mighty creature is the germ, Though smaller than the pachyderm. @@ -7613,7 +7616,7 @@ A nickel ain't worth a dime anymore. % A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. - -- Mahatma Ghandi + -- Mahatma Gandhi % A novice of the temple once approached the Chief Priest with a question. @@ -7684,12 +7687,12 @@ A person who has something looks at all % A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of a computer. - -- Donald Knuth + -- Donald E. Knuth % A pessimist is a man who has been compelled to live with an optimist. -- Elbert Hubbard % -A physicist is an atoms way of knowing about atoms. +A physicist is an atom's way of knowing about atoms. -- George Wald % A pickup with three guys in it pulls into the lumber yard. One of the men @@ -7756,7 +7759,7 @@ paycheck?" % A political man can have as his aim the realization of freedom, but he has no means to realize it other than through violence. - -- Jean Paul Sartre + -- Jean-Paul Sartre % A possum must be himself, and being himself he is honest. -- Walt Kelly @@ -7764,7 +7767,7 @@ A possum must be himself, and being hims A pound of salt will not sweeten a single cup of tea. % A power so great, it can only be used for Good or Evil! - -- Firesign Theatre, "The Giant Rat of Summatra" + -- The Firesign Theatre, "The Giant Rat of Sumatra" % A "practical joker" deserves applause for his wit according to its quality. Bastinado is about right. For exceptional wit one might grant keelhauling. @@ -7777,7 +7780,7 @@ A prediction is worth twenty explanation A pretty foot is one of the greatest gifts of nature... please send me your last pair of shoes, already worn out in dancing... so I can have something of yours to press against my heart. - -- Goethe + -- Johann Wolfgang von Goethe % A pretty woman can do anything; an ugly woman must do everything. % @@ -7831,7 +7834,7 @@ when its programs require attention to t % A prohibitionist is the sort of man one wouldn't care to drink with -- even if he drank. - -- Mencken + -- H. L. Mencken % A prominent broadcaster, on a big-game safari in Africa, was taken to a watering hole where the life of the jungle could be observed. As he @@ -8019,7 +8022,7 @@ die and a new generation grows up that i % A sect or party is an elegant incognito devised to save a man from the vexation of thinking. - -- Ralph Waldo Emerson, Journals, 1831 + -- Ralph Waldo Emerson, "Journals" (1831) % A sense of desolation and uncertainty, of futility, of the baselessness of aspirations, of the vanity of endeavor, and a thirst for a life giving @@ -8197,7 +8200,7 @@ Lord of the Rings LITE(tm) Some guys take a long vacation to throw a ring into a volcano. Hamlet LITE(tm) - -- by Wm. Shakespeare + -- by William Shakespeare A college student on vacation with family problems, a screwy girl-friend and a mother who won't act her age. @@ -8210,7 +8213,7 @@ A Tale of Two Cities LITE(tm) lady who knits. Crime and Punishment LITE(tm) - -- by Fyodor Dostoevski + -- by Fyodor Dostoyevsky A man sends a nasty letter to a pawnbroker, but later *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 20:50:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FFD7106564A; Tue, 13 Apr 2010 20:50:59 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6F28FC12; Tue, 13 Apr 2010 20:50: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 o3DKoxSC061509; Tue, 13 Apr 2010 20:50:59 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DKoxEw061507; Tue, 13 Apr 2010 20:50:59 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201004132050.o3DKoxEw061507@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 13 Apr 2010 20:50: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: r206568 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 20:50:59 -0000 Author: edwin Date: Tue Apr 13 20:50:59 2010 New Revision: 206568 URL: http://svn.freebsd.org/changeset/base/206568 Log: Allerheilingen -> Allerheiligen Submitted by: Ronald Klop Modified: head/usr.bin/calendar/calendars/calendar.dutch Modified: head/usr.bin/calendar/calendars/calendar.dutch ============================================================================== --- head/usr.bin/calendar/calendars/calendar.dutch Tue Apr 13 20:47:11 2010 (r206567) +++ head/usr.bin/calendar/calendars/calendar.dutch Tue Apr 13 20:50:59 2010 (r206568) @@ -18,7 +18,7 @@ mei/01 Dag van de Arbeid mei/04 Dodenherdenking mei/05 Bevrijdingsdag okt/04 Dierendag -nov/01 Allerheilingen +nov/01 Allerheiligen nov/02 Allerzielen nov/11 Sint Maarten nov/11 Elfde-van-de-elfde From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 21:32:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C40D3106566B; Tue, 13 Apr 2010 21:32:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3D038FC20; Tue, 13 Apr 2010 21:32: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 o3DLW6jm070738; Tue, 13 Apr 2010 21:32:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DLW66a070735; Tue, 13 Apr 2010 21:32:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004132132.o3DLW66a070735@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Apr 2010 21:32: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: r206569 - in head/sys/modules: . uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 21:32:06 -0000 Author: imp Date: Tue Apr 13 21:32:06 2010 New Revision: 206569 URL: http://svn.freebsd.org/changeset/base/206569 Log: Only compile in uart_cpu_$MACHINE.c if it exists. I'm not sure how useful it will be, but we really need to be keying off something other than MACHINE for this anyway since on arm and mips we have lots of these running around (one for each SoC family)... Modified: head/sys/modules/Makefile head/sys/modules/uart/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Apr 13 20:50:59 2010 (r206568) +++ head/sys/modules/Makefile Tue Apr 13 21:32:06 2010 (r206569) @@ -280,7 +280,7 @@ SUBDIR= ${_3dfx} \ twe \ tx \ txp \ - ${_uart} \ + uart \ ubsec \ udf \ udf_iconv \ @@ -323,8 +323,6 @@ _vpo= vpo # no BUS_SPACE_UNSPECIFIED # No barrier instruction support (specific to this driver) _sym= sym -# no uart_cpu_$MACHINE_ARCH -_uart= uart # intr_disable() is a macro, causes problems _cxgb= cxgb .endif Modified: head/sys/modules/uart/Makefile ============================================================================== --- head/sys/modules/uart/Makefile Tue Apr 13 20:50:59 2010 (r206568) +++ head/sys/modules/uart/Makefile Tue Apr 13 21:32:06 2010 (r206569) @@ -16,7 +16,7 @@ SRCS= uart_bus_acpi.c ${uart_bus_ebus} u uart_if.c uart_if.h uart_subr.c uart_tty.c .if ${MACHINE} == "sun4v" SRCS+= uart_cpu_sparc64.c -.else +.elif exists(${CURDIR}/uart_cpu_${MACHINE}.c) SRCS+= uart_cpu_${MACHINE}.c .endif SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 22:20:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29C6A1065676; Tue, 13 Apr 2010 22:20:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 164778FC2A; Tue, 13 Apr 2010 22:20: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 o3DMKCNj081384; Tue, 13 Apr 2010 22:20:12 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DMKCxf081383; Tue, 13 Apr 2010 22:20:12 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004132220.o3DMKCxf081383@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 13 Apr 2010 22:20: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: r206570 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 22:20:13 -0000 Author: marcel Date: Tue Apr 13 22:20:12 2010 New Revision: 206570 URL: http://svn.freebsd.org/changeset/base/206570 Log: Populate the sysctl tree with any MCA records we collected. The sequence number is used as the name of a sysctl node, under which we add the MCA records using the CPU id as the leaf name. Add the hw.mca.inject sysctl to provide a way to inject MC errors and trigger machine checks. PR: ia64/113102 Modified: head/sys/ia64/ia64/mca.c head/sys/ia64/include/mca.h Modified: head/sys/ia64/ia64/mca.c ============================================================================== --- head/sys/ia64/ia64/mca.c Tue Apr 13 21:32:06 2010 (r206569) +++ head/sys/ia64/ia64/mca.c Tue Apr 13 22:20:12 2010 (r206570) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Marcel Moolenaar + * Copyright (c) 2002-2010 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,19 +45,19 @@ MALLOC_DEFINE(M_MCA, "MCA", "Machine Che struct mca_info { STAILQ_ENTRY(mca_info) mi_link; - char mi_name[32]; + u_long mi_seqnr; + u_int mi_cpuid; size_t mi_recsz; char mi_record[0]; }; -static STAILQ_HEAD(, mca_info) mca_records = - STAILQ_HEAD_INITIALIZER(mca_records); +STAILQ_HEAD(mca_info_list, mca_info); -int64_t mca_info_size[SAL_INFO_TYPES]; -vm_offset_t mca_info_block; -struct mtx mca_info_block_lock; +static int64_t mca_info_size[SAL_INFO_TYPES]; +static vm_offset_t mca_info_block; +static struct mtx mca_info_block_lock; -SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RW, 0, "MCA container"); +SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RW, NULL, "MCA container"); static int mca_count; /* Number of records stored. */ static int mca_first; /* First (lowest) record ID. */ @@ -69,6 +70,32 @@ SYSCTL_INT(_hw_mca, OID_AUTO, first, CTL SYSCTL_INT(_hw_mca, OID_AUTO, last, CTLFLAG_RD, &mca_last, 0, "Last record id"); +static struct mtx mca_sysctl_lock; + +static int +mca_sysctl_inject(SYSCTL_HANDLER_ARGS) +{ + struct ia64_pal_result res; + u_int val; + int error; + + val = 0; + error = sysctl_wire_old_buffer(req, sizeof(u_int)); + if (!error) + error = sysctl_handle_int(oidp, &val, 0, req); + + if (error != 0 || req->newptr == NULL) + return (error); + + /* For example: val=137 causes a fatal CPU error. */ + res = ia64_call_pal_stacked(PAL_MC_ERROR_INJECT, val, 0, 0); + printf("%s: %#lx, %#lx, %#lx, %#lx\n", __func__, res.pal_status, + res.pal_result[0], res.pal_result[1], res.pal_result[2]); + return (0); +} +SYSCTL_PROC(_hw_mca, OID_AUTO, inject, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + mca_sysctl_inject, "I", "set to trigger a MCA"); + static int mca_sysctl_handler(SYSCTL_HANDLER_ARGS) { @@ -85,27 +112,8 @@ mca_sysctl_handler(SYSCTL_HANDLER_ARGS) return (error); } -void -ia64_mca_populate(void) -{ - struct mca_info *rec; - - mtx_lock_spin(&mca_info_block_lock); - while (!STAILQ_EMPTY(&mca_records)) { - rec = STAILQ_FIRST(&mca_records); - STAILQ_REMOVE_HEAD(&mca_records, mi_link); - mtx_unlock_spin(&mca_info_block_lock); - (void)SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), - OID_AUTO, rec->mi_name, CTLTYPE_OPAQUE | CTLFLAG_RD, - rec->mi_record, rec->mi_recsz, mca_sysctl_handler, "S,MCA", - "Error record"); - mtx_lock_spin(&mca_info_block_lock); - } - mtx_unlock_spin(&mca_info_block_lock); -} - -void -ia64_mca_save_state(int type) +static void +ia64_mca_collect_state(int type, struct mca_info_list *reclst) { struct ia64_sal_result result; struct mca_record_header *hdr; @@ -123,13 +131,13 @@ ia64_mca_save_state(int type) if (mca_info_block == 0) return; - mtx_lock_spin(&mca_info_block_lock); while (1) { + mtx_lock_spin(&mca_info_block_lock); result = ia64_sal_entry(SAL_GET_STATE_INFO, type, 0, mca_info_block, 0, 0, 0, 0); if (result.sal_status < 0) { mtx_unlock_spin(&mca_info_block_lock); - return; + break; } hdr = (struct mca_record_header *)mca_info_block; @@ -142,9 +150,10 @@ ia64_mca_save_state(int type) M_NOWAIT | M_ZERO); if (rec == NULL) /* XXX: Not sure what to do. */ - return; + break; - sprintf(rec->mi_name, "%lld", (long long)seqnr); + rec->mi_seqnr = seqnr; + rec->mi_cpuid = PCPU_GET(cpuid); mtx_lock_spin(&mca_info_block_lock); @@ -163,7 +172,6 @@ ia64_mca_save_state(int type) if (seqnr != hdr->rh_seqnr) { mtx_unlock_spin(&mca_info_block_lock); free(rec, M_MCA); - mtx_lock_spin(&mca_info_block_lock); continue; } } @@ -171,23 +179,51 @@ ia64_mca_save_state(int type) rec->mi_recsz = recsz; bcopy((char*)mca_info_block, rec->mi_record, recsz); - if (mca_count > 0) { - if (seqnr < mca_first) - mca_first = seqnr; - else if (seqnr > mca_last) - mca_last = seqnr; - } else - mca_first = mca_last = seqnr; - - mca_count++; - STAILQ_INSERT_TAIL(&mca_records, rec, mi_link); - /* * Clear the state so that we get any other records when * they exist. */ result = ia64_sal_entry(SAL_CLEAR_STATE_INFO, type, 0, 0, 0, 0, 0, 0); + + mtx_unlock_spin(&mca_info_block_lock); + + STAILQ_INSERT_TAIL(reclst, rec, mi_link); + } +} + +void +ia64_mca_save_state(int type) +{ + char name[64]; + struct mca_info_list reclst = STAILQ_HEAD_INITIALIZER(reclst); + struct mca_info *rec; + struct sysctl_oid *oid; + + ia64_mca_collect_state(type, &reclst); + + STAILQ_FOREACH(rec, &reclst, mi_link) { + sprintf(name, "%lu", rec->mi_seqnr); + oid = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), + OID_AUTO, name, CTLFLAG_RW, NULL, name); + if (oid == NULL) + continue; + + mtx_lock(&mca_sysctl_lock); + if (mca_count > 0) { + if (rec->mi_seqnr < mca_first) + mca_first = rec->mi_seqnr; + else if (rec->mi_seqnr > mca_last) + mca_last = rec->mi_seqnr; + } else + mca_first = mca_last = rec->mi_seqnr; + mca_count++; + mtx_unlock(&mca_sysctl_lock); + + sprintf(name, "%u", rec->mi_cpuid); + SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(oid), rec->mi_cpuid, + name, CTLTYPE_OPAQUE | CTLFLAG_RD, rec->mi_record, + rec->mi_recsz, mca_sysctl_handler, "S,MCA", "MCA record"); } } @@ -237,7 +273,14 @@ ia64_mca_init(void) * should be rare. On top of that, performance is not an issue when * dealing with machine checks... */ - mtx_init(&mca_info_block_lock, "MCA spin lock", NULL, MTX_SPIN); + mtx_init(&mca_info_block_lock, "MCA info lock", NULL, MTX_SPIN); + + /* + * Serialize sysctl operations with a sleep lock. Note that this + * implies that we update the sysctl tree in a context that allows + * sleeping. + */ + mtx_init(&mca_sysctl_lock, "MCA sysctl lock", NULL, MTX_DEF); /* * Get and save any processor and platfom error records. Note that in Modified: head/sys/ia64/include/mca.h ============================================================================== --- head/sys/ia64/include/mca.h Tue Apr 13 21:32:06 2010 (r206569) +++ head/sys/ia64/include/mca.h Tue Apr 13 22:20:12 2010 (r206570) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Marcel Moolenaar + * Copyright (c) 2002-2010 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -240,7 +240,6 @@ struct mca_pcidev_reg { #ifdef _KERNEL void ia64_mca_init(void); -void ia64_mca_populate(void); void ia64_mca_save_state(int); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 22:27:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16317106564A; Tue, 13 Apr 2010 22:27:40 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E08208FC0C; Tue, 13 Apr 2010 22:27: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 o3DMRdIh083081; Tue, 13 Apr 2010 22:27:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DMRdgF083079; Tue, 13 Apr 2010 22:27:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004132227.o3DMRdgF083079@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 13 Apr 2010 22:27: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: r206571 - head/sbin/mca X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 13 Apr 2010 22:27:40 -0000 Author: marcel Date: Tue Apr 13 22:27:39 2010 New Revision: 206571 URL: http://svn.freebsd.org/changeset/base/206571 Log: The sequence number is now a node under which the MCA records are hung by CPU id. When showing the MCA record, print the MIB as a comment. PR: ia64/113102 Modified: head/sbin/mca/mca.c Modified: head/sbin/mca/mca.c ============================================================================== --- head/sbin/mca/mca.c Tue Apr 13 22:20:12 2010 (r206570) +++ head/sbin/mca/mca.c Tue Apr 13 22:27:39 2010 (r206571) @@ -53,10 +53,12 @@ __FBSDID("$FreeBSD$"); #define BCD(x) ((x >> 4) * 10 + (x & 15)) +#define HW_MCA_MAX_CPUID 255 + static char hw_mca_count[] = "hw.mca.count"; static char hw_mca_first[] = "hw.mca.first"; static char hw_mca_last[] = "hw.mca.last"; -static char hw_mca_recid[] = "hw.mca.%d"; +static char hw_mca_recid[] = "hw.mca.%lu.%u"; static char default_dumpfile[] = "/var/log/mca.log"; @@ -372,10 +374,13 @@ show_section(struct mca_section_header * } static void -show(char *data) +show(char *data, const char *mib) { size_t reclen, seclen; + if (mib != NULL) + printf("\n", mib); + printf("\n"); reclen = show_header((void*)data) - sizeof(struct mca_record_header); data += sizeof(struct mca_record_header); @@ -402,7 +407,7 @@ showall(char *buf, size_t buflen) if (buflen < reclen) return; - show(buf); + show(buf, NULL); buf += reclen; buflen -= reclen; @@ -442,7 +447,7 @@ main(int argc, char **argv) char *buf; size_t len; int ch, error, fd; - int count, first, last; + int count, first, last, cpuid; while ((ch = getopt(argc, argv, "df:")) != -1) { switch(ch) { @@ -481,12 +486,19 @@ main(int argc, char **argv) if (error) err(1, hw_mca_last); + cpuid = 0; while (count && first <= last) { - sprintf(mib, hw_mca_recid, first); - len = 0; - error = sysctlbyname(mib, NULL, &len, NULL, 0); - if (error == ENOENT) { + do { + sprintf(mib, hw_mca_recid, first, cpuid); + len = 0; + error = sysctlbyname(mib, NULL, &len, NULL, 0); + if (error != ENOENT) + break; + cpuid++; + } while (cpuid <= HW_MCA_MAX_CPUID); + if (error == ENOENT && cpuid > HW_MCA_MAX_CPUID) { first++; + cpuid = 0; continue; } if (error) @@ -503,11 +515,15 @@ main(int argc, char **argv) if (fl_dump) dump(buf); else - show(buf); + show(buf, mib); free(buf); - first++; count--; + if (cpuid == HW_MCA_MAX_CPUID) { + first++; + cpuid = 0; + } else + cpuid++; } } else { fd = open(file, O_RDONLY); From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 00:50:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226BD1065777; Wed, 14 Apr 2010 00:50:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3D18FC18; Wed, 14 Apr 2010 00:50: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 o3E0oIDQ014873; Wed, 14 Apr 2010 00:50:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E0oIGB014871; Wed, 14 Apr 2010 00:50:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140050.o3E0oIGB014871@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 00:50: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: r206575 - 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: Wed, 14 Apr 2010 00:50:19 -0000 Author: yongari Date: Wed Apr 14 00:50:18 2010 New Revision: 206575 URL: http://svn.freebsd.org/changeset/base/206575 Log: MFC r206364: Partial revert r204545. Just relying on status LE ownership of status block seems to cause poor performance. Always read current status index register first and then check status ownership as we had before. Accessing status index register seems to trigger immediate status update if controller have pending status updates. Reported by: Andre Albsmeier siemens dot com> Tested by: Andre Albsmeier siemens dot com> Modified: stable/8/sys/dev/msk/if_msk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Wed Apr 14 00:50:09 2010 (r206574) +++ stable/8/sys/dev/msk/if_msk.c Wed Apr 14 00:50:18 2010 (r206575) @@ -3327,6 +3327,9 @@ msk_handle_events(struct msk_softc *sc) uint32_t control, status; int cons, len, port, rxprog; + if (sc->msk_stat_cons == CSR_READ_2(sc, STAT_PUT_IDX)) + return (0); + /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -3407,7 +3410,7 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); } static void From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:09:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 277E5106566B; Wed, 14 Apr 2010 01:09:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 171FC8FC08; Wed, 14 Apr 2010 01:09: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 o3E19ECX019174; Wed, 14 Apr 2010 01:09:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E19EwI019172; Wed, 14 Apr 2010 01:09:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140109.o3E19EwI019172@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:09: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: r206576 - 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: Wed, 14 Apr 2010 01:09:15 -0000 Author: yongari Date: Wed Apr 14 01:09:14 2010 New Revision: 206576 URL: http://svn.freebsd.org/changeset/base/206576 Log: MFC r206364: Partial revert r204545. Just relying on status LE ownership of status block seems to cause poor performance. Always read current status index register first and then check status ownership as we had before. Accessing status index register seems to trigger immediate status update if controller have pending status updates. Reported by: Andre Albsmeier siemens dot com> Tested by: Andre Albsmeier siemens dot com> Modified: stable/7/sys/dev/msk/if_msk.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/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Wed Apr 14 00:50:18 2010 (r206575) +++ stable/7/sys/dev/msk/if_msk.c Wed Apr 14 01:09:14 2010 (r206576) @@ -3327,6 +3327,9 @@ msk_handle_events(struct msk_softc *sc) uint32_t control, status; int cons, len, port, rxprog; + if (sc->msk_stat_cons == CSR_READ_2(sc, STAT_PUT_IDX)) + return (0); + /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -3407,7 +3410,7 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); } static void From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:12:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E81106564A; Wed, 14 Apr 2010 01:12:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 932988FC1E; Wed, 14 Apr 2010 01:12: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 o3E1COMt019934; Wed, 14 Apr 2010 01:12:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1CO4c019931; Wed, 14 Apr 2010 01:12:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140112.o3E1CO4c019931@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:12:24 +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: r206577 - in stable/8/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:12:24 -0000 Author: yongari Date: Wed Apr 14 01:12:24 2010 New Revision: 206577 URL: http://svn.freebsd.org/changeset/base/206577 Log: MFC r206433: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de > Modified: stable/8/sys/dev/re/if_re.c stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Wed Apr 14 01:09:14 2010 (r206576) +++ stable/8/sys/dev/re/if_re.c Wed Apr 14 01:12:24 2010 (r206577) @@ -174,8 +174,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" - "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, + "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, @@ -220,6 +219,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, { RL_HWREV_8168D, RL_8169, "8168D/8111D"}, { RL_HWREV_8168DP, RL_8169, "8168DP/8111DP"}, + { RL_HWREV_8168E, RL_8169, "8168E/8111E"}, { 0, 0, NULL } }; @@ -1310,6 +1310,11 @@ re_attach(device_t dev) */ sc->rl_flags |= RL_FLAG_NOJUMBO; break; + case RL_HWREV_8168E: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO; + break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: case RL_HWREV_8169_8110SC: @@ -1393,6 +1398,8 @@ re_attach(device_t dev) } /* Take PHY out of power down mode. */ + if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80); if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) { re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); @@ -3135,6 +3142,9 @@ re_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_LANWAKE; CSR_WRITE_1(sc, RL_CFG5, v); + if ((ifp->if_capenable & IFCAP_WOL) != 0 && + (sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80); /* * It seems that hardware resets its link speed to 100Mbps in * power down mode so switching to 100Mbps in driver is not Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:09:14 2010 (r206576) +++ stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:12:24 2010 (r206577) @@ -133,6 +133,7 @@ #define RL_GMEDIASTAT 0x006C /* 8 bits */ #define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_GTXSTART 0x0038 /* 8 bits */ @@ -162,6 +163,7 @@ #define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 @@ -884,6 +886,7 @@ struct rl_softc { uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 #define RL_FLAG_AUTOPAD 0x0002 +#define RL_FLAG_PHYWAKE_PM 0x0004 #define RL_FLAG_PHYWAKE 0x0008 #define RL_FLAG_NOJUMBO 0x0010 #define RL_FLAG_PAR 0x0020 From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:14:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 089B2106566B; Wed, 14 Apr 2010 01:14:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBC5D8FC16; Wed, 14 Apr 2010 01:14: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 o3E1Eej5020478; Wed, 14 Apr 2010 01:14:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1EeGL020475; Wed, 14 Apr 2010 01:14:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140114.o3E1EeGL020475@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206578 - in stable/7/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:14:41 -0000 Author: yongari Date: Wed Apr 14 01:14:40 2010 New Revision: 206578 URL: http://svn.freebsd.org/changeset/base/206578 Log: MFC r206433: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de > Modified: stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.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/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Wed Apr 14 01:12:24 2010 (r206577) +++ stable/7/sys/dev/re/if_re.c Wed Apr 14 01:14:40 2010 (r206578) @@ -174,8 +174,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" - "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, + "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, @@ -220,6 +219,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, { RL_HWREV_8168D, RL_8169, "8168D/8111D"}, { RL_HWREV_8168DP, RL_8169, "8168DP/8111DP"}, + { RL_HWREV_8168E, RL_8169, "8168E/8111E"}, { 0, 0, NULL } }; @@ -1311,6 +1311,11 @@ re_attach(device_t dev) */ sc->rl_flags |= RL_FLAG_NOJUMBO; break; + case RL_HWREV_8168E: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO; + break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: case RL_HWREV_8169_8110SC: @@ -1394,6 +1399,8 @@ re_attach(device_t dev) } /* Take PHY out of power down mode. */ + if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80); if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) { re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); @@ -3129,6 +3136,9 @@ re_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_LANWAKE; CSR_WRITE_1(sc, RL_CFG5, v); + if ((ifp->if_capenable & IFCAP_WOL) != 0 && + (sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80); /* * It seems that hardware resets its link speed to 100Mbps in * power down mode so switching to 100Mbps in driver is not Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:12:24 2010 (r206577) +++ stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:14:40 2010 (r206578) @@ -133,6 +133,7 @@ #define RL_GMEDIASTAT 0x006C /* 8 bits */ #define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_GTXSTART 0x0038 /* 8 bits */ @@ -162,6 +163,7 @@ #define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 @@ -857,6 +859,7 @@ struct rl_softc { uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 #define RL_FLAG_AUTOPAD 0x0002 +#define RL_FLAG_PHYWAKE_PM 0x0004 #define RL_FLAG_PHYWAKE 0x0008 #define RL_FLAG_NOJUMBO 0x0010 #define RL_FLAG_PAR 0x0020 From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:22:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E192106564A; Wed, 14 Apr 2010 01:22:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE8F8FC15; Wed, 14 Apr 2010 01:22:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3E1MYeV022270; Wed, 14 Apr 2010 01:22:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1MXbC022268; Wed, 14 Apr 2010 01:22:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140122.o3E1MXbC022268@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:22:33 +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: r206579 - stable/8/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:22:34 -0000 Author: yongari Date: Wed Apr 14 01:22:33 2010 New Revision: 206579 URL: http://svn.freebsd.org/changeset/base/206579 Log: MFC r206436: Consistently use capital letters. Modified: stable/8/sys/pci/if_rlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/pci/if_rlreg.h ============================================================================== --- stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:14:40 2010 (r206578) +++ stable/8/sys/pci/if_rlreg.h Wed Apr 14 01:22:33 2010 (r206579) @@ -160,7 +160,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24c00000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 #define RL_HWREV_8168E 0x2C000000 @@ -182,7 +182,7 @@ #define RL_HWREV_8139C 0x74000000 #define RL_HWREV_8139D 0x74400000 #define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74c00000 +#define RL_HWREV_8101 0x74C00000 #define RL_HWREV_8100 0x78800000 #define RL_HWREV_8169_8110SBL 0x7CC00000 #define RL_HWREV_8169_8110SCE 0x98000000 From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:24:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1DF106566C; Wed, 14 Apr 2010 01:24:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C0628FC15; Wed, 14 Apr 2010 01: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 o3E1O9GH022727; Wed, 14 Apr 2010 01:24:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1O9pi022725; Wed, 14 Apr 2010 01:24:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004140124.o3E1O9pi022725@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 01:24: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: r206581 - stable/7/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 01:24:09 -0000 Author: yongari Date: Wed Apr 14 01:24:09 2010 New Revision: 206581 URL: http://svn.freebsd.org/changeset/base/206581 Log: MFC r206436: Consistently use capital letters. Modified: stable/7/sys/pci/if_rlreg.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/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:23:00 2010 (r206580) +++ stable/7/sys/pci/if_rlreg.h Wed Apr 14 01:24:09 2010 (r206581) @@ -160,7 +160,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24c00000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 #define RL_HWREV_8168E 0x2C000000 @@ -182,7 +182,7 @@ #define RL_HWREV_8139C 0x74000000 #define RL_HWREV_8139D 0x74400000 #define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74c00000 +#define RL_HWREV_8101 0x74C00000 #define RL_HWREV_8100 0x78800000 #define RL_HWREV_8169_8110SBL 0x7CC00000 #define RL_HWREV_8169_8110SCE 0x98000000 From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:29:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A8BC106564A; Wed, 14 Apr 2010 01:29:31 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0BF8FC12; Wed, 14 Apr 2010 01:29: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 o3E1TVdG023941; Wed, 14 Apr 2010 01:29:31 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1TVY8023939; Wed, 14 Apr 2010 01:29:31 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201004140129.o3E1TVY8023939@svn.freebsd.org> From: Neel Natu Date: Wed, 14 Apr 2010 01:29: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: r206582 - 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, 14 Apr 2010 01:29:31 -0000 Author: neel Date: Wed Apr 14 01:29:31 2010 New Revision: 206582 URL: http://svn.freebsd.org/changeset/base/206582 Log: Revert the vm_machdep.c part of r205072. This causes a panic in vm_thread_dispose() when it tries to add this kstack to the kstack cache. This happens only when 'td_kstack' is not (PAGE_SIZE * 2) bytes aligned and we have unmapped the page at that address in cpu_thread_alloc. Pointed out by: nwhitehorn@ Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Wed Apr 14 01:24:09 2010 (r206581) +++ head/sys/mips/mips/vm_machdep.c Wed Apr 14 01:29:31 2010 (r206582) @@ -214,16 +214,6 @@ cpu_thread_swapin(struct thread *td) { pt_entry_t *pte; int i; - vm_offset_t unused_kstack_page; - - /* - * Unmap the unused kstack page. - */ - unused_kstack_page = td->td_kstack; - if (td->td_md.md_realstack == td->td_kstack) - unused_kstack_page += (KSTACK_PAGES - 1) * PAGE_SIZE; - - pmap_kremove(unused_kstack_page); /* * The kstack may be at a different physical address now. @@ -249,19 +239,13 @@ cpu_thread_swapout(struct thread *td) void cpu_thread_alloc(struct thread *td) { - vm_offset_t unused_kstack_page; pt_entry_t *pte; int i; - if (td->td_kstack & (1 << PAGE_SHIFT)) { + if (td->td_kstack & (1 << PAGE_SHIFT)) td->td_md.md_realstack = td->td_kstack + PAGE_SIZE; - unused_kstack_page = td->td_kstack; - } else { + else td->td_md.md_realstack = td->td_kstack; - unused_kstack_page = td->td_kstack + - (KSTACK_PAGES - 1) * PAGE_SIZE; - } - pmap_kremove(unused_kstack_page); td->td_pcb = (struct pcb *)(td->td_md.md_realstack + (td->td_kstack_pages - 1) * PAGE_SIZE) - 1; From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 01:57:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 304F31065676; Wed, 14 Apr 2010 01:57:54 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20D088FC16; Wed, 14 Apr 2010 01:57: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 o3E1vsHs030215; Wed, 14 Apr 2010 01:57:54 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E1vsLt030213; Wed, 14 Apr 2010 01:57:54 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201004140157.o3E1vsLt030213@svn.freebsd.org> From: Neel Natu Date: Wed, 14 Apr 2010 01:57: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: r206584 - 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, 14 Apr 2010 01:57:54 -0000 Author: neel Date: Wed Apr 14 01:57:53 2010 New Revision: 206584 URL: http://svn.freebsd.org/changeset/base/206584 Log: Destroy the pmap 'pm_mutex' in pmap_release() otherwise we will panic subsequently in pmap_pinit() with the following signature: panic: lock "pmap" 0xc7878bc8 already initialized This bug was uncovered by the changes made to vm_map.c in r206140. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Apr 14 01:43:25 2010 (r206583) +++ head/sys/mips/mips/pmap.c Wed Apr 14 01:57:53 2010 (r206584) @@ -1263,6 +1263,7 @@ pmap_release(pmap_t pmap) ptdpg->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(ptdpg); + PMAP_LOCK_DESTROY(pmap); } /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 03:13:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 758981065673; Wed, 14 Apr 2010 03:13:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 625AD8FC08; Wed, 14 Apr 2010 03:13: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 o3E3D29W047045; Wed, 14 Apr 2010 03:13:02 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E3D2O6047038; Wed, 14 Apr 2010 03:13:02 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004140313.o3E3D2O6047038@svn.freebsd.org> From: Rick Macklem Date: Wed, 14 Apr 2010 03:13:02 +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: r206585 - in stable/8/sys/fs: nfs nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 03:13:02 -0000 Author: rmacklem Date: Wed Apr 14 03:13:02 2010 New Revision: 206585 URL: http://svn.freebsd.org/changeset/base/206585 Log: MFC: r205941 This patch should fix handling of byte range locks locally on the server for the experimental nfs server. When enabled by setting vfs.newnfs.locallocks_enable to non-zero, the experimental nfs server will now acquire byte range locks on the file on behalf of NFSv4 clients, such that lock conflicts between the NFSv4 clients and processes running locally on the server, will be recognized and handled correctly. Modified: stable/8/sys/fs/nfs/nfs_commonport.c stable/8/sys/fs/nfs/nfs_commonsubs.c stable/8/sys/fs/nfs/nfs_var.h stable/8/sys/fs/nfs/nfsport.h stable/8/sys/fs/nfs/nfsrvstate.h stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonport.c Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfs_commonport.c Wed Apr 14 03:13:02 2010 (r206585) @@ -82,7 +82,8 @@ SYSCTL_STRING(_vfs_newnfs, OID_AUTO, cal */ MALLOC_DEFINE(M_NEWNFSRVCACHE, "NFSD srvcache", "NFSD Server Request Cache"); MALLOC_DEFINE(M_NEWNFSDCLIENT, "NFSD V4client", "NFSD V4 Client Id"); -MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); +MALLOC_DEFINE(M_NEWNFSDSTATE, "NFSD V4state", + "NFSD V4 State (Openowner, Open, Lockowner, Delegation"); MALLOC_DEFINE(M_NEWNFSDLOCK, "NFSD V4lock", "NFSD V4 byte range lock"); MALLOC_DEFINE(M_NEWNFSDLOCKFILE, "NFSD lckfile", "NFSD Open/Lock file"); MALLOC_DEFINE(M_NEWNFSSTRING, "NFSD string", "NFSD V4 long string"); @@ -97,7 +98,10 @@ MALLOC_DEFINE(M_NEWNFSCLLOCKOWNER, "NFSC MALLOC_DEFINE(M_NEWNFSCLLOCK, "NFSCL lck", "NFSCL Lock"); MALLOC_DEFINE(M_NEWNFSV4NODE, "NEWNFSnode", "New nfs vnode"); MALLOC_DEFINE(M_NEWNFSDIRECTIO, "NEWdirectio", "New nfs Direct IO buffer"); -MALLOC_DEFINE(M_NEWNFSDIROFF, "Newnfscl_diroff", "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDIROFF, "NFSCL diroffdiroff", + "New NFS directory offset data"); +MALLOC_DEFINE(M_NEWNFSDROLLBACK, "NFSD rollback", + "New NFS local lock rollback"); /* * Definition of mutex locks. Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonsubs.c Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfs_commonsubs.c Wed Apr 14 03:13:02 2010 (r206585) @@ -1835,6 +1835,19 @@ nfsv4_getref(struct nfsv4lock *lp, int * } /* + * Test for a lock. Return 1 if locked, 0 otherwise. + */ +APPLESTATIC int +nfsv4_testlock(struct nfsv4lock *lp) +{ + + if ((lp->nfslock_lock & NFSV4LOCK_LOCK) == 0 && + lp->nfslock_usecnt == 0) + return (0); + return (1); +} + +/* * Wake up anyone sleeping, waiting for this lock. */ static void Modified: stable/8/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/8/sys/fs/nfs/nfs_var.h Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfs_var.h Wed Apr 14 03:13:02 2010 (r206585) @@ -251,6 +251,7 @@ int nfsv4_lock(struct nfsv4lock *, int, void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); void nfsv4_getref(struct nfsv4lock *, int *, void *); +int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); int nfsrv_checkutf8(u_int8_t *, int); int newnfs_sndlock(int *); Modified: stable/8/sys/fs/nfs/nfsport.h ============================================================================== --- stable/8/sys/fs/nfs/nfsport.h Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfsport.h Wed Apr 14 03:13:02 2010 (r206585) @@ -543,6 +543,7 @@ void nfsrvd_rcv(struct socket *, void *, #define NFSSTATESPINLOCK extern struct mtx nfs_state_mutex #define NFSLOCKSTATE() mtx_lock(&nfs_state_mutex) #define NFSUNLOCKSTATE() mtx_unlock(&nfs_state_mutex) +#define NFSSTATEMUTEXPTR (&nfs_state_mutex) #define NFSREQSPINLOCK extern struct mtx nfs_req_mutex #define NFSLOCKREQ() mtx_lock(&nfs_req_mutex) #define NFSUNLOCKREQ() mtx_unlock(&nfs_req_mutex) @@ -678,6 +679,7 @@ MALLOC_DECLARE(M_NEWNFSDIROFF); MALLOC_DECLARE(M_NEWNFSV4NODE); MALLOC_DECLARE(M_NEWNFSDIRECTIO); MALLOC_DECLARE(M_NEWNFSMNT); +MALLOC_DECLARE(M_NEWNFSDROLLBACK); #define M_NFSRVCACHE M_NEWNFSRVCACHE #define M_NFSDCLIENT M_NEWNFSDCLIENT #define M_NFSDSTATE M_NEWNFSDSTATE @@ -696,6 +698,7 @@ MALLOC_DECLARE(M_NEWNFSMNT); #define M_NFSDIROFF M_NEWNFSDIROFF #define M_NFSV4NODE M_NEWNFSV4NODE #define M_NFSDIRECTIO M_NEWNFSDIRECTIO +#define M_NFSDROLLBACK M_NEWNFSDROLLBACK #define NFSINT_SIGMASK(set) \ (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \ Modified: stable/8/sys/fs/nfs/nfsrvstate.h ============================================================================== --- stable/8/sys/fs/nfs/nfsrvstate.h Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfs/nfsrvstate.h Wed Apr 14 03:13:02 2010 (r206585) @@ -185,6 +185,17 @@ struct nfslockconflict { }; /* + * This structure is used to keep track of local locks that might need + * to be rolled back. + */ +struct nfsrollback { + LIST_ENTRY(nfsrollback) rlck_list; + uint64_t rlck_first; + uint64_t rlck_end; + int rlck_type; +}; + +/* * This structure refers to a file for which lock(s) and/or open(s) exist. * Searched via hash table on file handle or found via the back pointer from an * open or lock owner. @@ -193,8 +204,12 @@ struct nfslockfile { LIST_HEAD(, nfsstate) lf_open; /* Open list */ LIST_HEAD(, nfsstate) lf_deleg; /* Delegation list */ LIST_HEAD(, nfslock) lf_lock; /* Lock list */ + LIST_HEAD(, nfslock) lf_locallock; /* Local lock list */ + LIST_HEAD(, nfsrollback) lf_rollback; /* Local lock rollback list */ LIST_ENTRY(nfslockfile) lf_hash; /* Hash list entry */ fhandle_t lf_fh; /* The file handle */ + struct nfsv4lock lf_locallock_lck; /* serialize local locking */ + int lf_usecount; /* Ref count for locking */ }; /* Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Wed Apr 14 01:57:53 2010 (r206584) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Wed Apr 14 03:13:02 2010 (r206585) @@ -65,11 +65,11 @@ static void nfsrv_dumpaclient(struct nfs struct nfsd_dumpclients *dumpp); static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p); -static int nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, - int cansleep, NFSPROC_T *p); -static int nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, +static int nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, + NFSPROC_T *p); +static void nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p); static void nfsrv_freenfslock(struct nfslock *lop); static void nfsrv_freenfslockfile(struct nfslockfile *lfp); @@ -80,8 +80,8 @@ static void nfsrv_getowner(struct nfssta struct nfsstate **stpp); static int nfsrv_getlockfh(vnode_t vp, u_short flags, struct nfslockfile **new_lfpp, fhandle_t *nfhp, NFSPROC_T *p); -static int nfsrv_getlockfile(u_short flags, - struct nfslockfile **new_lfpp, struct nfslockfile **lfpp, fhandle_t *nfhp); +static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit); static void nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, struct nfsstate *stp, struct nfslockfile *lfp); static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp, @@ -109,9 +109,20 @@ static time_t nfsrv_leaseexpiry(void); static void nfsrv_delaydelegtimeout(struct nfsstate *stp); static int nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, struct nfsstate *stp, struct nfsrvcache *op); -static void nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p); static int nfsrv_nootherstate(struct nfsstate *stp); +static int nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p); +static void nfsrv_localunlock(vnode_t vp, struct nfslockfile *lfp, + uint64_t init_first, uint64_t init_end, NFSPROC_T *p); +static int nfsrv_dolocal(vnode_t vp, struct nfslockfile *lfp, int flags, + int oldflags, uint64_t first, uint64_t end, struct nfslockconflict *cfp, + NFSPROC_T *p); +static void nfsrv_locallock_rollback(vnode_t vp, struct nfslockfile *lfp, + NFSPROC_T *p); +static void nfsrv_locallock_commit(struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end); +static void nfsrv_locklf(struct nfslockfile *lfp); +static void nfsrv_unlocklf(struct nfslockfile *lfp); /* * Scan the client list for a match and either return the current one, @@ -683,7 +694,7 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p); NFSLOCKSTATE(); if (!ret) - ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh); + ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0); if (ret) { ldumpp[0].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); @@ -927,9 +938,8 @@ nfsrv_cleanclient(struct nfsclient *clp, { struct nfsstate *stp, *nstp; - LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) { + LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) nfsrv_freeopenowner(stp, 1, p); - } } /* @@ -993,7 +1003,10 @@ nfsrv_freedeleg(struct nfsstate *stp) LIST_REMOVE(stp, ls_file); lfp = stp->ls_lfp; if (LIST_EMPTY(&lfp->lf_open) && - LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg)) + LIST_EMPTY(&lfp->lf_lock) && LIST_EMPTY(&lfp->lf_deleg) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + nfsv4_testlock(&lfp->lf_locallock_lck) == 0) nfsrv_freenfslockfile(lfp); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvdelegates--; @@ -1031,16 +1044,14 @@ nfsrv_freeopenowner(struct nfsstate *stp * This function frees an open (nfsstate open structure) with all associated * lock_owners and locks. It also frees the nfslockfile structure iff there * are no other opens on the file. - * Must be called with soft clock interrupts disabled. * Returns 1 if it free'd the nfslockfile, 0 otherwise. */ static int -nfsrv_freeopen(struct nfsstate *stp, int *freedlockp, int cansleep, - NFSPROC_T *p) +nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfsstate *nstp, *tstp; struct nfslockfile *lfp; - int ret = 0, ret2; + int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); @@ -1048,28 +1059,27 @@ nfsrv_freeopen(struct nfsstate *stp, int lfp = stp->ls_lfp; /* + * Now, free all lockowners associated with this open. + */ + LIST_FOREACH_SAFE(tstp, &stp->ls_open, ls_list, nstp) + nfsrv_freelockowner(tstp, vp, cansleep, p); + + /* * The nfslockfile is freed here if there are no locks * associated with the open. * If there are locks associated with the open, the * nfslockfile structure can be freed via nfsrv_freelockowner(). * (That is why the call must be here instead of after the loop.) */ - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { + if (lfp != NULL && LIST_EMPTY(&lfp->lf_open) && + LIST_EMPTY(&lfp->lf_deleg) && LIST_EMPTY(&lfp->lf_lock) && + LIST_EMPTY(&lfp->lf_locallock) && LIST_EMPTY(&lfp->lf_rollback) && + lfp->lf_usecount == 0 && + (cansleep != 0 || nfsv4_testlock(&lfp->lf_locallock_lck) == 0)) { nfsrv_freenfslockfile(lfp); ret = 1; - } - /* - * Now, free all lockowners associated with this open. - */ - nstp = LIST_FIRST(&stp->ls_open); - while (nstp != LIST_END(&stp->ls_open)) { - tstp = nstp; - nstp = LIST_NEXT(nstp, ls_list); - ret2 = nfsrv_freelockowner(tstp, freedlockp, cansleep, p); - if (ret == 0 && ret2 != 0) - ret = ret2; - } + } else + ret = 0; FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvopens--; nfsrv_openpluslock--; @@ -1078,79 +1088,76 @@ nfsrv_freeopen(struct nfsstate *stp, int /* * Frees a lockowner and all associated locks. - * It also frees the nfslockfile structure, if there are no more - * references to it. - * Must be called with soft clock interrupts disabled. - * Returns 1 if it free'd the nfslockfile structure, 1 otherwise. */ -static int -nfsrv_freelockowner(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { - int ret; LIST_REMOVE(stp, ls_hash); LIST_REMOVE(stp, ls_list); - ret = nfsrv_freeallnfslocks(stp, freedlockp, cansleep, p); + nfsrv_freeallnfslocks(stp, vp, cansleep, p); if (stp->ls_op) nfsrvd_derefcache(stp->ls_op); FREE((caddr_t)stp, M_NFSDSTATE); newnfsstats.srvlockowners--; nfsrv_openpluslock--; - return (ret); } /* * Free all the nfs locks on a lockowner. - * Returns 1 if it free'd the nfslockfile structure, 0 otherwise. - * If any byte range lock is free'd, *freedlockp is set to 1. */ -static int -nfsrv_freeallnfslocks(struct nfsstate *stp, int *freedlockp, int cansleep, +static void +nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p) { struct nfslock *lop, *nlop; - struct nfslockfile *lfp = NULL, *olfp = NULL; - int ret = 0; + struct nfsrollback *rlp, *nrlp; + struct nfslockfile *lfp = NULL; + int gottvp = 0; + vnode_t tvp = NULL; lop = LIST_FIRST(&stp->ls_lock); while (lop != LIST_END(&stp->ls_lock)) { nlop = LIST_NEXT(lop, lo_lckowner); /* - * Since locks off a lockowner are ordered by - * file, you should update the local locks when - * you hit the next file OR the end of the lock - * list. If there are no locks for other owners, - * it must be done before the lockowner is discarded. - * (All this only applies if cansleep == 1.) + * Since all locks should be for the same file, lfp should + * not change. */ - olfp = lfp; - lfp = lop->lo_lfp; - nfsrv_freenfslock(lop); - if (freedlockp) - *freedlockp = 1; - if (LIST_EMPTY(&lfp->lf_open) && LIST_EMPTY(&lfp->lf_lock) && - LIST_EMPTY(&lfp->lf_deleg)) { - if (cansleep) - nfsrv_locallocks(NULL, lfp, p); - nfsrv_freenfslockfile(lfp); - /* - * Set the pointer(s) to this lockowner NULL, - * to indicate it has been free'd and local - * locks discarded already. - */ - if (olfp == lfp) - olfp = NULL; - lfp = NULL; - ret = 1; + if (lfp == NULL) + lfp = lop->lo_lfp; + else if (lfp != lop->lo_lfp) + panic("allnfslocks"); + /* + * If vp is NULL and cansleep != 0, a vnode must be acquired + * from the file handle. This only occurs when called from + * nfsrv_cleanclient(). + */ + if (gottvp == 0) { + if (nfsrv_dolocallocks == 0) + tvp = NULL; + else if (vp == NULL && cansleep != 0) + tvp = nfsvno_getvp(&lfp->lf_fh); + else + tvp = vp; + gottvp = 1; + } + + if (tvp != NULL) { + if (cansleep == 0) + panic("allnfs2"); + nfsrv_localunlock(tvp, lfp, lop->lo_first, + lop->lo_end, p); + LIST_FOREACH_SAFE(rlp, &lfp->lf_rollback, rlck_list, + nrlp) + free(rlp, M_NFSDROLLBACK); + LIST_INIT(&lfp->lf_rollback); } - if (cansleep && olfp != lfp && olfp != NULL) - nfsrv_locallocks(NULL, olfp, p); + nfsrv_freenfslock(lop); lop = nlop; } - if (cansleep && lfp != NULL) - nfsrv_locallocks(NULL, olfp, p); - return (ret); + if (vp == NULL && tvp != NULL) + vput(tvp); } /* @@ -1161,11 +1168,13 @@ static void nfsrv_freenfslock(struct nfslock *lop) { - LIST_REMOVE(lop, lo_lckfile); + if (lop->lo_lckfile.le_prev != NULL) { + LIST_REMOVE(lop, lo_lckfile); + newnfsstats.srvlocks--; + nfsrv_openpluslock--; + } LIST_REMOVE(lop, lo_lckowner); FREE((caddr_t)lop, M_NFSDLOCK); - newnfsstats.srvlocks--; - nfsrv_openpluslock--; } /* @@ -1240,7 +1249,8 @@ nfsrv_getowner(struct nfsstatehead *hp, APPLESTATIC int nfsrv_lockctrl(vnode_t vp, struct nfsstate **new_stpp, struct nfslock **new_lopp, struct nfslockconflict *cfp, - nfsquad_t clientid, nfsv4stateid_t *stateidp, __unused struct nfsexstuff *exp, + nfsquad_t clientid, nfsv4stateid_t *stateidp, + __unused struct nfsexstuff *exp, struct nfsrv_descript *nd, NFSPROC_T *p) { struct nfslock *lop; @@ -1253,9 +1263,11 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta struct nfsstate *stp, *lckstp = NULL; struct nfsclient *clp = NULL; u_int32_t bits; - int error = 0, haslock = 0, ret; - int getlckret, delegation = 0; + int error = 0, haslock = 0, ret, reterr; + int getlckret, delegation = 0, filestruct_locked; fhandle_t nfh; + uint64_t first, end; + uint32_t lock_flags; if (new_stp->ls_flags & (NFSLCK_CHECK | NFSLCK_SETATTR)) { /* @@ -1290,23 +1302,6 @@ nfsrv_lockctrl(vnode_t vp, struct nfssta return (NFSERR_RESOURCE); /* - * For Lock, check for a conflict with a lock held by - * a process running locally on the server now, before - * monkeying with nfsd state. Since the vp is locked, any - * other local calls are blocked during this Op. - */ - if (new_stp->ls_flags & NFSLCK_LOCK) { - if (new_lop->lo_flags & NFSLCK_WRITE) - error = nfsvno_localconflict(vp, F_WRLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - else - error = nfsvno_localconflict(vp, F_RDLCK, - new_lop->lo_first, new_lop->lo_end, cfp, p); - if (error) - return (error); - } - - /* * For the lock case, get another nfslock structure, * just in case we need it. * Malloc now, before we start sifting through the linked lists, @@ -1316,6 +1311,9 @@ tryagain: if (new_stp->ls_flags & NFSLCK_LOCK) MALLOC(other_lop, struct nfslock *, sizeof (struct nfslock), M_NFSDLOCK, M_WAITOK); + filestruct_locked = 0; + reterr = 0; + lfp = NULL; /* * Get the lockfile structure for CFH now, so we can do a sanity @@ -1324,22 +1322,41 @@ tryagain: * shouldn't be incremented for this case. * If nfsrv_getlockfile() returns -1, it means "not found", which * will be handled later. + * If we are doing Lock/LockU and local locking is enabled, sleep + * lock the nfslockfile structure. */ getlckret = nfsrv_getlockfh(vp, new_stp->ls_flags, NULL, &nfh, p); NFSLOCKSTATE(); - if (!getlckret) - getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, - &lfp, &nfh); - if (getlckret != 0 && getlckret != -1) { - NFSUNLOCKSTATE(); - if (other_lop) - FREE((caddr_t)other_lop, M_NFSDLOCK); - if (haslock) { - NFSLOCKV4ROOTMUTEX(); - nfsv4_unlock(&nfsv4rootfs_lock, 1); - NFSUNLOCKV4ROOTMUTEX(); + if (getlckret == 0) { + if ((new_stp->ls_flags & (NFSLCK_LOCK | NFSLCK_UNLOCK)) != 0 && + nfsrv_dolocallocks != 0 && nd->nd_repstat == 0) { + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 1); + if (getlckret == 0) + filestruct_locked = 1; + } else + getlckret = nfsrv_getlockfile(new_stp->ls_flags, NULL, + &lfp, &nfh, 0); + } + if (getlckret != 0 && getlckret != -1) + reterr = getlckret; + + if (filestruct_locked != 0) { + LIST_INIT(&lfp->lf_rollback); + if ((new_stp->ls_flags & NFSLCK_LOCK)) { + /* + * For local locking, do the advisory locking now, so + * that any conflict can be detected. A failure later + * can be rolled back locally. If an error is returned, + * struct nfslockfile has been unlocked and any local + * locking rolled back. + */ + NFSUNLOCKSTATE(); + reterr = nfsrv_locallock(vp, lfp, + (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)), + new_lop->lo_first, new_lop->lo_end, cfp, p); + NFSLOCKSTATE(); } - return (getlckret); } /* @@ -1381,11 +1398,11 @@ tryagain: */ if (error == 0 && (stp->ls_flags & NFSLCK_OPEN) && ((stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM) || - (getlckret != -1 && stp->ls_lfp != lfp))) + (getlckret == 0 && stp->ls_lfp != lfp))) error = NFSERR_BADSTATEID; if (error == 0 && (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) && - getlckret != -1 && stp->ls_lfp != lfp) + getlckret == 0 && stp->ls_lfp != lfp) error = NFSERR_BADSTATEID; /* @@ -1398,7 +1415,7 @@ tryagain: */ if (error == 0 && (stp->ls_flags & (NFSLCK_OPEN | NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) == 0 && - getlckret != -1 && stp->ls_lfp != lfp) { + getlckret == 0 && stp->ls_lfp != lfp) { #ifdef DIAGNOSTIC printf("Got a lock statid for different file open\n"); #endif @@ -1478,12 +1495,30 @@ tryagain: nfsrv_markstable(clp); /* - * If nd_repstat is set, we can return that now, since the - * seqid# has been incremented. - */ - if (nd->nd_repstat && !error) - error = nd->nd_repstat; - if (error) { + * At this point, either error == NFSERR_BADSTATEID or the + * seqid# has been updated, so we can return any error. + * If error == 0, there may be an error in: + * nd_repstat - Set by the calling function. + * reterr - Set above, if getting the nfslockfile structure + * or acquiring the local lock failed. + * (If both of these are set, nd_repstat should probably be + * returned, since that error was detected before this + * function call.) + */ + if (error != 0 || nd->nd_repstat != 0 || reterr != 0) { + if (error == 0) { + if (nd->nd_repstat != 0) + error = nd->nd_repstat; + else + error = reterr; + } + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1569,6 +1604,13 @@ tryagain: ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (other_lop) FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1680,11 +1722,18 @@ tryagain: (new_lop->lo_flags & NFSLCK_WRITE) && (clp != tstp->ls_clp || (tstp->ls_flags & NFSLCK_DELEGREAD)))) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } ret = nfsrv_delegconflict(tstp, &haslock, p, vp); if (ret) { /* * nfsrv_delegconflict unlocks state when it - * returns non-zero. + * returns non-zero, which it always does. */ if (other_lop) { FREE((caddr_t)other_lop, M_NFSDLOCK); @@ -1696,6 +1745,7 @@ tryagain: } return (ret); } + /* Never gets here. */ } tstp = nstp; } @@ -1706,32 +1756,21 @@ tryagain: * just let it happen.) */ if (new_stp->ls_flags & NFSLCK_UNLOCK) { + first = new_lop->lo_first; + end = new_lop->lo_end; nfsrv_updatelock(stp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(stp->ls_stateid.seqid); stateidp->other[0] = stp->ls_stateid.other[0]; stateidp->other[1] = stp->ls_stateid.other[1]; stateidp->other[2] = stp->ls_stateid.other[2]; - /* - * For a non-empty flp->lf_lock list, I believe - * nfsrv_locallocks() can safely traverse the list, including - * sleeping, for two reasons: - * 1 - The Lock/LockU/Close Ops all require a locked - * vnode for the file and we currently have that. - * 2 - The only other thing that modifies a non-empty - * list is nfsrv_cleanclient() and it is always - * done with the exclusive nfsv4rootfs_lock held. - * Since this Op in progress holds either a shared or - * exclusive lock on nfsv4rootfs_lock, that can't - * happen now. - * However, the structure pointed to by lfp can go - * in many places for an empty list, so that is handled - * by passing a NULL pointer to nfsrv_locallocks(). - * Do that check now, while we are still SMP safe. - */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + /* Update the local locks. */ + nfsrv_localunlock(vp, lfp, first, end, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1763,6 +1802,13 @@ tryagain: } ret = nfsrv_clientconflict(lop->lo_stp->ls_clp,&haslock,vp,p); if (ret) { + if (filestruct_locked != 0) { + /* Roll back local locks. */ + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } /* * nfsrv_clientconflict() unlocks state when it * returns non-zero. @@ -1790,6 +1836,13 @@ tryagain: error = NFSERR_LOCKED; else error = NFSERR_DENIED; + if (filestruct_locked != 0) { + /* Roll back local locks. */ + NFSUNLOCKSTATE(); + nfsrv_locallock_rollback(vp, lfp, p); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); if (haslock) { NFSLOCKV4ROOTMUTEX(); @@ -1820,6 +1873,9 @@ tryagain: * - exist_lock_owner where lock_owner exists * - open_to_lock_owner with new lock_owner */ + first = new_lop->lo_first; + end = new_lop->lo_end; + lock_flags = new_lop->lo_flags; if (!(new_stp->ls_flags & NFSLCK_OPENTOLOCK)) { nfsrv_updatelock(lckstp, new_lopp, &other_lop, lfp); stateidp->seqid = ++(lckstp->ls_stateid.seqid); @@ -1854,11 +1910,13 @@ tryagain: newnfsstats.srvlockowners++; nfsrv_openpluslock++; } - /* See comment above, w.r.t. nfsrv_locallocks(). */ - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; + if (filestruct_locked != 0) { + NFSUNLOCKSTATE(); + nfsrv_locallock_commit(lfp, lock_flags, first, end); + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + } NFSUNLOCKSTATE(); - nfsrv_locallocks(vp, lfp, p); if (haslock) { NFSLOCKV4ROOTMUTEX(); nfsv4_unlock(&nfsv4rootfs_lock, 1); @@ -1984,7 +2042,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2227,7 +2285,7 @@ tryagain: error = getfhret; else error = nfsrv_getlockfile(new_stp->ls_flags, &new_lfp, &lfp, - NULL); + NULL, 0); if (new_lfp) FREE((caddr_t)new_lfp, M_NFSDLOCKFILE); if (error) { @@ -2775,7 +2833,7 @@ nfsrv_openupdate(vnode_t vp, struct nfss struct nfsclient *clp; struct nfslockfile *lfp; u_int32_t bits; - int error, gotstate = 0, len = 0, ret, freedlock; + int error, gotstate = 0, len = 0; u_char client[NFSV4_OPAQUELIMIT]; /* @@ -2863,26 +2921,19 @@ nfsrv_openupdate(vnode_t vp, struct nfss } else if (new_stp->ls_flags & NFSLCK_CLOSE) { ownerstp = stp->ls_openowner; lfp = stp->ls_lfp; - freedlock = 0; - ret = nfsrv_freeopen(stp, &freedlock, 0, p); - /* See comment on nfsrv_lockctrl() w.r.t. locallocks. */ - if (ret) { - lfp = NULL; + if (nfsrv_dolocallocks != 0 && !LIST_EMPTY(&stp->ls_open)) { + /* Get the lf lock */ + nfsrv_locklf(lfp); + NFSUNLOCKSTATE(); + if (nfsrv_freeopen(stp, vp, 1, p) == 0) { + NFSLOCKSTATE(); + nfsrv_unlocklf(lfp); + NFSUNLOCKSTATE(); + } } else { - if (LIST_EMPTY(&lfp->lf_lock)) - lfp = NULL; - } - /* - * For now, I won't do this. The openowner should be - * free'd in NFSNOOPEN seconds and it will be deref'd then. - if (LIST_EMPTY(&ownerstp->ls_open) && ownerstp->ls_op) { - nfsrvd_derefcache(ownerstp->ls_op); - ownerstp->ls_op = NULL; + (void) nfsrv_freeopen(stp, NULL, 0, p); + NFSUNLOCKSTATE(); } - */ - NFSUNLOCKSTATE(); - if (freedlock && lfp != NULL) - nfsrv_locallocks(vp, lfp, p); } else { /* * Update the share bits, making sure that the new set are a @@ -3024,7 +3075,7 @@ nfsrv_releaselckown(struct nfsstate *new !NFSBCMP(stp->ls_owner, new_stp->ls_owner, stp->ls_ownerlen)){ if (LIST_EMPTY(&stp->ls_lock)) { - (void) nfsrv_freelockowner(stp, NULL, 0, p); + nfsrv_freelockowner(stp, NULL, 0, p); } else { NFSUNLOCKSTATE(); return (NFSERR_LOCKSHELD); @@ -3072,7 +3123,7 @@ nfsrv_getlockfh(vnode_t vp, u_short flag */ static int nfsrv_getlockfile(u_short flags, struct nfslockfile **new_lfpp, - struct nfslockfile **lfpp, fhandle_t *nfhp) + struct nfslockfile **lfpp, fhandle_t *nfhp, int lockit) { struct nfslockfile *lfp; fhandle_t *fhp = NULL, *tfhp; @@ -3096,6 +3147,8 @@ nfsrv_getlockfile(u_short flags, struct LIST_FOREACH(lfp, hp, lf_hash) { tfhp = &lfp->lf_fh; if (NFSVNO_CMPFH(fhp, tfhp)) { + if (lockit) + nfsrv_locklf(lfp); *lfpp = lfp; return (0); } @@ -3109,6 +3162,11 @@ nfsrv_getlockfile(u_short flags, struct LIST_INIT(&new_lfp->lf_open); LIST_INIT(&new_lfp->lf_lock); LIST_INIT(&new_lfp->lf_deleg); + LIST_INIT(&new_lfp->lf_locallock); + LIST_INIT(&new_lfp->lf_rollback); + new_lfp->lf_locallock_lck.nfslock_usecnt = 0; + new_lfp->lf_locallock_lck.nfslock_lock = 0; + new_lfp->lf_usecount = 0; LIST_INSERT_HEAD(hp, new_lfp, lf_hash); *lfpp = new_lfp; *new_lfpp = NULL; @@ -3130,31 +3188,39 @@ nfsrv_insertlock(struct nfslock *new_lop new_lop->lo_stp = stp; new_lop->lo_lfp = lfp; - /* Insert in increasing lo_first order */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop == LIST_END(&lfp->lf_lock) || - new_lop->lo_first <= lop->lo_first) { - LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); - } else { - nlop = LIST_NEXT(lop, lo_lckfile); - while (nlop != LIST_END(&lfp->lf_lock) && - nlop->lo_first < new_lop->lo_first) { - lop = nlop; + if (stp != NULL) { + /* Insert in increasing lo_first order */ + lop = LIST_FIRST(&lfp->lf_lock); + if (lop == LIST_END(&lfp->lf_lock) || + new_lop->lo_first <= lop->lo_first) { + LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile); + } else { nlop = LIST_NEXT(lop, lo_lckfile); + while (nlop != LIST_END(&lfp->lf_lock) && + nlop->lo_first < new_lop->lo_first) { + lop = nlop; + nlop = LIST_NEXT(lop, lo_lckfile); + } + LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); } - LIST_INSERT_AFTER(lop, new_lop, lo_lckfile); + } else { + new_lop->lo_lckfile.le_prev = NULL; /* list not used */ } /* - * Insert after insert_lop, which is overloaded as stp for + * Insert after insert_lop, which is overloaded as stp or lfp for * an empty list. */ - if ((struct nfsstate *)insert_lop == stp) + if (stp == NULL && (struct nfslockfile *)insert_lop == lfp) + LIST_INSERT_HEAD(&lfp->lf_locallock, new_lop, lo_lckowner); + else if ((struct nfsstate *)insert_lop == stp) LIST_INSERT_HEAD(&stp->ls_lock, new_lop, lo_lckowner); else LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner); - newnfsstats.srvlocks++; - nfsrv_openpluslock++; + if (stp != NULL) { + newnfsstats.srvlocks++; + nfsrv_openpluslock++; + } } /* @@ -3180,9 +3246,14 @@ nfsrv_updatelock(struct nfsstate *stp, s */ if (new_lop->lo_flags & NFSLCK_UNLOCK) unlock = 1; - ilop = (struct nfslock *)stp; - lop = LIST_FIRST(&stp->ls_lock); - while (lop != LIST_END(&stp->ls_lock)) { + if (stp != NULL) { + ilop = (struct nfslock *)stp; + lop = LIST_FIRST(&stp->ls_lock); + } else { + ilop = (struct nfslock *)lfp; + lop = LIST_FIRST(&lfp->lf_locallock); + } + while (lop != NULL) { /* * Only check locks for this file that aren't before the start of * new lock's range. @@ -3278,8 +3349,7 @@ nfsrv_updatelock(struct nfsstate *stp, s } ilop = lop; lop = LIST_NEXT(lop, lo_lckowner); - if (myfile && (lop == LIST_END(&stp->ls_lock) || - lop->lo_lfp != lfp)) + if (myfile && (lop == NULL || lop->lo_lfp != lfp)) break; } @@ -4362,7 +4432,7 @@ nfsrv_checkremove(vnode_t vp, int remove tryagain: NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (haslock) { @@ -4612,7 +4682,7 @@ nfsrv_checkgetattr(struct nfsrv_descript error = nfsrv_getlockfh(vp, NFSLCK_CHECK, NULL, &nfh, p); NFSLOCKSTATE(); if (!error) - error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh); + error = nfsrv_getlockfile(NFSLCK_CHECK, NULL, &lfp, &nfh, 0); if (error) { NFSUNLOCKSTATE(); if (error == -1) @@ -4783,112 +4853,252 @@ nfsrv_delaydelegtimeout(struct nfsstate } /* - * Go through a lock list and set local locks for all ranges. - * This assumes that the lock list is sorted on increasing - * lo_first and that the list won't change, despite the possibility - * of sleeps. + * This function checks to see if there is any other state associated + * with the openowner for this Open. + * It returns 1 if there is no other state, 0 otherwise. */ -static void -nfsrv_locallocks(vnode_t vp, struct nfslockfile *lfp, - NFSPROC_T *p) +static int +nfsrv_nootherstate(struct nfsstate *stp) { - struct nfslock *lop, *nlop; - vnode_t tvp; - int newcollate, flags = 0; - u_int64_t first = 0x0ull, end = 0x0ull; + struct nfsstate *tstp; - if (!nfsrv_dolocallocks) - return; - /* - * If vp is NULL, a vnode must be aquired from the file - * handle. - */ - if (vp == NULL) { - if (lfp == NULL) - panic("nfsrv_locallocks"); - tvp = nfsvno_getvp(&lfp->lf_fh); - if (tvp == NULL) - return; - } else { - tvp = vp; + LIST_FOREACH(tstp, &stp->ls_openowner->ls_open, ls_list) { + if (tstp != stp || !LIST_EMPTY(&tstp->ls_lock)) + return (0); } + return (1); +} - /* - * If lfp == NULL, the lock list is empty, so just unlock - * everything. - */ - if (lfp == NULL) { - (void) nfsvno_advlock(tvp, F_UNLCK, (u_int64_t)0, - NFS64BITSSET, p); - /* vp can't be NULL */ - return; - } +/* + * Create a list of lock deltas (changes to local byte range locking + * that can be rolled back using the list) and apply the changes via + * nfsvno_advlock(). Optionally, lock the list. It is expected that either + * the rollback or update function will be called after this. + * It returns an error (and rolls back, as required), if any nfsvno_advlock() + * call fails. If it returns an error, it will unlock the list. + */ +static int +nfsrv_locallock(vnode_t vp, struct nfslockfile *lfp, int flags, + uint64_t first, uint64_t end, struct nfslockconflict *cfp, NFSPROC_T *p) +{ + struct nfslock *lop, *nlop; + int error = 0; - /* handle whole file case first */ - lop = LIST_FIRST(&lfp->lf_lock); - if (lop != LIST_END(&lfp->lf_lock) && - lop->lo_first == (u_int64_t)0 && - lop->lo_end == NFS64BITSSET) { - if (lop->lo_flags & NFSLCK_WRITE) - (void) nfsvno_advlock(tvp, F_WRLCK, lop->lo_first, - lop->lo_end, p); - else - (void) nfsvno_advlock(tvp, F_RDLCK, lop->lo_first, - lop->lo_end, p); - if (vp == NULL) - vput(tvp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 07:07:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88653106566B; Wed, 14 Apr 2010 07:07:43 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 763EE8FC0A; Wed, 14 Apr 2010 07:07: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 o3E77hgd098890; Wed, 14 Apr 2010 07:07:43 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3E77h8L098888; Wed, 14 Apr 2010 07:07:43 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201004140707.o3E77h8L098888@svn.freebsd.org> From: Kevin Lo Date: Wed, 14 Apr 2010 07:07: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: r206595 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 07:07:43 -0000 Author: kevlo Date: Wed Apr 14 07:07:43 2010 New Revision: 206595 URL: http://svn.freebsd.org/changeset/base/206595 Log: Eliminate duplicate comment Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Apr 14 06:56:48 2010 (r206594) +++ head/sys/dev/usb/usbdevs Wed Apr 14 07:07:43 2010 (r206595) @@ -2516,7 +2516,6 @@ product QUALCOMMINC E2002 0x2002 3G mode product QUALCOMMINC E2003 0x2003 3G modem /* Quanta products */ -/* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101_STOR 0x1000 USB Q101 Storage From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 07:46:22 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CFA2106564A; Wed, 14 Apr 2010 07:46:22 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id CECC98FC12; Wed, 14 Apr 2010 07:46:20 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 51A7045CD9; Wed, 14 Apr 2010 09:46:18 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 57C6345C9B; Wed, 14 Apr 2010 09:46:13 +0200 (CEST) Date: Wed, 14 Apr 2010 09:46:17 +0200 From: Pawel Jakub Dawidek To: Luigi Rizzo Message-ID: <20100414074616.GA1657@garage.freebsd.pl> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <20100412210512.GB94885@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 07:46:22 -0000 --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 12, 2010 at 11:05:12PM +0200, Luigi Rizzo wrote: > On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: > ... > > > @@ -0,0 +1,19 @@ > > > +# GEOM_LIBRARY_PATH > > > +# $FreeBSD$ > > > + > > > +.PATH: /usr/src/sbin/geom/misc > > > + > > > +CFLAGS +=3D -I/usr/src/sbin/geom > >=20 > > This doesn't look right. >=20 > probably a leftover from older versions of this code for 6.x . > I will do more tests tomorrow (for 7.x at this point, there is > no point in trying to support 6.x I believe) and try to remove > it if not necessary. As Rui said you should use ${.CURDIR} instead of hardcoding /usr/src/. BTW. So you decided to implement insert/remove functionality after all. I have some questions: - It is implemented as internal gsched hack, which is a pity, because this might be very useful functionality for other classes in the future. Is there a plan to make it more general and move it to the GEOM itself? - Why g_sched_flush_pending() operates on global structure? I think it will break if you try to insert and remove at the same time. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvFcsgACgkQForvXbEpPzSgTQCgk300EKdL36NzV2dwl5K2E59L cA0AoMICf8zhh4mTBF6i9i4Gh5f1jD5t =W8nO -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 07:58:42 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC931106566B; Wed, 14 Apr 2010 07:58:42 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id F371B8FC0C; Wed, 14 Apr 2010 07:58:41 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 18C6145EEF; Wed, 14 Apr 2010 09:58:40 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 13EB445CDD; Wed, 14 Apr 2010 09:58:35 +0200 (CEST) Date: Wed, 14 Apr 2010 09:58:38 +0200 From: Pawel Jakub Dawidek To: Luigi Rizzo Message-ID: <20100414075838.GB1657@garage.freebsd.pl> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xXmbgvnjoT4axfJE" Content-Disposition: inline In-Reply-To: <20100414074616.GA1657@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 07:58:42 -0000 --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 14, 2010 at 09:46:17AM +0200, Pawel Jakub Dawidek wrote: > BTW. So you decided to implement insert/remove functionality after all. > I have some questions: >=20 > - It is implemented as internal gsched hack, which is a pity, because > this might be very useful functionality for other classes in the future. > Is there a plan to make it more general and move it to the GEOM itself? >=20 > - Why g_sched_flush_pending() operates on global structure? I think it > will break if you try to insert and remove at the same time. One more thing:) If I read code correctly, new provider has different name than the original one. If my userland tool send command to my class and my class tries to find provider by name by scaning existing geoms, it won't find it, because provider's name is different. Wouldn't it better to change old provider's name and use the name old provider had for new provider? Sounds hackish... Another thing that comes to my mind is possibility to create providers that are not represented in /dev/. Name collision wouldn't be a problem then. Also, it seems nicer to not polute /dev/ with such proxy-providers. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --xXmbgvnjoT4axfJE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvFda4ACgkQForvXbEpPzSslgCg+NK3e2MBqRWd0jy/8NjcWCc5 +M8AnAlsYy+4vJ+ZHReOg+5aPEPd1p2Q =8nnJ -----END PGP SIGNATURE----- --xXmbgvnjoT4axfJE-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 08:06:05 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613D31065673; Wed, 14 Apr 2010 08:06:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0628FC1A; Wed, 14 Apr 2010 08:06:04 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 255D373098; Wed, 14 Apr 2010 10:16:30 +0200 (CEST) Date: Wed, 14 Apr 2010 10:16:30 +0200 From: Luigi Rizzo To: Pawel Jakub Dawidek , fabio@gandalf.sssup.it Message-ID: <20100414081630.GA74130@onelab2.iet.unipi.it> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414074616.GA1657@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 08:06:05 -0000 [Cc-ing Fabio as he may have more details] On Wed, Apr 14, 2010 at 09:46:17AM +0200, Pawel Jakub Dawidek wrote: > On Mon, Apr 12, 2010 at 11:05:12PM +0200, Luigi Rizzo wrote: > > On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: > > ... > > > > @@ -0,0 +1,19 @@ > > > > +# GEOM_LIBRARY_PATH > > > > +# $FreeBSD$ > > > > + > > > > +.PATH: /usr/src/sbin/geom/misc > > > > + > > > > +CFLAGS += -I/usr/src/sbin/geom > > > > > > This doesn't look right. > > > > probably a leftover from older versions of this code for 6.x . > > I will do more tests tomorrow (for 7.x at this point, there is > > no point in trying to support 6.x I believe) and try to remove > > it if not necessary. > > As Rui said you should use ${.CURDIR} instead of hardcoding /usr/src/. I thought i already fixed this yesterday. > BTW. So you decided to implement insert/remove functionality after all. > I have some questions: > > - It is implemented as internal gsched hack, which is a pity, because > this might be very useful functionality for other classes in the future. > Is there a plan to make it more general and move it to the GEOM itself? yes there is such a plan -- of course if nobody has objections. In principle it is only a library extensions with no modifications to geom internals. However, when we developed that last year, we hit some corner case where removal of an active node causes either a race or (if you try to protect from the race) a livelock. Fixing this may require some small cleanup to geom internals (we discusses the issue with phk at last EuroBSDCon. Fabio may give you more details, as far as i remember the problem was that some geom code takes shortcuts instead of following a chain of pointers, and this can end up in the wrong place in case of a removal.) For this reason, at this time i am not recommending to remove a node from a chain with outstanding transactions until the issue is solved. > - Why g_sched_flush_pending() operates on global structure? I think it > will break if you try to insert and remove at the same time. i need to check this. cheers luigi From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 08:40:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9038A1065670; Wed, 14 Apr 2010 08:40:42 +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 071F88FC0A; Wed, 14 Apr 2010 08:40:41 +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 o3E8ebst001396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Apr 2010 11:40:37 +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 o3E8ebB4092175; Wed, 14 Apr 2010 11:40:37 +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 o3E8ebxg092174; Wed, 14 Apr 2010 11:40:37 +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: Wed, 14 Apr 2010 11:40:37 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20100414084037.GK2415@deviant.kiev.zoral.com.ua> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+pJtUjZ2dt//FV8b" Content-Disposition: inline In-Reply-To: <201004131853.o3DIrdOT035078@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 08:40:42 -0000 --+pJtUjZ2dt//FV8b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 13, 2010 at 06:53:39PM +0000, Jaakko Heinonen wrote: > Author: jh > Date: Tue Apr 13 18:53:39 2010 > New Revision: 206560 > URL: http://svn.freebsd.org/changeset/base/206560 >=20 > Log: > - Ignore and report duplicate and empty device names in devfs_populate_= loop() > instead of causing erratic behavior. Currently make_dev(9) can't fail= , so > there is no way to report an error to make_dev(9) callers. > - Disallow using "." and ".." in device path names. It didn't work prev= iously > but now it is reported rather than panicing. > - Treat multiple sequential slashes as single in device path names. > =20 > Discussed with: pjd I think that this could be done more clean. Main motivation of not changing make_dev(9) seems to be desire to avoid handling impossible errors for creation of simple-named devices, where device name is fully controlled by driver. On the other hand, make_dev(9) is sometimes used to create devfs node with externally-supplied name, that does not obey devfs naming rules, or cause some other irregularity. The make_dev_credf() signature can be changed to return int error code instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added, that specifies that make_dev_credf() is allowed to fail with error EINVAL if supplied name is not sane. If flag is not supplied, make_dev_credf() should KASSERT or even just panic(9) if name does not pass internal validation. Small comment about the patch itself: Collapsion of the consequent '/' may be done in make_dev_credv() immediately after vsnprintf(). --+pJtUjZ2dt//FV8b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvFf4QACgkQC3+MBN1Mb4g7jACfVTb9ZWTjg48Rii94b+inlhgB OlEAn0V+ywtGfpP5BRG5PgI6fIXZYp2v =rqAv -----END PGP SIGNATURE----- --+pJtUjZ2dt//FV8b-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 12:49:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57DCD1065672; Wed, 14 Apr 2010 12:49:19 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 1332B8FC12; Wed, 14 Apr 2010 12:49:18 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id 8A96F13987E; Wed, 14 Apr 2010 15:49:13 +0300 (EEST) Date: Wed, 14 Apr 2010 15:49:13 +0300 From: Jaakko Heinonen To: Kostik Belousov Message-ID: <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414084037.GK2415@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 12:49:19 -0000 Thank you for your comments. On 2010-04-14, Kostik Belousov wrote: > The make_dev_credf() signature can be changed to return int error code > instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added, make_dev_credf() returns struct cdev *, not void. > that specifies that make_dev_credf() is allowed to fail with error > EINVAL if supplied name is not sane. If flag is not supplied, > make_dev_credf() should KASSERT or even just panic(9) if name > does not pass internal validation. Otherwise sounds reasonable suggestion. However changes are needed in devfs. Currently devfs_populate_loop() is not along the make_dev*() code path but make_dev(9) increases a generation counter and devfs_populate_loop() gets called sometimes later. To make things more complex there may be several devfs mounts with different symlinks (files). Actually my change doesn't work correctly in all cases with multiple devfs mounts and has another bug with cdp use counts. I am considering reverting the change. -- Jaakko From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 13:03:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF231065675; Wed, 14 Apr 2010 13:03:48 +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 CC2598FC12; Wed, 14 Apr 2010 13:03:47 +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 o3ED3hcn026143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Apr 2010 16:03:43 +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 o3ED3h1q099664; Wed, 14 Apr 2010 16:03:43 +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 o3ED3hqf099663; Wed, 14 Apr 2010 16:03:43 +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: Wed, 14 Apr 2010 16:03:43 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20100414130343.GO2415@deviant.kiev.zoral.com.ua> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MU/JeB64KdLsYIeZ" Content-Disposition: inline In-Reply-To: <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 13:03:48 -0000 --MU/JeB64KdLsYIeZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 14, 2010 at 03:49:13PM +0300, Jaakko Heinonen wrote: >=20 > Thank you for your comments. >=20 > On 2010-04-14, Kostik Belousov wrote: > > The make_dev_credf() signature can be changed to return int error code > > instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added, >=20 > make_dev_credf() returns struct cdev *, not void. Oops, forgot about this. We will need to change its signature more radically, but I still think that this worth it. >=20 > > that specifies that make_dev_credf() is allowed to fail with error > > EINVAL if supplied name is not sane. If flag is not supplied, > > make_dev_credf() should KASSERT or even just panic(9) if name > > does not pass internal validation. >=20 > Otherwise sounds reasonable suggestion. However changes are needed in > devfs. Currently devfs_populate_loop() is not along the make_dev*() > code path but make_dev(9) increases a generation counter and > devfs_populate_loop() gets called sometimes later. To make things more > complex there may be several devfs mounts with different symlinks (files). Right, my point of my suggestion was to not modify populate_loop() at all. >=20 > Actually my change doesn't work correctly in all cases with multiple > devfs mounts and has another bug with cdp use counts. I am considering > reverting the change. >=20 > --=20 > Jaakko --MU/JeB64KdLsYIeZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvFvS4ACgkQC3+MBN1Mb4jP6gCeIrq+1mGt6ZA00453/M3EWYBg 3m8AoN6neQ1qNvWkkvFI1QDpD3Pd4YHL =2xwd -----END PGP SIGNATURE----- --MU/JeB64KdLsYIeZ-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 13:44:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93B4A106566C; Wed, 14 Apr 2010 13:44:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D9688FC0A; Wed, 14 Apr 2010 13:44: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 o3EDiNEJ087792; Wed, 14 Apr 2010 13:44:23 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EDiNYa087790; Wed, 14 Apr 2010 13:44:23 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004141344.o3EDiNYa087790@svn.freebsd.org> From: Ed Maste Date: Wed, 14 Apr 2010 13:44: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: r206597 - head/sys/compat/linprocfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 13:44:23 -0000 Author: emaste Date: Wed Apr 14 13:44:22 2010 New Revision: 206597 URL: http://svn.freebsd.org/changeset/base/206597 Log: Linux puts a blank line between each CPU. Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Wed Apr 14 07:29:25 2010 (r206596) +++ head/sys/compat/linprocfs/linprocfs.c Wed Apr 14 13:44:22 2010 (r206597) @@ -274,7 +274,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "cpu family\t: %d\n" "model\t\t: %d\n" "model name\t: %s\n" - "stepping\t: %d\n", + "stepping\t: %d\n\n", i, cpu_vendor, class, cpu, model, cpu_id & 0xf); /* XXX per-cpu vendor / class / model / id? */ } From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 14:20:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1DCD106566C; Wed, 14 Apr 2010 14:20:05 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 5E81B8FC1B; Wed, 14 Apr 2010 14:20:05 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id 42F0413980F; Wed, 14 Apr 2010 17:20:00 +0300 (EEST) Date: Wed, 14 Apr 2010 17:20:00 +0300 From: Jaakko Heinonen To: Kostik Belousov Message-ID: <20100414141959.GA3276@a91-153-117-195.elisa-laajakaista.fi> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> <20100414130343.GO2415@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414130343.GO2415@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 14:20:05 -0000 On 2010-04-14, Kostik Belousov wrote: > > Otherwise sounds reasonable suggestion. However changes are needed in > > devfs. Currently devfs_populate_loop() is not along the make_dev*() > > code path but make_dev(9) increases a generation counter and > > devfs_populate_loop() gets called sometimes later. To make things more > > complex there may be several devfs mounts with different symlinks (files). > Right, my point of my suggestion was to not modify populate_loop() at all. How you would detect an attempt to create a duplicate file then? Please note that there may be directories and user created symbolic links. The file set may be different on different devfs mounts. -- Jaakko From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:00:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 344561065676; Wed, 14 Apr 2010 15:00:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 212368FC0A; Wed, 14 Apr 2010 15:00: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 o3EF0lVw004804; Wed, 14 Apr 2010 15:00:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EF0kxW004797; Wed, 14 Apr 2010 15:00:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141500.o3EF0kxW004797@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:00: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: r206598 - in stable/8/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, 14 Apr 2010 15:00:47 -0000 Author: jhb Date: Wed Apr 14 15:00:46 2010 New Revision: 206598 URL: http://svn.freebsd.org/changeset/base/206598 Log: MFC 205851: Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. Modified: stable/8/sys/amd64/amd64/apic_vector.S stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/i386/i386/apic_vector.s stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/8/sys/amd64/amd64/apic_vector.S Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:00:46 2010 (r206598) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/amd64/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) @@ -115,14 +115,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -225,7 +223,10 @@ lapic_init(vm_paddr_t addr) /* Local APIC timer interrupt. */ setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -278,7 +279,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -326,7 +327,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +730,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +856,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) @@ -179,7 +179,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -211,13 +212,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); Modified: stable/8/sys/i386/i386/apic_vector.s ============================================================================== --- stable/8/sys/i386/i386/apic_vector.s Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/i386/i386/apic_vector.s Wed Apr 14 15:00:46 2010 (r206598) @@ -110,6 +110,19 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/i386/i386/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) @@ -116,14 +116,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -228,7 +226,11 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* XXX: Thermal interrupt */ } /* @@ -281,7 +283,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -329,7 +331,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +731,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +857,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/i386/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) @@ -208,7 +208,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; extern int apic_cpuids[]; @@ -240,13 +241,13 @@ void lapic_disable_pmc(void); void lapic_dump(const char *str); int lapic_enable_pmc(void); void lapic_eoi(void); -u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:01:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA483106564A; Wed, 14 Apr 2010 15:01:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 974EB8FC08; Wed, 14 Apr 2010 15:01: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 o3EF1nus005086; Wed, 14 Apr 2010 15:01:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EF1nnd005076; Wed, 14 Apr 2010 15:01:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141501.o3EF1nnd005076@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:01: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: r206599 - in stable/7/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, 14 Apr 2010 15:01:49 -0000 Author: jhb Date: Wed Apr 14 15:01:49 2010 New Revision: 206599 URL: http://svn.freebsd.org/changeset/base/206599 Log: MFC 185933,205851: - Add constants for fields in the local APIC error status register. - Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. Modified: stable/7/sys/amd64/amd64/apic_vector.S stable/7/sys/amd64/amd64/local_apic.c stable/7/sys/amd64/include/apicreg.h stable/7/sys/amd64/include/apicvar.h stable/7/sys/i386/i386/apic_vector.s stable/7/sys/i386/i386/local_apic.c stable/7/sys/i386/include/apicreg.h stable/7/sys/i386/include/apicvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/7/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:01:49 2010 (r206599) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/7/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/7/sys/amd64/amd64/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/amd64/local_apic.c Wed Apr 14 15:01:49 2010 (r206599) @@ -111,14 +111,12 @@ struct lapic { u_long la_prof_ticks; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -224,7 +222,10 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -272,7 +273,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -299,6 +300,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); @@ -319,7 +321,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ if (cpu_vendor_id == CPU_VENDOR_AMD) { /* @@ -846,6 +852,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + /* Request a free IDT vector to be used by the specified IRQ. */ u_int apic_alloc_vector(u_int irq) Modified: stable/7/sys/amd64/include/apicreg.h ============================================================================== --- stable/7/sys/amd64/include/apicreg.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/include/apicreg.h Wed Apr 14 15:01:49 2010 (r206599) @@ -260,6 +260,14 @@ typedef struct IOAPIC ioapic_t; # define APIC_TPR_INT 0x000000f0 # define APIC_TPR_SUB 0x0000000f +/* fields in ESR */ +#define APIC_ESR_SEND_CS_ERROR 0x00000001 +#define APIC_ESR_RECEIVE_CS_ERROR 0x00000002 +#define APIC_ESR_SEND_ACCEPT 0x00000004 +#define APIC_ESR_RECEIVE_ACCEPT 0x00000008 +#define APIC_ESR_SEND_ILLEGAL_VECTOR 0x00000020 +#define APIC_ESR_RECEIVE_ILLEGAL_VECTOR 0x00000040 +#define APIC_ESR_ILLEGAL_REGISTER 0x00000080 /* fields in ICR_LOW */ #define APIC_VECTOR_MASK 0x000000ff Modified: stable/7/sys/amd64/include/apicvar.h ============================================================================== --- stable/7/sys/amd64/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/include/apicvar.h Wed Apr 14 15:01:49 2010 (r206599) @@ -173,7 +173,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; @@ -208,6 +209,7 @@ int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); Modified: stable/7/sys/i386/i386/apic_vector.s ============================================================================== --- stable/7/sys/i386/i386/apic_vector.s Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/i386/apic_vector.s Wed Apr 14 15:01:49 2010 (r206599) @@ -110,6 +110,19 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + SET_KERNEL_SREGS + FAKE_MCOUNT(TF_EIP(%esp)) + call lapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/7/sys/i386/i386/local_apic.c ============================================================================== --- stable/7/sys/i386/i386/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/i386/local_apic.c Wed Apr 14 15:01:49 2010 (r206599) @@ -111,14 +111,12 @@ struct lapic { u_long la_prof_ticks; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -226,7 +224,11 @@ lapic_init(vm_paddr_t addr) GSEL(GCODE_SEL, SEL_KPL)); ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* XXX: Thermal interrupt */ } /* @@ -274,7 +276,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -301,6 +303,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); @@ -321,7 +324,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ if (cpu_vendor_id == CPU_VENDOR_AMD) { /* @@ -848,6 +855,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* + * Read the contents of the error status register. Write to + * the register first before reading from it to force the APIC + * to update its value to indicate any errors that have + * occurred since the previous write to the register. + */ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + /* Request a free IDT vector to be used by the specified IRQ. */ u_int apic_alloc_vector(u_int irq) Modified: stable/7/sys/i386/include/apicreg.h ============================================================================== --- stable/7/sys/i386/include/apicreg.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/include/apicreg.h Wed Apr 14 15:01:49 2010 (r206599) @@ -260,6 +260,14 @@ typedef struct IOAPIC ioapic_t; # define APIC_TPR_INT 0x000000f0 # define APIC_TPR_SUB 0x0000000f +/* fields in ESR */ +#define APIC_ESR_SEND_CS_ERROR 0x00000001 +#define APIC_ESR_RECEIVE_CS_ERROR 0x00000002 +#define APIC_ESR_SEND_ACCEPT 0x00000004 +#define APIC_ESR_RECEIVE_ACCEPT 0x00000008 +#define APIC_ESR_SEND_ILLEGAL_VECTOR 0x00000020 +#define APIC_ESR_RECEIVE_ILLEGAL_VECTOR 0x00000040 +#define APIC_ESR_ILLEGAL_REGISTER 0x00000080 /* fields in ICR_LOW */ #define APIC_VECTOR_MASK 0x000000ff Modified: stable/7/sys/i386/include/apicvar.h ============================================================================== --- stable/7/sys/i386/include/apicvar.h Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/i386/include/apicvar.h Wed Apr 14 15:01:49 2010 (r206599) @@ -172,7 +172,8 @@ struct apic_enumerator { inthand_t IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(apic_isr6), - IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); + IDTVEC(apic_isr7), IDTVEC(errorint), IDTVEC(spuriousint), + IDTVEC(timerint); extern vm_paddr_t lapic_paddr; @@ -207,6 +208,7 @@ int lapic_intr_pending(u_int vector); void lapic_ipi_raw(register_t icrlo, u_int dest); void lapic_ipi_vectored(u_int vector, int dest); int lapic_ipi_wait(int delay); +void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); void lapic_reenable_pmc(void); From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:03:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15840106564A; Wed, 14 Apr 2010 15:03:59 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 047928FC15; Wed, 14 Apr 2010 15:03: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 o3EF3wwH005593; Wed, 14 Apr 2010 15:03:58 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EF3wpi005591; Wed, 14 Apr 2010 15:03:58 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004141503.o3EF3wpi005591@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 14 Apr 2010 15:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206600 - 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: Wed, 14 Apr 2010 15:03:59 -0000 Author: ume Date: Wed Apr 14 15:03:58 2010 New Revision: 206600 URL: http://svn.freebsd.org/changeset/base/206600 Log: MFC r206399, r206479: Disambiguate `IPs' to a more specific term. Modified: stable/8/etc/rc.firewall Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.firewall ============================================================================== --- stable/8/etc/rc.firewall Wed Apr 14 15:01:49 2010 (r206599) +++ stable/8/etc/rc.firewall Wed Apr 14 15:03:58 2010 (r206600) @@ -424,13 +424,15 @@ case ${firewall_type} in # Configuration: # firewall_myservices: List of TCP ports on which this host # offers services. - # firewall_allowservices: List of IPs which has access to + # firewall_allowservices: List of IPv4 and/or IPv6 addresses + # that have access to # $firewall_myservices. - # firewall_trusted: List of IPs which has full access - # to this host. Be very carefull - # when setting this. This option can - # seriously degrade the level of - # protection provided by the firewall. + # firewall_trusted: List of IPv4 and/or IPv6 addresses + # that have full access to this host. + # Be very careful when setting this. + # This option can seriously degrade + # the level of protection provided by + # the firewall. # firewall_logdeny: Boolean (YES/NO) specifying if the # default denied packets should be # logged (in /var/log/security). From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:20:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A030E106564A; Wed, 14 Apr 2010 15:20:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDFE8FC08; Wed, 14 Apr 2010 15:20: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 o3EFKUnE009349; Wed, 14 Apr 2010 15:20:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFKUpe009347; Wed, 14 Apr 2010 15:20:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141520.o3EFKUpe009347@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206601 - stable/7/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, 14 Apr 2010 15:20:30 -0000 Author: jhb Date: Wed Apr 14 15:20:30 2010 New Revision: 206601 URL: http://svn.freebsd.org/changeset/base/206601 Log: MFC 184226: Add a statement about the non-portability of non-page-aligned offsets. Modified: stable/7/lib/libc/sys/mmap.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/mmap.2 ============================================================================== --- stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:03:58 2010 (r206600) +++ stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:20:30 2010 (r206601) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd April 21, 2006 +.Dd October 24, 2008 .Dt MMAP 2 .Os .Sh NAME @@ -252,6 +252,11 @@ In the future we may define an additiona in which the file descriptor argument specifies a file or device to which swapping should be done. +.Sh NOTES +Although this implementation does not impose any alignment restrictions on +the +.Fa offset +argument, a portable program must only use page-aligned values. .Sh RETURN VALUES Upon successful completion, .Fn mmap @@ -307,13 +312,6 @@ was negative. was specified and the .Fa fd argument was not -1. -The -.Fa offset -argument -was not page-aligned. -(See -.Sx BUGS -below.) .It Bq Er ENODEV .Dv MAP_ANON has not been specified and From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:22:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B741065670; Wed, 14 Apr 2010 15:22:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F10FC8FC0A; Wed, 14 Apr 2010 15:22: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 o3EFMwgh009935; Wed, 14 Apr 2010 15:22:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFMwdj009932; Wed, 14 Apr 2010 15:22:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141522.o3EFMwdj009932@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206602 - in stable/8: lib/libc/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: Wed, 14 Apr 2010 15:22:59 -0000 Author: jhb Date: Wed Apr 14 15:22:58 2010 New Revision: 206602 URL: http://svn.freebsd.org/changeset/base/206602 Log: MFC 205536: Reject attempts to create a MAP_ANON mapping with a non-zero offset. Modified: stable/8/lib/libc/sys/mmap.2 stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/lib/libc/sys/mmap.2 ============================================================================== --- stable/8/lib/libc/sys/mmap.2 Wed Apr 14 15:20:30 2010 (r206601) +++ stable/8/lib/libc/sys/mmap.2 Wed Apr 14 15:22:58 2010 (r206602) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -312,6 +312,11 @@ was equal to zero. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Wed Apr 14 15:20:30 2010 (r206601) +++ stable/8/sys/vm/vm_mmap.c Wed Apr 14 15:22:58 2010 (r206602) @@ -232,7 +232,7 @@ mmap(td, uap) /* make sure mapping fits into numeric range etc */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && curproc->p_osrel >= 800104) || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -298,7 +298,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation and From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:23:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E81D106566B; Wed, 14 Apr 2010 15:23:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 040CC8FC12; Wed, 14 Apr 2010 15:23: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 o3EFNGvZ010043; Wed, 14 Apr 2010 15:23:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFNGBY010040; Wed, 14 Apr 2010 15:23:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141523.o3EFNGBY010040@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:23: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: r206603 - in stable/7: lib/libc/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: Wed, 14 Apr 2010 15:23:17 -0000 Author: jhb Date: Wed Apr 14 15:23:16 2010 New Revision: 206603 URL: http://svn.freebsd.org/changeset/base/206603 Log: MFC 205536: Reject attempts to create a MAP_ANON mapping with a non-zero offset. Modified: stable/7/lib/libc/sys/mmap.2 stable/7/sys/vm/vm_mmap.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (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/lib/libc/sys/mmap.2 ============================================================================== --- stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:22:58 2010 (r206602) +++ stable/7/lib/libc/sys/mmap.2 Wed Apr 14 15:23:16 2010 (r206603) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -312,6 +312,11 @@ was negative. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/7/sys/vm/vm_mmap.c ============================================================================== --- stable/7/sys/vm/vm_mmap.c Wed Apr 14 15:22:58 2010 (r206602) +++ stable/7/sys/vm/vm_mmap.c Wed Apr 14 15:23:16 2010 (r206603) @@ -232,7 +232,7 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ if ((ssize_t) uap->len < 0 || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -298,7 +298,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation. Obtain vnode and make From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:29:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93B1C1065673; Wed, 14 Apr 2010 15:29:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 835B98FC0A; Wed, 14 Apr 2010 15:29: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 o3EFTWld011508; Wed, 14 Apr 2010 15:29:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFTWd9011506; Wed, 14 Apr 2010 15:29:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004141529.o3EFTWd9011506@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Apr 2010 15:29: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: r206604 - head/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: Wed, 14 Apr 2010 15:29:32 -0000 Author: mav Date: Wed Apr 14 15:29:32 2010 New Revision: 206604 URL: http://svn.freebsd.org/changeset/base/206604 Log: For early ALI chips do not announce I/O sizes that require unsupported 48bit DMA commands. Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acerlabs.c Wed Apr 14 15:23:16 2010 (r206603) +++ head/sys/dev/ata/chipsets/ata-acerlabs.c Wed Apr 14 15:29:32 2010 (r206604) @@ -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 Wed Apr 14 15:33:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B43CB1065678; Wed, 14 Apr 2010 15:33:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A0C78FC17; Wed, 14 Apr 2010 15:33: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 o3EFXFpU012386; Wed, 14 Apr 2010 15:33:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFXF3g012384; Wed, 14 Apr 2010 15:33:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141533.o3EFXF3g012384@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:33: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: r206605 - 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: Wed, 14 Apr 2010 15:33:15 -0000 Author: jhb Date: Wed Apr 14 15:33:15 2010 New Revision: 206605 URL: http://svn.freebsd.org/changeset/base/206605 Log: MFC 205886: Defer freeing a kevent list until after dropping kqueue locks. Modified: stable/8/sys/kern/kern_event.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_event.c ============================================================================== --- stable/8/sys/kern/kern_event.c Wed Apr 14 15:29:32 2010 (r206604) +++ stable/8/sys/kern/kern_event.c Wed Apr 14 15:33:15 2010 (r206605) @@ -1203,7 +1203,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1211,6 +1211,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1222,13 +1223,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - free(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof list); - free(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1250,11 +1251,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); return 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:33:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35FD41065670; Wed, 14 Apr 2010 15:33:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24DA48FC17; Wed, 14 Apr 2010 15:33: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 o3EFXVge012459; Wed, 14 Apr 2010 15:33:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EFXVHv012457; Wed, 14 Apr 2010 15:33:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141533.o3EFXVHv012457@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 15:33: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: r206606 - 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: Wed, 14 Apr 2010 15:33:31 -0000 Author: jhb Date: Wed Apr 14 15:33:30 2010 New Revision: 206606 URL: http://svn.freebsd.org/changeset/base/206606 Log: MFC 205886: Defer freeing a kevent list until after dropping kqueue locks. Modified: stable/7/sys/kern/kern_event.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_event.c ============================================================================== --- stable/7/sys/kern/kern_event.c Wed Apr 14 15:33:15 2010 (r206605) +++ stable/7/sys/kern/kern_event.c Wed Apr 14 15:33:30 2010 (r206606) @@ -1110,7 +1110,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1118,6 +1118,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1130,13 +1131,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - FREE(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof list); - FREE(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1158,11 +1159,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); return 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 15:42:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4216B1065670; Wed, 14 Apr 2010 15:42:53 +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 AED4F8FC12; Wed, 14 Apr 2010 15:42:52 +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 o3EFgmco040831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Apr 2010 18:42:48 +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 o3EFgmqD000803; Wed, 14 Apr 2010 18:42:48 +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 o3EFgmqA000802; Wed, 14 Apr 2010 18:42:48 +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: Wed, 14 Apr 2010 18:42:48 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20100414154248.GR2415@deviant.kiev.zoral.com.ua> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> <20100414130343.GO2415@deviant.kiev.zoral.com.ua> <20100414141959.GA3276@a91-153-117-195.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a2fP9eRwxR5lvdkO" Content-Disposition: inline In-Reply-To: <20100414141959.GA3276@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 15:42:53 -0000 --a2fP9eRwxR5lvdkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 14, 2010 at 05:20:00PM +0300, Jaakko Heinonen wrote: > On 2010-04-14, Kostik Belousov wrote: > > > Otherwise sounds reasonable suggestion. However changes are needed in > > > devfs. Currently devfs_populate_loop() is not along the make_dev*() > > > code path but make_dev(9) increases a generation counter and > > > devfs_populate_loop() gets called sometimes later. To make things more > > > complex there may be several devfs mounts with different symlinks (fi= les). > > Right, my point of my suggestion was to not modify populate_loop() at a= ll. >=20 > How you would detect an attempt to create a duplicate file then? Please > note that there may be directories and user created symbolic links. The > file set may be different on different devfs mounts. First, I think we shall sort dirent->dd_dlist so that symlinks are located before any other entries, and allow for duplication of any name with the name of symlink. I remember there was a PR to change devfs_symlink() so that symlink is added to dd_dlist into head, not to a tail, as it is done now. The change itself is not enough, but together with other parts of this it might be ok. Assume that all full devfs pathes except symlinks are stored somewhere with type information for the component at the end. Then, just iterating this set at make_dev() time, we can verify that name is not a duplicate, and that the path components are not already used as device name (only as directories). The pathes storage need to be protected by dev_mtx.=20 Possibly, the cdev_priv.c_dev.__si_namebuf may be reused at the cost of long check at the make_dev() time. The symlink creation shall also put the path of its containing directory into the store. What do you think of this ? --a2fP9eRwxR5lvdkO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvF4ncACgkQC3+MBN1Mb4j3BQCfWYVWBBAd+a+QAtgdSQ7u6Be7 NcoAn0geNdMZXjY5ETj7UheQCBm48/CZ =BOJe -----END PGP SIGNATURE----- --a2fP9eRwxR5lvdkO-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 16:31:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C61106566C; Wed, 14 Apr 2010 16:31:59 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A22D18FC0A; Wed, 14 Apr 2010 16:31: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 o3EGVxSA025340; Wed, 14 Apr 2010 16:31:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EGVxvA025337; Wed, 14 Apr 2010 16:31:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004141631.o3EGVxvA025337@svn.freebsd.org> From: Alan Cox Date: Wed, 14 Apr 2010 16:31: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: r206607 - stable/8/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: Wed, 14 Apr 2010 16:31:59 -0000 Author: alc Date: Wed Apr 14 16:31:59 2010 New Revision: 206607 URL: http://svn.freebsd.org/changeset/base/206607 Log: MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc(). Modified: stable/8/sys/vm/vm_contig.c stable/8/sys/vm/vm_extern.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_contig.c ============================================================================== --- stable/8/sys/vm/vm_contig.c Wed Apr 14 15:33:30 2010 (r206606) +++ stable/8/sys/vm/vm_contig.c Wed Apr 14 16:31:59 2010 (r206607) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_t pages; unsigned long npgs; - int actl, actmax, inactl, inactmax, tries; + int tries; size = round_page(size); npgs = size >> PAGE_SHIFT; @@ -262,23 +357,7 @@ retry: pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary); if (pages == NULL) { if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_page_lock_queues(); - inactl = 0; - inactmax = tries < 1 ? 0 : cnt.v_inactive_count; - actl = 0; - actmax = tries < 2 ? 0 : cnt.v_active_count; -again: - if (inactl < inactmax && - vm_contig_launder(PQ_INACTIVE)) { - inactl++; - goto again; - } - if (actl < actmax && - vm_contig_launder(PQ_ACTIVE)) { - actl++; - goto again; - } - vm_page_unlock_queues(); + vm_contig_grow_cache(tries); tries++; goto retry; } Modified: stable/8/sys/vm/vm_extern.h ============================================================================== --- stable/8/sys/vm/vm_extern.h Wed Apr 14 15:33:30 2010 (r206606) +++ stable/8/sys/vm/vm_extern.h Wed Apr 14 16:31:59 2010 (r206607) @@ -41,6 +41,8 @@ struct vnode; int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); +vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary, vm_memattr_t memattr); @@ -49,7 +51,7 @@ vm_offset_t kmem_alloc_wait(vm_map_t, vm void kmem_free(vm_map_t, vm_offset_t, vm_size_t); void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); void kmem_init(vm_offset_t, vm_offset_t); -vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); +vm_offset_t kmem_malloc(vm_map_t map, vm_size_t size, int flags); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t); void swapout_procs(int); From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 16:37:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4548B1065670; Wed, 14 Apr 2010 16:37:35 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 340FD8FC26; Wed, 14 Apr 2010 16:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EGbZiS026608; Wed, 14 Apr 2010 16:37:35 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EGbZxG026605; Wed, 14 Apr 2010 16:37:35 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201004141637.o3EGbZxG026605@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 14 Apr 2010 16:37:35 +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: r206608 - stable/8/sys/dev/bktr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 16:37:35 -0000 Author: gibbs Date: Wed Apr 14 16:37:34 2010 New Revision: 206608 URL: http://svn.freebsd.org/changeset/base/206608 Log: MFC revision 205781: Use standard types in preference to BSD types so that these header files can be used in applications compiled with only POSIX types visible. Modified: stable/8/sys/dev/bktr/ioctl_bt848.h stable/8/sys/dev/bktr/ioctl_meteor.h Modified: stable/8/sys/dev/bktr/ioctl_bt848.h ============================================================================== --- stable/8/sys/dev/bktr/ioctl_bt848.h Wed Apr 14 16:31:59 2010 (r206607) +++ stable/8/sys/dev/bktr/ioctl_bt848.h Wed Apr 14 16:37:34 2010 (r206608) @@ -89,9 +89,9 @@ * EEProm stuff */ struct eeProm { - short offset; - short count; - u_char bytes[ 256 ]; + short offset; + short count; + unsigned char bytes[ 256 ]; }; @@ -147,7 +147,7 @@ struct eeProm { * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ -#define BT848_I2CWR _IOWR('x', 57, u_long) /* i2c read-write */ +#define BT848_I2CWR _IOWR('x', 57, unsigned long) /* i2c read-write */ struct bktr_msp_control { unsigned char function; @@ -192,10 +192,10 @@ typedef enum { METEOR_PIXTYPE_RGB, METEO struct meteor_pixfmt { - u_int index; /* Index in supported pixfmt list */ + unsigned int index; /* Index in supported pixfmt list */ METEOR_PIXTYPE type; /* What's the board gonna feed us */ - u_int Bpp; /* Bytes per pixel */ - u_long masks[3]; /* R,G,B or Y,U,V masks, respectively */ + unsigned int Bpp; /* Bytes per pixel */ + unsigned long masks[3]; /* R,G,B or Y,U,V masks, respectively */ unsigned swap_bytes :1; /* Bytes swapped within shorts */ unsigned swap_shorts:1; /* Shorts swapped within longs */ }; Modified: stable/8/sys/dev/bktr/ioctl_meteor.h ============================================================================== --- stable/8/sys/dev/bktr/ioctl_meteor.h Wed Apr 14 16:31:59 2010 (r206607) +++ stable/8/sys/dev/bktr/ioctl_meteor.h Wed Apr 14 16:37:34 2010 (r206608) @@ -50,27 +50,27 @@ struct meteor_capframe { /* structure for METEOR[GS]ETGEO - get/set geometry */ struct meteor_geomet { - u_short rows; - u_short columns; - u_short frames; - u_long oformat; + unsigned short rows; + unsigned short columns; + unsigned short frames; + unsigned long oformat; } ; /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ struct meteor_counts { - u_long fifo_errors; /* count of fifo errors since open */ - u_long dma_errors; /* count of dma errors since open */ - u_long frames_captured; /* count of frames captured since open */ - u_long even_fields_captured; /* count of even fields captured */ - u_long odd_fields_captured; /* count of odd fields captured */ + unsigned long fifo_errors; /* count of fifo errors since open */ + unsigned long dma_errors; /* count of dma errors since open */ + unsigned long frames_captured; /* count of frames captured since open */ + unsigned long even_fields_captured; /* count of even fields captured */ + unsigned long odd_fields_captured; /* count of odd fields captured */ } ; /* structure for getting and setting direct transfers to vram */ struct meteor_video { - u_long addr; /* Address of location to dma to */ - u_long width; /* Width of memory area */ - u_long banksize; /* Size of Vram bank */ - u_long ramsize; /* Size of Vram */ + unsigned long addr; /* Address of location to dma to */ + unsigned long width; /* Width of memory area */ + unsigned long banksize; /* Size of Vram bank */ + unsigned long ramsize; /* Size of Vram */ }; #define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 16:52:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 742B5106566B; Wed, 14 Apr 2010 16:52:02 +0000 (UTC) (envelope-from fabio@freebsd.org) Received: from sssup.it (ms01.sssup.it [193.205.80.99]) by mx1.freebsd.org (Postfix) with ESMTP id 6A7C88FC22; Wed, 14 Apr 2010 16:52:01 +0000 (UTC) Received: from [10.30.3.72] (HELO smaug.retis) by sssup.it (CommuniGate Pro SMTP 5.3.2) with ESMTP id 59390896; Wed, 14 Apr 2010 17:50:54 +0200 Received: by smaug.retis (Postfix, from userid 1000) id 5024D5B76F; Wed, 14 Apr 2010 18:05:54 +0200 (CEST) Date: Wed, 14 Apr 2010 18:05:54 +0200 From: Fabio Checconi To: Luigi Rizzo Message-ID: <20100414160554.GB3188@gandalf.sssup.it> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> <20100414081630.GA74130@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414081630.GA74130@onelab2.iet.unipi.it> User-Agent: Mutt/1.5.20 (2009-10-28) Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, Pawel Jakub Dawidek , svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 16:52:02 -0000 > From: Luigi Rizzo > Date: Wed, Apr 14, 2010 10:16:30AM +0200 > > [Cc-ing Fabio as he may have more details] > ... > > BTW. So you decided to implement insert/remove functionality after all. > > I have some questions: > > > > - It is implemented as internal gsched hack, which is a pity, because > > this might be very useful functionality for other classes in the future. > > Is there a plan to make it more general and move it to the GEOM itself? > > yes there is such a plan -- of course if nobody has objections. > In principle it is only a library extensions with no modifications > to geom internals. > > However, when we developed that last year, we hit some corner case > where removal of an active node causes either a race or (if you try > to protect from the race) a livelock. Fixing this may require some > small cleanup to geom internals (we discusses the issue with phk > at last EuroBSDCon. Fabio may give you more details, as far as i > remember the problem was that some geom code takes shortcuts instead > of following a chain of pointers, and this can end up in the wrong > place in case of a removal.) > > For this reason, at this time i am not recommending to remove a > node from a chain with outstanding transactions until the issue is solved. > I'm not sure I remember all the details, the major issues were: - g_disk_done() dereferences bio->parent->bio_to->geom->softc, thus changing bio_to->geom on the fly was not possible with pending request (they would find a wrong softc when bubbling up). For this reason we added a loop in g_insert_proxy() to wait for all the pending requests to be completed prior to inserting the proxy; but: - g_slice_finish_hot() completes requests in the event handling path, thus said loop (executed from an event handler) could result in a deadlock. To avoid this (it should be far from being frequent, considering the usages of hotspots in the slice code) g_insert_proxy() fails if it takes too long to complete the old requests. - Some classes (from a quick look I've seen only g_mirror, but I'm pretty sure there were some other ones) cache pointers to their providers. With these classes this implementation does not work. For the scheduler this is not a big issue, because its natural position is as close as possible to the disk device, but makes the mechanism quite hard to use in a more generic context. > > - Why g_sched_flush_pending() operates on global structure? I think it > > will break if you try to insert and remove at the same time. > If I'm not wrong, this should be safe because the global list is used only under critical sections protected by the topology lock. From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 16:54:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F15A106566B; Wed, 14 Apr 2010 16:54:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9768FC0C; Wed, 14 Apr 2010 16:54: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 o3EGsnin030506; Wed, 14 Apr 2010 16:54:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EGsn3M030503; Wed, 14 Apr 2010 16:54:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004141654.o3EGsn3M030503@svn.freebsd.org> From: Alan Cox Date: Wed, 14 Apr 2010 16:54: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: r206609 - stable/7/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: Wed, 14 Apr 2010 16:54:50 -0000 Author: alc Date: Wed Apr 14 16:54:49 2010 New Revision: 206609 URL: http://svn.freebsd.org/changeset/base/206609 Log: MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc(). Modified: stable/7/sys/vm/vm_contig.c stable/7/sys/vm/vm_extern.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/vm/vm_contig.c ============================================================================== --- stable/7/sys/vm/vm_contig.c Wed Apr 14 16:37:34 2010 (r206608) +++ stable/7/sys/vm/vm_contig.c Wed Apr 14 16:54:49 2010 (r206609) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_t pages; unsigned long npgs; - int actl, actmax, inactl, inactmax, tries; + int tries; size = round_page(size); npgs = size >> PAGE_SHIFT; @@ -262,23 +357,7 @@ retry: pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary); if (pages == NULL) { if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_page_lock_queues(); - inactl = 0; - inactmax = tries < 1 ? 0 : cnt.v_inactive_count; - actl = 0; - actmax = tries < 2 ? 0 : cnt.v_active_count; -again: - if (inactl < inactmax && - vm_contig_launder(PQ_INACTIVE)) { - inactl++; - goto again; - } - if (actl < actmax && - vm_contig_launder(PQ_ACTIVE)) { - actl++; - goto again; - } - vm_page_unlock_queues(); + vm_contig_grow_cache(tries); tries++; goto retry; } Modified: stable/7/sys/vm/vm_extern.h ============================================================================== --- stable/7/sys/vm/vm_extern.h Wed Apr 14 16:37:34 2010 (r206608) +++ stable/7/sys/vm/vm_extern.h Wed Apr 14 16:54:49 2010 (r206609) @@ -57,6 +57,8 @@ int swapon(struct thread *, void *, int int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); +vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary, vm_memattr_t memattr); @@ -65,7 +67,7 @@ vm_offset_t kmem_alloc_wait(vm_map_t, vm void kmem_free(vm_map_t, vm_offset_t, vm_size_t); void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); void kmem_init(vm_offset_t, vm_offset_t); -vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); +vm_offset_t kmem_malloc(vm_map_t map, vm_size_t size, int flags); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t); void swapout_procs(int); From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 17:01:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28761106566B; Wed, 14 Apr 2010 17:01:30 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E448FC18; Wed, 14 Apr 2010 17:01: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 o3EH1TrI032037; Wed, 14 Apr 2010 17:01:29 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EH1TFF032035; Wed, 14 Apr 2010 17:01:29 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201004141701.o3EH1TFF032035@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 14 Apr 2010 17:01: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: r206610 - 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: Wed, 14 Apr 2010 17:01:30 -0000 Author: gibbs Date: Wed Apr 14 17:01:29 2010 New Revision: 206610 URL: http://svn.freebsd.org/changeset/base/206610 Log: MFC 204214: Enforce stronger bus-dma alignment semantics so bus-dma operates correctly with Xen's blkfront driver. Modified: stable/8/sys/amd64/amd64/busdma_machdep.c Modified: stable/8/sys/amd64/amd64/busdma_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/busdma_machdep.c Wed Apr 14 16:54:49 2010 (r206609) +++ stable/8/sys/amd64/amd64/busdma_machdep.c Wed Apr 14 17:01:29 2010 (r206610) @@ -239,8 +239,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->alignment = alignment; newtag->boundary = boundary; newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1); - newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + - (PAGE_SIZE - 1); + newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; newtag->maxsize = maxsize; @@ -605,13 +604,18 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { + bus_size_t sg_len; + + sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK); if (pmap) paddr = pmap_extract(pmap, vaddr); else paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr) != 0) + if (run_filter(dmat, paddr) != 0) { + sg_len = roundup2(sg_len, dmat->alignment); map->pagesneeded++; - vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); + } + vaddr += sg_len; } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } @@ -644,6 +648,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm bmask = ~(dmat->boundary - 1); for (seg = *segp; buflen > 0 ; ) { + bus_size_t max_sgsize; + /* * Get the physical address for this segment. */ @@ -655,11 +661,15 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm /* * Compute the segment size, and adjust counts. */ - sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); - if (sgsize > dmat->maxsegsz) - sgsize = dmat->maxsegsz; - if (buflen < sgsize) - sgsize = buflen; + max_sgsize = MIN(buflen, dmat->maxsegsz); + sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) { + sgsize = roundup2(sgsize, dmat->alignment); + sgsize = MIN(sgsize, max_sgsize); + curaddr = add_bounce_page(dmat, map, vaddr, sgsize); + } else { + sgsize = MIN(sgsize, max_sgsize); + } /* * Make sure we don't cross any boundaries. @@ -670,9 +680,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) - curaddr = add_bounce_page(dmat, map, vaddr, sgsize); - /* * Insert chunk into a segment, coalescing with * previous segment if possible. From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 17:09:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8D0F106566B; Wed, 14 Apr 2010 17:09:54 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 22D988FC19; Wed, 14 Apr 2010 17:09:53 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o3EH9qZm047793; Wed, 14 Apr 2010 19:09:52 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o3EH9qiS047792; Wed, 14 Apr 2010 19:09:52 +0200 (CEST) (envelope-from marius) Date: Wed, 14 Apr 2010 19:09:52 +0200 From: Marius Strobl To: Alexander Motin Message-ID: <20100414170952.GA23301@alchemy.franken.de> References: <201004141529.o3EFTWd9011506@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201004141529.o3EFTWd9011506@svn.freebsd.org> 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: r206604 - head/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: Wed, 14 Apr 2010 17:09:54 -0000 On Wed, Apr 14, 2010 at 03:29:32PM +0000, Alexander Motin wrote: > Author: mav > Date: Wed Apr 14 15:29:32 2010 > New Revision: 206604 > URL: http://svn.freebsd.org/changeset/base/206604 > > Log: > For early ALI chips do not announce I/O sizes that require unsupported > 48bit DMA commands. Wouldn't it make more sense to limit the I/O size based ATA_NO_48BIT_DMA in a central place rather than letting each chipset driver deal with it? Marius From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 17:17:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74962106566C; Wed, 14 Apr 2010 17:17:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6394C8FC21; Wed, 14 Apr 2010 17:17: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 o3EHH6FB035484; Wed, 14 Apr 2010 17:17:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EHH6DZ035482; Wed, 14 Apr 2010 17:17:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141717.o3EHH6DZ035482@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 17:17: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: r206611 - stable/8/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 17:17:06 -0000 Author: jhb Date: Wed Apr 14 17:17:06 2010 New Revision: 206611 URL: http://svn.freebsd.org/changeset/base/206611 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/8/lib/libstand/assert.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/assert.c ============================================================================== --- stable/8/lib/libstand/assert.c Wed Apr 14 17:01:29 2010 (r206610) +++ stable/8/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 17:17:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA2B10656EE; Wed, 14 Apr 2010 17:17:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6D98FC1A; Wed, 14 Apr 2010 17:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EHHP2h035585; Wed, 14 Apr 2010 17:17:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EHHPdV035583; Wed, 14 Apr 2010 17:17:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141717.o3EHHPdV035583@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 17:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206612 - stable/7/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 17:17:25 -0000 Author: jhb Date: Wed Apr 14 17:17:25 2010 New Revision: 206612 URL: http://svn.freebsd.org/changeset/base/206612 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/7/lib/libstand/assert.c Directory Properties: stable/7/lib/libstand/ (props changed) Modified: stable/7/lib/libstand/assert.c ============================================================================== --- stable/7/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) +++ stable/7/lib/libstand/assert.c Wed Apr 14 17:17:25 2010 (r206612) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 17:44:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E78106564A; Wed, 14 Apr 2010 17:44:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f214.google.com (mail-bw0-f214.google.com [209.85.218.214]) by mx1.freebsd.org (Postfix) with ESMTP id 162588FC29; Wed, 14 Apr 2010 17:44:30 +0000 (UTC) Received: by bwz6 with SMTP id 6so395518bwz.13 for ; Wed, 14 Apr 2010 10:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=lVUQafcY8476Z1Kn0v8PhQmShLbvS7DKHE5KCBl+FJg=; b=sPzt8DO64SGECq6ImzaEl+285cbiVcfWBjC6Y74YT597uz3ij/KV/zUIlHjXqVZuSe o79i3pi3ZbqGT4XmC7PAMlcGpqLJIISxgOPCagBlUOpeMqjBm0sBCYpRapojz8IHfuDH KvCzXZ6syPb5CzwLV4xM2C2RjlpX798R9kgg8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=dMFP+baJygbzjY1n02PbLPnGil0eMtVPFrYOhuhd2UtPs5KhJWG/gXmLdEifkyz0Lc 4SUgaHrIoAgI3y65GDoXH8MOgGEPZn3ojCw/WjXlrPqNWRRPxe9aejDUU+LYzGbreR24 KQzRiAH2Sg8Dwt4yV2FjXQZ5lYC/+6oHIQSo4= Received: by 10.103.76.26 with SMTP id d26mr4320175mul.115.1271267069479; Wed, 14 Apr 2010 10:44:29 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id i5sm3407341mue.19.2010.04.14.10.44.27 (version=SSLv3 cipher=RC4-MD5); Wed, 14 Apr 2010 10:44:28 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BC5FEF3.2090801@FreeBSD.org> Date: Wed, 14 Apr 2010 20:44:19 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Marius Strobl References: <201004141529.o3EFTWd9011506@svn.freebsd.org> <20100414170952.GA23301@alchemy.franken.de> In-Reply-To: <20100414170952.GA23301@alchemy.franken.de> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206604 - head/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: Wed, 14 Apr 2010 17:44:32 -0000 Marius Strobl wrote: > On Wed, Apr 14, 2010 at 03:29:32PM +0000, Alexander Motin wrote: >> Author: mav >> Date: Wed Apr 14 15:29:32 2010 >> New Revision: 206604 >> URL: http://svn.freebsd.org/changeset/base/206604 >> >> Log: >> For early ALI chips do not announce I/O sizes that require unsupported >> 48bit DMA commands. > > Wouldn't it make more sense to limit the I/O size based ATA_NO_48BIT_DMA > in a central place rather than letting each chipset driver deal with it? This driver is the only place where this flag is set now. And looking that 48bit is almost mandatory now, unlikely it will be ever needed again. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 18:29:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB6861065672; Wed, 14 Apr 2010 18:29:01 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA0228FC19; Wed, 14 Apr 2010 18:29: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 o3EIT1jt051473; Wed, 14 Apr 2010 18:29:01 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EIT13q051471; Wed, 14 Apr 2010 18:29:01 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004141829.o3EIT13q051471@svn.freebsd.org> From: Jack F Vogel Date: Wed, 14 Apr 2010 18:29: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: r206614 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 18:29:01 -0000 Author: jfv Date: Wed Apr 14 18:29:01 2010 New Revision: 206614 URL: http://svn.freebsd.org/changeset/base/206614 Log: Remove multiqueue stack related stuff form lem, it is unneeded for legacy hardware. Also remove some TSO related cruft. Add some watchdog_time setting that was missing, thanks to Mikolaj Golub for pointing that out. Modified: head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Apr 14 17:52:00 2010 (r206613) +++ head/sys/dev/e1000/if_lem.c Wed Apr 14 18:29:01 2010 (r206614) @@ -39,9 +39,6 @@ #include #include -#if __FreeBSD_version >= 800000 -#include -#endif #include #include #include @@ -94,7 +91,7 @@ int lem_display_debug_stats = 0; /********************************************************************* * Legacy Em Driver version: *********************************************************************/ -char lem_driver_version[] = "1.0.0"; +char lem_driver_version[] = "1.0.1"; /********************************************************************* @@ -177,11 +174,6 @@ static int lem_suspend(device_t); static int lem_resume(device_t); static void lem_start(struct ifnet *); static void lem_start_locked(struct ifnet *ifp); -#if __FreeBSD_version >= 800000 -static int lem_mq_start(struct ifnet *, struct mbuf *); -static int lem_mq_start_locked(struct ifnet *, struct mbuf *); -static void lem_qflush(struct ifnet *); -#endif static int lem_ioctl(struct ifnet *, u_long, caddr_t); static void lem_init(void *); static void lem_init_locked(struct adapter *); @@ -304,12 +296,6 @@ MODULE_DEPEND(lem, ether, 1, 1, 1); #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define M_TSO_LEN 66 - -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif static int lem_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int lem_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); @@ -827,118 +813,6 @@ lem_resume(device_t dev) } -/********************************************************************* - * Transmit entry point - * - * em_start is called by the stack to initiate a transmit. - * The driver will remain in this routine as long as there are - * packets to transmit and transmit resources are available. - * In case resources are not available stack is notified and - * the packet is requeued. - **********************************************************************/ - -#if __FreeBSD_version >= 800000 -static int -lem_mq_start_locked(struct ifnet *ifp, struct mbuf *m) -{ - struct adapter *adapter = ifp->if_softc; - struct mbuf *next; - int error = E1000_SUCCESS; - - EM_TX_LOCK_ASSERT(adapter); - /* To allow being called from a tasklet */ - if (m == NULL) - goto process; - - if (((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - || (!adapter->link_active)) { - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else if (drbr_empty(ifp, adapter->br) && - (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) { - if ((error = lem_xmit(adapter, &m)) != 0) { - if (m) - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else { - /* - * We've bypassed the buf ring so we need to update - * ifp directly - */ - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); - /* - ** Send a copy of the frame to the BPF - ** listener and set the watchdog on. - */ - ETHER_BPF_MTAP(ifp, m); - adapter->watchdog_check = TRUE; - } - } else if ((error = drbr_enqueue(ifp, adapter->br, m)) != 0) - return (error); - -process: - if (drbr_empty(ifp, adapter->br)) - return(error); - /* Process the queue */ - while (TRUE) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - break; - next = drbr_dequeue(ifp, adapter->br); - if (next == NULL) - break; - if ((error = lem_xmit(adapter, &next)) != 0) { - if (next != NULL) - error = drbr_enqueue(ifp, adapter->br, next); - break; - } - drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); - ETHER_BPF_MTAP(ifp, next); - /* Set the watchdog */ - adapter->watchdog_check = TRUE; - } - - if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - - return (error); -} - -/* -** Multiqueue capable stack interface, this is not -** yet truely multiqueue, but that is coming... -*/ -static int -lem_mq_start(struct ifnet *ifp, struct mbuf *m) -{ - - struct adapter *adapter = ifp->if_softc; - int error = 0; - - if (EM_TX_TRYLOCK(adapter)) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = lem_mq_start_locked(ifp, m); - EM_TX_UNLOCK(adapter); - } else - error = drbr_enqueue(ifp, adapter->br, m); - - return (error); -} - -static void -lem_qflush(struct ifnet *ifp) -{ - struct mbuf *m; - struct adapter *adapter = (struct adapter *)ifp->if_softc; - - EM_TX_LOCK(adapter); - while ((m = buf_ring_dequeue_sc(adapter->br)) != NULL) - m_freem(m); - if_qflush(ifp); - EM_TX_UNLOCK(adapter); -} -#endif /* FreeBSD_version */ - static void lem_start_locked(struct ifnet *ifp) { @@ -975,6 +849,7 @@ lem_start_locked(struct ifnet *ifp) /* Set timeout in case hardware has problems transmitting. */ adapter->watchdog_check = TRUE; + adapter->watchdog_time = ticks; } if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -1151,12 +1026,6 @@ lem_ioctl(struct ifnet *ifp, u_long comm ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; } -#if __FreeBSD_version >= 700000 - if (mask & IFCAP_TSO4) { - ifp->if_capenable ^= IFCAP_TSO4; - reinit = 1; - } -#endif if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; @@ -1279,10 +1148,6 @@ lem_init_locked(struct adapter *adapter) if (adapter->hw.mac.type >= e1000_82543) { if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); -#if __FreeBSD_version >= 700000 - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; -#endif } /* Configure for OS presence */ @@ -1394,13 +1259,8 @@ lem_poll(struct ifnet *ifp, enum poll_cm EM_TX_LOCK(adapter); lem_txeof(adapter); -#if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, adapter->br)) - lem_mq_start_locked(ifp, NULL); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); -#endif EM_TX_UNLOCK(adapter); return (rx_done); } @@ -1494,14 +1354,8 @@ lem_handle_rxtx(void *context, int pendi taskqueue_enqueue(adapter->tq, &adapter->rxtx_task); EM_TX_LOCK(adapter); lem_txeof(adapter); - -#if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, adapter->br)) - lem_mq_start_locked(ifp, NULL); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); -#endif EM_TX_UNLOCK(adapter); } @@ -1852,15 +1706,17 @@ lem_xmit(struct adapter *adapter, struct if (mtag != NULL) { ctxd->upper.fields.special = htole16(VLAN_TAG_VALUE(mtag)); + ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE); + } #else /* FreeBSD 7 */ if (m_head->m_flags & M_VLANTAG) { /* Set the vlan id. */ ctxd->upper.fields.special = htole16(m_head->m_pkthdr.ether_vtag); -#endif /* Tell hardware to add tag */ ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE); } +#endif tx_buffer->m_head = m_head; tx_buffer_mapped->map = tx_buffer->map; @@ -2544,12 +2400,6 @@ lem_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; -#if __FreeBSD_version >= 800000 - /* Multiqueue tx functions */ - ifp->if_transmit = lem_mq_start; - ifp->if_qflush = lem_qflush; - adapter->br = buf_ring_alloc(4096, M_DEVBUF, M_WAITOK, &adapter->tx_mtx); -#endif if (adapter->hw.mac.type >= e1000_82543) { int version_cap; #if __FreeBSD_version < 700000 @@ -4549,10 +4399,6 @@ lem_print_hw_stats(struct adapter *adapt (long long)adapter->stats.gprc); device_printf(dev, "Good Packets Xmtd = %lld\n", (long long)adapter->stats.gptc); - device_printf(dev, "TSO Contexts Xmtd = %lld\n", - (long long)adapter->stats.tsctc); - device_printf(dev, "TSO Contexts Failed = %lld\n", - (long long)adapter->stats.tsctfc); } /********************************************************************** From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 18:29:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47CAC1065676; Wed, 14 Apr 2010 18:29:27 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36CAC8FC21; Wed, 14 Apr 2010 18:29: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 o3EITRw7051608; Wed, 14 Apr 2010 18:29:27 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EITRVS051602; Wed, 14 Apr 2010 18:29:27 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201004141829.o3EITRVS051602@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 14 Apr 2010 18:29: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: r206615 - in head/lib/libc: gen locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 18:29:27 -0000 Author: uqs Date: Wed Apr 14 18:29:26 2010 New Revision: 206615 URL: http://svn.freebsd.org/changeset/base/206615 Log: mdoc: remove .Pp where not needed This trips up mdocml and can simply go away. Reviewed by: ru Approved by: philip, ed (mentors) Modified: head/lib/libc/gen/confstr.3 head/lib/libc/gen/sysconf.3 head/lib/libc/gen/sysctl.3 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 Modified: head/lib/libc/gen/confstr.3 ============================================================================== --- head/lib/libc/gen/confstr.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/gen/confstr.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -79,7 +79,6 @@ The copied value is always null terminat The available values are as follows: .Pp .Bl -tag -width 6n -.Pp .It Li _CS_PATH Return a value for the .Ev PATH Modified: head/lib/libc/gen/sysconf.3 ============================================================================== --- head/lib/libc/gen/sysconf.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/gen/sysconf.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -60,9 +60,7 @@ Shell programmers who need access to the utility. .Pp The available values are as follows: -.Pp .Bl -tag -width 6n -.Pp .It Li _SC_ARG_MAX The maximum bytes of argument to .Xr execve 2 . @@ -165,9 +163,7 @@ otherwise \-1. .El .Pp These values also exist, but may not be standard: -.Pp .Bl -tag -width 6n -.Pp .It Li _SC_PHYS_PAGES The number of pages of physical memory. Note that it is possible that the product of this value and the value of Modified: head/lib/libc/gen/sysctl.3 ============================================================================== --- head/lib/libc/gen/sysctl.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/gen/sysctl.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -286,7 +286,6 @@ privilege may change the value. .It "HW_MACHINE_ARCH string no" .It "HW_REALMEM integer no" .El -.Pp .Bl -tag -width 6n .It Li HW_MACHINE The machine class. @@ -352,7 +351,6 @@ information. .It "KERN_VERSION string no" .It "KERN_VNODE struct vnode no" .El -.Pp .Bl -tag -width 6n .It Li KERN_ARGMAX The maximum bytes of argument to @@ -543,7 +541,6 @@ privilege may change the value. .It "PF_INET IPv4 values yes" .It "PF_INET6 IPv6 values yes" .El -.Pp .Bl -tag -width 6n .It Li PF_ROUTE Return the entire routing table or a subset of it. @@ -650,7 +647,6 @@ privilege may change the value. .It "USER_TZNAME_MAX integer no" .El .Bl -tag -width 6n -.Pp .It Li USER_BC_BASE_MAX The maximum ibase/obase values in the .Xr bc 1 @@ -740,7 +736,6 @@ privilege may change the value. .It "VM_V_INACTIVE_TARGET integer yes" .It "VM_V_PAGEOUT_FREE_MIN integer yes" .El -.Pp .Bl -tag -width 6n .It Li VM_LOADAVG Return the load average history. Modified: head/lib/libc/locale/isalnum.3 ============================================================================== --- head/lib/libc/locale/isalnum.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/locale/isalnum.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -59,7 +59,6 @@ or the value of .Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): -.Pp .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ .It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" .It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" Modified: head/lib/libc/locale/isalpha.3 ============================================================================== --- head/lib/libc/locale/isalpha.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/locale/isalpha.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -59,7 +59,6 @@ or the value of .Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): -.Pp .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ .It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" .It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 18:29:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1D91065673; Wed, 14 Apr 2010 18:29:35 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 382FF8FC1D; Wed, 14 Apr 2010 18:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EITZ2Z051677; Wed, 14 Apr 2010 18:29:35 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EITZ9I051676; Wed, 14 Apr 2010 18:29:35 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201004141829.o3EITZ9I051676@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 14 Apr 2010 18:29: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: r206616 - 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: Wed, 14 Apr 2010 18:29:35 -0000 Author: uqs Date: Wed Apr 14 18:29:34 2010 New Revision: 206616 URL: http://svn.freebsd.org/changeset/base/206616 Log: mdoc: don't abuse Bo/Pc to get what looks like an interval Be explicit and use the general bracketing form plus symbols which are to be interpreted mathematically in this case. Complaint by: mdocml Reviewed by: ru Approved by: philip, ed (mentors) Modified: head/lib/libc/gen/frexp.3 Modified: head/lib/libc/gen/frexp.3 ============================================================================== --- head/lib/libc/gen/frexp.3 Wed Apr 14 18:29:26 2010 (r206615) +++ head/lib/libc/gen/frexp.3 Wed Apr 14 18:29:34 2010 (r206616) @@ -70,7 +70,7 @@ such that is a .Vt double with magnitude in the interval -.Bo 1/2 , 1 Pc +.Eo [ 1/2 , 1 Ec ) or zero, and .Fa value equals From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 18:29:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D15FA10657E1; Wed, 14 Apr 2010 18:29:40 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB3B08FC13; Wed, 14 Apr 2010 18:29: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 o3EITeeJ051715; Wed, 14 Apr 2010 18:29:40 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EITeji051712; Wed, 14 Apr 2010 18:29:40 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004141829.o3EITeji051712@svn.freebsd.org> From: Rui Paulo Date: Wed, 14 Apr 2010 18:29: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: r206617 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 18:29:40 -0000 Author: rpaulo Date: Wed Apr 14 18:29:40 2010 New Revision: 206617 URL: http://svn.freebsd.org/changeset/base/206617 Log: Make this code a little more portable by wrapping the mtx calls into macros. MFC after: 1 week Modified: head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Wed Apr 14 18:29:34 2010 (r206616) +++ head/sys/net80211/ieee80211_freebsd.h Wed Apr 14 18:29:40 2010 (r206617) @@ -148,6 +148,16 @@ typedef struct mtx acl_lock_t; mtx_assert((&(_as)->as_lock), MA_OWNED) /* + * Scan table definitions. + */ +typedef struct mtx ieee80211_scan_table_lock_t; +#define IEEE80211_SCAN_TABLE_LOCK_INIT(_st, _name) \ + mtx_init(&(_st)->st_lock, _name, "802.11 scan table", MTX_DEF) +#define IEEE80211_SCAN_TABLE_LOCK_DESTROY(_st) mtx_destroy(&(_st)->st_lock) +#define IEEE80211_SCAN_TABLE_LOCK(_st) mtx_lock(&(_st)->st_lock) +#define IEEE80211_SCAN_TABLE_UNLOCK(_st) mtx_unlock(&(_st)->st_lock) + +/* * Node reference counting definitions. * * ieee80211_node_initref initialize the reference count to 1 Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Wed Apr 14 18:29:34 2010 (r206616) +++ head/sys/net80211/ieee80211_scan_sta.c Wed Apr 14 18:29:40 2010 (r206617) @@ -97,7 +97,7 @@ struct sta_entry { CTASSERT(MAX_IEEE_CHAN >= 256); struct sta_table { - struct mtx st_lock; /* on scan table */ + ieee80211_scan_table_lock_t st_lock; /* on scan table */ TAILQ_HEAD(, sta_entry) st_entry; /* all entries */ LIST_HEAD(, sta_entry) st_hash[STA_HASHSIZE]; struct mtx st_scanlock; /* on st_scaniter */ @@ -161,7 +161,7 @@ sta_attach(struct ieee80211_scan_state * M_80211_SCAN, M_NOWAIT | M_ZERO); if (st == NULL) return 0; - mtx_init(&st->st_lock, "scantable", "802.11 scan table", MTX_DEF); + IEEE80211_SCAN_TABLE_LOCK_INIT(st, "scantable"); mtx_init(&st->st_scanlock, "scangen", "802.11 scangen", MTX_DEF); TAILQ_INIT(&st->st_entry); ss->ss_priv = st; @@ -179,7 +179,7 @@ sta_detach(struct ieee80211_scan_state * if (st != NULL) { sta_flush_table(st); - mtx_destroy(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK_DESTROY(st); mtx_destroy(&st->st_scanlock); free(st, M_80211_SCAN); KASSERT(nrefs > 0, ("imbalanced attach/detach")); @@ -196,9 +196,9 @@ sta_flush(struct ieee80211_scan_state *s { struct sta_table *st = ss->ss_priv; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); sta_flush_table(st); - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); ss->ss_last = 0; return 0; } @@ -244,14 +244,14 @@ sta_add(struct ieee80211_scan_state *ss, hash = STA_HASH(macaddr); - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); LIST_FOREACH(se, &st->st_hash[hash], se_hash) if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr)) goto found; se = (struct sta_entry *) malloc(sizeof(struct sta_entry), M_80211_SCAN, M_NOWAIT | M_ZERO); if (se == NULL) { - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); return 0; } se->se_scangen = st->st_scaniter-1; @@ -370,7 +370,7 @@ found: if (rssi > st->st_maxrssi[sp->bchan]) st->st_maxrssi[sp->bchan] = rssi; - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); /* * If looking for a quick choice and nothing's @@ -1132,7 +1132,7 @@ sta_update_notseen(struct sta_table *st) { struct sta_entry *se; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH(se, &st->st_entry, se_list) { /* * If seen the reset and don't bump the count; @@ -1146,7 +1146,7 @@ sta_update_notseen(struct sta_table *st) else se->se_notseen++; } - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); } static void @@ -1154,11 +1154,11 @@ sta_dec_fails(struct sta_table *st) { struct sta_entry *se; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH(se, &st->st_entry, se_list) if (se->se_fails) se->se_fails--; - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); } static struct sta_entry * @@ -1169,7 +1169,7 @@ select_bss(struct ieee80211_scan_state * IEEE80211_DPRINTF(vap, debug, " %s\n", "macaddr bssid chan rssi rate flag wep essid"); - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH(se, &st->st_entry, se_list) { ieee80211_ies_expand(&se->base.se_ies); if (match_bss(vap, ss, se, debug) == 0) { @@ -1179,7 +1179,7 @@ select_bss(struct ieee80211_scan_state * selbs = se; } } - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); return selbs; } @@ -1258,11 +1258,11 @@ sta_lookup(struct sta_table *st, const u struct sta_entry *se; int hash = STA_HASH(macaddr); - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); LIST_FOREACH(se, &st->st_hash[hash], se_hash) if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr)) break; - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); return se; /* NB: unlocked */ } @@ -1382,18 +1382,18 @@ sta_iterate(struct ieee80211_scan_state mtx_lock(&st->st_scanlock); gen = st->st_scaniter++; restart: - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH(se, &st->st_entry, se_list) { if (se->se_scangen != gen) { se->se_scangen = gen; /* update public state */ se->base.se_age = ticks - se->se_lastupdate; - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); (*f)(arg, &se->base); goto restart; } } - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); mtx_unlock(&st->st_scanlock); } @@ -1510,7 +1510,7 @@ adhoc_pick_channel(struct ieee80211_scan bestchan = NULL; bestrssi = -1; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); for (i = 0; i < ss->ss_last; i++) { c = ss->ss_chans[i]; /* never consider a channel with radar */ @@ -1532,7 +1532,7 @@ adhoc_pick_channel(struct ieee80211_scan if (bestchan == NULL || maxrssi < bestrssi) bestchan = c; } - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); return bestchan; } @@ -1638,7 +1638,7 @@ adhoc_age(struct ieee80211_scan_state *s struct sta_table *st = ss->ss_priv; struct sta_entry *se, *next; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH_SAFE(se, &st->st_entry, se_list, next) { if (se->se_notseen > STA_PURGE_SCANS) { TAILQ_REMOVE(&st->st_entry, se, se_list); @@ -1647,7 +1647,7 @@ adhoc_age(struct ieee80211_scan_state *s free(se, M_80211_SCAN); } } - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); } static const struct ieee80211_scanner adhoc_default = { From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 18:56:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2188A1065672; Wed, 14 Apr 2010 18:56:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 119658FC16; Wed, 14 Apr 2010 18:56: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 o3EIu7rN057639; Wed, 14 Apr 2010 18:56:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EIu75u057637; Wed, 14 Apr 2010 18:56:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004141856.o3EIu75u057637@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Apr 2010 18:56: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: r206618 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 18:56:08 -0000 Author: imp Date: Wed Apr 14 18:56:07 2010 New Revision: 206618 URL: http://svn.freebsd.org/changeset/base/206618 Log: Add note about TARGET_ARCH Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Apr 14 18:29:40 2010 (r206617) +++ head/Makefile.inc1 Wed Apr 14 18:56:07 2010 (r206618) @@ -15,6 +15,7 @@ # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # TARGET="machine" to crossbuild world for a different machine type +# TARGET_ARCH= may be required when a TARGET supports multiple endians # # The intended user-driven targets are: From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 19:03:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1F2E106566C; Wed, 14 Apr 2010 19:03:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E18438FC17; Wed, 14 Apr 2010 19:03: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 o3EJ3R7E059384; Wed, 14 Apr 2010 19:03:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EJ3RCI059382; Wed, 14 Apr 2010 19:03:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004141903.o3EJ3RCI059382@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Apr 2010 19:03: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: r206619 - head/contrib/binutils/bfd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 19:03:28 -0000 Author: imp Date: Wed Apr 14 19:03:27 2010 New Revision: 206619 URL: http://svn.freebsd.org/changeset/base/206619 Log: Add armeb-*-freebsd* to the list of known architectures. This is like arm-*-freebsd*, except it defaults to big endian builds instead of little endian builds. Modified: head/contrib/binutils/bfd/config.bfd Modified: head/contrib/binutils/bfd/config.bfd ============================================================================== --- head/contrib/binutils/bfd/config.bfd Wed Apr 14 18:56:07 2010 (r206618) +++ head/contrib/binutils/bfd/config.bfd Wed Apr 14 19:03:27 2010 (r206619) @@ -221,6 +221,10 @@ case "${targ}" in targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; + armeb-*-freebsd*) + targ_defvec=bfd_elf32_bigarm_vec + targ_selvecs=bfd_elf32_littlearm_vec + ;; arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks) targ_defvec=bfd_elf32_littlearm_vec From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 19:06:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7477D106566C; Wed, 14 Apr 2010 19:06:39 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 641C68FC0A; Wed, 14 Apr 2010 19:06: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 o3EJ6dd0060156; Wed, 14 Apr 2010 19:06:39 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EJ6dQt060154; Wed, 14 Apr 2010 19:06:39 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201004141906.o3EJ6dQt060154@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 14 Apr 2010 19:06: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: r206621 - head/usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 19:06:39 -0000 Author: uqs Date: Wed Apr 14 19:06:39 2010 New Revision: 206621 URL: http://svn.freebsd.org/changeset/base/206621 Log: Add and expand $FreeBSD$ keyword to allow committing to this file. Modified: head/usr.bin/csup/cpasswd.1 (contents, props changed) Modified: head/usr.bin/csup/cpasswd.1 ============================================================================== --- head/usr.bin/csup/cpasswd.1 Wed Apr 14 19:04:38 2010 (r206620) +++ head/usr.bin/csup/cpasswd.1 Wed Apr 14 19:06:39 2010 (r206621) @@ -27,7 +27,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: cvpasswd.1,v 1.4 2003/03/04 18:24:42 jdp Exp $ -.\" $FreeBSD $ +.\" $FreeBSD$ .\" .Dd June 27, 2007 .Os FreeBSD From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 19:08:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 135CC1065675; Wed, 14 Apr 2010 19:08:08 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F20988FC1E; Wed, 14 Apr 2010 19:08:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EJ87f0060603; Wed, 14 Apr 2010 19:08:07 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EJ86u3060516; Wed, 14 Apr 2010 19:08:06 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201004141908.o3EJ86u3060516@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 14 Apr 2010 19:08: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: r206622 - in head: bin/pwait contrib/com_err gnu/usr.bin/gdb/kgdb lib/libc/gen lib/libc/posix1e lib/libc/stdlib lib/libcam lib/libcompat/4.1 lib/libcompat/4.4 lib/libedit lib/libelf 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: Wed, 14 Apr 2010 19:08:08 -0000 Author: uqs Date: Wed Apr 14 19:08:06 2010 New Revision: 206622 URL: http://svn.freebsd.org/changeset/base/206622 Log: mdoc: order prologue macros consistently by Dd/Dt/Os Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors) Modified: head/bin/pwait/pwait.1 head/contrib/com_err/compile_et.1 head/gnu/usr.bin/gdb/kgdb/kgdb.1 head/lib/libc/gen/check_utility_compat.3 head/lib/libc/gen/dladdr.3 head/lib/libc/gen/dlinfo.3 head/lib/libc/gen/dllockinit.3 head/lib/libc/gen/dlopen.3 head/lib/libc/gen/fmtcheck.3 head/lib/libc/gen/ftok.3 head/lib/libc/gen/getutxent.3 head/lib/libc/gen/setproctitle.3 head/lib/libc/gen/stringlist.3 head/lib/libc/posix1e/mac_prepare.3 head/lib/libc/stdlib/hcreate.3 head/lib/libc/stdlib/ptsname.3 head/lib/libcam/cam.3 head/lib/libcam/cam_cdbparse.3 head/lib/libcompat/4.1/cftime.3 head/lib/libcompat/4.4/cuserid.3 head/lib/libedit/editline.3 head/lib/libedit/editrc.5 head/lib/libelf/elf.3 head/lib/libelf/elf_begin.3 head/lib/libelf/elf_cntl.3 head/lib/libelf/elf_end.3 head/lib/libelf/elf_errmsg.3 head/lib/libelf/elf_fill.3 head/lib/libelf/elf_flagdata.3 head/lib/libelf/elf_getarhdr.3 head/lib/libelf/elf_getarsym.3 head/lib/libelf/elf_getbase.3 head/lib/libelf/elf_getdata.3 head/lib/libelf/elf_getident.3 head/lib/libelf/elf_getphnum.3 head/lib/libelf/elf_getscn.3 head/lib/libelf/elf_getshnum.3 head/lib/libelf/elf_getshstrndx.3 head/lib/libelf/elf_hash.3 head/lib/libelf/elf_kind.3 head/lib/libelf/elf_memory.3 head/lib/libelf/elf_next.3 head/lib/libelf/elf_rand.3 head/lib/libelf/elf_rawfile.3 head/lib/libelf/elf_strptr.3 head/lib/libelf/elf_update.3 head/lib/libelf/elf_version.3 head/lib/libelf/gelf.3 head/lib/libelf/gelf_checksum.3 head/lib/libelf/gelf_fsize.3 head/lib/libelf/gelf_getcap.3 head/lib/libelf/gelf_getclass.3 head/lib/libelf/gelf_getdyn.3 head/lib/libelf/gelf_getehdr.3 head/lib/libelf/gelf_getmove.3 head/lib/libelf/gelf_getphdr.3 head/lib/libelf/gelf_getrel.3 head/lib/libelf/gelf_getrela.3 head/lib/libelf/gelf_getshdr.3 head/lib/libelf/gelf_getsym.3 head/lib/libelf/gelf_getsyminfo.3 head/lib/libelf/gelf_getsymshndx.3 head/lib/libelf/gelf_newehdr.3 head/lib/libelf/gelf_newphdr.3 head/lib/libelf/gelf_update_ehdr.3 head/lib/libelf/gelf_xlatetof.3 head/lib/libgssapi/gss_accept_sec_context.3 head/lib/libgssapi/gss_acquire_cred.3 head/lib/libgssapi/gss_add_cred.3 head/lib/libgssapi/gss_add_oid_set_member.3 head/lib/libgssapi/gss_canonicalize_name.3 head/lib/libgssapi/gss_compare_name.3 head/lib/libgssapi/gss_context_time.3 head/lib/libgssapi/gss_create_empty_oid_set.3 head/lib/libgssapi/gss_delete_sec_context.3 head/lib/libgssapi/gss_display_name.3 head/lib/libgssapi/gss_display_status.3 head/lib/libgssapi/gss_duplicate_name.3 head/lib/libgssapi/gss_export_name.3 head/lib/libgssapi/gss_export_sec_context.3 head/lib/libgssapi/gss_get_mic.3 head/lib/libgssapi/gss_import_name.3 head/lib/libgssapi/gss_import_sec_context.3 head/lib/libgssapi/gss_indicate_mechs.3 head/lib/libgssapi/gss_init_sec_context.3 head/lib/libgssapi/gss_inquire_context.3 head/lib/libgssapi/gss_inquire_cred.3 head/lib/libgssapi/gss_inquire_cred_by_mech.3 head/lib/libgssapi/gss_inquire_mechs_for_name.3 head/lib/libgssapi/gss_inquire_names_for_mech.3 head/lib/libgssapi/gss_process_context_token.3 head/lib/libgssapi/gss_release_buffer.3 head/lib/libgssapi/gss_release_cred.3 head/lib/libgssapi/gss_release_name.3 head/lib/libgssapi/gss_release_oid_set.3 head/lib/libgssapi/gss_test_oid_set_member.3 head/lib/libgssapi/gss_unwrap.3 head/lib/libgssapi/gss_verify_mic.3 head/lib/libgssapi/gss_wrap.3 head/lib/libgssapi/gss_wrap_size_limit.3 head/lib/libmemstat/libmemstat.3 head/lib/libpmc/pmc.3 head/lib/libpmc/pmc.atom.3 head/lib/libpmc/pmc.core.3 head/lib/libpmc/pmc.core2.3 head/lib/libpmc/pmc.corei7.3 head/lib/libpmc/pmc.corei7uc.3 head/lib/libpmc/pmc.iaf.3 head/lib/libpmc/pmc.k7.3 head/lib/libpmc/pmc.k8.3 head/lib/libpmc/pmc.p4.3 head/lib/libpmc/pmc.p5.3 head/lib/libpmc/pmc.p6.3 head/lib/libpmc/pmc.tsc.3 head/lib/libpmc/pmc.ucf.3 head/lib/libpmc/pmc.westmere.3 head/lib/libpmc/pmc.westmereuc.3 head/lib/libpmc/pmc_allocate.3 head/lib/libpmc/pmc_attach.3 head/lib/libpmc/pmc_capabilities.3 head/lib/libpmc/pmc_configure_logfile.3 head/lib/libpmc/pmc_disable.3 head/lib/libpmc/pmc_event_names_of_class.3 head/lib/libpmc/pmc_get_driver_stats.3 head/lib/libpmc/pmc_get_msr.3 head/lib/libpmc/pmc_init.3 head/lib/libpmc/pmc_name_of_capability.3 head/lib/libpmc/pmc_read.3 head/lib/libpmc/pmc_set.3 head/lib/libpmc/pmc_start.3 head/lib/libpmc/pmclog.3 head/lib/libthr/libthr.3 head/lib/libugidfw/bsde_get_rule.3 head/lib/libugidfw/bsde_get_rule_count.3 head/lib/libugidfw/bsde_parse_rule.3 head/lib/libugidfw/bsde_rule_to_string.3 head/lib/libugidfw/libugidfw.3 head/lib/libulog/ulog_login.3 head/lib/libulog/utempter_add_record.3 head/lib/libutil/_secure_path.3 head/lib/libutil/auth.3 head/lib/libutil/hexdump.3 head/lib/libutil/kinfo_getfile.3 head/lib/libutil/kinfo_getvmmap.3 head/lib/libutil/kld.3 head/lib/libutil/login_auth.3 head/lib/libutil/login_cap.3 head/lib/libutil/login_class.3 head/lib/libutil/login_ok.3 head/lib/libutil/login_times.3 head/lib/libutil/login_tty.3 head/lib/libutil/property.3 head/lib/libutil/pty.3 head/lib/libutil/realhostname.3 head/lib/libutil/realhostname_sa.3 head/lib/libutil/trimdomain.3 head/lib/libutil/uucplock.3 head/sbin/iscontrol/iscsi.conf.5 head/sbin/spppcontrol/spppcontrol.8 head/share/man/man3/sysexits.3 head/share/man/man3/tgmath.3 head/share/man/man4/audit.4 head/share/man/man4/auditpipe.4 head/share/man/man4/coda.4 head/share/man/man4/gbde.4 head/share/man/man4/geom.4 head/share/man/man4/geom_fox.4 head/share/man/man4/geom_linux_lvm.4 head/share/man/man4/geom_uzip.4 head/share/man/man4/ipw.4 head/share/man/man4/iscsi_initiator.4 head/share/man/man4/iwi.4 head/share/man/man4/iwn.4 head/share/man/man4/kbdmux.4 head/share/man/man4/lp.4 head/share/man/man4/mac.4 head/share/man/man4/mac_biba.4 head/share/man/man4/mac_bsdextended.4 head/share/man/man4/mac_ifoff.4 head/share/man/man4/mac_lomac.4 head/share/man/man4/mac_mls.4 head/share/man/man4/mac_none.4 head/share/man/man4/mac_partition.4 head/share/man/man4/mac_seeotheruids.4 head/share/man/man4/mac_stub.4 head/share/man/man4/mac_test.4 head/share/man/man4/ng_netflow.4 head/share/man/man4/orm.4 head/share/man/man4/ral.4 head/share/man/man4/rp.4 head/share/man/man4/rum.4 head/share/man/man4/run.4 head/share/man/man4/sched_4bsd.4 head/share/man/man4/sched_ule.4 head/share/man/man4/si.4 head/share/man/man4/tap.4 head/share/man/man4/uhso.4 head/share/man/man4/upgt.4 head/share/man/man4/ural.4 head/share/man/man4/vkbd.4 head/share/man/man4/wpi.4 head/share/man/man5/ar.5 head/share/man/man7/clocks.7 head/share/man/man7/maclabel.7 head/share/man/man8/picobsd.8 head/share/man/man8/rescue.8 head/share/man/man9/CTASSERT.9 head/share/man/man9/DELAY.9 head/share/man/man9/KASSERT.9 head/share/man/man9/VFS.9 head/share/man/man9/VFS_CHECKEXP.9 head/share/man/man9/VFS_FHTOVP.9 head/share/man/man9/VFS_MOUNT.9 head/share/man/man9/VFS_QUOTACTL.9 head/share/man/man9/VFS_ROOT.9 head/share/man/man9/VFS_STATFS.9 head/share/man/man9/VFS_SYNC.9 head/share/man/man9/VFS_UNMOUNT.9 head/share/man/man9/VFS_VGET.9 head/share/man/man9/VOP_ACCESS.9 head/share/man/man9/VOP_ACLCHECK.9 head/share/man/man9/VOP_ADVLOCK.9 head/share/man/man9/VOP_ATTRIB.9 head/share/man/man9/VOP_BWRITE.9 head/share/man/man9/VOP_CREATE.9 head/share/man/man9/VOP_FSYNC.9 head/share/man/man9/VOP_GETACL.9 head/share/man/man9/VOP_GETEXTATTR.9 head/share/man/man9/VOP_GETPAGES.9 head/share/man/man9/VOP_GETVOBJECT.9 head/share/man/man9/VOP_INACTIVE.9 head/share/man/man9/VOP_IOCTL.9 head/share/man/man9/VOP_LINK.9 head/share/man/man9/VOP_LISTEXTATTR.9 head/share/man/man9/VOP_LOCK.9 head/share/man/man9/VOP_LOOKUP.9 head/share/man/man9/VOP_OPENCLOSE.9 head/share/man/man9/VOP_PATHCONF.9 head/share/man/man9/VOP_PRINT.9 head/share/man/man9/VOP_RDWR.9 head/share/man/man9/VOP_READDIR.9 head/share/man/man9/VOP_READLINK.9 head/share/man/man9/VOP_REALLOCBLKS.9 head/share/man/man9/VOP_REMOVE.9 head/share/man/man9/VOP_RENAME.9 head/share/man/man9/VOP_REVOKE.9 head/share/man/man9/VOP_SETACL.9 head/share/man/man9/VOP_SETEXTATTR.9 head/share/man/man9/VOP_STRATEGY.9 head/share/man/man9/VOP_VPTOCNP.9 head/share/man/man9/VOP_VPTOFH.9 head/share/man/man9/accept_filter.9 head/share/man/man9/accf_data.9 head/share/man/man9/accf_dns.9 head/share/man/man9/accf_http.9 head/share/man/man9/acl.9 head/share/man/man9/atomic.9 head/share/man/man9/cr_cansee.9 head/share/man/man9/cr_seeothergids.9 head/share/man/man9/cr_seeotheruids.9 head/share/man/man9/devfs_set_cdevpriv.9 head/share/man/man9/devtoname.9 head/share/man/man9/extattr.9 head/share/man/man9/firmware.9 head/share/man/man9/hexdump.9 head/share/man/man9/ifnet.9 head/share/man/man9/make_dev.9 head/share/man/man9/namei.9 head/share/man/man9/p_candebug.9 head/share/man/man9/p_cansee.9 head/share/man/man9/pfind.9 head/share/man/man9/pgfind.9 head/share/man/man9/prison_check.9 head/share/man/man9/random.9 head/share/man/man9/rijndael.9 head/share/man/man9/rtalloc.9 head/share/man/man9/rtentry.9 head/share/man/man9/sleep.9 head/share/man/man9/spl.9 head/share/man/man9/uio.9 head/share/man/man9/usbdi.9 head/share/man/man9/vaccess.9 head/share/man/man9/vaccess_acl_nfs4.9 head/share/man/man9/vaccess_acl_posix1e.9 head/share/man/man9/vcount.9 head/share/man/man9/vget.9 head/share/man/man9/vm_map_entry_resize_free.9 head/share/man/man9/vnode.9 head/share/man/man9/vput.9 head/share/man/man9/vref.9 head/share/man/man9/vrefcnt.9 head/share/man/man9/vrele.9 head/usr.bin/ar/ar.1 head/usr.bin/c89/c89.1 head/usr.bin/c99/c99.1 head/usr.bin/column/column.1 head/usr.bin/comm/comm.1 head/usr.bin/csup/cpasswd.1 head/usr.bin/csup/csup.1 head/usr.bin/enigma/enigma.1 head/usr.bin/hexdump/od.1 head/usr.bin/killall/killall.1 head/usr.bin/lockf/lockf.1 head/usr.bin/wtmpcvt/wtmpcvt.1 head/usr.sbin/asf/asf.8 head/usr.sbin/burncd/burncd.8 head/usr.sbin/ctm/ctm/ctm.1 head/usr.sbin/ctm/ctm/ctm.5 head/usr.sbin/devinfo/devinfo.8 head/usr.sbin/fdformat/fdformat.1 head/usr.sbin/fdread/fdread.1 head/usr.sbin/fdwrite/fdwrite.1 head/usr.sbin/fifolog/fifolog_create/fifolog.1 head/usr.sbin/flowctl/flowctl.8 head/usr.sbin/mtest/mtest.8 head/usr.sbin/periodic/periodic.8 head/usr.sbin/pmcannotate/pmcannotate.8 head/usr.sbin/pmccontrol/pmccontrol.8 head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pppctl/pppctl.8 head/usr.sbin/setfmac/setfsmac.8 head/usr.sbin/setpmac/setpmac.8 head/usr.sbin/uhsoctl/uhsoctl.1 Modified: head/bin/pwait/pwait.1 ============================================================================== --- head/bin/pwait/pwait.1 Wed Apr 14 19:06:39 2010 (r206621) +++ head/bin/pwait/pwait.1 Wed Apr 14 19:08:06 2010 (r206622) @@ -33,8 +33,8 @@ .\" $FreeBSD$ .\" .Dd November 1, 2009 -.Os .Dt PWAIT 1 +.Os .Sh NAME .Nm pwait .Nd wait for processes to terminate Modified: head/contrib/com_err/compile_et.1 ============================================================================== --- head/contrib/com_err/compile_et.1 Wed Apr 14 19:06:39 2010 (r206621) +++ head/contrib/com_err/compile_et.1 Wed Apr 14 19:08:06 2010 (r206622) @@ -4,8 +4,8 @@ .\" $FreeBSD$ .\" .Dd November 22, 1988 -.Os .Dt COMPILE_ET 1 +.Os .Sh NAME .Nm compile_et .Nd error table compiler Modified: head/gnu/usr.bin/gdb/kgdb/kgdb.1 ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/kgdb.1 Wed Apr 14 19:06:39 2010 (r206621) +++ head/gnu/usr.bin/gdb/kgdb/kgdb.1 Wed Apr 14 19:08:06 2010 (r206622) @@ -25,8 +25,8 @@ .\" $FreeBSD$ .\" .Dd October 11, 2006 -.Os .Dt KGDB 1 +.Os .Sh NAME .Nm kgdb .Nd "kernel debugger" Modified: head/lib/libc/gen/check_utility_compat.3 ============================================================================== --- head/lib/libc/gen/check_utility_compat.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/check_utility_compat.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd October 27, 2002 -.Os .Dt CHECK_UTILITY_COMPAT 3 +.Os .Sh NAME .Nm check_utility_compat .Nd "determine whether a utility should be compatible" Modified: head/lib/libc/gen/dladdr.3 ============================================================================== --- head/lib/libc/gen/dladdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/dladdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -26,8 +26,8 @@ .\" $FreeBSD$ .\" .Dd February 5, 1998 -.Os .Dt DLADDR 3 +.Os .Sh NAME .Nm dladdr .Nd find the shared object containing a given address Modified: head/lib/libc/gen/dlinfo.3 ============================================================================== --- head/lib/libc/gen/dlinfo.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/dlinfo.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -26,8 +26,8 @@ .\" $FreeBSD$ .\" .Dd February 14, 2003 -.Os .Dt DLINFO 3 +.Os .Sh NAME .Nm dlinfo .Nd information about dynamically loaded object Modified: head/lib/libc/gen/dllockinit.3 ============================================================================== --- head/lib/libc/gen/dllockinit.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/dllockinit.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -26,8 +26,8 @@ .\" $FreeBSD$ .\" .Dd July 5, 2000 -.Os .Dt DLLOCKINIT 3 +.Os .Sh NAME .Nm dllockinit .Nd register thread locking methods with the dynamic linker Modified: head/lib/libc/gen/dlopen.3 ============================================================================== --- head/lib/libc/gen/dlopen.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/dlopen.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -33,8 +33,8 @@ .\" $FreeBSD$ .\" .Dd July 7, 2009 -.Os .Dt DLOPEN 3 +.Os .Sh NAME .Nm dlopen , .Nm dlsym , Modified: head/lib/libc/gen/fmtcheck.3 ============================================================================== --- head/lib/libc/gen/fmtcheck.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/fmtcheck.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -26,8 +26,8 @@ .\" .\" $FreeBSD$ .Dd October 16, 2002 -.Os .Dt FMTCHECK 3 +.Os .Sh NAME .Nm fmtcheck .Nd sanitizes user-supplied Modified: head/lib/libc/gen/ftok.3 ============================================================================== --- head/lib/libc/gen/ftok.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/ftok.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -25,8 +25,8 @@ .\" .\" $FreeBSD$ .Dd July 9, 2009 -.Os .Dt FTOK 3 +.Os .Sh NAME .Nm ftok .Nd create IPC identifier from path name Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/getutxent.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -25,8 +25,8 @@ .\" $FreeBSD$ .\" .Dd January 8, 2010 -.Os .Dt GETUTXENT 3 +.Os .Sh NAME .Nm endutxent , .Nm getutxent , Modified: head/lib/libc/gen/setproctitle.3 ============================================================================== --- head/lib/libc/gen/setproctitle.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/setproctitle.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -21,8 +21,8 @@ .\" .\" The following requests are required for all man pages. .Dd December 16, 1995 -.Os .Dt SETPROCTITLE 3 +.Os .Sh NAME .Nm setproctitle .Nd set process title Modified: head/lib/libc/gen/stringlist.3 ============================================================================== --- head/lib/libc/gen/stringlist.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/gen/stringlist.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd November 28, 1999 -.Os .Dt STRINGLIST 3 +.Os .Sh NAME .Nm stringlist , .Nm sl_init , Modified: head/lib/libc/posix1e/mac_prepare.3 ============================================================================== --- head/lib/libc/posix1e/mac_prepare.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/posix1e/mac_prepare.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -31,8 +31,8 @@ .\" $FreeBSD$ .\" .Dd August 22, 2003 -.Os .Dt MAC_PREPARE 3 +.Os .Sh NAME .Nm mac_prepare , mac_prepare_type , mac_prepare_file_label , .Nm mac_prepare_ifnet_label , mac_prepare_process_label Modified: head/lib/libc/stdlib/hcreate.3 ============================================================================== --- head/lib/libc/stdlib/hcreate.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/stdlib/hcreate.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd July 6, 2008 -.Os .Dt HCREATE 3 +.Os .Sh NAME .Nm hcreate , hdestroy , hsearch .Nd manage hash search table Modified: head/lib/libc/stdlib/ptsname.3 ============================================================================== --- head/lib/libc/stdlib/ptsname.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libc/stdlib/ptsname.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -32,8 +32,8 @@ .\" $FreeBSD$ .\" .Dd August 20, 2008 -.Os .Dt PTSNAME 3 +.Os .Sh NAME .Nm grantpt , .Nm ptsname , Modified: head/lib/libcam/cam.3 ============================================================================== --- head/lib/libcam/cam.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libcam/cam.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" $FreeBSD$ .\" .Dd October 10, 1998 -.Os .Dt CAM 3 +.Os .Sh NAME .Nm cam_open_device , .Nm cam_open_spec_device , Modified: head/lib/libcam/cam_cdbparse.3 ============================================================================== --- head/lib/libcam/cam_cdbparse.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libcam/cam_cdbparse.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -62,8 +62,8 @@ .\" .\" .Dd October 13, 1998 -.Os .Dt CAM_CDBPARSE 3 +.Os .Sh NAME .Nm csio_build , .Nm csio_build_visit , Modified: head/lib/libcompat/4.1/cftime.3 ============================================================================== --- head/lib/libcompat/4.1/cftime.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libcompat/4.1/cftime.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -35,8 +35,8 @@ .\" $FreeBSD$ .\" .Dd June 15, 1993 -.Os .Dt CFTIME 3 +.Os .Sh NAME .Nm cftime , .Nm ascftime Modified: head/lib/libcompat/4.4/cuserid.3 ============================================================================== --- head/lib/libcompat/4.4/cuserid.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libcompat/4.4/cuserid.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -32,8 +32,8 @@ .\" $FreeBSD$ .\" .Dd April 10, 1995 -.Os .Dt CUSERID 3 +.Os .Sh NAME .Nm cuserid .Nd get user name associated with effective UID Modified: head/lib/libedit/editline.3 ============================================================================== --- head/lib/libedit/editline.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libedit/editline.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd January 12, 2007 -.Os .Dt EDITLINE 3 +.Os .Sh NAME .Nm editline , .Nm el_init , Modified: head/lib/libedit/editrc.5 ============================================================================== --- head/lib/libedit/editrc.5 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libedit/editrc.5 Wed Apr 14 19:08:06 2010 (r206622) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd October 18, 2003 -.Os .Dt EDITRC 5 +.Os .Sh NAME .Nm editrc .Nd configuration file for editline library Modified: head/lib/libelf/elf.3 ============================================================================== --- head/lib/libelf/elf.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 21, 2007 -.Os .Dt ELF 3 +.Os .Sh NAME .Nm elf .Nd API for manipulating ELF objects Modified: head/lib/libelf/elf_begin.3 ============================================================================== --- head/lib/libelf/elf_begin.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_begin.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 21, 2006 -.Os .Dt ELF_BEGIN 3 +.Os .Sh NAME .Nm elf_begin .Nd open an ELF file or ar(1) archive Modified: head/lib/libelf/elf_cntl.3 ============================================================================== --- head/lib/libelf/elf_cntl.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_cntl.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 9, 2006 -.Os .Dt ELF_CNTL 3 +.Os .Sh NAME .Nm elf_cntl .Nd control an elf file descriptor Modified: head/lib/libelf/elf_end.3 ============================================================================== --- head/lib/libelf/elf_end.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_end.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 29, 2006 -.Os .Dt ELF_END 3 +.Os .Sh NAME .Nm elf_end .Nd release an ELF descriptor Modified: head/lib/libelf/elf_errmsg.3 ============================================================================== --- head/lib/libelf/elf_errmsg.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_errmsg.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 11, 2006 -.Os .Dt ELF_ERRMSG 3 +.Os .Sh NAME .Nm elf_errmsg , .Nm elf_errno Modified: head/lib/libelf/elf_fill.3 ============================================================================== --- head/lib/libelf/elf_fill.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_fill.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 11, 2006 -.Os .Dt ELF_FILL 3 +.Os .Sh NAME .Nm elf_fill .Nd set fill byte for inter-section padding Modified: head/lib/libelf/elf_flagdata.3 ============================================================================== --- head/lib/libelf/elf_flagdata.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_flagdata.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt ELF_FLAGDATA 3 +.Os .Sh NAME .Nm elf_flagdata , .Nm elf_flagehdr , Modified: head/lib/libelf/elf_getarhdr.3 ============================================================================== --- head/lib/libelf/elf_getarhdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getarhdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 15, 2006 -.Os .Dt ELF_GETARHDR 3 +.Os .Sh NAME .Nm elf_getarhdr .Nd retrieve ar(1) header for an archive member Modified: head/lib/libelf/elf_getarsym.3 ============================================================================== --- head/lib/libelf/elf_getarsym.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getarsym.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 15, 2006 -.Os .Dt ELF_GETARSYM 3 +.Os .Sh NAME .Nm elf_getarsym .Nd retrieve the symbol table of an archive Modified: head/lib/libelf/elf_getbase.3 ============================================================================== --- head/lib/libelf/elf_getbase.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getbase.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 11, 2006 -.Os .Dt ELF_GETBASE 3 +.Os .Sh NAME .Nm elf_getbase .Nd get the base offset for an object file Modified: head/lib/libelf/elf_getdata.3 ============================================================================== --- head/lib/libelf/elf_getdata.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getdata.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 26, 2006 -.Os .Dt ELF_GETDATA 3 +.Os .Sh NAME .Nm elf_getdata , .Nm elf_newdata , Modified: head/lib/libelf/elf_getident.3 ============================================================================== --- head/lib/libelf/elf_getident.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getident.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 3, 2006 -.Os .Dt ELF_GETIDENT 3 +.Os .Sh NAME .Nm elf_getident .Nd return the initial bytes of a file Modified: head/lib/libelf/elf_getphnum.3 ============================================================================== --- head/lib/libelf/elf_getphnum.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getphnum.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd December 16, 2006 -.Os .Dt ELF_GETPHNUM 3 +.Os .Sh NAME .Nm elf_getphnum .Nd return the number of program headers in an ELF file Modified: head/lib/libelf/elf_getscn.3 ============================================================================== --- head/lib/libelf/elf_getscn.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getscn.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt ELF_GETSCN 3 +.Os .Sh NAME .Nm elf_getscn , .Nm elf_ndxscn , Modified: head/lib/libelf/elf_getshnum.3 ============================================================================== --- head/lib/libelf/elf_getshnum.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getshnum.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 31, 2006 -.Os .Dt ELF_GETSHNUM 3 +.Os .Sh NAME .Nm elf_getshnum .Nd return the number of sections in an ELF file Modified: head/lib/libelf/elf_getshstrndx.3 ============================================================================== --- head/lib/libelf/elf_getshstrndx.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_getshstrndx.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 31, 2006 -.Os .Dt ELF_GETSHSTRNDX 3 +.Os .Sh NAME .Nm elf_getshstrndx , .Nm elf_setshstrndx Modified: head/lib/libelf/elf_hash.3 ============================================================================== --- head/lib/libelf/elf_hash.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_hash.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 15, 2006 -.Os .Dt ELF_HASH 3 +.Os .Sh NAME .Nm elf_hash .Nd compute a hash value for a string Modified: head/lib/libelf/elf_kind.3 ============================================================================== --- head/lib/libelf/elf_kind.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_kind.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 1, 2006 -.Os .Dt ELF_KIND 3 +.Os .Sh NAME .Nm elf_kind .Nd determine ELF file type Modified: head/lib/libelf/elf_memory.3 ============================================================================== --- head/lib/libelf/elf_memory.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_memory.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 28, 2006 -.Os .Dt ELF_MEMORY 3 +.Os .Sh NAME .Nm elf_memory .Nd process an ELF or ar(1) archive mapped into memory Modified: head/lib/libelf/elf_next.3 ============================================================================== --- head/lib/libelf/elf_next.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_next.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 17, 2006 -.Os .Dt ELF_NEXT 3 +.Os .Sh NAME .Nm elf_next .Nd provide sequential access to the next archive member Modified: head/lib/libelf/elf_rand.3 ============================================================================== --- head/lib/libelf/elf_rand.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_rand.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 17, 2006 -.Os .Dt ELF_RAND 3 +.Os .Sh NAME .Nm elf_rand .Nd provide sequential access to the next archive member Modified: head/lib/libelf/elf_rawfile.3 ============================================================================== --- head/lib/libelf/elf_rawfile.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_rawfile.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 3, 2006 -.Os .Dt ELF_RAWFILE 3 +.Os .Sh NAME .Nm elf_rawfile .Nd return uninterpreted contents of an ELF file Modified: head/lib/libelf/elf_strptr.3 ============================================================================== --- head/lib/libelf/elf_strptr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_strptr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd December 16, 2006 -.Os .Dt ELF_STRPTR 3 +.Os .Sh NAME .Nm elf_strptr .Nd retrieve a string pointer in a string table Modified: head/lib/libelf/elf_update.3 ============================================================================== --- head/lib/libelf/elf_update.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_update.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd March 19, 2008 -.Os .Dt ELF_UPDATE 3 +.Os .Sh NAME .Nm elf_update .Nd update an ELF descriptor Modified: head/lib/libelf/elf_version.3 ============================================================================== --- head/lib/libelf/elf_version.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/elf_version.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 1, 2006 -.Os .Dt ELF_VERSION 3 +.Os .Sh NAME .Nm elf_version .Nd retrieve or set ELF library operating version Modified: head/lib/libelf/gelf.3 ============================================================================== --- head/lib/libelf/gelf.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd September 1, 2006 -.Os .Dt GELF 3 +.Os .Sh NAME .Nm GElf .Nd class-independent API for ELF manipulation Modified: head/lib/libelf/gelf_checksum.3 ============================================================================== --- head/lib/libelf/gelf_checksum.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_checksum.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_CHECKSUM 3 +.Os .Sh NAME .Nm elf32_checksum , .Nm elf64_checksum , Modified: head/lib/libelf/gelf_fsize.3 ============================================================================== --- head/lib/libelf/gelf_fsize.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_fsize.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd February 5, 2008 -.Os .Dt GELF_FSIZE 3 +.Os .Sh NAME .Nm gelf_fsize , .Nm elf32_fsize , Modified: head/lib/libelf/gelf_getcap.3 ============================================================================== --- head/lib/libelf/gelf_getcap.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getcap.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETCAP 3 +.Os .Sh NAME .Nm gelf_getcap , .Nm gelf_update_cap Modified: head/lib/libelf/gelf_getclass.3 ============================================================================== --- head/lib/libelf/gelf_getclass.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getclass.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 3, 2006 -.Os .Dt GELF_GETCLASS 3 +.Os .Sh NAME .Nm gelf_getclass .Nd retrieve the class of an ELF descriptor Modified: head/lib/libelf/gelf_getdyn.3 ============================================================================== --- head/lib/libelf/gelf_getdyn.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getdyn.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETDYN 3 +.Os .Sh NAME .Nm gelf_getdyn , .Nm gelf_update_dyn Modified: head/lib/libelf/gelf_getehdr.3 ============================================================================== --- head/lib/libelf/gelf_getehdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getehdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd December 16, 2006 -.Os .Dt GELF_GETEHDR 3 +.Os .Sh NAME .Nm elf32_getehdr , .Nm elf64_getehdr , Modified: head/lib/libelf/gelf_getmove.3 ============================================================================== --- head/lib/libelf/gelf_getmove.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getmove.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETMOVE 3 +.Os .Sh NAME .Nm gelf_getmove , .Nm gelf_update_move Modified: head/lib/libelf/gelf_getphdr.3 ============================================================================== --- head/lib/libelf/gelf_getphdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getphdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 21, 2007 -.Os .Dt GELF_GETPHDR 3 +.Os .Sh NAME .Nm elf32_getphdr , .Nm elf64_getphdr , Modified: head/lib/libelf/gelf_getrel.3 ============================================================================== --- head/lib/libelf/gelf_getrel.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getrel.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETREL 3 +.Os .Sh NAME .Nm gelf_getrel , .Nm gelf_update_rel Modified: head/lib/libelf/gelf_getrela.3 ============================================================================== --- head/lib/libelf/gelf_getrela.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getrela.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETRELA 3 +.Os .Sh NAME .Nm gelf_getrela , .Nm gelf_update_rela Modified: head/lib/libelf/gelf_getshdr.3 ============================================================================== --- head/lib/libelf/gelf_getshdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getshdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 27, 2006 -.Os .Dt GELF_GETSHDR 3 +.Os .Sh NAME .Nm elf32_getshdr , .Nm elf64_getshdr , Modified: head/lib/libelf/gelf_getsym.3 ============================================================================== --- head/lib/libelf/gelf_getsym.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getsym.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETSYM 3 +.Os .Sh NAME .Nm gelf_getsym , .Nm gelf_update_sym Modified: head/lib/libelf/gelf_getsyminfo.3 ============================================================================== --- head/lib/libelf/gelf_getsyminfo.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getsyminfo.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETSYMINFO 3 +.Os .Sh NAME .Nm gelf_getsyminfo , .Nm gelf_update_syminfo Modified: head/lib/libelf/gelf_getsymshndx.3 ============================================================================== --- head/lib/libelf/gelf_getsymshndx.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_getsymshndx.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd November 5, 2006 -.Os .Dt GELF_GETSYMSHNDX 3 +.Os .Sh NAME .Nm gelf_getsymshndx , .Nm gelf_update_symshndx Modified: head/lib/libelf/gelf_newehdr.3 ============================================================================== --- head/lib/libelf/gelf_newehdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_newehdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt GELF_NEWEHDR 3 +.Os .Sh NAME .Nm elf32_newehdr , .Nm elf64_newehdr , Modified: head/lib/libelf/gelf_newphdr.3 ============================================================================== --- head/lib/libelf/gelf_newphdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_newphdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt GELF_NEWPHDR 3 +.Os .Sh NAME .Nm elf32_newphdr , .Nm elf64_newphdr , Modified: head/lib/libelf/gelf_update_ehdr.3 ============================================================================== --- head/lib/libelf/gelf_update_ehdr.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_update_ehdr.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 27, 2006 -.Os .Dt GELF_UPDATE_EHDR 3 +.Os .Sh NAME .Nm gelf_update_ehdr , .Nm gelf_update_phdr , Modified: head/lib/libelf/gelf_xlatetof.3 ============================================================================== --- head/lib/libelf/gelf_xlatetof.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libelf/gelf_xlatetof.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 24, 2006 -.Os .Dt GELF_XLATETOF 3 +.Os .Sh NAME .Nm elf32_xlate , .Nm elf64_xlate , Modified: head/lib/libgssapi/gss_accept_sec_context.3 ============================================================================== --- head/lib/libgssapi/gss_accept_sec_context.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_accept_sec_context.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ACCEPT_SEC_CONTEXT 3 PRM +.Os .Sh NAME .Nm gss_accept_sec_context .Nd Accept a security context initiated by a peer application Modified: head/lib/libgssapi/gss_acquire_cred.3 ============================================================================== --- head/lib/libgssapi/gss_acquire_cred.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_acquire_cred.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ACQUIRE_CRED 3 PRM +.Os .Sh NAME .Nm gss_acquire_cred .Nd Obtain a GSS-API credential handle for pre-existing credentials Modified: head/lib/libgssapi/gss_add_cred.3 ============================================================================== --- head/lib/libgssapi/gss_add_cred.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_add_cred.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ADD_CRED 3 PRM +.Os .Sh NAME .Nm gss_add_cred .Nd Construct credentials incrementally Modified: head/lib/libgssapi/gss_add_oid_set_member.3 ============================================================================== --- head/lib/libgssapi/gss_add_oid_set_member.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_add_oid_set_member.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ADD_OID_SET_MEMBER 3 PRM +.Os .Sh NAME .Nm gss_add_oid_set_member .Nd Add an object identifier to a set Modified: head/lib/libgssapi/gss_canonicalize_name.3 ============================================================================== --- head/lib/libgssapi/gss_canonicalize_name.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_canonicalize_name.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_CANONICALIZE_NAME 3 PRM +.Os .Sh NAME .Nm gss_canonicalize_name .Nd Convert an internal name to an MN Modified: head/lib/libgssapi/gss_compare_name.3 ============================================================================== --- head/lib/libgssapi/gss_compare_name.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_compare_name.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_COMPARE_NAME PRM +.Os .Sh NAME .Nm gss_compare_name .Nd Compare two internal-form names Modified: head/lib/libgssapi/gss_context_time.3 ============================================================================== --- head/lib/libgssapi/gss_context_time.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_context_time.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_CONTEXT_TIME 3 PRM +.Os .Sh NAME .Nm gss_context_time .Nd Determine for how long a context will remain valid Modified: head/lib/libgssapi/gss_create_empty_oid_set.3 ============================================================================== --- head/lib/libgssapi/gss_create_empty_oid_set.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_create_empty_oid_set.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_CREATE_EMPTY_OID_SET 3 PRM +.Os .Sh NAME .Nm gss_create_empty_oid_set .Nd Create a set containing no object identifiers Modified: head/lib/libgssapi/gss_delete_sec_context.3 ============================================================================== --- head/lib/libgssapi/gss_delete_sec_context.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_delete_sec_context.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_DELETE_SEC_CONTEXT 3 PRM +.Os .Sh NAME .Nm gss_delete_sec_context .Nd Discard a security context Modified: head/lib/libgssapi/gss_display_name.3 ============================================================================== --- head/lib/libgssapi/gss_display_name.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_display_name.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_DISPLAY_NAME 3 PRM +.Os .Sh NAME .Nm gss_display_name .Nd Convert internal-form name to text Modified: head/lib/libgssapi/gss_display_status.3 ============================================================================== --- head/lib/libgssapi/gss_display_status.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_display_status.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_DISPLAY_STATUS 3 PRM +.Os .Sh NAME .Nm gss_display_status .Nd Convert a GSS-API status code to text Modified: head/lib/libgssapi/gss_duplicate_name.3 ============================================================================== --- head/lib/libgssapi/gss_duplicate_name.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_duplicate_name.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_DUPLICATE_NAME 3 PRM +.Os .Sh NAME .Nm gss_duplicate_name .Nd Create a copy of an internal name Modified: head/lib/libgssapi/gss_export_name.3 ============================================================================== --- head/lib/libgssapi/gss_export_name.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_export_name.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_EXPORT_NAME 3 PRM +.Os .Sh NAME .Nm gss_export_name .Nd Convert an MN to export form Modified: head/lib/libgssapi/gss_export_sec_context.3 ============================================================================== --- head/lib/libgssapi/gss_export_sec_context.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_export_sec_context.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_EXPORT_SEC_CONTEXT 3 PRM +.Os .Sh NAME .Nm gss_export_sec_context .Nd Transfer a security context to another process Modified: head/lib/libgssapi/gss_get_mic.3 ============================================================================== --- head/lib/libgssapi/gss_get_mic.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_get_mic.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_GET_MIC 3 PRM +.Os .Sh NAME .Nm gss_get_mic , .Nm gss_sign Modified: head/lib/libgssapi/gss_import_name.3 ============================================================================== --- head/lib/libgssapi/gss_import_name.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_import_name.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_IMPORT_NAME 3 PRM +.Os .Sh NAME .Nm gss_import_name .Nd Convert a contiguous string name to internal-form Modified: head/lib/libgssapi/gss_import_sec_context.3 ============================================================================== --- head/lib/libgssapi/gss_import_sec_context.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_import_sec_context.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_IMPORT_SEC_CONTEXT 3 PRM +.Os .Sh NAME .Nm gss_import_sec_context .Nd Import a transferred context Modified: head/lib/libgssapi/gss_indicate_mechs.3 ============================================================================== --- head/lib/libgssapi/gss_indicate_mechs.3 Wed Apr 14 19:06:39 2010 (r206621) +++ head/lib/libgssapi/gss_indicate_mechs.3 Wed Apr 14 19:08:06 2010 (r206622) @@ -28,8 +28,8 @@ .\" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 20:04:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D93E106567A; Wed, 14 Apr 2010 20:04:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE438FC13; Wed, 14 Apr 2010 20:04: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 o3EK4tIb073209; Wed, 14 Apr 2010 20:04:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EK4tZa073207; Wed, 14 Apr 2010 20:04:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004142004.o3EK4tZa073207@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 14 Apr 2010 20:04: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: r206623 - 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: Wed, 14 Apr 2010 20:04:55 -0000 Author: kib Date: Wed Apr 14 20:04:55 2010 New Revision: 206623 URL: http://svn.freebsd.org/changeset/base/206623 Log: ld_gs_base is executing with stack containing only the frame, temporary pushed %rflags has been popped already. Pointy hat to: kib MFC after: 3 days Modified: head/sys/amd64/amd64/exception.S Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Wed Apr 14 19:08:06 2010 (r206622) +++ head/sys/amd64/amd64/exception.S Wed Apr 14 20:04:55 2010 (r206623) @@ -815,7 +815,6 @@ fsbase_load_fault: ALIGN_TEXT .globl gsbase_load_fault gsbase_load_fault: - popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) movq %rsp, %rdi call trap From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 20:31:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 678FB1065672; Wed, 14 Apr 2010 20:31:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 548558FC1A; Wed, 14 Apr 2010 20:31: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 o3EKV636078980; Wed, 14 Apr 2010 20:31:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EKV6hR078975; Wed, 14 Apr 2010 20:31:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004142031.o3EKV6hR078975@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Apr 2010 20:31: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: r206624 - head/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: Wed, 14 Apr 2010 20:31:06 -0000 Author: imp Date: Wed Apr 14 20:31:06 2010 New Revision: 206624 URL: http://svn.freebsd.org/changeset/base/206624 Log: Make this directory more regular. Since it is one we control, use the freebsd-based names for filenames. This allows us to eliminate almost all of the uses of ${MACHINE_ARCH} here to do special things, and instead we use it to include filenames. This makes new architectures easier to support. Added: head/gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c - copied unchanged from r206623, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c head/gnu/usr.bin/gdb/gdbserver/reg-amd64.c - copied unchanged from r206623, head/gnu/usr.bin/gdb/gdbserver/reg-x86-64.c head/gnu/usr.bin/gdb/gdbserver/reg-powerpc.c - copied unchanged from r206623, head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c Deleted: head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c head/gnu/usr.bin/gdb/gdbserver/reg-x86-64.c Modified: head/gnu/usr.bin/gdb/gdbserver/Makefile Modified: head/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/gdbserver/Makefile Wed Apr 14 20:04:55 2010 (r206623) +++ head/gnu/usr.bin/gdb/gdbserver/Makefile Wed Apr 14 20:31:06 2010 (r206624) @@ -14,20 +14,9 @@ SRCS= inferiors.c mem-break.c regcache.c server.c signals.c target.c utils.c SRCS+= fbsd-low.c -.if ${MACHINE_ARCH} == "amd64" -SRCS+= fbsd-amd64-low.c i387-fp.c reg-x86-64.c -.endif - -.if ${MACHINE_ARCH} == "arm" -SRCS+= fbsd-arm-low.c reg-arm.c -.endif - -.if ${MACHINE_ARCH} == "i386" -SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c -.endif - -.if ${MACHINE_ARCH} == "powerpc" -SRCS+= fbsd-ppc-low.c reg-ppc.c +SRCS+= fbsd-${MACHINE_ARCH}-low.c reg-${MACHINE_ARCH}.c +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +SRCS+= i387-fp.c .endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} Copied: head/gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c (from r206623, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c Wed Apr 14 20:31:06 2010 (r206624, copy of r206623, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c) @@ -0,0 +1,156 @@ +/* FreeBSD/PowerPC specific low level interface, for the remote server for + GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 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. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#include +#include + +#define ppc_num_regs 71 + +/* Currently, don't check/send MQ. */ +static int ppc_regmap[] = + { 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, +#if 0 + /* + * XXX on FreeBSD the gdbserver for PowerPC was only tested with FPU-less + * cores i.e. e500. Let's leave the original FPR references around in case + * someone picks up and brings support for AIM-like FPU machines. + */ + PT_FPR0*4, PT_FPR0*4 + 8, PT_FPR0*4+16, PT_FPR0*4+24, + PT_FPR0*4+32, PT_FPR0*4+40, PT_FPR0*4+48, PT_FPR0*4+56, + PT_FPR0*4+64, PT_FPR0*4+72, PT_FPR0*4+80, PT_FPR0*4+88, + PT_FPR0*4+96, PT_FPR0*4+104, PT_FPR0*4+112, PT_FPR0*4+120, + PT_FPR0*4+128, PT_FPR0*4+136, PT_FPR0*4+144, PT_FPR0*4+152, + PT_FPR0*4+160, PT_FPR0*4+168, PT_FPR0*4+176, PT_FPR0*4+184, + PT_FPR0*4+192, PT_FPR0*4+200, PT_FPR0*4+208, PT_FPR0*4+216, + PT_FPR0*4+224, PT_FPR0*4+232, PT_FPR0*4+240, PT_FPR0*4+248, +#endif + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 144, -1, 132, 128, 140, 136, -1 + }; + +static int +ppc_cannot_store_register (int regno) +{ + /* Some kernels do not allow us to store fpscr. */ + if (regno == find_regno ("fpscr")) + return 2; + + return 0; +} + +static int +ppc_cannot_fetch_register (int regno) +{ + return 0; +} + +static CORE_ADDR +ppc_get_pc (void) +{ + unsigned long pc; + + collect_register_by_name ("pc", &pc); + return (CORE_ADDR) pc; +} + +static void +ppc_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. Note that this file is + for PowerPC only, not PowerPC64. + This instruction is "twge r2, r2", which GDB uses as a software + breakpoint. */ +static const unsigned long ppc_breakpoint = 0x7d821008; +#define ppc_breakpoint_len 4 + +static int +ppc_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == ppc_breakpoint) + return 1; + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +static void +ppc_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < ppc_num_regs; i++) + if (ppc_regmap[i] != -1) + collect_register (i, ((char *) buf) + ppc_regmap[i]); + +} + +static void +ppc_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < ppc_num_regs; i++) + if (ppc_regmap[i] != -1) + supply_register (i, ((char *) buf) + ppc_regmap[i]); + +} + +struct regset_info target_regsets[] = { + { PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + ppc_fill_gregset, ppc_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + ppc_num_regs, + ppc_regmap, + ppc_cannot_fetch_register, + ppc_cannot_store_register, + ppc_get_pc, + ppc_set_pc, + (const char *) &ppc_breakpoint, + ppc_breakpoint_len, + NULL, + 0, + ppc_breakpoint_at, +}; Copied: head/gnu/usr.bin/gdb/gdbserver/reg-amd64.c (from r206623, head/gnu/usr.bin/gdb/gdbserver/reg-x86-64.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/gdb/gdbserver/reg-amd64.c Wed Apr 14 20:31:06 2010 (r206624, copy of r206623, head/gnu/usr.bin/gdb/gdbserver/reg-x86-64.c) @@ -0,0 +1,99 @@ +/* *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 ``../../../../contrib/gdb/gdb/regformats/reg-x86-64.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_x86_64[] = { + { "rax", 0, 64 }, + { "rbx", 64, 64 }, + { "rcx", 128, 64 }, + { "rdx", 192, 64 }, + { "rsi", 256, 64 }, + { "rdi", 320, 64 }, + { "rbp", 384, 64 }, + { "rsp", 448, 64 }, + { "r8", 512, 64 }, + { "r9", 576, 64 }, + { "r10", 640, 64 }, + { "r11", 704, 64 }, + { "r12", 768, 64 }, + { "r13", 832, 64 }, + { "r14", 896, 64 }, + { "r15", 960, 64 }, + { "rip", 1024, 64 }, + { "eflags", 1088, 32 }, + { "cs", 1120, 32 }, + { "ss", 1152, 32 }, + { "ds", 1184, 32 }, + { "es", 1216, 32 }, + { "fs", 1248, 32 }, + { "gs", 1280, 32 }, + { "st0", 1312, 80 }, + { "st1", 1392, 80 }, + { "st2", 1472, 80 }, + { "st3", 1552, 80 }, + { "st4", 1632, 80 }, + { "st5", 1712, 80 }, + { "st6", 1792, 80 }, + { "st7", 1872, 80 }, + { "fctrl", 1952, 32 }, + { "fstat", 1984, 32 }, + { "ftag", 2016, 32 }, + { "fiseg", 2048, 32 }, + { "fioff", 2080, 32 }, + { "foseg", 2112, 32 }, + { "fooff", 2144, 32 }, + { "fop", 2176, 32 }, + { "xmm0", 2208, 128 }, + { "xmm1", 2336, 128 }, + { "xmm2", 2464, 128 }, + { "xmm3", 2592, 128 }, + { "xmm4", 2720, 128 }, + { "xmm5", 2848, 128 }, + { "xmm6", 2976, 128 }, + { "xmm7", 3104, 128 }, + { "xmm8", 3232, 128 }, + { "xmm9", 3360, 128 }, + { "xmm10", 3488, 128 }, + { "xmm11", 3616, 128 }, + { "xmm12", 3744, 128 }, + { "xmm13", 3872, 128 }, + { "xmm14", 4000, 128 }, + { "xmm15", 4128, 128 }, + { "mxcsr", 4256, 32 }, +}; + +const char *expedite_regs_x86_64[] = { "rbp", "rsp", "rip", 0 }; + +void +init_registers () +{ + set_register_cache (regs_x86_64, + sizeof (regs_x86_64) / sizeof (regs_x86_64[0])); + gdbserver_expedite_regs = expedite_regs_x86_64; +} Copied: head/gnu/usr.bin/gdb/gdbserver/reg-powerpc.c (from r206623, head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/gdb/gdbserver/reg-powerpc.c Wed Apr 14 20:31:06 2010 (r206624, copy of r206623, head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c) @@ -0,0 +1,113 @@ +/* *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 ``../../../../contrib/gdb/gdb/regformats/reg-ppc.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_ppc[] = { + { "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 }, + { "r13", 416, 32 }, + { "r14", 448, 32 }, + { "r15", 480, 32 }, + { "r16", 512, 32 }, + { "r17", 544, 32 }, + { "r18", 576, 32 }, + { "r19", 608, 32 }, + { "r20", 640, 32 }, + { "r21", 672, 32 }, + { "r22", 704, 32 }, + { "r23", 736, 32 }, + { "r24", 768, 32 }, + { "r25", 800, 32 }, + { "r26", 832, 32 }, + { "r27", 864, 32 }, + { "r28", 896, 32 }, + { "r29", 928, 32 }, + { "r30", 960, 32 }, + { "r31", 992, 32 }, + { "f0", 1024, 64 }, + { "f1", 1088, 64 }, + { "f2", 1152, 64 }, + { "f3", 1216, 64 }, + { "f4", 1280, 64 }, + { "f5", 1344, 64 }, + { "f6", 1408, 64 }, + { "f7", 1472, 64 }, + { "f8", 1536, 64 }, + { "f9", 1600, 64 }, + { "f10", 1664, 64 }, + { "f11", 1728, 64 }, + { "f12", 1792, 64 }, + { "f13", 1856, 64 }, + { "f14", 1920, 64 }, + { "f15", 1984, 64 }, + { "f16", 2048, 64 }, + { "f17", 2112, 64 }, + { "f18", 2176, 64 }, + { "f19", 2240, 64 }, + { "f20", 2304, 64 }, + { "f21", 2368, 64 }, + { "f22", 2432, 64 }, + { "f23", 2496, 64 }, + { "f24", 2560, 64 }, + { "f25", 2624, 64 }, + { "f26", 2688, 64 }, + { "f27", 2752, 64 }, + { "f28", 2816, 64 }, + { "f29", 2880, 64 }, + { "f30", 2944, 64 }, + { "f31", 3008, 64 }, + { "pc", 3072, 32 }, + { "ps", 3104, 32 }, + { "cr", 3136, 32 }, + { "lr", 3168, 32 }, + { "ctr", 3200, 32 }, + { "xer", 3232, 32 }, + { "fpscr", 3264, 32 }, +}; + +const char *expedite_regs_ppc[] = { "r1", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_ppc, + sizeof (regs_ppc) / sizeof (regs_ppc[0])); + gdbserver_expedite_regs = expedite_regs_ppc; +} From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 20:45:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2915A106564A; Wed, 14 Apr 2010 20:45:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1540A8FC36; Wed, 14 Apr 2010 20:45: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 o3EKjY9V082307; Wed, 14 Apr 2010 20:45:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EKjXs4082300; Wed, 14 Apr 2010 20:45:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004142045.o3EKjXs4082300@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 20:45: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: r206625 - in head/sys: amd64/conf boot/forth conf dev/sge i386/conf modules modules/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: Wed, 14 Apr 2010 20:45:34 -0000 Author: yongari Date: Wed Apr 14 20:45:33 2010 New Revision: 206625 URL: http://svn.freebsd.org/changeset/base/206625 Log: Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet. This driver was written by Alexander Pohoyda and greatly enhanced by Nikolay Denev. I don't have these hardwares but this driver was tested by Nikolay Denev and xclin. Because SiS didn't release data sheet for this controller, programming information came from Linux driver and OpenSolaris. Unlike other open source driver for SiS190/191, sge(4) takes full advantage of TX/RX checksum offloading and does not require additional copy operation in RX handler. The controller seems to have advanced offloading features like VLAN hardware tag insertion/stripping, TCP segmentation offload(TSO) as well as jumbo frame support but these features are not available yet. Special thanks to xclin cs dot nctu dot edu dot tw> who sent fix for receiving VLAN oversized frames. Added: head/sys/dev/sge/ head/sys/dev/sge/if_sge.c (contents, props changed) head/sys/dev/sge/if_sgereg.h (contents, props changed) head/sys/modules/sge/ head/sys/modules/sge/Makefile (contents, props changed) Modified: head/sys/amd64/conf/GENERIC head/sys/boot/forth/loader.conf head/sys/conf/NOTES head/sys/conf/files head/sys/i386/conf/GENERIC head/sys/modules/Makefile Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Apr 14 20:31:06 2010 (r206624) +++ head/sys/amd64/conf/GENERIC Wed Apr 14 20:45:33 2010 (r206625) @@ -224,6 +224,7 @@ device pcn # AMD Am79C97x PCI 10/100 ( device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') +device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Wed Apr 14 20:31:06 2010 (r206624) +++ head/sys/boot/forth/loader.conf Wed Apr 14 20:45:33 2010 (r206625) @@ -271,6 +271,7 @@ 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_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 Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Apr 14 20:31:06 2010 (r206624) +++ head/sys/conf/NOTES Wed Apr 14 20:45:33 2010 (r206625) @@ -1952,6 +1952,7 @@ device xmphy # XaQti XMAC II # This includes dual and quad port cards, as well as one 100baseFX card. # Most of these are 64-bit PCI devices, except for one single port # card which is 32-bit. +# sge: Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet adapter # sis: Support for NICs based on the Silicon Integrated Systems SiS 900, # SiS 7016 and NS DP83815 PCI fast ethernet controller chips. # sk: Support for the SysKonnect SK-984x series PCI gigabit ethernet NICs. @@ -2046,6 +2047,7 @@ device re # RealTek 8139C+/8169/8169S/ device rl # RealTek 8129/8139 device pcn # AMD Am79C97x PCI 10/100 NICs device sf # Adaptec AIC-6915 (``Starfire'') +device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 14 20:31:06 2010 (r206624) +++ head/sys/conf/files Wed Apr 14 20:45:33 2010 (r206625) @@ -1490,6 +1490,7 @@ dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa dev/sdhci/sdhci.c optional sdhci pci dev/sf/if_sf.c optional sf pci +dev/sge/if_sge.c optional sge pci dev/si/si.c optional si dev/si/si2_z280.c optional si dev/si/si3_t225.c optional si Added: head/sys/dev/sge/if_sge.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sge/if_sge.c Wed Apr 14 20:45:33 2010 (r206625) @@ -0,0 +1,1745 @@ +/*- + * Copyright (c) 2008-2010 Nikolay Denev + * Copyright (c) 2007-2008 Alexander Pohoyda + * Copyright (c) 1997, 1998, 1999 + * Bill Paul . 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 Bill Paul. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 AUTHORS OR + * THE VOICES IN THEIR HEADS 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$"); + +/* + * SiS 190/191 PCI Ethernet NIC driver. + * + * Adapted to SiS 190 NIC by Alexander Pohoyda based on the original + * SiS 900 driver by Bill Paul, using SiS 190/191 Solaris driver by + * Masayuki Murayama and SiS 190/191 GNU/Linux driver by K.M. Liu + * . Thanks to Pyun YongHyeon for + * review and very useful comments. + * + * Adapted to SiS 191 NIC by Nikolay Denev with further ideas from the + * Linux and Solaris drivers. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "if_sgereg.h" + +MODULE_DEPEND(sge, pci, 1, 1, 1); +MODULE_DEPEND(sge, ether, 1, 1, 1); +MODULE_DEPEND(sge, miibus, 1, 1, 1); + +/* "device miibus0" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" + +/* + * Various supported device vendors/types and their names. + */ +static struct sge_type sge_devs[] = { + { SIS_VENDORID, SIS_DEVICEID_190, "SiS190 Fast Ethernet" }, + { SIS_VENDORID, SIS_DEVICEID_191, "SiS191 Fast/Gigabit Ethernet" }, + { 0, 0, NULL } +}; + +static int sge_probe(device_t); +static int sge_attach(device_t); +static int sge_detach(device_t); +static int sge_shutdown(device_t); +static int sge_suspend(device_t); +static int sge_resume(device_t); + +static int sge_miibus_readreg(device_t, int, int); +static int sge_miibus_writereg(device_t, int, int, int); +static void sge_miibus_statchg(device_t); + +static int sge_newbuf(struct sge_softc *, int); +static int sge_encap(struct sge_softc *, struct mbuf **); +#ifndef __NO_STRICT_ALIGNMENT +static __inline void + sge_fixup_rx(struct mbuf *); +#endif +static __inline void + sge_discard_rxbuf(struct sge_softc *, int); +static void sge_rxeof(struct sge_softc *); +static void sge_txeof(struct sge_softc *); +static void sge_intr(void *); +static void sge_tick(void *); +static void sge_start(struct ifnet *); +static void sge_start_locked(struct ifnet *); +static int sge_ioctl(struct ifnet *, u_long, caddr_t); +static void sge_init(void *); +static void sge_init_locked(struct sge_softc *); +static void sge_stop(struct sge_softc *); +static void sge_watchdog(struct sge_softc *); +static int sge_ifmedia_upd(struct ifnet *); +static void sge_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static int sge_get_mac_addr_apc(struct sge_softc *, uint8_t *); +static int sge_get_mac_addr_eeprom(struct sge_softc *, uint8_t *); +static uint16_t sge_read_eeprom(struct sge_softc *, int); + +static void sge_rxfilter(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 *); +static int sge_list_tx_init(struct sge_softc *); +static int sge_list_tx_free(struct sge_softc *); + +static int sge_dma_alloc(struct sge_softc *); +static void sge_dma_free(struct sge_softc *); +static void sge_dma_map_addr(void *, bus_dma_segment_t *, int, int); + +static device_method_t sge_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, sge_probe), + DEVMETHOD(device_attach, sge_attach), + DEVMETHOD(device_detach, sge_detach), + DEVMETHOD(device_suspend, sge_suspend), + DEVMETHOD(device_resume, sge_resume), + DEVMETHOD(device_shutdown, sge_shutdown), + + /* Bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, sge_miibus_readreg), + DEVMETHOD(miibus_writereg, sge_miibus_writereg), + DEVMETHOD(miibus_statchg, sge_miibus_statchg), + + KOBJMETHOD_END +}; + +static driver_t sge_driver = { + "sge", sge_methods, sizeof(struct sge_softc) +}; + +static devclass_t sge_devclass; + +DRIVER_MODULE(sge, pci, sge_driver, sge_devclass, 0, 0); +DRIVER_MODULE(miibus, sge, miibus_driver, miibus_devclass, 0, 0); + +/* + * Register space access macros. + */ +#define CSR_WRITE_4(sc, reg, val) bus_write_4(sc->sge_res, reg, val) +#define CSR_WRITE_2(sc, reg, val) bus_write_2(sc->sge_res, reg, val) +#define CSR_WRITE_1(cs, reg, val) bus_write_1(sc->sge_res, reg, val) + +#define CSR_READ_4(sc, reg) bus_read_4(sc->sge_res, reg) +#define CSR_READ_2(sc, reg) bus_read_2(sc->sge_res, reg) +#define CSR_READ_1(sc, reg) bus_read_1(sc->sge_res, reg) + +/* Define to show Tx/Rx error status. */ +#undef SGE_SHOW_ERRORS + +#define SGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + +static void +sge_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + bus_addr_t *p; + + if (error != 0) + return; + KASSERT(nseg == 1, ("too many DMA segments, %d should be 1", nseg)); + p = arg; + *p = segs->ds_addr; +} + +/* + * Read a sequence of words from the EEPROM. + */ +static uint16_t +sge_read_eeprom(struct sge_softc *sc, int offset) +{ + uint32_t val; + int i; + + KASSERT(offset <= EI_OFFSET, ("EEPROM offset too big")); + CSR_WRITE_4(sc, ROMInterface, + EI_REQ | EI_OP_RD | (offset << EI_OFFSET_SHIFT)); + DELAY(500); + for (i = 0; i < SGE_TIMEOUT; i++) { + val = CSR_READ_4(sc, ROMInterface); + if ((val & EI_REQ) == 0) + break; + DELAY(100); + } + if (i == SGE_TIMEOUT) { + device_printf(sc->sge_dev, + "EEPROM read timeout : 0x%08x\n", val); + return (0xffff); + } + + return ((val & EI_DATA) >> EI_DATA_SHIFT); +} + +static int +sge_get_mac_addr_eeprom(struct sge_softc *sc, uint8_t *dest) +{ + uint16_t val; + int i; + + val = sge_read_eeprom(sc, EEPROMSignature); + if (val == 0xffff || val == 0) { + device_printf(sc->sge_dev, + "invalid EEPROM signature : 0x%04x\n", val); + return (EINVAL); + } + + for (i = 0; i < ETHER_ADDR_LEN; i += 2) { + val = sge_read_eeprom(sc, EEPROMMACAddr + i / 2); + dest[i + 0] = (uint8_t)val; + dest[i + 1] = (uint8_t)(val >> 8); + } + + if ((sge_read_eeprom(sc, EEPROMInfo) & 0x80) != 0) + sc->sge_flags |= SGE_FLAG_RGMII; + return (0); +} + +/* + * For SiS96x, APC CMOS RAM is used to store ethernet address. + * APC CMOS RAM is accessed through ISA bridge. + */ +static int +sge_get_mac_addr_apc(struct sge_softc *sc, uint8_t *dest) +{ +#if defined(__amd64__) || defined(__i386__) + devclass_t pci; + device_t bus, dev = NULL; + device_t *kids; + struct apc_tbl { + uint16_t vid; + uint16_t did; + } *tp, apc_tbls[] = { + { SIS_VENDORID, 0x0965 }, + { SIS_VENDORID, 0x0966 }, + { SIS_VENDORID, 0x0968 } + }; + uint8_t reg; + int busnum, cnt, i, j, numkids; + + cnt = sizeof(apc_tbls) / sizeof(apc_tbls[0]); + pci = devclass_find("pci"); + for (busnum = 0; busnum < devclass_get_maxunit(pci); busnum++) { + bus = devclass_get_device(pci, busnum); + if (!bus) + continue; + if (device_get_children(bus, &kids, &numkids) != 0) + continue; + for (i = 0; i < numkids; i++) { + dev = kids[i]; + if (pci_get_class(dev) == PCIC_BRIDGE && + pci_get_subclass(dev) == PCIS_BRIDGE_ISA) { + tp = apc_tbls; + for (j = 0; j < cnt; j++) { + if (pci_get_vendor(dev) == tp->vid && + pci_get_device(dev) == tp->did) { + free(kids, M_TEMP); + goto apc_found; + } + tp++; + } + } + } + free(kids, M_TEMP); + } + device_printf(sc->sge_dev, "couldn't find PCI-ISA bridge\n"); + return (EINVAL); +apc_found: + /* Enable port 0x78 and 0x79 to access APC registers. */ + reg = pci_read_config(dev, 0x48, 1); + pci_write_config(dev, 0x48, reg & ~0x02, 1); + DELAY(50); + pci_read_config(dev, 0x48, 1); + /* Read stored ethernet address. */ + for (i = 0; i < ETHER_ADDR_LEN; i++) { + outb(0x78, 0x09 + i); + dest[i] = inb(0x79); + } + outb(0x78, 0x12); + if ((inb(0x79) & 0x80) != 0) + sc->sge_flags |= SGE_FLAG_RGMII; + /* Restore access to APC registers. */ + pci_write_config(dev, 0x48, reg, 1); + + return (0); +#else + return (EINVAL); +#endif +} + +static int +sge_miibus_readreg(device_t dev, int phy, int reg) +{ + struct sge_softc *sc; + uint32_t val; + int i; + + sc = device_get_softc(dev); + CSR_WRITE_4(sc, GMIIControl, (phy << GMI_PHY_SHIFT) | + (reg << GMI_REG_SHIFT) | GMI_OP_RD | GMI_REQ); + DELAY(10); + for (i = 0; i < SGE_TIMEOUT; i++) { + val = CSR_READ_4(sc, GMIIControl); + if ((val & GMI_REQ) == 0) + break; + DELAY(10); + } + if (i == SGE_TIMEOUT) { + device_printf(sc->sge_dev, "PHY read timeout : %d\n", reg); + return (0); + } + return ((val & GMI_DATA) >> GMI_DATA_SHIFT); +} + +static int +sge_miibus_writereg(device_t dev, int phy, int reg, int data) +{ + struct sge_softc *sc; + uint32_t val; + int i; + + sc = device_get_softc(dev); + CSR_WRITE_4(sc, GMIIControl, (phy << GMI_PHY_SHIFT) | + (reg << GMI_REG_SHIFT) | (data << GMI_DATA_SHIFT) | + GMI_OP_WR | GMI_REQ); + DELAY(10); + for (i = 0; i < SGE_TIMEOUT; i++) { + val = CSR_READ_4(sc, GMIIControl); + if ((val & GMI_REQ) == 0) + break; + DELAY(10); + } + if (i == SGE_TIMEOUT) + device_printf(sc->sge_dev, "PHY write timeout : %d\n", reg); + return (0); +} + +static void +sge_miibus_statchg(device_t dev) +{ + struct sge_softc *sc; + struct mii_data *mii; + struct ifnet *ifp; + uint32_t ctl, speed; + + sc = device_get_softc(dev); + mii = device_get_softc(sc->sge_miibus); + ifp = sc->sge_ifp; + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + speed = 0; + sc->sge_flags &= ~SGE_FLAG_LINK; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + sc->sge_flags |= SGE_FLAG_LINK; + speed = SC_SPEED_10; + break; + case IFM_100_TX: + sc->sge_flags |= SGE_FLAG_LINK; + speed = SC_SPEED_100; + break; + case IFM_1000_T: + if ((sc->sge_flags & SGE_FLAG_FASTETHER) == 0) { + sc->sge_flags |= SGE_FLAG_LINK; + speed = SC_SPEED_1000; + } + break; + default: + break; + } + } + if ((sc->sge_flags & SGE_FLAG_LINK) == 0) + return; + /* Reprogram MAC to resolved speed/duplex/flow-control parameters. */ + ctl = CSR_READ_4(sc, StationControl); + ctl &= ~(0x0f000000 | SC_FDX | SC_SPEED_MASK); + if (speed == SC_SPEED_1000) { + ctl |= 0x07000000; + sc->sge_flags |= SGE_FLAG_SPEED_1000; + } else { + ctl |= 0x04000000; + sc->sge_flags &= ~SGE_FLAG_SPEED_1000; + } +#ifdef notyet + if ((sc->sge_flags & SGE_FLAG_GMII) != 0) + ctl |= 0x03000000; +#endif + ctl |= speed; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + ctl |= SC_FDX; + sc->sge_flags |= SGE_FLAG_FDX; + } else + sc->sge_flags &= ~SGE_FLAG_FDX; + CSR_WRITE_4(sc, StationControl, ctl); + if ((sc->sge_flags & SGE_FLAG_RGMII) != 0) { + CSR_WRITE_4(sc, RGMIIDelay, 0x0441); + CSR_WRITE_4(sc, RGMIIDelay, 0x0440); + } +} + +static void +sge_rxfilter(struct sge_softc *sc) +{ + struct ifnet *ifp; + struct ifmultiaddr *ifma; + uint32_t crc, hashes[2]; + uint16_t rxfilt; + + SGE_LOCK_ASSERT(sc); + + ifp = sc->sge_ifp; + hashes[0] = hashes[1] = 0; + rxfilt = AcceptMyPhys; + if ((ifp->if_flags & IFF_BROADCAST) != 0) + rxfilt |= AcceptBroadcast; + if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { + if ((ifp->if_flags & IFF_PROMISC) != 0) + rxfilt |= AcceptAllPhys; + 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); + } + 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]); +} + +static void +sge_reset(struct sge_softc *sc) +{ + + CSR_WRITE_4(sc, IntrMask, 0); + CSR_WRITE_4(sc, IntrStatus, 0xffffffff); + + /* Soft reset. */ + CSR_WRITE_4(sc, IntrControl, 0x8000); + CSR_READ_4(sc, IntrControl); + DELAY(100); + CSR_WRITE_4(sc, IntrControl, 0); + /* Stop MAC. */ + CSR_WRITE_4(sc, TX_CTL, 0x1a00); + CSR_WRITE_4(sc, RX_CTL, 0x1a00); + + CSR_WRITE_4(sc, IntrMask, 0); + CSR_WRITE_4(sc, IntrStatus, 0xffffffff); + + CSR_WRITE_4(sc, GMIIControl, 0); +} + +/* + * Probe for an SiS chip. Check the PCI vendor and device + * IDs against our list and return a device name if we find a match. + */ +static int +sge_probe(device_t dev) +{ + struct sge_type *t; + + t = sge_devs; + while (t->sge_name != NULL) { + if ((pci_get_vendor(dev) == t->sge_vid) && + (pci_get_device(dev) == t->sge_did)) { + device_set_desc(dev, t->sge_name); + return (BUS_PROBE_DEFAULT); + } + t++; + } + + return (ENXIO); +} + +/* + * Attach the interface. Allocate softc structures, do ifmedia + * setup and ethernet/BPF attach. + */ +static int +sge_attach(device_t dev) +{ + struct sge_softc *sc; + struct ifnet *ifp; + uint8_t eaddr[ETHER_ADDR_LEN]; + int error = 0, rid; + + sc = device_get_softc(dev); + sc->sge_dev = dev; + + mtx_init(&sc->sge_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF); + callout_init_mtx(&sc->sge_stat_ch, &sc->sge_mtx, 0); + + /* + * Map control/status registers. + */ + pci_enable_busmaster(dev); + + /* Allocate resources. */ + sc->sge_res_id = PCIR_BAR(0); + sc->sge_res_type = SYS_RES_MEMORY; + sc->sge_res = bus_alloc_resource_any(dev, sc->sge_res_type, + &sc->sge_res_id, RF_ACTIVE); + if (sc->sge_res == NULL) { + device_printf(dev, "couldn't allocate resource\n"); + error = ENXIO; + goto fail; + } + + rid = 0; + sc->sge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + if (sc->sge_irq == NULL) { + device_printf(dev, "couldn't allocate IRQ resources\n"); + error = ENXIO; + goto fail; + } + sc->sge_rev = pci_get_revid(dev); + if (pci_get_device(dev) == SIS_DEVICEID_190) + sc->sge_flags |= SGE_FLAG_FASTETHER; + /* Reset the adapter. */ + sge_reset(sc); + + /* Get MAC address from the EEPROM. */ + if ((pci_read_config(dev, 0x73, 1) & 0x01) != 0) + sge_get_mac_addr_apc(sc, eaddr); + else + sge_get_mac_addr_eeprom(sc, eaddr); + + if ((error = sge_dma_alloc(sc)) != 0) + goto fail; + + ifp = sc->sge_ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + device_printf(dev, "cannot allocate ifnet structure.\n"); + error = ENOSPC; + goto fail; + } + ifp->if_softc = sc; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_ioctl = sge_ioctl; + ifp->if_start = sge_start; + ifp->if_init = sge_init; + ifp->if_snd.ifq_drv_maxlen = SGE_TX_RING_CNT - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); + ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_RXCSUM; + ifp->if_hwassist = SGE_CSUM_FEATURES; + ifp->if_capenable = ifp->if_capabilities; + /* + * Do MII setup. + */ + if (mii_phy_probe(dev, &sc->sge_miibus, sge_ifmedia_upd, + sge_ifmedia_sts)) { + device_printf(dev, "no PHY found!\n"); + error = ENXIO; + goto fail; + } + + /* + * Call MI attach routine. + */ + ether_ifattach(ifp, eaddr); + + /* VLAN setup. */ + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable = ifp->if_capabilities; + /* Tell the upper layer(s) we support long frames. */ + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + + /* Hook interrupt last to avoid having to lock softc */ + error = bus_setup_intr(dev, sc->sge_irq, INTR_TYPE_NET | INTR_MPSAFE, + NULL, sge_intr, sc, &sc->sge_intrhand); + if (error) { + device_printf(dev, "couldn't set up irq\n"); + ether_ifdetach(ifp); + goto fail; + } + +fail: + if (error) + sge_detach(dev); + + return (error); +} + +/* + * Shutdown hardware and free up resources. This can be called any + * time after the mutex has been initialized. It is called in both + * the error case in attach and the normal detach case so it needs + * to be careful about only freeing resources that have actually been + * allocated. + */ +static int +sge_detach(device_t dev) +{ + struct sge_softc *sc; + struct ifnet *ifp; + + sc = device_get_softc(dev); + ifp = sc->sge_ifp; + /* These should only be active if attach succeeded. */ + if (device_is_attached(dev)) { + ether_ifdetach(ifp); + SGE_LOCK(sc); + sge_stop(sc); + SGE_UNLOCK(sc); + callout_drain(&sc->sge_stat_ch); + } + if (sc->sge_miibus) + device_delete_child(dev, sc->sge_miibus); + bus_generic_detach(dev); + + if (sc->sge_intrhand) + bus_teardown_intr(dev, sc->sge_irq, sc->sge_intrhand); + if (sc->sge_irq) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sge_irq); + if (sc->sge_res) + bus_release_resource(dev, sc->sge_res_type, sc->sge_res_id, + sc->sge_res); + if (ifp) + if_free(ifp); + sge_dma_free(sc); + mtx_destroy(&sc->sge_mtx); + + return (0); +} + +/* + * Stop all chip I/O so that the kernel's probe routines don't + * get confused by errant DMAs when rebooting. + */ +static int +sge_shutdown(device_t dev) +{ + struct sge_softc *sc; + + sc = device_get_softc(dev); + SGE_LOCK(sc); + sge_stop(sc); + SGE_UNLOCK(sc); + return (0); +} + +static int +sge_suspend(device_t dev) +{ + struct sge_softc *sc; + struct ifnet *ifp; + + sc = device_get_softc(dev); + SGE_LOCK(sc); + ifp = sc->sge_ifp; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + sge_stop(sc); + SGE_UNLOCK(sc); + return (0); +} + +static int +sge_resume(device_t dev) +{ + struct sge_softc *sc; + struct ifnet *ifp; + + sc = device_get_softc(dev); + SGE_LOCK(sc); + ifp = sc->sge_ifp; + if ((ifp->if_flags & IFF_UP) != 0) + sge_init_locked(sc); + SGE_UNLOCK(sc); + return (0); +} + +static int +sge_dma_alloc(struct sge_softc *sc) +{ + struct sge_chain_data *cd; + struct sge_list_data *ld; + int error, i; + + cd = &sc->sge_cdata; + ld = &sc->sge_ldata; + error = bus_dma_tag_create(bus_get_dma_tag(sc->sge_dev), + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + 1, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ + &cd->sge_tag); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create parent DMA tag.\n"); + goto fail; + } + + /* RX descriptor ring */ + error = bus_dma_tag_create(cd->sge_tag, + SGE_DESC_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + SGE_RX_RING_SZ, 1, /* maxsize,nsegments */ + SGE_RX_RING_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ + &cd->sge_rx_tag); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create Rx ring DMA tag.\n"); + goto fail; + } + /* Allocate DMA'able memory and load DMA map for RX ring. */ + error = bus_dmamem_alloc(cd->sge_rx_tag, (void **)&ld->sge_rx_ring, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &cd->sge_rx_dmamap); + if (error != 0) { + device_printf(sc->sge_dev, + "could not allocate DMA'able memory for Rx ring.\n"); + goto fail; + } + error = bus_dmamap_load(cd->sge_rx_tag, cd->sge_rx_dmamap, + ld->sge_rx_ring, SGE_RX_RING_SZ, sge_dma_map_addr, + &ld->sge_rx_paddr, BUS_DMA_NOWAIT); + if (error != 0) { + device_printf(sc->sge_dev, + "could not load DMA'able memory for Rx ring.\n"); + } + + /* TX descriptor ring */ + error = bus_dma_tag_create(cd->sge_tag, + SGE_DESC_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + SGE_TX_RING_SZ, 1, /* maxsize,nsegments */ + SGE_TX_RING_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ + &cd->sge_tx_tag); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create Rx ring DMA tag.\n"); + goto fail; + } + /* Allocate DMA'able memory and load DMA map for TX ring. */ + error = bus_dmamem_alloc(cd->sge_tx_tag, (void **)&ld->sge_tx_ring, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &cd->sge_tx_dmamap); + if (error != 0) { + device_printf(sc->sge_dev, + "could not allocate DMA'able memory for Tx ring.\n"); + goto fail; + } + error = bus_dmamap_load(cd->sge_tx_tag, cd->sge_tx_dmamap, + ld->sge_tx_ring, SGE_TX_RING_SZ, sge_dma_map_addr, + &ld->sge_tx_paddr, BUS_DMA_NOWAIT); + if (error != 0) { + device_printf(sc->sge_dev, + "could not load DMA'able memory for Rx ring.\n"); + goto fail; + } + + /* Create DMA tag for Tx buffers. */ + error = bus_dma_tag_create(cd->sge_tag, 1, 0, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * SGE_MAXTXSEGS, + SGE_MAXTXSEGS, MCLBYTES, 0, NULL, NULL, &cd->sge_txmbuf_tag); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create Tx mbuf DMA tag.\n"); + goto fail; + } + + /* Create DMA tag for Rx buffers. */ + error = bus_dma_tag_create(cd->sge_tag, SGE_RX_BUF_ALIGN, 0, + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, + MCLBYTES, 0, NULL, NULL, &cd->sge_rxmbuf_tag); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create Rx mbuf DMA tag.\n"); + goto fail; + } + + /* Create DMA maps for Tx buffers. */ + for (i = 0; i < SGE_TX_RING_CNT; i++) { + error = bus_dmamap_create(cd->sge_txmbuf_tag, 0, + &cd->sge_tx_map[i]); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create Tx DMA map.\n"); + goto fail; + } + } + /* Create spare DMA map for Rx buffer. */ + error = bus_dmamap_create(cd->sge_rxmbuf_tag, 0, &cd->sge_rx_spare_map); + if (error != 0) { + device_printf(sc->sge_dev, + "could not create spare Rx DMA map.\n"); + goto fail; + } + /* Create DMA maps for Rx buffers. */ + for (i = 0; i < SGE_RX_RING_CNT; i++) { + error = bus_dmamap_create(cd->sge_rxmbuf_tag, 0, + &cd->sge_rx_map[i]); + if (error) { + device_printf(sc->sge_dev, + "could not create Rx DMA map.\n"); + goto fail; + } + } +fail: + return (error); +} + +static void +sge_dma_free(struct sge_softc *sc) +{ + struct sge_chain_data *cd; + struct sge_list_data *ld; + int i; + + cd = &sc->sge_cdata; + ld = &sc->sge_ldata; + /* Rx ring. */ + if (cd->sge_rx_tag != NULL) { + if (cd->sge_rx_dmamap != NULL) + bus_dmamap_unload(cd->sge_rx_tag, cd->sge_rx_dmamap); + if (cd->sge_rx_dmamap != NULL && ld->sge_rx_ring != NULL) + bus_dmamem_free(cd->sge_rx_tag, ld->sge_rx_ring, + cd->sge_rx_dmamap); + ld->sge_rx_ring = NULL; + cd->sge_rx_dmamap = NULL; + bus_dma_tag_destroy(cd->sge_rx_tag); + cd->sge_rx_tag = NULL; + } + /* Tx ring. */ + if (cd->sge_tx_tag != NULL) { + if (cd->sge_tx_dmamap != NULL) + bus_dmamap_unload(cd->sge_tx_tag, cd->sge_tx_dmamap); + if (cd->sge_tx_dmamap != NULL && ld->sge_tx_ring != NULL) + bus_dmamem_free(cd->sge_tx_tag, ld->sge_tx_ring, + cd->sge_tx_dmamap); + ld->sge_tx_ring = NULL; + cd->sge_tx_dmamap = NULL; + bus_dma_tag_destroy(cd->sge_tx_tag); + cd->sge_tx_tag = NULL; + } + /* Rx buffers. */ + if (cd->sge_rxmbuf_tag != NULL) { + for (i = 0; i < SGE_RX_RING_CNT; i++) { + if (cd->sge_rx_map[i] != NULL) { + bus_dmamap_destroy(cd->sge_rxmbuf_tag, + cd->sge_rx_map[i]); + cd->sge_rx_map[i] = NULL; + } + } + if (cd->sge_rx_spare_map != NULL) { + bus_dmamap_destroy(cd->sge_rxmbuf_tag, + cd->sge_rx_spare_map); + cd->sge_rx_spare_map = NULL; + } + bus_dma_tag_destroy(cd->sge_rxmbuf_tag); + cd->sge_rxmbuf_tag = NULL; + } + /* Tx buffers. */ + if (cd->sge_txmbuf_tag != NULL) { + for (i = 0; i < SGE_TX_RING_CNT; i++) { + if (cd->sge_tx_map[i] != NULL) { + bus_dmamap_destroy(cd->sge_txmbuf_tag, + cd->sge_tx_map[i]); + cd->sge_tx_map[i] = NULL; + } + } + bus_dma_tag_destroy(cd->sge_txmbuf_tag); + cd->sge_txmbuf_tag = NULL; + } + if (cd->sge_tag != NULL) + bus_dma_tag_destroy(cd->sge_tag); + cd->sge_tag = NULL; +} + +/* + * Initialize the TX descriptors. + */ +static int +sge_list_tx_init(struct sge_softc *sc) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 20:50:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02F7E106564A; Wed, 14 Apr 2010 20:50:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5C198FC0C; Wed, 14 Apr 2010 20:50: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 o3EKo7R9083471; Wed, 14 Apr 2010 20:50:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EKo7A8083469; Wed, 14 Apr 2010 20:50:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004142050.o3EKo7A8083469@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Apr 2010 20:50: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: r206627 - head/sys/contrib/ipfilter/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: Wed, 14 Apr 2010 20:50:08 -0000 Author: imp Date: Wed Apr 14 20:50:07 2010 New Revision: 206627 URL: http://svn.freebsd.org/changeset/base/206627 Log: We don't need the definition for in_cksum repeated here since we get it from machine/in_cksum.h. This definition prevents us from using hand-tuned assembler versions of in_cksum. # this fixes the modules build on arm for ipfilter. Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Wed Apr 14 20:48:13 2010 (r206626) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Wed Apr 14 20:50:07 2010 (r206627) @@ -975,7 +975,6 @@ typedef u_int32_t u_32_t; # define SPL_NET(x) ; # define SPL_IMP(x) ; # define SPL_SCHED(x) ; -extern int in_cksum __P((struct mbuf *, int)); # else # define SPL_SCHED(x) x = splhigh() # endif /* __FreeBSD_version >= 500043 */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 20:54:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C32EF106564A; Wed, 14 Apr 2010 20:54:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1FC38FC15; Wed, 14 Apr 2010 20:54: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 o3EKsNNp084460; Wed, 14 Apr 2010 20:54:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EKsNLh084458; Wed, 14 Apr 2010 20:54:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004142054.o3EKsNLh084458@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 20:54: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: r206628 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 20:54:23 -0000 Author: yongari Date: Wed Apr 14 20:54:23 2010 New Revision: 206628 URL: http://svn.freebsd.org/changeset/base/206628 Log: Add sge(4) to the list of supported network interface. Modified: head/usr.sbin/sysinstall/devices.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Wed Apr 14 20:50:07 2010 (r206627) +++ head/usr.sbin/sysinstall/devices.c Wed Apr 14 20:54:23 2010 (r206628) @@ -150,6 +150,7 @@ static struct _devname { NETWORK("rue", "RealTek USB Ethernet card"), NETWORK("rum", "Ralink Technology USB IEEE 802.11 wireless adapter"), NETWORK("sf", "Adaptec AIC-6915 PCI Ethernet card"), + NETWORK("sge", "Silicon Integrated Systems SiS190/191 Ethernet"), NETWORK("sis", "SiS 900/SiS 7016 PCI Ethernet card"), #ifdef PC98 NETWORK("snc", "SONIC Ethernet card"), From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 20:55:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790381065670; Wed, 14 Apr 2010 20:55:33 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67D3D8FC12; Wed, 14 Apr 2010 20:55: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 o3EKtXif084759; Wed, 14 Apr 2010 20:55:33 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EKtXpp084756; Wed, 14 Apr 2010 20:55:33 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004142055.o3EKtXpp084756@svn.freebsd.org> From: Jack F Vogel Date: Wed, 14 Apr 2010 20:55: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: r206629 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 20:55:33 -0000 Author: jfv Date: Wed Apr 14 20:55:33 2010 New Revision: 206629 URL: http://svn.freebsd.org/changeset/base/206629 Log: Add a missing fragment in the tx msix handler to invoke another if all work is not done. Sync the igb driver with changes suggested by yongari and made in em, these made sense to be in both drivers. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Apr 14 20:54:23 2010 (r206628) +++ head/sys/dev/e1000/if_em.c Wed Apr 14 20:55:33 2010 (r206629) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.4"; +char em_driver_version[] = "7.0.5"; /********************************************************************* @@ -1484,12 +1484,17 @@ em_msix_tx(void *arg) { struct tx_ring *txr = arg; struct adapter *adapter = txr->adapter; + bool more; ++txr->tx_irq; EM_TX_LOCK(txr); - em_txeof(txr); + more = em_txeof(txr); EM_TX_UNLOCK(txr); - E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); + if (more) + taskqueue_enqueue(txr->tq, &txr->tx_task); + else + /* Reenable this interrupt */ + E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); return; } Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Apr 14 20:54:23 2010 (r206628) +++ head/sys/dev/e1000/if_igb.c Wed Apr 14 20:55:33 2010 (r206629) @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 1.9.4"; +char igb_driver_version[] = "version - 1.9.5"; /********************************************************************* @@ -758,8 +758,15 @@ igb_start_locked(struct tx_ring *txr, st if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail <= IGB_TX_OP_THRESHOLD) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -779,6 +786,7 @@ igb_start_locked(struct tx_ring *txr, st ETHER_BPF_MTAP(ifp, m_head); /* Set watchdog on */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } } @@ -817,8 +825,6 @@ igb_mq_start(struct ifnet *ifp, struct m /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; - else - i = curcpu % adapter->num_queues; txr = &adapter->tx_rings[i]; @@ -847,6 +853,10 @@ igb_mq_start_locked(struct ifnet *ifp, s return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + enq = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -856,6 +866,7 @@ igb_mq_start_locked(struct ifnet *ifp, s next = drbr_dequeue(ifp, txr->br); } else next = m; + /* Process the queue */ while (next != NULL) { if ((err = igb_xmit(txr, &next)) != 0) { @@ -877,6 +888,7 @@ igb_mq_start_locked(struct ifnet *ifp, s if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -1248,19 +1260,13 @@ igb_handle_que(void *context, int pendin struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - u32 loop = IGB_MAX_LOOP; bool more; - /* RX first */ - do { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { more = igb_rxeof(que, -1); - } while (loop-- && more); - if (IGB_TX_TRYLOCK(txr)) { - loop = IGB_MAX_LOOP; - do { - more = igb_txeof(txr); - } while (loop-- && more); + IGB_TX_LOCK(txr); + igb_txeof(txr); #if __FreeBSD_version >= 800000 igb_mq_start_locked(ifp, txr, NULL); #else @@ -1268,6 +1274,10 @@ igb_handle_que(void *context, int pendin igb_start_locked(txr, ifp); #endif IGB_TX_UNLOCK(txr); + if (more) { + taskqueue_enqueue(que->tq, &que->que_task); + return; + } } /* Reenable this interrupt */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 21:01:30 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC1EB1065670; Wed, 14 Apr 2010 21:01:30 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6258FC21; Wed, 14 Apr 2010 21:01:28 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id D6A8545CDD; Wed, 14 Apr 2010 23:01:26 +0200 (CEST) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id BD0A245C9B; Wed, 14 Apr 2010 23:01:14 +0200 (CEST) Date: Wed, 14 Apr 2010 23:01:17 +0200 From: Pawel Jakub Dawidek To: Fabio Checconi Message-ID: <20100414210117.GA2252@garage.freebsd.pl> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> <20100414081630.GA74130@onelab2.iet.unipi.it> <20100414160554.GB3188@gandalf.sssup.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <20100414160554.GB3188@gandalf.sssup.it> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, Luigi Rizzo , svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 21:01:31 -0000 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 14, 2010 at 06:05:54PM +0200, Fabio Checconi wrote: > - Some classes (from a quick look I've seen only g_mirror, but I'm > pretty sure there were some other ones) cache pointers to their > providers. With these classes this implementation does not work. This can be easly changed to go though geom to provider. Many of my classes do that. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvGLRwACgkQForvXbEpPzSWcwCgrbkP5DHO0mRp8RryCBZATjDz LgsAoJROy5Ip4w6egknaX5mNY6FM88Vf =WM+7 -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 21:27:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F4EB1065686; Wed, 14 Apr 2010 21:27:49 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0C228FC26; Wed, 14 Apr 2010 21:27: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 o3ELRm80092056; Wed, 14 Apr 2010 21:27:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ELRmaa092050; Wed, 14 Apr 2010 21:27:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004142127.o3ELRmaa092050@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Apr 2010 21:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206631 - 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: Wed, 14 Apr 2010 21:27:49 -0000 Author: yongari Date: Wed Apr 14 21:27:48 2010 New Revision: 206631 URL: http://svn.freebsd.org/changeset/base/206631 Log: Add sge(4) man page and hook up sge(4) to the build. Also add Xr to appropriate man pages. Added: head/share/man/man4/sge.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/altq.4 head/share/man/man4/miibus.4 head/share/man/man4/vlan.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Apr 14 20:59:37 2010 (r206630) +++ head/share/man/man4/Makefile Wed Apr 14 21:27:48 2010 (r206631) @@ -350,6 +350,7 @@ MAN= aac.4 \ sem.4 \ ses.4 \ sf.4 \ + sge.4 \ si.4 \ siba.4 \ sio.4 \ Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Wed Apr 14 20:59:37 2010 (r206630) +++ head/share/man/man4/altq.4 Wed Apr 14 21:27:48 2010 (r206631) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 26, 2009 +.Dd April 14, 2010 .Dt ALTQ 4 .Os .Sh NAME @@ -151,6 +151,7 @@ They have been applied to the following .Xr rl 4 , .Xr rum 4 , .Xr sf 4 , +.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , Modified: head/share/man/man4/miibus.4 ============================================================================== --- head/share/man/man4/miibus.4 Wed Apr 14 20:59:37 2010 (r206630) +++ head/share/man/man4/miibus.4 Wed Apr 14 21:27:48 2010 (r206631) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd April 14, 2010 .Dt MIIBUS 4 .Os .Sh NAME @@ -97,6 +97,8 @@ RealTek 8129/8139 RealTek RTL8150 USB To Fast Ethernet .It Xr sf 4 Adaptec AIC-6915 +.It Xr sge 4 +Silicon Integrated Systems SiS190/191 Ethernet .It Xr sis 4 Silicon Integrated Systems SiS 900/SiS 7016 .It Xr sk 4 @@ -158,6 +160,7 @@ but as a result are not well behaved new .Xr rl 4 , .Xr rue 4 , .Xr sf 4 , +.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , Added: head/share/man/man4/sge.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/sge.4 Wed Apr 14 21:27:48 2010 (r206631) @@ -0,0 +1,120 @@ +.\" Copyright (c) 2010 Pyun YongHyeon +.\" 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 April 14, 2010 +.Dt SGE 4 +.Os +.Sh NAME +.Nm sge +.Nd Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet 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 miibus" +.Cd "device sge" +.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 +if_sge="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for SiS190 Fast Ethernet +controllers and SiS191 Fast/Gigabit Ethernet controllers. +.Pp +All LOMs supported by the +.Nm +driver have TCP/UDP/IP checksum offload for transmit and receive. +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. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm autoselect +Enable autoselection of the media type and options. +The user can manually override +the autoselected mode by adding media options to +.Xr rc.conf 5 . +.It Cm 10baseT/UTP +Set 10Mbps operation. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +.It Cm 1000baseTX +Set 1000baseTX operation over twisted pair. +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width ".Cm full-duplex" +.It Cm full-duplex +Force full duplex operation. +.It Cm half-duplex +Force half duplex operation. +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +device driver provides support for the following Ethernet controllers: +.Pp +.Bl -bullet -compact +.It +SiS190 Fast Ethernet controller +.It +SiS191 Fast/Gigabit Ethernet controller +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Alexander Pohoyda +.Aq alexander.pohoyda@gmx.net . +And enhanced by +.An Nikolay Denev +.Aq ndenev@gmail.com . +It first appeared in +.Fx 8.1 . Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Wed Apr 14 20:59:37 2010 (r206630) +++ head/share/man/man4/vlan.4 Wed Apr 14 21:27:48 2010 (r206631) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd April 14, 2010 .Dt VLAN 4 .Os .Sh NAME @@ -172,6 +172,7 @@ 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 Wed Apr 14 21:42:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F82106564A; Wed, 14 Apr 2010 21:42:29 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5625E8FC14; Wed, 14 Apr 2010 21:42: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 o3ELgTXt095332; Wed, 14 Apr 2010 21:42:29 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ELgTT0095330; Wed, 14 Apr 2010 21:42:29 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <201004142142.o3ELgTT0095330@svn.freebsd.org> From: Julian Elischer Date: Wed, 14 Apr 2010 21:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206632 - 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, 14 Apr 2010 21:42:29 -0000 Author: julian Date: Wed Apr 14 21:42:29 2010 New Revision: 206632 URL: http://svn.freebsd.org/changeset/base/206632 Log: Change the semantics of the debug.ktr.alq_enable control so that when you disable alq, it acts as if alq had not been enabled in the build. in other words, the rest of ktr is still available for use. If you really don't want that as well, set the mask to 0. MFC after:3 weeks Modified: head/sys/kern/kern_ktr.c Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Wed Apr 14 21:27:48 2010 (r206631) +++ head/sys/kern/kern_ktr.c Wed Apr 14 21:42:29 2010 (r206632) @@ -199,9 +199,8 @@ ktr_tracepoint(u_int mask, const char *f struct ktr_entry *entry; #ifdef KTR_ALQ struct ale *ale = NULL; -#else - int newindex, saveindex; #endif + int newindex, saveindex; #if defined(KTR_VERBOSE) || defined(KTR_ALQ) struct thread *td; #endif @@ -221,27 +220,30 @@ ktr_tracepoint(u_int mask, const char *f td->td_pflags |= TDP_INKTR; #endif #ifdef KTR_ALQ - if (ktr_alq_enabled && - td->td_critnest == 0 && - (td->td_flags & TDF_IDLETD) == 0 && - td != ald_thread) { - if (ktr_alq_max && ktr_alq_cnt > ktr_alq_max) - goto done; - if ((ale = alq_get(ktr_alq, ALQ_NOWAIT)) == NULL) { - ktr_alq_failed++; + if (ktr_alq_enabled) { + if (td->td_critnest == 0 && + (td->td_flags & TDF_IDLETD) == 0 && + td != ald_thread) { + if (ktr_alq_max && ktr_alq_cnt > ktr_alq_max) + goto done; + if ((ale = alq_get(ktr_alq, ALQ_NOWAIT)) == NULL) { + ktr_alq_failed++; + goto done; + } + ktr_alq_cnt++; + entry = (struct ktr_entry *)ale->ae_data; + } else { goto done; } - ktr_alq_cnt++; - entry = (struct ktr_entry *)ale->ae_data; } else - goto done; -#else - do { - saveindex = ktr_idx; - newindex = (saveindex + 1) & (KTR_ENTRIES - 1); - } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); - entry = &ktr_buf[saveindex]; #endif + { + do { + saveindex = ktr_idx; + newindex = (saveindex + 1) & (KTR_ENTRIES - 1); + } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); + entry = &ktr_buf[saveindex]; + } entry->ktr_timestamp = KTR_TIME; entry->ktr_cpu = cpu; entry->ktr_thread = curthread; @@ -271,7 +273,7 @@ ktr_tracepoint(u_int mask, const char *f entry->ktr_parms[4] = arg5; entry->ktr_parms[5] = arg6; #ifdef KTR_ALQ - if (ale) + if (ktr_alq_enabled && ale) alq_post(ktr_alq, ale); done: #endif @@ -295,7 +297,9 @@ DB_SHOW_COMMAND(ktr, db_ktr_all) tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); tstate.first = -1; - db_ktr_verbose = index(modif, 'v') != NULL; + db_ktr_verbose = 0; + db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0; + db_ktr_verbose |= (index(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */ if (index(modif, 'a') != NULL) { db_disable_pager(); while (cncheckc() != -1) @@ -329,9 +333,11 @@ db_mach_vtrace(void) db_printf(":cpu%d", kp->ktr_cpu); #endif db_printf(")"); - if (db_ktr_verbose) { - db_printf(" %10.10lld %s.%d", (long long)kp->ktr_timestamp, - kp->ktr_file, kp->ktr_line); + if (db_ktr_verbose >= 1) { + db_printf(" %10.10lld", (long long)kp->ktr_timestamp); + } + if (db_ktr_verbose >= 2) { + db_printf(" %s.%d", kp->ktr_file, kp->ktr_line); } db_printf(": "); db_printf(kp->ktr_desc, kp->ktr_parms[0], kp->ktr_parms[1], From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 21:44:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0AC51065675; Wed, 14 Apr 2010 21:44:14 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF2A98FC14; Wed, 14 Apr 2010 21:44: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 o3ELiEcU095784; Wed, 14 Apr 2010 21:44:14 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ELiET2095782; Wed, 14 Apr 2010 21:44:14 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <201004142144.o3ELiET2095782@svn.freebsd.org> From: Julian Elischer Date: Wed, 14 Apr 2010 21:44: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: r206633 - 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: Wed, 14 Apr 2010 21:44:14 -0000 Author: julian Date: Wed Apr 14 21:44:14 2010 New Revision: 206633 URL: http://svn.freebsd.org/changeset/base/206633 Log: Man page change to documant slight change in ktr_alq behaviour. Modified: head/share/man/man4/ktr.4 Modified: head/share/man/man4/ktr.4 ============================================================================== --- head/share/man/man4/ktr.4 Wed Apr 14 21:42:29 2010 (r206632) +++ head/share/man/man4/ktr.4 Wed Apr 14 21:44:14 2010 (r206633) @@ -122,7 +122,7 @@ option sets the flag to one. The KTR buffer can be examined from within .Xr ddb 4 via the -.Ic show ktr Op Cm /v +.Ic show ktr Op Cm /vV command. This command displays the contents of the trace buffer one page at a time. At the @@ -136,6 +136,10 @@ If the .Cm /v modifier is specified, then they are displayed in addition to the normal output. +If the +.Cm /V +modifier is specified, then just the timestamp is displayed in +addition to the normal output. Note that the events are displayed in reverse chronological order. That is, the most recent events are displayed first. .Ss Logging ktr to Disk @@ -167,7 +171,9 @@ the next invocation. enables logging of .Nm entries to disk if it is set to one. -Setting this to 0 will terminate logging. +Setting this to 0 will terminate logging to disk and revert to +logging to the normal ktr ring buffer. +Data is not sent to the ring buffer while logging to disk. .It Va debug.ktr.alq_max is the maximum number of entries that will be recorded to disk, or 0 for infinite. From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 21:53:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88032106566C; Wed, 14 Apr 2010 21:53:27 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C9438FC12; Wed, 14 Apr 2010 21:53: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 o3ELrR7R097887; Wed, 14 Apr 2010 21:53:27 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ELrRv9097883; Wed, 14 Apr 2010 21:53:27 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004142153.o3ELrRv9097883@svn.freebsd.org> From: Fabien Thomas Date: Wed, 14 Apr 2010 21:53: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: r206635 - 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: Wed, 14 Apr 2010 21:53:27 -0000 Author: fabient Date: Wed Apr 14 21:53:27 2010 New Revision: 206635 URL: http://svn.freebsd.org/changeset/base/206635 Log: Move fatal error at the right place. Fix exit from top mode when checking if PMC is available. MFC after: 3 days Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcpl_gprof.c head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Wed Apr 14 21:46:22 2010 (r206634) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Wed Apr 14 21:53:27 2010 (r206635) @@ -581,6 +581,8 @@ pmcpl_cg_topdisplay(void) struct pmcstat_pmcrecord *pmcr; pmcr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (!pmcr) + err(EX_SOFTWARE, "ERROR: invalid pmcindex"); /* * We pull out all callgraph nodes in the top-level hash table Modified: head/usr.sbin/pmcstat/pmcpl_gprof.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_gprof.c Wed Apr 14 21:46:22 2010 (r206634) +++ head/usr.sbin/pmcstat/pmcpl_gprof.c Wed Apr 14 21:53:27 2010 (r206635) @@ -171,6 +171,8 @@ pmcstat_gmon_create_name(const char *sam char fullpath[PATH_MAX]; pmcname = pmcstat_pmcid_to_name(pmcid); + if (!pmcname) + err(EX_SOFTWARE, "ERROR: cannot find pmcid"); (void) snprintf(fullpath, sizeof(fullpath), "%s/%s/%s", samplesdir, pmcname, Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Wed Apr 14 21:46:22 2010 (r206634) +++ head/usr.sbin/pmcstat/pmcstat_log.c Wed Apr 14 21:53:27 2010 (r206635) @@ -1050,7 +1050,6 @@ pmcstat_pmcid_to_name(pmc_id_t pmcid) if (pr->pr_pmcid == pmcid) return (pmcstat_string_unintern(pr->pr_pmcname)); - err(EX_SOFTWARE, "ERROR: cannot find pmcid"); return NULL; } @@ -1083,7 +1082,6 @@ pmcstat_pmcindex_to_pmcr(int pmcin) if (pr->pr_pmcin == pmcin) return pr; - err(EX_SOFTWARE, "ERROR: invalid pmcindex"); return NULL; } From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 22:02:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39D95106566B; Wed, 14 Apr 2010 22:02:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27B6B8FC18; Wed, 14 Apr 2010 22:02: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 o3EM2KmF099981; Wed, 14 Apr 2010 22:02:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EM2KPU099977; Wed, 14 Apr 2010 22:02:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004142202.o3EM2KPU099977@svn.freebsd.org> From: Xin LI Date: Wed, 14 Apr 2010 22:02: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: r206637 - in head: sbin/ifconfig share/man/man4 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: Wed, 14 Apr 2010 22:02:20 -0000 Author: delphij Date: Wed Apr 14 22:02:19 2010 New Revision: 206637 URL: http://svn.freebsd.org/changeset/base/206637 Log: When an underlying ioctl(2) handler returns an error, our ioctl(2) interface considers that it hits a fatal error, and will not copyout the request structure back for _IOW and _IOWR ioctls, keeping them untouched. The previous implementation of the SIOCGIFDESCR ioctl intends to feed the buffer length back to userland. However, if we return an error, the feedback would be defeated and ifconfig(8) would trap into an infinite loop. This commit changes SIOCGIFDESCR to set buffer field to NULL to indicate the previous ENAMETOOLONG case. Reported by: bschmidt MFC after: 2 weeks Modified: head/sbin/ifconfig/ifconfig.c head/share/man/man4/netintro.4 head/sys/net/if.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Wed Apr 14 21:59:22 2010 (r206636) +++ head/sbin/ifconfig/ifconfig.c Wed Apr 14 22:02:19 2010 (r206637) @@ -922,19 +922,20 @@ status(const struct afswtch *afp, const ifr.ifr_buffer.buffer = descr; ifr.ifr_buffer.length = descrlen; if (ioctl(s, SIOCGIFDESCR, &ifr) == 0) { - if (strlen(descr) > 0) - printf("\tdescription: %s\n", descr); - break; - } else if (errno == ENAMETOOLONG) - descrlen = ifr.ifr_buffer.length; - else - break; - } else { + if (ifr.ifr_buffer.buffer == descr) { + if (strlen(descr) > 0) + printf("\tdescription: %s\n", + descr); + } else if (ifr.ifr_buffer.length > descrlen) { + descrlen = ifr.ifr_buffer.length; + continue; + } + } + } else warn("unable to allocate memory for interface" "description"); - break; - } - }; + break; + } if (ioctl(s, SIOCGIFCAP, (caddr_t)&ifr) == 0) { if (ifr.ifr_curcap != 0) { Modified: head/share/man/man4/netintro.4 ============================================================================== --- head/share/man/man4/netintro.4 Wed Apr 14 21:59:22 2010 (r206636) +++ head/share/man/man4/netintro.4 Wed Apr 14 22:02:19 2010 (r206637) @@ -32,7 +32,7 @@ .\" @(#)netintro.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd April 14, 2010 .Dt NETINTRO 4 .Os .Sh NAME @@ -292,8 +292,11 @@ field of struct passed in as parameter, and the length would include the terminating nul character. If there is not enough space to hold the interface length, -no copy would be done and an -error would be returned. +no copy would be done and the +.Va buffer +field of +.Va ifru_buffer +would be set to NULL. The kernel will store the buffer length in the .Va length field upon return, regardless whether the buffer itself is Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Apr 14 21:59:22 2010 (r206636) +++ head/sys/net/if.c Wed Apr 14 22:02:19 2010 (r206637) @@ -2049,14 +2049,13 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, case SIOCGIFDESCR: error = 0; sx_slock(&ifdescr_sx); - if (ifp->if_description == NULL) { - ifr->ifr_buffer.length = 0; + if (ifp->if_description == NULL) error = ENOMSG; - } else { + else { /* space for terminating nul */ descrlen = strlen(ifp->if_description) + 1; if (ifr->ifr_buffer.length < descrlen) - error = ENAMETOOLONG; + ifr->ifr_buffer.buffer = NULL; else error = copyout(ifp->if_description, ifr->ifr_buffer.buffer, descrlen); From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 22:03:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 331B4106566B; Wed, 14 Apr 2010 22:03:49 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21CF28FC1C; Wed, 14 Apr 2010 22:03: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 o3EM3nLT000449; Wed, 14 Apr 2010 22:03:49 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EM3n7T000447; Wed, 14 Apr 2010 22:03:49 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201004142203.o3EM3n7T000447@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 14 Apr 2010 22:03: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: r206638 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Apr 2010 22:03:49 -0000 Author: gavin Date: Wed Apr 14 22:03:48 2010 New Revision: 206638 URL: http://svn.freebsd.org/changeset/base/206638 Log: Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local (almost identically named) local #define. Reviewed by: hselasky Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Wed Apr 14 22:02:19 2010 (r206637) +++ head/sys/dev/usb/input/ukbd.c Wed Apr 14 22:03:48 2010 (r206638) @@ -102,8 +102,6 @@ TUNABLE_INT("hw.usb.ukbd.debug", &ukbd_d TUNABLE_INT("hw.usb.ukbd.no_leds", &ukbd_no_leds); #endif -#define UPROTO_BOOT_KEYBOARD 1 - #define UKBD_EMULATE_ATSCANCODE 1 #define UKBD_DRIVER_NAME "ukbd" #define UKBD_NMOD 8 /* units */ @@ -770,7 +768,7 @@ ukbd_probe(device_t dev) return (ENXIO); if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && - (uaa->info.bInterfaceProtocol == UPROTO_BOOT_KEYBOARD)) { + (uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD)) { if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) return (ENXIO); else From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 23:06:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3EB5106564A; Wed, 14 Apr 2010 23:06:07 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98B778FC0A; Wed, 14 Apr 2010 23:06: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 o3EN67ES014142; Wed, 14 Apr 2010 23:06:07 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EN67gI014138; Wed, 14 Apr 2010 23:06:07 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <201004142306.o3EN67gI014138@svn.freebsd.org> From: Julian Elischer Date: Wed, 14 Apr 2010 23:06: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: r206639 - in head/sys: ddb 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: Wed, 14 Apr 2010 23:06:07 -0000 Author: julian Date: Wed Apr 14 23:06:07 2010 New Revision: 206639 URL: http://svn.freebsd.org/changeset/base/206639 Log: Move two copies of the same definition to a common include file. MFC after: 3 weeks Modified: head/sys/ddb/db_sym.c head/sys/net/vnet.c head/sys/net/vnet.h Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Wed Apr 14 22:03:48 2010 (r206638) +++ head/sys/ddb/db_sym.c Wed Apr 14 23:06:07 2010 (r206639) @@ -64,12 +64,6 @@ static boolean_t db_line_at_pc(c_db_sym_ static int db_cpu = -1; #ifdef VIMAGE -extern uintptr_t *__start_set_vnet; -extern uintptr_t *__stop_set_vnet; - -#define VNET_START (uintptr_t)&__start_set_vnet -#define VNET_STOP (uintptr_t)&__stop_set_vnet - static void *db_vnet = NULL; #endif Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Wed Apr 14 22:03:48 2010 (r206638) +++ head/sys/net/vnet.c Wed Apr 14 23:06:07 2010 (r206639) @@ -154,15 +154,6 @@ struct vnet *vnet0; */ /* - * Location of the kernel's 'set_vnet' linker set. - */ -extern uintptr_t *__start_set_vnet; -extern uintptr_t *__stop_set_vnet; - -#define VNET_START (uintptr_t)&__start_set_vnet -#define VNET_STOP (uintptr_t)&__stop_set_vnet - -/* * Number of bytes of data in the 'set_vnet' linker set, and hence the total * size of all kernel virtualized global variables, and the malloc(9) type * that will be used to allocate it. Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Wed Apr 14 22:03:48 2010 (r206638) +++ head/sys/net/vnet.h Wed Apr 14 23:06:07 2010 (r206639) @@ -92,6 +92,15 @@ struct vnet { #include /* + * Location of the kernel's 'set_vnet' linker set. + */ +extern uintptr_t *__start_set_vnet; +extern uintptr_t *__stop_set_vnet; + +#define VNET_START (uintptr_t)&__start_set_vnet +#define VNET_STOP (uintptr_t)&__stop_set_vnet + +/* * Functions to allocate and destroy virtual network stacks. */ struct vnet *vnet_alloc(void); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 01:20:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894B01065799; Thu, 15 Apr 2010 01:20:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 770EE8FC0C; Thu, 15 Apr 2010 01:20: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 o3F1KUIu043641; Thu, 15 Apr 2010 01:20:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F1KUPt043636; Thu, 15 Apr 2010 01:20:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004150120.o3F1KUPt043636@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 01:20: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: r206640 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 01:20:30 -0000 Author: delphij Date: Thu Apr 15 01:20:30 2010 New Revision: 206640 URL: http://svn.freebsd.org/changeset/base/206640 Log: MFC r205198: Merge OpenSolaris revision 8802:010b31dd4c53: 6773366 "zfs list" memory consumption can be further reduced PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:20:30 2010 (r206640) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -58,6 +58,7 @@ typedef struct callback_data { zfs_type_t cb_types; zfs_sort_column_t *cb_sortcol; zprop_list_t **cb_proplist; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -98,11 +99,20 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist && - zfs_expand_proplist(zhp, cb->cb_proplist) != 0) { - free(node); - return (-1); + + if (cb->cb_proplist) { + if ((*cb->cb_proplist) && + !(*cb->cb_proplist)->pl_all) + zfs_prune_proplist(zhp, + cb->cb_props_table); + + if (zfs_expand_proplist(zhp, cb->cb_proplist) + != 0) { + free(node); + return (-1); + } } + uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -328,7 +338,7 @@ zfs_for_each(int argc, char **argv, int zfs_sort_column_t *sortcol, zprop_list_t **proplist, zfs_iter_f callback, void *data) { - callback_data_t cb; + callback_data_t cb = {0}; int ret = 0; zfs_node_t *node; uu_avl_walk_t *walk; @@ -346,6 +356,39 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; + + /* + * If cb_proplist is provided then in the zfs_handles created we + * retain only those properties listed in cb_proplist and sortcol. + * The rest are pruned. So, the caller should make sure that no other + * properties other than those listed in cb_proplist/sortcol are + * accessed. + * + * If cb_proplist is NULL then we retain all the properties. + */ + if (cb.cb_proplist && *cb.cb_proplist) { + zprop_list_t *p = *cb.cb_proplist; + + while (p) { + if (p->pl_prop >= ZFS_PROP_TYPE && + p->pl_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[p->pl_prop] = B_TRUE; + } + p = p->pl_next; + } + + while (sortcol) { + if (sortcol->sc_prop >= ZFS_PROP_TYPE && + sortcol->sc_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[sortcol->sc_prop] = B_TRUE; + } + sortcol = sortcol->sc_next; + } + } else { + (void) memset(cb.cb_props_table, B_TRUE, + sizeof (cb.cb_props_table)); + } + if ((cb.cb_avl = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL) { (void) fprintf(stderr, gettext("internal error: out of memory\n")); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu Apr 15 01:20:30 2010 (r206640) @@ -369,6 +369,7 @@ typedef struct zprop_list { } zprop_list_t; extern int zfs_expand_proplist(zfs_handle_t *, zprop_list_t **); +extern void zfs_prune_proplist(zfs_handle_t *, uint8_t *); #define ZFS_MOUNTPOINT_NONE "none" #define ZFS_MOUNTPOINT_LEGACY "legacy" Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:20:30 2010 (r206640) @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2042,6 +2042,8 @@ getprop_uint64(zfs_handle_t *zhp, zfs_pr verify(nvlist_lookup_uint64(nv, ZPROP_VALUE, &value) == 0); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { + verify(!zhp->zfs_props_table || + zhp->zfs_props_table[prop] == B_TRUE); value = zfs_prop_default_numeric(prop); *source = ""; } @@ -2061,6 +2063,8 @@ getprop_string(zfs_handle_t *zhp, zfs_pr verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { + verify(!zhp->zfs_props_table || + zhp->zfs_props_table[prop] == B_TRUE); if ((value = (char *)zfs_prop_default_string(prop)) == NULL) value = ""; *source = ""; @@ -4264,6 +4268,30 @@ zfs_deleg_share_nfs(libzfs_handle_t *hdl return (error); } +void +zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) +{ + nvpair_t *curr; + + /* + * Keep a reference to the props-table against which we prune the + * properties. + */ + zhp->zfs_props_table = props; + + curr = nvlist_next_nvpair(zhp->zfs_props, NULL); + + while (curr) { + zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); + nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); + + if (props[zfs_prop] == B_FALSE) + (void) nvlist_remove(zhp->zfs_props, + nvpair_name(curr), nvpair_type(curr)); + curr = next; + } +} + /* * Attach/detach the given filesystem to/from the given jail. */ Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed Apr 14 23:06:07 2010 (r206639) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Thu Apr 15 01:20:30 2010 (r206640) @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -77,6 +77,7 @@ struct zfs_handle { nvlist_t *zfs_user_props; boolean_t zfs_mntcheck; char *zfs_mntopts; + uint8_t *zfs_props_table; }; /* From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 01:22:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2972B1065672; Thu, 15 Apr 2010 01:22:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 155A18FC1A; Thu, 15 Apr 2010 01:22: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 o3F1McEm044167; Thu, 15 Apr 2010 01:22:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F1McLW044163; Thu, 15 Apr 2010 01:22:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004150122.o3F1McLW044163@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 01:22:38 +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: r206641 - stable/8/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: Thu, 15 Apr 2010 01:22:39 -0000 Author: delphij Date: Thu Apr 15 01:22:38 2010 New Revision: 206641 URL: http://svn.freebsd.org/changeset/base/206641 Log: MFC r205199: Merge OpenSolaris revision 9365:7838a22eccd6: PSARC/2009/171 zfs list -d and zfs get -d 6762432 zfs list --depth PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:20:30 2010 (r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:22:38 2010 (r206641) @@ -53,12 +53,14 @@ typedef struct zfs_node { } zfs_node_t; typedef struct callback_data { - uu_avl_t *cb_avl; - int cb_flags; - zfs_type_t cb_types; - zfs_sort_column_t *cb_sortcol; - zprop_list_t **cb_proplist; - uint8_t cb_props_table[ZFS_NUM_PROPS]; + uu_avl_t *cb_avl; + int cb_flags; + zfs_type_t cb_types; + zfs_sort_column_t *cb_sortcol; + zprop_list_t **cb_proplist; + int cb_depth_limit; + int cb_depth; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -99,7 +101,6 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist) { if ((*cb->cb_proplist) && !(*cb->cb_proplist)->pl_all) @@ -112,7 +113,6 @@ zfs_callback(zfs_handle_t *zhp, void *da return (-1); } } - uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -123,11 +123,15 @@ zfs_callback(zfs_handle_t *zhp, void *da /* * Recurse if necessary. */ - if (cb->cb_flags & ZFS_ITER_RECURSE) { + if (cb->cb_flags & ZFS_ITER_RECURSE && + ((cb->cb_flags & ZFS_ITER_DEPTH_LIMIT) == 0 || + cb->cb_depth < cb->cb_depth_limit)) { + cb->cb_depth++; if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) (void) zfs_iter_filesystems(zhp, zfs_callback, data); if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) (void) zfs_iter_snapshots(zhp, zfs_callback, data); + cb->cb_depth--; } if (!dontclose) @@ -335,7 +339,7 @@ zfs_sort(const void *larg, const void *r int zfs_for_each(int argc, char **argv, int flags, zfs_type_t types, - zfs_sort_column_t *sortcol, zprop_list_t **proplist, + zfs_sort_column_t *sortcol, zprop_list_t **proplist, int limit, zfs_iter_f callback, void *data) { callback_data_t cb = {0}; @@ -356,7 +360,7 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; - + cb.cb_depth_limit = limit; /* * If cb_proplist is provided then in the zfs_handles created we * retain only those properties listed in cb_proplist and sortcol. Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Thu Apr 15 01:20:30 2010 (r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Thu Apr 15 01:22:38 2010 (r206641) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -41,9 +41,10 @@ typedef struct zfs_sort_column { #define ZFS_ITER_RECURSE (1 << 0) #define ZFS_ITER_ARGS_CAN_BE_PATHS (1 << 1) #define ZFS_ITER_PROP_LISTSNAPS (1 << 2) +#define ZFS_ITER_DEPTH_LIMIT (1 << 3) int zfs_for_each(int, char **, int options, zfs_type_t, - zfs_sort_column_t *, zprop_list_t **, zfs_iter_f, void *); + zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t); void zfs_free_sort_columns(zfs_sort_column_t *); Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Apr 15 01:20:30 2010 (r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu Apr 15 01:22:38 2010 (r206641) @@ -190,8 +190,8 @@ get_usage(zfs_help_t idx) return (gettext("\tdestroy [-rRf] " "\n")); case HELP_GET: - return (gettext("\tget [-rHp] [-o field[,...]] " - "[-s source[,...]]\n" + return (gettext("\tget [-rHp] [-d max] " + "[-o field[,...]] [-s source[,...]]\n" "\t <\"all\" | property[,...]> " "[filesystem|volume|snapshot] ...\n")); case HELP_INHERIT: @@ -205,8 +205,8 @@ get_usage(zfs_help_t idx) case HELP_UNJAIL: return (gettext("\tunjail \n")); case HELP_LIST: - return (gettext("\tlist [-rH] [-o property[,...]] " - "[-t type[,...]] [-s property] ...\n" + return (gettext("\tlist [-rH][-d max] " + "[-o property[,...]] [-t type[,...]] [-s property] ...\n" "\t [-S property] ... " "[filesystem|volume|snapshot] ...\n")); case HELP_MOUNT: @@ -432,6 +432,27 @@ parseprop(nvlist_t *props) } +static int +parse_depth(char *opt, int *flags) +{ + char *tmp; + int depth; + + depth = (int)strtol(opt, &tmp, 0); + if (*tmp) { + (void) fprintf(stderr, + gettext("%s is not an integer\n"), optarg); + usage(B_FALSE); + } + if (depth < 0) { + (void) fprintf(stderr, + gettext("Depth can not be negative.\n")); + usage(B_FALSE); + } + *flags |= (ZFS_ITER_DEPTH_LIMIT|ZFS_ITER_RECURSE); + return (depth); +} + /* * zfs clone [-p] [-o prop=value] ... * @@ -1119,6 +1140,7 @@ zfs_do_get(int argc, char **argv) int i, c, flags = 0; char *value, *fields; int ret; + int limit = 0; zprop_list_t fake_name = { 0 }; /* @@ -1132,11 +1154,14 @@ zfs_do_get(int argc, char **argv) cb.cb_type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, ":o:s:rHp")) != -1) { + while ((c = getopt(argc, argv, ":d:o:s:rHp")) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; break; + case 'd': + limit = parse_depth(optarg, &flags); + break; case 'r': flags |= ZFS_ITER_RECURSE; break; @@ -1267,7 +1292,7 @@ zfs_do_get(int argc, char **argv) /* run for each object */ ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, NULL, - &cb.cb_proplist, get_callback, &cb); + &cb.cb_proplist, limit, get_callback, &cb); if (cb.cb_proplist == &fake_name) zprop_free_list(fake_name.pl_next); @@ -1380,10 +1405,10 @@ zfs_do_inherit(int argc, char **argv) if (flags & ZFS_ITER_RECURSE) { ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, - NULL, NULL, inherit_recurse_cb, propname); + NULL, NULL, 0, inherit_recurse_cb, propname); } else { ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, - NULL, NULL, inherit_cb, propname); + NULL, NULL, 0, inherit_cb, propname); } return (ret); @@ -1578,7 +1603,7 @@ zfs_do_upgrade(int argc, char **argv) if (cb.cb_version == 0) cb.cb_version = ZPL_VERSION; ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_set_callback, &cb); + NULL, NULL, 0, upgrade_set_callback, &cb); (void) printf(gettext("%llu filesystems upgraded\n"), cb.cb_numupgraded); if (cb.cb_numsamegraded) { @@ -1596,14 +1621,14 @@ zfs_do_upgrade(int argc, char **argv) flags |= ZFS_ITER_RECURSE; ret = zfs_for_each(0, NULL, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_list_callback, &cb); + NULL, NULL, 0, upgrade_list_callback, &cb); found = cb.cb_foundone; cb.cb_foundone = B_FALSE; cb.cb_newer = B_TRUE; ret = zfs_for_each(0, NULL, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_list_callback, &cb); + NULL, NULL, 0, upgrade_list_callback, &cb); if (!cb.cb_foundone && !found) { (void) printf(gettext("All filesystems are " @@ -1615,11 +1640,12 @@ zfs_do_upgrade(int argc, char **argv) } /* - * list [-rH] [-o property[,property]...] [-t type[,type]...] + * list [-r][-d max] [-H] [-o property[,property]...] [-t type[,type]...] * [-s property [-s property]...] [-S property [-S property]...] * ... * * -r Recurse over all children + * -d Limit recursion by depth. * -H Scripted mode; elide headers and separate columns by tabs * -o Control which fields to display. * -t Control which object types to display. @@ -1769,16 +1795,20 @@ zfs_do_list(int argc, char **argv) char *fields = NULL; list_cbdata_t cb = { 0 }; char *value; + int limit = 0; int ret; zfs_sort_column_t *sortcol = NULL; int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS; /* check options */ - while ((c = getopt(argc, argv, ":o:rt:Hs:S:")) != -1) { + while ((c = getopt(argc, argv, ":d:o:rt:Hs:S:")) != -1) { switch (c) { case 'o': fields = optarg; break; + case 'd': + limit = parse_depth(optarg, &flags); + break; case 'r': flags |= ZFS_ITER_RECURSE; break; @@ -1869,7 +1899,7 @@ zfs_do_list(int argc, char **argv) cb.cb_first = B_TRUE; ret = zfs_for_each(argc, argv, flags, types, sortcol, &cb.cb_proplist, - list_callback, &cb); + limit, list_callback, &cb); zprop_free_list(cb.cb_proplist); zfs_free_sort_columns(sortcol); @@ -2252,7 +2282,7 @@ zfs_do_set(int argc, char **argv) } ret = zfs_for_each(argc - 2, argv + 2, NULL, - ZFS_TYPE_DATASET, NULL, NULL, set_callback, &cb); + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); return (ret); } @@ -2886,7 +2916,7 @@ zfs_do_unallow(int argc, char **argv) flags |= ZFS_ITER_RECURSE; error = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM|ZFS_TYPE_VOLUME, NULL, - NULL, unallow_callback, (void *)zperms); + NULL, 0, unallow_callback, (void *)zperms); if (zperms) nvlist_free(zperms); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 01:25:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDDD9106564A; Thu, 15 Apr 2010 01:25:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A285F8FC08; Thu, 15 Apr 2010 01:25: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 o3F1PHFV044834; Thu, 15 Apr 2010 01:25:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F1PHAT044831; Thu, 15 Apr 2010 01:25:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004150125.o3F1PHAT044831@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 01:25: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: r206642 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 01:25:17 -0000 Author: delphij Date: Thu Apr 15 01:25:17 2010 New Revision: 206642 URL: http://svn.freebsd.org/changeset/base/206642 Log: MFC r205200 + r206199 Merge OpenSolaris revision 9396:f41cf682d0d3: 6830813 zfs list -t all fails assertion *Note that this is only a partial merge of this revision addressing only this one issue.* PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:22:38 2010 (r206641) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Thu Apr 15 01:25:17 2010 (r206642) @@ -368,7 +368,10 @@ zfs_for_each(int argc, char **argv, int * properties other than those listed in cb_proplist/sortcol are * accessed. * - * If cb_proplist is NULL then we retain all the properties. + * If cb_proplist is NULL then we retain all the properties. We + * always retain the zoned property, which some other properties + * need (userquota & friends), and the createtxg property, which + * we need to sort snapshots. */ if (cb.cb_proplist && *cb.cb_proplist) { zprop_list_t *p = *cb.cb_proplist; @@ -388,6 +391,9 @@ zfs_for_each(int argc, char **argv, int } sortcol = sortcol->sc_next; } + + cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE; + cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE; } else { (void) memset(cb.cb_props_table, B_TRUE, sizeof (cb.cb_props_table)); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:22:38 2010 (r206641) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:25:17 2010 (r206642) @@ -4285,7 +4285,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 05:56:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A280106564A; Thu, 15 Apr 2010 05:56:28 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3678FC15; Thu, 15 Apr 2010 05:56:25 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA18330; Thu, 15 Apr 2010 08:56:24 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O2I3r-0004kw-NO; Thu, 15 Apr 2010 08:56:23 +0300 Message-ID: <4BC6AA87.40309@freebsd.org> Date: Thu, 15 Apr 2010 08:56:23 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201004150120.o3F1KUPt043636@svn.freebsd.org> In-Reply-To: <201004150120.o3F1KUPt043636@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r206640 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 05:56:28 -0000 on 15/04/2010 04:20 Xin LI said the following: > Author: delphij > Date: Thu Apr 15 01:20:30 2010 > New Revision: 206640 > URL: http://svn.freebsd.org/changeset/base/206640 > > Log: > MFC r205198: > > Merge OpenSolaris revision 8802:010b31dd4c53: > > 6773366 "zfs list" memory consumption can be further reduced > > PR: bin/144720 > Submitted by: mm I wonder why you haven't also included into this MFC the commit that fixes crash with user properties. I think it's not nice to MFC a change with a known bug without a fix. > + while (curr) { > + zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); > + nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); > + > + if (props[zfs_prop] == B_FALSE) zfs_prop can be -1 here, remember? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 05:59:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5A79106564A; Thu, 15 Apr 2010 05:59:31 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 370008FC13; Thu, 15 Apr 2010 05:59:29 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA18418; Thu, 15 Apr 2010 08:59:28 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O2I6q-0004lE-Fp; Thu, 15 Apr 2010 08:59:28 +0300 Message-ID: <4BC6AB3F.6090605@freebsd.org> Date: Thu, 15 Apr 2010 08:59:27 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Xin LI References: <201004150125.o3F1PHAT044831@svn.freebsd.org> In-Reply-To: <201004150125.o3F1PHAT044831@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r206642 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 05:59:31 -0000 on 15/04/2010 04:25 Xin LI said the following: > Author: delphij > Date: Thu Apr 15 01:25:17 2010 > New Revision: 206642 > URL: http://svn.freebsd.org/changeset/base/206642 > > Log: > MFC r205200 + r206199 > > Merge OpenSolaris revision 9396:f41cf682d0d3: > > 6830813 zfs list -t all fails assertion > > *Note that this is only a partial merge of this revision addressing only > this one issue.* > > PR: bin/144720 > Submitted by: mm Oh here it is :) The window between the commits is sufficiently small, but I still think that it would have been better to MFC the fix in one go. > - if (props[zfs_prop] == B_FALSE) > + /* > + * We leave user:props in the nvlist, so there will be > + * some ZPROP_INVAL. To be extra safe, don't prune > + * those. > + */ > + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) > (void) nvlist_remove(zhp->zfs_props, > nvpair_name(curr), nvpair_type(curr)); > curr = next; -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 06:19:04 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFE44106566B; Thu, 15 Apr 2010 06:19:04 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 661BE8FC12; Thu, 15 Apr 2010 06:19:04 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id C8FE573098; Thu, 15 Apr 2010 08:29:31 +0200 (CEST) Date: Thu, 15 Apr 2010 08:29:31 +0200 From: Luigi Rizzo To: Pawel Jakub Dawidek Message-ID: <20100415062931.GA92769@onelab2.iet.unipi.it> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> <20100414081630.GA74130@onelab2.iet.unipi.it> <20100414160554.GB3188@gandalf.sssup.it> <20100414210117.GA2252@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414210117.GA2252@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Fabio Checconi Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 06:19:04 -0000 On Wed, Apr 14, 2010 at 11:01:17PM +0200, Pawel Jakub Dawidek wrote: > On Wed, Apr 14, 2010 at 06:05:54PM +0200, Fabio Checconi wrote: > > - Some classes (from a quick look I've seen only g_mirror, but I'm > > pretty sure there were some other ones) cache pointers to their > > providers. With these classes this implementation does not work. > > This can be easly changed to go though geom to provider. Many of my > classes do that. Absolutely. The above was just to explain why we only implemented insert/remove within geom_sched instead of globally. If/when we make the feature globally available, we also need to inspect all classes to make sure that there are no surprises. cheers luigi > > -- > Pawel Jakub Dawidek http://www.wheelsystems.com > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 08:17:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB6031065672; Thu, 15 Apr 2010 08:17:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9CC98FC1A; Thu, 15 Apr 2010 08:17: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 o3F8HSRb039772; Thu, 15 Apr 2010 08:17:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8HSjg039771; Thu, 15 Apr 2010 08:17:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004150817.o3F8HSjg039771@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Apr 2010 08:17: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: r206646 - 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, 15 Apr 2010 08:17:28 -0000 Author: kib Date: Thu Apr 15 08:17:28 2010 New Revision: 206646 URL: http://svn.freebsd.org/changeset/base/206646 Log: MFC r206395: Do not leak master pty or ptmx vnode. Modified: stable/8/sys/kern/tty_pts.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/tty_pts.c ============================================================================== --- stable/8/sys/kern/tty_pts.c Thu Apr 15 05:24:18 2010 (r206645) +++ stable/8/sys/kern/tty_pts.c Thu Apr 15 08:17:28 2010 (r206646) @@ -589,6 +589,15 @@ ptsdev_close(struct file *fp, struct thr tty_lock(tp); tty_rel_gone(tp); + /* + * Open of /dev/ptmx or /dev/ptyXX changes the type of file + * from DTYPE_VNODE to DTYPE_PTS. vn_open() increases vnode + * use count, we need to decrement it, and possibly do other + * required cleanup. + */ + if (fp->f_vnode != NULL) + return (vnops.fo_close(fp, td)); + return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 08:20:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3932106566C; Thu, 15 Apr 2010 08:20:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D18AB8FC1B; Thu, 15 Apr 2010 08:20: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 o3F8KvDA040589; Thu, 15 Apr 2010 08:20:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8KvpB040587; Thu, 15 Apr 2010 08:20:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004150820.o3F8KvpB040587@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Apr 2010 08:20: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: r206647 - stable/8/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 08:20:58 -0000 Author: kib Date: Thu Apr 15 08:20:57 2010 New Revision: 206647 URL: http://svn.freebsd.org/changeset/base/206647 Log: MFC r206397: Enhance r199804 by marking the daemonised child as immune to OOM instead of short-living parent. Only mark the master process that accepts connections, do not protect connection handlers spawned from inetd. Modified: stable/8/crypto/openssh/sshd.c Directory Properties: stable/8/crypto/openssh/ (props changed) Modified: stable/8/crypto/openssh/sshd.c ============================================================================== --- stable/8/crypto/openssh/sshd.c Thu Apr 15 08:17:28 2010 (r206646) +++ stable/8/crypto/openssh/sshd.c Thu Apr 15 08:20:57 2010 (r206647) @@ -1293,10 +1293,6 @@ main(int ac, char **av) /* Initialize configuration options to their default values. */ initialize_server_options(&options); - /* Avoid killing the process in high-pressure swapping environments. */ - if (madvise(NULL, 0, MADV_PROTECT) != 0) - debug("madvise(): %.200s", strerror(errno)); - /* Parse command-line arguments. */ while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:C:dDeiqrtQRT46")) != -1) { switch (opt) { @@ -1663,6 +1659,10 @@ main(int ac, char **av) /* Reinitialize the log (because of the fork above). */ log_init(__progname, options.log_level, options.log_facility, log_stderr); + /* Avoid killing the process in high-pressure swapping environments. */ + if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0) + debug("madvise(): %.200s", strerror(errno)); + /* Initialize the random number generator. */ arc4random_stir(); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 08:29:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 890DB106564A; Thu, 15 Apr 2010 08:29:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77D698FC13; Thu, 15 Apr 2010 08:29: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 o3F8TEkO042466; Thu, 15 Apr 2010 08:29:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8TEa4042464; Thu, 15 Apr 2010 08:29:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004150829.o3F8TEa4042464@svn.freebsd.org> From: Andriy Gapon Date: Thu, 15 Apr 2010 08:29: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: r206648 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 08:29:14 -0000 Author: avg Date: Thu Apr 15 08:29:14 2010 New Revision: 206648 URL: http://svn.freebsd.org/changeset/base/206648 Log: scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and d_mediasize CD_FLAG_VALID_TOC is not required for setting those media properties. PR: kern/145385 Submitted by: Juergen Lock a slightly different version Tested by: Pavel Sukhoy , Markus Wild , Juergen Lock , uqs MFC after: 1 week Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Apr 15 08:20:57 2010 (r206647) +++ head/sys/cam/scsi/scsi_cd.c Thu Apr 15 08:29:14 2010 (r206648) @@ -2773,8 +2773,12 @@ cdcheckmedia(struct cam_periph *periph) softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC); cdprevent(periph, PR_ALLOW); return (error); - } else + } else { softc->flags |= CD_FLAG_VALID_MEDIA; + softc->disk->d_sectorsize = softc->params.blksize; + softc->disk->d_mediasize = + (off_t)softc->params.blksize * softc->params.disksize; + } /* * Now we check the table of contents. This (currently) is only @@ -2863,9 +2867,6 @@ cdcheckmedia(struct cam_periph *periph) } softc->flags |= CD_FLAG_VALID_TOC; - softc->disk->d_sectorsize = softc->params.blksize; - softc->disk->d_mediasize = - (off_t)softc->params.blksize * softc->params.disksize; bailout: From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 08:32:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6AE21065676; Thu, 15 Apr 2010 08:32:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95CE68FC21; Thu, 15 Apr 2010 08:32: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 o3F8Wo4a043308; Thu, 15 Apr 2010 08:32:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8Wo2h043306; Thu, 15 Apr 2010 08:32:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004150832.o3F8Wo2h043306@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Apr 2010 08: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: r206649 - 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, 15 Apr 2010 08:32:50 -0000 Author: kib Date: Thu Apr 15 08:32:50 2010 New Revision: 206649 URL: http://svn.freebsd.org/changeset/base/206649 Log: Still reference struct __sigaction with clarification when this form of argument declaration is needed. Discussed with: bde MFC after: 3 days Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Thu Apr 15 08:29:14 2010 (r206648) +++ head/lib/libc/sys/sigaction.2 Thu Apr 15 08:32:50 2010 (r206649) @@ -496,6 +496,16 @@ or .Dv SIG_IGN this way. .Pp +If preprocessing symbol +.Va _POSIX_C_SOURCE +with the value >= 199309 is not defined, the following declaration for +the handler shall be used: +.Bl -tag -offset indent -width short +.It Tn POSIX Dv SA_SIGINFO : +.Ft void +.Fn handler int "struct __sigaction *" "void *" ; +.El +.Pp If the .Dv SA_SIGINFO flag is not set, the handler function should match From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 08:39:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65D94106564A; Thu, 15 Apr 2010 08:39:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 554C68FC13; Thu, 15 Apr 2010 08:39: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 o3F8duc2044971; Thu, 15 Apr 2010 08:39:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F8duH0044969; Thu, 15 Apr 2010 08:39:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004150839.o3F8duH0044969@svn.freebsd.org> From: Andriy Gapon Date: Thu, 15 Apr 2010 08:39: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: r206650 - 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: Thu, 15 Apr 2010 08:39:56 -0000 Author: avg Date: Thu Apr 15 08:39:56 2010 New Revision: 206650 URL: http://svn.freebsd.org/changeset/base/206650 Log: g_io_check: respond to zero pp->mediasize with ENXIO Previsouly this condition was reported with EIO by bio_offset > mediasize check. Perhaps that check should be extended to bio_offset+bio_length > mediasize. MFC after: 1 week Modified: head/sys/geom/geom_io.c Modified: head/sys/geom/geom_io.c ============================================================================== --- head/sys/geom/geom_io.c Thu Apr 15 08:32:50 2010 (r206649) +++ head/sys/geom/geom_io.c Thu Apr 15 08:39:56 2010 (r206650) @@ -309,8 +309,8 @@ g_io_check(struct bio *bp) case BIO_READ: case BIO_WRITE: case BIO_DELETE: - /* Zero sectorsize is a probably lack of media */ - if (pp->sectorsize == 0) + /* Zero sectorsize or mediasize is probably a lack of media. */ + if (pp->sectorsize == 0 || pp->mediasize == 0) return (ENXIO); /* Reject I/O not on sector boundary */ if (bp->bio_offset % pp->sectorsize) From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 09:22:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68B061065678; Thu, 15 Apr 2010 09:22:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 584AF8FC0C; Thu, 15 Apr 2010 09:22: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 o3F9MEDG054259; Thu, 15 Apr 2010 09:22:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3F9ME1n054257; Thu, 15 Apr 2010 09:22:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004150922.o3F9ME1n054257@svn.freebsd.org> From: Andriy Gapon Date: Thu, 15 Apr 2010 09:22: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: r206651 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 09:22:14 -0000 Author: avg Date: Thu Apr 15 09:22:14 2010 New Revision: 206651 URL: http://svn.freebsd.org/changeset/base/206651 Log: scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and d_mediasize [Forced commit to correct PR number.] CD_FLAG_VALID_TOC is not required for setting those media properties. PR: kern/138789 Submitted by: Juergen Lock a slightly different version Tested by: Pavel Sukhoy , Markus Wild , Juergen Lock , uqs MFC after: 1 week Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 11:17:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8018A106566C; Thu, 15 Apr 2010 11:17:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70F528FC13; Thu, 15 Apr 2010 11:17: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 o3FBHXR1081103; Thu, 15 Apr 2010 11:17:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FBHXAB081101; Thu, 15 Apr 2010 11:17:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151117.o3FBHXAB081101@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 11:17: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: r206652 - head/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: Thu, 15 Apr 2010 11:17:33 -0000 Author: mav Date: Thu Apr 15 11:17:33 2010 New Revision: 206652 URL: http://svn.freebsd.org/changeset/base/206652 Log: Explicitly enable PCI busmastering on attach. Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100). H/W donated by: Gheorghe Ardelean Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Thu Apr 15 09:22:14 2010 (r206651) +++ head/sys/dev/siis/siis.c Thu Apr 15 11:17:33 2010 (r206652) @@ -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 Thu Apr 15 12:20:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0695B106566C; Thu, 15 Apr 2010 12:20:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D16108FC12; Thu, 15 Apr 2010 12:20: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 o3FCKDMl095034; Thu, 15 Apr 2010 12:20:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCKDBl095032; Thu, 15 Apr 2010 12:20:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151220.o3FCKDBl095032@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:20: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: r206653 - 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: Thu, 15 Apr 2010 12:20:14 -0000 Author: mav Date: Thu Apr 15 12:20:13 2010 New Revision: 206653 URL: http://svn.freebsd.org/changeset/base/206653 Log: MFC r205680: Use last 16 bytes of serial number in metadata instead of first ones, same as Intel MatrixRAID does. PR: kern/124064 Modified: stable/8/sys/dev/ata/ata-raid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-raid.c ============================================================================== --- stable/8/sys/dev/ata/ata-raid.c Thu Apr 15 11:17:33 2010 (r206652) +++ stable/8/sys/dev/ata/ata-raid.c Thu Apr 15 12:20:13 2010 (r206653) @@ -2568,8 +2568,15 @@ ata_raid_intel_read_meta(device_t dev, s if (meta->generation >= raid->generation) { for (disk = 0; disk < raid->total_disks; disk++) { struct ata_device *atadev = device_get_softc(parent); + int len; - if (!strncmp(raid->disks[disk].serial, atadev->param.serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(raid->disks[disk].serial)) ? + len - sizeof(raid->disks[disk].serial) : 0; + if (!strncmp(raid->disks[disk].serial, atadev->param.serial + len, sizeof(raid->disks[disk].serial))) { raid->disks[disk].dev = parent; raid->disks[disk].flags |= (AR_DF_PRESENT | AR_DF_ONLINE); @@ -2639,8 +2646,15 @@ ata_raid_intel_write_meta(struct ar_soft device_get_softc(device_get_parent(rdp->disks[disk].dev)); struct ata_device *atadev = device_get_softc(rdp->disks[disk].dev); + int len; - bcopy(atadev->param.serial, meta->disk[disk].serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(rdp->disks[disk].serial)) ? + len - sizeof(rdp->disks[disk].serial) : 0; + bcopy(atadev->param.serial + len, meta->disk[disk].serial, sizeof(rdp->disks[disk].serial)); meta->disk[disk].sectors = rdp->disks[disk].sectors; meta->disk[disk].id = (ch->unit << 16) | atadev->unit; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:22:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76131106564A; Thu, 15 Apr 2010 12:22:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF8E8FC1C; Thu, 15 Apr 2010 12:22: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 o3FCMlZu095692; Thu, 15 Apr 2010 12:22:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCMl0n095690; Thu, 15 Apr 2010 12:22:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151222.o3FCMl0n095690@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:22:47 +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: r206654 - stable/7/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: Thu, 15 Apr 2010 12:22:47 -0000 Author: mav Date: Thu Apr 15 12:22:47 2010 New Revision: 206654 URL: http://svn.freebsd.org/changeset/base/206654 Log: MFC r205680: Use last 16 bytes of serial number in metadata instead of first ones, same as Intel MatrixRAID does. PR: kern/124064 Modified: stable/7/sys/dev/ata/ata-raid.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/ata/ata-raid.c ============================================================================== --- stable/7/sys/dev/ata/ata-raid.c Thu Apr 15 12:20:13 2010 (r206653) +++ stable/7/sys/dev/ata/ata-raid.c Thu Apr 15 12:22:47 2010 (r206654) @@ -2559,8 +2559,15 @@ ata_raid_intel_read_meta(device_t dev, s if (meta->generation >= raid->generation) { for (disk = 0; disk < raid->total_disks; disk++) { struct ata_device *atadev = device_get_softc(parent); + int len; - if (!strncmp(raid->disks[disk].serial, atadev->param.serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(raid->disks[disk].serial)) ? + len - sizeof(raid->disks[disk].serial) : 0; + if (!strncmp(raid->disks[disk].serial, atadev->param.serial + len, sizeof(raid->disks[disk].serial))) { raid->disks[disk].dev = parent; raid->disks[disk].flags |= (AR_DF_PRESENT | AR_DF_ONLINE); @@ -2627,8 +2634,15 @@ ata_raid_intel_write_meta(struct ar_soft device_get_softc(device_get_parent(rdp->disks[disk].dev)); struct ata_device *atadev = device_get_softc(rdp->disks[disk].dev); + int len; - bcopy(atadev->param.serial, meta->disk[disk].serial, + for (len = 0; len < sizeof(atadev->param.serial); len++) { + if (atadev->param.serial[len] < 0x20) + break; + } + len = (len > sizeof(rdp->disks[disk].serial)) ? + len - sizeof(rdp->disks[disk].serial) : 0; + bcopy(atadev->param.serial + len, meta->disk[disk].serial, sizeof(rdp->disks[disk].serial)); meta->disk[disk].sectors = rdp->disks[disk].sectors; meta->disk[disk].id = (ch->unit << 16) | ATA_DEV(atadev->unit); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:26:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4742106564A; Thu, 15 Apr 2010 12:26:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 950058FC15; Thu, 15 Apr 2010 12:26: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 o3FCQOsA096584; Thu, 15 Apr 2010 12:26:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCQO3t096582; Thu, 15 Apr 2010 12:26:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151226.o3FCQO3t096582@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:26:24 +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: r206655 - 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: Thu, 15 Apr 2010 12:26:24 -0000 Author: mav Date: Thu Apr 15 12:26:24 2010 New Revision: 206655 URL: http://svn.freebsd.org/changeset/base/206655 Log: MFC r205967: Include opt_ata.h, as some structures here depending on ATA_CAM option. This fixes ATA_CAM with atamvsata and probably some other drivers. Modified: stable/8/sys/dev/ata/ata-all.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.h ============================================================================== --- stable/8/sys/dev/ata/ata-all.h Thu Apr 15 12:22:47 2010 (r206654) +++ stable/8/sys/dev/ata/ata-all.h Thu Apr 15 12:26:24 2010 (r206655) @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include "opt_ata.h" + #if 0 #define ATA_LEGACY_SUPPORT /* Enable obsolete features that break * some modern devices */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:30:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 704421065674; Thu, 15 Apr 2010 12:30:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60D0C8FC08; Thu, 15 Apr 2010 12: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 o3FCUkWU097665; Thu, 15 Apr 2010 12:30:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCUkAG097663; Thu, 15 Apr 2010 12:30:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151230.o3FCUkAG097663@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12: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: r206656 - stable/8/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 12:30:46 -0000 Author: mav Date: Thu Apr 15 12:30:46 2010 New Revision: 206656 URL: http://svn.freebsd.org/changeset/base/206656 Log: MFC r206053, r206054: Fill extended ATA command registers in cPRD to support 48bit commands. Modified: stable/8/sys/arm/mv/mv_sata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/mv/mv_sata.c ============================================================================== --- stable/8/sys/arm/mv/mv_sata.c Thu Apr 15 12:26:24 2010 (r206655) +++ stable/8/sys/arm/mv/mv_sata.c Thu Apr 15 12:30:46 2010 (r206656) @@ -600,7 +600,12 @@ sata_channel_begin_transaction(struct at crqb->crqb_ata_lba_mid = request->u.ata.lba >> 8; crqb->crqb_ata_lba_high = request->u.ata.lba >> 16; crqb->crqb_ata_device = ((request->u.ata.lba >> 24) & 0x0F) | (1 << 6); + crqb->crqb_ata_lba_low_p = request->u.ata.lba >> 24; + crqb->crqb_ata_lba_mid_p = request->u.ata.lba >> 32; + crqb->crqb_ata_lba_high_p = request->u.ata.lba >> 40; + crqb->crqb_ata_feature_p = request->u.ata.feature >> 8; crqb->crqb_ata_count = request->u.ata.count; + crqb->crqb_ata_count_p = request->u.ata.count >> 8; bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:38:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA3BA106564A; Thu, 15 Apr 2010 12:38:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAC4A8FC22; Thu, 15 Apr 2010 12:38: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 o3FCctKb099608; Thu, 15 Apr 2010 12:38:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCctL9099606; Thu, 15 Apr 2010 12:38:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151238.o3FCctL9099606@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:38:55 +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: r206657 - 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, 15 Apr 2010 12:38:56 -0000 Author: mav Date: Thu Apr 15 12:38:55 2010 New Revision: 206657 URL: http://svn.freebsd.org/changeset/base/206657 Log: NFC r206000: Make ng_ppp fulfill upper protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410, sparc/118932, sparc/113556 Modified: stable/8/sys/netgraph/ng_ppp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_ppp.c ============================================================================== --- stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:30:46 2010 (r206656) +++ stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:38:55 2010 (r206657) @@ -907,7 +907,21 @@ ng_ppp_proto_recv(node_p node, item_p it const priv_p priv = NG_NODE_PRIVATE(node); hook_p outHook = NULL; int error; +#ifdef ALIGNED_POINTER + struct mbuf *m, *n; + NGI_GET_M(item, m); + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + NG_FREE_ITEM(item); + return (ENOBUFS); + } + m = n; + } + NGI_M(item) = m; +#endif /* ALIGNED_POINTER */ switch (proto) { case PROT_IP: if (priv->conf.enableIP) From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:40:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B2F5106566C; Thu, 15 Apr 2010 12:40:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78DF38FC0C; Thu, 15 Apr 2010 12:40: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 o3FCe2nv099892; Thu, 15 Apr 2010 12:40:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCe2v8099890; Thu, 15 Apr 2010 12:40:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151240.o3FCe2v8099890@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:40:02 +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: r206658 - 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, 15 Apr 2010 12:40:03 -0000 Author: mav Date: Thu Apr 15 12:40:02 2010 New Revision: 206658 URL: http://svn.freebsd.org/changeset/base/206658 Log: MFC r206015: Make ng_l2tp irrelevant to data alignment. Modified: stable/8/sys/netgraph/ng_l2tp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_l2tp.c ============================================================================== --- stable/8/sys/netgraph/ng_l2tp.c Thu Apr 15 12:38:55 2010 (r206657) +++ stable/8/sys/netgraph/ng_l2tp.c Thu Apr 15 12:40:02 2010 (r206658) @@ -790,7 +790,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - hdr = ntohs(*mtod(m, u_int16_t *)); + hdr = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1]; m_adj(m, 2); /* Check required header bits and minimum length */ @@ -819,7 +819,7 @@ ng_l2tp_rcvdata_lower(hook_p h, item_p i NG_FREE_ITEM(item); ERROUT(EINVAL); } - len = (u_int16_t)ntohs(*mtod(m, u_int16_t *)) - 4; + len = (mtod(m, uint8_t *)[0] << 8) + mtod(m, uint8_t *)[1] - 4; m_adj(m, 2); if (len < 0 || len > m->m_pkthdr.len) { priv->stats.recvInvalid++; @@ -1095,9 +1095,10 @@ ng_l2tp_rcvdata(hook_p hook, item_p item const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); const hookpriv_p hpriv = NG_HOOK_PRIVATE(hook); struct mbuf *m; + uint8_t *p; u_int16_t hdr; int error; - int i = 1; + int i = 2; /* Sanity check */ L2TP_SEQ_CHECK(&priv->seq); @@ -1129,20 +1130,27 @@ ng_l2tp_rcvdata(hook_p hook, item_p item NG_FREE_ITEM(item); ERROUT(ENOBUFS); } + p = mtod(m, uint8_t *); hdr = L2TP_DATA_HDR; if (hpriv->conf.include_length) { hdr |= L2TP_HDR_LEN; - mtod(m, u_int16_t *)[i++] = htons(m->m_pkthdr.len); + p[i++] = m->m_pkthdr.len >> 8; + p[i++] = m->m_pkthdr.len & 0xff; } - mtod(m, u_int16_t *)[i++] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[i++] = htons(hpriv->conf.peer_id); + p[i++] = priv->conf.peer_id >> 8; + p[i++] = priv->conf.peer_id & 0xff; + p[i++] = hpriv->conf.peer_id >> 8; + p[i++] = hpriv->conf.peer_id & 0xff; if (hpriv->conf.enable_dseq) { hdr |= L2TP_HDR_SEQ; - mtod(m, u_int16_t *)[i++] = htons(hpriv->ns); - mtod(m, u_int16_t *)[i++] = htons(hpriv->nr); + p[i++] = hpriv->ns >> 8; + p[i++] = hpriv->ns & 0xff; + p[i++] = hpriv->nr >> 8; + p[i++] = hpriv->nr & 0xff; hpriv->ns++; } - mtod(m, u_int16_t *)[0] = htons(hdr); + p[0] = hdr >> 8; + p[1] = hdr & 0xff; /* Update per session stats. */ hpriv->stats.xmitPackets++; @@ -1496,6 +1504,7 @@ static int ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) { struct l2tp_seq *const seq = &priv->seq; + uint8_t *p; u_int16_t session_id = 0; int error; @@ -1540,12 +1549,19 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mb } /* Fill in L2TP header */ - mtod(m, u_int16_t *)[0] = htons(L2TP_CTRL_HDR); - mtod(m, u_int16_t *)[1] = htons(m->m_pkthdr.len); - mtod(m, u_int16_t *)[2] = htons(priv->conf.peer_id); - mtod(m, u_int16_t *)[3] = htons(session_id); - mtod(m, u_int16_t *)[4] = htons(ns); - mtod(m, u_int16_t *)[5] = htons(seq->nr); + p = mtod(m, u_int8_t *); + p[0] = L2TP_CTRL_HDR >> 8; + p[1] = L2TP_CTRL_HDR & 0xff; + p[2] = m->m_pkthdr.len >> 8; + p[3] = m->m_pkthdr.len & 0xff; + p[4] = priv->conf.peer_id >> 8; + p[5] = priv->conf.peer_id & 0xff; + p[6] = session_id >> 8; + p[7] = session_id & 0xff; + p[8] = ns >> 8; + p[9] = ns & 0xff; + p[10] = seq->nr >> 8; + p[11] = seq->nr & 0xff; /* Update sequence number info and stats */ priv->stats.xmitPackets++; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:40:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E5F106564A; Thu, 15 Apr 2010 12:40:33 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99D448FC20; Thu, 15 Apr 2010 12:40: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 o3FCeXQM000168; Thu, 15 Apr 2010 12:40:33 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCeX1J000166; Thu, 15 Apr 2010 12:40:33 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <201004151240.o3FCeX1J000166@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Thu, 15 Apr 2010 12:40: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: r206659 - 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: Thu, 15 Apr 2010 12:40:33 -0000 Author: vanhu Date: Thu Apr 15 12:40:33 2010 New Revision: 206659 URL: http://svn.freebsd.org/changeset/base/206659 Log: Locks SPTREE when setting some SP entries to state DEAD. This can prevent kernel panics when updating SPs while there is some traffic for them. Obtained from: NETASQ MFC after: 1m Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Thu Apr 15 12:40:02 2010 (r206658) +++ head/sys/netipsec/key.c Thu Apr 15 12:40:33 2010 (r206659) @@ -1882,7 +1882,9 @@ key_spdadd(so, m, mhp) newsp = key_getsp(&spidx); if (mhp->msg->sadb_msg_type == SADB_X_SPDUPDATE) { if (newsp) { + SPTREE_LOCK(); newsp->state = IPSEC_SPSTATE_DEAD; + SPTREE_UNLOCK(); KEY_FREESP(&newsp); } } else { @@ -2117,7 +2119,9 @@ key_spddelete(so, m, mhp) /* save policy id to buffer to be returned. */ xpl0->sadb_x_policy_id = sp->id; + SPTREE_LOCK(); sp->state = IPSEC_SPSTATE_DEAD; + SPTREE_UNLOCK(); KEY_FREESP(&sp); { @@ -2184,7 +2188,9 @@ key_spddelete2(so, m, mhp) return key_senderror(so, m, EINVAL); } + SPTREE_LOCK(); sp->state = IPSEC_SPSTATE_DEAD; + SPTREE_UNLOCK(); KEY_FREESP(&sp); { From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:41:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 473AA106567A; Thu, 15 Apr 2010 12:41:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379158FC1D; Thu, 15 Apr 2010 12:41: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 o3FCfbeP000435; Thu, 15 Apr 2010 12:41:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCfbYf000433; Thu, 15 Apr 2010 12:41:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151241.o3FCfbYf000433@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:41:37 +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: r206660 - 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, 15 Apr 2010 12:41:37 -0000 Author: mav Date: Thu Apr 15 12:41:36 2010 New Revision: 206660 URL: http://svn.freebsd.org/changeset/base/206660 Log: MFC r206017: Make ng_ksocket fulfill lower protocol stack layers alignment requirements on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410, sparc/118932, sparc/113556 Modified: stable/8/sys/netgraph/ng_ksocket.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_ksocket.c ============================================================================== --- stable/8/sys/netgraph/ng_ksocket.c Thu Apr 15 12:40:33 2010 (r206659) +++ stable/8/sys/netgraph/ng_ksocket.c Thu Apr 15 12:41:36 2010 (r206660) @@ -902,12 +902,24 @@ ng_ksocket_rcvdata(hook_p hook, item_p i struct sockaddr *sa = NULL; int error; struct mbuf *m; +#ifdef ALIGNED_POINTER + struct mbuf *n; +#endif /* ALIGNED_POINTER */ struct sa_tag *stag; /* Extract data */ NGI_GET_M(item, m); NG_FREE_ITEM(item); - +#ifdef ALIGNED_POINTER + if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) { + n = m_defrag(m, M_NOWAIT); + if (n == NULL) { + m_freem(m); + return (ENOBUFS); + } + m = n; + } +#endif /* ALIGNED_POINTER */ /* * Look if socket address is stored in packet tags. * If sockaddr is ours, or provided by a third party (zero id), From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 12:46:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E640F1065674; Thu, 15 Apr 2010 12:46:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56758FC0C; Thu, 15 Apr 2010 12:46: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 o3FCkGSR001603; Thu, 15 Apr 2010 12:46:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FCkGCn001597; Thu, 15 Apr 2010 12:46:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201004151246.o3FCkGCn001597@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Apr 2010 12:46: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: r206661 - 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, 15 Apr 2010 12:46:17 -0000 Author: mav Date: Thu Apr 15 12:46:16 2010 New Revision: 206661 URL: http://svn.freebsd.org/changeset/base/206661 Log: MFC r206021, r206032, r206049, r206050: Remove some more alignment constraints. Modified: stable/8/sys/netgraph/ng_deflate.c stable/8/sys/netgraph/ng_mppc.c stable/8/sys/netgraph/ng_ppp.c stable/8/sys/netgraph/ng_pptpgre.c stable/8/sys/netgraph/ng_tcpmss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netgraph/ng_deflate.c ============================================================================== --- stable/8/sys/netgraph/ng_deflate.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_deflate.c Thu Apr 15 12:46:16 2010 (r206661) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -505,8 +506,8 @@ ng_deflate_compress(node_p node, struct priv->stats.OutOctets+=inlen; } else { /* Install header. */ - ((u_int16_t *)priv->outbuf)[0] = htons(PROT_COMPD); - ((u_int16_t *)priv->outbuf)[1] = htons(priv->seqnum); + be16enc(priv->outbuf, PROT_COMPD); + be16enc(priv->outbuf + 2, priv->seqnum); /* Return packet in an mbuf. */ m_copyback(m, 0, outlen, (caddr_t)priv->outbuf); @@ -568,7 +569,7 @@ ng_deflate_decompress(node_p node, struc proto = priv->inbuf[0]; offset = 1; } else { - proto = ntohs(((uint16_t *)priv->inbuf)[0]); + proto = be16dec(priv->inbuf); offset = 2; } @@ -579,7 +580,7 @@ ng_deflate_decompress(node_p node, struc priv->stats.FramesComp++; /* Check sequence number. */ - rseqnum = ntohs(((uint16_t *)(priv->inbuf + offset))[0]); + rseqnum = be16dec(priv->inbuf + offset); offset += 2; if (rseqnum != priv->seqnum) { priv->stats.Errors++; Modified: stable/8/sys/netgraph/ng_mppc.c ============================================================================== --- stable/8/sys/netgraph/ng_mppc.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_mppc.c Thu Apr 15 12:46:16 2010 (r206661) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -601,7 +602,7 @@ err1: /* Install header */ M_PREPEND(m, MPPC_HDRLEN, M_DONTWAIT); if (m != NULL) - *(mtod(m, uint16_t *)) = htons(header); + be16enc(mtod(m, void *), header); *datap = m; return (*datap == NULL ? ENOBUFS : 0); @@ -630,8 +631,7 @@ ng_mppc_decompress(node_p node, struct m m_freem(m); return (EINVAL); } - m_copydata(m, 0, MPPC_HDRLEN, (caddr_t)&header); - header = ntohs(header); + header = be16dec(mtod(m, void *)); cc = (header & MPPC_CCOUNT_MASK); m_adj(m, MPPC_HDRLEN); Modified: stable/8/sys/netgraph/ng_ppp.c ============================================================================== --- stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_ppp.c Thu Apr 15 12:46:16 2010 (r206661) @@ -97,6 +97,7 @@ #include #include #include +#include #include #include @@ -860,8 +861,8 @@ ng_ppp_rcvdata_bypass(hook_p hook, item_ NG_FREE_ITEM(item); return (ENOBUFS); } - linkNum = ntohs(mtod(m, uint16_t *)[0]); - proto = ntohs(mtod(m, uint16_t *)[1]); + linkNum = be16dec(mtod(m, uint8_t *)); + proto = be16dec(mtod(m, uint8_t *) + 2); m_adj(m, 4); NGI_M(item) = m; @@ -1544,7 +1545,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 2 && (m = m_pullup(m, 2)) == NULL) ERROUT(ENOBUFS); - shdr = ntohs(*mtod(m, uint16_t *)); + shdr = be16dec(mtod(m, void *)); frag->seq = MP_SHORT_EXTEND(shdr); frag->first = (shdr & MP_SHORT_FIRST_FLAG) != 0; frag->last = (shdr & MP_SHORT_LAST_FLAG) != 0; @@ -1561,7 +1562,7 @@ ng_ppp_mp_recv(node_p node, item_p item, if (m->m_len < 4 && (m = m_pullup(m, 4)) == NULL) ERROUT(ENOBUFS); - lhdr = ntohl(*mtod(m, uint32_t *)); + lhdr = be32dec(mtod(m, void *)); frag->seq = MP_LONG_EXTEND(lhdr); frag->first = (lhdr & MP_LONG_FIRST_FLAG) != 0; frag->last = (lhdr & MP_LONG_LAST_FLAG) != 0; Modified: stable/8/sys/netgraph/ng_pptpgre.c ============================================================================== --- stable/8/sys/netgraph/ng_pptpgre.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_pptpgre.c Thu Apr 15 12:46:16 2010 (r206661) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -572,9 +573,9 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it } /* Build GRE header */ - ((u_int32_t *)gre)[0] = htonl(PPTP_INIT_VALUE); - gre->length = (m != NULL) ? htons((u_short)m->m_pkthdr.len) : 0; - gre->cid = htons(hpriv->conf.peerCid); + be32enc(gre, PPTP_INIT_VALUE); + be16enc(&gre->length, (m != NULL) ? m->m_pkthdr.len : 0); + be16enc(&gre->cid, hpriv->conf.peerCid); /* Include sequence number if packet contains any data */ if (m != NULL) { @@ -584,13 +585,13 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p it = ng_pptpgre_time(); } hpriv->xmitSeq++; - gre->data[0] = htonl(hpriv->xmitSeq); + be32enc(&gre->data[0], hpriv->xmitSeq); } /* Include acknowledgement (and stop send ack timer) if needed */ if (hpriv->conf.enableAlwaysAck || hpriv->xmitAck != hpriv->recvSeq) { gre->hasAck = 1; - gre->data[gre->hasSeq] = htonl(hpriv->recvSeq); + be32enc(&gre->data[gre->hasSeq], hpriv->recvSeq); hpriv->xmitAck = hpriv->recvSeq; if (hpriv->conf.enableDelayedAck) ng_uncallout(&hpriv->sackTimer, hpriv->node); @@ -705,18 +706,17 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Sanity check packet length and GRE header bits */ extralen = m->m_pkthdr.len - - (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length)); + - (iphlen + grelen + gre->hasSeq * be16dec(&gre->length)); if (extralen < 0) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - if ((ntohl(*((const u_int32_t *)gre)) & PPTP_INIT_MASK) - != PPTP_INIT_VALUE) { + if ((be32dec(gre) & PPTP_INIT_MASK) != PPTP_INIT_VALUE) { priv->stats.recvBadGRE++; ERROUT(EINVAL); } - hpriv = ng_pptpgre_find_session(priv, ntohs(gre->cid)); + hpriv = ng_pptpgre_find_session(priv, be16dec(&gre->cid)); if (hpriv == NULL || hpriv->hook == NULL || !hpriv->conf.enabled) { priv->stats.recvBadCID++; ERROUT(EINVAL); @@ -725,7 +725,7 @@ ng_pptpgre_rcvdata_lower(hook_p hook, it /* Look for peer ack */ if (gre->hasAck) { - const u_int32_t ack = ntohl(gre->data[gre->hasSeq]); + const u_int32_t ack = be32dec(&gre->data[gre->hasSeq]); const int index = ack - hpriv->recvAck - 1; long sample; long diff; @@ -776,7 +776,7 @@ badAck: /* See if frame contains any data */ if (gre->hasSeq) { - const u_int32_t seq = ntohl(gre->data[0]); + const u_int32_t seq = be32dec(&gre->data[0]); /* Sanity check sequence number */ if (PPTP_SEQ_DIFF(seq, hpriv->recvSeq) <= 0) { Modified: stable/8/sys/netgraph/ng_tcpmss.c ============================================================================== --- stable/8/sys/netgraph/ng_tcpmss.c Thu Apr 15 12:41:36 2010 (r206660) +++ stable/8/sys/netgraph/ng_tcpmss.c Thu Apr 15 12:46:16 2010 (r206661) @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -410,9 +411,9 @@ correct_mss(struct tcphdr *tc, int hlen, { int olen, optlen; u_char *opt; - uint16_t *mss; int accumulate; int res = 0; + uint16_t sum; for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); olen > 0; olen -= optlen, opt += optlen) { @@ -427,13 +428,15 @@ correct_mss(struct tcphdr *tc, int hlen, if (*opt == TCPOPT_MAXSEG) { if (optlen != TCPOLEN_MAXSEG) continue; - mss = (uint16_t *)(opt + 2); - if (ntohs(*mss) > maxmss) { - accumulate = *mss; - *mss = htons(maxmss); - accumulate -= *mss; - if ((flags & CSUM_TCP) == 0) - TCPMSS_ADJUST_CHECKSUM(accumulate, tc->th_sum); + accumulate = be16dec(opt + 2); + if (accumulate > maxmss) { + if ((flags & CSUM_TCP) == 0) { + accumulate -= maxmss; + sum = be16dec(&tc->th_sum); + TCPMSS_ADJUST_CHECKSUM(accumulate, sum); + be16enc(&tc->th_sum, sum); + } + be16enc(opt + 2, maxmss); res = 1; } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 13:02:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D8861065672; Thu, 15 Apr 2010 13:02:03 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id BB6028FC19; Thu, 15 Apr 2010 13:02:01 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 524AD1518AD; Thu, 15 Apr 2010 16:01:56 +0300 (EEST) Date: Thu, 15 Apr 2010 16:01:56 +0300 From: Jaakko Heinonen To: Kostik Belousov Message-ID: <20100415130155.GA3017@a91-153-117-195.elisa-laajakaista.fi> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> <20100414130343.GO2415@deviant.kiev.zoral.com.ua> <20100414141959.GA3276@a91-153-117-195.elisa-laajakaista.fi> <20100414154248.GR2415@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414154248.GR2415@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 13:02:03 -0000 On 2010-04-14, Kostik Belousov wrote: > First, I think we shall sort dirent->dd_dlist so that symlinks are > located before any other entries, and allow for duplication of > any name with the name of symlink. What will happen when user deletes a symlink covering a device? Uncovering the device may a bit surprising? If user created directories will be allowed one day, they will face the same problem. > I remember there was a PR to change devfs_symlink() so that symlink is > added to dd_dlist into head, not to a tail, as it is done now. kern/114057 > Assume that all full devfs pathes except symlinks are stored somewhere > with type information for the component at the end. > Then, just iterating this set at make_dev() time, we can verify that > name is not a duplicate, and that the path components are not already > used as device name (only as directories). > The pathes storage need to be protected by dev_mtx. > > Possibly, the cdev_priv.c_dev.__si_namebuf may be reused at the > cost of long check at the make_dev() time. Could you elaborate on this? I am not sure if I understand what you mean with __si_namebuf reuse. > What do you think of this ? I don't see anything obviously wrong with it. -- Jaakko From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 13:26:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCFC1065672; Thu, 15 Apr 2010 13:26:33 +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 697D98FC1B; Thu, 15 Apr 2010 13:26:32 +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 o3FDQSUP050415 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Apr 2010 16:26:28 +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 o3FDQS3r033642; Thu, 15 Apr 2010 16:26:28 +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 o3FDQS5h033641; Thu, 15 Apr 2010 16:26:28 +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: Thu, 15 Apr 2010 16:26:28 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20100415132628.GE2415@deviant.kiev.zoral.com.ua> References: <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> <20100414130343.GO2415@deviant.kiev.zoral.com.ua> <20100414141959.GA3276@a91-153-117-195.elisa-laajakaista.fi> <20100414154248.GR2415@deviant.kiev.zoral.com.ua> <20100415130155.GA3017@a91-153-117-195.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RQwN4daKXWcbejL/" Content-Disposition: inline In-Reply-To: <20100415130155.GA3017@a91-153-117-195.elisa-laajakaista.fi> 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.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, 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: r206560 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 13:26:34 -0000 --RQwN4daKXWcbejL/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 15, 2010 at 04:01:56PM +0300, Jaakko Heinonen wrote: > On 2010-04-14, Kostik Belousov wrote: > > First, I think we shall sort dirent->dd_dlist so that symlinks are > > located before any other entries, and allow for duplication of > > any name with the name of symlink. >=20 > What will happen when user deletes a symlink covering a device? > Uncovering the device may a bit surprising? If user created directories > will be allowed one day, they will face the same problem. Yes, device will be uncovered if it is there, the same with the directory. Use case I have in mind when I wrote this is the following: assume we have devices named dev1 and dev2, and two jails, j1 and j2, each with its own devfs mount. Also, assume that some program A has hardcoded /dev/dev1 as the name of device to operate, and it is run both in j1 and j2. Further, j1 is given access to /dev/dev1 only, while j2 is given access to /dev/dev2 only. Then administrator of j1 can create a symlink /dev/dev -> dev1, while administrator of j2 symlinks /dev/dev ->dev2, and both j1 and j2 would operate properly. This is not that perversed as it sounds, I think it is an essence of symlink usage on devfs. >=20 > > I remember there was a PR to change devfs_symlink() so that symlink is > > added to dd_dlist into head, not to a tail, as it is done now. >=20 > kern/114057 >=20 > > Assume that all full devfs pathes except symlinks are stored somewhere > > with type information for the component at the end. > > Then, just iterating this set at make_dev() time, we can verify that > > name is not a duplicate, and that the path components are not already > > used as device name (only as directories). > > The pathes storage need to be protected by dev_mtx.=20 > >=20 > > Possibly, the cdev_priv.c_dev.__si_namebuf may be reused at the > > cost of long check at the make_dev() time. >=20 > Could you elaborate on this? I am not sure if I understand what you mean > with __si_namebuf reuse. I mean that we do not to create the structure that mirrors the directory/no= des hierarchy for devfs dirents, but can dynamically parse __si_namebuf at the make_dev() time, iterating over all nodes using cdevp_list. For symlinks, it seems the easiest route is to have separate ref-counted structures containing the pathes for owning directories. >=20 > > What do you think of this ? >=20 > I don't see anything obviously wrong with it. >=20 > --=20 > Jaakko --RQwN4daKXWcbejL/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvHFAMACgkQC3+MBN1Mb4gTSwCgpRgYstpHdZl967cwjRk3JvKK TF8AoJKdJfcBSHJsILcn3WGRQ3yV2Dez =Pe7P -----END PGP SIGNATURE----- --RQwN4daKXWcbejL/-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 13:50:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72A53106566C; Thu, 15 Apr 2010 13:50:55 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613D18FC12; Thu, 15 Apr 2010 13:50: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 o3FDotVv015867; Thu, 15 Apr 2010 13:50:55 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FDotFC015864; Thu, 15 Apr 2010 13:50:55 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201004151350.o3FDotFC015864@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 15 Apr 2010 13:50: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: r206662 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 13:50:55 -0000 Author: gallatin Date: Thu Apr 15 13:50:55 2010 New Revision: 206662 URL: http://svn.freebsd.org/changeset/base/206662 Log: Cleanup if_media handling in mxge(4) - Re-probe xfp / sfp+ socket on link events, in case user has changed transceiver - correctly report current media to avoid confusing lagg (reported by Panasas) - Report link speed (submitted by yongari) Reviewed by: yongari (earlier version) MFC after: 7 days Modified: head/sys/dev/mxge/if_mxge.c head/sys/dev/mxge/if_mxge_var.h Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Thu Apr 15 12:46:16 2010 (r206661) +++ head/sys/dev/mxge/if_mxge.c Thu Apr 15 13:50:55 2010 (r206662) @@ -883,6 +883,9 @@ mxge_send_cmd(mxge_softc_t *sc, uint32_t case MXGEFW_CMD_ERROR_BUSY: err = EBUSY; break; + case MXGEFW_CMD_ERROR_I2C_ABSENT: + err = ENXIO; + break; default: device_printf(sc->dev, "mxge: command %d " @@ -2782,37 +2785,25 @@ static struct mxge_media_type mxge_sfp_m }; static void -mxge_set_media(mxge_softc_t *sc, int type) +mxge_media_set(mxge_softc_t *sc, int media_type) { - sc->media_flags |= type; - ifmedia_add(&sc->media, sc->media_flags, 0, NULL); - ifmedia_set(&sc->media, sc->media_flags); -} + + ifmedia_add(&sc->media, IFM_ETHER | IFM_FDX | media_type, + 0, NULL); + ifmedia_set(&sc->media, IFM_ETHER | IFM_FDX | media_type); + sc->current_media = media_type; + sc->media.ifm_media = sc->media.ifm_cur->ifm_media; +} -/* - * Determine the media type for a NIC. Some XFPs will identify - * themselves only when their link is up, so this is initiated via a - * link up interrupt. However, this can potentially take up to - * several milliseconds, so it is run via the watchdog routine, rather - * than in the interrupt handler itself. This need only be done - * once, not each time the link is up. - */ static void -mxge_media_probe(mxge_softc_t *sc) +mxge_media_init(mxge_softc_t *sc) { - mxge_cmd_t cmd; - char *cage_type; char *ptr; - struct mxge_media_type *mxge_media_types = NULL; - int i, err, ms, mxge_media_type_entries; - uint32_t byte; - - sc->need_media_probe = 0; + int i; - /* if we've already set a media type, we're done */ - if (sc->media_flags != (IFM_ETHER | IFM_AUTO)) - return; + ifmedia_removeall(&sc->media); + mxge_media_set(sc, IFM_AUTO); /* * parse the product code to deterimine the interface type @@ -2823,6 +2814,7 @@ mxge_media_probe(mxge_softc_t *sc) ptr = sc->product_code_string; if (ptr == NULL) { device_printf(sc->dev, "Missing product code\n"); + return; } for (i = 0; i < 3; i++, ptr++) { @@ -2835,17 +2827,44 @@ mxge_media_probe(mxge_softc_t *sc) } if (*ptr == 'C') { /* -C is CX4 */ - mxge_set_media(sc, IFM_10G_CX4); - return; - } - else if (*ptr == 'Q') { + sc->connector = MXGE_CX4; + mxge_media_set(sc, IFM_10G_CX4); + } else if (*ptr == 'Q') { /* -Q is Quad Ribbon Fiber */ + sc->connector = MXGE_QRF; device_printf(sc->dev, "Quad Ribbon Fiber Media\n"); /* FreeBSD has no media type for Quad ribbon fiber */ - return; + } else if (*ptr == 'R') { + /* -R is XFP */ + sc->connector = MXGE_XFP; + } else if (*ptr == 'S' || *(ptr +1) == 'S') { + /* -S or -2S is SFP+ */ + sc->connector = MXGE_SFP; + } else { + device_printf(sc->dev, "Unknown media type: %c\n", *ptr); } +} - if (*ptr == 'R') { +/* + * Determine the media type for a NIC. Some XFPs will identify + * themselves only when their link is up, so this is initiated via a + * link up interrupt. However, this can potentially take up to + * several milliseconds, so it is run via the watchdog routine, rather + * than in the interrupt handler itself. + */ +static void +mxge_media_probe(mxge_softc_t *sc) +{ + mxge_cmd_t cmd; + char *cage_type; + + struct mxge_media_type *mxge_media_types = NULL; + int i, err, ms, mxge_media_type_entries; + uint32_t byte; + + sc->need_media_probe = 0; + + if (sc->connector == MXGE_XFP) { /* -R is XFP */ mxge_media_types = mxge_xfp_media_types; mxge_media_type_entries = @@ -2853,9 +2872,7 @@ mxge_media_probe(mxge_softc_t *sc) sizeof (mxge_xfp_media_types[0]); byte = MXGE_XFP_COMPLIANCE_BYTE; cage_type = "XFP"; - } - - if (*ptr == 'S' || *(ptr +1) == 'S') { + } else if (sc->connector == MXGE_SFP) { /* -S or -2S is SFP+ */ mxge_media_types = mxge_sfp_media_types; mxge_media_type_entries = @@ -2863,10 +2880,8 @@ mxge_media_probe(mxge_softc_t *sc) sizeof (mxge_sfp_media_types[0]); cage_type = "SFP+"; byte = 3; - } - - if (mxge_media_types == NULL) { - device_printf(sc->dev, "Unknown media type: %c\n", *ptr); + } else { + /* nothing to do; media type cannot change */ return; } @@ -2909,7 +2924,10 @@ mxge_media_probe(mxge_softc_t *sc) if (mxge_verbose) device_printf(sc->dev, "%s:%s\n", cage_type, mxge_media_types[0].name); - mxge_set_media(sc, mxge_media_types[0].flag); + if (sc->current_media != mxge_media_types[0].flag) { + mxge_media_init(sc); + mxge_media_set(sc, mxge_media_types[0].flag); + } return; } for (i = 1; i < mxge_media_type_entries; i++) { @@ -2919,12 +2937,16 @@ mxge_media_probe(mxge_softc_t *sc) cage_type, mxge_media_types[i].name); - mxge_set_media(sc, mxge_media_types[i].flag); + if (sc->current_media != mxge_media_types[i].flag) { + mxge_media_init(sc); + mxge_media_set(sc, mxge_media_types[i].flag); + } return; } } - device_printf(sc->dev, "%s media 0x%x unknown\n", cage_type, - cmd.data0); + if (mxge_verbose) + device_printf(sc->dev, "%s media 0x%x unknown\n", + cage_type, cmd.data0); return; } @@ -2988,10 +3010,12 @@ mxge_intr(void *arg) sc->link_state = stats->link_up; if (sc->link_state) { if_link_state_change(sc->ifp, LINK_STATE_UP); + sc->ifp->if_baudrate = IF_Gbps(10UL); if (mxge_verbose) device_printf(sc->dev, "link up\n"); } else { if_link_state_change(sc->ifp, LINK_STATE_DOWN); + sc->ifp->if_baudrate = 0; if (mxge_verbose) device_printf(sc->dev, "link down\n"); } @@ -4026,9 +4050,9 @@ mxge_media_status(struct ifnet *ifp, str if (sc == NULL) return; ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = IFM_ETHER | IFM_FDX; ifmr->ifm_status |= sc->link_state ? IFM_ACTIVE : 0; - ifmr->ifm_active = IFM_AUTO | IFM_ETHER; - ifmr->ifm_active |= sc->link_state ? IFM_FDX : 0; + ifmr->ifm_active |= sc->current_media; } static int @@ -4135,6 +4159,9 @@ mxge_ioctl(struct ifnet *ifp, u_long com break; case SIOCGIFMEDIA: + mtx_lock(&sc->driver_mtx); + mxge_media_probe(sc); + mtx_unlock(&sc->driver_mtx); err = ifmedia_ioctl(ifp, (struct ifreq *)data, &sc->media, command); break; @@ -4766,7 +4793,7 @@ mxge_attach(device_t dev) /* Initialise the ifmedia structure */ ifmedia_init(&sc->media, 0, mxge_media_change, mxge_media_status); - mxge_set_media(sc, IFM_ETHER | IFM_AUTO); + mxge_media_init(sc); mxge_media_probe(sc); sc->dying = 0; ether_ifattach(ifp, sc->mac_addr); Modified: head/sys/dev/mxge/if_mxge_var.h ============================================================================== --- head/sys/dev/mxge/if_mxge_var.h Thu Apr 15 12:46:16 2010 (r206661) +++ head/sys/dev/mxge/if_mxge_var.h Thu Apr 15 13:50:55 2010 (r206662) @@ -268,6 +268,8 @@ struct mxge_softc { int num_slices; int rx_ring_size; int dying; + int connector; + int current_media; mxge_dma_t dmabench_dma; struct callout co_hdl; struct taskqueue *tq; @@ -293,6 +295,12 @@ struct mxge_softc { #define MXGE_MIN_THROTTLE 416 #define MXGE_MAX_THROTTLE 4096 +/* Types of connectors on NICs supported by this driver */ +#define MXGE_CX4 0 +#define MXGE_XFP 1 +#define MXGE_SFP 2 +#define MXGE_QRF 3 + #define MXGE_HIGHPART_TO_U32(X) \ (sizeof (X) == 8) ? ((uint32_t)((uint64_t)(X) >> 32)) : (0) #define MXGE_LOWPART_TO_U32(X) ((uint32_t)(X)) From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 14:26:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C51D106566B; Thu, 15 Apr 2010 14:26:52 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B97D8FC0A; Thu, 15 Apr 2010 14:26: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 o3FEQqXi024416; Thu, 15 Apr 2010 14:26:52 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FEQqWs024414; Thu, 15 Apr 2010 14:26:52 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201004151426.o3FEQqWs024414@svn.freebsd.org> From: Andrew Gallatin Date: Thu, 15 Apr 2010 14:26: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: r206663 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 14:26:52 -0000 Author: gallatin Date: Thu Apr 15 14:26:52 2010 New Revision: 206663 URL: http://svn.freebsd.org/changeset/base/206663 Log: Add missing IFCAP_LINKSTATE to mxge Submitted by: yongari Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Thu Apr 15 13:50:55 2010 (r206662) +++ head/sys/dev/mxge/if_mxge.c Thu Apr 15 14:26:52 2010 (r206663) @@ -4759,7 +4759,7 @@ mxge_attach(device_t dev) ifp->if_baudrate = IF_Gbps(10UL); ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4 | - IFCAP_VLAN_MTU; + IFCAP_VLAN_MTU | IFCAP_LINKSTATE; #ifdef INET ifp->if_capabilities |= IFCAP_LRO; #endif From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 14:38:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80C65106566C; Thu, 15 Apr 2010 14:38:29 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 5776E8FC12; Thu, 15 Apr 2010 14:38:27 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id B2C8D28440F; Thu, 15 Apr 2010 16:38:25 +0200 (CEST) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000015, version=1.2.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 10.2068] X-CRM114-CacheID: sfid-20100415_16382_42E318B0 X-CRM114-Status: Good ( pR: 10.2068 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Thu Apr 15 16:38:25 2010 X-DSPAM-Confidence: 0.9910 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4bc724e1916091155713286 X-DSPAM-Factors: 27, wrote, 0.00390, >+>, 0.00425, wrote+>, 0.00498, >, 0.00583, >, 0.00583, From*Attila Nagy , 0.00602, file+or, 0.01000, User-Agent*rv+1.8.1.23), 0.01000, requests, 0.01000, Subject*svn, 0.01000, User-Agent*Mnenhy/0.7.6.0, 0.01000, (the, 0.01000, README, 0.01000, Message-ID*fsn.hu>, 0.01000, support+for, 0.01000, User-Agent*Mozilla/5.0+(X11, 0.01000, manner, 0.01000, User-Agent*1.8.1.23), 0.01000, >+and, 0.01000, Subject*commit, 0.01000, User-Agent*i686+en, 0.01000, User-Agent*Thunderbird/2.0.0.23, 0.01000, User-Agent*U+Linux, 0.01000, From*Nagy, 0.01000, From*Attila, 0.01000, >+This, 0.01000, X-Spambayes-Classification: ham; 0.00 Message-ID: <4BC724DF.7010907@fsn.hu> Date: Thu, 15 Apr 2010 16:38:23 +0200 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Luigi Rizzo References: <201004121637.o3CGbjSK080066@svn.freebsd.org> In-Reply-To: <201004121637.o3CGbjSK080066@svn.freebsd.org> X-Stationery: 0.5.1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 14:38:29 -0000 On 04/12/2010 06:37 PM, Luigi Rizzo wrote: > Bring in geom_sched, support for scheduling disk I/O requests > in a device independent manner. Also include an example anticipatory > scheduler, gsched_rr, which gives very nice performance improvements > in presence of competing random access patterns. > > This is joint work with Fabio Checconi, developed last year > and presented at BSDCan 2009. You can find details in the > README file or at > Are there any plans to bring in something like Linux's ionice (or even better solutions)? Is it possible to do it easily at all (the user and GEOM are seemingly very far from each other)? From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 15:10:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D332D1065672; Thu, 15 Apr 2010 15:10:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A86F18FC15; Thu, 15 Apr 2010 15:10: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 o3FFAkwR034447; Thu, 15 Apr 2010 15:10:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FFAkRP034444; Thu, 15 Apr 2010 15:10:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004151510.o3FFAkRP034444@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Apr 2010 15:10: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: r206664 - head/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: Thu, 15 Apr 2010 15:10:46 -0000 Author: imp Date: Thu Apr 15 15:10:46 2010 New Revision: 206664 URL: http://svn.freebsd.org/changeset/base/206664 Log: Allow option aliasing. Lines of the form: OLD_OPT = NEW_OPT in options* files will now map OLD_OPT to NEW_OPT with a friendly message. This is indented for situations where we need to preserve an interface in the config file in an upwards compatible fashion on a stable branch. Reviewed by: nwhitehorn@ MFC after: 3 days Modified: head/usr.sbin/config/config.h head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Thu Apr 15 14:26:52 2010 (r206663) +++ head/usr.sbin/config/config.h Thu Apr 15 15:10:46 2010 (r206664) @@ -129,6 +129,8 @@ SLIST_HEAD(opt_head, opt) opt, mkopt, rm struct opt_list { char *o_name; char *o_file; + int o_flags; +#define OL_ALIAS 1 SLIST_ENTRY(opt_list) o_next; }; Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Thu Apr 15 14:26:52 2010 (r206663) +++ head/usr.sbin/config/mkoptions.c Thu Apr 15 15:10:46 2010 (r206664) @@ -94,6 +94,17 @@ options(void) SLIST_INSERT_HEAD(&opt, op, op_next); read_options(); + SLIST_FOREACH(op, &opt, op_next) { + SLIST_FOREACH(ol, &otab, o_next) { + if (eq(op->op_name, ol->o_name) && + (ol->o_flags & OL_ALIAS)) { + printf("Mapping option %s to %s.\n", + op->op_name, ol->o_file); + op->op_name = ol->o_file; + break; + } + } + } SLIST_FOREACH(ol, &otab, o_next) do_option(ol->o_name); SLIST_FOREACH(op, &opt, op_next) { @@ -124,7 +135,6 @@ do_option(char *name) int tidy; file = tooption(name); - /* * Check to see if the option was specified.. */ @@ -292,6 +302,7 @@ read_options(void) struct opt_list *po; int first = 1; char genopt[MAXPATHLEN]; + int flags = 0; SLIST_INIT(&otab); (void) snprintf(fname, sizeof(fname), "../../conf/options"); @@ -301,6 +312,7 @@ openit: return; } next: + flags = 0; wd = get_word(fp); if (wd == (char *)EOF) { (void) fclose(fp); @@ -332,6 +344,18 @@ next: (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); @@ -348,6 +372,7 @@ next: err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; + po->o_flags = flags; SLIST_INSERT_HEAD(&otab, po, o_next); goto next; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 16:34:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 380CC106566B; Thu, 15 Apr 2010 16:34:07 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 261DF8FC17; Thu, 15 Apr 2010 16:34: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 o3FGY764053200; Thu, 15 Apr 2010 16:34:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FGY7wX053198; Thu, 15 Apr 2010 16:34:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004151634.o3FGY7wX053198@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 15 Apr 2010 16:34: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: r206665 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 16:34:07 -0000 Author: pjd Date: Thu Apr 15 16:34:06 2010 New Revision: 206665 URL: http://svn.freebsd.org/changeset/base/206665 Log: Use lower priority for GELI worker threads. This improves system responsiveness under heavy GELI load. MFC after: 3 days Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Thu Apr 15 15:10:46 2010 (r206664) +++ head/sys/geom/eli/g_eli.c Thu Apr 15 16:34:06 2010 (r206665) @@ -340,7 +340,7 @@ g_eli_worker(void *arg) } #endif thread_lock(curthread); - sched_prio(curthread, PRIBIO); + sched_prio(curthread, PUSER); if (sc->sc_crypto == G_ELI_CRYPTO_SW && g_eli_threads == 0) sched_bind(curthread, wr->w_number); thread_unlock(curthread); @@ -361,8 +361,7 @@ g_eli_worker(void *arg) mtx_unlock(&sc->sc_queue_mtx); kproc_exit(0); } - msleep(sc, &sc->sc_queue_mtx, PRIBIO | PDROP, - "geli:w", 0); + msleep(sc, &sc->sc_queue_mtx, PDROP, "geli:w", 0); continue; } mtx_unlock(&sc->sc_queue_mtx); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 16:35:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E897F1065670; Thu, 15 Apr 2010 16:35:34 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6E9B8FC18; Thu, 15 Apr 2010 16:35: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 o3FGZYtD053534; Thu, 15 Apr 2010 16:35:34 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FGZYUi053532; Thu, 15 Apr 2010 16:35:34 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004151635.o3FGZYUi053532@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 15 Apr 2010 16:35: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: r206666 - head/sbin/geom/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: Thu, 15 Apr 2010 16:35:35 -0000 Author: pjd Date: Thu Apr 15 16:35:34 2010 New Revision: 206666 URL: http://svn.freebsd.org/changeset/base/206666 Log: Flush disk write cache after storing and clearing metadata. Modified: head/sbin/geom/misc/subr.c Modified: head/sbin/geom/misc/subr.c ============================================================================== --- head/sbin/geom/misc/subr.c Thu Apr 15 16:34:06 2010 (r206665) +++ head/sbin/geom/misc/subr.c Thu Apr 15 16:35:34 2010 (r206666) @@ -236,6 +236,7 @@ g_metadata_store(const char *name, u_cha error = errno; goto out; } + (void)ioctl(fd, DIOCGFLUSH, NULL); out: if (sector != NULL) free(sector); @@ -293,6 +294,7 @@ g_metadata_clear(const char *name, const error = errno; goto out; } + (void)ioctl(fd, DIOCGFLUSH, NULL); out: if (sector != NULL) free(sector); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 16:40:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 589E01065673; Thu, 15 Apr 2010 16:40:55 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C12E8FC1D; Thu, 15 Apr 2010 16: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 o3FGeswl054748; Thu, 15 Apr 2010 16:40:54 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FGesMD054745; Thu, 15 Apr 2010 16:40:54 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004151640.o3FGesMD054745@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 15 Apr 2010 16:40: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: r206667 - 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: Thu, 15 Apr 2010 16:40:55 -0000 Author: pjd Date: Thu Apr 15 16:40:54 2010 New Revision: 206667 URL: http://svn.freebsd.org/changeset/base/206667 Log: Fix 3-way deadlock that can happen because of ZFS and vnode lock order reversal. thread0 (vfs_fhtovp) thread1 (vop_getattr) thread2 (zfs_recv) -------------------- --------------------- ------------------ vn_lock rrw_enter_read rrw_enter_write (hangs) rrw_enter_read (hangs) vn_lock (hangs) Submitted by: Attila Nagy MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Apr 15 16:35:34 2010 (r206666) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Apr 15 16:40:54 2010 (r206667) @@ -868,13 +868,15 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t ZFS_ENTER_NOERROR(zfsvfs); error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); + + ZFS_EXIT(zfsvfs); + if (error == 0) { *vpp = ZTOV(rootzp); error = vn_lock(*vpp, flags); (*vpp)->v_vflag |= VV_ROOT; } - ZFS_EXIT(zfsvfs); return (error); } @@ -1143,13 +1145,13 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla VN_RELE(ZTOV(zp)); err = EINVAL; } + ZFS_EXIT(zfsvfs); if (err != 0) *vpp = NULL; else { *vpp = ZTOV(zp); vn_lock(*vpp, flags); } - ZFS_EXIT(zfsvfs); return (err); } @@ -1237,8 +1239,8 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vno } else { VN_HOLD(*vpp); } - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); ZFS_EXIT(zfsvfs); + vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); return (0); } @@ -1259,10 +1261,11 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vno return (EINVAL); } + ZFS_EXIT(zfsvfs); + *vpp = ZTOV(zp); vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); vnode_create_vobject(*vpp, zp->z_phys->zp_size, curthread); - ZFS_EXIT(zfsvfs); return (0); } 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 Thu Apr 15 16:35:34 2010 (r206666) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Apr 15 16:40:54 2010 (r206667) @@ -1209,15 +1209,17 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode ltype = VOP_ISLOCKED(dvp); VOP_UNLOCK(dvp, 0); } + ZFS_EXIT(zfsvfs); error = vn_lock(*vpp, cnp->cn_lkflags); if (cnp->cn_flags & ISDOTDOT) vn_lock(dvp, ltype | LK_RETRY); if (error != 0) { VN_RELE(*vpp); *vpp = NULL; - ZFS_EXIT(zfsvfs); return (error); } + } else { + ZFS_EXIT(zfsvfs); } #ifdef FREEBSD_NAMECACHE @@ -1237,8 +1239,6 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode } #endif - ZFS_EXIT(zfsvfs); - return (error); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 16:43:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 058D0106566C; Thu, 15 Apr 2010 16:43:44 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD3348FC24; Thu, 15 Apr 2010 16:43: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 o3FGhhP0055372; Thu, 15 Apr 2010 16:43:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FGhhR4055370; Thu, 15 Apr 2010 16:43:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004151643.o3FGhhR4055370@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 15 Apr 2010 16:43: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: r206668 - head/etc/mtree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 16:43:44 -0000 Author: pjd Date: Thu Apr 15 16:43:43 2010 New Revision: 206668 URL: http://svn.freebsd.org/changeset/base/206668 Log: Use spaces instead of tab for indent here. Modified: head/etc/mtree/BSD.include.dist Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Apr 15 16:40:54 2010 (r206667) +++ head/etc/mtree/BSD.include.dist Thu Apr 15 16:43:43 2010 (r206668) @@ -104,8 +104,8 @@ .. lmc .. - mfi - .. + mfi + .. mpt mpilib .. From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 17:04:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABAE0106564A; Thu, 15 Apr 2010 17:04:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99EA98FC1C; Thu, 15 Apr 2010 17:04: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 o3FH48tr059921; Thu, 15 Apr 2010 17:04:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FH48bQ059919; Thu, 15 Apr 2010 17:04:08 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004151704.o3FH48bQ059919@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 15 Apr 2010 17:04: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: r206669 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 17:04:08 -0000 Author: pjd Date: Thu Apr 15 17:04:08 2010 New Revision: 206669 URL: http://svn.freebsd.org/changeset/base/206669 Log: Increase ggate queue size to maximum value. HAST was not able to stand heavy random load. Reported by: Hiroyuki Yamagami MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Thu Apr 15 16:43:43 2010 (r206668) +++ head/sbin/hastd/primary.c Thu Apr 15 17:04:08 2010 (r206669) @@ -682,7 +682,7 @@ init_ggate(struct hast_resource *res) ggiocreate.gctl_mediasize = res->hr_datasize; ggiocreate.gctl_sectorsize = res->hr_local_sectorsize; ggiocreate.gctl_flags = 0; - ggiocreate.gctl_maxcount = 128; + ggiocreate.gctl_maxcount = G_GATE_MAX_QUEUE_SIZE; ggiocreate.gctl_timeout = 0; ggiocreate.gctl_unit = G_GATE_NAME_GIVEN; snprintf(ggiocreate.gctl_name, sizeof(ggiocreate.gctl_name), "hast/%s", From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 17:10:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44B041065672; Thu, 15 Apr 2010 17:10:07 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id EEF088FC0C; Thu, 15 Apr 2010 17:10:06 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 3FD3EEB87E; Thu, 15 Apr 2010 13:10:06 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 15 Apr 2010 13:10:06 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=lAC8osRRBXUX8lyZfDLaqg0BWi8=; b=Lh08jqzt+uAk/F5BEkpMDP0MPLSCcGa4PIIm4nSssZdV+14WGogoXjtSPvA2Cyh97XBLvCZh3IaiaJws253l2ji5Hsc9vI76YwuYi50IK/OBNtn/y1lGrQGZlM6i7rsq3L9Gs3HYn8pJ3aMjUz3DQZyWGq5oS5RGJOIu//ZfywM= X-Sasl-enc: N9PeOu4oYWVwrgRwRFv8WwzGse7IT0ZnYdegFOz0qcL/ 1271351405 Received: from anglepoise.lon.incunabulum.net (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 6E1A2EAE9; Thu, 15 Apr 2010 13:10:05 -0400 (EDT) Message-ID: <4BC7486C.9010804@incunabulum.net> Date: Thu, 15 Apr 2010 18:10:04 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100406 Thunderbird/3.0.4 MIME-Version: 1.0 To: Bruce M Simpson References: <201004101205.o3AC5VGp074266@svn.freebsd.org> In-Reply-To: <201004101205.o3AC5VGp074266@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206452 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 17:10:07 -0000 On 04/10/10 13:05, Bruce M Simpson wrote: > Log: > Fix a few issues related to the legacy 4.4 BSD multicast APIs. > > IPv4 addresses can and do change during normal operation. Testing by > pfSense developers exposed an issue where OpenOSPFD was using the IPv4 > address to leave the OSPF link-scope multicast groups on a dynamic > OpenVPN tun interface, rather than using RFC 3678 with the interface > index, which won't be raced when the interface's addresses change. > I should point out that IP multicast is counter-intuitive in many areas. It seems that knowledge of how to work with it effectively is not that widespread. People who have a need to use it, often have very specific requirements. IP multicast group membership is always scoped to physical links [1]. The 4.4BSD API originally used the "primary IP address" to identify each link. Unfortunately this is not a persistent identifier, especially so in the use-case which had problems. In the updated API specified in RFC 3678, the primary key for multicast memberships, changes to the interface index. routed(8) in FreeBSD's SVN tree uses this new API; thanks to phk for reviewing and testing my change. In the case of OpenOSPFD+OpenVPN, the issue manifested itself in situations where this "primary IP address" changed. OpenVPN shims address assignment as part of its wire protocol, which is where the address change originates. This is purely a by-product of using an API which depends on using an IPv4 address as a key (IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP), when that key may change at any time. There's some time domain uncertainty with that change. PF_ROUTE is an out-of-band mechanism used by OpenOSPFD to learn about the address change, and it is dispatched separately from the change itself; there may be queueing and context switches involved. It also creates some ambiguity for in_multi instances, which the kernel may not be able to resolve, if that key has been blown away. Fortunately, such ambiguity is private to each socket. Furthermore, this makes IGMP somewhat unreliable, although mechanisms do exist in the protocol to work-around the end-station's identifier being lost in this way. The upstream IGMP querier (usually the mcast router) will hold state based on the end-station's "primary IP address", this will eventually time out due to unanswered queries. MLD side-steps this by always requiring an IPv6 link-scope address in control traffic. Using the more recent multicast RFCs, supported now by Windows, Linux, OpenSolaris, and now FreeBSD, can side-step these issues; it is the preferred API. P.S. HEAD was probably already resilient against this for joins. I plan to MFC a similar version of this change to 8 soon. [1] sendto() to an IP multicast address, without an interface specified, makes no sense -- unless the host is also an mcast forwarder. You can get away with default route resolution through the routing tables up to a point, but if your box is multihomed, all bets are off. From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 17:17:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50BD5106566B; Thu, 15 Apr 2010 17:17:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1478FC08; Thu, 15 Apr 2010 17:17: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 o3FHH3WW062884; Thu, 15 Apr 2010 17:17:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FHH34u062882; Thu, 15 Apr 2010 17:17:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004151717.o3FHH34u062882@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 15 Apr 2010 17:17: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: r206671 - 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, 15 Apr 2010 17:17:03 -0000 Author: kib Date: Thu Apr 15 17:17:02 2010 New Revision: 206671 URL: http://svn.freebsd.org/changeset/base/206671 Log: Fix typo. MFC after: 3 days Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Apr 15 17:10:46 2010 (r206670) +++ head/sys/kern/vfs_cache.c Thu Apr 15 17:17:02 2010 (r206671) @@ -610,7 +610,7 @@ 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, - ("cahe_enter: Adding a doomed vnode")); + ("cache_enter: Adding a doomed vnode")); if (!doingcache) return; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 17:24:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE9861065672; Thu, 15 Apr 2010 17:24:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1338FC25; Thu, 15 Apr 2010 17:24: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 o3FHOLka064517; Thu, 15 Apr 2010 17:24:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FHOL5r064515; Thu, 15 Apr 2010 17:24:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151724.o3FHOL5r064515@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 17:24: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: r206672 - 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: Thu, 15 Apr 2010 17:24:21 -0000 Author: yongari Date: Thu Apr 15 17:24:21 2010 New Revision: 206672 URL: http://svn.freebsd.org/changeset/base/206672 Log: Fix include path. Modified: head/sys/dev/sge/if_sge.c Modified: head/sys/dev/sge/if_sge.c ============================================================================== --- head/sys/dev/sge/if_sge.c Thu Apr 15 17:17:02 2010 (r206671) +++ head/sys/dev/sge/if_sge.c Thu Apr 15 17:24:21 2010 (r206672) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "if_sgereg.h" +#include MODULE_DEPEND(sge, pci, 1, 1, 1); MODULE_DEPEND(sge, ether, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 17:46:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FCB1106567E; Thu, 15 Apr 2010 17:46:52 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 452258FC39; Thu, 15 Apr 2010 17:46: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 o3FHkqlS069557; Thu, 15 Apr 2010 17:46:52 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FHkqHN069555; Thu, 15 Apr 2010 17:46:52 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201004151746.o3FHkqHN069555@svn.freebsd.org> From: "George V. Neville-Neil" Date: Thu, 15 Apr 2010 17:46:52 +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: r206673 - 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: Thu, 15 Apr 2010 17:46:52 -0000 Author: gnn Date: Thu Apr 15 17:46:51 2010 New Revision: 206673 URL: http://svn.freebsd.org/changeset/base/206673 Log: Free lstewart@ from mentorship. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Apr 15 17:24:21 2010 (r206672) +++ svnadmin/conf/mentors Thu Apr 15 17:46:51 2010 (r206673) @@ -17,7 +17,6 @@ dchagin kib eri mlaier Co-mentor: thompsa gabor delphij jinmei gnn -lstewart gnn nork imp rdivacky ed sbruno scottl From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:15:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B286C106566B; Thu, 15 Apr 2010 19:15:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A19A18FC15; Thu, 15 Apr 2010 19: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 o3FJF5Pj092484; Thu, 15 Apr 2010 19:15:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJF5wP092481; Thu, 15 Apr 2010 19:15:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004151915.o3FJF5wP092481@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 19:15: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: r206675 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:15:05 -0000 Author: delphij Date: Thu Apr 15 19:15:05 2010 New Revision: 206675 URL: http://svn.freebsd.org/changeset/base/206675 Log: Diff reduction with OpenBSD: - Remove unused locally added variable; - Deprecate -o: it's the default behavior on OpenBSD. X-MFC: along with nc 4.7. Modified: head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Thu Apr 15 18:30:21 2010 (r206674) +++ head/contrib/netcat/nc.1 Thu Apr 15 19:15:05 2010 (r206675) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2010 +.Dd April 15, 2010 .Dt NC 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Sh SYNOPSIS .Nm nc .Bk -words -.Op Fl 46DdEhklnorStUuvz +.Op Fl 46DdEhklnrStUuvz .Op Fl e Ar IPsec_policy .Op Fl I Ar length .Op Fl i Ar interval @@ -159,15 +159,6 @@ socket option. .It Fl O Ar length Specifies the size of the TCP send buffer. When -.It Fl o -.Dq Once-only mode . -By default, -.Nm -does not terminate on EOF condition on input, -but continues until the network side has been closed down. -Specifying -.Fl o -will make it terminate on EOF as well. .It Fl P Ar proxy_username Specifies a username to present to a proxy server that requires authentication. If no username is specified then authentication will not be attempted. Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Thu Apr 15 18:30:21 2010 (r206674) +++ head/contrib/netcat/netcat.c Thu Apr 15 19:15:05 2010 (r206675) @@ -72,14 +72,12 @@ #define PORT_MAX_LEN 6 /* Command Line Options */ -int Eflag; /* Use IPsec ESP */ int dflag; /* detached, no stdin */ unsigned int iflag; /* Interval Flag */ int jflag; /* use jumbo frames if we can */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ int nflag; /* Don't do name look up */ -int oflag; /* Once only: stop on EOF */ int FreeBSD_Oflag; /* Do not use TCP options */ char *Pflag; /* Proxy username */ char *pflag; /* Localport flag */ @@ -151,7 +149,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:jklnO:oP:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:hI:i:jklnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -214,7 +212,7 @@ main(int argc, char *argv[]) nflag = 1; break; case 'o': - oflag = 1; + fprintf(stderr, "option -o is deprecated.\n"); break; case 'P': Pflag = optarg; @@ -282,8 +280,6 @@ main(int argc, char *argv[]) case 'T': Tflag = parse_iptos(optarg); break; - case 0: - break; default: usage(1); } @@ -729,10 +725,9 @@ readwrite(int nfd) } if (!dflag && pfd[1].revents & POLLIN) { - if ((n = read(wfd, buf, plen)) < 0 || - (oflag && n == 0)) { + if ((n = read(wfd, buf, plen)) < 0) return; - } else if (n == 0) { + else if (n == 0) { shutdown(nfd, SHUT_WR); pfd[1].fd = -1; pfd[1].events = 0; @@ -945,7 +940,6 @@ help(void) \t-n Suppress name/port resolutions\n\ \t--no-tcpopt Disable TCP options\n\ \t-O length TCP send buffer length\n\ - \t-o Terminate on EOF on input\n\ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ \t-r Randomize remote ports\n\ @@ -995,9 +989,9 @@ usage(int ret) { fprintf(stderr, #ifdef IPSEC - "usage: nc [-46DdEhklnorStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdEhklnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]\n" #else - "usage: nc [-46DdhklnorStUuvz] [-I length] [-i interval] [-O length]\n" + "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:19:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E071065672; Thu, 15 Apr 2010 19:19:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3D7D8FC1B; Thu, 15 Apr 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 o3FJJxw1093823; Thu, 15 Apr 2010 19:19:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJJxI0093819; Thu, 15 Apr 2010 19:19:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151919.o3FJJxI0093819@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:19: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: r206678 - 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, 15 Apr 2010 19:20:00 -0000 Author: yongari Date: Thu Apr 15 19:19:59 2010 New Revision: 206678 URL: http://svn.freebsd.org/changeset/base/206678 Log: MFC r205299: - Added support for 5709S/5716S PHYs. Submitted by: pyunyh PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/brgphyreg.h 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) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Thu Apr 15 19:19:38 2010 (r206677) +++ stable/8/sys/dev/mii/brgphy.c Thu Apr 15 19:19:59 2010 (r206678) @@ -75,6 +75,7 @@ struct brgphy_softc { #define BRGPHY_5706S 0x0001 #define BRGPHY_5708S 0x0002 #define BRGPHY_NOANWAIT 0x0004 +#define BRGPHY_5709S 0x0008 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -139,6 +140,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -216,30 +218,34 @@ brgphy_attach(device_t dev) break; case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_BCM5706: - case MII_MODEL_xxBROADCOM_BCM5714: - /* - * The 5464 PHY used in the 5706 supports both copper - * and fiber interfaces over GMII. Need to check the - * shadow registers to see which mode is actually - * in effect, and therefore whether we have 5706C or - * 5706S. - */ - PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, - BRGPHY_SHADOW_1C_MODE_CTRL); - if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & - BRGPHY_SHADOW_1C_ENA_1000X) { - bsc->serdes_flags |= BRGPHY_5706S; - sc->mii_flags |= MIIF_HAVEFIBER; - } - break; + case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: + /* + * The 5464 PHY used in the 5706 supports both copper + * and fiber interfaces over GMII. Need to check the + * shadow registers to see which mode is actually + * in effect, and therefore whether we have 5706C or + * 5706S. + */ + PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, + BRGPHY_SHADOW_1C_MODE_CTRL); + if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & + BRGPHY_SHADOW_1C_ENA_1000X) { + bsc->serdes_flags |= BRGPHY_5706S; + sc->mii_flags |= MIIF_HAVEFIBER; + } + break; } break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: - bsc->serdes_flags |= BRGPHY_5708S; - sc->mii_flags |= MIIF_HAVEFIBER; - break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: + bsc->serdes_flags |= BRGPHY_5708S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5709S: + bsc->serdes_flags |= BRGPHY_5709S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; } break; default: device_printf(dev, "Unrecognized OUI for PHY!\n"); @@ -631,6 +637,7 @@ brgphy_status(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); + /* Check for MRBE auto-negotiated speed results. */ switch (xstat & BRGPHY_5708S_PG0_1000X_STAT1_SPEED_MASK) { case BRGPHY_5708S_PG0_1000X_STAT1_SPEED_10: mii->mii_media_active |= IFM_10_FL; break; @@ -642,11 +649,40 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_2500_SX; break; } + /* Check for MRBE auto-negotiated duplex results. */ if (xstat & BRGPHY_5708S_PG0_1000X_STAT1_FDX) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } + + } else if (bsc->serdes_flags & BRGPHY_5709S) { + + /* Select GP Status Block of the AN MMD, get autoneg results. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); + xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + /* Check for MRBE auto-negotiated speed results. */ + switch (xstat & BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK) { + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10: + mii->mii_media_active |= IFM_10_FL; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100: + mii->mii_media_active |= IFM_100_FX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G: + mii->mii_media_active |= IFM_1000_SX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G: + mii->mii_media_active |= IFM_2500_SX; break; + } + + /* Check for MRBE auto-negotiated duplex results. */ + if (xstat & BRGPHY_GP_STATUS_TOP_ANEG_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + } + } #if 0 @@ -967,6 +1003,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1089,7 +1126,49 @@ brgphy_reset(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); } - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709 && + (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { + + /* Select the SerDes Digital block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_SERDES_DIG); + val = PHY_READ(sc, BRGPHY_SERDES_DIG_1000X_CTL1); + val &= ~BRGPHY_SD_DIG_1000X_CTL1_AUTODET; + val |= BRGPHY_SD_DIG_1000X_CTL1_FIBER; + PHY_WRITE(sc, BRGPHY_SERDES_DIG_1000X_CTL1, val); + + /* Select the Over 1G block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_OVER_1G); + + /* Enable autoneg "Next Page" to advertise 2.5G support. */ + val = PHY_READ(sc, BRGPHY_OVER_1G_UNFORMAT_PG1); + if (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + val |= BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + else + val &= ~BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + PHY_WRITE(sc, BRGPHY_OVER_1G_UNFORMAT_PG1, val); + + /* Select the Multi-Rate Backplane Ethernet block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_MRBE); + + /* Enable MRBE speed autoneg. */ + val = PHY_READ(sc, BRGPHY_MRBE_MSG_PG5_NP); + val |= BRGPHY_MRBE_MSG_PG5_NP_MBRE | + BRGPHY_MRBE_MSG_PG5_NP_T2; + PHY_WRITE(sc, BRGPHY_MRBE_MSG_PG5_NP, val); + + /* Select the Clause 73 User B0 block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_CL73_USER_B0); + + /* Enable MRBE speed autoneg. */ + PHY_WRITE(sc, BRGPHY_CL73_USER_B0_MBRE_CTL1, + BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP | + BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR | + BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) brgphy_fixup_disable_early_dac(sc); Modified: stable/8/sys/dev/mii/brgphyreg.h ============================================================================== --- stable/8/sys/dev/mii/brgphyreg.h Thu Apr 15 19:19:38 2010 (r206677) +++ stable/8/sys/dev/mii/brgphyreg.h Thu Apr 15 19:19:59 2010 (r206678) @@ -359,6 +359,61 @@ /* End: PHY register values for the 5708S SerDes PHY */ /*******************************************************/ +/*******************************************************/ +/* Begin: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + +/* 5709S SerDes "General Purpose Status" Registers */ +#define BRGPHY_BLOCK_ADDR_GP_STATUS 0x8120 +#define BRGPHY_GP_STATUS_TOP_ANEG_STATUS 0x1B +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK 0x3F00 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10 0x0000 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100 0x0100 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G 0x0200 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G 0x0300 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1GKX 0x0D00 +#define BRGPHY_GP_STATUS_TOP_ANEG_FDX 0x0008 +#define BRGPHY_GP_STATUS_TOP_ANEG_LINK_UP 0x0004 +#define BRGPHY_GP_STATUS_TOP_ANEG_CL73_COMP 0x0001 + +/* 5709S SerDes "SerDes Digital" Registers */ +#define BRGPHY_BLOCK_ADDR_SERDES_DIG 0x8300 +#define BRGPHY_SERDES_DIG_1000X_CTL1 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_AUTODET 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_FIBER 0x0001 + +/* 5709S SerDes "Over 1G" Registers */ +#define BRGPHY_BLOCK_ADDR_OVER_1G 0x8320 +#define BRGPHY_OVER_1G_UNFORMAT_PG1 0x19 + +/* 5709S SerDes "Multi-Rate Backplane Ethernet" Registers */ +#define BRGPHY_BLOCK_ADDR_MRBE 0x8350 +#define BRGPHY_MRBE_MSG_PG5_NP 0x10 +#define BRGPHY_MRBE_MSG_PG5_NP_MBRE 0x0001 +#define BRGPHY_MRBE_MSG_PG5_NP_T2 0x0001 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_CL73_USER_B0 0x8370 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1 0x12 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP 0x2000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR 0x4000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG 0x8000 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_ADDR_EXT 0xFFD0 + +/* 5709S SerDes "Combo IEEE 0" Registers */ +#define BRGPHY_BLOCK_ADDR_COMBO_IEEE0 0xFFE0 + +#define BRGPHY_ADDR_EXT 0x1E +#define BRGPHY_BLOCK_ADDR 0x1F + +#define BRGPHY_ADDR_EXT_AN_MMD 0x3800 + +/*******************************************************/ +/* End: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + #define BRGPHY_INTRS \ ~(BRGPHY_IMR_LNK_CHG|BRGPHY_IMR_LSP_CHG|BRGPHY_IMR_DUP_CHG) Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Thu Apr 15 19:19:38 2010 (r206677) +++ stable/8/sys/dev/mii/miidevs Thu Apr 15 19:19:59 2010 (r206678) @@ -157,6 +157,7 @@ model xxBROADCOM_ALT1 BCM5722 0x002d BCM model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:22:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FB031065687; Thu, 15 Apr 2010 19:22:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB328FC19; Thu, 15 Apr 2010 19:22: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 o3FJMtpQ094513; Thu, 15 Apr 2010 19:22:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJMtwU094509; Thu, 15 Apr 2010 19:22:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151922.o3FJMtwU094509@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:22:55 +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: r206679 - 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, 15 Apr 2010 19:22:55 -0000 Author: yongari Date: Thu Apr 15 19:22:55 2010 New Revision: 206679 URL: http://svn.freebsd.org/changeset/base/206679 Log: MFC r205299: - Added support for 5709S/5716S PHYs. Submitted by: pyunyh PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/brgphyreg.h 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/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Thu Apr 15 19:19:59 2010 (r206678) +++ stable/7/sys/dev/mii/brgphy.c Thu Apr 15 19:22:55 2010 (r206679) @@ -75,6 +75,7 @@ struct brgphy_softc { #define BRGPHY_5706S 0x0001 #define BRGPHY_5708S 0x0002 #define BRGPHY_NOANWAIT 0x0004 +#define BRGPHY_5709S 0x0008 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -139,6 +140,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -216,30 +218,34 @@ brgphy_attach(device_t dev) break; case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_BCM5706: - case MII_MODEL_xxBROADCOM_BCM5714: - /* - * The 5464 PHY used in the 5706 supports both copper - * and fiber interfaces over GMII. Need to check the - * shadow registers to see which mode is actually - * in effect, and therefore whether we have 5706C or - * 5706S. - */ - PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, - BRGPHY_SHADOW_1C_MODE_CTRL); - if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & - BRGPHY_SHADOW_1C_ENA_1000X) { - bsc->serdes_flags |= BRGPHY_5706S; - sc->mii_flags |= MIIF_HAVEFIBER; - } - break; + case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: + /* + * The 5464 PHY used in the 5706 supports both copper + * and fiber interfaces over GMII. Need to check the + * shadow registers to see which mode is actually + * in effect, and therefore whether we have 5706C or + * 5706S. + */ + PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, + BRGPHY_SHADOW_1C_MODE_CTRL); + if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & + BRGPHY_SHADOW_1C_ENA_1000X) { + bsc->serdes_flags |= BRGPHY_5706S; + sc->mii_flags |= MIIF_HAVEFIBER; + } + break; } break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: - bsc->serdes_flags |= BRGPHY_5708S; - sc->mii_flags |= MIIF_HAVEFIBER; - break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: + bsc->serdes_flags |= BRGPHY_5708S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5709S: + bsc->serdes_flags |= BRGPHY_5709S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; } break; default: device_printf(dev, "Unrecognized OUI for PHY!\n"); @@ -619,6 +625,7 @@ brgphy_status(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); + /* Check for MRBE auto-negotiated speed results. */ switch (xstat & BRGPHY_5708S_PG0_1000X_STAT1_SPEED_MASK) { case BRGPHY_5708S_PG0_1000X_STAT1_SPEED_10: mii->mii_media_active |= IFM_10_FL; break; @@ -630,11 +637,40 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_2500_SX; break; } + /* Check for MRBE auto-negotiated duplex results. */ if (xstat & BRGPHY_5708S_PG0_1000X_STAT1_FDX) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } + + } else if (bsc->serdes_flags & BRGPHY_5709S) { + + /* Select GP Status Block of the AN MMD, get autoneg results. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); + xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + /* Check for MRBE auto-negotiated speed results. */ + switch (xstat & BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK) { + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10: + mii->mii_media_active |= IFM_10_FL; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100: + mii->mii_media_active |= IFM_100_FX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G: + mii->mii_media_active |= IFM_1000_SX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G: + mii->mii_media_active |= IFM_2500_SX; break; + } + + /* Check for MRBE auto-negotiated duplex results. */ + if (xstat & BRGPHY_GP_STATUS_TOP_ANEG_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + } + } #if 0 @@ -955,6 +991,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1077,7 +1114,49 @@ brgphy_reset(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); } - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709 && + (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { + + /* Select the SerDes Digital block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_SERDES_DIG); + val = PHY_READ(sc, BRGPHY_SERDES_DIG_1000X_CTL1); + val &= ~BRGPHY_SD_DIG_1000X_CTL1_AUTODET; + val |= BRGPHY_SD_DIG_1000X_CTL1_FIBER; + PHY_WRITE(sc, BRGPHY_SERDES_DIG_1000X_CTL1, val); + + /* Select the Over 1G block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_OVER_1G); + + /* Enable autoneg "Next Page" to advertise 2.5G support. */ + val = PHY_READ(sc, BRGPHY_OVER_1G_UNFORMAT_PG1); + if (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + val |= BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + else + val &= ~BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + PHY_WRITE(sc, BRGPHY_OVER_1G_UNFORMAT_PG1, val); + + /* Select the Multi-Rate Backplane Ethernet block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_MRBE); + + /* Enable MRBE speed autoneg. */ + val = PHY_READ(sc, BRGPHY_MRBE_MSG_PG5_NP); + val |= BRGPHY_MRBE_MSG_PG5_NP_MBRE | + BRGPHY_MRBE_MSG_PG5_NP_T2; + PHY_WRITE(sc, BRGPHY_MRBE_MSG_PG5_NP, val); + + /* Select the Clause 73 User B0 block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_CL73_USER_B0); + + /* Enable MRBE speed autoneg. */ + PHY_WRITE(sc, BRGPHY_CL73_USER_B0_MBRE_CTL1, + BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP | + BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR | + BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) brgphy_fixup_disable_early_dac(sc); Modified: stable/7/sys/dev/mii/brgphyreg.h ============================================================================== --- stable/7/sys/dev/mii/brgphyreg.h Thu Apr 15 19:19:59 2010 (r206678) +++ stable/7/sys/dev/mii/brgphyreg.h Thu Apr 15 19:22:55 2010 (r206679) @@ -359,6 +359,61 @@ /* End: PHY register values for the 5708S SerDes PHY */ /*******************************************************/ +/*******************************************************/ +/* Begin: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + +/* 5709S SerDes "General Purpose Status" Registers */ +#define BRGPHY_BLOCK_ADDR_GP_STATUS 0x8120 +#define BRGPHY_GP_STATUS_TOP_ANEG_STATUS 0x1B +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK 0x3F00 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10 0x0000 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100 0x0100 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G 0x0200 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G 0x0300 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1GKX 0x0D00 +#define BRGPHY_GP_STATUS_TOP_ANEG_FDX 0x0008 +#define BRGPHY_GP_STATUS_TOP_ANEG_LINK_UP 0x0004 +#define BRGPHY_GP_STATUS_TOP_ANEG_CL73_COMP 0x0001 + +/* 5709S SerDes "SerDes Digital" Registers */ +#define BRGPHY_BLOCK_ADDR_SERDES_DIG 0x8300 +#define BRGPHY_SERDES_DIG_1000X_CTL1 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_AUTODET 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_FIBER 0x0001 + +/* 5709S SerDes "Over 1G" Registers */ +#define BRGPHY_BLOCK_ADDR_OVER_1G 0x8320 +#define BRGPHY_OVER_1G_UNFORMAT_PG1 0x19 + +/* 5709S SerDes "Multi-Rate Backplane Ethernet" Registers */ +#define BRGPHY_BLOCK_ADDR_MRBE 0x8350 +#define BRGPHY_MRBE_MSG_PG5_NP 0x10 +#define BRGPHY_MRBE_MSG_PG5_NP_MBRE 0x0001 +#define BRGPHY_MRBE_MSG_PG5_NP_T2 0x0001 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_CL73_USER_B0 0x8370 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1 0x12 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP 0x2000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR 0x4000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG 0x8000 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_ADDR_EXT 0xFFD0 + +/* 5709S SerDes "Combo IEEE 0" Registers */ +#define BRGPHY_BLOCK_ADDR_COMBO_IEEE0 0xFFE0 + +#define BRGPHY_ADDR_EXT 0x1E +#define BRGPHY_BLOCK_ADDR 0x1F + +#define BRGPHY_ADDR_EXT_AN_MMD 0x3800 + +/*******************************************************/ +/* End: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + #define BRGPHY_INTRS \ ~(BRGPHY_IMR_LNK_CHG|BRGPHY_IMR_LSP_CHG|BRGPHY_IMR_DUP_CHG) Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Thu Apr 15 19:19:59 2010 (r206678) +++ stable/7/sys/dev/mii/miidevs Thu Apr 15 19:22:55 2010 (r206679) @@ -152,6 +152,7 @@ model xxBROADCOM_ALT1 BCM5722 0x002d BCM model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:26:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECEC11065690; Thu, 15 Apr 2010 19:26:28 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAAA48FC24; Thu, 15 Apr 2010 19:26: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 o3FJQSFG095343; Thu, 15 Apr 2010 19:26:28 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJQSI9095339; Thu, 15 Apr 2010 19:26:28 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151926.o3FJQSI9095339@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:26: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: r206680 - stable/8/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:26:29 -0000 Author: yongari Date: Thu Apr 15 19:26:28 2010 New Revision: 206680 URL: http://svn.freebsd.org/changeset/base/206680 Log: MFC r205300: - Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions. PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcefw.h stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:22:55 2010 (r206679) +++ stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:26:28 2010 (r206680) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); * BCM5708C B1, B2 * BCM5708S B1, B2 * BCM5709C A1, C0 + * BCM5709S A1, C0 * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -46,7 +48,7 @@ __FBSDID("$FreeBSD$"); * BCM5708C A0, B0 (pre-production) * BCM5708S A0, B0 (pre-production) * BCM5709C A0 B0, B1, B2 (pre-production) - * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) + * BCM5709S A0, B0, B1, B2 (pre-production) */ #include "opt_bce.h" @@ -320,6 +322,7 @@ static void bce_dump_rxp_state (struct static void bce_dump_tpat_state (struct bce_softc *, int); static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); +static void bce_dump_rv2p_state (struct bce_softc *); static void bce_breakpoint (struct bce_softc *); #endif @@ -360,6 +363,7 @@ static int bce_nvram_write (struct bc /* */ /****************************************************************************/ static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -1096,7 +1100,10 @@ bce_attach(device_t dev) else ifp->if_baudrate = IF_Mbps(1000); - /* Check for an MII child bus by probing the PHY. */ + /* Handle any special PHY initialization for SerDes PHYs. */ + bce_init_media(sc); + + /* MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", @@ -1504,7 +1511,17 @@ bce_miibus_read_reg(device_t dev, int ph return(0); } - if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val = REG_RD(sc, BCE_EMAC_MDIO_MODE); val &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -1584,6 +1601,16 @@ bce_miibus_write_reg(device_t dev, int p DB_PRINT_PHY_REG(reg, val); + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); val1 &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -2647,9 +2674,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2659,9 +2688,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2669,15 +2700,22 @@ bce_get_media(struct bce_softc *sc) sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { + sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + + /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) sc->bce_phy_addr = 2; + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; @@ -2691,6 +2729,37 @@ bce_get_media_exit: /****************************************************************************/ +/* Performs PHY initialization required before MII drivers access the */ +/* device. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_init_media(struct bce_softc *sc) +{ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + /* + * Configure 5709S/5716S PHYs to use traditional IEEE + * Clause 22 method. Otherwise we have no way to attach + * the PHY in mii(4) layer. PHY specific configuration + * is done in mii layer. + */ + + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); + + /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + } +} + + +/****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ /* Scans through each data structre that requires DMA memory and frees */ @@ -6679,7 +6748,7 @@ bce_tso_setup(struct bce_softc *sc, stru DBPRINT(sc, BCE_EXTREME_SEND, "%s(): hdr_len = %d, e_hlen = %d, " "ip_hlen = %d, tcp_hlen = %d, ip_len = %d\n", - __FUNCTION__, hdr_len, sizeof(struct ether_header), ip_hlen, + __FUNCTION__, hdr_len, (int) sizeof(struct ether_header), ip_hlen, tcp_hlen, ip_len); /* Set the LSO flag in the TX BD */ @@ -7943,7 +8012,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ if (result == 1) { sc = (struct bce_softc *)arg1; - bce_dump_tx_chain(sc, 0, USABLE_TX_BD); + bce_dump_tx_chain(sc, 0, TOTAL_TX_BD); } return error; @@ -8626,7 +8695,7 @@ bce_add_sysctls(struct bce_softc *sc) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_freeze_controller(struct bce_softc *sc) { u32 val; @@ -8643,7 +8712,7 @@ bce_freeze_controller(struct bce_softc * /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_unfreeze_controller(struct bce_softc *sc) { u32 val; @@ -8661,7 +8730,7 @@ bce_unfreeze_controller(struct bce_softc /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_dump_enet(struct bce_softc *sc, struct mbuf *m) { struct ether_vlan_header *eh; @@ -8915,7 +8984,9 @@ bce_dump_pg_mbuf_chain(struct bce_softc static __attribute__ ((noinline)) void bce_dump_txbd(struct bce_softc *sc, int idx, struct tx_bd *txbd) { - if (idx > MAX_TX_BD) + int i = 0; + + if (idx > MAX_TX_BD) /* Index out of range. */ BCE_PRINTF("tx_bd[0x%04X]: Invalid tx_bd index!\n", idx); else if ((idx & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) @@ -8923,52 +8994,65 @@ bce_dump_txbd(struct bce_softc *sc, int BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, chain page pointer\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo); else { - /* Normal tx_bd entry. */ - BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "vlan tag= 0x%04X, flags = 0x%04X (", idx, - txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, - txbd->tx_bd_flags); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) - printf(" CONN_FAULT"); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) - printf(" TCP_UDP_CKSUM"); + /* Normal tx_bd entry. */ + BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, mss_nbytes = 0x%08X, " + "vlan tag = 0x%04X, flags = 0x%04X (", idx, + txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); - if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) - printf(" IP_CKSUM"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) { + if (i>0) printf("|"); printf("CONN_FAULT"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) - printf(" VLAN"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) { + if (i>0) printf("|"); printf("TCP_UDP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) - printf(" COAL_NOW"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) { + if (i>0) printf("|"); printf("IP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) - printf(" DONT_GEN_CRC"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) { + if (i>0) printf("|"); printf("VLAN"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_START) - printf(" START"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) { + if (i>0) printf("|"); printf("COAL_NOW"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_END) - printf(" END"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) { + if (i>0) printf("|"); printf("DONT_GEN_CRC"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) - printf(" LSO"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_START) { + if (i>0) printf("|"); printf("START"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) - printf(" OPTION_WORD"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_END) { + if (i>0) printf("|"); printf("END"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) - printf(" FLAGS"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) { + if (i>0) printf("|"); printf("LSO"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) - printf(" SNAP"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) { + if (i>0) printf("|"); + printf("SW_OPTION=%d", ((txbd->tx_bd_flags & + TX_BD_FLAGS_SW_OPTION_WORD) >> 8)); i++; + } - printf(" )\n"); - } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) { + if (i>0) printf("|"); printf("SW_FLAGS"); i++; + } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) { + if (i>0) printf("|"); printf("SNAP)"); + } else { + printf(")\n"); + } + } } @@ -9415,10 +9499,8 @@ bce_dump_tx_chain(struct bce_softc *sc, BCE_PRINTF("page size = 0x%08X, tx chain pages = 0x%08X\n", (u32) BCM_PAGE_SIZE, (u32) TX_PAGES); - BCE_PRINTF("tx_bd per page = 0x%08X, usable tx_bd per page = 0x%08X\n", (u32) TOTAL_TX_BD_PER_PAGE, (u32) USABLE_TX_BD_PER_PAGE); - BCE_PRINTF("total tx_bd = 0x%08X\n", (u32) TOTAL_TX_BD); BCE_PRINTF( @@ -9426,11 +9508,11 @@ bce_dump_tx_chain(struct bce_softc *sc, " tx_bd data " "----------------------------\n"); - /* Now print out the tx_bd's themselves. */ + /* Now print out a decoded list of TX buffer descriptors. */ for (int i = 0; i < count; i++) { txbd = &sc->tx_bd_chain[TX_PAGE(tx_prod)][TX_IDX(tx_prod)]; bce_dump_txbd(sc, tx_prod, txbd); - tx_prod = NEXT_TX_BD(tx_prod); + tx_prod++; } BCE_PRINTF( @@ -9530,6 +9612,17 @@ bce_dump_pg_chain(struct bce_softc *sc, } #endif +#define BCE_PRINT_RX_CONS(arg) \ +if (sblk->status_rx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - rx_quick_consumer_index##arg\n", \ + sblk->status_rx_quick_consumer_index##arg, \ + (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index##arg)); + +#define BCE_PRINT_TX_CONS(arg) \ +if (sblk->status_tx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - tx_quick_consumer_index##arg\n", \ + sblk->status_tx_quick_consumer_index##arg, \ + (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index##arg)); /****************************************************************************/ /* Prints out the status block from host memory. */ @@ -9549,90 +9642,28 @@ bce_dump_status_block(struct bce_softc * " Status Block " "----------------------------\n"); + /* Theses indices are used for normal L2 drivers. */ BCE_PRINTF(" 0x%08X - attn_bits\n", sblk->status_attn_bits); BCE_PRINTF(" 0x%08X - attn_bits_ack\n", sblk->status_attn_bits_ack); - BCE_PRINTF("0x%04X(0x%04X) - rx_cons0\n", - sblk->status_rx_quick_consumer_index0, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index0)); - - BCE_PRINTF("0x%04X(0x%04X) - tx_cons0\n", - sblk->status_tx_quick_consumer_index0, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index0)); + BCE_PRINT_RX_CONS(0); + BCE_PRINT_TX_CONS(0) BCE_PRINTF(" 0x%04X - status_idx\n", sblk->status_idx); /* Theses indices are not used for normal L2 drivers. */ - if (sblk->status_rx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons1\n", - sblk->status_rx_quick_consumer_index1, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index1)); - - if (sblk->status_tx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons1\n", - sblk->status_tx_quick_consumer_index1, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index1)); - - if (sblk->status_rx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X)- rx_cons2\n", - sblk->status_rx_quick_consumer_index2, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index2)); - - if (sblk->status_tx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons2\n", - sblk->status_tx_quick_consumer_index2, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index2)); - - if (sblk->status_rx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons3\n", - sblk->status_rx_quick_consumer_index3, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index3)); - - if (sblk->status_tx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons3\n", - sblk->status_tx_quick_consumer_index3, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index3)); - - if (sblk->status_rx_quick_consumer_index4 || - sblk->status_rx_quick_consumer_index5) - BCE_PRINTF("rx_cons4 = 0x%08X, rx_cons5 = 0x%08X\n", - sblk->status_rx_quick_consumer_index4, - sblk->status_rx_quick_consumer_index5); - - if (sblk->status_rx_quick_consumer_index6 || - sblk->status_rx_quick_consumer_index7) - BCE_PRINTF("rx_cons6 = 0x%08X, rx_cons7 = 0x%08X\n", - sblk->status_rx_quick_consumer_index6, - sblk->status_rx_quick_consumer_index7); - - if (sblk->status_rx_quick_consumer_index8 || - sblk->status_rx_quick_consumer_index9) - BCE_PRINTF("rx_cons8 = 0x%08X, rx_cons9 = 0x%08X\n", - sblk->status_rx_quick_consumer_index8, - sblk->status_rx_quick_consumer_index9); - - if (sblk->status_rx_quick_consumer_index10 || - sblk->status_rx_quick_consumer_index11) - BCE_PRINTF("rx_cons10 = 0x%08X, rx_cons11 = 0x%08X\n", - sblk->status_rx_quick_consumer_index10, - sblk->status_rx_quick_consumer_index11); - - if (sblk->status_rx_quick_consumer_index12 || - sblk->status_rx_quick_consumer_index13) - BCE_PRINTF("rx_cons12 = 0x%08X, rx_cons13 = 0x%08X\n", - sblk->status_rx_quick_consumer_index12, - sblk->status_rx_quick_consumer_index13); - - if (sblk->status_rx_quick_consumer_index14 || - sblk->status_rx_quick_consumer_index15) - BCE_PRINTF("rx_cons14 = 0x%08X, rx_cons15 = 0x%08X\n", - sblk->status_rx_quick_consumer_index14, - sblk->status_rx_quick_consumer_index15); + BCE_PRINT_RX_CONS(1); BCE_PRINT_RX_CONS(2); BCE_PRINT_RX_CONS(3); + BCE_PRINT_RX_CONS(4); BCE_PRINT_RX_CONS(5); BCE_PRINT_RX_CONS(6); + BCE_PRINT_RX_CONS(7); BCE_PRINT_RX_CONS(8); BCE_PRINT_RX_CONS(9); + BCE_PRINT_RX_CONS(10); BCE_PRINT_RX_CONS(11); BCE_PRINT_RX_CONS(12); + BCE_PRINT_RX_CONS(13); BCE_PRINT_RX_CONS(14); BCE_PRINT_RX_CONS(15); - if (sblk->status_completion_producer_index || + BCE_PRINT_TX_CONS(1); BCE_PRINT_TX_CONS(2); BCE_PRINT_TX_CONS(3); + + if (sblk->status_completion_producer_index || sblk->status_cmd_consumer_index) BCE_PRINTF("com_prod = 0x%08X, cmd_cons = 0x%08X\n", sblk->status_completion_producer_index, @@ -9645,6 +9676,14 @@ bce_dump_status_block(struct bce_softc * } +#define BCE_PRINT_64BIT_STAT(arg) \ +if (sblk->arg##_lo || sblk->arg##_hi) \ + BCE_PRINTF("0x%08X:%08X : arg\n", sblk->arg##_hi, sblk->arg##_lo); + +#define BCE_PRINT_32BIT_STAT(arg) \ +if (sblk->arg) \ + BCE_PRINTF(" 0x%08X : arg\n", sblk->arg); + /****************************************************************************/ /* Prints out the statistics block from host memory. */ /* */ @@ -9663,252 +9702,60 @@ bce_dump_stats_block(struct bce_softc *s " Stats Block (All Stats Not Shown Are 0) " "---------------\n"); - if (sblk->stat_IfHCInOctets_hi - || sblk->stat_IfHCInOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInOctets\n", - sblk->stat_IfHCInOctets_hi, - sblk->stat_IfHCInOctets_lo); - - if (sblk->stat_IfHCInBadOctets_hi - || sblk->stat_IfHCInBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBadOctets\n", - sblk->stat_IfHCInBadOctets_hi, - sblk->stat_IfHCInBadOctets_lo); - - if (sblk->stat_IfHCOutOctets_hi - || sblk->stat_IfHCOutOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutOctets\n", - sblk->stat_IfHCOutOctets_hi, - sblk->stat_IfHCOutOctets_lo); - - if (sblk->stat_IfHCOutBadOctets_hi - || sblk->stat_IfHCOutBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBadOctets\n", - sblk->stat_IfHCOutBadOctets_hi, - sblk->stat_IfHCOutBadOctets_lo); - - if (sblk->stat_IfHCInUcastPkts_hi - || sblk->stat_IfHCInUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInUcastPkts\n", - sblk->stat_IfHCInUcastPkts_hi, - sblk->stat_IfHCInUcastPkts_lo); - - if (sblk->stat_IfHCInBroadcastPkts_hi - || sblk->stat_IfHCInBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBroadcastPkts\n", - sblk->stat_IfHCInBroadcastPkts_hi, - sblk->stat_IfHCInBroadcastPkts_lo); - - if (sblk->stat_IfHCInMulticastPkts_hi - || sblk->stat_IfHCInMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInMulticastPkts\n", - sblk->stat_IfHCInMulticastPkts_hi, - sblk->stat_IfHCInMulticastPkts_lo); - - if (sblk->stat_IfHCOutUcastPkts_hi - || sblk->stat_IfHCOutUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutUcastPkts\n", - sblk->stat_IfHCOutUcastPkts_hi, - sblk->stat_IfHCOutUcastPkts_lo); - - if (sblk->stat_IfHCOutBroadcastPkts_hi - || sblk->stat_IfHCOutBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBroadcastPkts\n", - sblk->stat_IfHCOutBroadcastPkts_hi, - sblk->stat_IfHCOutBroadcastPkts_lo); - - if (sblk->stat_IfHCOutMulticastPkts_hi - || sblk->stat_IfHCOutMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutMulticastPkts\n", - sblk->stat_IfHCOutMulticastPkts_hi, - sblk->stat_IfHCOutMulticastPkts_lo); - - if (sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors) - BCE_PRINTF(" 0x%08X : " - "emac_tx_stat_dot3statsinternalmactransmiterrors\n", - sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors); - - if (sblk->stat_Dot3StatsCarrierSenseErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsCarrierSenseErrors\n", - sblk->stat_Dot3StatsCarrierSenseErrors); - - if (sblk->stat_Dot3StatsFCSErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsFCSErrors\n", - sblk->stat_Dot3StatsFCSErrors); - - if (sblk->stat_Dot3StatsAlignmentErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsAlignmentErrors\n", - sblk->stat_Dot3StatsAlignmentErrors); - - if (sblk->stat_Dot3StatsSingleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsSingleCollisionFrames\n", - sblk->stat_Dot3StatsSingleCollisionFrames); - - if (sblk->stat_Dot3StatsMultipleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsMultipleCollisionFrames\n", - sblk->stat_Dot3StatsMultipleCollisionFrames); - - if (sblk->stat_Dot3StatsDeferredTransmissions) - BCE_PRINTF(" 0x%08X : Dot3StatsDeferredTransmissions\n", - sblk->stat_Dot3StatsDeferredTransmissions); - - if (sblk->stat_Dot3StatsExcessiveCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsExcessiveCollisions\n", - sblk->stat_Dot3StatsExcessiveCollisions); - - if (sblk->stat_Dot3StatsLateCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsLateCollisions\n", - sblk->stat_Dot3StatsLateCollisions); - - if (sblk->stat_EtherStatsCollisions) - BCE_PRINTF(" 0x%08X : EtherStatsCollisions\n", - sblk->stat_EtherStatsCollisions); - - if (sblk->stat_EtherStatsFragments) - BCE_PRINTF(" 0x%08X : EtherStatsFragments\n", - sblk->stat_EtherStatsFragments); - - if (sblk->stat_EtherStatsJabbers) - BCE_PRINTF(" 0x%08X : EtherStatsJabbers\n", - sblk->stat_EtherStatsJabbers); - - if (sblk->stat_EtherStatsUndersizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsUndersizePkts\n", - sblk->stat_EtherStatsUndersizePkts); - - if (sblk->stat_EtherStatsOversizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsOverrsizePkts\n", - sblk->stat_EtherStatsOversizePkts); - - if (sblk->stat_EtherStatsPktsRx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx64Octets\n", - sblk->stat_EtherStatsPktsRx64Octets); - - if (sblk->stat_EtherStatsPktsRx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsRx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsRx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsRx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsRx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsRx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsRx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsRx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets); - - if (sblk->stat_EtherStatsPktsTx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx64Octets\n", - sblk->stat_EtherStatsPktsTx64Octets); - - if (sblk->stat_EtherStatsPktsTx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsTx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsTx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsTx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsTx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsTx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsTx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsTx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets); - - if (sblk->stat_XonPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XonPauseFramesReceived\n", - sblk->stat_XonPauseFramesReceived); - - if (sblk->stat_XoffPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XoffPauseFramesReceived\n", - sblk->stat_XoffPauseFramesReceived); - - if (sblk->stat_OutXonSent) - BCE_PRINTF(" 0x%08X : OutXonSent\n", - sblk->stat_OutXonSent); - - if (sblk->stat_OutXoffSent) - BCE_PRINTF(" 0x%08X : OutXoffSent\n", - sblk->stat_OutXoffSent); - - if (sblk->stat_FlowControlDone) - BCE_PRINTF(" 0x%08X : FlowControlDone\n", - sblk->stat_FlowControlDone); - - if (sblk->stat_MacControlFramesReceived) - BCE_PRINTF(" 0x%08X : MacControlFramesReceived\n", - sblk->stat_MacControlFramesReceived); - - if (sblk->stat_XoffStateEntered) - BCE_PRINTF(" 0x%08X : XoffStateEntered\n", - sblk->stat_XoffStateEntered); - - if (sblk->stat_IfInFramesL2FilterDiscards) - BCE_PRINTF(" 0x%08X : IfInFramesL2FilterDiscards\n", - sblk->stat_IfInFramesL2FilterDiscards); - - if (sblk->stat_IfInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerDiscards\n", - sblk->stat_IfInRuleCheckerDiscards); - - if (sblk->stat_IfInFTQDiscards) - BCE_PRINTF(" 0x%08X : IfInFTQDiscards\n", - sblk->stat_IfInFTQDiscards); - - if (sblk->stat_IfInMBUFDiscards) - BCE_PRINTF(" 0x%08X : IfInMBUFDiscards\n", - sblk->stat_IfInMBUFDiscards); - - if (sblk->stat_IfInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerP4Hit\n", - sblk->stat_IfInRuleCheckerP4Hit); - - if (sblk->stat_CatchupInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerDiscards\n", - sblk->stat_CatchupInRuleCheckerDiscards); - - if (sblk->stat_CatchupInFTQDiscards) - BCE_PRINTF(" 0x%08X : CatchupInFTQDiscards\n", - sblk->stat_CatchupInFTQDiscards); - - if (sblk->stat_CatchupInMBUFDiscards) - BCE_PRINTF(" 0x%08X : CatchupInMBUFDiscards\n", - sblk->stat_CatchupInMBUFDiscards); - - if (sblk->stat_CatchupInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerP4Hit\n", - sblk->stat_CatchupInRuleCheckerP4Hit); + BCE_PRINT_64BIT_STAT(stat_IfHCInOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInMulticastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutMulticastPkts); + BCE_PRINT_32BIT_STAT(stat_emac_tx_stat_dot3statsinternalmactransmiterrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsCarrierSenseErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsFCSErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsAlignmentErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsSingleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsMultipleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsDeferredTransmissions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsExcessiveCollisions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsLateCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsFragments); + BCE_PRINT_32BIT_STAT(stat_EtherStatsJabbers); + BCE_PRINT_32BIT_STAT(stat_EtherStatsUndersizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsOversizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_XonPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_OutXonSent); + BCE_PRINT_32BIT_STAT(stat_OutXoffSent); + BCE_PRINT_32BIT_STAT(stat_FlowControlDone); + BCE_PRINT_32BIT_STAT(stat_MacControlFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffStateEntered); + BCE_PRINT_32BIT_STAT(stat_IfInFramesL2FilterDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerP4Hit); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerP4Hit); BCE_PRINTF( "----------------------------" @@ -10465,7 +10312,7 @@ static __attribute__ ((noinline)) void bce_dump_com_state(struct bce_softc *sc, int regs) { u32 val; - u32 fw_version[3]; + u32 fw_version[4]; BCE_PRINTF( "----------------------------" @@ -10508,12 +10355,76 @@ bce_dump_com_state(struct bce_softc *sc, /****************************************************************************/ +/* Prints out the Receive Virtual 2 Physical (RV2P) state. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static __attribute__ ((noinline)) void +bce_dump_rv2p_state(struct bce_softc *sc) +{ + u32 val, pc1, pc2, fw_ver_high, fw_ver_low; + + BCE_PRINTF( + "----------------------------" + " RV2P State " + "----------------------------\n"); + + /* Stall the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val |= BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2; + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Read the firmware version. */ + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC1_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P1 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC2_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P2 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + /* Resume the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val &= ~(BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2); + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Fetch the program counter value. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (1st read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (1st read)\n", pc2); + + /* Fetch the program counter value again to see if it is advancing. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (2nd read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (2nd read)\n", pc2); + + BCE_PRINTF( + "----------------------------" + "----------------" + "----------------------------\n"); +} + + +/****************************************************************************/ /* Prints out the driver state and then enters the debugger. */ /* */ /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_breakpoint(struct bce_softc *sc) { @@ -10544,6 +10455,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); + bce_dump_rv2p_state(sc); #ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); Modified: stable/8/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/8/sys/dev/bce/if_bcefw.h Thu Apr 15 19:22:55 2010 (r206679) +++ stable/8/sys/dev/bce/if_bcefw.h Thu Apr 15 19:26:28 2010 (r206680) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Thu Apr 15 19:22:55 2010 (r206679) +++ stable/8/sys/dev/bce/if_bcereg.h Thu Apr 15 19:26:28 2010 (r206680) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -453,24 +453,10 @@ } /* Announces function entry. */ -#if 0 -#define DBENTER(cond) \ - u32 start_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - u32 end_time; \ - DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__); -#endif - #define DBENTER(cond) \ DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__) /* Announces function exit. */ -#if 0 -#define DBEXIT(cond, val) \ - end_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - val += (u64) BCE_TIME_DELTA(start_time, end_time); \ - DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__); -#endif - #define DBEXIT(cond) \ DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__) @@ -6454,6 +6440,7 @@ struct bce_softc #define BCE_PHY_INT_MODE_MASK_FLAG 0x00000300 #define BCE_PHY_INT_MODE_AUTO_POLLING_FLAG 0x00000100 #define BCE_PHY_INT_MODE_LINK_READY_FLAG 0x00000200 +#define BCE_PHY_IEEE_CLAUSE_45_FLAG 0x00000400 /* Values that need to be shared with the PHY driver. */ u32 bce_shared_hw_cfg; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:28:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7661106566B; Thu, 15 Apr 2010 19:28:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4F458FC0C; Thu, 15 Apr 2010 19:28: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 o3FJSFBH095751; Thu, 15 Apr 2010 19:28:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJSF3E095747; Thu, 15 Apr 2010 19:28:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151928.o3FJSF3E095747@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:28:15 +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: r206681 - stable/7/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:28:15 -0000 Author: yongari Date: Thu Apr 15 19:28:15 2010 New Revision: 206681 URL: http://svn.freebsd.org/changeset/base/206681 Log: MFC r205300: - Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions. PR: kern/134658, kern/136417, kern/139761, kern/140970 Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcefw.h stable/7/sys/dev/bce/if_bcereg.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/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:26:28 2010 (r206680) +++ stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:28:15 2010 (r206681) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); * BCM5708C B1, B2 * BCM5708S B1, B2 * BCM5709C A1, C0 + * BCM5709S A1, C0 * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -46,7 +48,7 @@ __FBSDID("$FreeBSD$"); * BCM5708C A0, B0 (pre-production) * BCM5708S A0, B0 (pre-production) * BCM5709C A0 B0, B1, B2 (pre-production) - * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) + * BCM5709S A0, B0, B1, B2 (pre-production) */ #include "opt_bce.h" @@ -320,6 +322,7 @@ static void bce_dump_rxp_state (struct static void bce_dump_tpat_state (struct bce_softc *, int); static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); +static void bce_dump_rv2p_state (struct bce_softc *); static void bce_breakpoint (struct bce_softc *); #endif @@ -360,6 +363,7 @@ static int bce_nvram_write (struct bc /* */ /****************************************************************************/ static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -1096,7 +1100,10 @@ bce_attach(device_t dev) else ifp->if_baudrate = IF_Mbps(1000); - /* Check for an MII child bus by probing the PHY. */ + /* Handle any special PHY initialization for SerDes PHYs. */ + bce_init_media(sc); + + /* MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", @@ -1504,7 +1511,17 @@ bce_miibus_read_reg(device_t dev, int ph return(0); } - if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val = REG_RD(sc, BCE_EMAC_MDIO_MODE); val &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -1584,6 +1601,16 @@ bce_miibus_write_reg(device_t dev, int p DB_PRINT_PHY_REG(reg, val); + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); val1 &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -2647,9 +2674,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2659,9 +2688,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2669,15 +2700,22 @@ bce_get_media(struct bce_softc *sc) sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { + sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + + /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) sc->bce_phy_addr = 2; + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; @@ -2691,6 +2729,37 @@ bce_get_media_exit: /****************************************************************************/ +/* Performs PHY initialization required before MII drivers access the */ +/* device. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_init_media(struct bce_softc *sc) +{ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + /* + * Configure 5709S/5716S PHYs to use traditional IEEE + * Clause 22 method. Otherwise we have no way to attach + * the PHY in mii(4) layer. PHY specific configuration + * is done in mii layer. + */ + + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); + + /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + } +} + + +/****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ /* Scans through each data structre that requires DMA memory and frees */ @@ -6679,7 +6748,7 @@ bce_tso_setup(struct bce_softc *sc, stru DBPRINT(sc, BCE_EXTREME_SEND, "%s(): hdr_len = %d, e_hlen = %d, " "ip_hlen = %d, tcp_hlen = %d, ip_len = %d\n", - __FUNCTION__, hdr_len, sizeof(struct ether_header), ip_hlen, + __FUNCTION__, hdr_len, (int) sizeof(struct ether_header), ip_hlen, tcp_hlen, ip_len); /* Set the LSO flag in the TX BD */ @@ -7943,7 +8012,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ if (result == 1) { sc = (struct bce_softc *)arg1; - bce_dump_tx_chain(sc, 0, USABLE_TX_BD); + bce_dump_tx_chain(sc, 0, TOTAL_TX_BD); } return error; @@ -8626,7 +8695,7 @@ bce_add_sysctls(struct bce_softc *sc) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_freeze_controller(struct bce_softc *sc) { u32 val; @@ -8643,7 +8712,7 @@ bce_freeze_controller(struct bce_softc * /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_unfreeze_controller(struct bce_softc *sc) { u32 val; @@ -8661,7 +8730,7 @@ bce_unfreeze_controller(struct bce_softc /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_dump_enet(struct bce_softc *sc, struct mbuf *m) { struct ether_vlan_header *eh; @@ -8915,7 +8984,9 @@ bce_dump_pg_mbuf_chain(struct bce_softc static __attribute__ ((noinline)) void bce_dump_txbd(struct bce_softc *sc, int idx, struct tx_bd *txbd) { - if (idx > MAX_TX_BD) + int i = 0; + + if (idx > MAX_TX_BD) /* Index out of range. */ BCE_PRINTF("tx_bd[0x%04X]: Invalid tx_bd index!\n", idx); else if ((idx & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) @@ -8923,52 +8994,65 @@ bce_dump_txbd(struct bce_softc *sc, int BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, chain page pointer\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo); else { - /* Normal tx_bd entry. */ - BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "vlan tag= 0x%04X, flags = 0x%04X (", idx, - txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, - txbd->tx_bd_flags); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) - printf(" CONN_FAULT"); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) - printf(" TCP_UDP_CKSUM"); + /* Normal tx_bd entry. */ + BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, mss_nbytes = 0x%08X, " + "vlan tag = 0x%04X, flags = 0x%04X (", idx, + txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); - if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) - printf(" IP_CKSUM"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) { + if (i>0) printf("|"); printf("CONN_FAULT"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) - printf(" VLAN"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) { + if (i>0) printf("|"); printf("TCP_UDP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) - printf(" COAL_NOW"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) { + if (i>0) printf("|"); printf("IP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) - printf(" DONT_GEN_CRC"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) { + if (i>0) printf("|"); printf("VLAN"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_START) - printf(" START"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) { + if (i>0) printf("|"); printf("COAL_NOW"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_END) - printf(" END"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) { + if (i>0) printf("|"); printf("DONT_GEN_CRC"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) - printf(" LSO"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_START) { + if (i>0) printf("|"); printf("START"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) - printf(" OPTION_WORD"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_END) { + if (i>0) printf("|"); printf("END"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) - printf(" FLAGS"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) { + if (i>0) printf("|"); printf("LSO"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) - printf(" SNAP"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) { + if (i>0) printf("|"); + printf("SW_OPTION=%d", ((txbd->tx_bd_flags & + TX_BD_FLAGS_SW_OPTION_WORD) >> 8)); i++; + } - printf(" )\n"); - } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) { + if (i>0) printf("|"); printf("SW_FLAGS"); i++; + } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) { + if (i>0) printf("|"); printf("SNAP)"); + } else { + printf(")\n"); + } + } } @@ -9415,10 +9499,8 @@ bce_dump_tx_chain(struct bce_softc *sc, BCE_PRINTF("page size = 0x%08X, tx chain pages = 0x%08X\n", (u32) BCM_PAGE_SIZE, (u32) TX_PAGES); - BCE_PRINTF("tx_bd per page = 0x%08X, usable tx_bd per page = 0x%08X\n", (u32) TOTAL_TX_BD_PER_PAGE, (u32) USABLE_TX_BD_PER_PAGE); - BCE_PRINTF("total tx_bd = 0x%08X\n", (u32) TOTAL_TX_BD); BCE_PRINTF( @@ -9426,11 +9508,11 @@ bce_dump_tx_chain(struct bce_softc *sc, " tx_bd data " "----------------------------\n"); - /* Now print out the tx_bd's themselves. */ + /* Now print out a decoded list of TX buffer descriptors. */ for (int i = 0; i < count; i++) { txbd = &sc->tx_bd_chain[TX_PAGE(tx_prod)][TX_IDX(tx_prod)]; bce_dump_txbd(sc, tx_prod, txbd); - tx_prod = NEXT_TX_BD(tx_prod); + tx_prod++; } BCE_PRINTF( @@ -9530,6 +9612,17 @@ bce_dump_pg_chain(struct bce_softc *sc, } #endif +#define BCE_PRINT_RX_CONS(arg) \ +if (sblk->status_rx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - rx_quick_consumer_index##arg\n", \ + sblk->status_rx_quick_consumer_index##arg, \ + (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index##arg)); + +#define BCE_PRINT_TX_CONS(arg) \ +if (sblk->status_tx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - tx_quick_consumer_index##arg\n", \ + sblk->status_tx_quick_consumer_index##arg, \ + (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index##arg)); /****************************************************************************/ /* Prints out the status block from host memory. */ @@ -9549,90 +9642,28 @@ bce_dump_status_block(struct bce_softc * " Status Block " "----------------------------\n"); + /* Theses indices are used for normal L2 drivers. */ BCE_PRINTF(" 0x%08X - attn_bits\n", sblk->status_attn_bits); BCE_PRINTF(" 0x%08X - attn_bits_ack\n", sblk->status_attn_bits_ack); - BCE_PRINTF("0x%04X(0x%04X) - rx_cons0\n", - sblk->status_rx_quick_consumer_index0, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index0)); - - BCE_PRINTF("0x%04X(0x%04X) - tx_cons0\n", - sblk->status_tx_quick_consumer_index0, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index0)); + BCE_PRINT_RX_CONS(0); + BCE_PRINT_TX_CONS(0) BCE_PRINTF(" 0x%04X - status_idx\n", sblk->status_idx); /* Theses indices are not used for normal L2 drivers. */ - if (sblk->status_rx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons1\n", - sblk->status_rx_quick_consumer_index1, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index1)); - - if (sblk->status_tx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons1\n", - sblk->status_tx_quick_consumer_index1, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index1)); - - if (sblk->status_rx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X)- rx_cons2\n", - sblk->status_rx_quick_consumer_index2, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index2)); - - if (sblk->status_tx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons2\n", - sblk->status_tx_quick_consumer_index2, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index2)); - - if (sblk->status_rx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons3\n", - sblk->status_rx_quick_consumer_index3, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index3)); - - if (sblk->status_tx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons3\n", - sblk->status_tx_quick_consumer_index3, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index3)); - - if (sblk->status_rx_quick_consumer_index4 || - sblk->status_rx_quick_consumer_index5) - BCE_PRINTF("rx_cons4 = 0x%08X, rx_cons5 = 0x%08X\n", - sblk->status_rx_quick_consumer_index4, - sblk->status_rx_quick_consumer_index5); - - if (sblk->status_rx_quick_consumer_index6 || - sblk->status_rx_quick_consumer_index7) - BCE_PRINTF("rx_cons6 = 0x%08X, rx_cons7 = 0x%08X\n", - sblk->status_rx_quick_consumer_index6, - sblk->status_rx_quick_consumer_index7); - - if (sblk->status_rx_quick_consumer_index8 || - sblk->status_rx_quick_consumer_index9) - BCE_PRINTF("rx_cons8 = 0x%08X, rx_cons9 = 0x%08X\n", - sblk->status_rx_quick_consumer_index8, - sblk->status_rx_quick_consumer_index9); - - if (sblk->status_rx_quick_consumer_index10 || - sblk->status_rx_quick_consumer_index11) - BCE_PRINTF("rx_cons10 = 0x%08X, rx_cons11 = 0x%08X\n", - sblk->status_rx_quick_consumer_index10, - sblk->status_rx_quick_consumer_index11); - - if (sblk->status_rx_quick_consumer_index12 || - sblk->status_rx_quick_consumer_index13) - BCE_PRINTF("rx_cons12 = 0x%08X, rx_cons13 = 0x%08X\n", - sblk->status_rx_quick_consumer_index12, - sblk->status_rx_quick_consumer_index13); - - if (sblk->status_rx_quick_consumer_index14 || - sblk->status_rx_quick_consumer_index15) - BCE_PRINTF("rx_cons14 = 0x%08X, rx_cons15 = 0x%08X\n", - sblk->status_rx_quick_consumer_index14, - sblk->status_rx_quick_consumer_index15); + BCE_PRINT_RX_CONS(1); BCE_PRINT_RX_CONS(2); BCE_PRINT_RX_CONS(3); + BCE_PRINT_RX_CONS(4); BCE_PRINT_RX_CONS(5); BCE_PRINT_RX_CONS(6); + BCE_PRINT_RX_CONS(7); BCE_PRINT_RX_CONS(8); BCE_PRINT_RX_CONS(9); + BCE_PRINT_RX_CONS(10); BCE_PRINT_RX_CONS(11); BCE_PRINT_RX_CONS(12); + BCE_PRINT_RX_CONS(13); BCE_PRINT_RX_CONS(14); BCE_PRINT_RX_CONS(15); - if (sblk->status_completion_producer_index || + BCE_PRINT_TX_CONS(1); BCE_PRINT_TX_CONS(2); BCE_PRINT_TX_CONS(3); + + if (sblk->status_completion_producer_index || sblk->status_cmd_consumer_index) BCE_PRINTF("com_prod = 0x%08X, cmd_cons = 0x%08X\n", sblk->status_completion_producer_index, @@ -9645,6 +9676,14 @@ bce_dump_status_block(struct bce_softc * } +#define BCE_PRINT_64BIT_STAT(arg) \ +if (sblk->arg##_lo || sblk->arg##_hi) \ + BCE_PRINTF("0x%08X:%08X : arg\n", sblk->arg##_hi, sblk->arg##_lo); + +#define BCE_PRINT_32BIT_STAT(arg) \ +if (sblk->arg) \ + BCE_PRINTF(" 0x%08X : arg\n", sblk->arg); + /****************************************************************************/ /* Prints out the statistics block from host memory. */ /* */ @@ -9663,252 +9702,60 @@ bce_dump_stats_block(struct bce_softc *s " Stats Block (All Stats Not Shown Are 0) " "---------------\n"); - if (sblk->stat_IfHCInOctets_hi - || sblk->stat_IfHCInOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInOctets\n", - sblk->stat_IfHCInOctets_hi, - sblk->stat_IfHCInOctets_lo); - - if (sblk->stat_IfHCInBadOctets_hi - || sblk->stat_IfHCInBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBadOctets\n", - sblk->stat_IfHCInBadOctets_hi, - sblk->stat_IfHCInBadOctets_lo); - - if (sblk->stat_IfHCOutOctets_hi - || sblk->stat_IfHCOutOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutOctets\n", - sblk->stat_IfHCOutOctets_hi, - sblk->stat_IfHCOutOctets_lo); - - if (sblk->stat_IfHCOutBadOctets_hi - || sblk->stat_IfHCOutBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBadOctets\n", - sblk->stat_IfHCOutBadOctets_hi, - sblk->stat_IfHCOutBadOctets_lo); - - if (sblk->stat_IfHCInUcastPkts_hi - || sblk->stat_IfHCInUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInUcastPkts\n", - sblk->stat_IfHCInUcastPkts_hi, - sblk->stat_IfHCInUcastPkts_lo); - - if (sblk->stat_IfHCInBroadcastPkts_hi - || sblk->stat_IfHCInBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBroadcastPkts\n", - sblk->stat_IfHCInBroadcastPkts_hi, - sblk->stat_IfHCInBroadcastPkts_lo); - - if (sblk->stat_IfHCInMulticastPkts_hi - || sblk->stat_IfHCInMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInMulticastPkts\n", - sblk->stat_IfHCInMulticastPkts_hi, - sblk->stat_IfHCInMulticastPkts_lo); - - if (sblk->stat_IfHCOutUcastPkts_hi - || sblk->stat_IfHCOutUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutUcastPkts\n", - sblk->stat_IfHCOutUcastPkts_hi, - sblk->stat_IfHCOutUcastPkts_lo); - - if (sblk->stat_IfHCOutBroadcastPkts_hi - || sblk->stat_IfHCOutBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBroadcastPkts\n", - sblk->stat_IfHCOutBroadcastPkts_hi, - sblk->stat_IfHCOutBroadcastPkts_lo); - - if (sblk->stat_IfHCOutMulticastPkts_hi - || sblk->stat_IfHCOutMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutMulticastPkts\n", - sblk->stat_IfHCOutMulticastPkts_hi, - sblk->stat_IfHCOutMulticastPkts_lo); - - if (sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors) - BCE_PRINTF(" 0x%08X : " - "emac_tx_stat_dot3statsinternalmactransmiterrors\n", - sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors); - - if (sblk->stat_Dot3StatsCarrierSenseErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsCarrierSenseErrors\n", - sblk->stat_Dot3StatsCarrierSenseErrors); - - if (sblk->stat_Dot3StatsFCSErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsFCSErrors\n", - sblk->stat_Dot3StatsFCSErrors); - - if (sblk->stat_Dot3StatsAlignmentErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsAlignmentErrors\n", - sblk->stat_Dot3StatsAlignmentErrors); - - if (sblk->stat_Dot3StatsSingleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsSingleCollisionFrames\n", - sblk->stat_Dot3StatsSingleCollisionFrames); - - if (sblk->stat_Dot3StatsMultipleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsMultipleCollisionFrames\n", - sblk->stat_Dot3StatsMultipleCollisionFrames); - - if (sblk->stat_Dot3StatsDeferredTransmissions) - BCE_PRINTF(" 0x%08X : Dot3StatsDeferredTransmissions\n", - sblk->stat_Dot3StatsDeferredTransmissions); - - if (sblk->stat_Dot3StatsExcessiveCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsExcessiveCollisions\n", - sblk->stat_Dot3StatsExcessiveCollisions); - - if (sblk->stat_Dot3StatsLateCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsLateCollisions\n", - sblk->stat_Dot3StatsLateCollisions); - - if (sblk->stat_EtherStatsCollisions) - BCE_PRINTF(" 0x%08X : EtherStatsCollisions\n", - sblk->stat_EtherStatsCollisions); - - if (sblk->stat_EtherStatsFragments) - BCE_PRINTF(" 0x%08X : EtherStatsFragments\n", - sblk->stat_EtherStatsFragments); - - if (sblk->stat_EtherStatsJabbers) - BCE_PRINTF(" 0x%08X : EtherStatsJabbers\n", - sblk->stat_EtherStatsJabbers); - - if (sblk->stat_EtherStatsUndersizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsUndersizePkts\n", - sblk->stat_EtherStatsUndersizePkts); - - if (sblk->stat_EtherStatsOversizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsOverrsizePkts\n", - sblk->stat_EtherStatsOversizePkts); - - if (sblk->stat_EtherStatsPktsRx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx64Octets\n", - sblk->stat_EtherStatsPktsRx64Octets); - - if (sblk->stat_EtherStatsPktsRx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsRx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsRx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsRx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsRx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsRx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsRx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsRx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets); - - if (sblk->stat_EtherStatsPktsTx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx64Octets\n", - sblk->stat_EtherStatsPktsTx64Octets); - - if (sblk->stat_EtherStatsPktsTx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsTx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsTx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsTx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsTx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsTx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsTx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsTx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets); - - if (sblk->stat_XonPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XonPauseFramesReceived\n", - sblk->stat_XonPauseFramesReceived); - - if (sblk->stat_XoffPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XoffPauseFramesReceived\n", - sblk->stat_XoffPauseFramesReceived); - - if (sblk->stat_OutXonSent) - BCE_PRINTF(" 0x%08X : OutXonSent\n", - sblk->stat_OutXonSent); - - if (sblk->stat_OutXoffSent) - BCE_PRINTF(" 0x%08X : OutXoffSent\n", - sblk->stat_OutXoffSent); - - if (sblk->stat_FlowControlDone) - BCE_PRINTF(" 0x%08X : FlowControlDone\n", - sblk->stat_FlowControlDone); - - if (sblk->stat_MacControlFramesReceived) - BCE_PRINTF(" 0x%08X : MacControlFramesReceived\n", - sblk->stat_MacControlFramesReceived); - - if (sblk->stat_XoffStateEntered) - BCE_PRINTF(" 0x%08X : XoffStateEntered\n", - sblk->stat_XoffStateEntered); - - if (sblk->stat_IfInFramesL2FilterDiscards) - BCE_PRINTF(" 0x%08X : IfInFramesL2FilterDiscards\n", - sblk->stat_IfInFramesL2FilterDiscards); - - if (sblk->stat_IfInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerDiscards\n", - sblk->stat_IfInRuleCheckerDiscards); - - if (sblk->stat_IfInFTQDiscards) - BCE_PRINTF(" 0x%08X : IfInFTQDiscards\n", - sblk->stat_IfInFTQDiscards); - - if (sblk->stat_IfInMBUFDiscards) - BCE_PRINTF(" 0x%08X : IfInMBUFDiscards\n", - sblk->stat_IfInMBUFDiscards); - - if (sblk->stat_IfInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerP4Hit\n", - sblk->stat_IfInRuleCheckerP4Hit); - - if (sblk->stat_CatchupInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerDiscards\n", - sblk->stat_CatchupInRuleCheckerDiscards); - - if (sblk->stat_CatchupInFTQDiscards) - BCE_PRINTF(" 0x%08X : CatchupInFTQDiscards\n", - sblk->stat_CatchupInFTQDiscards); - - if (sblk->stat_CatchupInMBUFDiscards) - BCE_PRINTF(" 0x%08X : CatchupInMBUFDiscards\n", - sblk->stat_CatchupInMBUFDiscards); - - if (sblk->stat_CatchupInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerP4Hit\n", - sblk->stat_CatchupInRuleCheckerP4Hit); + BCE_PRINT_64BIT_STAT(stat_IfHCInOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInMulticastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutMulticastPkts); + BCE_PRINT_32BIT_STAT(stat_emac_tx_stat_dot3statsinternalmactransmiterrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsCarrierSenseErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsFCSErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsAlignmentErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsSingleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsMultipleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsDeferredTransmissions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsExcessiveCollisions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsLateCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsFragments); + BCE_PRINT_32BIT_STAT(stat_EtherStatsJabbers); + BCE_PRINT_32BIT_STAT(stat_EtherStatsUndersizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsOversizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_XonPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_OutXonSent); + BCE_PRINT_32BIT_STAT(stat_OutXoffSent); + BCE_PRINT_32BIT_STAT(stat_FlowControlDone); + BCE_PRINT_32BIT_STAT(stat_MacControlFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffStateEntered); + BCE_PRINT_32BIT_STAT(stat_IfInFramesL2FilterDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerP4Hit); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerP4Hit); BCE_PRINTF( "----------------------------" @@ -10465,7 +10312,7 @@ static __attribute__ ((noinline)) void bce_dump_com_state(struct bce_softc *sc, int regs) { u32 val; - u32 fw_version[3]; + u32 fw_version[4]; BCE_PRINTF( "----------------------------" @@ -10508,12 +10355,76 @@ bce_dump_com_state(struct bce_softc *sc, /****************************************************************************/ +/* Prints out the Receive Virtual 2 Physical (RV2P) state. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static __attribute__ ((noinline)) void +bce_dump_rv2p_state(struct bce_softc *sc) +{ + u32 val, pc1, pc2, fw_ver_high, fw_ver_low; + + BCE_PRINTF( + "----------------------------" + " RV2P State " + "----------------------------\n"); + + /* Stall the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val |= BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2; + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Read the firmware version. */ + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC1_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P1 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC2_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P2 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + /* Resume the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val &= ~(BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2); + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Fetch the program counter value. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (1st read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (1st read)\n", pc2); + + /* Fetch the program counter value again to see if it is advancing. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (2nd read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (2nd read)\n", pc2); + + BCE_PRINTF( + "----------------------------" + "----------------" + "----------------------------\n"); +} + + +/****************************************************************************/ /* Prints out the driver state and then enters the debugger. */ /* */ /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_breakpoint(struct bce_softc *sc) { @@ -10544,6 +10455,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); + bce_dump_rv2p_state(sc); #ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); Modified: stable/7/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/7/sys/dev/bce/if_bcefw.h Thu Apr 15 19:26:28 2010 (r206680) +++ stable/7/sys/dev/bce/if_bcefw.h Thu Apr 15 19:28:15 2010 (r206681) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Thu Apr 15 19:26:28 2010 (r206680) +++ stable/7/sys/dev/bce/if_bcereg.h Thu Apr 15 19:28:15 2010 (r206681) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -453,24 +453,10 @@ } /* Announces function entry. */ -#if 0 -#define DBENTER(cond) \ - u32 start_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - u32 end_time; \ - DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__); -#endif - #define DBENTER(cond) \ DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__) /* Announces function exit. */ -#if 0 -#define DBEXIT(cond, val) \ - end_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - val += (u64) BCE_TIME_DELTA(start_time, end_time); \ - DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__); -#endif - #define DBEXIT(cond) \ DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__) @@ -6451,6 +6437,7 @@ struct bce_softc #define BCE_PHY_INT_MODE_MASK_FLAG 0x00000300 #define BCE_PHY_INT_MODE_AUTO_POLLING_FLAG 0x00000100 #define BCE_PHY_INT_MODE_LINK_READY_FLAG 0x00000200 +#define BCE_PHY_IEEE_CLAUSE_45_FLAG 0x00000400 /* Values that need to be shared with the PHY driver. */ u32 bce_shared_hw_cfg; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:29:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D771E1065672; Thu, 15 Apr 2010 19:29:56 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C531E8FC15; Thu, 15 Apr 2010 19:29: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 o3FJTu0W096190; Thu, 15 Apr 2010 19:29:56 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJTuUL096187; Thu, 15 Apr 2010 19:29:56 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151929.o3FJTuUL096187@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:29: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: r206682 - stable/8/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:29:57 -0000 Author: yongari Date: Thu Apr 15 19:29:56 2010 New Revision: 206682 URL: http://svn.freebsd.org/changeset/base/206682 Log: MFC r206268 - Fixed 5708S 2.5G support broken in last commit. - Added some new debug helper routines to systcl. - Fixed many of the style(9) violations that have crept into the code due to my use of a "smart" editor. Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:28:15 2010 (r206681) +++ stable/8/sys/dev/bce/if_bce.c Thu Apr 15 19:29:56 2010 (r206682) @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); * BCM5708S B1, B2 * BCM5709C A1, C0 * BCM5709S A1, C0 - * BCM5716C C0 - * BCM5716S C0 + * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -277,37 +277,41 @@ static struct flash_spec flash_5709 = { /****************************************************************************/ /* FreeBSD device entry points. */ /****************************************************************************/ -static int bce_probe (device_t); -static int bce_attach (device_t); -static int bce_detach (device_t); -static int bce_shutdown (device_t); +static int bce_probe (device_t); +static int bce_attach (device_t); +static int bce_detach (device_t); +static int bce_shutdown (device_t); /****************************************************************************/ /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG -static u32 bce_reg_rd (struct bce_softc *, u32); -static void bce_reg_wr (struct bce_softc *, u32, u32); -static void bce_reg_wr16 (struct bce_softc *, u32, u16); -static u32 bce_ctx_rd (struct bce_softc *, u32, u32); -static void bce_dump_enet (struct bce_softc *, struct mbuf *); -static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static u32 bce_reg_rd (struct bce_softc *, u32); +static void bce_reg_wr (struct bce_softc *, u32, u32); +static void bce_reg_wr16 (struct bce_softc *, u32, u16); +static u32 bce_ctx_rd (struct bce_softc *, u32, u32); +static void bce_dump_enet (struct bce_softc *, struct mbuf *); +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); #endif -static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); -static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_txbd (struct bce_softc *, + int, struct tx_bd *); +static void bce_dump_rxbd (struct bce_softc *, + int, struct rx_bd *); #ifdef BCE_JUMBO_HDRSPLIT -static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_pgbd (struct bce_softc *, + int, struct rx_bd *); #endif -static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_ctx (struct bce_softc *, u16); -static void bce_dump_ftqs (struct bce_softc *); +static void bce_dump_l2fhdr (struct bce_softc *, + int, struct l2_fhdr *); +static void bce_dump_ctx (struct bce_softc *, u16); +static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); -static void bce_dump_rx_chain (struct bce_softc *, u16, int); +static void bce_dump_rx_bd_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); #endif @@ -315,7 +319,7 @@ static void bce_dump_status_block (struc static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); -static void bce_dump_mq_regs (struct bce_softc *); +static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); static void bce_dump_txp_state (struct bce_softc *, int); static void bce_dump_rxp_state (struct bce_softc *, int); @@ -323,18 +327,18 @@ static void bce_dump_tpat_state (struct static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); static void bce_dump_rv2p_state (struct bce_softc *); -static void bce_breakpoint (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); #endif /****************************************************************************/ /* BCE Register/Memory Access Routines */ /****************************************************************************/ -static u32 bce_reg_rd_ind (struct bce_softc *, u32); -static void bce_reg_wr_ind (struct bce_softc *, u32, u32); -static void bce_shmem_wr (struct bce_softc *, u32, u32); -static u32 bce_shmem_rd (struct bce_softc *, u32); -static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); +static u32 bce_reg_rd_ind (struct bce_softc *, u32); +static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_shmem_wr (struct bce_softc *, u32, u32); +static u32 bce_shmem_rd (struct bce_softc *, u32); +static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); static int bce_miibus_read_reg (device_t, int, int); static int bce_miibus_write_reg (device_t, int, int, int); static void bce_miibus_statchg (device_t); @@ -346,96 +350,101 @@ static void bce_miibus_statchg (device_ static int bce_acquire_nvram_lock (struct bce_softc *); static int bce_release_nvram_lock (struct bce_softc *); static void bce_enable_nvram_access (struct bce_softc *); -static void bce_disable_nvram_access(struct bce_softc *); +static void bce_disable_nvram_access (struct bce_softc *); static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_init_nvram (struct bce_softc *); -static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); -static int bce_nvram_test (struct bce_softc *); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); #ifdef BCE_NVRAM_WRITE_SUPPORT static int bce_enable_nvram_write (struct bce_softc *); static void bce_disable_nvram_write (struct bce_softc *); static int bce_nvram_erase_page (struct bce_softc *, u32); static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); #endif /****************************************************************************/ /* */ /****************************************************************************/ -static void bce_get_media (struct bce_softc *); -static void bce_init_media (struct bce_softc *); -static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); -static int bce_dma_alloc (device_t); -static void bce_dma_free (struct bce_softc *); +static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); +static void bce_dma_map_addr (void *, + bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); static void bce_release_resources (struct bce_softc *); /****************************************************************************/ /* BCE Firmware Synchronization and Load */ /****************************************************************************/ -static int bce_fw_sync (struct bce_softc *, u32); +static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); -static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); -static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_start_rxp_cpu (struct bce_softc *); +static void bce_load_cpu_fw (struct bce_softc *, + struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); -static void bce_init_cp_cpu (struct bce_softc *); +static void bce_init_cp_cpu (struct bce_softc *); static void bce_init_com_cpu (struct bce_softc *); -static void bce_init_cpus (struct bce_softc *); +static void bce_init_cpus (struct bce_softc *); static void bce_print_adapter_info (struct bce_softc *); static void bce_probe_pci_caps (device_t, struct bce_softc *); -static void bce_stop (struct bce_softc *); -static int bce_reset (struct bce_softc *, u32); -static int bce_chipinit (struct bce_softc *); -static int bce_blockinit (struct bce_softc *); +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); static int bce_init_tx_chain (struct bce_softc *); static void bce_free_tx_chain (struct bce_softc *); -static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); +static int bce_get_rx_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); #ifdef BCE_JUMBO_HDRSPLIT -static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); +static int bce_get_pg_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); static void bce_free_pg_chain (struct bce_softc *); #endif -static struct mbuf *bce_tso_setup (struct bce_softc *, struct mbuf **, u16 *); -static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static struct mbuf *bce_tso_setup (struct bce_softc *, + struct mbuf **, u16 *); +static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); -static void bce_start (struct ifnet *); -static int bce_ioctl (struct ifnet *, u_long, caddr_t); -static void bce_watchdog (struct bce_softc *); -static int bce_ifmedia_upd (struct ifnet *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); +static int bce_ifmedia_upd (struct ifnet *); static void bce_ifmedia_upd_locked (struct ifnet *); -static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static void bce_init_locked (struct bce_softc *); -static void bce_init (void *); +static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_init_locked (struct bce_softc *); +static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_ctx (struct bce_softc *); +static void bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); -static void bce_phy_intr (struct bce_softc *); -static inline u16 bce_get_hw_rx_cons(struct bce_softc *); -static void bce_rx_intr (struct bce_softc *); -static void bce_tx_intr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); +static inline u16 bce_get_hw_rx_cons (struct bce_softc *); +static void bce_rx_intr (struct bce_softc *); +static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); -static void bce_enable_intr (struct bce_softc *, int); +static void bce_enable_intr (struct bce_softc *, int); -static void bce_intr (void *); -static void bce_set_rx_mode (struct bce_softc *); +static void bce_intr (void *); +static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); -static void bce_tick (void *); -static void bce_pulse (void *); -static void bce_add_sysctls (struct bce_softc *); +static void bce_tick (void *); +static void bce_pulse (void *); +static void bce_add_sysctls (struct bce_softc *); /****************************************************************************/ @@ -540,15 +549,15 @@ bce_probe(device_t dev) sdid = pci_get_subdevice(dev); DBPRINT(sc, BCE_EXTREME_LOAD, - "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " - "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); + "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " + "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); /* Look through the list of known devices for a match. */ while(t->bce_name != NULL) { if ((vid == t->bce_vid) && (did == t->bce_did) && - ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && - ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { + ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && + ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); @@ -557,8 +566,8 @@ bce_probe(device_t dev) /* Print out the device identity. */ snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", - t->bce_name, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + t->bce_name, (((pci_read_config(dev, + PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); device_set_desc_copy(dev, descbuf); @@ -590,21 +599,21 @@ bce_print_adapter_info(struct bce_softc BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); /* Bus info. */ if (sc->bce_flags & BCE_PCIE_FLAG) { printf("Bus (PCIe x%d, ", sc->link_width); switch (sc->link_speed) { - case 1: printf("2.5Gbps); "); break; - case 2: printf("5Gbps); "); break; - default: printf("Unknown link speed); "); + case 1: printf("2.5Gbps); "); break; + case 2: printf("5Gbps); "); break; + default: printf("Unknown link speed); "); } } else { printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? + "32-bit" : "64-bit"), sc->bus_speed_mhz); } /* Firmware version and device features. */ @@ -612,30 +621,30 @@ bce_print_adapter_info(struct bce_softc #ifdef BCE_JUMBO_HDRSPLIT printf("SPLT"); - i++; + i++; #endif - if (sc->bce_flags & BCE_USING_MSI_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSI_FLAG) { + if (i > 0) printf("|"); printf("MSI"); i++; - } + } - if (sc->bce_flags & BCE_USING_MSIX_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSIX_FLAG) { + if (i > 0) printf("|"); printf("MSI-X"); i++; - } + } - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { + if (i > 0) printf("|"); printf("2.5G"); i++; - } + } - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { - if (i > 0) printf("|"); - printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); - } else { - printf(")\n"); - } + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + if (i > 0) printf("|"); + printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); + } else { + printf(")\n"); + } DBEXIT(BCE_VERBOSE_LOAD); } @@ -667,8 +676,8 @@ bce_probe_pci_caps(device_t dev, struct if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { if (reg != 0) { u16 link_status = pci_read_config(dev, reg + 0x12, 2); - DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", - link_status); + DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = " + "0x%08X\n", link_status); sc->link_speed = link_status & 0xf; sc->link_width = (link_status >> 4) & 0x3f; sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; @@ -730,7 +739,7 @@ bce_attach(device_t dev) if (sc->bce_res_mem == NULL) { BCE_PRINTF("%s(%d): PCI memory allocation failed\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -801,14 +810,14 @@ bce_attach(device_t dev) } sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &rid, RF_SHAREABLE | RF_ACTIVE); + &rid, RF_SHAREABLE | RF_ACTIVE); sc->bce_irq_rid = rid; /* Report any IRQ allocation errors. */ if (sc->bce_res_irq == NULL) { BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -823,28 +832,28 @@ bce_attach(device_t dev) * valid until this is done. */ pci_write_config(dev, BCE_PCICFG_MISC_CONFIG, - BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | - BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); + BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | + BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); /* Save ASIC revsion info. */ sc->bce_chipid = REG_RD(sc, BCE_MISC_ID); /* Weed out any non-production controller revisions. */ switch(BCE_CHIP_ID(sc)) { - case BCE_CHIP_ID_5706_A0: - case BCE_CHIP_ID_5706_A1: - case BCE_CHIP_ID_5708_A0: - case BCE_CHIP_ID_5708_B0: - case BCE_CHIP_ID_5709_A0: - case BCE_CHIP_ID_5709_B0: - case BCE_CHIP_ID_5709_B1: - case BCE_CHIP_ID_5709_B2: - BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", - __FILE__, __LINE__, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), - (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); - rc = ENODEV; - goto bce_attach_fail; + case BCE_CHIP_ID_5706_A0: + case BCE_CHIP_ID_5706_A1: + case BCE_CHIP_ID_5708_A0: + case BCE_CHIP_ID_5708_B0: + case BCE_CHIP_ID_5709_A0: + case BCE_CHIP_ID_5709_B0: + case BCE_CHIP_ID_5709_B1: + case BCE_CHIP_ID_5709_B2: + BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", + __FILE__, __LINE__, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + rc = ENODEV; + goto bce_attach_fail; } /* @@ -866,58 +875,67 @@ bce_attach(device_t dev) if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) /* Multi-port devices use different offsets in shared memory. */ sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + - (pci_get_function(sc->bce_dev) << 2)); + (pci_get_function(sc->bce_dev) << 2)); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", - __FUNCTION__, sc->bce_shmem_base); + __FUNCTION__, sc->bce_shmem_base); /* Fetch the bootcode revision. */ - val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); - for (int i = 0, j = 0; i < 3; i++) { - u8 num; - - num = (u8) (val >> (24 - (i * 8))); - for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { - if (num >= k || !skip0 || k == 1) { - sc->bce_bc_ver[j++] = (num / k) + '0'; - skip0 = 0; - } - } - if (i != 2) - sc->bce_bc_ver[j++] = '.'; - } - - /* Check if any management firwmare is running. */ - val = bce_shmem_rd(sc, BCE_PORT_FEATURE); - if (val & BCE_PORT_FEATURE_ASF_ENABLED) { - sc->bce_flags |= BCE_MFW_ENABLE_FLAG; - - /* Allow time for firmware to enter the running state. */ - for (int i = 0; i < 30; i++) { - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - if (val & BCE_CONDITION_MFW_RUN_MASK) - break; - DELAY(10000); - } - } - - /* Check the current bootcode state. */ - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - val &= BCE_CONDITION_MFW_RUN_MASK; - if (val != BCE_CONDITION_MFW_RUN_UNKNOWN && - val != BCE_CONDITION_MFW_RUN_NONE) { - u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); - int i = 0; - - for (int j = 0; j < 3; j++) { - val = bce_reg_rd_ind(sc, addr + j * 4); - val = bswap32(val); - memcpy(&sc->bce_mfw_ver[i], &val, 4); - i += 4; - } - } + val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); + for (int i = 0, j = 0; i < 3; i++) { + u8 num; + + num = (u8) (val >> (24 - (i * 8))); + for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { + if (num >= k || !skip0 || k == 1) { + sc->bce_bc_ver[j++] = (num / k) + '0'; + skip0 = 0; + } + } + + if (i != 2) + sc->bce_bc_ver[j++] = '.'; + } + + /* Check if any management firwmare is enabled. */ + val = bce_shmem_rd(sc, BCE_PORT_FEATURE); + if (val & BCE_PORT_FEATURE_ASF_ENABLED) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + + /* Allow time for firmware to enter the running state. */ + for (int i = 0; i < 30; i++) { + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + if (val & BCE_CONDITION_MFW_RUN_MASK) + break; + DELAY(10000); + } + + /* Check if management firmware is running. */ + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + val &= BCE_CONDITION_MFW_RUN_MASK; + if ((val != BCE_CONDITION_MFW_RUN_UNKNOWN) && + (val != BCE_CONDITION_MFW_RUN_NONE)) { + u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); + int i = 0; + + /* Read the management firmware version string. */ + for (int j = 0; j < 3; j++) { + val = bce_reg_rd_ind(sc, addr + j * 4); + val = bswap32(val); + memcpy(&sc->bce_mfw_ver[i], &val, 4); + i += 4; + } + } else { + /* May cause firmware synchronization timeouts. */ + BCE_PRINTF("%s(%d): Management firmware enabled " + "but not running!\n", __FILE__, __LINE__); + strcpy(sc->bce_mfw_ver, "NOT RUNNING!"); + + /* ToDo: Any action the driver should take? */ + } + } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -964,10 +982,10 @@ bce_attach(device_t dev) if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) sc->bce_flags |= BCE_PCI_32BIT_FLAG; - /* Reset the controller and announce to bootcode that driver is present. */ + /* Reset controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { BCE_PRINTF("%s(%d): Controller reset failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -975,7 +993,7 @@ bce_attach(device_t dev) /* Initialize the controller. */ if (bce_chipinit(sc)) { BCE_PRINTF("%s(%d): Controller initialization failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -983,7 +1001,7 @@ bce_attach(device_t dev) /* Perform NVRAM test. */ if (bce_nvram_test(sc)) { BCE_PRINTF("%s(%d): NVRAM test failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -1024,6 +1042,14 @@ bce_attach(device_t dev) sc->bce_rx_ticks = 18; #endif + /* Not used for L2. */ + sc->bce_comp_prod_trip_int = 0; + sc->bce_comp_prod_trip = 0; + sc->bce_com_ticks_int = 0; + sc->bce_com_ticks = 0; + sc->bce_cmd_ticks_int = 0; + sc->bce_cmd_ticks = 0; + /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; @@ -1507,7 +1533,8 @@ bce_miibus_read_reg(device_t dev, int ph /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY read!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY read!\n", phy); return(0); } @@ -1533,8 +1560,8 @@ bce_miibus_read_reg(device_t dev, int ph val = BCE_MIPHY(phy) | BCE_MIREG(reg) | - BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | - BCE_EMAC_MDIO_COMM_START_BUSY; + BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | + BCE_EMAC_MDIO_COMM_START_BUSY; REG_WR(sc, BCE_EMAC_MDIO_COMM, val); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1552,8 +1579,8 @@ bce_miibus_read_reg(device_t dev, int ph } if (val & BCE_EMAC_MDIO_COMM_START_BUSY) { - BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, reg = 0x%04X\n", - __FILE__, __LINE__, phy, reg); + BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, " + "reg = 0x%04X\n", __FILE__, __LINE__, phy, reg); val = 0x0; } else { val = REG_RD(sc, BCE_EMAC_MDIO_COMM); @@ -1595,17 +1622,18 @@ bce_miibus_write_reg(device_t dev, int p /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY write!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY write!\n", phy); return(0); } DB_PRINT_PHY_REG(reg, val); - /* - * The 5709S PHY is an IEEE Clause 45 PHY - * with special mappings to work with IEEE - * Clause 22 register accesses. - */ + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { if (reg >= MII_BMCR && reg <= MII_ANLPRNP) reg += 0x10; @@ -1622,8 +1650,8 @@ bce_miibus_write_reg(device_t dev, int p } val1 = BCE_MIPHY(phy) | BCE_MIREG(reg) | val | - BCE_EMAC_MDIO_COMM_COMMAND_WRITE | - BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; + BCE_EMAC_MDIO_COMM_COMMAND_WRITE | + BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; REG_WR(sc, BCE_EMAC_MDIO_COMM, val1); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1638,7 +1666,7 @@ bce_miibus_write_reg(device_t dev, int p if (val1 & BCE_EMAC_MDIO_COMM_START_BUSY) BCE_PRINTF("%s(%d): PHY write timeout!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); @@ -2653,18 +2681,22 @@ bce_get_media(struct bce_softc *sc) * for Copper or SerDes operation. */ if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for copper.\n"); goto bce_get_media_exit; } else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for dual media.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; goto bce_get_media_exit; } if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE) - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; else - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; if (pci_get_function(sc->bce_dev) == 0) { switch (strap) { @@ -2672,13 +2704,13 @@ bce_get_media(struct bce_softc *sc) case 0x5: case 0x6: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2686,13 +2718,13 @@ bce_get_media(struct bce_softc *sc) case 0x2: case 0x4: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2703,21 +2735,23 @@ bce_get_media(struct bce_softc *sc) sc->bce_flags |= BCE_NO_WOL_FLAG; - /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) - sc->bce_phy_addr = 2; - - if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + /* 5708S/09S/16S use a separate PHY for SerDes. */ + sc->bce_phy_addr = 2; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { - sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + sc->bce_phy_flags |= + BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb " + "capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) + (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; bce_get_media_exit: @@ -2746,13 +2780,13 @@ bce_init_media(struct bce_softc *sc) * is done in mii layer. */ - /* Select auto-negotiation MMD of the PHY. */ - bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); - /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + /* Set IEEE0 block of AN MMD (assumed in brgphy(4) code). */ bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); } @@ -2778,7 +2812,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the status block. */ if (sc->status_block != NULL) { bus_dmamem_free( - sc->status_tag, + sc->status_tag, sc->status_block, sc->status_map); sc->status_block = NULL; @@ -2786,7 +2820,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->status_map != NULL) { bus_dmamap_unload( - sc->status_tag, + sc->status_tag, sc->status_map); bus_dmamap_destroy(sc->status_tag, sc->status_map); @@ -2802,7 +2836,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the statistics block. */ if (sc->stats_block != NULL) { bus_dmamem_free( - sc->stats_tag, + sc->stats_tag, sc->stats_block, sc->stats_map); sc->stats_block = NULL; @@ -2810,7 +2844,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->stats_map != NULL) { bus_dmamap_unload( - sc->stats_tag, + sc->stats_tag, sc->stats_map); bus_dmamap_destroy(sc->stats_tag, sc->stats_map); @@ -2829,7 +2863,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_block[i], sc->ctx_map[i]); sc->ctx_block[i] = NULL; @@ -2837,10 +2871,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->ctx_map[i] != NULL) { bus_dmamap_unload( - sc->ctx_tag, - sc->ctx_map[i]); + sc->ctx_tag, + sc->ctx_map[i]); bus_dmamap_destroy( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_map[i]); sc->ctx_map[i] = NULL; } @@ -2858,7 +2892,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TX_PAGES; i++ ) { if (sc->tx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain[i], sc->tx_bd_chain_map[i]); sc->tx_bd_chain[i] = NULL; @@ -2866,10 +2900,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->tx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->tx_bd_chain_tag, - sc->tx_bd_chain_map[i]); + sc->tx_bd_chain_tag, + sc->tx_bd_chain_map[i]); bus_dmamap_destroy( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain_map[i]); sc->tx_bd_chain_map[i] = NULL; } @@ -2886,7 +2920,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < RX_PAGES; i++ ) { if (sc->rx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain[i], sc->rx_bd_chain_map[i]); sc->rx_bd_chain[i] = NULL; @@ -2894,10 +2928,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->rx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->rx_bd_chain_tag, - sc->rx_bd_chain_map[i]); + sc->rx_bd_chain_tag, + sc->rx_bd_chain_map[i]); bus_dmamap_destroy( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i]); sc->rx_bd_chain_map[i] = NULL; } @@ -2915,7 +2949,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < PG_PAGES; i++ ) { if (sc->pg_bd_chain[i] != NULL) { bus_dmamem_free( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain[i], sc->pg_bd_chain_map[i]); sc->pg_bd_chain[i] = NULL; @@ -2923,10 +2957,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->pg_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->pg_bd_chain_tag, - sc->pg_bd_chain_map[i]); + sc->pg_bd_chain_tag, + sc->pg_bd_chain_map[i]); bus_dmamap_destroy( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i]); sc->pg_bd_chain_map[i] = NULL; } @@ -2944,9 +2978,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_TX_BD; i++) { if (sc->tx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); bus_dmamap_destroy(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); sc->tx_mbuf_map[i] = NULL; } } @@ -2961,9 +2995,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_RX_BD; i++) { if (sc->rx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); bus_dmamap_destroy(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); sc->rx_mbuf_map[i] = NULL; } } @@ -2979,9 +3013,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_PG_BD; i++) { if (sc->pg_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); bus_dmamap_destroy(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); sc->pg_mbuf_map[i] = NULL; } } @@ -3074,20 +3108,12 @@ bce_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, - 1, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - MAXBSIZE, - BUS_SPACE_UNRESTRICTED, - BUS_SPACE_MAXSIZE_32BIT, - 0, - NULL, NULL, - &sc->parent_tag)) { + if (bus_dma_tag_create(NULL, 1, BCE_DMA_BOUNDARY, + sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, + MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT, + 0, NULL, NULL, &sc->parent_tag)) { BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } @@ -3097,117 +3123,89 @@ bce_dma_alloc(device_t dev) * memory, map the memory into DMA space, and fetch the physical * address of the block. */ - if (bus_dma_tag_create(sc->parent_tag, - BCE_DMA_ALIGN, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - BCE_STATUS_BLK_SZ, - 1, - BCE_STATUS_BLK_SZ, - 0, - NULL, NULL, - &sc->status_tag)) { - BCE_PRINTF("%s(%d): Could not allocate status block DMA tag!\n", - __FILE__, __LINE__); + if (bus_dma_tag_create(sc->parent_tag, BCE_DMA_ALIGN, + BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:31:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2F11065672; Thu, 15 Apr 2010 19:31:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 594CF8FC29; Thu, 15 Apr 2010 19:31: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 o3FJVLgH096539; Thu, 15 Apr 2010 19:31:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJVLgF096536; Thu, 15 Apr 2010 19:31:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004151931.o3FJVLgF096536@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Apr 2010 19:31:21 +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: r206683 - stable/7/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:31:21 -0000 Author: yongari Date: Thu Apr 15 19:31:21 2010 New Revision: 206683 URL: http://svn.freebsd.org/changeset/base/206683 Log: MFC r206268 - Fixed 5708S 2.5G support broken in last commit. - Added some new debug helper routines to systcl. - Fixed many of the style(9) violations that have crept into the code due to my use of a "smart" editor. Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.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/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:29:56 2010 (r206682) +++ stable/7/sys/dev/bce/if_bce.c Thu Apr 15 19:31:21 2010 (r206683) @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); * BCM5708S B1, B2 * BCM5709C A1, C0 * BCM5709S A1, C0 - * BCM5716C C0 - * BCM5716S C0 + * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -277,37 +277,41 @@ static struct flash_spec flash_5709 = { /****************************************************************************/ /* FreeBSD device entry points. */ /****************************************************************************/ -static int bce_probe (device_t); -static int bce_attach (device_t); -static int bce_detach (device_t); -static int bce_shutdown (device_t); +static int bce_probe (device_t); +static int bce_attach (device_t); +static int bce_detach (device_t); +static int bce_shutdown (device_t); /****************************************************************************/ /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG -static u32 bce_reg_rd (struct bce_softc *, u32); -static void bce_reg_wr (struct bce_softc *, u32, u32); -static void bce_reg_wr16 (struct bce_softc *, u32, u16); -static u32 bce_ctx_rd (struct bce_softc *, u32, u32); -static void bce_dump_enet (struct bce_softc *, struct mbuf *); -static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); +static u32 bce_reg_rd (struct bce_softc *, u32); +static void bce_reg_wr (struct bce_softc *, u32, u32); +static void bce_reg_wr16 (struct bce_softc *, u32, u16); +static u32 bce_ctx_rd (struct bce_softc *, u32, u32); +static void bce_dump_enet (struct bce_softc *, struct mbuf *); +static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); #endif -static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); -static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_txbd (struct bce_softc *, + int, struct tx_bd *); +static void bce_dump_rxbd (struct bce_softc *, + int, struct rx_bd *); #ifdef BCE_JUMBO_HDRSPLIT -static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); +static void bce_dump_pgbd (struct bce_softc *, + int, struct rx_bd *); #endif -static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_ctx (struct bce_softc *, u16); -static void bce_dump_ftqs (struct bce_softc *); +static void bce_dump_l2fhdr (struct bce_softc *, + int, struct l2_fhdr *); +static void bce_dump_ctx (struct bce_softc *, u16); +static void bce_dump_ftqs (struct bce_softc *); static void bce_dump_tx_chain (struct bce_softc *, u16, int); -static void bce_dump_rx_chain (struct bce_softc *, u16, int); +static void bce_dump_rx_bd_chain (struct bce_softc *, u16, int); #ifdef BCE_JUMBO_HDRSPLIT static void bce_dump_pg_chain (struct bce_softc *, u16, int); #endif @@ -315,7 +319,7 @@ static void bce_dump_status_block (struc static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); -static void bce_dump_mq_regs (struct bce_softc *); +static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); static void bce_dump_txp_state (struct bce_softc *, int); static void bce_dump_rxp_state (struct bce_softc *, int); @@ -323,18 +327,18 @@ static void bce_dump_tpat_state (struct static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); static void bce_dump_rv2p_state (struct bce_softc *); -static void bce_breakpoint (struct bce_softc *); +static void bce_breakpoint (struct bce_softc *); #endif /****************************************************************************/ /* BCE Register/Memory Access Routines */ /****************************************************************************/ -static u32 bce_reg_rd_ind (struct bce_softc *, u32); -static void bce_reg_wr_ind (struct bce_softc *, u32, u32); -static void bce_shmem_wr (struct bce_softc *, u32, u32); -static u32 bce_shmem_rd (struct bce_softc *, u32); -static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); +static u32 bce_reg_rd_ind (struct bce_softc *, u32); +static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_shmem_wr (struct bce_softc *, u32, u32); +static u32 bce_shmem_rd (struct bce_softc *, u32); +static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); static int bce_miibus_read_reg (device_t, int, int); static int bce_miibus_write_reg (device_t, int, int, int); static void bce_miibus_statchg (device_t); @@ -346,96 +350,101 @@ static void bce_miibus_statchg (device_ static int bce_acquire_nvram_lock (struct bce_softc *); static int bce_release_nvram_lock (struct bce_softc *); static void bce_enable_nvram_access (struct bce_softc *); -static void bce_disable_nvram_access(struct bce_softc *); +static void bce_disable_nvram_access (struct bce_softc *); static int bce_nvram_read_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_init_nvram (struct bce_softc *); -static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); -static int bce_nvram_test (struct bce_softc *); +static int bce_init_nvram (struct bce_softc *); +static int bce_nvram_read (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_test (struct bce_softc *); #ifdef BCE_NVRAM_WRITE_SUPPORT static int bce_enable_nvram_write (struct bce_softc *); static void bce_disable_nvram_write (struct bce_softc *); static int bce_nvram_erase_page (struct bce_softc *, u32); static int bce_nvram_write_dword (struct bce_softc *, u32, u8 *, u32); -static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); +static int bce_nvram_write (struct bce_softc *, u32, u8 *, int); #endif /****************************************************************************/ /* */ /****************************************************************************/ -static void bce_get_media (struct bce_softc *); -static void bce_init_media (struct bce_softc *); -static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); -static int bce_dma_alloc (device_t); -static void bce_dma_free (struct bce_softc *); +static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); +static void bce_dma_map_addr (void *, + bus_dma_segment_t *, int, int); +static int bce_dma_alloc (device_t); +static void bce_dma_free (struct bce_softc *); static void bce_release_resources (struct bce_softc *); /****************************************************************************/ /* BCE Firmware Synchronization and Load */ /****************************************************************************/ -static int bce_fw_sync (struct bce_softc *, u32); +static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); -static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); -static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); -static void bce_start_rxp_cpu (struct bce_softc *); +static void bce_load_cpu_fw (struct bce_softc *, + struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); -static void bce_init_cp_cpu (struct bce_softc *); +static void bce_init_cp_cpu (struct bce_softc *); static void bce_init_com_cpu (struct bce_softc *); -static void bce_init_cpus (struct bce_softc *); +static void bce_init_cpus (struct bce_softc *); static void bce_print_adapter_info (struct bce_softc *); static void bce_probe_pci_caps (device_t, struct bce_softc *); -static void bce_stop (struct bce_softc *); -static int bce_reset (struct bce_softc *, u32); -static int bce_chipinit (struct bce_softc *); -static int bce_blockinit (struct bce_softc *); +static void bce_stop (struct bce_softc *); +static int bce_reset (struct bce_softc *, u32); +static int bce_chipinit (struct bce_softc *); +static int bce_blockinit (struct bce_softc *); static int bce_init_tx_chain (struct bce_softc *); static void bce_free_tx_chain (struct bce_softc *); -static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); +static int bce_get_rx_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); #ifdef BCE_JUMBO_HDRSPLIT -static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); +static int bce_get_pg_buf (struct bce_softc *, + struct mbuf *, u16 *, u16 *); static int bce_init_pg_chain (struct bce_softc *); static void bce_fill_pg_chain (struct bce_softc *); static void bce_free_pg_chain (struct bce_softc *); #endif -static struct mbuf *bce_tso_setup (struct bce_softc *, struct mbuf **, u16 *); -static int bce_tx_encap (struct bce_softc *, struct mbuf **); +static struct mbuf *bce_tso_setup (struct bce_softc *, + struct mbuf **, u16 *); +static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); -static void bce_start (struct ifnet *); -static int bce_ioctl (struct ifnet *, u_long, caddr_t); -static void bce_watchdog (struct bce_softc *); -static int bce_ifmedia_upd (struct ifnet *); +static void bce_start (struct ifnet *); +static int bce_ioctl (struct ifnet *, u_long, caddr_t); +static void bce_watchdog (struct bce_softc *); +static int bce_ifmedia_upd (struct ifnet *); static void bce_ifmedia_upd_locked (struct ifnet *); -static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static void bce_init_locked (struct bce_softc *); -static void bce_init (void *); +static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_init_locked (struct bce_softc *); +static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_ctx (struct bce_softc *); +static void bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); -static void bce_phy_intr (struct bce_softc *); -static inline u16 bce_get_hw_rx_cons(struct bce_softc *); -static void bce_rx_intr (struct bce_softc *); -static void bce_tx_intr (struct bce_softc *); +static void bce_phy_intr (struct bce_softc *); +static inline u16 bce_get_hw_rx_cons (struct bce_softc *); +static void bce_rx_intr (struct bce_softc *); +static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); -static void bce_enable_intr (struct bce_softc *, int); +static void bce_enable_intr (struct bce_softc *, int); -static void bce_intr (void *); -static void bce_set_rx_mode (struct bce_softc *); +static void bce_intr (void *); +static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); -static void bce_tick (void *); -static void bce_pulse (void *); -static void bce_add_sysctls (struct bce_softc *); +static void bce_tick (void *); +static void bce_pulse (void *); +static void bce_add_sysctls (struct bce_softc *); /****************************************************************************/ @@ -540,15 +549,15 @@ bce_probe(device_t dev) sdid = pci_get_subdevice(dev); DBPRINT(sc, BCE_EXTREME_LOAD, - "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " - "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); + "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " + "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); /* Look through the list of known devices for a match. */ while(t->bce_name != NULL) { if ((vid == t->bce_vid) && (did == t->bce_did) && - ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && - ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { + ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && + ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT); @@ -557,8 +566,8 @@ bce_probe(device_t dev) /* Print out the device identity. */ snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", - t->bce_name, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + t->bce_name, (((pci_read_config(dev, + PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); device_set_desc_copy(dev, descbuf); @@ -590,21 +599,21 @@ bce_print_adapter_info(struct bce_softc BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); /* Bus info. */ if (sc->bce_flags & BCE_PCIE_FLAG) { printf("Bus (PCIe x%d, ", sc->link_width); switch (sc->link_speed) { - case 1: printf("2.5Gbps); "); break; - case 2: printf("5Gbps); "); break; - default: printf("Unknown link speed); "); + case 1: printf("2.5Gbps); "); break; + case 2: printf("5Gbps); "); break; + default: printf("Unknown link speed); "); } } else { printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? + "32-bit" : "64-bit"), sc->bus_speed_mhz); } /* Firmware version and device features. */ @@ -612,30 +621,30 @@ bce_print_adapter_info(struct bce_softc #ifdef BCE_JUMBO_HDRSPLIT printf("SPLT"); - i++; + i++; #endif - if (sc->bce_flags & BCE_USING_MSI_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSI_FLAG) { + if (i > 0) printf("|"); printf("MSI"); i++; - } + } - if (sc->bce_flags & BCE_USING_MSIX_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_flags & BCE_USING_MSIX_FLAG) { + if (i > 0) printf("|"); printf("MSI-X"); i++; - } + } - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { - if (i > 0) printf("|"); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { + if (i > 0) printf("|"); printf("2.5G"); i++; - } + } - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { - if (i > 0) printf("|"); - printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); - } else { - printf(")\n"); - } + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + if (i > 0) printf("|"); + printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); + } else { + printf(")\n"); + } DBEXIT(BCE_VERBOSE_LOAD); } @@ -667,8 +676,8 @@ bce_probe_pci_caps(device_t dev, struct if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { if (reg != 0) { u16 link_status = pci_read_config(dev, reg + 0x12, 2); - DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", - link_status); + DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = " + "0x%08X\n", link_status); sc->link_speed = link_status & 0xf; sc->link_width = (link_status >> 4) & 0x3f; sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; @@ -730,7 +739,7 @@ bce_attach(device_t dev) if (sc->bce_res_mem == NULL) { BCE_PRINTF("%s(%d): PCI memory allocation failed\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -801,14 +810,14 @@ bce_attach(device_t dev) } sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &rid, RF_SHAREABLE | RF_ACTIVE); + &rid, RF_SHAREABLE | RF_ACTIVE); sc->bce_irq_rid = rid; /* Report any IRQ allocation errors. */ if (sc->bce_res_irq == NULL) { BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -823,28 +832,28 @@ bce_attach(device_t dev) * valid until this is done. */ pci_write_config(dev, BCE_PCICFG_MISC_CONFIG, - BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | - BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); + BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | + BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4); /* Save ASIC revsion info. */ sc->bce_chipid = REG_RD(sc, BCE_MISC_ID); /* Weed out any non-production controller revisions. */ switch(BCE_CHIP_ID(sc)) { - case BCE_CHIP_ID_5706_A0: - case BCE_CHIP_ID_5706_A1: - case BCE_CHIP_ID_5708_A0: - case BCE_CHIP_ID_5708_B0: - case BCE_CHIP_ID_5709_A0: - case BCE_CHIP_ID_5709_B0: - case BCE_CHIP_ID_5709_B1: - case BCE_CHIP_ID_5709_B2: - BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", - __FILE__, __LINE__, - (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), - (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); - rc = ENODEV; - goto bce_attach_fail; + case BCE_CHIP_ID_5706_A0: + case BCE_CHIP_ID_5706_A1: + case BCE_CHIP_ID_5708_A0: + case BCE_CHIP_ID_5708_B0: + case BCE_CHIP_ID_5709_A0: + case BCE_CHIP_ID_5709_B0: + case BCE_CHIP_ID_5709_B1: + case BCE_CHIP_ID_5709_B2: + BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", + __FILE__, __LINE__, + (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), + (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); + rc = ENODEV; + goto bce_attach_fail; } /* @@ -866,58 +875,67 @@ bce_attach(device_t dev) if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) /* Multi-port devices use different offsets in shared memory. */ sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + - (pci_get_function(sc->bce_dev) << 2)); + (pci_get_function(sc->bce_dev) << 2)); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", - __FUNCTION__, sc->bce_shmem_base); + __FUNCTION__, sc->bce_shmem_base); /* Fetch the bootcode revision. */ - val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); - for (int i = 0, j = 0; i < 3; i++) { - u8 num; - - num = (u8) (val >> (24 - (i * 8))); - for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { - if (num >= k || !skip0 || k == 1) { - sc->bce_bc_ver[j++] = (num / k) + '0'; - skip0 = 0; - } - } - if (i != 2) - sc->bce_bc_ver[j++] = '.'; - } - - /* Check if any management firwmare is running. */ - val = bce_shmem_rd(sc, BCE_PORT_FEATURE); - if (val & BCE_PORT_FEATURE_ASF_ENABLED) { - sc->bce_flags |= BCE_MFW_ENABLE_FLAG; - - /* Allow time for firmware to enter the running state. */ - for (int i = 0; i < 30; i++) { - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - if (val & BCE_CONDITION_MFW_RUN_MASK) - break; - DELAY(10000); - } - } - - /* Check the current bootcode state. */ - val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); - val &= BCE_CONDITION_MFW_RUN_MASK; - if (val != BCE_CONDITION_MFW_RUN_UNKNOWN && - val != BCE_CONDITION_MFW_RUN_NONE) { - u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); - int i = 0; - - for (int j = 0; j < 3; j++) { - val = bce_reg_rd_ind(sc, addr + j * 4); - val = bswap32(val); - memcpy(&sc->bce_mfw_ver[i], &val, 4); - i += 4; - } - } + val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); + for (int i = 0, j = 0; i < 3; i++) { + u8 num; + + num = (u8) (val >> (24 - (i * 8))); + for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { + if (num >= k || !skip0 || k == 1) { + sc->bce_bc_ver[j++] = (num / k) + '0'; + skip0 = 0; + } + } + + if (i != 2) + sc->bce_bc_ver[j++] = '.'; + } + + /* Check if any management firwmare is enabled. */ + val = bce_shmem_rd(sc, BCE_PORT_FEATURE); + if (val & BCE_PORT_FEATURE_ASF_ENABLED) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + + /* Allow time for firmware to enter the running state. */ + for (int i = 0; i < 30; i++) { + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + if (val & BCE_CONDITION_MFW_RUN_MASK) + break; + DELAY(10000); + } + + /* Check if management firmware is running. */ + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + val &= BCE_CONDITION_MFW_RUN_MASK; + if ((val != BCE_CONDITION_MFW_RUN_UNKNOWN) && + (val != BCE_CONDITION_MFW_RUN_NONE)) { + u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); + int i = 0; + + /* Read the management firmware version string. */ + for (int j = 0; j < 3; j++) { + val = bce_reg_rd_ind(sc, addr + j * 4); + val = bswap32(val); + memcpy(&sc->bce_mfw_ver[i], &val, 4); + i += 4; + } + } else { + /* May cause firmware synchronization timeouts. */ + BCE_PRINTF("%s(%d): Management firmware enabled " + "but not running!\n", __FILE__, __LINE__); + strcpy(sc->bce_mfw_ver, "NOT RUNNING!"); + + /* ToDo: Any action the driver should take? */ + } + } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -964,10 +982,10 @@ bce_attach(device_t dev) if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) sc->bce_flags |= BCE_PCI_32BIT_FLAG; - /* Reset the controller and announce to bootcode that driver is present. */ + /* Reset controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { BCE_PRINTF("%s(%d): Controller reset failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -975,7 +993,7 @@ bce_attach(device_t dev) /* Initialize the controller. */ if (bce_chipinit(sc)) { BCE_PRINTF("%s(%d): Controller initialization failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -983,7 +1001,7 @@ bce_attach(device_t dev) /* Perform NVRAM test. */ if (bce_nvram_test(sc)) { BCE_PRINTF("%s(%d): NVRAM test failed!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; } @@ -1024,6 +1042,14 @@ bce_attach(device_t dev) sc->bce_rx_ticks = 18; #endif + /* Not used for L2. */ + sc->bce_comp_prod_trip_int = 0; + sc->bce_comp_prod_trip = 0; + sc->bce_com_ticks_int = 0; + sc->bce_com_ticks = 0; + sc->bce_cmd_ticks_int = 0; + sc->bce_cmd_ticks = 0; + /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; @@ -1507,7 +1533,8 @@ bce_miibus_read_reg(device_t dev, int ph /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY read!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY read!\n", phy); return(0); } @@ -1533,8 +1560,8 @@ bce_miibus_read_reg(device_t dev, int ph val = BCE_MIPHY(phy) | BCE_MIREG(reg) | - BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | - BCE_EMAC_MDIO_COMM_START_BUSY; + BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT | + BCE_EMAC_MDIO_COMM_START_BUSY; REG_WR(sc, BCE_EMAC_MDIO_COMM, val); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1552,8 +1579,8 @@ bce_miibus_read_reg(device_t dev, int ph } if (val & BCE_EMAC_MDIO_COMM_START_BUSY) { - BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, reg = 0x%04X\n", - __FILE__, __LINE__, phy, reg); + BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, " + "reg = 0x%04X\n", __FILE__, __LINE__, phy, reg); val = 0x0; } else { val = REG_RD(sc, BCE_EMAC_MDIO_COMM); @@ -1595,17 +1622,18 @@ bce_miibus_write_reg(device_t dev, int p /* Make sure we are accessing the correct PHY address. */ if (phy != sc->bce_phy_addr) { - DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY write!\n", phy); + DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d " + "for PHY write!\n", phy); return(0); } DB_PRINT_PHY_REG(reg, val); - /* - * The 5709S PHY is an IEEE Clause 45 PHY - * with special mappings to work with IEEE - * Clause 22 register accesses. - */ + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { if (reg >= MII_BMCR && reg <= MII_ANLPRNP) reg += 0x10; @@ -1622,8 +1650,8 @@ bce_miibus_write_reg(device_t dev, int p } val1 = BCE_MIPHY(phy) | BCE_MIREG(reg) | val | - BCE_EMAC_MDIO_COMM_COMMAND_WRITE | - BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; + BCE_EMAC_MDIO_COMM_COMMAND_WRITE | + BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT; REG_WR(sc, BCE_EMAC_MDIO_COMM, val1); for (i = 0; i < BCE_PHY_TIMEOUT; i++) { @@ -1638,7 +1666,7 @@ bce_miibus_write_reg(device_t dev, int p if (val1 & BCE_EMAC_MDIO_COMM_START_BUSY) BCE_PRINTF("%s(%d): PHY write timeout!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); @@ -2653,18 +2681,22 @@ bce_get_media(struct bce_softc *sc) * for Copper or SerDes operation. */ if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for copper.\n"); goto bce_get_media_exit; } else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) { - DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n"); + DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded " + "for dual media.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; goto bce_get_media_exit; } if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE) - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21; else - strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; + strap = (val & + BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8; if (pci_get_function(sc->bce_dev) == 0) { switch (strap) { @@ -2672,13 +2704,13 @@ bce_get_media(struct bce_softc *sc) case 0x5: case 0x6: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2686,13 +2718,13 @@ bce_get_media(struct bce_softc *sc) case 0x2: case 0x4: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for SerDes.\n"); + "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - break; + break; default: DBPRINT(sc, BCE_INFO_LOAD, - "BCM5709 s/w configured for Copper.\n"); - break; + "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2703,21 +2735,23 @@ bce_get_media(struct bce_softc *sc) sc->bce_flags |= BCE_NO_WOL_FLAG; - /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) - sc->bce_phy_addr = 2; - - if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + /* 5708S/09S/16S use a separate PHY for SerDes. */ + sc->bce_phy_addr = 2; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { - sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + sc->bce_phy_flags |= + BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb " + "capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) + (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; bce_get_media_exit: @@ -2746,13 +2780,13 @@ bce_init_media(struct bce_softc *sc) * is done in mii layer. */ - /* Select auto-negotiation MMD of the PHY. */ - bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); - /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + /* Set IEEE0 block of AN MMD (assumed in brgphy(4) code). */ bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); } @@ -2778,7 +2812,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the status block. */ if (sc->status_block != NULL) { bus_dmamem_free( - sc->status_tag, + sc->status_tag, sc->status_block, sc->status_map); sc->status_block = NULL; @@ -2786,7 +2820,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->status_map != NULL) { bus_dmamap_unload( - sc->status_tag, + sc->status_tag, sc->status_map); bus_dmamap_destroy(sc->status_tag, sc->status_map); @@ -2802,7 +2836,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap, and destroy the statistics block. */ if (sc->stats_block != NULL) { bus_dmamem_free( - sc->stats_tag, + sc->stats_tag, sc->stats_block, sc->stats_map); sc->stats_block = NULL; @@ -2810,7 +2844,7 @@ bce_dma_free(struct bce_softc *sc) if (sc->stats_map != NULL) { bus_dmamap_unload( - sc->stats_tag, + sc->stats_tag, sc->stats_map); bus_dmamap_destroy(sc->stats_tag, sc->stats_map); @@ -2829,7 +2863,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_block[i], sc->ctx_map[i]); sc->ctx_block[i] = NULL; @@ -2837,10 +2871,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->ctx_map[i] != NULL) { bus_dmamap_unload( - sc->ctx_tag, - sc->ctx_map[i]); + sc->ctx_tag, + sc->ctx_map[i]); bus_dmamap_destroy( - sc->ctx_tag, + sc->ctx_tag, sc->ctx_map[i]); sc->ctx_map[i] = NULL; } @@ -2858,7 +2892,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TX_PAGES; i++ ) { if (sc->tx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain[i], sc->tx_bd_chain_map[i]); sc->tx_bd_chain[i] = NULL; @@ -2866,10 +2900,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->tx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->tx_bd_chain_tag, - sc->tx_bd_chain_map[i]); + sc->tx_bd_chain_tag, + sc->tx_bd_chain_map[i]); bus_dmamap_destroy( - sc->tx_bd_chain_tag, + sc->tx_bd_chain_tag, sc->tx_bd_chain_map[i]); sc->tx_bd_chain_map[i] = NULL; } @@ -2886,7 +2920,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < RX_PAGES; i++ ) { if (sc->rx_bd_chain[i] != NULL) { bus_dmamem_free( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain[i], sc->rx_bd_chain_map[i]); sc->rx_bd_chain[i] = NULL; @@ -2894,10 +2928,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->rx_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->rx_bd_chain_tag, - sc->rx_bd_chain_map[i]); + sc->rx_bd_chain_tag, + sc->rx_bd_chain_map[i]); bus_dmamap_destroy( - sc->rx_bd_chain_tag, + sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i]); sc->rx_bd_chain_map[i] = NULL; } @@ -2915,7 +2949,7 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < PG_PAGES; i++ ) { if (sc->pg_bd_chain[i] != NULL) { bus_dmamem_free( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain[i], sc->pg_bd_chain_map[i]); sc->pg_bd_chain[i] = NULL; @@ -2923,10 +2957,10 @@ bce_dma_free(struct bce_softc *sc) if (sc->pg_bd_chain_map[i] != NULL) { bus_dmamap_unload( - sc->pg_bd_chain_tag, - sc->pg_bd_chain_map[i]); + sc->pg_bd_chain_tag, + sc->pg_bd_chain_map[i]); bus_dmamap_destroy( - sc->pg_bd_chain_tag, + sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i]); sc->pg_bd_chain_map[i] = NULL; } @@ -2944,9 +2978,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_TX_BD; i++) { if (sc->tx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); bus_dmamap_destroy(sc->tx_mbuf_tag, - sc->tx_mbuf_map[i]); + sc->tx_mbuf_map[i]); sc->tx_mbuf_map[i] = NULL; } } @@ -2961,9 +2995,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_RX_BD; i++) { if (sc->rx_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); bus_dmamap_destroy(sc->rx_mbuf_tag, - sc->rx_mbuf_map[i]); + sc->rx_mbuf_map[i]); sc->rx_mbuf_map[i] = NULL; } } @@ -2979,9 +3013,9 @@ bce_dma_free(struct bce_softc *sc) for (i = 0; i < TOTAL_PG_BD; i++) { if (sc->pg_mbuf_map[i] != NULL) { bus_dmamap_unload(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); bus_dmamap_destroy(sc->pg_mbuf_tag, - sc->pg_mbuf_map[i]); + sc->pg_mbuf_map[i]); sc->pg_mbuf_map[i] = NULL; } } @@ -3074,20 +3108,12 @@ bce_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, - 1, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - MAXBSIZE, - BUS_SPACE_UNRESTRICTED, - BUS_SPACE_MAXSIZE_32BIT, - 0, - NULL, NULL, - &sc->parent_tag)) { + if (bus_dma_tag_create(NULL, 1, BCE_DMA_BOUNDARY, + sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, + MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT, + 0, NULL, NULL, &sc->parent_tag)) { BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n", - __FILE__, __LINE__); + __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } @@ -3097,117 +3123,89 @@ bce_dma_alloc(device_t dev) * memory, map the memory into DMA space, and fetch the physical * address of the block. */ - if (bus_dma_tag_create(sc->parent_tag, - BCE_DMA_ALIGN, - BCE_DMA_BOUNDARY, - sc->max_bus_addr, - BUS_SPACE_MAXADDR, - NULL, NULL, - BCE_STATUS_BLK_SZ, - 1, - BCE_STATUS_BLK_SZ, - 0, - NULL, NULL, - &sc->status_tag)) { - BCE_PRINTF("%s(%d): Could not allocate status block DMA tag!\n", - __FILE__, __LINE__); + if (bus_dma_tag_create(sc->parent_tag, BCE_DMA_ALIGN, + BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 19:45:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7F01106564A; Thu, 15 Apr 2010 19:45:03 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE2608FC15; Thu, 15 Apr 2010 19:45: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 o3FJj3Jv099612; Thu, 15 Apr 2010 19:45:03 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FJj3fO099609; Thu, 15 Apr 2010 19:45:03 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004151945.o3FJj3fO099609@svn.freebsd.org> From: Fabien Thomas Date: Thu, 15 Apr 2010 19:45: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: r206684 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 19:45:04 -0000 Author: fabient Date: Thu Apr 15 19:45:03 2010 New Revision: 206684 URL: http://svn.freebsd.org/changeset/base/206684 Log: - Fix a typo OFFCORE_REQUESTS.ANY.RFO is B0H10H and not 80H10H. - Enable missing PARTIAL_ADDRESS_ALIAS for Core i7. MFC after: 3 days Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Thu Apr 15 19:31:21 2010 (r206683) +++ head/sys/dev/hwpmc/hwpmc_core.c Thu Apr 15 19:45:03 2010 (r206684) @@ -603,7 +603,7 @@ static struct iap_event_descr iap_events IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM), + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), @@ -1053,6 +1053,7 @@ static struct iap_event_descr iap_events IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Thu Apr 15 19:31:21 2010 (r206683) +++ head/sys/dev/hwpmc/pmc_events.h Thu Apr 15 19:45:03 2010 (r206684) @@ -2207,7 +2207,7 @@ __PMC_EV_ALIAS("OFFCORE_REQUESTS.DEMAND. __PMC_EV_ALIAS("OFFCORE_REQUESTS.DEMAND.READ_CODE", IAP_EVENT_B0H_02H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS.DEMAND.RFO", IAP_EVENT_B0H_04H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY.READ", IAP_EVENT_B0H_08H) \ -__PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY.RFO", IAP_EVENT_80H_10H) \ +__PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY.RFO", IAP_EVENT_B0H_10H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS.L1D_WRITEBACK", IAP_EVENT_B0H_40H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS.ANY", IAP_EVENT_B0H_80H) \ __PMC_EV_ALIAS("UOPS_EXECUTED.PORT0", IAP_EVENT_B1H_01H) \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 21:18:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85488106566B; Thu, 15 Apr 2010 21:18:24 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 762598FC08; Thu, 15 Apr 2010 21:18: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 o3FLIOMJ020561; Thu, 15 Apr 2010 21:18:24 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FLIOWJ020559; Thu, 15 Apr 2010 21:18:24 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004152118.o3FLIOWJ020559@svn.freebsd.org> From: Doug Barton Date: Thu, 15 Apr 2010 21:18: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: r206686 - 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: Thu, 15 Apr 2010 21:18:24 -0000 Author: dougb Date: Thu Apr 15 21:18:24 2010 New Revision: 206686 URL: http://svn.freebsd.org/changeset/base/206686 Log: If a service is running, make 'stop' work even if ${name}_enable is not set. PR: conf/130414 Submitted by: Dominic Fandrey Reviewed by: freebsd-rc@ Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Thu Apr 15 20:48:57 2010 (r206685) +++ head/etc/rc.subr Thu Apr 15 21:18:24 2010 (r206686) @@ -646,12 +646,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 Thu Apr 15 21:27:35 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAEA106566B; Thu, 15 Apr 2010 21:27:35 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id E82C98FC14; Thu, 15 Apr 2010 21:27:34 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o3FLRYl1017309; Thu, 15 Apr 2010 17:27:34 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o3FLRYXR017308; Thu, 15 Apr 2010 17:27:34 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 15 Apr 2010 17:27:34 -0400 From: David Schultz To: Juli Mallett Message-ID: <20100415212734.GA17239@zim.MIT.EDU> Mail-Followup-To: Juli Mallett , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201003310212.o2V2CO7b063419@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003310212.o2V2CO7b063419@svn.freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r205954 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 21:27:35 -0000 On Wed, Mar 31, 2010, Juli Mallett wrote: > Be like stdlib.h and bring in a wchar_t definition and use it to prototype > wcstoimax and wcstoumax, rather than spelling it __wchar_t. This is necessary > to use these functions in C++ where wchar_t is different to __wchar_t and is > a built-in type. I don't think this change is correct for C mode. POSIX says wchar_t is *supposed* to be defined by stdlib.h and wchar.h, but its definition is namespace pollution elsewhere. > It may be better to use __wchar_t here and to simply define __wchar_t as being > wchar_t in C++ mode rather than to bring in wchar_t That may be better. From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 21:41:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1D361065670; Thu, 15 Apr 2010 21:41:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 837488FC21; Thu, 15 Apr 2010 21:41: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 o3FLf7cJ025587; Thu, 15 Apr 2010 21:41:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FLf7WX025585; Thu, 15 Apr 2010 21:41:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004152141.o3FLf7WX025585@svn.freebsd.org> From: Andriy Gapon Date: Thu, 15 Apr 2010 21:41: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: r206687 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Apr 2010 21:41:07 -0000 Author: avg Date: Thu Apr 15 21:41:07 2010 New Revision: 206687 URL: http://svn.freebsd.org/changeset/base/206687 Log: indent(1): don't treat bare '_t' as a type name when -ta is used It seems that identifier "_t" is sometimes used as a variable name, even in our tree. Not that I endorse that, but still it's better to require at least one character before _t suffix to consider an identifier to be a type name. Reported by: Alex Vasylenko MFC after: 1 week Modified: head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/lexi.c ============================================================================== --- head/usr.bin/indent/lexi.c Thu Apr 15 21:18:24 2010 (r206686) +++ head/usr.bin/indent/lexi.c Thu Apr 15 21:41:07 2010 (r206687) @@ -251,9 +251,10 @@ lexi(void) if (auto_typedefs) { const char *q = s_token; + size_t q_len = strlen(q); /* Check if we have an "_t" in the end */ - if (q[0] && q[1] && - (strcmp(q + strlen(q) - 2, "_t") == 0)) { + if (q_len > 2 && + (strcmp(q + q_len - 2, "_t") == 0)) { ps.its_a_keyword = true; ps.last_u_d = true; goto found_auto_typedef; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 22:57:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF0731065672; Thu, 15 Apr 2010 22:57:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF5098FC15; Thu, 15 Apr 2010 22:57: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 o3FMvUgw042713; Thu, 15 Apr 2010 22:57:30 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FMvUqC042707; Thu, 15 Apr 2010 22:57:30 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004152257.o3FMvUqC042707@svn.freebsd.org> From: Rick Macklem Date: Thu, 15 Apr 2010 22:57: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: r206688 - in head/sys/fs: nfs 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, 15 Apr 2010 22:57:31 -0000 Author: rmacklem Date: Thu Apr 15 22:57:30 2010 New Revision: 206688 URL: http://svn.freebsd.org/changeset/base/206688 Log: The experimental NFS client was not filling in recovery credentials for opens done locally in the client when a delegation for the file was held. This could cause the client to crash in crsetgroups() when recovering from a server crash/reboot. This patch fills in the recovery credentials for this case, in order to avoid the client crash. Also, add KASSERT()s to the credential copy functions, to catch any other cases where the credentials aren't filled in correctly. MFC after: 1 week Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfsclstate.h head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Thu Apr 15 21:41:07 2010 (r206687) +++ head/sys/fs/nfs/nfs_commonport.c Thu Apr 15 22:57:30 2010 (r206688) @@ -225,6 +225,8 @@ void newnfs_copycred(struct nfscred *nfscr, struct ucred *cr) { + KASSERT(nfscr->nfsc_ngroups >= 0, + ("newnfs_copycred: negative nfsc_ngroups")); cr->cr_uid = nfscr->nfsc_uid; crsetgroups(cr, nfscr->nfsc_ngroups, nfscr->nfsc_groups); } Modified: head/sys/fs/nfs/nfsclstate.h ============================================================================== --- head/sys/fs/nfs/nfsclstate.h Thu Apr 15 21:41:07 2010 (r206687) +++ head/sys/fs/nfs/nfsclstate.h Thu Apr 15 22:57:30 2010 (r206688) @@ -140,6 +140,7 @@ struct nfsclopen { #define NFSCLOPEN_OK 0 #define NFSCLOPEN_DOOPEN 1 #define NFSCLOPEN_DOOPENDOWNGRADE 2 +#define NFSCLOPEN_SETCRED 3 struct nfscllockowner { LIST_ENTRY(nfscllockowner) nfsl_list; Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Apr 15 21:41:07 2010 (r206687) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Apr 15 22:57:30 2010 (r206688) @@ -978,6 +978,8 @@ newnfs_copyincred(struct ucred *cr, stru { int i; + KASSERT(cr->cr_ngroups >= 0, + ("newnfs_copyincred: negative cr_ngroups")); nfscr->nfsc_uid = cr->cr_uid; nfscr->nfsc_ngroups = MIN(cr->cr_ngroups, NFS_MAXGRPS + 1); for (i = 0; i < nfscr->nfsc_ngroups; i++) Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 15 21:41:07 2010 (r206687) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 15 22:57:30 2010 (r206688) @@ -278,7 +278,13 @@ else printf(" fhl=0\n"); error = EIO; } newnfs_copyincred(cred, &op->nfso_cred); - } + } else if (ret == NFSCLOPEN_SETCRED) + /* + * This is a new local open on a delegation. It needs + * to have credentials so that an open can be done + * against the server during recovery. + */ + newnfs_copyincred(cred, &op->nfso_cred); /* * nfso_opencnt is the count of how many VOP_OPEN()s have Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 15 21:41:07 2010 (r206687) +++ head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 15 22:57:30 2010 (r206688) @@ -274,8 +274,13 @@ nfscl_open(vnode_t vp, u_int8_t *nfhp, i *owpp = owp; if (opp != NULL) *opp = op; - if (retp != NULL) - *retp = NFSCLOPEN_OK; + if (retp != NULL) { + if (nfhp != NULL && dp != NULL && nop == NULL) + /* new local open on delegation */ + *retp = NFSCLOPEN_SETCRED; + else + *retp = NFSCLOPEN_OK; + } /* * Now, check the mode on the open and return the appropriate From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 23:21:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94E6C106566B; Thu, 15 Apr 2010 23:21:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B7F8FC1A; Thu, 15 Apr 2010 23:21: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 o3FNLOCG047977; Thu, 15 Apr 2010 23:21:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FNLOW4047975; Thu, 15 Apr 2010 23:21:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004152321.o3FNLOW4047975@svn.freebsd.org> From: Xin LI Date: Thu, 15 Apr 2010 23:21: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: r206689 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 23:21:24 -0000 Author: delphij Date: Thu Apr 15 23:21:24 2010 New Revision: 206689 URL: http://svn.freebsd.org/changeset/base/206689 Log: Utilize IP_BINDANY which provided the same semantics of OpenBSD's SO_BINDANY. Modified: head/contrib/netcat/netcat.c Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Thu Apr 15 22:57:30 2010 (r206688) +++ head/contrib/netcat/netcat.c Thu Apr 15 23:21:24 2010 (r206689) @@ -570,10 +570,8 @@ remote_connect(const char *host, const c if (sflag || pflag) { struct addrinfo ahints, *ares; -#ifdef SO_BINDANY - /* try SO_BINDANY, but don't insist */ - setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); -#endif + /* try IP_BINDANY, but don't insist */ + setsockopt(s, IPPROTO_IP, IP_BINDANY, &on, sizeof(on)); memset(&ahints, 0, sizeof(struct addrinfo)); ahints.ai_family = res0->ai_family; ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; From owner-svn-src-all@FreeBSD.ORG Thu Apr 15 23:56:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B491106564A; Thu, 15 Apr 2010 23:56:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BCA48FC1B; Thu, 15 Apr 2010 23:56: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 o3FNu54g055617; Thu, 15 Apr 2010 23:56:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3FNu54x055615; Thu, 15 Apr 2010 23:56:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004152356.o3FNu54x055615@svn.freebsd.org> From: Rick Macklem Date: Thu, 15 Apr 2010 23:56: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: r206690 - head/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, 15 Apr 2010 23:56:05 -0000 Author: rmacklem Date: Thu Apr 15 23:56:05 2010 New Revision: 206690 URL: http://svn.freebsd.org/changeset/base/206690 Log: Add mutex lock calls to 2 cases in the experimental NFS client's renew thread where they were missing. MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 15 23:21:24 2010 (r206689) +++ head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 15 23:56:05 2010 (r206690) @@ -2318,7 +2318,9 @@ nfscl_renewthread(struct nfsclclient *cl int error, cbpathdown, islept, igotlock, ret, clearok; cred = newnfs_getcred(); + NFSLOCKCLSTATE(); clp->nfsc_flags |= NFSCLFLAGS_HASTHREAD; + NFSUNLOCKCLSTATE(); for(;;) { newnfs_setroot(cred); cbpathdown = 0; @@ -2331,9 +2333,11 @@ nfscl_renewthread(struct nfsclclient *cl error = nfsrpc_renew(clp, cred, p); if (error == NFSERR_CBPATHDOWN) cbpathdown = 1; - else if (error == NFSERR_STALECLIENTID) + else if (error == NFSERR_STALECLIENTID) { + NFSLOCKCLSTATE(); clp->nfsc_flags |= NFSCLFLAGS_RECOVER; - else if (error == NFSERR_EXPIRED) + NFSUNLOCKCLSTATE(); + } else if (error == NFSERR_EXPIRED) (void) nfscl_hasexpired(clp, clidrev, p); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 01:39:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F05D106566B; Fri, 16 Apr 2010 01:39:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8E628FC08; Fri, 16 Apr 2010 01:39: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 o3G1dU9F078398; Fri, 16 Apr 2010 01:39:30 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G1dUE7078396; Fri, 16 Apr 2010 01:39:30 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004160139.o3G1dUE7078396@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Apr 2010 01:39: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: r206691 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 01:39:31 -0000 Author: rmacklem Date: Fri Apr 16 01:39:30 2010 New Revision: 206691 URL: http://svn.freebsd.org/changeset/base/206691 Log: MFC: r206061 Add SAVENAME to the cn_flags for all cases in the experimental NFS server for the CREATE cn_nameiop where SAVESTART isn't set. I was not aware that this needed to be done by the caller until recently. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Thu Apr 15 23:56:05 2010 (r206690) +++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Fri Apr 16 01:39:30 2010 (r206691) @@ -1086,7 +1086,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, case NFFIFO: break; case NFDIR: - cnflags = LOCKPARENT; + cnflags = (LOCKPARENT | SAVENAME); break; default: nd->nd_repstat = NFSERR_BADTYPE; @@ -1549,7 +1549,8 @@ nfsrvd_link(struct nfsrv_descript *nd, i NFSVOPUNLOCK(dp, 0, p); } } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); if (!nd->nd_repstat) { nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); @@ -1743,7 +1744,8 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); return (0); } - NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, LOCKPARENT); + NFSNAMEICNDSET(&named.ni_cnd, nd->nd_cred, CREATE, + LOCKPARENT | SAVENAME); nfsvno_setpathbuf(&named, &bufp, &hashp); error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); if (error) { From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 01:53:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D716106566B; Fri, 16 Apr 2010 01:53:20 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7EB8FC1D; Fri, 16 Apr 2010 01:53: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 o3G1rKeh081484; Fri, 16 Apr 2010 01:53:20 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G1rKuf081481; Fri, 16 Apr 2010 01:53:20 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201004160153.o3G1rKuf081481@svn.freebsd.org> From: Kevin Lo Date: Fri, 16 Apr 2010 01:53: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: r206692 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 01:53:20 -0000 Author: kevlo Date: Fri Apr 16 01:53:19 2010 New Revision: 206692 URL: http://svn.freebsd.org/changeset/base/206692 Log: MFC r206544 The Quanta Q101 modem has a different type of cdrom driver disk, add the product id and use a standard scsi eject. Reviewed by: thompsa Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Apr 16 01:39:30 2010 (r206691) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Apr 16 01:53:19 2010 (r206692) @@ -501,6 +501,7 @@ static const struct usb_device_id u3g_de U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), U3G_DEV(QUALCOMMINC, ZTE_STOR2, U3GINIT_SCSIEJECT), + U3G_DEV(QUANTA, Q101_STOR, U3GINIT_SCSIEJECT), U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:39:30 2010 (r206691) +++ stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:53:19 2010 (r206692) @@ -2526,6 +2526,7 @@ product QUALCOMMINC E2003 0x2003 3G mode /* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 +product QUANTA Q101_STOR 0x1000 USB Q101 Storage product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 01:54:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B4471065709; Fri, 16 Apr 2010 01:54:47 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF308FC1E; Fri, 16 Apr 2010 01: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 o3G1slMV081821; Fri, 16 Apr 2010 01:54:47 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G1sl8S081819; Fri, 16 Apr 2010 01:54:47 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201004160154.o3G1sl8S081819@svn.freebsd.org> From: Kevin Lo Date: Fri, 16 Apr 2010 01: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: r206693 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 01:54:47 -0000 Author: kevlo Date: Fri Apr 16 01:54:47 2010 New Revision: 206693 URL: http://svn.freebsd.org/changeset/base/206693 Log: MFC r206595 Eliminate duplicate comment Modified: stable/8/sys/dev/usb/usbdevs Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:53:19 2010 (r206692) +++ stable/8/sys/dev/usb/usbdevs Fri Apr 16 01:54:47 2010 (r206693) @@ -2523,7 +2523,6 @@ product QUALCOMMINC E2002 0x2002 3G mode product QUALCOMMINC E2003 0x2003 3G modem /* Quanta products */ -/* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101_STOR 0x1000 USB Q101 Storage From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 02:16:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 528311065670; Fri, 16 Apr 2010 02:16:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4163E8FC15; Fri, 16 Apr 2010 02:16: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 o3G2Gxgx086917; Fri, 16 Apr 2010 02:16:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G2GxAR086915; Fri, 16 Apr 2010 02:16:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004160216.o3G2GxAR086915@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Apr 2010 02:16: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: r206694 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 02:16:59 -0000 Author: rmacklem Date: Fri Apr 16 02:16:58 2010 New Revision: 206694 URL: http://svn.freebsd.org/changeset/base/206694 Log: MFC: r206063 For the experimental NFS server, add a call to free the lookup path buffer for one case where it was missing when doing mkdir. This could have conceivably resulted in a leak of a buffer, but a leak was never observed during testing, so I suspect it would have occurred rarely, if ever, in practice. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 16 01:54:47 2010 (r206693) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 16 02:16:58 2010 (r206694) @@ -869,6 +869,7 @@ nfsvno_mkdir(struct nameidata *ndp, stru else vput(ndp->ni_dvp); vrele(ndp->ni_vp); + nfsvno_relpathbuf(ndp); return (EEXIST); } error = VOP_MKDIR(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 02:56:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E653106564A; Fri, 16 Apr 2010 02:56:24 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF6C8FC14; Fri, 16 Apr 2010 02:56: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 o3G2uOP2095624; Fri, 16 Apr 2010 02:56:24 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G2uOH0095621; Fri, 16 Apr 2010 02:56:24 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004160256.o3G2uOH0095621@svn.freebsd.org> From: Juli Mallett Date: Fri, 16 Apr 2010 02:56: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: r206695 - in head: . sys/mips/include sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 02:56:24 -0000 Author: jmallett Date: Fri Apr 16 02:56:24 2010 New Revision: 206695 URL: http://svn.freebsd.org/changeset/base/206695 Log: Remove some unused header files. Deleted: head/sys/mips/include/archtype.h head/sys/mips/include/defs.h head/sys/mips/include/queue.h head/sys/mips/include/rm7000.h head/sys/mips/include/segments.h Modified: head/ObsoleteFiles.inc head/sys/mips/mips/trap.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Apr 16 02:16:58 2010 (r206694) +++ head/ObsoleteFiles.inc Fri Apr 16 02:56:24 2010 (r206695) @@ -14,6 +14,14 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100415: [mips] removed unused headers +.if ${TARGET_ARCH} == "mips" +OLD_FILES+=usr/include/machine/archtype.h +OLD_FILES+=usr/include/machine/segments.h +OLD_FILES+=usr/include/machine/rm7000.h +OLD_FILES+=usr/include/machine/defs.h +OLD_FILES+=usr/include/machine/queue.h +.endif # 20100326: [ia64] removed .if ${TARGET_ARCH} == "ia64" OLD_FILES+=usr/include/machine/nexusvar.h Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Fri Apr 16 02:16:58 2010 (r206694) +++ head/sys/mips/mips/trap.c Fri Apr 16 02:56:24 2010 (r206695) @@ -83,8 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #ifdef DDB From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 06:47:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B34B1065672; Fri, 16 Apr 2010 06:47:30 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7048FC22; Fri, 16 Apr 2010 06:47: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 o3G6lUNn046713; Fri, 16 Apr 2010 06:47:30 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G6lUfL046711; Fri, 16 Apr 2010 06:47:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004160647.o3G6lUfL046711@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 16 Apr 2010 06:47: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: r206696 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 06:47:30 -0000 Author: pjd Date: Fri Apr 16 06:47:29 2010 New Revision: 206696 URL: http://svn.freebsd.org/changeset/base/206696 Log: Fix control socket leak when worker process exits. Submitted by: Mikolaj Golub MFC after: 3 days Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Fri Apr 16 02:56:24 2010 (r206695) +++ head/sbin/hastd/hastd.c Fri Apr 16 06:47:29 2010 (r206696) @@ -137,6 +137,7 @@ child_exit(void) pjdlog_error("Worker process failed (pid=%u, status=%d).", (unsigned int)pid, WEXITSTATUS(status)); } + proto_close(res->hr_ctrl); res->hr_workerpid = 0; if (res->hr_role == HAST_ROLE_PRIMARY) { sleep(1); From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 06:49:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471521065670; Fri, 16 Apr 2010 06:49:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3752D8FC19; Fri, 16 Apr 2010 06:49: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 o3G6nDdS047111; Fri, 16 Apr 2010 06:49:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G6nDIk047109; Fri, 16 Apr 2010 06:49:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201004160649.o3G6nDIk047109@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 16 Apr 2010 06:49: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: r206697 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 06:49:13 -0000 Author: pjd Date: Fri Apr 16 06:49:12 2010 New Revision: 206697 URL: http://svn.freebsd.org/changeset/base/206697 Log: Fix log size calculation which caused message truncation. Submitted by: Mikolaj Golub MFC after: 3 days Modified: head/sbin/hastd/pjdlog.c Modified: head/sbin/hastd/pjdlog.c ============================================================================== --- head/sbin/hastd/pjdlog.c Fri Apr 16 06:47:29 2010 (r206696) +++ head/sbin/hastd/pjdlog.c Fri Apr 16 06:49:12 2010 (r206697) @@ -228,7 +228,7 @@ pjdlogv_common(int loglevel, int debugle len = snprintf(log, sizeof(log), "%s", pjdlog_prefix); if ((size_t)len < sizeof(log)) - len = vsnprintf(log + len, sizeof(log) - len, fmt, ap); + len += vsnprintf(log + len, sizeof(log) - len, fmt, ap); if (error != -1 && (size_t)len < sizeof(log)) { (void)snprintf(log + len, sizeof(log) - len, ": %s.", strerror(error)); From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 07:02:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46BE51065672; Fri, 16 Apr 2010 07:02:29 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA068FC19; Fri, 16 Apr 2010 07:02: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 o3G72TY6050116; Fri, 16 Apr 2010 07:02:29 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G72Sq1050113; Fri, 16 Apr 2010 07:02:29 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201004160702.o3G72Sq1050113@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 16 Apr 2010 07:02: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: r206698 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 07:02:29 -0000 Author: jh Date: Fri Apr 16 07:02:28 2010 New Revision: 206698 URL: http://svn.freebsd.org/changeset/base/206698 Log: Revert r206560. The change doesn't work correctly in all cases with multiple devfs mounts. Modified: head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_int.h Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Fri Apr 16 06:49:12 2010 (r206697) +++ head/sys/fs/devfs/devfs_devs.c Fri Apr 16 07:02:28 2010 (r206698) @@ -408,9 +408,6 @@ devfs_populate_loop(struct devfs_mount * continue; KASSERT((cdp->cdp_flags & CDP_ACTIVE), ("Bogons, I tell ya'!")); - if (cdp->cdp_flags & CDP_INVALID) - continue; - if (dm->dm_idx <= cdp->cdp_maxdirent && cdp->cdp_dirents[dm->dm_idx] != NULL) { de = cdp->cdp_dirents[dm->dm_idx]; @@ -428,8 +425,6 @@ devfs_populate_loop(struct devfs_mount * dd = dm->dm_rootdir; s = cdp->cdp_c.si_name; for (;;) { - while (*s == '/') - s++; for (q = s; *q != '/' && *q != '\0'; q++) continue; if (*q != '/') @@ -439,24 +434,6 @@ devfs_populate_loop(struct devfs_mount * de = devfs_vmkdir(dm, s, q - s, dd, 0); s = q + 1; dd = de; - if (dd->de_flags & (DE_DOT | DE_DOTDOT)) - break; - } - - /* - * XXX: Ignore duplicate and empty device names. - * XXX: Currently there is no way to report the error to - * XXX: the make_dev(9) caller. - */ - if (dd->de_dirent->d_type != DT_DIR || - dd->de_flags & (DE_DOT | DE_DOTDOT) || q - s < 1 || - devfs_find(dd, s, q - s) != NULL) { - dev_lock(); - cdp->cdp_flags |= CDP_INVALID; - dev_unlock(); - printf("%s: %s: invalid or duplicate device name\n", - __func__, cdp->cdp_c.si_name); - return (1); } de = devfs_newdirent(s, q - s); Modified: head/sys/fs/devfs/devfs_int.h ============================================================================== --- head/sys/fs/devfs/devfs_int.h Fri Apr 16 06:49:12 2010 (r206697) +++ head/sys/fs/devfs/devfs_int.h Fri Apr 16 07:02:28 2010 (r206698) @@ -55,7 +55,6 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) -#define CDP_INVALID (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 08:23:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEA1F106564A; Fri, 16 Apr 2010 08:23:31 +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 58A298FC13; Fri, 16 Apr 2010 08:23:31 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2DBA7.dip.t-dialin.net [217.226.219.167]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 964BC844AE6; Fri, 16 Apr 2010 10:23:22 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 6A4C05149; Fri, 16 Apr 2010 10:23:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1271406199; bh=WDrVEFz3uUvoBkatEmhMQxKreRDpN0I19/qrqhbEXVo=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=mnrRb+cgNhUOtglP1Rhjxl1Zocq2xyXo+OuT5Zpc4DjwfeHInI9N64fukh/RSOqKZ 6cKaTzdbbiWUG+Cu9mTkvtclQ82Ami3Rknc7oGpfKOYY/qq+IntnEgoNvEupnGcyyt uOF9RcS2zX6EhYvYMfppuCqNlh5FLgvb6045uViAO1ndWKZnX/HU1HAArDaHhK19cx o5UUJlaLT7DT5lTLfzV3pPnP+LFaxDSlBB3t1zVAR7Ntg+tIU4cZzr0EYkoi6q5c7Y e5BftC5crhJAsa9PXxg2Z4EyXB4DF37I0kTbA4RVUkDt/aG6jp5aW8+ITHPkPpa6aU TKX95mJ1LOGYA== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o3G8NIdb031947; Fri, 16 Apr 2010 10:23:18 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 16 Apr 2010 10:23:18 +0200 Message-ID: <20100416102318.16752py80bkf418g@webmail.leidinger.net> Date: Fri, 16 Apr 2010 10:23:18 +0200 From: Alexander Leidinger To: Bruce Simpson References: <201004101205.o3AC5VGp074266@svn.freebsd.org> <4BC7486C.9010804@incunabulum.net> In-Reply-To: <4BC7486C.9010804@incunabulum.net> 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: 964BC844AE6.A43A3 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.286, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_PH 0.08, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1272011006.23922@q8e508vajMnSkvOryAvVLA X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206452 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 08:23:32 -0000 Quoting Bruce Simpson (from Thu, 15 Apr 2010 18:10:04 +0100): > On 04/10/10 13:05, Bruce M Simpson wrote: >> Log: >> Fix a few issues related to the legacy 4.4 BSD multicast APIs. >> >> IPv4 addresses can and do change during normal operation. Testing by >> pfSense developers exposed an issue where OpenOSPFD was using the IPv4 >> address to leave the OSPF link-scope multicast groups on a dynamic >> OpenVPN tun interface, rather than using RFC 3678 with the interface >> index, which won't be raced when the interface's addresses change. >> > > I should point out that IP multicast is counter-intuitive in many > areas. It seems that knowledge of how to work with it effectively is > not that widespread. People who have a need to use it, often have > very specific requirements. > > IP multicast group membership is always scoped to physical links > [1]. The 4.4BSD API originally used the "primary IP address" to > identify each link. Unfortunately this is not a persistent > identifier, especially so in the use-case which had problems. Is/was this the reason why multicast does not work in jails? > In the updated API specified in RFC 3678, the primary key for > multicast memberships, changes to the interface index. routed(8) in > FreeBSD's SVN tree uses this new API; thanks to phk for reviewing > and testing my change. Will this change make it possible to use multicast in jails now? Bye, Alexander. -- Dentist, n.: A Prestidigitator who, putting metal in one's mouth, pulls coins out of one's pockets. -- Ambrose Bierce, "The Devil's Dictionary" 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 Fri Apr 16 08:32:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49F8106566C; Fri, 16 Apr 2010 08:32:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 947D78FC0C; Fri, 16 Apr 2010 08:32: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 o3G8W89p069920; Fri, 16 Apr 2010 08:32:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G8W8JH069918; Fri, 16 Apr 2010 08:32:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004160832.o3G8W8JH069918@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Apr 2010 08:32: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: r206699 - 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, 16 Apr 2010 08:32:08 -0000 Author: kib Date: Fri Apr 16 08:32:08 2010 New Revision: 206699 URL: http://svn.freebsd.org/changeset/base/206699 Log: MFC r206546: Remove XXX comment. Add another comment, describing why f_vnode assignment is useful. Modified: stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Fri Apr 16 07:02:28 2010 (r206698) +++ stable/8/sys/kern/vfs_syscalls.c Fri Apr 16 08:32:08 2010 (r206699) @@ -1124,7 +1124,12 @@ kern_openat(struct thread *td, int fd, c NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; - fp->f_vnode = vp; /* XXX Does devfs need this? */ + /* + * Store the vnode, for any f_type. Typically, the vnode use + * count is decremented by direct call to vn_closefile() for + * files that switched type in the cdevsw fdopen() method. + */ + fp->f_vnode = vp; /* * If the file wasn't claimed by devfs bind it to the normal * vnode operations here. From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 09:08:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4208E106564A; Fri, 16 Apr 2010 09:08:20 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 321408FC2C; Fri, 16 Apr 2010 09:08: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 o3G98Kvq078015; Fri, 16 Apr 2010 09:08:20 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3G98KlZ078013; Fri, 16 Apr 2010 09:08:20 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004160908.o3G98KlZ078013@svn.freebsd.org> From: Rui Paulo Date: Fri, 16 Apr 2010 09:08: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: r206700 - stable/8/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 09:08:20 -0000 Author: rpaulo Date: Fri Apr 16 09:08:19 2010 New Revision: 206700 URL: http://svn.freebsd.org/changeset/base/206700 Log: MFC r206420: Setup the correct RX/TX chainmask when we play with the antenna settings. Sponsored by: iXsystems, inc Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c ============================================================================== --- stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Fri Apr 16 08:32:08 2010 (r206699) +++ stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Fri Apr 16 09:08:19 2010 (r206700) @@ -378,8 +378,8 @@ ar9285SetAntennaSwitch(struct ath_hal *a case HAL_ANT_VARIABLE: /* Restore original chainmask settings */ /* XXX */ - ahp->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK; - ahp->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK; + ahp->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; + ahp->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; break; } return AH_TRUE; From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 09:33:00 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39046106566C; Fri, 16 Apr 2010 09:33:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id C17258FC16; Fri, 16 Apr 2010 09:32:59 +0000 (UTC) Received: from c122-106-149-225.carlnfd1.nsw.optusnet.com.au (c122-106-149-225.carlnfd1.nsw.optusnet.com.au [122.106.149.225]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o3G9WtAV019423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Apr 2010 19:32:57 +1000 Date: Fri, 16 Apr 2010 19:32:55 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: David Schultz In-Reply-To: <20100415212734.GA17239@zim.MIT.EDU> Message-ID: <20100416185222.X1124@delplex.bde.org> References: <201003310212.o2V2CO7b063419@svn.freebsd.org> <20100415212734.GA17239@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Juli Mallett , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205954 - head/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: Fri, 16 Apr 2010 09:33:00 -0000 On Thu, 15 Apr 2010, David Schultz wrote: > On Wed, Mar 31, 2010, Juli Mallett wrote: >> Be like stdlib.h and bring in a wchar_t definition and use it to prototype >> wcstoimax and wcstoumax, rather than spelling it __wchar_t. This is necessary >> to use these functions in C++ where wchar_t is different to __wchar_t and is >> a built-in type. > > I don't think this change is correct for C mode. POSIX says > wchar_t is *supposed* to be defined by stdlib.h and wchar.h, but ^stddef.h, > its definition is namespace pollution elsewhere. C99 says the same, at least in old drafts. C99 also says that for the functions in that use wchar_t, both and must be included (by giving both of these headers in the synopses for these functions, and no explicit alternatives anywhere). However, this is unusable and close to unimplementable, especially the latter: - including without including should work when these functions are not used. FreeBSD used to use the usual implementation involving underscored named to make this case works without polluting with wchar_t. It is hard to make this case work while detecting the error in the case where these functions are used but is not included. - it is even harder and even sillier to detect the error in the case where these functions are used and some other header that declares wchar_t is included, but is not included :-). Perhaps fine print in C99 overrides the silly literal requirement, but I couldn't find it. POSIX (at least in old 2001 draft 7) is only slightly different here. It only mentions in the synopses, but gives in examples. But current POSIX (at least in the most recent html man page for wcstoimax found by google) has caught down to C99: it now specifies and in the synopsis, and doesn't say anything about alternatives to in the synopses, and doesn't say anything special about wchar_t. I couldn't find anything useful about this problem using google. I found mainly confusion about it in FOSS mailing lists, with no signs of standards being aware of it. IMO, the functions using wchar_t should never have been put in . The corresponding problem for was carefully avoided by putting all the stdio functions that use wchar_t in (where it causes corresponding problems for stdio types like FILE (*)). However, these functions have been misplaced for so long that the shouldn't be moved, and the easiest fix is to standardize the pollution. (*) The problems for FILE in are handled equally badly by standards and equally well by FreeBSD (compared with old-FreeBSD for wchar_t in ). FILE would be namespace pollution in , and FreeBSD is careful not to add it, and standards require inclusion of both and before using functions that use both FILE and wchar_t, but the latter is unusuable and close to unimplementable, as above. Now the functions are reasonably well placed (you wouldn't want a header just to hold them), and again the easiest fix is to standardize the pollution. At least the pollution wouldn't go all the way to . Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 10:21:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0492D106566C; Fri, 16 Apr 2010 10:21:11 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id C430B8FC08; Fri, 16 Apr 2010 10:21:10 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id CB044E66F9; Fri, 16 Apr 2010 06:21:09 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 16 Apr 2010 06:21:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=hT/m9ijtTfBZHcfVsbwCtNCwXl0=; b=DxBEVCth4yeKeE+o6XDKqqNxAoT/JOHnGtVwdZ1o22u5GG1WkHOSSTZzF6LM+bh9PBK6vgX0O7u5jrkq7pKAIHK7x5Jzd+wFCK7mEdcch0zna6zH2QBbCHkU8Z/asIv2SBkXttr6Qee6s4bN/WDTFVpXQlvO5+MUzb5DgxtHKVo= X-Sasl-enc: fGz0AGuH8Y7teyjeGf7NBWZs2Vnfyi7kFHMp8eQoNJ2n 1271413269 Received: from anglepoise.lon.incunabulum.net (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 300B937F86; Fri, 16 Apr 2010 06:21:09 -0400 (EDT) Message-ID: <4BC83A12.2080700@incunabulum.net> Date: Fri, 16 Apr 2010 11:21:06 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100406 Thunderbird/3.0.4 MIME-Version: 1.0 To: Alexander Leidinger References: <201004101205.o3AC5VGp074266@svn.freebsd.org> <4BC7486C.9010804@incunabulum.net> <20100416102318.16752py80bkf418g@webmail.leidinger.net> In-Reply-To: <20100416102318.16752py80bkf418g@webmail.leidinger.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206452 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 10:21:11 -0000 On 04/16/10 09:23, Alexander Leidinger wrote: > >> IP multicast group membership is always scoped to physical links [1]. >> The 4.4BSD API originally used the "primary IP address" to identify >> each link. Unfortunately this is not a persistent identifier, >> especially so in the use-case which had problems. > > > Is/was this the reason why multicast does not work in jails? The above point is totally unrelated to jail. I think the problem with jail is the fact that to receive multicast, sockets normally need to be bound to INADDR_ANY. Obviously, jail changes socket behaviour in interesting ways. This may require refactoring udp_input() considerably. We use the 4.4BSD legacy LIST_FOREACH() loop to deliver, rather than using a fan-in map (which is the Windows/Solaris approach). Linux also has 4.4BSD semantics, but can work around this by examining the SO_BINDTODEVICE option in the same path. From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 10:40:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FC9D106566B; Fri, 16 Apr 2010 10:40:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id F2B6A8FC15; Fri, 16 Apr 2010 10:40:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 5753941C795; Fri, 16 Apr 2010 12:40:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id zjSWnFBwEG+n; Fri, 16 Apr 2010 12:40:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id DD92541C756; Fri, 16 Apr 2010 12:40:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id DE2914448EC; Fri, 16 Apr 2010 10:39:38 +0000 (UTC) Date: Fri, 16 Apr 2010 10:39:38 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Bruce Simpson In-Reply-To: <4BC83A12.2080700@incunabulum.net> Message-ID: <20100416103826.X40281@maildrop.int.zabbadoz.net> References: <201004101205.o3AC5VGp074266@svn.freebsd.org> <4BC7486C.9010804@incunabulum.net> <20100416102318.16752py80bkf418g@webmail.leidinger.net> <4BC83A12.2080700@incunabulum.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Leidinger , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206452 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 10:40:09 -0000 On Fri, 16 Apr 2010, Bruce Simpson wrote: > On 04/16/10 09:23, Alexander Leidinger wrote: >> >>> IP multicast group membership is always scoped to physical links [1]. The >>> 4.4BSD API originally used the "primary IP address" to identify each link. >>> Unfortunately this is not a persistent identifier, especially so in the >>> use-case which had problems. >> >> >> Is/was this the reason why multicast does not work in jails? > > The above point is totally unrelated to jail. > > I think the problem with jail is the fact that to receive multicast, sockets > normally need to be bound to INADDR_ANY. Obviously, jail changes socket > behaviour in interesting ways. > > This may require refactoring udp_input() considerably. We use the 4.4BSD > legacy LIST_FOREACH() loop to deliver, rather than using a fan-in map (which > is the Windows/Solaris approach). > > Linux also has 4.4BSD semantics, but can work around this by examining the > SO_BINDTODEVICE option in the same path. SO_BINDTODEVICE would not be enough of a check unless the interface could be dedicated to a jail which classic jails did and do not support. Virtual network stacks will be the solution for this. -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 11:11:38 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D816106564A; Fri, 16 Apr 2010 11:11:38 +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 901318FC19; Fri, 16 Apr 2010 11:11:37 +0000 (UTC) Received: from c122-106-149-225.carlnfd1.nsw.optusnet.com.au (c122-106-149-225.carlnfd1.nsw.optusnet.com.au [122.106.149.225]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o3GBBXIT017868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Apr 2010 21:11:36 +1000 Date: Fri, 16 Apr 2010 21:11:33 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Andriy Gapon In-Reply-To: <201004152141.o3FLf7WX025585@svn.freebsd.org> Message-ID: <20100416210721.W1238@delplex.bde.org> References: <201004152141.o3FLf7WX025585@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: r206687 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 11:11:38 -0000 On Thu, 15 Apr 2010, Andriy Gapon wrote: > Log: > indent(1): don't treat bare '_t' as a type name when -ta is used > > It seems that identifier "_t" is sometimes used as a variable name, > even in our tree. Not that I endorse that, but still it's better > to require at least one character before _t suffix to consider > an identifier to be a type name. > > Reported by: Alex Vasylenko > MFC after: 1 week Funny. POSIX reserves "_t" as a suffix in header files, so unless it also requires a non-null prefix, "_t" is reserved in POSIX. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 11:34:22 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E618A1065676 for ; Fri, 16 Apr 2010 11:34:22 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id ECC0D178319 for ; Fri, 16 Apr 2010 11:34:21 +0000 (UTC) Received: (qmail 63881 invoked from network); 16 Apr 2010 11:34:21 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2010 11:34:21 -0000 Message-ID: <4BC84B3D.90302@freebsd.org> Date: Fri, 16 Apr 2010 04:34:21 -0700 From: Colin Percival User-Agent: Thunderbird 2.0.0.24 (X11/20100329) MIME-Version: 1.0 To: Bruce Evans References: <201004152141.o3FLf7WX025585@svn.freebsd.org> <20100416210721.W1238@delplex.bde.org> In-Reply-To: <20100416210721.W1238@delplex.bde.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206687 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 11:34:23 -0000 Bruce Evans wrote: > On Thu, 15 Apr 2010, Andriy Gapon wrote: >> It seems that identifier "_t" is sometimes used as a variable name, >> even in our tree. [...] > > Funny. POSIX reserves "_t" as a suffix in header files, so unless it > also requires a non-null prefix, "_t" is reserved in POSIX. I think you must be reading a different version of POSIX to me. My version says that symbols ending with "_t" may be defined in any header; but not that they cannot be used in non-headers. If one wished to write code which was guaranteed to work on any conforming POSIX system, one would naturally wish to avoid symbols which might legitimately be defined in headers; but as long as we're concerned with one specific system which happens to not define the symbol "_t" in any header, this is a non-issue. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 12:49:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C61B81065786; Fri, 16 Apr 2010 12:49:52 +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 4345B8FC1A; Fri, 16 Apr 2010 12:49:51 +0000 (UTC) Received: from besplex.bde.org (c122-106-149-225.carlnfd1.nsw.optusnet.com.au [122.106.149.225]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o3GCnmmK013322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Apr 2010 22:49:50 +1000 Date: Fri, 16 Apr 2010 22:49:48 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival In-Reply-To: <4BC84B3D.90302@freebsd.org> Message-ID: <20100416222439.M2697@besplex.bde.org> References: <201004152141.o3FLf7WX025585@svn.freebsd.org> <20100416210721.W1238@delplex.bde.org> <4BC84B3D.90302@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, Bruce Evans Subject: Re: svn commit: r206687 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 12:49:52 -0000 On Fri, 16 Apr 2010, Colin Percival wrote: > Bruce Evans wrote: >> On Thu, 15 Apr 2010, Andriy Gapon wrote: >>> It seems that identifier "_t" is sometimes used as a variable name, >>> even in our tree. [...] >> >> Funny. POSIX reserves "_t" as a suffix in header files, so unless it >> also requires a non-null prefix, "_t" is reserved in POSIX. > > I think you must be reading a different version of POSIX to me. My version says > that symbols ending with "_t" may be defined in any header; but not that they > cannot be used in non-headers. No, it seems to be almost the same version, but my reading is more lawerly :-). I looked mainly at POSIX.1-1996. They are reserved if any POSIX header is included. I thought that they were reserved only for typedefed names, but can't see any restriction in the 1996 version. Whether they can be used in a non-header that includes a POSIX header depends on scope rules. They can't be used at file scope for obvious reasons. If they are only reserved for typedefed names, then they can be used for other names in inner scope, provided you compile with a C compiler (no -Wshadow -Werror). If they are reserved for any use, then it is hard to think of any valid use in a non-header. Uses like "auto int foo_t;" would fail if foo_t were a macro which expands to almost anything. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 15:43:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E954106566B; Fri, 16 Apr 2010 15:43:24 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 790898FC12; Fri, 16 Apr 2010 15:43: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 o3GFhOhB066521; Fri, 16 Apr 2010 15:43:24 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GFhOtU066515; Fri, 16 Apr 2010 15:43:24 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161543.o3GFhOtU066515@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 15:43:24 +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: r206701 - in stable/8/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc 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, 16 Apr 2010 15:43:24 -0000 Author: fabient Date: Fri Apr 16 15:43:24 2010 New Revision: 206701 URL: http://svn.freebsd.org/changeset/base/206701 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/8/sys/dev/hwpmc/hwpmc_uncore.c - copied unchanged from r206089, head/sys/dev/hwpmc/hwpmc_uncore.c stable/8/sys/dev/hwpmc/hwpmc_uncore.h (contents, props changed) Modified: stable/8/sys/amd64/include/pmc_mdep.h stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/conf/files.pc98 stable/8/sys/dev/hwpmc/hwpmc_core.c stable/8/sys/dev/hwpmc/hwpmc_core.h stable/8/sys/dev/hwpmc/hwpmc_intel.c stable/8/sys/dev/hwpmc/pmc_events.h stable/8/sys/i386/include/pmc_mdep.h stable/8/sys/modules/hwpmc/Makefile stable/8/sys/sys/pmc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/8/sys/amd64/include/pmc_mdep.h Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/amd64/include/pmc_mdep.h Fri Apr 16 15:43:24 2010 (r206701) @@ -43,17 +43,20 @@ struct pmc_mdep; #include #include #include +#include /* * Intel processors implementing V2 and later of the Intel performance * measurement architecture have PMCs of the following classes: TSC, - * IAF and IAP. + * IAF, IAP, UCF and UCP. */ #define PMC_MDEP_CLASS_INDEX_TSC 0 #define PMC_MDEP_CLASS_INDEX_K8 1 #define PMC_MDEP_CLASS_INDEX_P4 1 #define PMC_MDEP_CLASS_INDEX_IAP 1 #define PMC_MDEP_CLASS_INDEX_IAF 2 +#define PMC_MDEP_CLASS_INDEX_UCP 3 +#define PMC_MDEP_CLASS_INDEX_UCF 4 /* * On the amd64 platform we support the following PMCs. @@ -63,12 +66,16 @@ struct pmc_mdep; * PIV Intel P4/HTT and P4/EMT64 * IAP Intel Core/Core2/Atom CPUs in 64 bits mode. * IAF Intel fixed-function PMCs in Core2 and later CPUs. + * UCP Intel Uncore programmable PMCs. + * UCF Intel Uncore fixed-function PMCs. */ union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; struct pmc_md_iaf_op_pmcallocate pm_iaf; struct pmc_md_iap_op_pmcallocate pm_iap; + struct pmc_md_ucf_op_pmcallocate pm_ucf; + struct pmc_md_ucp_op_pmcallocate pm_ucp; struct pmc_md_p4_op_pmcallocate pm_p4; uint64_t __pad[4]; }; @@ -83,6 +90,8 @@ union pmc_md_pmc { struct pmc_md_amd_pmc pm_amd; struct pmc_md_iaf_pmc pm_iaf; struct pmc_md_iap_pmc pm_iap; + struct pmc_md_ucf_pmc pm_ucf; + struct pmc_md_ucp_pmc pm_ucp; struct pmc_md_p4_pmc pm_p4; }; Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/conf/files.amd64 Fri Apr 16 15:43:24 2010 (r206701) @@ -205,6 +205,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc Modified: stable/8/sys/conf/files.i386 ============================================================================== --- stable/8/sys/conf/files.i386 Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/conf/files.i386 Fri Apr 16 15:43:24 2010 (r206701) @@ -179,6 +179,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/8/sys/conf/files.pc98 ============================================================================== --- stable/8/sys/conf/files.pc98 Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/conf/files.pc98 Fri Apr 16 15:43:24 2010 (r206701) @@ -99,6 +99,7 @@ dev/fe/if_fe_cbus.c optional fe isa dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 09:08:19 2010 (r206700) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 15:43:24 2010 (r206701) @@ -534,10 +534,12 @@ struct iap_event_descr { #define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ #define IAP_F_CA (1 << 3) /* CPU: Atom */ #define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ -#define IAP_F_FM (1 << 5) /* Fixed mask */ +#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ +#define IAP_F_WM (1 << 5) /* CPU: Westmere */ +#define IAP_F_FM (1 << 6) /* Fixed mask */ -#define IAP_F_ALLCPUS \ - (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA | IAP_F_I7) +#define IAP_F_ALLCPUSCORE2 \ + (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ @@ -570,151 +572,319 @@ static struct iap_event_descr iap_events .iap_flags = (FLAGS) \ } + IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM), + IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM), + IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | + IAP_F_CC2E | IAP_F_CA), + IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM), + IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_WM), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), + IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), - IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CA | IAP_F_CC2), - IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), IAPDESCR(2BH, 0x2B, IAP_M_CORE | IAP_M_MESI, IAP_F_CA | IAP_F_CC2), IAPDESCR(2EH, 0x2E, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), - IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), + IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), + IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(3AH, 0x3A, IAP_M_TRANSITION, IAP_F_CC), IAPDESCR(3AH_00H, 0x3A, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_0FH, 0x40, 0x0F, IAP_F_FM | IAP_F_I7), IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(41H_01H, 0x41, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(41H_02H, 0x41, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_04H, 0x41, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_08H, 0x41, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_0FH, 0x41, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(41H_22H, 0x41, 0x22, IAP_F_FM | IAP_F_CA), - IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(42H_01H, 0x42, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_02H, 0x42, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_04H, 0x42, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_08H, 0x42, 0x08, IAP_F_FM | IAP_F_I7), IAPDESCR(42H_10H, 0x42, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7), + IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | + IAP_F_CC2 | IAP_F_I7), IAPDESCR(44H_02H, 0x44, 0x02, IAP_F_FM | IAP_F_CC), - IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM), + IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), + IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_03H, 0x4B, 0x03, IAP_F_FM | IAP_F_CC), + IAPDESCR(4BH_08H, 0x4B, 0x08, IAP_F_FM | IAP_F_I7O), IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(4EH_01H, 0x4E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_02H, 0x4E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_04H, 0x4E, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(4EH_10H, 0x4E, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4FH_00H, 0x4F, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + + IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_08H, 0x51, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(52H_01H, 0x52, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUS), + IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), IAPDESCR(62H_00H, 0x62, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(63H, 0x63, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), + IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -723,16 +893,18 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(65H, 0x65, IAP_M_CORE, IAP_F_CC), - IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(67H, 0x67, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(67H, 0x67, IAP_M_AGENT, IAP_F_CC), - IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6CH_01H, 0x6C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(6DH, 0x6D, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(6DH, 0x6D, IAP_M_CORE, IAP_F_CC), @@ -757,47 +929,89 @@ static struct iap_event_descr iap_events IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), - IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(7EH, 0x7E, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(7EH_00H, 0x7E, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(7FH, 0x7F, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), - IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7), - IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(81H_02H, 0x81, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(82H_01H, 0x82, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(82H_02H, 0x82, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_04H, 0x82, 0x04, IAP_F_FM | IAP_F_CA), IAPDESCR(82H_10H, 0x82, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_08H, 0x87, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -811,6 +1025,18 @@ static struct iap_event_descr iap_events IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -820,18 +1046,42 @@ static struct iap_event_descr iap_events IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_1FH, 0xB1, 0x1F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_20H, 0xB1, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_3FH, 0xB1, 0x3F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_40H, 0xB1, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + + IAPDESCR(B2H_01H, 0xB2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B3H_81H, 0xB3, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_82H, 0xB3, 0x82, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_84H, 0xB3, 0x84, IAP_F_FM | IAP_F_CA), @@ -839,10 +1089,28 @@ static struct iap_event_descr iap_events IAPDESCR(B3H_90H, 0xB3, 0x90, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_A0H, 0xB3, 0xA0, IAP_F_FM | IAP_F_CA), - IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(B4H_01H, 0xB4, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_02H, 0xB4, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), + + IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_02H, 0xB8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_04H, 0xB8, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(BAH_01H, 0xBA, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), IAPDESCR(C1H_00H, 0xC1, 0x00, IAP_F_FM | IAP_F_CC), @@ -850,43 +1118,64 @@ static struct iap_event_descr iap_events IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_08H, 0xC2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_0FH, 0xC2, 0x0F, IAP_F_FM | IAP_F_CC2), IAPDESCR(C2H_10H, 0xC2, 0x10, IAP_F_FM | IAP_F_CA), IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - - IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C4H_08H, 0xC4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), - IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C6H_02H, 0xC6, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C7H_00H, 0xC7, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -894,36 +1183,59 @@ static struct iap_event_descr iap_events IAPDESCR(CAH_04H, 0xCA, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(CAH_08H, 0xCA, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_00H, 0xCC, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E), - IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D4H_02H, 0xD4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_04H, 0xD4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_08H, 0xD4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_0FH, 0xD4, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D5H_02H, 0xD5, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_04H, 0xD5, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_08H, 0xD5, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -947,6 +1259,7 @@ static struct iap_event_descr iap_events IAPDESCR(DAH_02H, 0xDA, 0x02, IAP_F_FM | IAP_F_CC), IAPDESCR(DBH_00H, 0xDB, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(DCH_01H, 0xDC, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(DCH_02H, 0xDC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -956,276 +1269,76 @@ static struct iap_event_descr iap_events IAPDESCR(DCH_1FH, 0xDC, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(E0H_00H, 0xE0, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), IAPDESCR(E2H_00H, 0xE2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(E6H_00H, 0xE6, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA), + IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(F0H_00H, 0xF0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(F8H_00H, 0xF8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - /* Added with nehalem. */ - IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7), - IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 15:45:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1705C106564A; Fri, 16 Apr 2010 15:45:10 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 033678FC17; Fri, 16 Apr 2010 15:45: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 o3GFjAa3066982; Fri, 16 Apr 2010 15:45:10 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GFj9eP066977; Fri, 16 Apr 2010 15:45:09 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161545.o3GFj9eP066977@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 15:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206702 - stable/8/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 15:45:10 -0000 Author: fabient Date: Fri Apr 16 15:45:09 2010 New Revision: 206702 URL: http://svn.freebsd.org/changeset/base/206702 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/8/lib/libpmc/pmc.corei7.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7.3 stable/8/lib/libpmc/pmc.corei7uc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7uc.3 stable/8/lib/libpmc/pmc.ucf.3 - copied unchanged from r206089, head/lib/libpmc/pmc.ucf.3 stable/8/lib/libpmc/pmc.westmere.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmere.3 stable/8/lib/libpmc/pmc.westmereuc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmereuc.3 Modified: stable/8/lib/libpmc/Makefile stable/8/lib/libpmc/libpmc.c Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/Makefile ============================================================================== --- stable/8/lib/libpmc/Makefile Fri Apr 16 15:43:24 2010 (r206701) +++ stable/8/lib/libpmc/Makefile Fri Apr 16 15:45:09 2010 (r206702) @@ -28,11 +28,16 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 +MAN+= pmc.corei7.3 +MAN+= pmc.corei7uc.3 +MAN+= pmc.westmere.3 +MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 MLINKS+= \ Modified: stable/8/lib/libpmc/libpmc.c ============================================================================== --- stable/8/lib/libpmc/libpmc.c Fri Apr 16 15:43:24 2010 (r206701) +++ stable/8/lib/libpmc/libpmc.c Fri Apr 16 15:45:09 2010 (r206702) @@ -54,6 +54,10 @@ static int iaf_allocate_pmc(enum pmc_eve struct pmc_op_pmcallocate *_pmc_config); static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int ucf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int ucp_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -132,6 +136,7 @@ PMC_CLASSDEP_TABLE(k8, K8); PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); +PMC_CLASSDEP_TABLE(ucf, UCF); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -157,6 +162,21 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr westmere_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + +static const struct pmc_event_descr corei7uc_event_table[] = +{ + __PMC_EV_ALIAS_COREI7UC() +}; + +static const struct pmc_event_descr westmereuc_event_table[] = +{ + __PMC_EV_ALIAS_WESTMEREUC() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -170,7 +190,8 @@ static const struct pmc_event_descr core PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); @@ -201,6 +222,10 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); +PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); +PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif #if defined(__i386__) PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); @@ -281,7 +306,7 @@ struct pmc_masks { const uint32_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } -#define NULLMASK PMCMASK(NULL,0) +#define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int @@ -474,6 +499,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define westmere_aliases core2_aliases +#define westmere_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -524,6 +551,7 @@ iaf_allocate_pmc(enum pmc_event pe, char #define IAP_KW_SNOOPTYPE "snooptype" #define IAP_KW_TRANSITION "trans" #define IAP_KW_USR "usr" +#define IAP_KW_RSP "rsp" static struct pmc_masks iap_core_mask[] = { PMCMASK(all, (0x3 << 14)), @@ -571,19 +599,38 @@ static struct pmc_masks iap_transition_m NULLMASK }; +static struct pmc_masks iap_rsp_mask[] = { + PMCMASK(DMND_DATA_RD, (1 << 0)), + PMCMASK(DMND_RFO, (1 << 1)), + PMCMASK(DMND_IFETCH, (1 << 2)), + PMCMASK(WB, (1 << 3)), + PMCMASK(PF_DATA_RD, (1 << 4)), + PMCMASK(PF_RFO, (1 << 5)), + PMCMASK(PF_IFETCH, (1 << 6)), + PMCMASK(OTHER, (1 << 7)), + PMCMASK(UNCORE_HIT, (1 << 8)), + PMCMASK(OTHER_CORE_HIT_SNP, (1 << 9)), + PMCMASK(OTHER_CORE_HITM, (1 << 10)), + PMCMASK(REMOTE_CACHE_FWD, (1 << 12)), + PMCMASK(REMOTE_DRAM, (1 << 13)), + PMCMASK(LOCAL_DRAM, (1 << 14)), + PMCMASK(NON_DRAM, (1 << 15)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask; + uint32_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_QUALIFIER); pmc_config->pm_md.pm_iap.pm_iap_config = 0; - cachestate = evmask = 0; + cachestate = evmask = rsp = 0; /* Parse additional modifiers if present */ while ((p = strsep(&ctrspec, ",")) != NULL) { @@ -630,8 +677,7 @@ iap_allocate_pmc(enum pmc_event pe, char return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || - cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -640,6 +686,12 @@ iap_allocate_pmc(enum pmc_event pe, char &evmask); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + } else + return (-1); } else return (-1); @@ -672,6 +724,69 @@ iap_allocate_pmc(enum pmc_event pe, char } pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + pmc_config->pm_md.pm_iap.pm_iap_rsp = rsp; + + return (0); +} + +/* + * Intel Uncore. + */ + +static int +ucf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + (void) pe; + (void) ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_ucf.pm_ucf_flags = 0; + + return (0); +} + +#define UCP_KW_CMASK "cmask" +#define UCP_KW_EDGE "edge" +#define UCP_KW_INV "inv" + +static int +ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int count, n; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_ucp.pm_ucp_config = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, UCP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_ucp.pm_ucp_config |= + UCP_CMASK(count); + } else if (KWMATCH(p, UCP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, UCP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } return (0); } @@ -2309,6 +2424,31 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere); + break; + } + break; + case PMC_CLASS_UCF: + ev = ucf_event_table; + count = PMC_EVENT_TABLE_SIZE(ucf); + break; + case PMC_CLASS_UCP: + /* + * Return the most appropriate set of event name + * spellings for the current CPU. + */ + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + count = PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + count = PMC_EVENT_TABLE_SIZE(westmereuc); + break; } break; case PMC_CLASS_TSC: @@ -2514,8 +2654,15 @@ pmc_init(void) PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &westmereuc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(westmere); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -2618,10 +2765,30 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); + break; + default: /* Unknown CPU type. */ + break; + } + } else if (pe >= PMC_EV_UCF_FIRST && pe <= PMC_EV_UCF_LAST) { + ev = ucf_event_table; + evfence = ucf_event_table + PMC_EVENT_TABLE_SIZE(ucf); + } else if (pe >= PMC_EV_UCP_FIRST && pe <= PMC_EV_UCP_LAST) { + switch (cpu) { + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc); + break; default: /* Unknown CPU type. */ break; } - } if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { + } else if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { ev = k7_event_table; evfence = k7_event_table + PMC_EVENT_TABLE_SIZE(k7); } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { Copied: stable/8/lib/libpmc/pmc.corei7.3 (from r206089, head/lib/libpmc/pmc.corei7.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libpmc/pmc.corei7.3 Fri Apr 16 15:45:09 2010 (r206702, copy of r206089, head/lib/libpmc/pmc.corei7.3) @@ -0,0 +1,1581 @@ +.\" Copyright (c) 2010 Fabien Thomas. 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 Joseph Koshy ``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 Joseph Koshy 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 March 24, 2010 +.Os +.Dt PMC.COREI7 3 +.Sh NAME +.Nm pmc.corei7 +.Nd measurement events for +.Tn Intel +.Tn Core i7 and Xeon 5500 +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Core i7" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Core i7 and Xeon 5500 PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developes Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-033US" +.%D December 2009 +.%Q "Intel Corporation" +.Re +.Ss COREI7 AND XEON 5500 FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. +.Ss COREI7 AND XEON 5500 PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership +(RFO) requests generated by a write to data cacheline. Does not +count L2 RFO. +.It Li DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline +reads. Does not count L2 code read prefetches. +WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li OTHER +Counts one of the following transaction types, including L3 invalidate, +I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, +lock, unlock, split lock. +.It Li UNCORE_HIT +L3 Hit: local or remote home requests that hit L3 cache in the uncore +with no coherency actions required (snooping). +.It Li OTHER_CORE_HIT_SNP +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where no modified +copies were found (clean). +.It Li OTHER_CORE_HITM +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where modified +copies were found (HITM). +.It Li REMOTE_CACHE_FWD +L3 Miss: local homed requests that missed the L3 cache and was serviced +by forwarded data following a cross package snoop where no modified +copies found. (Remote home requests are not counted) +.It Li REMOTE_DRAM +L3 Miss: remote home requests that missed the L3 cache and were serviced +by remote DRAM. +.It Li LOCAL_DRAM +L3 Miss: local home requests that missed the L3 cache and were serviced +by local DRAM. +.It Li NON_DRAM +Non-DRAM requests that were serviced by IOH. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Core i7 and Xeon 5500 programmable PMCs support the following events: +.Bl -tag -width indent +.It Li SB_DRAIN.ANY +.Pq Event 04H , Umask 07H +Counts the number of store buffer drains. +.It Li STORE_BLOCKS.AT_RET +.Pq Event 06H , Umask 04H +Counts number of loads delayed with at-Retirement block code. The following +loads need to be executed at retirement and wait for all senior stores on +the same thread to be drained: load splitting across 4K boundary (page +split), load accessing uncacheable (UC or USWC) memory, load lock, and load +with page table in UC or USWC memory region. +.It Li STORE_BLOCKS.L1D_BLOCK +.Pq Event 06H , Umask 08H +Cacheable loads delayed with L1D block code +.It Li PARTIAL_ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +Counts false dependency due to partial address aliasing +.It Li DTLB_LOAD_MISSES.ANY +.Pq Event 08H , Umask 01H +Counts all load misses that cause a page walk +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 02H +Counts number of completed page walks due to load miss in the STLB. +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 10H +Number of cache load STLB hits +.It Li DTLB_LOAD_MISSES.PDE_MISS +.Pq Event 08H , Umask 20H +Number of DTLB cache load misses where the low part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.PDP_MISS +.Pq Event 08H , Umask 40H +Number of DTLB cache load misses where the high part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED +.Pq Event 08H , Umask 80H +Counts number of completed large page walks due to load miss in the STLB. +.It Li MEM_INST_RETIRED.LOADS +.Pq Event 0BH , Umask 01H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.STORES +.Pq Event 0BH , Umask 02H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD +.Pq Event 0BH , Umask 10H +Counts the number of instructions exceeding the latency specified with +ld_lat facility. +In conjunction with ld_lat facility +.It Li MEM_STORE_RETIRED.DTLB_MISS +.Pq Event 0CH , Umask 01H +The event counts the number of retired stores that missed the DTLB. The DTLB +miss is not counted if the store operation causes a fault. Does not counter +prefetches. Counts both primary and secondary misses to the TLB +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Counts the number of Uops issued by the Register Allocation Table to the +Reservation Station, i.e. the UOPs issued from the front end to the back +end. +.It Li UOPS_ISSUED.STALLED_CYCLES +.Pq Event 0EH , Umask 01H +Counts the number of cycles no Uops issued by the Register Allocation Table +to the Reservation Station, i.e. the UOPs issued from the front end to the +back end. +set invert=1, cmask = 1 +.It Li UOPS_ISSUED.FUSED +.Pq Event 0EH , Umask 02H +Counts the number of fused Uops that were issued from the Register +Allocation Table to the Reservation Station. +.It Li MEM_UNCORE_RETIRED.L3_DATA_MISS_UNKNOWN +.Pq Event 0FH , Umask 01H +Counts number of memory load instructions retired where the memory reference +missed L3 and data source is unknown. +Available only for CPUID signature 06_2EH +.It Li MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM +.Pq Event 0FH , Umask 02H +Counts number of memory load instructions retired where the memory reference +hit modified data in a sibling core residing on the same socket. +.It Li MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT +.Pq Event 0FH , Umask 08H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and HIT in a remote socket's cache. Only +counts locally homed lines. +.It Li MEM_UNCORE_RETIRED.REMOTE_DRAM +.Pq Event 0FH , Umask 10H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and was remotely homed. This includes both +DRAM access and HITM in a remote socket's cache for remotely homed lines. +.It Li MEM_UNCORE_RETIRED.LOCAL_DRAM +.Pq Event 0FH , Umask 20H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and required a local socket memory +reference. This includes locally homed cachelines that were in a modified +state in another socket. +.It Li MEM_UNCORE_RETIRED.UNCACHEABLE +.Pq Event 0FH , Umask 80H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and to perform I/O. +Available only for CPUID signature 06_2EH +.It Li FP_COMP_OPS_EXE.X87 +.Pq Event 10H , Umask 01H +Counts the number of FP Computational Uops Executed. The number of FADD, +FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer +DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +of a transcendental flow from a separate FADD instruction. +.It Li FP_COMP_OPS_EXE.MMX +.Pq Event 10H , Umask 02H +Counts number of MMX Uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP +.Pq Event 10H , Umask 04H +Counts number of SSE and SSE2 FP uops executed. +.It Li FP_COMP_OPS_EXE.SSE2_INTEGER +.Pq Event 10H , Umask 08H +Counts number of SSE2 integer uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED +.Pq Event 10H , Umask 10H +Counts number of SSE FP packed uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR +.Pq Event 10H , Umask 20H +Counts number of SSE FP scalar uops executed. +.It Li FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION +.Pq Event 10H , Umask 40H +Counts number of SSE* FP single precision uops executed. +.It Li FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION +.Pq Event 10H , Umask 80H +Counts number of SSE* FP double precision uops executed. +.It Li SIMD_INT_128.PACKED_MPY +.Pq Event 12H , Umask 01H +Counts number of 128 bit SIMD integer multiply operations. +.It Li SIMD_INT_128.PACKED_SHIFT +.Pq Event 12H , Umask 02H +Counts number of 128 bit SIMD integer shift operations. +.It Li SIMD_INT_128.PACK +.Pq Event 12H , Umask 04H +Counts number of 128 bit SIMD integer pack operations. +.It Li SIMD_INT_128.UNPACK +.Pq Event 12H , Umask 08H +Counts number of 128 bit SIMD integer unpack operations. +.It Li SIMD_INT_128.PACKED_LOGICAL +.Pq Event 12H , Umask 10H +Counts number of 128 bit SIMD integer logical operations. +.It Li SIMD_INT_128.PACKED_ARITH +.Pq Event 12H , Umask 20H +Counts number of 128 bit SIMD integer arithmetic operations. +.It Li SIMD_INT_128.SHUFFLE_MOVE +.Pq Event 12H , Umask 40H +Counts number of 128 bit SIMD integer shuffle and move operations. +.It Li LOAD_DISPATCH.RS +.Pq Event 13H , Umask 01H +Counts number of loads dispatched from the Reservation Station that bypass +the Memory Order Buffer. +.It Li LOAD_DISPATCH.RS_DELAYED +.Pq Event 13H , Umask 02H +Counts the number of delayed RS dispatches at the stage latch. If an RS +dispatch can not bypass to LB, it has another chance to dispatch from the +one-cycle delayed staging latch before it is written into the LB. +.It Li LOAD_DISPATCH.MOB +.Pq Event 13H , Umask 04H +Counts the number of loads dispatched from the Reservation Station to the +Memory Order Buffer. +.It Li LOAD_DISPATCH.ANY +.Pq Event 13H , Umask 07H +Counts all loads dispatched from the Reservation Station. +.It Li ARITH.CYCLES_DIV_BUSY +.Pq Event 14H , Umask 01H +Counts the number of cycles the divider is busy executing divide or square +root operations. The divide can be integer, X87 or Streaming SIMD Extensions +(SSE). The square root operation can be either X87 or SSE. +Set 'edge =1, invert=1, cmask=1' to count the number of divides. +Count may be incorrect When SMT is on. +.It Li ARITH.MUL +.Pq Event 14H , Umask 02H +Counts the number of multiply operations executed. This includes integer as +well as floating point multiply operations but excludes DPPS mul and MPSAD. +Count may be incorrect When SMT is on +.It Li INST_QUEUE_WRITES +.Pq Event 17H , Umask 01H +Counts the number of instructions written into the instruction queue every +cycle. +.It Li INST_DECODED.DEC0 +.Pq Event 18H , Umask 01H +Counts number of instructions that require decoder 0 to be decoded. Usually, +this means that the instruction maps to more than 1 uop +.It Li TWO_UOP_INSTS_DECODED +.Pq Event 19H , Umask 01H +An instruction that generates two uops was decoded +.It Li INST_QUEUE_WRITE_CYCLES +.Pq Event 1EH , Umask 01H +This event counts the number of cycles during which instructions are written +to the instruction queue. Dividing this counter by the number of +instructions written to the instruction queue (INST_QUEUE_WRITES) yields the +average number of instructions decoded each cycle. If this number is less +than four and the pipe stalls, this indicates that the decoder is failing to +decode enough instructions per cycle to sustain the 4-wide pipeline. +If SSE* instructions that are 6 bytes or longer arrive one after another, +then front end throughput may limit execution speed. In such case, +.It Li LSD_OVERFLOW +.Pq Event 20H , Umask 01H +Counts number of loops that cant stream from the instruction queue. +.It Li L2_RQSTS.LD_HIT +.Pq Event 24H , Umask 01H +Counts number of loads that hit the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. L2 loads can be rejected for +various reasons. Only non rejected loads are counted. +.It Li L2_RQSTS.LD_MISS +.Pq Event 24H , Umask 02H +Counts the number of loads that miss the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. +.It Li L2_RQSTS.LOADS +.Pq Event 24H , Umask 03H +Counts all L2 load requests. L2 loads include both L1D demand misses as well +as L1D prefetches. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Count includes WC memory requests, where the data is not fetched but the +permission to write the line is required. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.RFOS +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.IFETCH_HIT +.Pq Event 24H , Umask 10H +Counts number of instruction fetches that hit the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCH_MISS +.Pq Event 24H , Umask 20H +Counts number of instruction fetches that miss the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCHES +.Pq Event 24H , Umask 30H +Counts all instruction fetches. L2 instruction fetches include both L1I +demand misses as well as L1I instruction prefetches. +.It Li L2_RQSTS.PREFETCH_HIT +.Pq Event 24H , Umask 40H +Counts L2 prefetch hits for both code and data. +.It Li L2_RQSTS.PREFETCH_MISS +.Pq Event 24H , Umask 80H +Counts L2 prefetch misses for both code and data. +.It Li L2_RQSTS.PREFETCHES +.Pq Event 24H , Umask C0H +Counts all L2 prefetches for both code and data. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask AAH +Counts all L2 misses for both code and data. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +Counts all L2 requests for both code and data. +.It Li L2_DATA_RQSTS.DEMAND.I_STATE +.Pq Event 26H , Umask 01H +Counts number of L2 data demand loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D +demand misses and L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.S_STATE +.Pq Event 26H , Umask 02H +Counts number of L2 data demand loads where the cache line to be loaded is +in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +prefetches. +.It Li L2_DATA_RQSTS.DEMAND.E_STATE +.Pq Event 26H , Umask 04H +Counts number of L2 data demand loads where the cache line to be loaded is +in the E (exclusive) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.M_STATE +.Pq Event 26H , Umask 08H +Counts number of L2 data demand loads where the cache line to be loaded is +in the M (modified) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.MESI +.Pq Event 26H , Umask 0FH +Counts all L2 data demand requests. L2 demand loads are both L1D demand +misses and L1D prefetches. +.It Li L2_DATA_RQSTS.PREFETCH.I_STATE +.Pq Event 26H , Umask 10H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. +.It Li L2_DATA_RQSTS.PREFETCH.S_STATE +.Pq Event 26H , Umask 20H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the S (shared) state. A prefetch RFO will miss on an S state line, while +a prefetch read will hit on an S state line. +.It Li L2_DATA_RQSTS.PREFETCH.E_STATE +.Pq Event 26H , Umask 40H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the E (exclusive) state. +.It Li L2_DATA_RQSTS.PREFETCH.M_STATE +.Pq Event 26H , Umask 80H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the M (modified) state. +.It Li L2_DATA_RQSTS.PREFETCH.MESI +.Pq Event 26H , Umask F0H +Counts all L2 prefetch requests. +.It Li L2_DATA_RQSTS.ANY +.Pq Event 26H , Umask FFH +Counts all L2 data requests. +.It Li L2_WRITE.RFO.I_STATE +.Pq Event 27H , Umask 01H +Counts number of L2 demand store RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.S_STATE +.Pq Event 27H , Umask 02H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. +This is a demand RFO request +.It Li L2_WRITE.RFO.M_STATE +.Pq Event 27H , Umask 08H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.HIT +.Pq Event 27H , Umask 0EH +Counts number of L2 store RFO requests where the cache line to be loaded is +in either the S, E or M states. The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.MESI +.Pq Event 27H , Umask 0FH +Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.LOCK.I_STATE +.Pq Event 27H , Umask 10H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e. a cache miss. +.It Li L2_WRITE.LOCK.S_STATE +.Pq Event 27H , Umask 20H +Counts number of L2 lock RFO requests where the cache line to be loaded is +in the S (shared) state. +.It Li L2_WRITE.LOCK.E_STATE +.Pq Event 27H , Umask 40H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the E (exclusive) state. +.It Li L2_WRITE.LOCK.M_STATE +.Pq Event 27H , Umask 80H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the M (modified) state. +.It Li L2_WRITE.LOCK.HIT +.Pq Event 27H , Umask E0H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in either the S, E, or M state. +.It Li L2_WRITE.LOCK.MESI +.Pq Event 27H , Umask F0H +Counts all L2 demand lock RFO requests. +.It Li L1D_WB_L2.I_STATE +.Pq Event 28H , Umask 01H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the I (invalid) state, i.e. a cache miss. +.It Li L1D_WB_L2.S_STATE +.Pq Event 28H , Umask 02H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the S state. +.It Li L1D_WB_L2.E_STATE +.Pq Event 28H , Umask 04H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the E (exclusive) state. +.It Li L1D_WB_L2.M_STATE +.Pq Event 28H , Umask 08H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the M (modified) state. +.It Li L1D_WB_L2.MESI +.Pq Event 28H , Umask 0FH +Counts all L1 writebacks to the L2. +.It Li L3_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. The event count includes speculative traffic +but excludes cache line fills due to a L2 hardware-prefetch. Because cache +hierarchy, cache sizes and other implementation-specific characteristics; +value comparison to estimate performance differences is not recommended. +see Table A-1 +.It Li L3_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. The event count may include speculative traffic but excludes cache +line fills due to L2 hardware-prefetches. Because cache hierarchy, cache +sizes and other implementation-specific characteristics; value comparison to +estimate performance differences is not recommended. +see Table A-1 +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +see Table A-1 +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +Increments at the frequency of TSC when not halted. +see Table A-1 +.It Li L1D_CACHE_LD.I_STATE +.Pq Event 40H , Umask 01H +Counts L1 data cache read requests where the cache line to be loaded is in +the I (invalid) state, i.e. the read request missed the cache. +Counter 0, 1 only +.It Li L1D_CACHE_LD.S_STATE +.Pq Event 40H , Umask 02H +Counts L1 data cache read requests where the cache line to be loaded is in +the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.E_STATE +.Pq Event 40H , Umask 04H +Counts L1 data cache read requests where the cache line to be loaded is in +the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.M_STATE +.Pq Event 40H , Umask 08H +Counts L1 data cache read requests where the cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.MESI +.Pq Event 40H , Umask 0FH +Counts L1 data cache read requests. +Counter 0, 1 only +.It Li L1D_CACHE_ST.S_STATE +.Pq Event 41H , Umask 02H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.E_STATE +.Pq Event 41H , Umask 04H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.M_STATE +.Pq Event 41H , Umask 08H +Counts L1 data cache store RFO requests where cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.HIT +.Pq Event 42H , Umask 01H +Counts retired load locks that hit in the L1 data cache or hit in an already +allocated fill buffer. The lock portion of the load lock transaction must +hit in the L1D. +The initial load will pull the lock into the L1 data cache. Counter 0, 1 +only +.It Li L1D_CACHE_LOCK.S_STATE +.Pq Event 42H , Umask 02H +Counts L1 data cache retired load locks that hit the target cache line in +the shared state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.E_STATE +.Pq Event 42H , Umask 04H +Counts L1 data cache retired load locks that hit the target cache line in +the exclusive state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.M_STATE +.Pq Event 42H , Umask 08H +Counts L1 data cache retired load locks that hit the target cache line in +the modified state. +Counter 0, 1 only +.It Li L1D_ALL_REF.ANY +.Pq Event 43H , Umask 01H +Counts all references (uncached, speculated and retired) to the L1 data +cache, including all loads and stores with any memory types. The event +counts memory accesses only when they are actually performed. For example, a +load blocked by unknown store address and later performed is only counted +once. +The event does not include non- memory accesses, such as I/O accesses. +Counter 0, 1 only +.It Li L1D_ALL_REF.CACHEABLE +.Pq Event 43H , Umask 02H +Counts all data reads and writes (speculated and retired) from cacheable +memory, including locked operations. +Counter 0, 1 only +.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL +.Pq Event 48H , Umask 02H +Counts cycles of L1 data cache load fill buffers full. +Counter 0, 1 only +.It Li DTLB_MISSES.ANY +.Pq Event 49H , Umask 01H +Counts the number of misses in the STLB which causes a page walk. +.It Li DTLB_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Counts number of misses in the STLB which resulted in a completed page walk. +.It Li DTLB_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Counts the number of DTLB first level misses that hit in the second level +TLB. This event is only relevant if the core contains multiple DTLB levels. +.It Li LOAD_HIT_PRE +.Pq Event 4CH , Umask 01H +Counts load operations sent to the L1 data cache while a previous SSE +prefetch instruction to the same cache line has started prefetching but has +not yet finished. +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 01H +Counts number of hardware prefetch requests dispatched out of the prefetch +FIFO. +.It Li L1D_PREFETCH.MISS +.Pq Event 4EH , Umask 02H +Counts number of hardware prefetch requests that miss the L1D. There are two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 16:13:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F9D7106564A; Fri, 16 Apr 2010 16:13:49 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3CF8FC08; Fri, 16 Apr 2010 16: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 o3GGDnIC073326; Fri, 16 Apr 2010 16:13:49 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GGDnfF073319; Fri, 16 Apr 2010 16:13:49 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161613.o3GGDnfF073319@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 16:13: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: r206703 - in stable/7/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc 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, 16 Apr 2010 16:13:49 -0000 Author: fabient Date: Fri Apr 16 16:13:49 2010 New Revision: 206703 URL: http://svn.freebsd.org/changeset/base/206703 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/7/sys/dev/hwpmc/hwpmc_uncore.c - copied unchanged from r206089, head/sys/dev/hwpmc/hwpmc_uncore.c stable/7/sys/dev/hwpmc/hwpmc_uncore.h - copied unchanged from r206089, head/sys/dev/hwpmc/hwpmc_uncore.h Modified: stable/7/sys/amd64/include/pmc_mdep.h stable/7/sys/conf/files.amd64 stable/7/sys/conf/files.i386 stable/7/sys/conf/files.pc98 stable/7/sys/dev/hwpmc/hwpmc_core.c stable/7/sys/dev/hwpmc/hwpmc_core.h stable/7/sys/dev/hwpmc/hwpmc_intel.c stable/7/sys/dev/hwpmc/pmc_events.h stable/7/sys/i386/include/pmc_mdep.h stable/7/sys/modules/hwpmc/Makefile stable/7/sys/sys/pmc.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/7/sys/amd64/include/pmc_mdep.h Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/amd64/include/pmc_mdep.h Fri Apr 16 16:13:49 2010 (r206703) @@ -43,17 +43,20 @@ struct pmc_mdep; #include #include #include +#include /* * Intel processors implementing V2 and later of the Intel performance * measurement architecture have PMCs of the following classes: TSC, - * IAF and IAP. + * IAF, IAP, UCF and UCP. */ #define PMC_MDEP_CLASS_INDEX_TSC 0 #define PMC_MDEP_CLASS_INDEX_K8 1 #define PMC_MDEP_CLASS_INDEX_P4 1 #define PMC_MDEP_CLASS_INDEX_IAP 1 #define PMC_MDEP_CLASS_INDEX_IAF 2 +#define PMC_MDEP_CLASS_INDEX_UCP 3 +#define PMC_MDEP_CLASS_INDEX_UCF 4 /* * On the amd64 platform we support the following PMCs. @@ -63,12 +66,16 @@ struct pmc_mdep; * PIV Intel P4/HTT and P4/EMT64 * IAP Intel Core/Core2/Atom CPUs in 64 bits mode. * IAF Intel fixed-function PMCs in Core2 and later CPUs. + * UCP Intel Uncore programmable PMCs. + * UCF Intel Uncore fixed-function PMCs. */ union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; struct pmc_md_iaf_op_pmcallocate pm_iaf; struct pmc_md_iap_op_pmcallocate pm_iap; + struct pmc_md_ucf_op_pmcallocate pm_ucf; + struct pmc_md_ucp_op_pmcallocate pm_ucp; struct pmc_md_p4_op_pmcallocate pm_p4; uint64_t __pad[4]; }; @@ -83,6 +90,8 @@ union pmc_md_pmc { struct pmc_md_amd_pmc pm_amd; struct pmc_md_iaf_pmc pm_iaf; struct pmc_md_iap_pmc pm_iap; + struct pmc_md_ucf_pmc pm_ucf; + struct pmc_md_ucp_pmc pm_ucp; struct pmc_md_p4_pmc pm_p4; }; Modified: stable/7/sys/conf/files.amd64 ============================================================================== --- stable/7/sys/conf/files.amd64 Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/conf/files.amd64 Fri Apr 16 16:13:49 2010 (r206703) @@ -184,6 +184,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc Modified: stable/7/sys/conf/files.i386 ============================================================================== --- stable/7/sys/conf/files.i386 Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/conf/files.i386 Fri Apr 16 16:13:49 2010 (r206703) @@ -184,6 +184,7 @@ dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/7/sys/conf/files.pc98 ============================================================================== --- stable/7/sys/conf/files.pc98 Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/conf/files.pc98 Fri Apr 16 16:13:49 2010 (r206703) @@ -105,6 +105,7 @@ dev/fe/if_fe_cbus.c optional fe isa dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc +dev/hwpmc/hwpmc_uncore.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 15:45:09 2010 (r206702) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Fri Apr 16 16:13:49 2010 (r206703) @@ -534,10 +534,12 @@ struct iap_event_descr { #define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ #define IAP_F_CA (1 << 3) /* CPU: Atom */ #define IAP_F_I7 (1 << 4) /* CPU: Core i7 */ -#define IAP_F_FM (1 << 5) /* Fixed mask */ +#define IAP_F_I7O (1 << 4) /* CPU: Core i7 (old) */ +#define IAP_F_WM (1 << 5) /* CPU: Westmere */ +#define IAP_F_FM (1 << 6) /* Fixed mask */ -#define IAP_F_ALLCPUS \ - (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA | IAP_F_I7) +#define IAP_F_ALLCPUSCORE2 \ + (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) /* Sub fields of UMASK that this event supports. */ #define IAP_M_CORE (1 << 0) /* Core specificity */ @@ -570,151 +572,319 @@ static struct iap_event_descr iap_events .iap_flags = (FLAGS) \ } + IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM), + IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM), + IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | + IAP_F_CC2E | IAP_F_CA), + IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM), + IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_WM), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), + IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), + IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(12H_01H, 0x12, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(12H_81H, 0x12, 0x81, IAP_F_FM | IAP_F_CA), - IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(13H_00H, 0x13, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(13H_01H, 0x13, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM), + IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_00H, 0x19, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(19H_01H, 0x19, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(19H_02H, 0x19, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(20H_01H, 0x20, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(21H, 0x21, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(22H, 0x22, IAP_M_CORE, IAP_F_CC2), - IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUS), - IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(26H, 0x26, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CA | IAP_F_CC2), - IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(2AH, 0x2A, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), IAPDESCR(2BH, 0x2B, IAP_M_CORE | IAP_M_MESI, IAP_F_CA | IAP_F_CC2), IAPDESCR(2EH, 0x2E, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), - IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), + IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), + IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, - IAP_F_ALLCPUS), + IAP_F_ALLCPUSCORE2), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(3AH, 0x3A, IAP_M_TRANSITION, IAP_F_CC), IAPDESCR(3AH_00H, 0x3A, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(40H, 0x40, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(40H_0FH, 0x40, 0x0F, IAP_F_FM | IAP_F_I7), IAPDESCR(40H_21H, 0x40, 0x21, IAP_F_FM | IAP_F_CA), IAPDESCR(41H, 0x41, IAP_M_MESI, IAP_F_CC | IAP_F_CC2), + IAPDESCR(41H_01H, 0x41, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(41H_02H, 0x41, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_04H, 0x41, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_08H, 0x41, 0x08, IAP_F_FM | IAP_F_I7), + IAPDESCR(41H_0FH, 0x41, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(41H_22H, 0x41, 0x22, IAP_F_FM | IAP_F_CA), - IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUS), + IAPDESCR(42H, 0x42, IAP_M_MESI, IAP_F_ALLCPUSCORE2), + IAPDESCR(42H_01H, 0x42, 0x01, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_02H, 0x42, 0x02, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_04H, 0x42, 0x04, IAP_F_FM | IAP_F_I7), + IAPDESCR(42H_08H, 0x42, 0x08, IAP_F_FM | IAP_F_I7), IAPDESCR(42H_10H, 0x42, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(43H_01H, 0x43, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7), + IAPDESCR(43H_02H, 0x43, 0x02, IAP_F_FM | IAP_F_CA | + IAP_F_CC2 | IAP_F_I7), IAPDESCR(44H_02H, 0x44, 0x02, IAP_F_FM | IAP_F_CC), - IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(45H_0FH, 0x45, 0x0F, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(46H_00H, 0x46, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM), + IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), + IAPDESCR(4BH_02H, 0x4B, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_03H, 0x4B, 0x03, IAP_F_FM | IAP_F_CC), + IAPDESCR(4BH_08H, 0x4B, 0x08, IAP_F_FM | IAP_F_I7O), IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(4EH_01H, 0x4E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_02H, 0x4E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(4EH_04H, 0x4E, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(4EH_10H, 0x4E, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4FH_00H, 0x4F, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + + IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(51H_08H, 0x51, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(52H_01H, 0x52, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUS), + IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), IAPDESCR(62H_00H, 0x62, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(63H, 0x63, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), + IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -723,16 +893,18 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(65H, 0x65, IAP_M_CORE, IAP_F_CC), - IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(66H, 0x66, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(67H, 0x67, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(67H, 0x67, IAP_M_AGENT, IAP_F_CC), - IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), - IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6BH, 0x6B, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + + IAPDESCR(6CH, 0x6C, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), + IAPDESCR(6CH_01H, 0x6C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(6DH, 0x6D, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(6DH, 0x6D, IAP_M_CORE, IAP_F_CC), @@ -757,47 +929,89 @@ static struct iap_event_descr iap_events IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), - IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUS), + IAPDESCR(7DH, 0x7D, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(7EH, 0x7E, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(7EH_00H, 0x7E, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(7FH, 0x7F, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), - IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7), - IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(80H_00H, 0x80, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(81H_02H, 0x81, 0x02, IAP_F_FM | IAP_F_I7O), + IAPDESCR(82H_01H, 0x82, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(82H_02H, 0x82, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_04H, 0x82, 0x04, IAP_F_FM | IAP_F_CA), IAPDESCR(82H_10H, 0x82, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), - - IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - - IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O), + IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_08H, 0x87, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8CH_00H, 0x8C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8DH_00H, 0x8D, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8EH_00H, 0x8E, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(8FH_00H, 0x8F, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + + IAPDESCR(90H_00H, 0x90, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(91H_00H, 0x91, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(92H_00H, 0x92, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -811,6 +1025,18 @@ static struct iap_event_descr iap_events IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -820,18 +1046,42 @@ static struct iap_event_descr iap_events IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7), - - IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), + IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + + IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_1FH, 0xB1, 0x1F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_20H, 0xB1, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_3FH, 0xB1, 0x3F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_40H, 0xB1, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B1H_80H, 0xB1, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), + + IAPDESCR(B2H_01H, 0xB2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B3H_01H, 0xB3, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_02H, 0xB3, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_04H, 0xB3, 0x04, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_WM | IAP_F_I7O), + IAPDESCR(B3H_08H, 0xB3, 0x08, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_10H, 0xB3, 0x10, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(B3H_20H, 0xB3, 0x20, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B3H_81H, 0xB3, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_82H, 0xB3, 0x82, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_84H, 0xB3, 0x84, IAP_F_FM | IAP_F_CA), @@ -839,10 +1089,28 @@ static struct iap_event_descr iap_events IAPDESCR(B3H_90H, 0xB3, 0x90, IAP_F_FM | IAP_F_CA), IAPDESCR(B3H_A0H, 0xB3, 0xA0, IAP_F_FM | IAP_F_CA), - IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(B4H_01H, 0xB4, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_02H, 0xB4, 0x02, IAP_F_FM | IAP_F_WM), + IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), + + IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_02H, 0xB8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(B8H_04H, 0xB8, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(BAH_01H, 0xBA, 0x01, IAP_F_FM | IAP_F_I7O), + IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), IAPDESCR(C1H_00H, 0xC1, 0x00, IAP_F_FM | IAP_F_CC), @@ -850,43 +1118,64 @@ static struct iap_event_descr iap_events IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_08H, 0xC2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_0FH, 0xC2, 0x0F, IAP_F_FM | IAP_F_CC2), IAPDESCR(C2H_10H, 0xC2, 0x10, IAP_F_FM | IAP_F_CA), IAPDESCR(C3H_00H, 0xC3, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - - IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), + + IAPDESCR(C4H_00H, 0xC4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_01H, 0xC4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_02H, 0xC4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C4H_04H, 0xC4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C4H_08H, 0xC4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), - IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C6H_01H, 0xC6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C6H_02H, 0xC6, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C7H_00H, 0xC7, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(C7H_01H, 0xC7, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_02H, 0xC7, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_04H, 0xC7, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_08H, 0xC7, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(C9H_00H, 0xC9, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -894,36 +1183,59 @@ static struct iap_event_descr iap_events IAPDESCR(CAH_04H, 0xCA, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(CAH_08H, 0xCA, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_02H, 0xCB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_04H, 0xCB, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_08H, 0xCB, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | + IAP_F_WM), + IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_00H, 0xCC, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(CCH_01H, 0xCC, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_02H, 0xCC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), - IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM), + IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + + IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), + IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E), - IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D4H_02H, 0xD4, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_04H, 0xD4, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_08H, 0xD4, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D4H_0FH, 0xD4, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7), + IAPDESCR(D5H_01H, 0xD5, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_I7 | IAP_F_WM), IAPDESCR(D5H_02H, 0xD5, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_04H, 0xD5, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(D5H_08H, 0xD5, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -947,6 +1259,7 @@ static struct iap_event_descr iap_events IAPDESCR(DAH_02H, 0xDA, 0x02, IAP_F_FM | IAP_F_CC), IAPDESCR(DBH_00H, 0xDB, 0x00, IAP_F_FM | IAP_F_CC), + IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(DCH_01H, 0xDC, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(DCH_02H, 0xDC, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -956,276 +1269,76 @@ static struct iap_event_descr iap_events IAPDESCR(DCH_1FH, 0xDC, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(E0H_00H, 0xE0, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7), + IAPDESCR(E0H_01H, 0xE0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAP_F_WM), IAPDESCR(E2H_00H, 0xE2, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(E6H_00H, 0xE6, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA), + IAPDESCR(E4H_00H, 0xE4, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(F0H_00H, 0xF0, 0x00, IAP_F_FM | IAP_F_ALLCPUS), - IAPDESCR(F8H_00H, 0xF8, 0x00, IAP_F_FM | IAP_F_ALLCPUS), + IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - /* Added with nehalem. */ - IAPDESCR(02H_01H, 0x02, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_01H, 0x06, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_02H, 0x06, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_04H, 0x06, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_08H, 0x06, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_04H, 0x09, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(09H_08H, 0x09, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_01H, 0x0B, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0BH_02H, 0x0B, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_08H, 0x0F, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_10H, 0x0F, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(0FH_20H, 0x0F, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_02H, 0x12, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_04H, 0x12, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_08H, 0x12, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_10H, 0x12, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_20H, 0x12, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(12H_40H, 0x12, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_02H, 0x13, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_04H, 0x13, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(13H_07H, 0x13, 0x07, IAP_F_FM | IAP_F_I7), - IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_01H, 0x1D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_02H, 0x1D, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(1DH_04H, 0x1D, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(1EH_01H, 0x1E, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_01H, 0x26, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_02H, 0x26, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_04H, 0x26, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_08H, 0x26, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_0FH, 0x26, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_10H, 0x26, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_20H, 0x26, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_40H, 0x26, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_80H, 0x26, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_F0H, 0x26, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7), - IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7), - IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7), - IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_01H, 0x40, 0x01, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_02H, 0x40, 0x02, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_04H, 0x40, 0x04, IAP_F_FM | IAP_F_I7), - IAPDESCR(40H_08H, 0x40, 0x08, IAP_F_FM | IAP_F_I7), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 16:15:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5731B106566C; Fri, 16 Apr 2010 16:15:30 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 431AA8FC20; Fri, 16 Apr 2010 16:15: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 o3GGFUi9073749; Fri, 16 Apr 2010 16:15:30 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GGFUXf073744; Fri, 16 Apr 2010 16:15:30 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201004161615.o3GGFUXf073744@svn.freebsd.org> From: Fabien Thomas Date: Fri, 16 Apr 2010 16:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206704 - stable/7/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 16:15:30 -0000 Author: fabient Date: Fri Apr 16 16:15:30 2010 New Revision: 206704 URL: http://svn.freebsd.org/changeset/base/206704 Log: MFC r206089, r206684: - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Added: stable/7/lib/libpmc/pmc.corei7.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7.3 stable/7/lib/libpmc/pmc.corei7uc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.corei7uc.3 stable/7/lib/libpmc/pmc.ucf.3 - copied unchanged from r206089, head/lib/libpmc/pmc.ucf.3 stable/7/lib/libpmc/pmc.westmere.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmere.3 stable/7/lib/libpmc/pmc.westmereuc.3 - copied unchanged from r206089, head/lib/libpmc/pmc.westmereuc.3 Modified: stable/7/lib/libpmc/Makefile stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/Makefile ============================================================================== --- stable/7/lib/libpmc/Makefile Fri Apr 16 16:13:49 2010 (r206703) +++ stable/7/lib/libpmc/Makefile Fri Apr 16 16:15:30 2010 (r206704) @@ -28,11 +28,16 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 +MAN+= pmc.corei7.3 +MAN+= pmc.corei7uc.3 +MAN+= pmc.westmere.3 +MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 MLINKS+= \ Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Fri Apr 16 16:13:49 2010 (r206703) +++ stable/7/lib/libpmc/libpmc.c Fri Apr 16 16:15:30 2010 (r206704) @@ -54,6 +54,10 @@ static int iaf_allocate_pmc(enum pmc_eve struct pmc_op_pmcallocate *_pmc_config); static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int ucf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int ucp_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -132,6 +136,7 @@ PMC_CLASSDEP_TABLE(k8, K8); PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); +PMC_CLASSDEP_TABLE(ucf, UCF); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -157,6 +162,21 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr westmere_event_table[] = +{ + __PMC_EV_ALIAS_WESTMERE() +}; + +static const struct pmc_event_descr corei7uc_event_table[] = +{ + __PMC_EV_ALIAS_COREI7UC() +}; + +static const struct pmc_event_descr westmereuc_event_table[] = +{ + __PMC_EV_ALIAS_WESTMEREUC() +}; + /* * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) * @@ -170,7 +190,8 @@ static const struct pmc_event_descr core PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); @@ -201,6 +222,10 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); +PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); +PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); +PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif #if defined(__i386__) PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); @@ -281,7 +306,7 @@ struct pmc_masks { const uint32_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } -#define NULLMASK PMCMASK(NULL,0) +#define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int @@ -474,6 +499,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define westmere_aliases core2_aliases +#define westmere_aliases_without_iaf core2_aliases_without_iaf #define IAF_KW_OS "os" #define IAF_KW_USR "usr" @@ -524,6 +551,7 @@ iaf_allocate_pmc(enum pmc_event pe, char #define IAP_KW_SNOOPTYPE "snooptype" #define IAP_KW_TRANSITION "trans" #define IAP_KW_USR "usr" +#define IAP_KW_RSP "rsp" static struct pmc_masks iap_core_mask[] = { PMCMASK(all, (0x3 << 14)), @@ -571,19 +599,38 @@ static struct pmc_masks iap_transition_m NULLMASK }; +static struct pmc_masks iap_rsp_mask[] = { + PMCMASK(DMND_DATA_RD, (1 << 0)), + PMCMASK(DMND_RFO, (1 << 1)), + PMCMASK(DMND_IFETCH, (1 << 2)), + PMCMASK(WB, (1 << 3)), + PMCMASK(PF_DATA_RD, (1 << 4)), + PMCMASK(PF_RFO, (1 << 5)), + PMCMASK(PF_IFETCH, (1 << 6)), + PMCMASK(OTHER, (1 << 7)), + PMCMASK(UNCORE_HIT, (1 << 8)), + PMCMASK(OTHER_CORE_HIT_SNP, (1 << 9)), + PMCMASK(OTHER_CORE_HITM, (1 << 10)), + PMCMASK(REMOTE_CACHE_FWD, (1 << 12)), + PMCMASK(REMOTE_DRAM, (1 << 13)), + PMCMASK(LOCAL_DRAM, (1 << 14)), + PMCMASK(NON_DRAM, (1 << 15)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask; + uint32_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_QUALIFIER); pmc_config->pm_md.pm_iap.pm_iap_config = 0; - cachestate = evmask = 0; + cachestate = evmask = rsp = 0; /* Parse additional modifiers if present */ while ((p = strsep(&ctrspec, ",")) != NULL) { @@ -630,8 +677,7 @@ iap_allocate_pmc(enum pmc_event pe, char return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || - cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -640,6 +686,12 @@ iap_allocate_pmc(enum pmc_event pe, char &evmask); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || + cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + } else + return (-1); } else return (-1); @@ -672,6 +724,69 @@ iap_allocate_pmc(enum pmc_event pe, char } pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + pmc_config->pm_md.pm_iap.pm_iap_rsp = rsp; + + return (0); +} + +/* + * Intel Uncore. + */ + +static int +ucf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + (void) pe; + (void) ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_ucf.pm_ucf_flags = 0; + + return (0); +} + +#define UCP_KW_CMASK "cmask" +#define UCP_KW_EDGE "edge" +#define UCP_KW_INV "inv" + +static int +ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int count, n; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_ucp.pm_ucp_config = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, UCP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_ucp.pm_ucp_config |= + UCP_CMASK(count); + } else if (KWMATCH(p, UCP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, UCP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } return (0); } @@ -2309,6 +2424,31 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + count = PMC_EVENT_TABLE_SIZE(westmere); + break; + } + break; + case PMC_CLASS_UCF: + ev = ucf_event_table; + count = PMC_EVENT_TABLE_SIZE(ucf); + break; + case PMC_CLASS_UCP: + /* + * Return the most appropriate set of event name + * spellings for the current CPU. + */ + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + count = PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + count = PMC_EVENT_TABLE_SIZE(westmereuc); + break; } break; case PMC_CLASS_TSC: @@ -2514,8 +2654,15 @@ pmc_init(void) PMC_MDEP_INIT_INTEL_V2(core2); break; case PMC_CPU_INTEL_COREI7: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &westmereuc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(westmere); + break; case PMC_CPU_INTEL_PIV: PMC_MDEP_INIT(p4); pmc_class_table[n] = &p4_class_table_descr; @@ -2618,10 +2765,30 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmere_event_table; + evfence = westmere_event_table + PMC_EVENT_TABLE_SIZE(westmere); + break; + default: /* Unknown CPU type. */ + break; + } + } else if (pe >= PMC_EV_UCF_FIRST && pe <= PMC_EV_UCF_LAST) { + ev = ucf_event_table; + evfence = ucf_event_table + PMC_EVENT_TABLE_SIZE(ucf); + } else if (pe >= PMC_EV_UCP_FIRST && pe <= PMC_EV_UCP_LAST) { + switch (cpu) { + case PMC_CPU_INTEL_COREI7: + ev = corei7uc_event_table; + evfence = corei7uc_event_table + PMC_EVENT_TABLE_SIZE(corei7uc); + break; + case PMC_CPU_INTEL_WESTMERE: + ev = westmereuc_event_table; + evfence = westmereuc_event_table + PMC_EVENT_TABLE_SIZE(westmereuc); + break; default: /* Unknown CPU type. */ break; } - } if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { + } else if (pe >= PMC_EV_K7_FIRST && pe <= PMC_EV_K7_LAST) { ev = k7_event_table; evfence = k7_event_table + PMC_EVENT_TABLE_SIZE(k7); } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { Copied: stable/7/lib/libpmc/pmc.corei7.3 (from r206089, head/lib/libpmc/pmc.corei7.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libpmc/pmc.corei7.3 Fri Apr 16 16:15:30 2010 (r206704, copy of r206089, head/lib/libpmc/pmc.corei7.3) @@ -0,0 +1,1581 @@ +.\" Copyright (c) 2010 Fabien Thomas. 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 Joseph Koshy ``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 Joseph Koshy 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 March 24, 2010 +.Os +.Dt PMC.COREI7 3 +.Sh NAME +.Nm pmc.corei7 +.Nd measurement events for +.Tn Intel +.Tn Core i7 and Xeon 5500 +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Core i7" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Core i7 and Xeon 5500 PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developes Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-033US" +.%D December 2009 +.%Q "Intel Corporation" +.Re +.Ss COREI7 AND XEON 5500 FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. +.Ss COREI7 AND XEON 5500 PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership +(RFO) requests generated by a write to data cacheline. Does not +count L2 RFO. +.It Li DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline +reads. Does not count L2 code read prefetches. +WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li OTHER +Counts one of the following transaction types, including L3 invalidate, +I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, +lock, unlock, split lock. +.It Li UNCORE_HIT +L3 Hit: local or remote home requests that hit L3 cache in the uncore +with no coherency actions required (snooping). +.It Li OTHER_CORE_HIT_SNP +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where no modified +copies were found (clean). +.It Li OTHER_CORE_HITM +L3 Hit: local or remote home requests that hit L3 cache in the uncore +and was serviced by another core with a cross core snoop where modified +copies were found (HITM). +.It Li REMOTE_CACHE_FWD +L3 Miss: local homed requests that missed the L3 cache and was serviced +by forwarded data following a cross package snoop where no modified +copies found. (Remote home requests are not counted) +.It Li REMOTE_DRAM +L3 Miss: remote home requests that missed the L3 cache and were serviced +by remote DRAM. +.It Li LOCAL_DRAM +L3 Miss: local home requests that missed the L3 cache and were serviced +by local DRAM. +.It Li NON_DRAM +Non-DRAM requests that were serviced by IOH. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Core i7 and Xeon 5500 programmable PMCs support the following events: +.Bl -tag -width indent +.It Li SB_DRAIN.ANY +.Pq Event 04H , Umask 07H +Counts the number of store buffer drains. +.It Li STORE_BLOCKS.AT_RET +.Pq Event 06H , Umask 04H +Counts number of loads delayed with at-Retirement block code. The following +loads need to be executed at retirement and wait for all senior stores on +the same thread to be drained: load splitting across 4K boundary (page +split), load accessing uncacheable (UC or USWC) memory, load lock, and load +with page table in UC or USWC memory region. +.It Li STORE_BLOCKS.L1D_BLOCK +.Pq Event 06H , Umask 08H +Cacheable loads delayed with L1D block code +.It Li PARTIAL_ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +Counts false dependency due to partial address aliasing +.It Li DTLB_LOAD_MISSES.ANY +.Pq Event 08H , Umask 01H +Counts all load misses that cause a page walk +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 02H +Counts number of completed page walks due to load miss in the STLB. +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 10H +Number of cache load STLB hits +.It Li DTLB_LOAD_MISSES.PDE_MISS +.Pq Event 08H , Umask 20H +Number of DTLB cache load misses where the low part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.PDP_MISS +.Pq Event 08H , Umask 40H +Number of DTLB cache load misses where the high part of the linear to +physical address translation was missed. +.It Li DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED +.Pq Event 08H , Umask 80H +Counts number of completed large page walks due to load miss in the STLB. +.It Li MEM_INST_RETIRED.LOADS +.Pq Event 0BH , Umask 01H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.STORES +.Pq Event 0BH , Umask 02H +Counts the number of instructions with an architecturally-visible store +retired on the architected path. +In conjunction with ld_lat facility +.It Li MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD +.Pq Event 0BH , Umask 10H +Counts the number of instructions exceeding the latency specified with +ld_lat facility. +In conjunction with ld_lat facility +.It Li MEM_STORE_RETIRED.DTLB_MISS +.Pq Event 0CH , Umask 01H +The event counts the number of retired stores that missed the DTLB. The DTLB +miss is not counted if the store operation causes a fault. Does not counter +prefetches. Counts both primary and secondary misses to the TLB +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Counts the number of Uops issued by the Register Allocation Table to the +Reservation Station, i.e. the UOPs issued from the front end to the back +end. +.It Li UOPS_ISSUED.STALLED_CYCLES +.Pq Event 0EH , Umask 01H +Counts the number of cycles no Uops issued by the Register Allocation Table +to the Reservation Station, i.e. the UOPs issued from the front end to the +back end. +set invert=1, cmask = 1 +.It Li UOPS_ISSUED.FUSED +.Pq Event 0EH , Umask 02H +Counts the number of fused Uops that were issued from the Register +Allocation Table to the Reservation Station. +.It Li MEM_UNCORE_RETIRED.L3_DATA_MISS_UNKNOWN +.Pq Event 0FH , Umask 01H +Counts number of memory load instructions retired where the memory reference +missed L3 and data source is unknown. +Available only for CPUID signature 06_2EH +.It Li MEM_UNCORE_RETIRED.OTHER_CORE_L2_HITM +.Pq Event 0FH , Umask 02H +Counts number of memory load instructions retired where the memory reference +hit modified data in a sibling core residing on the same socket. +.It Li MEM_UNCORE_RETIRED.REMOTE_CACHE_LOCAL_HOME_HIT +.Pq Event 0FH , Umask 08H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and HIT in a remote socket's cache. Only +counts locally homed lines. +.It Li MEM_UNCORE_RETIRED.REMOTE_DRAM +.Pq Event 0FH , Umask 10H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and was remotely homed. This includes both +DRAM access and HITM in a remote socket's cache for remotely homed lines. +.It Li MEM_UNCORE_RETIRED.LOCAL_DRAM +.Pq Event 0FH , Umask 20H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and required a local socket memory +reference. This includes locally homed cachelines that were in a modified +state in another socket. +.It Li MEM_UNCORE_RETIRED.UNCACHEABLE +.Pq Event 0FH , Umask 80H +Counts number of memory load instructions retired where the memory reference +missed the L1, L2 and L3 caches and to perform I/O. +Available only for CPUID signature 06_2EH +.It Li FP_COMP_OPS_EXE.X87 +.Pq Event 10H , Umask 01H +Counts the number of FP Computational Uops Executed. The number of FADD, +FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer +DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +of a transcendental flow from a separate FADD instruction. +.It Li FP_COMP_OPS_EXE.MMX +.Pq Event 10H , Umask 02H +Counts number of MMX Uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP +.Pq Event 10H , Umask 04H +Counts number of SSE and SSE2 FP uops executed. +.It Li FP_COMP_OPS_EXE.SSE2_INTEGER +.Pq Event 10H , Umask 08H +Counts number of SSE2 integer uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_PACKED +.Pq Event 10H , Umask 10H +Counts number of SSE FP packed uops executed. +.It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR +.Pq Event 10H , Umask 20H +Counts number of SSE FP scalar uops executed. +.It Li FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION +.Pq Event 10H , Umask 40H +Counts number of SSE* FP single precision uops executed. +.It Li FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION +.Pq Event 10H , Umask 80H +Counts number of SSE* FP double precision uops executed. +.It Li SIMD_INT_128.PACKED_MPY +.Pq Event 12H , Umask 01H +Counts number of 128 bit SIMD integer multiply operations. +.It Li SIMD_INT_128.PACKED_SHIFT +.Pq Event 12H , Umask 02H +Counts number of 128 bit SIMD integer shift operations. +.It Li SIMD_INT_128.PACK +.Pq Event 12H , Umask 04H +Counts number of 128 bit SIMD integer pack operations. +.It Li SIMD_INT_128.UNPACK +.Pq Event 12H , Umask 08H +Counts number of 128 bit SIMD integer unpack operations. +.It Li SIMD_INT_128.PACKED_LOGICAL +.Pq Event 12H , Umask 10H +Counts number of 128 bit SIMD integer logical operations. +.It Li SIMD_INT_128.PACKED_ARITH +.Pq Event 12H , Umask 20H +Counts number of 128 bit SIMD integer arithmetic operations. +.It Li SIMD_INT_128.SHUFFLE_MOVE +.Pq Event 12H , Umask 40H +Counts number of 128 bit SIMD integer shuffle and move operations. +.It Li LOAD_DISPATCH.RS +.Pq Event 13H , Umask 01H +Counts number of loads dispatched from the Reservation Station that bypass +the Memory Order Buffer. +.It Li LOAD_DISPATCH.RS_DELAYED +.Pq Event 13H , Umask 02H +Counts the number of delayed RS dispatches at the stage latch. If an RS +dispatch can not bypass to LB, it has another chance to dispatch from the +one-cycle delayed staging latch before it is written into the LB. +.It Li LOAD_DISPATCH.MOB +.Pq Event 13H , Umask 04H +Counts the number of loads dispatched from the Reservation Station to the +Memory Order Buffer. +.It Li LOAD_DISPATCH.ANY +.Pq Event 13H , Umask 07H +Counts all loads dispatched from the Reservation Station. +.It Li ARITH.CYCLES_DIV_BUSY +.Pq Event 14H , Umask 01H +Counts the number of cycles the divider is busy executing divide or square +root operations. The divide can be integer, X87 or Streaming SIMD Extensions +(SSE). The square root operation can be either X87 or SSE. +Set 'edge =1, invert=1, cmask=1' to count the number of divides. +Count may be incorrect When SMT is on. +.It Li ARITH.MUL +.Pq Event 14H , Umask 02H +Counts the number of multiply operations executed. This includes integer as +well as floating point multiply operations but excludes DPPS mul and MPSAD. +Count may be incorrect When SMT is on +.It Li INST_QUEUE_WRITES +.Pq Event 17H , Umask 01H +Counts the number of instructions written into the instruction queue every +cycle. +.It Li INST_DECODED.DEC0 +.Pq Event 18H , Umask 01H +Counts number of instructions that require decoder 0 to be decoded. Usually, +this means that the instruction maps to more than 1 uop +.It Li TWO_UOP_INSTS_DECODED +.Pq Event 19H , Umask 01H +An instruction that generates two uops was decoded +.It Li INST_QUEUE_WRITE_CYCLES +.Pq Event 1EH , Umask 01H +This event counts the number of cycles during which instructions are written +to the instruction queue. Dividing this counter by the number of +instructions written to the instruction queue (INST_QUEUE_WRITES) yields the +average number of instructions decoded each cycle. If this number is less +than four and the pipe stalls, this indicates that the decoder is failing to +decode enough instructions per cycle to sustain the 4-wide pipeline. +If SSE* instructions that are 6 bytes or longer arrive one after another, +then front end throughput may limit execution speed. In such case, +.It Li LSD_OVERFLOW +.Pq Event 20H , Umask 01H +Counts number of loops that cant stream from the instruction queue. +.It Li L2_RQSTS.LD_HIT +.Pq Event 24H , Umask 01H +Counts number of loads that hit the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. L2 loads can be rejected for +various reasons. Only non rejected loads are counted. +.It Li L2_RQSTS.LD_MISS +.Pq Event 24H , Umask 02H +Counts the number of loads that miss the L2 cache. L2 loads include both L1D +demand misses as well as L1D prefetches. +.It Li L2_RQSTS.LOADS +.Pq Event 24H , Umask 03H +Counts all L2 load requests. L2 loads include both L1D demand misses as well +as L1D prefetches. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Count includes WC memory requests, where the data is not fetched but the +permission to write the line is required. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. L2 RFO +requests include both L1D demand RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.RFOS +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +RFO misses as well as L1D RFO prefetches. +.It Li L2_RQSTS.IFETCH_HIT +.Pq Event 24H , Umask 10H +Counts number of instruction fetches that hit the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCH_MISS +.Pq Event 24H , Umask 20H +Counts number of instruction fetches that miss the L2 cache. L2 instruction +fetches include both L1I demand misses as well as L1I instruction +prefetches. +.It Li L2_RQSTS.IFETCHES +.Pq Event 24H , Umask 30H +Counts all instruction fetches. L2 instruction fetches include both L1I +demand misses as well as L1I instruction prefetches. +.It Li L2_RQSTS.PREFETCH_HIT +.Pq Event 24H , Umask 40H +Counts L2 prefetch hits for both code and data. +.It Li L2_RQSTS.PREFETCH_MISS +.Pq Event 24H , Umask 80H +Counts L2 prefetch misses for both code and data. +.It Li L2_RQSTS.PREFETCHES +.Pq Event 24H , Umask C0H +Counts all L2 prefetches for both code and data. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask AAH +Counts all L2 misses for both code and data. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +Counts all L2 requests for both code and data. +.It Li L2_DATA_RQSTS.DEMAND.I_STATE +.Pq Event 26H , Umask 01H +Counts number of L2 data demand loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D +demand misses and L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.S_STATE +.Pq Event 26H , Umask 02H +Counts number of L2 data demand loads where the cache line to be loaded is +in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +prefetches. +.It Li L2_DATA_RQSTS.DEMAND.E_STATE +.Pq Event 26H , Umask 04H +Counts number of L2 data demand loads where the cache line to be loaded is +in the E (exclusive) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.M_STATE +.Pq Event 26H , Umask 08H +Counts number of L2 data demand loads where the cache line to be loaded is +in the M (modified) state. L2 demand loads are both L1D demand misses and +L1D prefetches. +.It Li L2_DATA_RQSTS.DEMAND.MESI +.Pq Event 26H , Umask 0FH +Counts all L2 data demand requests. L2 demand loads are both L1D demand +misses and L1D prefetches. +.It Li L2_DATA_RQSTS.PREFETCH.I_STATE +.Pq Event 26H , Umask 10H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the I (invalid) state, i.e. a cache miss. +.It Li L2_DATA_RQSTS.PREFETCH.S_STATE +.Pq Event 26H , Umask 20H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the S (shared) state. A prefetch RFO will miss on an S state line, while +a prefetch read will hit on an S state line. +.It Li L2_DATA_RQSTS.PREFETCH.E_STATE +.Pq Event 26H , Umask 40H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the E (exclusive) state. +.It Li L2_DATA_RQSTS.PREFETCH.M_STATE +.Pq Event 26H , Umask 80H +Counts number of L2 prefetch data loads where the cache line to be loaded is +in the M (modified) state. +.It Li L2_DATA_RQSTS.PREFETCH.MESI +.Pq Event 26H , Umask F0H +Counts all L2 prefetch requests. +.It Li L2_DATA_RQSTS.ANY +.Pq Event 26H , Umask FFH +Counts all L2 data requests. +.It Li L2_WRITE.RFO.I_STATE +.Pq Event 27H , Umask 01H +Counts number of L2 demand store RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.S_STATE +.Pq Event 27H , Umask 02H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch,. +This is a demand RFO request +.It Li L2_WRITE.RFO.M_STATE +.Pq Event 27H , Umask 08H +Counts number of L2 store RFO requests where the cache line to be loaded is +in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.HIT +.Pq Event 27H , Umask 0EH +Counts number of L2 store RFO requests where the cache line to be loaded is +in either the S, E or M states. The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.RFO.MESI +.Pq Event 27H , Umask 0FH +Counts all L2 store RFO requests.The L1D prefetcher does not issue a RFO +prefetch. +This is a demand RFO request +.It Li L2_WRITE.LOCK.I_STATE +.Pq Event 27H , Umask 10H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the I (invalid) state, i.e. a cache miss. +.It Li L2_WRITE.LOCK.S_STATE +.Pq Event 27H , Umask 20H +Counts number of L2 lock RFO requests where the cache line to be loaded is +in the S (shared) state. +.It Li L2_WRITE.LOCK.E_STATE +.Pq Event 27H , Umask 40H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the E (exclusive) state. +.It Li L2_WRITE.LOCK.M_STATE +.Pq Event 27H , Umask 80H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in the M (modified) state. +.It Li L2_WRITE.LOCK.HIT +.Pq Event 27H , Umask E0H +Counts number of L2 demand lock RFO requests where the cache line to be +loaded is in either the S, E, or M state. +.It Li L2_WRITE.LOCK.MESI +.Pq Event 27H , Umask F0H +Counts all L2 demand lock RFO requests. +.It Li L1D_WB_L2.I_STATE +.Pq Event 28H , Umask 01H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the I (invalid) state, i.e. a cache miss. +.It Li L1D_WB_L2.S_STATE +.Pq Event 28H , Umask 02H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the S state. +.It Li L1D_WB_L2.E_STATE +.Pq Event 28H , Umask 04H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the E (exclusive) state. +.It Li L1D_WB_L2.M_STATE +.Pq Event 28H , Umask 08H +Counts number of L1 writebacks to the L2 where the cache line to be written +is in the M (modified) state. +.It Li L1D_WB_L2.MESI +.Pq Event 28H , Umask 0FH +Counts all L1 writebacks to the L2. +.It Li L3_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. The event count includes speculative traffic +but excludes cache line fills due to a L2 hardware-prefetch. Because cache +hierarchy, cache sizes and other implementation-specific characteristics; +value comparison to estimate performance differences is not recommended. +see Table A-1 +.It Li L3_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. The event count may include speculative traffic but excludes cache +line fills due to L2 hardware-prefetches. Because cache hierarchy, cache +sizes and other implementation-specific characteristics; value comparison to +estimate performance differences is not recommended. +see Table A-1 +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +see Table A-1 +.It Li CPU_CLK_UNHALTED.REF_P +.Pq Event 3CH , Umask 01H +Increments at the frequency of TSC when not halted. +see Table A-1 +.It Li L1D_CACHE_LD.I_STATE +.Pq Event 40H , Umask 01H +Counts L1 data cache read requests where the cache line to be loaded is in +the I (invalid) state, i.e. the read request missed the cache. +Counter 0, 1 only +.It Li L1D_CACHE_LD.S_STATE +.Pq Event 40H , Umask 02H +Counts L1 data cache read requests where the cache line to be loaded is in +the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.E_STATE +.Pq Event 40H , Umask 04H +Counts L1 data cache read requests where the cache line to be loaded is in +the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.M_STATE +.Pq Event 40H , Umask 08H +Counts L1 data cache read requests where the cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LD.MESI +.Pq Event 40H , Umask 0FH +Counts L1 data cache read requests. +Counter 0, 1 only +.It Li L1D_CACHE_ST.S_STATE +.Pq Event 41H , Umask 02H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the S (shared) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.E_STATE +.Pq Event 41H , Umask 04H +Counts L1 data cache store RFO requests where the cache line to be loaded is +in the E (exclusive) state. +Counter 0, 1 only +.It Li L1D_CACHE_ST.M_STATE +.Pq Event 41H , Umask 08H +Counts L1 data cache store RFO requests where cache line to be loaded is in +the M (modified) state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.HIT +.Pq Event 42H , Umask 01H +Counts retired load locks that hit in the L1 data cache or hit in an already +allocated fill buffer. The lock portion of the load lock transaction must +hit in the L1D. +The initial load will pull the lock into the L1 data cache. Counter 0, 1 +only +.It Li L1D_CACHE_LOCK.S_STATE +.Pq Event 42H , Umask 02H +Counts L1 data cache retired load locks that hit the target cache line in +the shared state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.E_STATE +.Pq Event 42H , Umask 04H +Counts L1 data cache retired load locks that hit the target cache line in +the exclusive state. +Counter 0, 1 only +.It Li L1D_CACHE_LOCK.M_STATE +.Pq Event 42H , Umask 08H +Counts L1 data cache retired load locks that hit the target cache line in +the modified state. +Counter 0, 1 only +.It Li L1D_ALL_REF.ANY +.Pq Event 43H , Umask 01H +Counts all references (uncached, speculated and retired) to the L1 data +cache, including all loads and stores with any memory types. The event +counts memory accesses only when they are actually performed. For example, a +load blocked by unknown store address and later performed is only counted +once. +The event does not include non- memory accesses, such as I/O accesses. +Counter 0, 1 only +.It Li L1D_ALL_REF.CACHEABLE +.Pq Event 43H , Umask 02H +Counts all data reads and writes (speculated and retired) from cacheable +memory, including locked operations. +Counter 0, 1 only +.It Li L1D_PEND_MISS.LOAD_BUFFERS_FULL +.Pq Event 48H , Umask 02H +Counts cycles of L1 data cache load fill buffers full. +Counter 0, 1 only +.It Li DTLB_MISSES.ANY +.Pq Event 49H , Umask 01H +Counts the number of misses in the STLB which causes a page walk. +.It Li DTLB_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Counts number of misses in the STLB which resulted in a completed page walk. +.It Li DTLB_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Counts the number of DTLB first level misses that hit in the second level +TLB. This event is only relevant if the core contains multiple DTLB levels. +.It Li LOAD_HIT_PRE +.Pq Event 4CH , Umask 01H +Counts load operations sent to the L1 data cache while a previous SSE +prefetch instruction to the same cache line has started prefetching but has +not yet finished. +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 01H +Counts number of hardware prefetch requests dispatched out of the prefetch +FIFO. +.It Li L1D_PREFETCH.MISS +.Pq Event 4EH , Umask 02H +Counts number of hardware prefetch requests that miss the L1D. There are two *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 16:18:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDA401065673; Fri, 16 Apr 2010 16:18:31 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 5EFB78FC12; Fri, 16 Apr 2010 16:18:31 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 00137EAF4B; Fri, 16 Apr 2010 12:18:30 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 16 Apr 2010 12:18:31 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=mODjQ5Dum9U2xHXPhn1o8eYXt/0=; b=C1LmTy1/PImuYwOX+c6C+123Alsq64lxkNctSLEsZodraleC5QEZBCzE+6xwfSxq2QXiEr6BfRg5d6RkYcnjv4mK7IXr9O+G8boEB72kjK6ifNES/OXo4Knaz6OqEFsXlTiJGOabEyQw/jdtC+VvnNHd7XbzBtIhFsxZTLcHvbk= X-Sasl-enc: rbJZO0AzQVfQmPTy8BKQWfJctTUQMNIbDy+97y3Eu9lF 1271434710 Received: from anglepoise.lon.incunabulum.net (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 366B53E0D8; Fri, 16 Apr 2010 12:18:30 -0400 (EDT) Message-ID: <4BC88DD3.6000505@incunabulum.net> Date: Fri, 16 Apr 2010 17:18:27 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100406 Thunderbird/3.0.4 MIME-Version: 1.0 To: Fabien Thomas References: <201004161543.o3GFhOtU066515@svn.freebsd.org> In-Reply-To: <201004161543.o3GFhOtU066515@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r206701 - in stable/8/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc 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, 16 Apr 2010 16:18:32 -0000 Right On Commander! On 04/16/10 16:43, Fabien Thomas wrote: > Log: > MFC r206089, r206684: > > - Support for uncore counting events: one fixed PMC with the uncore > domain clock, 8 programmable PMC. > - Westmere based CPU (Xeon 5600, Corei7 980X) support. > - New man pages with events list for core and uncore. > - Updated Corei7 events with Intel 253669-033US December 2009 doc. > There is some removed events in the documentation, they have been > kept in the code but documented in the man page as obsolete. > - Offcore response events can be setup with rsp token. > From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 16:33:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B9F91065679; Fri, 16 Apr 2010 16:33:05 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50CFC8FC15; Fri, 16 Apr 2010 16:33: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 o3GGX5RP077703; Fri, 16 Apr 2010 16:33:05 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GGX5Pi077701; Fri, 16 Apr 2010 16:33:05 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004161633.o3GGX5Pi077701@svn.freebsd.org> From: Jack F Vogel Date: Fri, 16 Apr 2010 16:33: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: r206705 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 16:33:05 -0000 Author: jfv Date: Fri Apr 16 16:33:05 2010 New Revision: 206705 URL: http://svn.freebsd.org/changeset/base/206705 Log: Remove the tx queue selection based on the cpu whe no flowid is present, this was causing some bad reordering, now just use 0. Also, add a few watchdog bits, and tx handler bits that were corrected in igb. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Fri Apr 16 16:15:30 2010 (r206704) +++ head/sys/dev/ixgbe/ixgbe.c Fri Apr 16 16:33:05 2010 (r206705) @@ -759,6 +759,7 @@ ixgbe_start_locked(struct tx_ring *txr, /* Set watchdog on */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return; @@ -798,8 +799,6 @@ ixgbe_mq_start(struct ifnet *ifp, struct /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; - else /* use the cpu we're on */ - i = curcpu % adapter->num_queues; txr = &adapter->tx_rings[i]; @@ -856,8 +855,11 @@ ixgbe_mq_start_locked(struct ifnet *ifp, next = drbr_dequeue(ifp, txr->br); } - if (enqueued > 0) + if (enqueued > 0) { + /* Set watchdog on */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; + } return (err); } @@ -1251,16 +1253,12 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - u32 loop = MAX_LOOP; - bool more_rx, more_tx; - - IXGBE_TX_LOCK(txr); - do { - more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); - more_tx = ixgbe_txeof(txr); - } while (loop-- && (more_rx || more_tx)); + bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + more = ixgbe_rxeof(que, adapter->rx_process_limit); + IXGBE_TX_LOCK(txr); + ixgbe_txeof(txr); #if __FreeBSD_version >= 800000 if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr, NULL); @@ -1268,11 +1266,16 @@ ixgbe_handle_que(void *context, int pend if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); #endif + IXGBE_TX_UNLOCK(txr); + if (more) { + taskqueue_enqueue(que->tq, &que->que_task); + return; + } } - IXGBE_TX_UNLOCK(txr); /* Reenable this interrupt */ ixgbe_enable_queue(adapter, que->msix); + return; } @@ -1718,7 +1721,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m * hardware that this frame is available to transmit. */ ++txr->total_packets; - txr->watchdog_time = ticks; IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDT(txr->me), i); /* Do a clean if descriptors are low */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 16:49:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14FE2106566B; Fri, 16 Apr 2010 16:49:42 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8F748FC1A; Fri, 16 Apr 2010 16: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 o3GGngGD081396; Fri, 16 Apr 2010 16:49:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GGngSk081394; Fri, 16 Apr 2010 16:49:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004161649.o3GGngSk081394@svn.freebsd.org> From: Rui Paulo Date: Fri, 16 Apr 2010 16: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: r206706 - head/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: Fri, 16 Apr 2010 16:49:43 -0000 Author: rpaulo Date: Fri Apr 16 16:49:42 2010 New Revision: 206706 URL: http://svn.freebsd.org/changeset/base/206706 Log: Add ubthidhci. MFC after: 2 days Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Fri Apr 16 16:33:05 2010 (r206705) +++ head/etc/rc.d/Makefile Fri Apr 16 16:49:42 2010 (r206706) @@ -50,6 +50,10 @@ FILES+= sshd FILES+= nscd .endif +.if ${MK_BLUETOOTH} != "no" +FILES+= ubthidhci +.endif + FILESDIR= /etc/rc.d FILESMODE= ${BINMODE} From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 17:27:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BE92106564A; Fri, 16 Apr 2010 17:27:21 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08C5C8FC0C; Fri, 16 Apr 2010 17:27: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 o3GHRKLS089876; Fri, 16 Apr 2010 17:27:20 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GHRKVU089871; Fri, 16 Apr 2010 17:27:20 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004161727.o3GHRKVU089871@svn.freebsd.org> From: Jack F Vogel Date: Fri, 16 Apr 2010 17:27: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: r206707 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 17:27:21 -0000 Author: jfv Date: Fri Apr 16 17:27:20 2010 New Revision: 206707 URL: http://svn.freebsd.org/changeset/base/206707 Log: MFC bug fixes to em and igb from HEAD. Modified: stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/e1000/if_em.h stable/8/sys/dev/e1000/if_igb.c stable/8/sys/dev/e1000/if_lem.c Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_em.c Fri Apr 16 17:27:20 2010 (r206707) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.0"; +char em_driver_version[] = "7.0.5"; /********************************************************************* @@ -192,7 +192,7 @@ static int em_suspend(device_t); static int em_resume(device_t); static void em_start(struct ifnet *); static void em_start_locked(struct ifnet *, struct tx_ring *); -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE static int em_mq_start(struct ifnet *, struct mbuf *); static int em_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); @@ -797,7 +797,7 @@ em_resume(device_t dev) * the packet is requeued. **********************************************************************/ -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE static int em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m) { @@ -812,10 +812,18 @@ em_mq_start_locked(struct ifnet *ifp, st return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); + enq = 0; - if (m == NULL) + if (m == NULL) { next = drbr_dequeue(ifp, txr->br); - else + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else next = m; /* Process the queue */ @@ -830,12 +838,17 @@ em_mq_start_locked(struct ifnet *ifp, st ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; + if (txr->tx_avail < EM_MAX_SCATTER) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } next = drbr_dequeue(ifp, txr->br); } if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -860,8 +873,7 @@ em_mq_start(struct ifnet *ifp, struct mb txr = &adapter->tx_rings[i]; if (EM_TX_TRYLOCK(txr)) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = em_mq_start_locked(ifp, txr, m); + error = em_mq_start_locked(ifp, txr, m); EM_TX_UNLOCK(txr); } else error = drbr_enqueue(ifp, txr->br, m); @@ -888,7 +900,7 @@ em_qflush(struct ifnet *ifp) if_qflush(ifp); } -#endif /* FreeBSD_version */ +#endif /* EM_MULTIQUEUE */ static void em_start_locked(struct ifnet *ifp, struct tx_ring *txr) @@ -905,8 +917,15 @@ em_start_locked(struct ifnet *ifp, struc if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail < EM_MAX_SCATTER) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -926,6 +945,7 @@ em_start_locked(struct ifnet *ifp, struc ETHER_BPF_MTAP(ifp, m_head); /* Set timeout in case hardware has problems transmitting. */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } @@ -1118,6 +1138,10 @@ em_ioctl(struct ifnet *ifp, u_long comma ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; } + if (mask & IFCAP_VLAN_HWFILTER) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } if ((mask & IFCAP_WOL) && (ifp->if_capabilities & IFCAP_WOL) != 0) { if (mask & IFCAP_WOL_MCAST) @@ -1228,8 +1252,18 @@ em_init_locked(struct adapter *adapter) /* Setup VLAN support, basic and offload if available */ E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); - /* Use real VLAN Filter support */ - em_setup_vlan_hw_support(adapter); + /* Use real VLAN Filter support? */ + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + /* Use real VLAN Filter support */ + em_setup_vlan_hw_support(adapter); + else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl |= E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); + } + } /* Set hardware offload abilities */ ifp->if_hwassist = 0; @@ -1337,11 +1371,13 @@ em_poll(struct ifnet *ifp, enum poll_cmd } EM_CORE_UNLOCK(adapter); + EM_RX_LOCK(rxr); rx_done = em_rxeof(rxr, count); + EM_RX_UNLOCK(rxr); EM_TX_LOCK(txr); em_txeof(txr); -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else @@ -1409,28 +1445,28 @@ em_handle_que(void *context, int pending struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; struct rx_ring *rxr = adapter->rx_rings; - u32 loop = EM_MAX_LOOP; - bool more_rx, more_tx; + bool more_rx; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - EM_TX_LOCK(txr); - do { - more_rx = em_rxeof(rxr, adapter->rx_process_limit); - more_tx = em_txeof(txr); - } while (loop-- && (more_rx || more_tx)); + EM_RX_LOCK(rxr); + more_rx = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); -#if __FreeBSD_version >= 800000 + EM_TX_LOCK(txr); + em_txeof(txr); +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp, txr); #endif - if (more_rx || more_tx) - taskqueue_enqueue(adapter->tq, &adapter->que_task); - EM_TX_UNLOCK(txr); + if (more_rx) { + taskqueue_enqueue(adapter->tq, &adapter->que_task); + return; + } } em_enable_intr(adapter); @@ -1475,8 +1511,10 @@ em_msix_rx(void *arg) struct adapter *adapter = rxr->adapter; bool more; + EM_RX_LOCK(rxr); ++rxr->rx_irq; more = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); if (more) taskqueue_enqueue(rxr->tq, &rxr->rx_task); else @@ -1513,14 +1551,16 @@ em_handle_rx(void *context, int pending) { struct rx_ring *rxr = context; struct adapter *adapter = rxr->adapter; - u32 loop = EM_MAX_LOOP; bool more; - do { - more = em_rxeof(rxr, adapter->rx_process_limit); - } while (loop-- && more); - /* Reenable this interrupt */ - E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); + EM_RX_LOCK(rxr); + more = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); + if (more) + taskqueue_enqueue(rxr->tq, &rxr->rx_task); + else + /* Reenable this interrupt */ + E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); } static void @@ -1529,16 +1569,13 @@ em_handle_tx(void *context, int pending) struct tx_ring *txr = context; struct adapter *adapter = txr->adapter; struct ifnet *ifp = adapter->ifp; - u32 loop = EM_MAX_LOOP; - bool more; if (!EM_TX_TRYLOCK(txr)) return; - do { - more = em_txeof(txr); - } while (loop-- && more); -#if __FreeBSD_version >= 800000 + em_txeof(txr); + +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else @@ -1706,13 +1743,6 @@ em_xmit(struct tx_ring *txr, struct mbuf txd_upper = txd_lower = txd_used = txd_saved = 0; do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); - /* - * Force a cleanup if number of TX descriptors - * available hits the threshold - */ - if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) - em_txeof(txr); - /* * TSO workaround: * If an mbuf is only header we need @@ -2642,7 +2672,7 @@ em_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE /* Multiqueue tx functions */ ifp->if_transmit = em_mq_start; ifp->if_qflush = em_qflush; @@ -2656,12 +2686,23 @@ em_setup_interface(device_t dev, struct ifp->if_capenable |= IFCAP_TSO4; /* - * Tell the upper layer(s) we support long frames. + * Tell the upper layer(s) we + * support full VLAN capability */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + /* + ** Dont turn this on by default, if vlans are + ** created on another pseudo device (eg. lagg) + ** then vlan events are not passed thru, breaking + ** operation, but with HW FILTER off it works. If + ** using vlans directly on the em driver you can + ** enable this and get full hardware tag filtering. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; + #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif @@ -3681,6 +3722,8 @@ em_refresh_mbufs(struct rx_ring *rxr, in rxr->next_to_refresh = i; } update: + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (cleaned != -1) /* Update tail index */ E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), cleaned); @@ -3972,7 +4015,7 @@ em_initialize_receive_unit(struct adapte ** When using MSIX interrupts we need to throttle ** using the EITR register (82574 only) */ - if (adapter->msix) + if (hw->mac.type == e1000_82574) for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), DEFAULT_ITR); @@ -4015,6 +4058,9 @@ em_initialize_receive_unit(struct adapte E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | (hw->mac.mc_filter_type << E1000_RCTL_MO_SHIFT); + /* Strip the CRC */ + rctl |= E1000_RCTL_SECRC; + /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; rctl &= ~E1000_RCTL_SBP; @@ -4046,15 +4092,15 @@ static int em_rxeof(struct rx_ring *rxr, int count) { struct adapter *adapter = rxr->adapter; - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct mbuf *mp, *sendmp; - u8 status; + u8 status = 0; u16 len; int i, processed, rxdone = 0; bool eop; struct e1000_rx_desc *cur; - EM_RX_LOCK(rxr); + EM_RX_LOCK_ASSERT(rxr); for (i = rxr->next_to_check, processed = 0; count != 0;) { @@ -4109,6 +4155,10 @@ em_rxeof(struct rx_ring *rxr, int count) E1000_RXD_SPC_VLAN_MASK); rxr->fmp->m_flags |= M_VLANTAG; } +#ifdef EM_MULTIQUEUE + rxr->fmp->m_pkthdr.flowid = curcpu; + rxr->fmp->m_flags |= M_FLOWID; +#endif #ifndef __NO_STRICT_ALIGNMENT skip: #endif @@ -4162,8 +4212,11 @@ skip: rxr->next_to_check = i; - EM_RX_UNLOCK(rxr); +#ifdef DEVICE_POLLING return (rxdone); +#else + return ((status & E1000_RXD_STAT_DD) ? TRUE : FALSE); +#endif } #ifndef __NO_STRICT_ALIGNMENT @@ -4346,7 +4399,7 @@ em_enable_intr(struct adapter *adapter) struct e1000_hw *hw = &adapter->hw; u32 ims_mask = IMS_ENABLE_MASK; - if (adapter->msix) { + if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= EM_MSIX_MASK; } @@ -4358,7 +4411,7 @@ em_disable_intr(struct adapter *adapter) { struct e1000_hw *hw = &adapter->hw; - if (adapter->msix) + if (hw->mac.type == e1000_82574) E1000_WRITE_REG(hw, EM_EIAC, 0); E1000_WRITE_REG(&adapter->hw, E1000_IMC, 0xffffffff); } Modified: stable/8/sys/dev/e1000/if_em.h ============================================================================== --- stable/8/sys/dev/e1000/if_em.h Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_em.h Fri Apr 16 17:27:20 2010 (r206707) @@ -223,7 +223,7 @@ #define HW_DEBUGOUT1(S, A) if (DEBUG_HW) printf(S "\n", A) #define HW_DEBUGOUT2(S, A, B) if (DEBUG_HW) printf(S "\n", A, B) -#define EM_MAX_SCATTER 64 +#define EM_MAX_SCATTER 32 #define EM_VFTA_SIZE 128 #define EM_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ @@ -453,5 +453,6 @@ struct em_buffer { #define EM_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_mtx) #define EM_CORE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->core_mtx, MA_OWNED) #define EM_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, MA_OWNED) +#define EM_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_mtx, MA_OWNED) #endif /* _EM_H_DEFINED_ */ Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_igb.c Fri Apr 16 17:27:20 2010 (r206707) @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 1.9.3"; +char igb_driver_version[] = "version - 1.9.5"; /********************************************************************* @@ -758,8 +758,15 @@ igb_start_locked(struct tx_ring *txr, st if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail <= IGB_TX_OP_THRESHOLD) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -779,6 +786,7 @@ igb_start_locked(struct tx_ring *txr, st ETHER_BPF_MTAP(ifp, m_head); /* Set watchdog on */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } } @@ -817,8 +825,6 @@ igb_mq_start(struct ifnet *ifp, struct m /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; - else - i = curcpu % adapter->num_queues; txr = &adapter->tx_rings[i]; @@ -847,6 +853,10 @@ igb_mq_start_locked(struct ifnet *ifp, s return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + enq = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -856,6 +866,7 @@ igb_mq_start_locked(struct ifnet *ifp, s next = drbr_dequeue(ifp, txr->br); } else next = m; + /* Process the queue */ while (next != NULL) { if ((err = igb_xmit(txr, &next)) != 0) { @@ -877,6 +888,7 @@ igb_mq_start_locked(struct ifnet *ifp, s if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -1055,6 +1067,10 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; } + if (mask & IFCAP_VLAN_HWFILTER) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; reinit = 1; @@ -1110,6 +1126,19 @@ igb_init_locked(struct adapter *adapter) E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); + /* Use real VLAN Filter support? */ + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + /* Use real VLAN Filter support */ + igb_setup_vlan_hw_support(adapter); + else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl |= E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); + } + } + /* Set hardware offload abilities */ ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) { @@ -1231,19 +1260,13 @@ igb_handle_que(void *context, int pendin struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; - u32 loop = IGB_MAX_LOOP; bool more; - /* RX first */ - do { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { more = igb_rxeof(que, -1); - } while (loop-- && more); - if (IGB_TX_TRYLOCK(txr)) { - loop = IGB_MAX_LOOP; - do { - more = igb_txeof(txr); - } while (loop-- && more); + IGB_TX_LOCK(txr); + igb_txeof(txr); #if __FreeBSD_version >= 800000 igb_mq_start_locked(ifp, txr, NULL); #else @@ -1251,6 +1274,10 @@ igb_handle_que(void *context, int pendin igb_start_locked(txr, ifp); #endif IGB_TX_UNLOCK(txr); + if (more) { + taskqueue_enqueue(que->tq, &que->que_task); + return; + } } /* Reenable this interrupt */ @@ -1436,7 +1463,7 @@ igb_msix_que(void *arg) if (adapter->hw.mac.type == e1000_82575) newitr |= newitr << 16; else - newitr |= 0x8000000; + newitr |= E1000_EITR_CNT_IGNR; /* save for next interrupt */ que->eitr_setting = newitr; @@ -2340,7 +2367,7 @@ igb_configure_queues(struct adapter *ada if (hw->mac.type == e1000_82575) newitr |= newitr << 16; else - newitr |= 0x8000000; + newitr |= E1000_EITR_CNT_IGNR; for (int i = 0; i < adapter->num_queues; i++) { que = &adapter->queues[i]; @@ -2669,13 +2696,24 @@ igb_setup_interface(device_t dev, struct #endif /* - * Tell the upper layer(s) we support long frames. + * Tell the upper layer(s) we + * support full VLAN capability. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; /* + ** Dont turn this on by default, if vlans are + ** created on another pseudo device (eg. lagg) + ** then vlan events are not passed thru, breaking + ** operation, but with HW FILTER off it works. If + ** using vlans directly on the em driver you can + ** enable this and get full hardware tag filtering. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; + + /* * Specify the media types supported by this adapter and register * callbacks to update media and link information */ @@ -3779,6 +3817,9 @@ igb_setup_receive_ring(struct rx_ring *r /* Update descriptor */ rxr->rx_base[j].read.pkt_addr = htole64(pseg[0].ds_addr); } + + /* Setup our descriptor indices */ + rxr->next_to_check = 0; rxr->next_to_refresh = 0; rxr->lro_enabled = FALSE; @@ -4672,10 +4713,12 @@ igb_update_stats_counters(struct adapter { struct ifnet *ifp; - if(adapter->hw.phy.media_type == e1000_media_type_copper || + if (adapter->hw.phy.media_type == e1000_media_type_copper || (E1000_READ_REG(&adapter->hw, E1000_STATUS) & E1000_STATUS_LU)) { - adapter->stats.symerrs += E1000_READ_REG(&adapter->hw, E1000_SYMERRS); - adapter->stats.sec += E1000_READ_REG(&adapter->hw, E1000_SEC); + adapter->stats.symerrs += + E1000_READ_REG(&adapter->hw, E1000_SYMERRS); + adapter->stats.sec += + E1000_READ_REG(&adapter->hw, E1000_SEC); } adapter->stats.crcerrs += E1000_READ_REG(&adapter->hw, E1000_CRCERRS); adapter->stats.mpc += E1000_READ_REG(&adapter->hw, E1000_MPC); Modified: stable/8/sys/dev/e1000/if_lem.c ============================================================================== --- stable/8/sys/dev/e1000/if_lem.c Fri Apr 16 16:49:42 2010 (r206706) +++ stable/8/sys/dev/e1000/if_lem.c Fri Apr 16 17:27:20 2010 (r206707) @@ -39,9 +39,6 @@ #include #include -#if __FreeBSD_version >= 800000 -#include -#endif #include #include #include @@ -94,7 +91,7 @@ int lem_display_debug_stats = 0; /********************************************************************* * Legacy Em Driver version: *********************************************************************/ -char lem_driver_version[] = "1.0.0"; +char lem_driver_version[] = "1.0.1"; /********************************************************************* @@ -177,11 +174,6 @@ static int lem_suspend(device_t); static int lem_resume(device_t); static void lem_start(struct ifnet *); static void lem_start_locked(struct ifnet *ifp); -#if __FreeBSD_version >= 800000 -static int lem_mq_start(struct ifnet *, struct mbuf *); -static int lem_mq_start_locked(struct ifnet *, struct mbuf *); -static void lem_qflush(struct ifnet *); -#endif static int lem_ioctl(struct ifnet *, u_long, caddr_t); static void lem_init(void *); static void lem_init_locked(struct adapter *); @@ -304,12 +296,6 @@ MODULE_DEPEND(lem, ether, 1, 1, 1); #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define M_TSO_LEN 66 - -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif static int lem_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int lem_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); @@ -827,118 +813,6 @@ lem_resume(device_t dev) } -/********************************************************************* - * Transmit entry point - * - * em_start is called by the stack to initiate a transmit. - * The driver will remain in this routine as long as there are - * packets to transmit and transmit resources are available. - * In case resources are not available stack is notified and - * the packet is requeued. - **********************************************************************/ - -#if __FreeBSD_version >= 800000 -static int -lem_mq_start_locked(struct ifnet *ifp, struct mbuf *m) -{ - struct adapter *adapter = ifp->if_softc; - struct mbuf *next; - int error = E1000_SUCCESS; - - EM_TX_LOCK_ASSERT(adapter); - /* To allow being called from a tasklet */ - if (m == NULL) - goto process; - - if (((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - || (!adapter->link_active)) { - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else if (drbr_empty(ifp, adapter->br) && - (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) { - if ((error = lem_xmit(adapter, &m)) != 0) { - if (m) - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else { - /* - * We've bypassed the buf ring so we need to update - * ifp directly - */ - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); - /* - ** Send a copy of the frame to the BPF - ** listener and set the watchdog on. - */ - ETHER_BPF_MTAP(ifp, m); - adapter->watchdog_check = TRUE; - } - } else if ((error = drbr_enqueue(ifp, adapter->br, m)) != 0) - return (error); - -process: - if (drbr_empty(ifp, adapter->br)) - return(error); - /* Process the queue */ - while (TRUE) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - break; - next = drbr_dequeue(ifp, adapter->br); - if (next == NULL) - break; - if ((error = lem_xmit(adapter, &next)) != 0) { - if (next != NULL) - error = drbr_enqueue(ifp, adapter->br, next); - break; - } - drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); - ETHER_BPF_MTAP(ifp, next); - /* Set the watchdog */ - adapter->watchdog_check = TRUE; - } - - if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - - return (error); -} - -/* -** Multiqueue capable stack interface, this is not -** yet truely multiqueue, but that is coming... -*/ -static int -lem_mq_start(struct ifnet *ifp, struct mbuf *m) -{ - - struct adapter *adapter = ifp->if_softc; - int error = 0; - - if (EM_TX_TRYLOCK(adapter)) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = lem_mq_start_locked(ifp, m); - EM_TX_UNLOCK(adapter); - } else - error = drbr_enqueue(ifp, adapter->br, m); - - return (error); -} - -static void -lem_qflush(struct ifnet *ifp) -{ - struct mbuf *m; - struct adapter *adapter = (struct adapter *)ifp->if_softc; - - EM_TX_LOCK(adapter); - while ((m = buf_ring_dequeue_sc(adapter->br)) != NULL) - m_freem(m); - if_qflush(ifp); - EM_TX_UNLOCK(adapter); -} -#endif /* FreeBSD_version */ - static void lem_start_locked(struct ifnet *ifp) { @@ -975,6 +849,7 @@ lem_start_locked(struct ifnet *ifp) /* Set timeout in case hardware has problems transmitting. */ adapter->watchdog_check = TRUE; + adapter->watchdog_time = ticks; } if (adapter->num_tx_desc_avail <= EM_TX_OP_THRESHOLD) ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -1151,12 +1026,6 @@ lem_ioctl(struct ifnet *ifp, u_long comm ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; } -#if __FreeBSD_version >= 700000 - if (mask & IFCAP_TSO4) { - ifp->if_capenable ^= IFCAP_TSO4; - reinit = 1; - } -#endif if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; @@ -1279,10 +1148,6 @@ lem_init_locked(struct adapter *adapter) if (adapter->hw.mac.type >= e1000_82543) { if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); -#if __FreeBSD_version >= 700000 - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; -#endif } /* Configure for OS presence */ @@ -1394,13 +1259,8 @@ lem_poll(struct ifnet *ifp, enum poll_cm EM_TX_LOCK(adapter); lem_txeof(adapter); -#if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, adapter->br)) - lem_mq_start_locked(ifp, NULL); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); -#endif EM_TX_UNLOCK(adapter); return (rx_done); } @@ -1494,14 +1354,8 @@ lem_handle_rxtx(void *context, int pendi taskqueue_enqueue(adapter->tq, &adapter->rxtx_task); EM_TX_LOCK(adapter); lem_txeof(adapter); - -#if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, adapter->br)) - lem_mq_start_locked(ifp, NULL); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) lem_start_locked(ifp); -#endif EM_TX_UNLOCK(adapter); } @@ -1852,15 +1706,17 @@ lem_xmit(struct adapter *adapter, struct if (mtag != NULL) { ctxd->upper.fields.special = htole16(VLAN_TAG_VALUE(mtag)); + ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE); + } #else /* FreeBSD 7 */ if (m_head->m_flags & M_VLANTAG) { /* Set the vlan id. */ ctxd->upper.fields.special = htole16(m_head->m_pkthdr.ether_vtag); -#endif /* Tell hardware to add tag */ ctxd->lower.data |= htole32(E1000_TXD_CMD_VLE); } +#endif tx_buffer->m_head = m_head; tx_buffer_mapped->map = tx_buffer->map; @@ -2544,12 +2400,6 @@ lem_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; -#if __FreeBSD_version >= 800000 - /* Multiqueue tx functions */ - ifp->if_transmit = lem_mq_start; - ifp->if_qflush = lem_qflush; - adapter->br = buf_ring_alloc(4096, M_DEVBUF, M_WAITOK, &adapter->tx_mtx); -#endif if (adapter->hw.mac.type >= e1000_82543) { int version_cap; #if __FreeBSD_version < 700000 @@ -4549,10 +4399,6 @@ lem_print_hw_stats(struct adapter *adapt (long long)adapter->stats.gprc); device_printf(dev, "Good Packets Xmtd = %lld\n", (long long)adapter->stats.gptc); - device_printf(dev, "TSO Contexts Xmtd = %lld\n", - (long long)adapter->stats.tsctc); - device_printf(dev, "TSO Contexts Failed = %lld\n", - (long long)adapter->stats.tsctfc); } /********************************************************************** From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 20:04:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCB13106566C; Fri, 16 Apr 2010 20:04:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB2778FC19; Fri, 16 Apr 2010 20: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 o3GK4jSX030819; Fri, 16 Apr 2010 20:04:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GK4jZk030811; Fri, 16 Apr 2010 20:04:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004162004.o3GK4jZk030811@svn.freebsd.org> From: Xin LI Date: Fri, 16 Apr 2010 20:04: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: r206708 - head/lib/libz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 20:04:46 -0000 Author: delphij Date: Fri Apr 16 20:04:45 2010 New Revision: 206708 URL: http://svn.freebsd.org/changeset/base/206708 Log: MFV: libz 1.2.4.3. Modified: head/lib/libz/ChangeLog head/lib/libz/README head/lib/libz/deflate.c head/lib/libz/gzguts.h head/lib/libz/gzlib.c head/lib/libz/inftrees.c head/lib/libz/minigzip.c head/lib/libz/zconf.h head/lib/libz/zlib.3 head/lib/libz/zlib.h head/lib/libz/zutil.h Directory Properties: head/lib/libz/ (props changed) Modified: head/lib/libz/ChangeLog ============================================================================== --- head/lib/libz/ChangeLog Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/ChangeLog Fri Apr 16 20:04:45 2010 (r206708) @@ -1,6 +1,34 @@ ChangeLog file for zlib +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + Changes in 1.2.4.1 (28 Mar 2010) - Remove the use of [a-z] constructs for sed in configure [gentoo 310225] - Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] Modified: head/lib/libz/README ============================================================================== --- head/lib/libz/README Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/README Fri Apr 16 20:04:45 2010 (r206708) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4.1 is a general purpose data compression library. All the code is +zlib 1.2.4.3 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -16,7 +16,8 @@ minigzip.c. To compile all files and run the test program, follow the instructions given at the top of Makefile.in. In short "./configure; make test", and if that goes well, "make install" should work for most flavors of Unix. For Windows, use one -of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. +of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +make_vms.com. Questions about zlib should be sent to , or to Gilles Vollant for the Windows DLL version. The zlib home page is @@ -30,7 +31,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4.1 are documented in the file ChangeLog. +The changes made in version 1.2.4.3 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . Modified: head/lib/libz/deflate.c ============================================================================== --- head/lib/libz/deflate.c Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/deflate.c Fri Apr 16 20:04:45 2010 (r206708) @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4.1 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.4.3 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot Modified: head/lib/libz/gzguts.h ============================================================================== --- head/lib/libz/gzguts.h Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/gzguts.h Fri Apr 16 20:04:45 2010 (r206708) @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#if _LARGEFILE64_SOURCE == 1 +#ifdef _LARGEFILE64_SOURCE # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif @@ -56,10 +56,12 @@ # endif #endif -#if _LARGEFILE64_SOURCE == 1 -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); #endif /* default i/o buffer size -- double this for output when reading */ Modified: head/lib/libz/gzlib.c ============================================================================== --- head/lib/libz/gzlib.c Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/gzlib.c Fri Apr 16 20:04:45 2010 (r206708) @@ -8,7 +8,7 @@ #include "gzguts.h" #include "zutil.h" -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 # define LSEEK lseek64 #else # define LSEEK lseek @@ -175,6 +175,7 @@ local gzFile gz_open(path, fd, mode) O_APPEND))), 0666); if (state->fd == -1) { + free(state->path); free(state); return NULL; } @@ -435,7 +436,8 @@ int ZEXPORT gzeof(file) return 0; /* return end-of-file state */ - return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0; + return state->mode == GZ_READ ? + (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0; } /* -- see zlib.h -- */ Modified: head/lib/libz/inftrees.c ============================================================================== --- head/lib/libz/inftrees.c Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/inftrees.c Fri Apr 16 20:04:45 2010 (r206708) @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4.1 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.4.3 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 67, 206}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 195, 66}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, Modified: head/lib/libz/minigzip.c ============================================================================== --- head/lib/libz/minigzip.c Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/minigzip.c Fri Apr 16 20:04:45 2010 (r206708) @@ -32,6 +32,9 @@ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) # include # include +# ifdef UNDER_CE +# include +# endif # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) #else # define SET_BINARY_MODE(file) @@ -50,9 +53,11 @@ # include /* for fileno */ #endif +#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) #ifndef WIN32 /* unlink already in stdio.h for WIN32 */ extern int unlink OF((const char *)); #endif +#endif #if defined(UNDER_CE) # include Modified: head/lib/libz/zconf.h ============================================================================== --- head/lib/libz/zconf.h Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/zconf.h Fri Apr 16 20:04:45 2010 (r206708) @@ -364,8 +364,11 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#if defined(Z_HAVE_UNISTD_H) +#ifdef STDC # include /* for off_t */ +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_* and off_t */ # ifdef VMS # include /* for off_t */ @@ -384,7 +387,6 @@ typedef uLong FAR uLongf; /* * This is hard-configured for FreeBSD. */ -#include #define z_off_t off_t #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 @@ -394,6 +396,12 @@ typedef uLong FAR uLongf; # define z_off_t long #endif +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + #if defined(__OS400__) # define NO_vsnprintf #endif Modified: head/lib/libz/zlib.3 ============================================================================== --- head/lib/libz/zlib.3 Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/zlib.3 Fri Apr 16 20:04:45 2010 (r206708) @@ -1,4 +1,4 @@ -.TH ZLIB 3 "28 Mar 2010" +.TH ZLIB 3 "10 Apr 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4.1 +Version 1.2.4.3 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP Modified: head/lib/libz/zlib.h ============================================================================== --- head/lib/libz/zlib.h Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/zlib.h Fri Apr 16 20:04:45 2010 (r206708) @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4.1, March 28th, 2010 + version 1.2.4.3, April 10th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4.1" -#define ZLIB_VERNUM 0x1241 +#define ZLIB_VERSION "1.2.4.3" +#define ZLIB_VERNUM 0x1243 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 4 -#define ZLIB_VER_SUBREVISION 1 +#define ZLIB_VER_SUBREVISION 3 /* The 'zlib' compression library provides in-memory compression and @@ -1556,18 +1556,51 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); +#endif +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# ifdef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); +# endif +#else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +#endif +/* hack for buggy compilers */ #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ + struct internal_state {int dummy;}; #endif +/* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); Modified: head/lib/libz/zutil.h ============================================================================== --- head/lib/libz/zutil.h Fri Apr 16 17:27:20 2010 (r206707) +++ head/lib/libz/zutil.h Fri Apr 16 20:04:45 2010 (r206708) @@ -154,20 +154,10 @@ extern const char * const z_errmsg[10]; #pragma warn -8066 #endif -#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t -#endif - /* provide prototypes for these when building zlib without LFS */ -#if _LARGEFILE64_SOURCE != 1 || _LFS64_LARGEFILE != 1 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif /* common defaults */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 20:07:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E30981065676; Fri, 16 Apr 2010 20:07:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D30FF8FC21; Fri, 16 Apr 2010 20:07:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GK7ODN031580; Fri, 16 Apr 2010 20:07:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GK7Omt031578; Fri, 16 Apr 2010 20:07:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004162007.o3GK7Omt031578@svn.freebsd.org> From: Xin LI Date: Fri, 16 Apr 2010 20:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206709 - head/lib/libz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 20:07:25 -0000 Author: delphij Date: Fri Apr 16 20:07:24 2010 New Revision: 206709 URL: http://svn.freebsd.org/changeset/base/206709 Log: Expose a few symbols as public interface rather than private. Note: the *64 interfaces are no longer exposed via zlib.h but were keep as public interfaces; Note 2: this commit would break applications that uses the moved symbols directly. Modified: head/lib/libz/Symbol.map Modified: head/lib/libz/Symbol.map ============================================================================== --- head/lib/libz/Symbol.map Fri Apr 16 20:04:45 2010 (r206708) +++ head/lib/libz/Symbol.map Fri Apr 16 20:07:24 2010 (r206709) @@ -4,11 +4,13 @@ ZLIB_1.2.4.0 { adler32; + adler32_combine; adler32_combine64; compress; compress2; compressBound; crc32; + crc32_combine; crc32_combine64; deflate; deflateBound; @@ -35,15 +37,19 @@ ZLIB_1.2.4.0 { gzflush; gzgetc; gzgets; + gzoffset; gzoffset64; + gzopen; gzopen64; gzprintf; gzputc; gzputs; gzread; gzrewind; + gzseek; gzseek64; gzsetparams; + gztell; gztell64; gzungetc; gzwrite; @@ -80,13 +86,7 @@ ZLIBprivate_1.0 { _tr_init; _tr_stored_block; _tr_tally; - adler32_combine; - crc32_combine; gz_error; - gzoffset; - gzopen; - gzseek; - gztell; inflate_fast; inflate_table; longest_match; From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 22:15:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFA14106564A; Fri, 16 Apr 2010 22:15:26 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDC828FC13; Fri, 16 Apr 2010 22:15:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GMFQM0063558; Fri, 16 Apr 2010 22:15:26 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GMFQdK063557; Fri, 16 Apr 2010 22:15:26 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004162215.o3GMFQdK063557@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 16 Apr 2010 22:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206710 - head/tools/regression/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, 16 Apr 2010 22:15:27 -0000 Author: jilles Date: Fri Apr 16 22:15:26 2010 New Revision: 206710 URL: http://svn.freebsd.org/changeset/base/206710 Log: Add some tests for fnmatch(3). MFC after: 1 week Added: head/tools/regression/lib/libc/gen/test-fnmatch.c (contents, props changed) Modified: head/tools/regression/lib/libc/gen/Makefile Modified: head/tools/regression/lib/libc/gen/Makefile ============================================================================== --- head/tools/regression/lib/libc/gen/Makefile Fri Apr 16 20:07:24 2010 (r206709) +++ head/tools/regression/lib/libc/gen/Makefile Fri Apr 16 22:15:26 2010 (r206710) @@ -1,6 +1,6 @@ # $FreeBSD$ -TESTS= test-fmtcheck test-fpclassify test-wordexp +TESTS= test-fmtcheck test-fnmatch test-fpclassify test-wordexp .PHONY: tests tests: ${TESTS} Added: head/tools/regression/lib/libc/gen/test-fnmatch.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/gen/test-fnmatch.c Fri Apr 16 22:15:26 2010 (r206710) @@ -0,0 +1,335 @@ +/*- + * Copyright (c) 2010 Jilles Tjoelker + * 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 + +struct testcase { + const char *pattern; + const char *string; + int flags; + int result; +} testcases[] = { + "", "", 0, 0, + "a", "a", 0, 0, + "a", "b", 0, FNM_NOMATCH, + "a", "A", 0, FNM_NOMATCH, + "*", "a", 0, 0, + "*", "aa", 0, 0, + "*a", "a", 0, 0, + "*a", "b", 0, FNM_NOMATCH, + "*a*", "b", 0, FNM_NOMATCH, + "*a*b*", "ab", 0, 0, + "*a*b*", "qaqbq", 0, 0, + "*a*bb*", "qaqbqbbq", 0, 0, + "*a*bc*", "qaqbqbcq", 0, 0, + "*a*bb*", "qaqbqbb", 0, 0, + "*a*bc*", "qaqbqbc", 0, 0, + "*a*bb", "qaqbqbb", 0, 0, + "*a*bc", "qaqbqbc", 0, 0, + "*a*bb", "qaqbqbbq", 0, FNM_NOMATCH, + "*a*bc", "qaqbqbcq", 0, FNM_NOMATCH, + "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaa", 0, FNM_NOMATCH, + "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaaa", 0, 0, + "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaaaa", 0, 0, + ".*.*.*.*.*.*.*.*.*.*", ".........", 0, FNM_NOMATCH, + ".*.*.*.*.*.*.*.*.*.*", "..........", 0, 0, + ".*.*.*.*.*.*.*.*.*.*", "...........", 0, 0, + "*?*?*?*?*?*?*?*?*?*?*", "123456789", 0, FNM_NOMATCH, + "??????????*", "123456789", 0, FNM_NOMATCH, + "*??????????", "123456789", 0, FNM_NOMATCH, + "*?*?*?*?*?*?*?*?*?*?*", "1234567890", 0, 0, + "??????????*", "1234567890", 0, 0, + "*??????????", "1234567890", 0, 0, + "*?*?*?*?*?*?*?*?*?*?*", "12345678901", 0, 0, + "??????????*", "12345678901", 0, 0, + "*??????????", "12345678901", 0, 0, + "[x]", "x", 0, 0, + "[*]", "*", 0, 0, + "[?]", "?", 0, 0, + "[", "[", 0, 0, + "[[]", "[", 0, 0, + "[[]", "x", 0, FNM_NOMATCH, + "[*]", "", 0, FNM_NOMATCH, + "[*]", "x", 0, FNM_NOMATCH, + "[?]", "x", 0, FNM_NOMATCH, + "*[*]*", "foo*foo", 0, 0, + "*[*]*", "foo", 0, FNM_NOMATCH, + "[0-9]", "0", 0, 0, + "[0-9]", "5", 0, 0, + "[0-9]", "9", 0, 0, + "[0-9]", "/", 0, FNM_NOMATCH, + "[0-9]", ":", 0, FNM_NOMATCH, + "[0-9]", "*", 0, FNM_NOMATCH, + "[!0-9]", "0", 0, FNM_NOMATCH, + "[!0-9]", "5", 0, FNM_NOMATCH, + "[!0-9]", "9", 0, FNM_NOMATCH, + "[!0-9]", "/", 0, 0, + "[!0-9]", ":", 0, 0, + "[!0-9]", "*", 0, 0, + "*[0-9]", "a0", 0, 0, + "*[0-9]", "a5", 0, 0, + "*[0-9]", "a9", 0, 0, + "*[0-9]", "a/", 0, FNM_NOMATCH, + "*[0-9]", "a:", 0, FNM_NOMATCH, + "*[0-9]", "a*", 0, FNM_NOMATCH, + "*[!0-9]", "a0", 0, FNM_NOMATCH, + "*[!0-9]", "a5", 0, FNM_NOMATCH, + "*[!0-9]", "a9", 0, FNM_NOMATCH, + "*[!0-9]", "a/", 0, 0, + "*[!0-9]", "a:", 0, 0, + "*[!0-9]", "a*", 0, 0, + "*[0-9]", "a00", 0, 0, + "*[0-9]", "a55", 0, 0, + "*[0-9]", "a99", 0, 0, + "*[0-9]", "a0a0", 0, 0, + "*[0-9]", "a5a5", 0, 0, + "*[0-9]", "a9a9", 0, 0, + "\\*", "*", 0, 0, + "\\?", "?", 0, 0, + "\\[x]", "[x]", 0, 0, + "\\[", "[", 0, 0, + "\\\\", "\\", 0, 0, + "*\\**", "foo*foo", 0, 0, + "*\\**", "foo", 0, FNM_NOMATCH, + "*\\\\*", "foo\\foo", 0, 0, + "*\\\\*", "foo", 0, FNM_NOMATCH, + "\\(", "(", 0, 0, + "\\a", "a", 0, 0, + "\\*", "a", 0, FNM_NOMATCH, + "\\?", "a", 0, FNM_NOMATCH, + "\\*", "\\*", 0, FNM_NOMATCH, + "\\?", "\\?", 0, FNM_NOMATCH, + "\\[x]", "\\[x]", 0, FNM_NOMATCH, + "\\[x]", "\\x", 0, FNM_NOMATCH, + "\\[", "\\[", 0, FNM_NOMATCH, + "\\(", "\\(", 0, FNM_NOMATCH, + "\\a", "\\a", 0, FNM_NOMATCH, + "\\*", "\\*", FNM_NOESCAPE, 0, + "\\?", "\\?", FNM_NOESCAPE, 0, + "\\", "\\", FNM_NOESCAPE, 0, + "\\\\", "\\", FNM_NOESCAPE, FNM_NOMATCH, + "\\\\", "\\\\", FNM_NOESCAPE, 0, + "*\\*", "foo\\foo", FNM_NOESCAPE, 0, + "*\\*", "foo", FNM_NOESCAPE, FNM_NOMATCH, + "*", ".", FNM_PERIOD, FNM_NOMATCH, + "?", ".", FNM_PERIOD, FNM_NOMATCH, + ".*", ".", 0, 0, + ".*", "..", 0, 0, + ".*", ".a", 0, 0, + "[0-9]", ".", FNM_PERIOD, FNM_NOMATCH, + "a*", "a.", 0, 0, + "a/a", "a/a", FNM_PATHNAME, 0, + "a/*", "a/a", FNM_PATHNAME, 0, + "*/a", "a/a", FNM_PATHNAME, 0, + "*/*", "a/a", FNM_PATHNAME, 0, + "a*b/*", "abbb/x", FNM_PATHNAME, 0, + "a*b/*", "abbb/.x", FNM_PATHNAME, 0, + "*", "a/a", FNM_PATHNAME, FNM_NOMATCH, + "*/*", "a/a/a", FNM_PATHNAME, FNM_NOMATCH, + "b/*", "b/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH, + "b*/*", "a/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH, + "b/.*", "b/.x", FNM_PATHNAME | FNM_PERIOD, 0, + "b*/.*", "b/.x", FNM_PATHNAME | FNM_PERIOD, 0, + "a", "A", FNM_CASEFOLD, 0, + "A", "a", FNM_CASEFOLD, 0, + "[a]", "A", FNM_CASEFOLD, 0, + "[A]", "a", FNM_CASEFOLD, 0, + "a", "b", FNM_CASEFOLD, FNM_NOMATCH, + "a", "a/b", FNM_PATHNAME, FNM_NOMATCH, + "*", "a/b", FNM_PATHNAME, FNM_NOMATCH, + "*b", "a/b", FNM_PATHNAME, FNM_NOMATCH, + "a", "a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, + "*", "a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, + "*", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, + "*a", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, + "*", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH, + "*a", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH, +}; + +static const char * +flags_to_string(int flags) +{ + static const int flagvalues[] = { FNM_NOESCAPE, FNM_PATHNAME, + FNM_PERIOD, FNM_LEADING_DIR, FNM_CASEFOLD, 0 }; + static const char flagnames[] = "FNM_NOESCAPE\0FNM_PATHNAME\0FNM_PERIOD\0FNM_LEADING_DIR\0FNM_CASEFOLD\0"; + static char result[sizeof(flagnames) + 3 * sizeof(int) + 2]; + char *p; + size_t i, len; + const char *fp; + + p = result; + fp = flagnames; + for (i = 0; flagvalues[i] != 0; i++) { + len = strlen(fp); + if (flags & flagvalues[i]) { + if (p != result) + *p++ = '|'; + memcpy(p, fp, len); + p += len; + flags &= ~flagvalues[i]; + } + fp += len + 1; + } + if (p == result) + memcpy(p, "0", 2); + else if (flags != 0) + sprintf(p, "%d", flags); + else + *p = '\0'; + return result; +} + +int +main(int argc, char *argv[]) +{ + size_t i, n; + int flags, result, extra, errors; + struct testcase *t; + + n = sizeof(testcases) / sizeof(testcases[0]); + errors = 0; + printf("1..%zu\n", n); + for (i = 0; i < n; i++) { + t = &testcases[i]; + flags = t->flags; + extra = 0; + do { + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + if (strchr(t->pattern, '\\') == NULL && + !(flags & FNM_NOESCAPE)) { + flags |= FNM_NOESCAPE; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if (strchr(t->pattern, '\\') != NULL && + strchr(t->string, '\\') == NULL && + t->result == FNM_NOMATCH && + !(flags & (FNM_NOESCAPE | FNM_LEADING_DIR))) { + flags |= FNM_NOESCAPE; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if ((t->string[0] != '.' || t->pattern[0] == '.' || + t->result == FNM_NOMATCH) && + !(flags & (FNM_PATHNAME | FNM_PERIOD))) { + flags |= FNM_PERIOD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if ((strchr(t->string, '/') == NULL || + t->result == FNM_NOMATCH) && + !(flags & FNM_PATHNAME)) { + flags |= FNM_PATHNAME; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if ((((t->string[0] != '.' || t->pattern[0] == '.') && + strstr(t->string, "/.") == NULL) || + t->result == FNM_NOMATCH) && + flags & FNM_PATHNAME && !(flags & FNM_PERIOD)) { + flags |= FNM_PERIOD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if ((((t->string[0] != '.' || t->pattern[0] == '.') && + strchr(t->string, '/') == NULL) || + t->result == FNM_NOMATCH) && + !(flags & (FNM_PATHNAME | FNM_PERIOD))) { + flags |= FNM_PATHNAME | FNM_PERIOD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if ((strchr(t->string, '/') == NULL || t->result == 0) + && !(flags & FNM_LEADING_DIR)) { + flags |= FNM_LEADING_DIR; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if (t->result == 0 && !(flags & FNM_CASEFOLD)) { + flags |= FNM_CASEFOLD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + if (strchr(t->pattern, '\\') == NULL && + t->result == 0 && + !(flags & (FNM_NOESCAPE | FNM_CASEFOLD))) { + flags |= FNM_NOESCAPE | FNM_CASEFOLD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + extra++; + } + } while (0); + if (result == t->result) + printf("ok %zu - fnmatch(\"%s\", \"%s\", %s) = %d (+%d)\n", + i + 1, t->pattern, t->string, + flags_to_string(flags), + result, extra); + else { + printf("not ok %zu - fnmatch(\"%s\", \"%s\", %s) = %d != %d\n", + i + 1, t->pattern, t->string, + flags_to_string(flags), + result, t->result); + errors = 1; + } + } + + return (errors); +} From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 22:29:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DF7A106566C; Fri, 16 Apr 2010 22:29:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 042E68FC0A; Fri, 16 Apr 2010 22:29: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 o3GMTOug066700; Fri, 16 Apr 2010 22:29:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GMTOJe066697; Fri, 16 Apr 2010 22:29:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004162229.o3GMTOJe066697@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 16 Apr 2010 22:29: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: r206711 - in head: lib/libc/gen tools/regression/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, 16 Apr 2010 22:29:25 -0000 Author: jilles Date: Fri Apr 16 22:29:24 2010 New Revision: 206711 URL: http://svn.freebsd.org/changeset/base/206711 Log: fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen. Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD) PR: 116074 MFC after: 1 week Modified: head/lib/libc/gen/fnmatch.c head/tools/regression/lib/libc/gen/test-fnmatch.c Modified: head/lib/libc/gen/fnmatch.c ============================================================================== --- head/lib/libc/gen/fnmatch.c Fri Apr 16 22:15:26 2010 (r206710) +++ head/lib/libc/gen/fnmatch.c Fri Apr 16 22:29:24 2010 (r206711) @@ -67,7 +67,8 @@ __FBSDID("$FreeBSD$"); #define RANGE_ERROR (-1) static int rangematch(const char *, wchar_t, int, char **, mbstate_t *); -static int fnmatch1(const char *, const char *, int, mbstate_t, mbstate_t); +static int fnmatch1(const char *, const char *, const char *, int, mbstate_t, + mbstate_t); int fnmatch(pattern, string, flags) @@ -76,22 +77,21 @@ fnmatch(pattern, string, flags) { static const mbstate_t initial; - return (fnmatch1(pattern, string, flags, initial, initial)); + return (fnmatch1(pattern, string, string, flags, initial, initial)); } static int -fnmatch1(pattern, string, flags, patmbs, strmbs) - const char *pattern, *string; +fnmatch1(pattern, string, stringstart, flags, patmbs, strmbs) + const char *pattern, *string, *stringstart; int flags; mbstate_t patmbs, strmbs; { - const char *stringstart; char *newp; char c; wchar_t pc, sc; size_t pclen, sclen; - for (stringstart = string;;) { + for (;;) { pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); @@ -145,8 +145,8 @@ fnmatch1(pattern, string, flags, patmbs, /* General case, use recursion. */ while (sc != EOS) { - if (!fnmatch1(pattern, string, - flags & ~FNM_PERIOD, patmbs, strmbs)) + if (!fnmatch1(pattern, string, stringstart, + flags, patmbs, strmbs)) return (0); sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs); Modified: head/tools/regression/lib/libc/gen/test-fnmatch.c ============================================================================== --- head/tools/regression/lib/libc/gen/test-fnmatch.c Fri Apr 16 22:15:26 2010 (r206710) +++ head/tools/regression/lib/libc/gen/test-fnmatch.c Fri Apr 16 22:29:24 2010 (r206711) @@ -174,6 +174,7 @@ struct testcase { "*a", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, "*", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH, "*a", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH, + "a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH, }; static const char * From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 22:30:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59E4C106564A; Fri, 16 Apr 2010 22:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 175BC8FC17; Fri, 16 Apr 2010 22:30:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 77D2241C7AE; Sat, 17 Apr 2010 00:30:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 5iO1t4IQeHrc; Sat, 17 Apr 2010 00:30:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 0E5F341C7AD; Sat, 17 Apr 2010 00:30:06 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 7EE0F4448EC; Fri, 16 Apr 2010 22:27:57 +0000 (UTC) Date: Fri, 16 Apr 2010 22:27:57 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Doug Barton In-Reply-To: <201004090135.o391Z9q2092650@svn.freebsd.org> Message-ID: <20100416214823.Q40281@maildrop.int.zabbadoz.net> References: <201004090135.o391Z9q2092650@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 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: r206408 - in head: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 22:30:07 -0000 On Fri, 9 Apr 2010, Doug Barton wrote: Hi, first off all it would have been easier to figure a few things out, if the several different things had been individual commits or if the commit hadn't happed in the middle of a discussion that died with this. The comments below are on the first four things I could figure out easily. > Author: dougb > Date: Fri Apr 9 01:35:09 2010 > New Revision: 206408 > URL: http://svn.freebsd.org/changeset/base/206408 > > Log: ... > 6. Add support for the [NO]RTADV options in ifconfig_getargs() and > ipv6_autoconfif(). In the latter, include support for the explicit > addition of [-]accept_rtadv in ifconfig__ipv6 as is done > in the current code. So usually we seem to use the upper case pseudo arguments like DHCP, SYNCDHCP, WPA, .. in combination with an actual command to start apart from ifconfig. Now RTADV does not do that but it passes accept_rtadv or -accept_rtadv to ifconfig. So if you need a command alias for that it should probably be in ifconfig and discussed separately. Please revert this part. > Switch ipv6_prefer to YES. If ipv6_enable is not set this will have > no effect. This changed the default. I am pretty sure this is going to bite massively. Why do we need opt-out rather than the previous opt-in here? I have no idea where in the commit message it was but I must have missed it. Anyway, with this change the link-local addresses are there by default (even though luckily still disabled -- though I not entirely sure that this would hold for all possible combinations) even if there is no IPv6 configured. We didn't have this on say stable/7 unless explicitly configured (globally) and I am not sure for how many releases. This should be reverted. It should be added that I think these defaults will hell confuse people even more as things are there even though not configured and are not working because they are disabled. The learning curve to figure that out is way higher than simply "nothing there -> put and ifconfig_IF_ipv6 line into rc.conf". > 5. In rc.d/netoptions, add code for an ipv6_privacy option to use > RFC 4193 style pseudo-random addresses .. > Add a default for ipv6_privacy (NO). I think this is the only option I can say I feel ok with so far. /bz -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 22:37:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9D3C1065672 for ; Fri, 16 Apr 2010 22:37:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id 208578FC1C for ; Fri, 16 Apr 2010 22:37:39 +0000 (UTC) Received: (qmail 26740 invoked by uid 399); 16 Apr 2010 22:37:38 -0000 Received: from localhost (HELO ?192.168.0.145?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 16 Apr 2010 22:37:38 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BC8E6B0.2060709@FreeBSD.org> Date: Fri, 16 Apr 2010 15:37:36 -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: "Bjoern A. Zeeb" References: <201004090135.o391Z9q2092650@svn.freebsd.org> <20100416214823.Q40281@maildrop.int.zabbadoz.net> In-Reply-To: <20100416214823.Q40281@maildrop.int.zabbadoz.net> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206408 - in head: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Apr 2010 22:37:40 -0000 Rather than have the discussion about this here I'm going to respond to your message on -current where the most recent discussion about this took place. 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 Fri Apr 16 23:42:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 610521065673; Fri, 16 Apr 2010 23:42:19 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51EF48FC20; Fri, 16 Apr 2010 23:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GNgJJC082776; Fri, 16 Apr 2010 23:42:19 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GNgJsd082774; Fri, 16 Apr 2010 23:42:19 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004162342.o3GNgJsd082774@svn.freebsd.org> From: Juli Mallett Date: Fri, 16 Apr 2010 23:42: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: r206712 - head/sys/mips/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, 16 Apr 2010 23:42:19 -0000 Author: jmallett Date: Fri Apr 16 23:42:19 2010 New Revision: 206712 URL: http://svn.freebsd.org/changeset/base/206712 Log: Set KERNLOADADDR and TARGET_BIG_ENDIAN for SWARM. Modified: head/sys/mips/conf/SWARM Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Fri Apr 16 22:29:24 2010 (r206711) +++ head/sys/mips/conf/SWARM Fri Apr 16 23:42:19 2010 (r206712) @@ -19,8 +19,13 @@ options CFE_CONSOLE options CFE_ENV options ALT_BREAK_TO_DEBUGGER +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" +makeoptions TARGET_BIG_ENDIAN=defined makeoptions LDSCRIPT_NAME= ldscript.mips.cfe +makeoptions KERNLOADADDR=0x81000000 + #cpu CPU_MIPS64 #options ISA_MIPS64 #makeoptions ARCH_FLAGS="-march=mips64 -mgp64 -mabi=o64" From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 23:46:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99DF61065670; Fri, 16 Apr 2010 23:46:30 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89F5C8FC13; Fri, 16 Apr 2010 23:46: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 o3GNkUiL083744; Fri, 16 Apr 2010 23:46:30 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GNkUkk083742; Fri, 16 Apr 2010 23:46:30 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004162346.o3GNkUkk083742@svn.freebsd.org> From: Juli Mallett Date: Fri, 16 Apr 2010 23:46: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: r206713 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 23:46:30 -0000 Author: jmallett Date: Fri Apr 16 23:46:30 2010 New Revision: 206713 URL: http://svn.freebsd.org/changeset/base/206713 Log: o) Fix the intr_* functions to not spam the whole status register, just the IE bit. o) Remove some unused inlines. o) Generate CP0 access functions for 64-bit TLB registers when building for n64. o) Add an inline function version of the COP0_SYNC macro. Modified: head/sys/mips/include/cpufunc.h Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Fri Apr 16 23:42:19 2010 (r206712) +++ head/sys/mips/include/cpufunc.h Fri Apr 16 23:46:30 2010 (r206713) @@ -1,5 +1,29 @@ /* $OpenBSD: pio.h,v 1.2 1998/09/15 10:50:12 pefo Exp $ */ +/*- + * Copyright (c) 2002-2004 Juli Mallett. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + */ /* * Copyright (c) 1995-1999 Per Fogelstrom. All rights reserved. * @@ -59,14 +83,16 @@ mips_barrier(void) } static __inline void +mips_cp0_sync(void) +{ + __asm __volatile (__XSTRING(COP0_SYNC)); +} + +static __inline void mips_wbflush(void) { __asm __volatile ("sync" : : : "memory"); mips_barrier(); -#if 0 - __asm __volatile("mtc0 %0, $12\n" /* MIPS_COP_0_STATUS */ - : : "r" (flag)); -#endif } static __inline void @@ -82,54 +108,7 @@ mips_write_membar(void) } #ifdef _KERNEL - -static __inline void -mips_tlbp(void) -{ - __asm __volatile ("tlbp"); - mips_barrier(); -#if 0 - register_t ret; - register_t tmp; - - __asm __volatile("mfc0 %0, $12\n" /* MIPS_COP_0_STATUS */ - "and %1, %0, $~1\n" /* MIPS_SR_INT_IE */ - "mtc0 %1, $12\n" /* MIPS_COP_0_STATUS */ - : "=r" (ret), "=r" (tmp)); - return (ret); -#endif -} - -static __inline void -mips_tlbr(void) -{ - __asm __volatile ("tlbr"); - mips_barrier(); -} - -static __inline void -mips_tlbwi(void) -{ - __asm __volatile ("tlbwi"); - mips_barrier(); -#if 0 - __asm __volatile("mfc %0, $12\n" /* MIPS_COP_0_STATUS */ - "or %0, %0, $1\n" /* MIPS_SR_INT_IE */ - "mtc0 %0, $12\n" /* MIPS_COP_0_STATUS */ - : "=r" (tmp)); -#endif -} - -static __inline void -mips_tlbwr(void) -{ - __asm __volatile ("tlbwr"); - mips_barrier(); -} - - -#if 0 /* XXX mips64 */ - +#if defined(__mips_n32) || defined(__mips_n64) #define MIPS_RDRW64_COP0(n,r) \ static __inline uint64_t \ mips_rd_ ## n (void) \ @@ -152,10 +131,12 @@ mips_wr_ ## n (uint64_t a0) \ mips_barrier(); \ } struct __hack +#if defined(__mips_n64) MIPS_RDRW64_COP0(entrylo0, MIPS_COP_0_TLB_LO0); MIPS_RDRW64_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RDRW64_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RDRW64_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); +#endif MIPS_RDRW64_COP0(xcontext, MIPS_COP_0_TLB_XCONTEXT); #undef MIPS_RDRW64_COP0 @@ -230,12 +211,15 @@ MIPS_RDRW32_COP0(cause, MIPS_COP_0_CAUSE MIPS_RDRW32_COP0(status, MIPS_COP_0_STATUS); /* XXX: Some of these registers are specific to MIPS32. */ +#if !defined(__mips_n64) MIPS_RDRW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); MIPS_RDRW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); -MIPS_RDRW32_COP0(entrylow, MIPS_COP_0_TLB_LOW); MIPS_RDRW32_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RDRW32_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); +#endif MIPS_RDRW32_COP0(prid, MIPS_COP_0_PRID); +/* XXX 64-bit? */ +MIPS_RDRW32_COP0_SEL(prid, MIPS_COP_0_PRID, 1); MIPS_RDRW32_COP0(watchlo, MIPS_COP_0_WATCH_LO); MIPS_RDRW32_COP0_SEL(watchlo, MIPS_COP_0_WATCH_LO, 1); MIPS_RDRW32_COP0_SEL(watchlo, MIPS_COP_0_WATCH_LO, 2); @@ -250,7 +234,6 @@ MIPS_RDRW32_COP0_SEL(perfcnt, MIPS_COP_0 MIPS_RDRW32_COP0_SEL(perfcnt, MIPS_COP_0_PERFCNT, 2); MIPS_RDRW32_COP0_SEL(perfcnt, MIPS_COP_0_PERFCNT, 3); - #undef MIPS_RDRW32_COP0 static __inline register_t @@ -261,7 +244,7 @@ intr_disable(void) s = mips_rd_status(); mips_wr_status(s & ~MIPS_SR_INT_IE); - return (s); + return (s & MIPS_SR_INT_IE); } static __inline register_t @@ -275,7 +258,13 @@ intr_enable(void) return (s); } -#define intr_restore(s) mips_wr_status((s)) +static __inline void +intr_restore(register_t ie) +{ + if (ie == MIPS_SR_INT_IE) { + intr_enable(); + } +} static __inline void breakpoint(void) From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 23:48:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55DA8106564A; Fri, 16 Apr 2010 23:48:28 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451448FC0C; Fri, 16 Apr 2010 23: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 o3GNmSJ1084222; Fri, 16 Apr 2010 23:48:28 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GNmS0c084217; Fri, 16 Apr 2010 23:48:28 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004162348.o3GNmS0c084217@svn.freebsd.org> From: Juli Mallett Date: Fri, 16 Apr 2010 23: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: r206714 - 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: Fri, 16 Apr 2010 23:48:28 -0000 Author: jmallett Date: Fri Apr 16 23:48:28 2010 New Revision: 206714 URL: http://svn.freebsd.org/changeset/base/206714 Log: o) Use the direct map where possible for uiomove_fromphys, based on code from sparc64. o) Use uiomove_fromphys rather than the broken fpage mechanism for /dev/mem. o) Update sf_buf allocator to not share buffers and to do a pmap_qremove when done with an sf_buf so as to better track valid mappings. Modified: head/sys/mips/include/sf_buf.h head/sys/mips/mips/mem.c head/sys/mips/mips/uio_machdep.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/include/sf_buf.h ============================================================================== --- head/sys/mips/include/sf_buf.h Fri Apr 16 23:46:30 2010 (r206713) +++ head/sys/mips/include/sf_buf.h Fri Apr 16 23:48:28 2010 (r206714) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003, 2005 Alan L. Cox + * Copyright (c) 2003 Alan L. Cox * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,29 +23,20 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: src/sys/i386/include/sf_buf.h,v 1.4 2005/02/13 06:23:13 alc * $FreeBSD$ */ #ifndef _MACHINE_SF_BUF_H_ -#define _MACHINE_SF_BUF_H_ +#define _MACHINE_SF_BUF_H_ #include -#include -#include -#include struct vm_page; struct sf_buf { - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ + SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ struct vm_page *m; /* currently mapped page */ vm_offset_t kva; /* va of mapping */ - int ref_count; /* usage of this mapping */ -#ifdef SMP - cpumask_t cpumask; /* cpus on which mapping is valid */ -#endif }; static __inline vm_offset_t Modified: head/sys/mips/mips/mem.c ============================================================================== --- head/sys/mips/mips/mem.c Fri Apr 16 23:46:30 2010 (r206713) +++ head/sys/mips/mips/mem.c Fri Apr 16 23:48:28 2010 (r206714) @@ -1,13 +1,12 @@ -/* $OpenBSD: mem.c,v 1.2 1998/08/31 17:42:34 millert Exp $ */ -/* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */ -/* +/*- * Copyright (c) 1988 University of Utah. - * Copyright (c) 1982, 1986, 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. + * All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer - * Science Department and Ralph Campbell. + * Science Department, and code derived from software contributed to + * Berkeley by William Jolitz. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,161 +32,136 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)mem.c 8.3 (Berkeley) 1/12/94 - * JNPR: mem.c,v 1.3 2007/08/09 11:23:32 katta Exp $ + * from: Utah $Hdr: mem.c 1.13 89/10/08$ + * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 */ +#include +__FBSDID("$FreeBSD$"); + /* * Memory special file */ -#include -__FBSDID("$FreeBSD$"); - #include -#include #include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include #include #include -#include -#include +#include #include -#include -#include -#include -#include + #include -#include +#include + +#include +#include +#include +#include + #include +struct mem_range_softc mem_range_softc; -extern struct sysmaps sysmaps_pcpu[]; -/*ARGSUSED*/ +/* ARGSUSED */ int -memrw(dev, uio, flags) - struct cdev *dev; - struct uio *uio; - int flags; +memrw(struct cdev *dev, struct uio *uio, int flags) { - register vm_offset_t v; - register int c; - register struct iovec *iov; + struct iovec *iov; int error = 0; + vm_offset_t va, eva, off, v; + vm_prot_t prot; + struct vm_page m; + vm_page_t marr; + vm_size_t cnt; + + cnt = 0; + error = 0; + + GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { + while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; if (iov->iov_len == 0) { uio->uio_iov++; uio->uio_iovcnt--; if (uio->uio_iovcnt < 0) - panic("mmrw"); + panic("memrw"); continue; } - - /* minor device 0 is physical memory */ if (dev2unit(dev) == CDEV_MINOR_MEM) { v = uio->uio_offset; - c = iov->iov_len; - vm_offset_t va; - vm_paddr_t pa; - register int o; - - if (is_cacheable_mem(v) && - is_cacheable_mem(v + c - 1)) { - struct fpage *fp; - struct sysmaps *sysmaps; - - sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; - mtx_lock(&sysmaps->lock); - sched_pin(); - - fp = &sysmaps->fp[PMAP_FPAGE1]; - pa = uio->uio_offset & ~PAGE_MASK; - va = pmap_map_fpage(pa, fp, FALSE); - o = (int)uio->uio_offset & PAGE_MASK; - c = (u_int)(PAGE_SIZE - - ((uintptr_t)iov->iov_base & PAGE_MASK)); - c = min(c, (u_int)(PAGE_SIZE - o)); - c = min(c, (u_int)iov->iov_len); - error = uiomove((caddr_t)(va + o), (int)c, uio); - pmap_unmap_fpage(pa, fp); - sched_unpin(); - mtx_unlock(&sysmaps->lock); - } else - return (EFAULT); - continue; + off = uio->uio_offset & PAGE_MASK; + cnt = PAGE_SIZE - ((vm_offset_t)iov->iov_base & + PAGE_MASK); + cnt = min(cnt, PAGE_SIZE - off); + cnt = min(cnt, iov->iov_len); + + m.phys_addr = trunc_page(v); + marr = &m; + error = uiomove_fromphys(&marr, off, cnt, uio); } - - /* minor device 1 is kernel memory */ else if (dev2unit(dev) == CDEV_MINOR_KMEM) { - v = uio->uio_offset; - c = min(iov->iov_len, MAXPHYS); + va = uio->uio_offset; - vm_offset_t addr, eaddr; - vm_offset_t wired_tlb_virtmem_end; - - /* - * Make sure that all of the pages are currently - * resident so that we don't create any zero-fill pages. + va = trunc_page(uio->uio_offset); + eva = round_page(uio->uio_offset + + iov->iov_len); + + /* + * Make sure that all the pages are currently resident + * so that we don't create any zero-fill pages. */ - addr = trunc_page(uio->uio_offset); - eaddr = round_page(uio->uio_offset + c); - if (addr > (vm_offset_t) VM_MIN_KERNEL_ADDRESS) { - wired_tlb_virtmem_end = VM_MIN_KERNEL_ADDRESS + - VM_KERNEL_ALLOC_OFFSET; - if ((addr < wired_tlb_virtmem_end) && - (eaddr >= wired_tlb_virtmem_end)) - addr = wired_tlb_virtmem_end; - - if (addr >= wired_tlb_virtmem_end) { - for (; addr < eaddr; addr += PAGE_SIZE) - if (pmap_extract(kernel_pmap, - addr) == 0) - return EFAULT; - - if (!kernacc( - (caddr_t)(uintptr_t)uio->uio_offset, c, - uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) - return (EFAULT); - } - } - else if (MIPS_IS_KSEG0_ADDR(v)) { - if (MIPS_KSEG0_TO_PHYS(v + c) >= ctob(physmem)) - return (EFAULT); - } - else if (MIPS_IS_KSEG1_ADDR(v)) { - if (MIPS_KSEG1_TO_PHYS(v + c) >= ctob(physmem)) + for (; va < eva; va += PAGE_SIZE) + if (pmap_extract(kernel_pmap, va) == 0) return (EFAULT); - } - else + + prot = (uio->uio_rw == UIO_READ) + ? VM_PROT_READ : VM_PROT_WRITE; + + va = uio->uio_offset; + if (kernacc((void *) va, iov->iov_len, prot) + == FALSE) return (EFAULT); + error = uiomove((void *)va, iov->iov_len, uio); - error = uiomove((caddr_t)v, c, uio); continue; } - } + return (error); } -/*ARGSUSED*/ +/* + * allow user processes to MMAP some memory sections + * instead of going through read/write + */ int -memmmap(struct cdev *dev, vm_ooffset_t off, vm_paddr_t *paddr, +memmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) { + /* + * /dev/mem is the only one that makes sense through this + * interface. For /dev/kmem any physaddr we return here + * could be transient and hence incorrect or invalid at + * a later time. + */ + if (dev2unit(dev) != CDEV_MINOR_MEM) + return (-1); + + *paddr = offset; - return (EOPNOTSUPP); + return (0); } void Modified: head/sys/mips/mips/uio_machdep.c ============================================================================== --- head/sys/mips/mips/uio_machdep.c Fri Apr 16 23:46:30 2010 (r206713) +++ head/sys/mips/mips/uio_machdep.c Fri Apr 16 23:48:28 2010 (r206714) @@ -32,8 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 - * from: src/sys/i386/i386/uio_machdep.c,v 1.8 2005/02/13 23:09:36 alc + * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 */ #include @@ -44,17 +43,18 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include +#include /* - * Implement uiomove(9) from physical memory using sf_bufs to reduce - * the creation and destruction of ephemeral mappings. + * Implement uiomove(9) from physical memory using a combination + * of the direct mapping and sf_bufs to reduce the creation and + * destruction of ephemeral mappings. */ int uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) @@ -64,6 +64,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offs struct iovec *iov; void *cp; vm_offset_t page_offset; + vm_paddr_t pa; + vm_page_t m; size_t cnt; int error = 0; int save = 0; @@ -85,10 +87,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offs if (cnt > n) cnt = n; page_offset = offset & PAGE_MASK; - cnt = min(cnt, PAGE_SIZE - page_offset); - sched_pin(); - sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT], SFB_CPUPRIVATE); - cp = (char *)sf_buf_kva(sf) + page_offset; + cnt = ulmin(cnt, PAGE_SIZE - page_offset); + m = ma[offset >> PAGE_SHIFT]; + pa = VM_PAGE_TO_PHYS(m); + if (pa < MIPS_KSEG0_LARGEST_PHYS) { + cp = (char *)MIPS_PHYS_TO_KSEG0(pa); + sf = NULL; + } else { + sf = sf_buf_alloc(m, 0); + cp = (char *)sf_buf_kva(sf) + page_offset; + } switch (uio->uio_segflg) { case UIO_USERSPACE: if (ticks - PCPU_GET(switchticks) >= hogticks) @@ -98,8 +106,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offs else error = copyin(iov->iov_base, cp, cnt); if (error) { - sf_buf_free(sf); - sched_unpin(); + if (sf != NULL) + sf_buf_free(sf); goto out; } break; @@ -112,8 +120,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offs case UIO_NOCOPY: break; } - sf_buf_free(sf); - sched_unpin(); + if (sf != NULL) + sf_buf_free(sf); iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; uio->uio_resid -= cnt; Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Fri Apr 16 23:46:30 2010 (r206713) +++ head/sys/mips/mips/vm_machdep.c Fri Apr 16 23:48:28 2010 (r206714) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -63,12 +64,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include #include -#include #include -#include +#include +#include +#include +#include +#include #include #include @@ -81,26 +85,18 @@ __FBSDID("$FreeBSD$"); static void sf_buf_init(void *arg); SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); -LIST_HEAD(sf_head, sf_buf); - - /* - * A hash table of active sendfile(2) buffers + * Expanded sf_freelist head. Really an SLIST_HEAD() in disguise, with the + * sf_freelist head with the sf_lock mutex. */ -static struct sf_head *sf_buf_active; -static u_long sf_buf_hashmask; - -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) +static struct { + SLIST_HEAD(, sf_buf) sf_head; + struct mtx sf_lock; +} sf_freelist; -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; static u_int sf_buf_alloc_want; /* - * A lock used to synchronize access to the hash table and free list - */ -static struct mtx sf_buf_lock; - -/* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child * ready to run and return to user mode. @@ -471,56 +467,34 @@ sf_buf_init(void *arg) nsfbufs = NSFBUFS; TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); - TAILQ_INIT(&sf_buf_freelist); + mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); + SLIST_INIT(&sf_freelist.sf_head); sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, M_NOWAIT | M_ZERO); for (i = 0; i < nsfbufs; i++) { sf_bufs[i].kva = sf_base + i * PAGE_SIZE; - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); + SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); } sf_buf_alloc_want = 0; - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); } /* - * Allocate an sf_buf for the given vm_page. On this machine, however, there - * is no sf_buf object. Instead, an opaque pointer to the given vm_page is - * returned. + * Get an sf_buf from the freelist. Will block if none are available. */ struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags) { - struct sf_head *hash_list; struct sf_buf *sf; int error; - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; - mtx_lock(&sf_buf_lock); - LIST_FOREACH(sf, hash_list, list_entry) { - if (sf->m == m) { - sf->ref_count++; - if (sf->ref_count == 1) { - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); - nsfbufsused++; - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); - } - /* - * Flush all mappings in order to have up to date - * physycal memory - */ - pmap_flush_pvcache(sf->m); - mips_dcache_inv_range(sf->kva, PAGE_SIZE); - goto done; - } - } - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { + mtx_lock(&sf_freelist.sf_lock); + while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) { if (flags & SFB_NOWAIT) - goto done; + break; sf_buf_alloc_want++; mbstat.sf_allocwait++; - error = msleep(&sf_buf_freelist, &sf_buf_lock, + error = msleep(&sf_freelist, &sf_freelist.sf_lock, (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); sf_buf_alloc_want--; @@ -528,42 +502,33 @@ sf_buf_alloc(struct vm_page *m, int flag * If we got a signal, don't risk going back to sleep. */ if (error) - goto done; + break; } - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); - if (sf->m != NULL) - LIST_REMOVE(sf, list_entry); - LIST_INSERT_HEAD(hash_list, sf, list_entry); - sf->ref_count = 1; - sf->m = m; - nsfbufsused++; - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); - pmap_qenter(sf->kva, &sf->m, 1); -done: - mtx_unlock(&sf_buf_lock); + if (sf != NULL) { + SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); + sf->m = m; + nsfbufsused++; + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); + pmap_qenter(sf->kva, &sf->m, 1); + } + mtx_unlock(&sf_freelist.sf_lock); return (sf); } /* - * Free the sf_buf. In fact, do nothing because there are no resources - * associated with the sf_buf. + * Release resources back to the system. */ void sf_buf_free(struct sf_buf *sf) { - mtx_lock(&sf_buf_lock); - sf->ref_count--; - /* - * Make sure all changes in KVA end up in physical memory - */ - mips_dcache_wbinv_range(sf->kva, PAGE_SIZE); - if (sf->ref_count == 0) { - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); - nsfbufsused--; - if (sf_buf_alloc_want > 0) - wakeup_one(&sf_buf_freelist); - } - mtx_unlock(&sf_buf_lock); + + pmap_qremove(sf->kva, 1); + mtx_lock(&sf_freelist.sf_lock); + SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); + nsfbufsused--; + if (sf_buf_alloc_want > 0) + wakeup_one(&sf_freelist); + mtx_unlock(&sf_freelist.sf_lock); } /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 23:54:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 926321065672; Fri, 16 Apr 2010 23:54:56 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8281E8FC08; Fri, 16 Apr 2010 23:54:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3GNsuhN085666; Fri, 16 Apr 2010 23:54:56 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3GNsu07085663; Fri, 16 Apr 2010 23:54:56 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004162354.o3GNsu07085663@svn.freebsd.org> From: Juli Mallett Date: Fri, 16 Apr 2010 23:54: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: r206715 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 23:54:56 -0000 Author: jmallett Date: Fri Apr 16 23:54:56 2010 New Revision: 206715 URL: http://svn.freebsd.org/changeset/base/206715 Log: Adjust limits and formats for ABIs with 64-bit longs. Modified: head/sys/mips/include/_inttypes.h head/sys/mips/include/_limits.h Modified: head/sys/mips/include/_inttypes.h ============================================================================== --- head/sys/mips/include/_inttypes.h Fri Apr 16 23:48:28 2010 (r206714) +++ head/sys/mips/include/_inttypes.h Fri Apr 16 23:54:56 2010 (r206715) @@ -38,177 +38,183 @@ * Macros for format specifiers. */ +#if defined(__mips_n64) +#define PRI64 "l" +#else +#define PRI64 "ll" +#endif + /* fprintf(3) macros for signed integers. */ #define PRId8 "d" /* int8_t */ #define PRId16 "d" /* int16_t */ #define PRId32 "d" /* int32_t */ -#define PRId64 "lld" /* int64_t */ +#define PRId64 PRI64"d" /* int64_t */ #define PRIdLEAST8 "d" /* int_least8_t */ #define PRIdLEAST16 "d" /* int_least16_t */ #define PRIdLEAST32 "d" /* int_least32_t */ -#define PRIdLEAST64 "lld" /* int_least64_t */ +#define PRIdLEAST64 PRI64"d" /* int_least64_t */ #define PRIdFAST8 "d" /* int_fast8_t */ #define PRIdFAST16 "d" /* int_fast16_t */ #define PRIdFAST32 "d" /* int_fast32_t */ -#define PRIdFAST64 "lld" /* int_fast64_t */ +#define PRIdFAST64 PRI64"d" /* int_fast64_t */ #define PRIdMAX "jd" /* intmax_t */ -#define PRIdPTR "d" /* intptr_t */ +#define PRIdPTR "ld" /* intptr_t */ #define PRIi8 "i" /* int8_t */ #define PRIi16 "i" /* int16_t */ #define PRIi32 "i" /* int32_t */ -#define PRIi64 "lli" /* int64_t */ +#define PRIi64 PRI64"i" /* int64_t */ #define PRIiLEAST8 "i" /* int_least8_t */ #define PRIiLEAST16 "i" /* int_least16_t */ #define PRIiLEAST32 "i" /* int_least32_t */ -#define PRIiLEAST64 "lli" /* int_least64_t */ +#define PRIiLEAST64 PRI64"i" /* int_least64_t */ #define PRIiFAST8 "i" /* int_fast8_t */ #define PRIiFAST16 "i" /* int_fast16_t */ #define PRIiFAST32 "i" /* int_fast32_t */ -#define PRIiFAST64 "lli" /* int_fast64_t */ +#define PRIiFAST64 PRI64"i" /* int_fast64_t */ #define PRIiMAX "ji" /* intmax_t */ -#define PRIiPTR "i" /* intptr_t */ +#define PRIiPTR "li" /* intptr_t */ /* fprintf(3) macros for unsigned integers. */ #define PRIo8 "o" /* uint8_t */ #define PRIo16 "o" /* uint16_t */ #define PRIo32 "o" /* uint32_t */ -#define PRIo64 "llo" /* uint64_t */ +#define PRIo64 PRI64"o" /* uint64_t */ #define PRIoLEAST8 "o" /* uint_least8_t */ #define PRIoLEAST16 "o" /* uint_least16_t */ #define PRIoLEAST32 "o" /* uint_least32_t */ -#define PRIoLEAST64 "llo" /* uint_least64_t */ +#define PRIoLEAST64 PRI64"o" /* uint_least64_t */ #define PRIoFAST8 "o" /* uint_fast8_t */ #define PRIoFAST16 "o" /* uint_fast16_t */ #define PRIoFAST32 "o" /* uint_fast32_t */ -#define PRIoFAST64 "llo" /* uint_fast64_t */ +#define PRIoFAST64 PRI64"o" /* uint_fast64_t */ #define PRIoMAX "jo" /* uintmax_t */ -#define PRIoPTR "o" /* uintptr_t */ +#define PRIoPTR "lo" /* uintptr_t */ #define PRIu8 "u" /* uint8_t */ #define PRIu16 "u" /* uint16_t */ #define PRIu32 "u" /* uint32_t */ -#define PRIu64 "llu" /* uint64_t */ +#define PRIu64 PRI64"u" /* uint64_t */ #define PRIuLEAST8 "u" /* uint_least8_t */ #define PRIuLEAST16 "u" /* uint_least16_t */ #define PRIuLEAST32 "u" /* uint_least32_t */ -#define PRIuLEAST64 "llu" /* uint_least64_t */ +#define PRIuLEAST64 PRI64"u" /* uint_least64_t */ #define PRIuFAST8 "u" /* uint_fast8_t */ #define PRIuFAST16 "u" /* uint_fast16_t */ #define PRIuFAST32 "u" /* uint_fast32_t */ -#define PRIuFAST64 "llu" /* uint_fast64_t */ +#define PRIuFAST64 PRI64"u" /* uint_fast64_t */ #define PRIuMAX "ju" /* uintmax_t */ -#define PRIuPTR "u" /* uintptr_t */ +#define PRIuPTR "lu" /* uintptr_t */ #define PRIx8 "x" /* uint8_t */ #define PRIx16 "x" /* uint16_t */ #define PRIx32 "x" /* uint32_t */ -#define PRIx64 "llx" /* uint64_t */ +#define PRIx64 PRI64"x" /* uint64_t */ #define PRIxLEAST8 "x" /* uint_least8_t */ #define PRIxLEAST16 "x" /* uint_least16_t */ #define PRIxLEAST32 "x" /* uint_least32_t */ -#define PRIxLEAST64 "llx" /* uint_least64_t */ +#define PRIxLEAST64 PRI64"x" /* uint_least64_t */ #define PRIxFAST8 "x" /* uint_fast8_t */ #define PRIxFAST16 "x" /* uint_fast16_t */ #define PRIxFAST32 "x" /* uint_fast32_t */ -#define PRIxFAST64 "llx" /* uint_fast64_t */ +#define PRIxFAST64 PRI64"x" /* uint_fast64_t */ #define PRIxMAX "jx" /* uintmax_t */ -#define PRIxPTR "x" /* uintptr_t */ +#define PRIxPTR "lx" /* uintptr_t */ #define PRIX8 "X" /* uint8_t */ #define PRIX16 "X" /* uint16_t */ #define PRIX32 "X" /* uint32_t */ -#define PRIX64 "llX" /* uint64_t */ +#define PRIX64 PRI64"X" /* uint64_t */ #define PRIXLEAST8 "X" /* uint_least8_t */ #define PRIXLEAST16 "X" /* uint_least16_t */ #define PRIXLEAST32 "X" /* uint_least32_t */ -#define PRIXLEAST64 "llX" /* uint_least64_t */ +#define PRIXLEAST64 PRI64"X" /* uint_least64_t */ #define PRIXFAST8 "X" /* uint_fast8_t */ #define PRIXFAST16 "X" /* uint_fast16_t */ #define PRIXFAST32 "X" /* uint_fast32_t */ -#define PRIXFAST64 "llX" /* uint_fast64_t */ +#define PRIXFAST64 PRI64"X" /* uint_fast64_t */ #define PRIXMAX "jX" /* uintmax_t */ -#define PRIXPTR "X" /* uintptr_t */ +#define PRIXPTR "lX" /* uintptr_t */ /* fscanf(3) macros for signed integers. */ #define SCNd8 "hhd" /* int8_t */ #define SCNd16 "hd" /* int16_t */ #define SCNd32 "d" /* int32_t */ -#define SCNd64 "lld" /* int64_t */ +#define SCNd64 PRI64"d" /* int64_t */ #define SCNdLEAST8 "hhd" /* int_least8_t */ #define SCNdLEAST16 "hd" /* int_least16_t */ #define SCNdLEAST32 "d" /* int_least32_t */ -#define SCNdLEAST64 "lld" /* int_least64_t */ +#define SCNdLEAST64 PRI64"d" /* int_least64_t */ #define SCNdFAST8 "d" /* int_fast8_t */ #define SCNdFAST16 "d" /* int_fast16_t */ #define SCNdFAST32 "d" /* int_fast32_t */ -#define SCNdFAST64 "lld" /* int_fast64_t */ +#define SCNdFAST64 PRI64"d" /* int_fast64_t */ #define SCNdMAX "jd" /* intmax_t */ -#define SCNdPTR "d" /* intptr_t */ +#define SCNdPTR "ld" /* intptr_t */ #define SCNi8 "hhi" /* int8_t */ #define SCNi16 "hi" /* int16_t */ #define SCNi32 "i" /* int32_t */ -#define SCNi64 "lli" /* int64_t */ +#define SCNi64 PRI64"i" /* int64_t */ #define SCNiLEAST8 "hhi" /* int_least8_t */ #define SCNiLEAST16 "hi" /* int_least16_t */ #define SCNiLEAST32 "i" /* int_least32_t */ -#define SCNiLEAST64 "lli" /* int_least64_t */ +#define SCNiLEAST64 PRI64"i" /* int_least64_t */ #define SCNiFAST8 "i" /* int_fast8_t */ #define SCNiFAST16 "i" /* int_fast16_t */ #define SCNiFAST32 "i" /* int_fast32_t */ -#define SCNiFAST64 "lli" /* int_fast64_t */ +#define SCNiFAST64 PRI64"i" /* int_fast64_t */ #define SCNiMAX "ji" /* intmax_t */ -#define SCNiPTR "i" /* intptr_t */ +#define SCNiPTR "li" /* intptr_t */ /* fscanf(3) macros for unsigned integers. */ #define SCNo8 "hho" /* uint8_t */ #define SCNo16 "ho" /* uint16_t */ #define SCNo32 "o" /* uint32_t */ -#define SCNo64 "llo" /* uint64_t */ +#define SCNo64 PRI64"o" /* uint64_t */ #define SCNoLEAST8 "hho" /* uint_least8_t */ #define SCNoLEAST16 "ho" /* uint_least16_t */ #define SCNoLEAST32 "o" /* uint_least32_t */ -#define SCNoLEAST64 "llo" /* uint_least64_t */ +#define SCNoLEAST64 PRI64"o" /* uint_least64_t */ #define SCNoFAST8 "o" /* uint_fast8_t */ #define SCNoFAST16 "o" /* uint_fast16_t */ #define SCNoFAST32 "o" /* uint_fast32_t */ -#define SCNoFAST64 "llo" /* uint_fast64_t */ +#define SCNoFAST64 PRI64"o" /* uint_fast64_t */ #define SCNoMAX "jo" /* uintmax_t */ -#define SCNoPTR "o" /* uintptr_t */ +#define SCNoPTR "lo" /* uintptr_t */ #define SCNu8 "hhu" /* uint8_t */ #define SCNu16 "hu" /* uint16_t */ #define SCNu32 "u" /* uint32_t */ -#define SCNu64 "llu" /* uint64_t */ +#define SCNu64 PRI64"u" /* uint64_t */ #define SCNuLEAST8 "hhu" /* uint_least8_t */ #define SCNuLEAST16 "hu" /* uint_least16_t */ #define SCNuLEAST32 "u" /* uint_least32_t */ -#define SCNuLEAST64 "llu" /* uint_least64_t */ +#define SCNuLEAST64 PRI64"u" /* uint_least64_t */ #define SCNuFAST8 "u" /* uint_fast8_t */ #define SCNuFAST16 "u" /* uint_fast16_t */ #define SCNuFAST32 "u" /* uint_fast32_t */ -#define SCNuFAST64 "llu" /* uint_fast64_t */ +#define SCNuFAST64 PRI64"u" /* uint_fast64_t */ #define SCNuMAX "ju" /* uintmax_t */ -#define SCNuPTR "u" /* uintptr_t */ +#define SCNuPTR "lu" /* uintptr_t */ #define SCNx8 "hhx" /* uint8_t */ #define SCNx16 "hx" /* uint16_t */ #define SCNx32 "x" /* uint32_t */ -#define SCNx64 "llx" /* uint64_t */ +#define SCNx64 PRI64"x" /* uint64_t */ #define SCNxLEAST8 "hhx" /* uint_least8_t */ #define SCNxLEAST16 "hx" /* uint_least16_t */ #define SCNxLEAST32 "x" /* uint_least32_t */ -#define SCNxLEAST64 "llx" /* uint_least64_t */ +#define SCNxLEAST64 PRI64"x" /* uint_least64_t */ #define SCNxFAST8 "x" /* uint_fast8_t */ #define SCNxFAST16 "x" /* uint_fast16_t */ #define SCNxFAST32 "x" /* uint_fast32_t */ -#define SCNxFAST64 "llx" /* uint_fast64_t */ +#define SCNxFAST64 PRI64"x" /* uint_fast64_t */ #define SCNxMAX "jx" /* uintmax_t */ -#define SCNxPTR "x" /* uintptr_t */ +#define SCNxPTR "lx" /* uintptr_t */ #endif /* !_MACHINE_INTTYPES_H_ */ Modified: head/sys/mips/include/_limits.h ============================================================================== --- head/sys/mips/include/_limits.h Fri Apr 16 23:48:28 2010 (r206714) +++ head/sys/mips/include/_limits.h Fri Apr 16 23:54:56 2010 (r206715) @@ -34,6 +34,10 @@ #ifndef _MACHINE__LIMITS_H_ #define _MACHINE__LIMITS_H_ +#if _MIPS_SZLONG == 64 +#define _LARGE_LONG +#endif + /* * According to ANSI (section 2.2.4.2), the values below must be usable by * #if preprocessing directives. Additionally, the expression must have the @@ -76,9 +80,9 @@ #define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ #define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ -#define __SSIZE_MAX __INT_MAX /* max value for a ssize_t */ +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ -#define __SIZE_T_MAX __UINT_MAX /* max value for a size_t */ +#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ #define __OFF_MAX __LLONG_MAX /* max value for an off_t */ #define __OFF_MIN __LLONG_MIN /* min value for an off_t */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 00:05:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 792BE106564A; Sat, 17 Apr 2010 00:05:22 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 688078FC17; Sat, 17 Apr 2010 00:05: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 o3H05MRK088012; Sat, 17 Apr 2010 00:05:22 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H05Mlc088005; Sat, 17 Apr 2010 00:05:22 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004170005.o3H05Mlc088005@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Apr 2010 00:05: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: r206716 - 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: Sat, 17 Apr 2010 00:05:22 -0000 Author: jmallett Date: Sat Apr 17 00:05:22 2010 New Revision: 206716 URL: http://svn.freebsd.org/changeset/base/206716 Log: o) Remove code related to VM_ALLOC_WIRED_TLB_PG_POOL, VM_KERNEL_ALLOC_OFFSET and floating pages. They are unused and unsupported. Modified: head/sys/mips/include/pmap.h head/sys/mips/include/vmparam.h head/sys/mips/mips/genassym.c head/sys/mips/mips/machdep.c head/sys/mips/mips/pmap.c head/sys/mips/mips/swtch.S Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Fri Apr 16 23:54:56 2010 (r206715) +++ head/sys/mips/include/pmap.h Sat Apr 17 00:05:22 2010 (r206716) @@ -160,14 +160,8 @@ typedef struct pv_entry { extern vm_offset_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; extern vm_offset_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; -extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; -extern pd_entry_t *segbase; - -extern vm_paddr_t mips_wired_tlb_physmem_start; -extern vm_paddr_t mips_wired_tlb_physmem_end; -extern u_int need_wired_tlb_page_pool; #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) @@ -189,37 +183,6 @@ void pmap_update_page(pmap_t pmap, vm_of void pmap_flush_pvcache(vm_page_t m); /* - * floating virtual pages (FPAGES) - * - * These are the reserved virtual memory areas which can be - * mapped to any physical memory. - */ -#define FPAGES 2 -#define FPAGES_SHARED 2 -#define FSPACE ((FPAGES * MAXCPU + FPAGES_SHARED) * PAGE_SIZE) -#define PMAP_FPAGE1 0x00 /* Used by pmap_zero_page & - * pmap_copy_page */ -#define PMAP_FPAGE2 0x01 /* Used by pmap_copy_page */ - -#define PMAP_FPAGE3 0x00 /* Used by pmap_zero_page_idle */ -#define PMAP_FPAGE_KENTER_TEMP 0x01 /* Used by coredump */ - -struct fpage { - vm_offset_t kva; - u_int state; -}; - -struct sysmaps { - struct mtx lock; - struct fpage fp[FPAGES]; -}; - -vm_offset_t -pmap_map_fpage(vm_paddr_t pa, struct fpage *fp, - boolean_t check_unmaped); -void pmap_unmap_fpage(vm_paddr_t pa, struct fpage *fp); - -/* * Function to save TLB contents so that they may be inspected in the debugger. */ extern void pmap_save_tlb(void); Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Fri Apr 16 23:54:56 2010 (r206715) +++ head/sys/mips/include/vmparam.h Sat Apr 17 00:05:22 2010 (r206716) @@ -101,12 +101,8 @@ #define VM_MAX_MMAP_ADDR VM_MAXUSER_ADDRESS #define VM_MAX_ADDRESS ((vm_offset_t)0x80000000) -#ifndef VM_KERNEL_ALLOC_OFFSET -#define VM_KERNEL_ALLOC_OFFSET ((vm_offset_t)0x00000000) -#endif - #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xC0000000) -#define VM_KERNEL_WIRED_ADDR_END (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET) +#define VM_KERNEL_WIRED_ADDR_END (VM_MIN_KERNEL_ADDRESS) #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFC000) /* Modified: head/sys/mips/mips/genassym.c ============================================================================== --- head/sys/mips/mips/genassym.c Fri Apr 16 23:54:56 2010 (r206715) +++ head/sys/mips/mips/genassym.c Sat Apr 17 00:05:22 2010 (r206716) @@ -87,7 +87,6 @@ ASSYM(PC_CURPMAP, offsetof(struct pcpu, ASSYM(VM_MAX_KERNEL_ADDRESS, VM_MAX_KERNEL_ADDRESS); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); -ASSYM(VM_KERNEL_ALLOC_OFFSET, VM_KERNEL_ALLOC_OFFSET); ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc)); ASSYM(SIGFPE, SIGFPE); ASSYM(PAGE_SHIFT, PAGE_SHIFT); Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Apr 16 23:54:56 2010 (r206715) +++ head/sys/mips/mips/machdep.c Sat Apr 17 00:05:22 2010 (r206716) @@ -142,10 +142,6 @@ vm_offset_t physmem_desc[PHYS_AVAIL_ENTR struct platform platform; #endif -vm_paddr_t mips_wired_tlb_physmem_start; -vm_paddr_t mips_wired_tlb_physmem_end; -u_int need_wired_tlb_page_pool; - static void cpu_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Apr 16 23:54:56 2010 (r206715) +++ head/sys/mips/mips/pmap.c Sat Apr 17 00:05:22 2010 (r206716) @@ -161,10 +161,6 @@ static uma_zone_t pvzone; static struct vm_object pvzone_obj; static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; -struct fpage fpages_shared[FPAGES_SHARED]; - -struct sysmaps sysmaps_pcpu[MAXCPU]; - static PMAP_INLINE void free_pv_entry(pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t locked_pmap); static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem); @@ -188,7 +184,6 @@ static int pmap_unuse_pt(pmap_t, vm_offs static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); static void pmap_TLB_invalidate_kernel(vm_offset_t); static void pmap_TLB_update_kernel(vm_offset_t, pt_entry_t); -static void pmap_init_fpage(void); #ifdef SMP static void pmap_invalidate_page_action(void *arg); @@ -355,7 +350,7 @@ again: kstack0 = pmap_steal_memory(KSTACK_PAGES << PAGE_SHIFT); - virtual_avail = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET; + virtual_avail = VM_MIN_KERNEL_ADDRESS; virtual_end = VM_MAX_KERNEL_ADDRESS; #ifdef SMP @@ -480,8 +475,6 @@ void pmap_init(void) { - if (need_wired_tlb_page_pool) - pmap_init_fpage(); /* * Initialize the address space (zone) for the pv entries. Set a * high water mark so that the system can recover from excessive @@ -805,136 +798,6 @@ pmap_qremove(vm_offset_t va, int count) * Page table page management routines..... ***************************************************/ -/* - * floating pages (FPAGES) management routines - * - * FPAGES are the reserved virtual memory areas which can be - * mapped to any physical memory. This gets used typically - * in the following functions: - * - * pmap_zero_page - * pmap_copy_page - */ - -/* - * Create the floating pages, aka FPAGES! - */ -static void -pmap_init_fpage() -{ - vm_offset_t kva; - int i, j; - struct sysmaps *sysmaps; - - /* - * We allocate a total of (FPAGES*MAXCPU + FPAGES_SHARED + 1) pages - * at first. FPAGES & FPAGES_SHARED should be EVEN Then we'll adjust - * 'kva' to be even-page aligned so that the fpage area can be wired - * in the TLB with a single TLB entry. - */ - kva = kmem_alloc_nofault(kernel_map, - (FPAGES * MAXCPU + 1 + FPAGES_SHARED) * PAGE_SIZE); - if ((void *)kva == NULL) - panic("pmap_init_fpage: fpage allocation failed"); - - /* - * Make up start at an even page number so we can wire down the - * fpage area in the tlb with a single tlb entry. - */ - if ((((vm_offset_t)kva) >> PGSHIFT) & 1) { - /* - * 'kva' is not even-page aligned. Adjust it and free the - * first page which is unused. - */ - kmem_free(kernel_map, (vm_offset_t)kva, NBPG); - kva = ((vm_offset_t)kva) + NBPG; - } else { - /* - * 'kva' is even page aligned. We don't need the last page, - * free it. - */ - kmem_free(kernel_map, ((vm_offset_t)kva) + FSPACE, NBPG); - } - - for (i = 0; i < MAXCPU; i++) { - sysmaps = &sysmaps_pcpu[i]; - mtx_init(&sysmaps->lock, "SYSMAPS", NULL, MTX_DEF); - - /* Assign FPAGES pages to the CPU */ - for (j = 0; j < FPAGES; j++) - sysmaps->fp[j].kva = kva + (j) * PAGE_SIZE; - kva = ((vm_offset_t)kva) + (FPAGES * PAGE_SIZE); - } - - /* - * An additional 2 pages are needed, one for pmap_zero_page_idle() - * and one for coredump. These pages are shared by all cpu's - */ - fpages_shared[PMAP_FPAGE3].kva = kva; - fpages_shared[PMAP_FPAGE_KENTER_TEMP].kva = kva + PAGE_SIZE; -} - -/* - * Map the page to the fpage virtual address as specified thru' fpage id - */ -vm_offset_t -pmap_map_fpage(vm_paddr_t pa, struct fpage *fp, boolean_t check_unmaped) -{ - vm_offset_t kva; - register pt_entry_t *pte; - pt_entry_t npte; - - KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); - /* - * Check if the fpage is free - */ - if (fp->state) { - if (check_unmaped == TRUE) - pmap_unmap_fpage(pa, fp); - else - panic("pmap_map_fpage: fpage is busy"); - } - fp->state = TRUE; - kva = fp->kva; - - npte = mips_paddr_to_tlbpfn(pa) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pte = pmap_pte(kernel_pmap, kva); - *pte = npte; - - pmap_TLB_update_kernel(kva, npte); - - return (kva); -} - -/* - * Unmap the page from the fpage virtual address as specified thru' fpage id - */ -void -pmap_unmap_fpage(vm_paddr_t pa, struct fpage *fp) -{ - vm_offset_t kva; - register pt_entry_t *pte; - - KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); - /* - * Check if the fpage is busy - */ - if (!(fp->state)) { - panic("pmap_unmap_fpage: fpage is free"); - } - kva = fp->kva; - - pte = pmap_pte(kernel_pmap, kva); - *pte = PTE_G; - pmap_TLB_invalidate_kernel(kva); - - fp->state = FALSE; - - /* - * Should there be any flush operation at the end? - */ -} - /* Revision 1.507 * * Simplify the reference counting of page table pages. Specifically, use @@ -1051,10 +914,6 @@ pmap_pinit(pmap_t pmap) req = VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) - req |= VM_ALLOC_WIRED_TLB_PG_POOL; -#endif /* * allocate the page directory page */ @@ -1105,10 +964,6 @@ _pmap_allocpte(pmap_t pmap, unsigned pte ("_pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); req = VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) - req |= VM_ALLOC_WIRED_TLB_PG_POOL; -#endif /* * Find or fabricate a new pagetable page */ @@ -1279,7 +1134,7 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { - kernel_vm_end = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET; + kernel_vm_end = VM_MIN_KERNEL_ADDRESS; nkpt = 0; while (segtab_pde(kernel_segmap, kernel_vm_end)) { kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & @@ -1308,10 +1163,6 @@ pmap_growkernel(vm_offset_t addr) * This index is bogus, but out of the way */ req = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED | VM_ALLOC_NOOBJ; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) - req |= VM_ALLOC_WIRED_TLB_PG_POOL; -#endif nkpg = vm_page_alloc(NULL, nkpt, req); if (!nkpg) panic("pmap_growkernel: no memory to grow kernel"); @@ -2155,12 +2006,6 @@ pmap_kenter_temporary(vm_paddr_t pa, int printf("%s: ERROR!!! More than one page of virtual address mapping not supported\n", __func__); -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) { - va = pmap_map_fpage(pa, &fpages_shared[PMAP_FPAGE_KENTER_TEMP], - TRUE); - } else -#endif if (pa < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_KSEG0(pa); } else { @@ -2312,26 +2157,7 @@ pmap_zero_page(vm_page_t m) vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); int int_level; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) { - struct fpage *fp1; - struct sysmaps *sysmaps; - - sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; - mtx_lock(&sysmaps->lock); - sched_pin(); - fp1 = &sysmaps->fp[PMAP_FPAGE1]; - va = pmap_map_fpage(phys, fp1, FALSE); - bzero((caddr_t)va, PAGE_SIZE); - pmap_unmap_fpage(phys, fp1); - sched_unpin(); - mtx_unlock(&sysmaps->lock); - /* - * Should you do cache flush? - */ - } else -#endif if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_KSEG0(phys); @@ -2358,7 +2184,6 @@ pmap_zero_page(vm_page_t m) sched_unpin(); PMAP_LGMEM_UNLOCK(sysm); } - } /* @@ -2373,24 +2198,7 @@ pmap_zero_page_area(vm_page_t m, int off vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); int int_level; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) { - struct fpage *fp1; - struct sysmaps *sysmaps; - - sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; - mtx_lock(&sysmaps->lock); - sched_pin(); - fp1 = &sysmaps->fp[PMAP_FPAGE1]; - va = pmap_map_fpage(phys, fp1, FALSE); - bzero((caddr_t)va + off, size); - pmap_unmap_fpage(phys, fp1); - - sched_unpin(); - mtx_unlock(&sysmaps->lock); - } else -#endif if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_KSEG0(phys); bzero((char *)(caddr_t)va + off, size); @@ -2423,15 +2231,7 @@ pmap_zero_page_idle(vm_page_t m) vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); int int_level; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) { - sched_pin(); - va = pmap_map_fpage(phys, &fpages_shared[PMAP_FPAGE3], FALSE); - bzero((caddr_t)va, PAGE_SIZE); - pmap_unmap_fpage(phys, &fpages_shared[PMAP_FPAGE3]); - sched_unpin(); - } else -#endif + if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_KSEG0(phys); bzero((caddr_t)va, PAGE_SIZE); @@ -2472,95 +2272,67 @@ pmap_copy_page(vm_page_t src, vm_page_t vm_paddr_t phy_src = VM_PAGE_TO_PHYS(src); vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst); int int_level; -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - if (need_wired_tlb_page_pool) { - struct fpage *fp1, *fp2; - struct sysmaps *sysmaps; - - sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; - mtx_lock(&sysmaps->lock); - sched_pin(); - - fp1 = &sysmaps->fp[PMAP_FPAGE1]; - fp2 = &sysmaps->fp[PMAP_FPAGE2]; - - va_src = pmap_map_fpage(phy_src, fp1, FALSE); - va_dst = pmap_map_fpage(phy_dst, fp2, FALSE); - - bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); - - pmap_unmap_fpage(phy_src, fp1); - pmap_unmap_fpage(phy_dst, fp2); - sched_unpin(); - mtx_unlock(&sysmaps->lock); + if ((phy_src < MIPS_KSEG0_LARGEST_PHYS) && (phy_dst < MIPS_KSEG0_LARGEST_PHYS)) { + /* easy case, all can be accessed via KSEG0 */ /* - * Should you flush the cache? + * Flush all caches for VA that are mapped to this page + * to make sure that data in SDRAM is up to date */ - } else -#endif - { - if ((phy_src < MIPS_KSEG0_LARGEST_PHYS) && (phy_dst < MIPS_KSEG0_LARGEST_PHYS)) { - /* easy case, all can be accessed via KSEG0 */ - /* - * Flush all caches for VA that are mapped to this page - * to make sure that data in SDRAM is up to date - */ - pmap_flush_pvcache(src); - mips_dcache_wbinv_range_index( - MIPS_PHYS_TO_KSEG0(phy_dst), NBPG); + pmap_flush_pvcache(src); + mips_dcache_wbinv_range_index( + MIPS_PHYS_TO_KSEG0(phy_dst), NBPG); + va_src = MIPS_PHYS_TO_KSEG0(phy_src); + va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); + bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); + mips_dcache_wbinv_range(va_dst, PAGE_SIZE); + } else { + int cpu; + struct local_sysmaps *sysm; + + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + PMAP_LGMEM_LOCK(sysm); + sched_pin(); + int_level = disableintr(); + if (phy_src < MIPS_KSEG0_LARGEST_PHYS) { + /* one side needs mapping - dest */ va_src = MIPS_PHYS_TO_KSEG0(phy_src); + sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); + sysm->valid2 = 1; + va_dst = (vm_offset_t)sysm->CADDR2; + } else if (phy_dst < MIPS_KSEG0_LARGEST_PHYS) { + /* one side needs mapping - src */ va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); - bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); - mips_dcache_wbinv_range(va_dst, PAGE_SIZE); + sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + va_src = (vm_offset_t)sysm->CADDR1; + sysm->valid1 = 1; } else { - int cpu; - struct local_sysmaps *sysm; - - cpu = PCPU_GET(cpuid); - sysm = &sysmap_lmem[cpu]; - PMAP_LGMEM_LOCK(sysm); - sched_pin(); - int_level = disableintr(); - if (phy_src < MIPS_KSEG0_LARGEST_PHYS) { - /* one side needs mapping - dest */ - va_src = MIPS_PHYS_TO_KSEG0(phy_src); - sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); - sysm->valid2 = 1; - va_dst = (vm_offset_t)sysm->CADDR2; - } else if (phy_dst < MIPS_KSEG0_LARGEST_PHYS) { - /* one side needs mapping - src */ - va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); - sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - va_src = (vm_offset_t)sysm->CADDR1; - sysm->valid1 = 1; - } else { - /* all need mapping */ - sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); - sysm->valid1 = sysm->valid2 = 1; - va_src = (vm_offset_t)sysm->CADDR1; - va_dst = (vm_offset_t)sysm->CADDR2; - } - bcopy((void *)va_src, (void *)va_dst, PAGE_SIZE); - if (sysm->valid1) { - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); - sysm->CMAP1 = 0; - sysm->valid1 = 0; - } - if (sysm->valid2) { - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR2); - sysm->CMAP2 = 0; - sysm->valid2 = 0; - } - restoreintr(int_level); - sched_unpin(); - PMAP_LGMEM_UNLOCK(sysm); + /* all need mapping */ + sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; + sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); + sysm->valid1 = sysm->valid2 = 1; + va_src = (vm_offset_t)sysm->CADDR1; + va_dst = (vm_offset_t)sysm->CADDR2; + } + bcopy((void *)va_src, (void *)va_dst, PAGE_SIZE); + if (sysm->valid1) { + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); + sysm->CMAP1 = 0; + sysm->valid1 = 0; + } + if (sysm->valid2) { + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR2); + sysm->CMAP2 = 0; + sysm->valid2 = 0; } + restoreintr(int_level); + sched_unpin(); + PMAP_LGMEM_UNLOCK(sysm); } } @@ -3308,11 +3080,6 @@ pmap_kextract(vm_offset_t va) else if (va >= MIPS_KSEG1_START && va < MIPS_KSEG2_START) pa = MIPS_KSEG1_TO_PHYS(va); -#ifdef VM_ALLOC_WIRED_TLB_PG_POOL - else if (need_wired_tlb_page_pool && ((va >= VM_MIN_KERNEL_ADDRESS) && - (va < (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET)))) - pa = MIPS_KSEG0_TO_PHYS(va); -#endif else if (va >= MIPS_KSEG2_START && va < VM_MAX_KERNEL_ADDRESS) { pt_entry_t *ptep; Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Fri Apr 16 23:54:56 2010 (r206715) +++ head/sys/mips/mips/swtch.S Sat Apr 17 00:05:22 2010 (r206716) @@ -340,7 +340,7 @@ blocked_loop: lw a2, TD_PCB(a1) sw a2, PC_CURPCB(a3) lw v0, TD_REALKSTACK(a1) - li s0, (MIPS_KSEG2_START+VM_KERNEL_ALLOC_OFFSET) # If Uarea addr is below kseg2, + li s0, MIPS_KSEG2_START # If Uarea addr is below kseg2, bltu v0, s0, sw2 # no need to insert in TLB. lw a1, TD_UPTE+0(s7) # t0 = first u. pte lw a2, TD_UPTE+4(s7) # t1 = 2nd u. pte From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 01:17:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4845106567B; Sat, 17 Apr 2010 01:17:31 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2CC48FC2E; Sat, 17 Apr 2010 01:17: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 o3H1HVH9003966; Sat, 17 Apr 2010 01:17:31 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H1HVi0003950; Sat, 17 Apr 2010 01:17:31 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004170117.o3H1HVi0003950@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Apr 2010 01:17: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: r206717 - in head: . sys/mips/include sys/mips/mips sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 01:17:31 -0000 Author: jmallett Date: Sat Apr 17 01:17:31 2010 New Revision: 206717 URL: http://svn.freebsd.org/changeset/base/206717 Log: o) Use inline functions to access coprocessor 0 registers rather than external ones implemented using assembly. o) Use TRAPF_USERMODE() consistently rather than USERMODE(). Eliminate as a result. o) Use intr_*() rather than *intr(), consistently. o) Use register_t instead of u_int in some trap code. o) Merge some more endian-related macros to machine/asm.h from NetBSD. o) Add PTR_LI macro, which loads an address with the correct sign-extension for a pointer. o) Restore interrupts when bailing out due to an excessive IRQ in nexus_setup_intr(). o) Remove unused functions from psraccess.S. o) Enter temporary virtual entries for large memory access into the page tables rather than simply hoping they stay resident in the TLB and we don't need to do a refill for them. o) Abstract out large memory mapping setup/teardown using some macros. o) Do mips_dcache_wbinv_range() when using temporary virtual addresses just like we do when we can use the direct map. Deleted: head/sys/mips/include/psl.h Modified: head/ObsoleteFiles.inc head/sys/mips/include/asm.h head/sys/mips/include/cpu.h head/sys/mips/include/db_machdep.h head/sys/mips/include/param.h head/sys/mips/include/profile.h head/sys/mips/include/trap.h head/sys/mips/mips/machdep.c head/sys/mips/mips/mp_machdep.c head/sys/mips/mips/nexus.c head/sys/mips/mips/pmap.c head/sys/mips/mips/psraccess.S head/sys/mips/mips/tick.c head/sys/mips/mips/trap.c head/sys/mips/rmi/clock.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Apr 17 00:05:22 2010 (r206716) +++ head/ObsoleteFiles.inc Sat Apr 17 01:17:31 2010 (r206717) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100416: [mips] removed +.if ${TARGET_ARCH} == "mips" +OLD_FILES+=usr/include/machine/psl.h +.endif # 20100415: [mips] removed unused headers .if ${TARGET_ARCH} == "mips" OLD_FILES+=usr/include/machine/archtype.h Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/include/asm.h Sat Apr 17 01:17:31 2010 (r206717) @@ -98,23 +98,6 @@ #define _C_LABEL(x) x -/* - * Endian-independent assembly-code aliases for unaligned memory accesses. - */ -#if BYTE_ORDER == LITTLE_ENDIAN -#define LWLO lwl -#define LWHI lwr -#define SWLO swl -#define SWHI swr -#endif - -#if BYTE_ORDER == BIG_ENDIAN -#define LWLO lwr -#define LWHI lwl -#define SWLO swr -#define SWHI swl -#endif - #ifdef USE_AENT #define AENT(x) \ .aent x, 0 @@ -306,28 +289,32 @@ _C_LABEL(x): /* * Call ast if required + * + * XXX Do we really need to disable interrupts? */ #define DO_AST \ 44: \ - PTR_LA s0, _C_LABEL(disableintr) ;\ - jalr s0 ;\ - nop ;\ - move a0, v0 ;\ + mfc0 t0, MIPS_COP_0_STATUS ;\ + and a0, t0, MIPS_SR_INT_IE ;\ + xor t0, a0, t0 ;\ + mtc0 t0, MIPS_COP_0_STATUS ;\ + COP0_SYNC ;\ GET_CPU_PCPU(s1) ;\ - lw s3, PC_CURPCB(s1) ;\ - lw s1, PC_CURTHREAD(s1) ;\ + PTR_L s3, PC_CURPCB(s1) ;\ + PTR_L s1, PC_CURTHREAD(s1) ;\ lw s2, TD_FLAGS(s1) ;\ li s0, TDF_ASTPENDING | TDF_NEEDRESCHED;\ and s2, s0 ;\ - PTR_LA s0, _C_LABEL(restoreintr) ;\ - jalr s0 ;\ - nop ;\ + mfc0 t0, MIPS_COP_0_STATUS ;\ + or t0, a0, t0 ;\ + mtc0 t0, MIPS_COP_0_STATUS ;\ + COP0_SYNC ;\ beq s2, zero, 4f ;\ nop ;\ PTR_LA s0, _C_LABEL(ast) ;\ jalr s0 ;\ PTR_ADDU a0, s3, U_PCB_REGS ;\ - j 44b ;\ + j 44b ;\ nop ;\ 4: @@ -383,6 +370,45 @@ _C_LABEL(x): #define CALLFRAME_RA (CALLFRAME_SIZ - 1 * SZREG) /* + * Endian-independent assembly-code aliases for unaligned memory accesses. + */ +#if _BYTE_ORDER == _LITTLE_ENDIAN +# define LWHI lwr +# define LWLO lwl +# define SWHI swr +# define SWLO swl +# if SZREG == 4 +# define REG_LHI lwr +# define REG_LLO lwl +# define REG_SHI swr +# define REG_SLO swl +# else +# define REG_LHI ldr +# define REG_LLO ldl +# define REG_SHI sdr +# define REG_SLO sdl +# endif +#endif + +#if _BYTE_ORDER == _BIG_ENDIAN +# define LWHI lwl +# define LWLO lwr +# define SWHI swl +# define SWLO swr +# if SZREG == 4 +# define REG_LHI lwl +# define REG_LLO lwr +# define REG_SHI swl +# define REG_SLO swr +# else +# define REG_LHI ldl +# define REG_LLO ldr +# define REG_SHI sdl +# define REG_SLO sdr +# endif +#endif + +/* * While it would be nice to be compatible with the SGI * REG_L and REG_S macros, because they do not take parameters, it * is impossible to use them with the _MIPS_SIM_ABIX32 model. @@ -402,6 +428,7 @@ _C_LABEL(x): #define PTR_SUBIU subu #define PTR_L lw #define PTR_LA la +#define PTR_LI li #define PTR_S sw #define PTR_SLL sll #define PTR_SLLV sllv @@ -424,6 +451,7 @@ _C_LABEL(x): #define PTR_SUBIU dsubu #define PTR_L ld #define PTR_LA dla +#define PTR_LI dli #define PTR_S sd #define PTR_SLL dsll #define PTR_SLLV dsllv @@ -765,7 +793,7 @@ _C_LABEL(x): #endif #define GET_CPU_PCPU(reg) \ - lw reg, _C_LABEL(pcpup); + PTR_L reg, _C_LABEL(pcpup); /* * Description of the setjmp buffer Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/include/cpu.h Sat Apr 17 01:17:31 2010 (r206717) @@ -47,7 +47,6 @@ #ifndef _MACHINE_CPU_H_ #define _MACHINE_CPU_H_ -#include #include #define MIPS_KSEG0_LARGEST_PHYS 0x20000000 @@ -334,6 +333,7 @@ #define cpu_swapout(p) panic("cpu_swapout: can't get here"); #ifndef _LOCORE +#include #include /* * Arguments to hardclock and gatherstats encapsulate the previous @@ -342,7 +342,6 @@ #define clockframe trapframe /* Use normal trap frame */ #define CLKF_USERMODE(framep) ((framep)->sr & SR_KSU_USER) -#define CLKF_BASEPRI(framep) ((framep)->cpl == 0) #define CLKF_PC(framep) ((framep)->pc) #define CLKF_INTR(framep) (0) #define MIPS_CLKF_INTR() (intr_nesting_level >= 1) @@ -351,6 +350,11 @@ #define cpu_getstack(td) ((td)->td_frame->sp) /* + * A machine-independent interface to the CPU's counter. + */ +#define get_cyclecount() mips_rd_count() + +/* * CPU identification, from PRID register. */ union cpuprid { @@ -542,18 +546,6 @@ extern int intr_nesting_level; * Low level access routines to CPU registers */ -void setsoftintr0(void); -void clearsoftintr0(void); -void setsoftintr1(void); -void clearsoftintr1(void); - - -u_int32_t mips_cp0_status_read(void); -void mips_cp0_status_write(u_int32_t); - -int disableintr(void); -void restoreintr(int); -int enableintr(void); int Mips_TLBGetPID(void); void swi_vm(void *); @@ -562,7 +554,6 @@ void cpu_reset(void); u_int32_t set_intr_mask(u_int32_t); u_int32_t get_intr_mask(void); -u_int32_t get_cyclecount(void); #define cpu_spinwait() /* nothing */ Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/include/db_machdep.h Sat Apr 17 01:17:31 2010 (r206717) @@ -38,7 +38,6 @@ #define _MIPS_DB_MACHDEP_H_ #include -#include #include #include Modified: head/sys/mips/include/param.h ============================================================================== --- head/sys/mips/include/param.h Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/include/param.h Sat Apr 17 01:17:31 2010 (r206717) @@ -46,9 +46,7 @@ #include #ifdef _KERNEL -#ifdef _LOCORE -#include -#else +#ifndef _LOCORE #include #endif #endif Modified: head/sys/mips/include/profile.h ============================================================================== --- head/sys/mips/include/profile.h Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/include/profile.h Sat Apr 17 01:17:31 2010 (r206717) @@ -84,17 +84,17 @@ #ifdef SMP extern int mcount_lock; #define MCOUNT_ENTER(s) { \ - s = disable_intr(); \ + s = intr_disable(); \ while (!atomic_cmpset_acq_int(&mcount_lock, 0, 1)) \ /* nothing */ ; \ } #define MCOUNT_EXIT(s) { \ atomic_store_rel_int(&mcount_lock, 0); \ - enableintr(s); \ + intr_restore(s); \ } #else -#define MCOUNT_ENTER(s) { s = disable_intr(); } -#define MCOUNT_EXIT(s) (enableintr(s)) +#define MCOUNT_ENTER(s) { s = intr_disable(); } +#define MCOUNT_EXIT(s) (intr_restore(s)) #endif /* REVISIT for mips */ Modified: head/sys/mips/include/trap.h ============================================================================== --- head/sys/mips/include/trap.h Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/include/trap.h Sat Apr 17 01:17:31 2010 (r206717) @@ -74,17 +74,17 @@ #if !defined(SMP) && (defined(DDB) || defined(DEBUG)) struct trapdebug { /* trap history buffer for debugging */ - u_int status; - u_int cause; - u_int vadr; - u_int pc; - u_int ra; - u_int sp; - u_int code; + register_t status; + register_t cause; + register_t vadr; + register_t pc; + register_t ra; + register_t sp; + register_t code; }; #define trapdebug_enter(x, cd) { \ - intrmask_t s = disableintr(); \ + register_t s = intr_disable(); \ trp->status = x->sr; \ trp->cause = x->cause; \ trp->vadr = x->badvaddr; \ @@ -94,7 +94,7 @@ struct trapdebug { /* trap history buff trp->code = cd; \ if (++trp == &trapdebug[TRAPSIZE]) \ trp = trapdebug; \ - restoreintr(s); \ + intr_restore(s); \ } #define TRAPSIZE 10 /* Trap log buffer length */ @@ -116,7 +116,7 @@ void MipsTLBMissException(void); void MipsUserGenException(void); void MipsUserIntr(void); -u_int trap(struct trapframe *); +register_t trap(struct trapframe *); #ifndef LOCORE /* XXX */ int check_address(void *); Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/machdep.c Sat Apr 17 01:17:31 2010 (r206717) @@ -370,11 +370,10 @@ mips_vector_init(void) * when handler is installed for it */ set_intr_mask(ALL_INT_MASK); - enableintr(); + intr_enable(); /* Clear BEV in SR so we start handling our own exceptions */ - mips_cp0_status_write(mips_cp0_status_read() & ~SR_BOOT_EXC_VEC); - + mips_wr_status(mips_rd_status() & ~SR_BOOT_EXC_VEC); } /* @@ -471,7 +470,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) - td->td_md.md_saved_intr = disableintr(); + td->td_md.md_saved_intr = intr_disable(); td->td_md.md_spinlock_count++; critical_enter(); } @@ -485,16 +484,7 @@ spinlock_exit(void) critical_exit(); td->td_md.md_spinlock_count--; if (td->td_md.md_spinlock_count == 0) - restoreintr(td->td_md.md_saved_intr); -} - -u_int32_t -get_cyclecount(void) -{ - u_int32_t count; - - mfc0_macro(count, 9); - return (count); + intr_restore(td->td_md.md_saved_intr); } /* @@ -503,7 +493,7 @@ get_cyclecount(void) void cpu_idle(int busy) { - if (mips_cp0_status_read() & SR_INT_ENAB) + if (mips_rd_status() & SR_INT_ENAB) __asm __volatile ("wait"); else panic("ints disabled in idleproc!"); Modified: head/sys/mips/mips/mp_machdep.c ============================================================================== --- head/sys/mips/mips/mp_machdep.c Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/mp_machdep.c Sat Apr 17 01:17:31 2010 (r206717) @@ -296,7 +296,7 @@ smp_init_secondary(u_int32_t cpuid) */ mips_wr_compare(mips_rd_count() + counter_freq / hz); - enableintr(); + intr_enable(); /* enter the scheduler */ sched_throw(NULL); Modified: head/sys/mips/mips/nexus.c ============================================================================== --- head/sys/mips/mips/nexus.c Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/nexus.c Sat Apr 17 01:17:31 2010 (r206717) @@ -166,16 +166,19 @@ static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { + register_t s; int irq; - intrmask_t s = disableintr(); + s = intr_disable(); irq = rman_get_start(res); - if (irq >= NUM_MIPS_IRQS) + if (irq >= NUM_MIPS_IRQS) { + intr_restore(s); return (0); + } cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, irq, flags, cookiep); - restoreintr(s); + intr_restore(s); return (0); } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/pmap.c Sat Apr 17 01:17:31 2010 (r206717) @@ -194,10 +194,7 @@ static void pmap_update_page_action(void struct local_sysmaps { struct mtx lock; - pt_entry_t CMAP1; - pt_entry_t CMAP2; - caddr_t CADDR1; - caddr_t CADDR2; + vm_offset_t base; uint16_t valid1, valid2; }; @@ -211,6 +208,59 @@ struct local_sysmaps { static struct local_sysmaps sysmap_lmem[MAXCPU]; caddr_t virtual_sys_start = (caddr_t)0; +#define PMAP_LMEM_MAP1(va, phys) \ + int cpu; \ + struct local_sysmaps *sysm; \ + pt_entry_t *pte, npte; \ + \ + cpu = PCPU_GET(cpuid); \ + sysm = &sysmap_lmem[cpu]; \ + PMAP_LGMEM_LOCK(sysm); \ + intr = intr_disable(); \ + sched_pin(); \ + va = sysm->base; \ + npte = mips_paddr_to_tlbpfn(phys) | \ + PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; \ + pte = pmap_pte(kernel_pmap, va); \ + *pte = npte; \ + sysm->valid1 = 1; + +#define PMAP_LMEM_MAP2(va1, phys1, va2, phys2) \ + int cpu; \ + struct local_sysmaps *sysm; \ + pt_entry_t *pte, npte; \ + \ + cpu = PCPU_GET(cpuid); \ + sysm = &sysmap_lmem[cpu]; \ + PMAP_LGMEM_LOCK(sysm); \ + intr = intr_disable(); \ + sched_pin(); \ + va1 = sysm->base; \ + va2 = sysm->base + PAGE_SIZE; \ + npte = mips_paddr_to_tlbpfn(phys2) | \ + PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; \ + pte = pmap_pte(kernel_pmap, va1); \ + *pte = npte; \ + npte = mips_paddr_to_tlbpfn(phys2) | \ + PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; \ + pte = pmap_pte(kernel_pmap, va2); \ + *pte = npte; \ + sysm->valid1 = 1; \ + sysm->valid2 = 1; + +#define PMAP_LMEM_UNMAP() \ + pte = pmap_pte(kernel_pmap, sysm->base); \ + *pte = PTE_G; \ + pmap_invalidate_page(kernel_pmap, sysm->base); \ + sysm->valid1 = 0; \ + pte = pmap_pte(kernel_pmap, sysm->base + PAGE_SIZE); \ + *pte = PTE_G; \ + pmap_invalidate_page(kernel_pmap, sysm->base + PAGE_SIZE); \ + sysm->valid2 = 0; \ + sched_unpin(); \ + intr_restore(intr); \ + PMAP_LGMEM_UNLOCK(sysm); + pd_entry_t pmap_segmap(pmap_t pmap, vm_offset_t va) { @@ -382,12 +432,8 @@ again: */ if (memory_larger_than_512meg) { for (i = 0; i < MAXCPU; i++) { - sysmap_lmem[i].CMAP1 = PTE_G; - sysmap_lmem[i].CMAP2 = PTE_G; - sysmap_lmem[i].CADDR1 = (caddr_t)virtual_avail; - virtual_avail += PAGE_SIZE; - sysmap_lmem[i].CADDR2 = (caddr_t)virtual_avail; - virtual_avail += PAGE_SIZE; + sysmap_lmem[i].base = virtual_avail; + virtual_avail += PAGE_SIZE * 2; sysmap_lmem[i].valid1 = sysmap_lmem[i].valid2 = 0; PMAP_LGMEM_LOCK_INIT(&sysmap_lmem[i]); } @@ -2001,7 +2047,7 @@ void * pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; - int int_level; + register_t intr; if (i != 0) printf("%s: ERROR!!! More than one page of virtual address mapping not supported\n", __func__); @@ -2011,20 +2057,24 @@ pmap_kenter_temporary(vm_paddr_t pa, int } else { int cpu; struct local_sysmaps *sysm; + pt_entry_t *pte, npte; + /* If this is used other than for dumps, we may need to leave * interrupts disasbled on return. If crash dumps don't work when * we get to this point, we might want to consider this (leaving things * disabled as a starting point ;-) */ - int_level = disableintr(); + intr = intr_disable(); cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; /* Since this is for the debugger, no locks or any other fun */ - sysm->CMAP1 = mips_paddr_to_tlbpfn(pa) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; + npte = mips_paddr_to_tlbpfn(pa) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; + pte = pmap_pte(kernel_pmap, sysm->base); + *pte = npte; sysm->valid1 = 1; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - va = (vm_offset_t)sysm->CADDR1; - restoreintr(int_level); + pmap_update_page(kernel_pmap, sysm->base, npte); + va = sysm->base; + intr_restore(intr); } return ((void *)va); } @@ -2033,7 +2083,7 @@ void pmap_kenter_temporary_free(vm_paddr_t pa) { int cpu; - int int_level; + register_t intr; struct local_sysmaps *sysm; if (pa < MIPS_KSEG0_LARGEST_PHYS) { @@ -2043,10 +2093,13 @@ pmap_kenter_temporary_free(vm_paddr_t pa cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; if (sysm->valid1) { - int_level = disableintr(); - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); - restoreintr(int_level); - sysm->CMAP1 = 0; + pt_entry_t *pte; + + intr = intr_disable(); + pte = pmap_pte(kernel_pmap, sysm->base); + *pte = PTE_G; + pmap_invalidate_page(kernel_pmap, sysm->base); + intr_restore(intr); sysm->valid1 = 0; } } @@ -2156,33 +2209,20 @@ pmap_zero_page(vm_page_t m) { vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); - int int_level; + register_t intr; if (phys < MIPS_KSEG0_LARGEST_PHYS) { - va = MIPS_PHYS_TO_KSEG0(phys); bzero((caddr_t)va, PAGE_SIZE); mips_dcache_wbinv_range(va, PAGE_SIZE); } else { - int cpu; - struct local_sysmaps *sysm; + PMAP_LMEM_MAP1(va, phys); - cpu = PCPU_GET(cpuid); - sysm = &sysmap_lmem[cpu]; - PMAP_LGMEM_LOCK(sysm); - sched_pin(); - int_level = disableintr(); - sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - sysm->valid1 = 1; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - bzero(sysm->CADDR1, PAGE_SIZE); - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); - restoreintr(int_level); - sysm->CMAP1 = 0; - sysm->valid1 = 0; - sched_unpin(); - PMAP_LGMEM_UNLOCK(sysm); + bzero((caddr_t)va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); + + PMAP_LMEM_UNMAP(); } } @@ -2197,31 +2237,19 @@ pmap_zero_page_area(vm_page_t m, int off { vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); - int int_level; + register_t intr; if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_KSEG0(phys); bzero((char *)(caddr_t)va + off, size); mips_dcache_wbinv_range(va + off, size); } else { - int cpu; - struct local_sysmaps *sysm; + PMAP_LMEM_MAP1(va, phys); - cpu = PCPU_GET(cpuid); - sysm = &sysmap_lmem[cpu]; - PMAP_LGMEM_LOCK(sysm); - int_level = disableintr(); - sched_pin(); - sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - sysm->valid1 = 1; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - bzero((char *)sysm->CADDR1 + off, size); - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); - restoreintr(int_level); - sysm->CMAP1 = 0; - sysm->valid1 = 0; - sched_unpin(); - PMAP_LGMEM_UNLOCK(sysm); + bzero((char *)va + off, size); + mips_dcache_wbinv_range(va + off, size); + + PMAP_LMEM_UNMAP(); } } @@ -2230,33 +2258,20 @@ pmap_zero_page_idle(vm_page_t m) { vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); - int int_level; + register_t intr; if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_KSEG0(phys); bzero((caddr_t)va, PAGE_SIZE); mips_dcache_wbinv_range(va, PAGE_SIZE); } else { - int cpu; - struct local_sysmaps *sysm; + PMAP_LMEM_MAP1(va, phys); - cpu = PCPU_GET(cpuid); - sysm = &sysmap_lmem[cpu]; - PMAP_LGMEM_LOCK(sysm); - int_level = disableintr(); - sched_pin(); - sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - sysm->valid1 = 1; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - bzero(sysm->CADDR1, PAGE_SIZE); - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); - restoreintr(int_level); - sysm->CMAP1 = 0; - sysm->valid1 = 0; - sched_unpin(); - PMAP_LGMEM_UNLOCK(sysm); - } + bzero((caddr_t)va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); + PMAP_LMEM_UNMAP(); + } } /* @@ -2271,7 +2286,7 @@ pmap_copy_page(vm_page_t src, vm_page_t vm_offset_t va_src, va_dst; vm_paddr_t phy_src = VM_PAGE_TO_PHYS(src); vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst); - int int_level; + register_t intr; if ((phy_src < MIPS_KSEG0_LARGEST_PHYS) && (phy_dst < MIPS_KSEG0_LARGEST_PHYS)) { /* easy case, all can be accessed via KSEG0 */ @@ -2281,58 +2296,18 @@ pmap_copy_page(vm_page_t src, vm_page_t */ pmap_flush_pvcache(src); mips_dcache_wbinv_range_index( - MIPS_PHYS_TO_KSEG0(phy_dst), NBPG); + MIPS_PHYS_TO_KSEG0(phy_dst), PAGE_SIZE); va_src = MIPS_PHYS_TO_KSEG0(phy_src); va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); mips_dcache_wbinv_range(va_dst, PAGE_SIZE); } else { - int cpu; - struct local_sysmaps *sysm; + PMAP_LMEM_MAP2(va_src, phy_src, va_dst, phy_dst); - cpu = PCPU_GET(cpuid); - sysm = &sysmap_lmem[cpu]; - PMAP_LGMEM_LOCK(sysm); - sched_pin(); - int_level = disableintr(); - if (phy_src < MIPS_KSEG0_LARGEST_PHYS) { - /* one side needs mapping - dest */ - va_src = MIPS_PHYS_TO_KSEG0(phy_src); - sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); - sysm->valid2 = 1; - va_dst = (vm_offset_t)sysm->CADDR2; - } else if (phy_dst < MIPS_KSEG0_LARGEST_PHYS) { - /* one side needs mapping - src */ - va_dst = MIPS_PHYS_TO_KSEG0(phy_dst); - sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - va_src = (vm_offset_t)sysm->CADDR1; - sysm->valid1 = 1; - } else { - /* all need mapping */ - sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PTE_RW | PTE_V | PTE_G | PTE_W | PTE_CACHE; - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); - pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); - sysm->valid1 = sysm->valid2 = 1; - va_src = (vm_offset_t)sysm->CADDR1; - va_dst = (vm_offset_t)sysm->CADDR2; - } bcopy((void *)va_src, (void *)va_dst, PAGE_SIZE); - if (sysm->valid1) { - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); - sysm->CMAP1 = 0; - sysm->valid1 = 0; - } - if (sysm->valid2) { - pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR2); - sysm->CMAP2 = 0; - sysm->valid2 = 0; - } - restoreintr(int_level); - sched_unpin(); - PMAP_LGMEM_UNLOCK(sysm); + mips_dcache_wbinv_range(va_dst, PAGE_SIZE); + + PMAP_LMEM_UNMAP(); } } @@ -3085,34 +3060,11 @@ pmap_kextract(vm_offset_t va) /* Is the kernel pmap initialized? */ if (kernel_pmap->pm_active) { - if (va >= (vm_offset_t)virtual_sys_start) { - /* Its inside the virtual address range */ - ptep = pmap_pte(kernel_pmap, va); - if (ptep) - pa = mips_tlbpfn_to_paddr(*ptep) | - (va & PAGE_MASK); - } else { - int i; - - /* - * its inside the special mapping area, I - * don't think this should happen, but if it - * does I want it toa all work right :-) - * Note if it does happen, we assume the - * caller has the lock? FIXME, this needs to - * be checked FIXEM - RRS. - */ - for (i = 0; i < MAXCPU; i++) { - if ((sysmap_lmem[i].valid1) && ((vm_offset_t)sysmap_lmem[i].CADDR1 == va)) { - pa = mips_tlbpfn_to_paddr(sysmap_lmem[i].CMAP1); - break; - } - if ((sysmap_lmem[i].valid2) && ((vm_offset_t)sysmap_lmem[i].CADDR2 == va)) { - pa = mips_tlbpfn_to_paddr(sysmap_lmem[i].CMAP2); - break; - } - } - } + /* Its inside the virtual address range */ + ptep = pmap_pte(kernel_pmap, va); + if (ptep) + pa = mips_tlbpfn_to_paddr(*ptep) | + (va & PAGE_MASK); } } return pa; Modified: head/sys/mips/mips/psraccess.S ============================================================================== --- head/sys/mips/mips/psraccess.S Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/psraccess.S Sat Apr 17 01:17:31 2010 (r206717) @@ -53,109 +53,6 @@ .set noreorder # Noreorder is default style! -/* - * Set/clear software interrupt. - */ - -LEAF(setsoftintr0) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - or v0, v0, SOFT_INT_MASK_0 # set soft clock interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(setsoftintr0) - -LEAF(clearsoftintr0) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - and v0, v0, ~SOFT_INT_MASK_0 # clear soft clock interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(clearsoftintr0) - -LEAF(setsoftintr1) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - or v0, v0, SOFT_INT_MASK_1 # set soft net interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(setsoftintr1) - -LEAF(clearsoftintr1) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - and v0, v0, ~SOFT_INT_MASK_1 # clear soft net interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(clearsoftintr1) - -/* - * Set/change interrupt priority routines. - * These routines return the previous state. - */ -LEAF(restoreintr) - mfc0 t0,COP_0_STATUS_REG - and t1,t0,SR_INT_ENAB - beq a0,t1,1f - xor t0,SR_INT_ENAB - - .set noreorder - - mtc0 t0,COP_0_STATUS_REG - nop - nop - nop - nop -1: - j ra - nop -END(restoreintr) - -/* - * Set/change interrupt priority routines. - * These routines return the previous state. - */ - -LEAF(enableintr) -#ifdef TARGET_OCTEON - .set mips64r2 - ei v0 - and v0, SR_INT_ENAB # return old interrupt enable bit - .set mips0 -#else - mfc0 v0, COP_0_STATUS_REG # read status register - nop - or v1, v0, SR_INT_ENAB - mtc0 v1, COP_0_STATUS_REG # enable all interrupts - and v0, SR_INT_ENAB # return old interrupt enable -#endif - j ra - nop -END(enableintr) - - -LEAF(disableintr) -#ifdef TARGET_OCTEON - .set mips64r2 - di v0 - and v0, SR_INT_ENAB # return old interrupt enable bit - .set mips0 -#else - mfc0 v0, COP_0_STATUS_REG # read status register - nop - and v1, v0, ~SR_INT_ENAB - mtc0 v1, COP_0_STATUS_REG # disable all interrupts - MIPS_CPU_NOP_DELAY - and v0, SR_INT_ENAB # return old interrupt enable -#endif - j ra - nop -END(disableintr) - LEAF(set_intr_mask) li t0, SR_INT_MASK # 1 means masked so invert. not a0, a0 # 1 means masked so invert. @@ -182,17 +79,3 @@ LEAF(get_intr_mask) nop END(get_intr_mask) - -/* - * u_int32_t mips_cp0_config1_read(void) - * - * Return the current value of the CP0 Config (Select 1) register. - */ -LEAF(mips_cp0_config1_read) - .set push - .set mips32 - mfc0 v0, COP_0_CONFIG, 1 - j ra - nop - .set pop -END(mips_cp0_config1_read) Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/tick.c Sat Apr 17 01:17:31 2010 (r206717) @@ -301,16 +301,16 @@ clock_intr(void *arg) if (cpu_ticks->hard_ticks >= cycles_per_hz) { cpu_ticks->hard_ticks -= cycles_per_hz; if (PCPU_GET(cpuid) == 0) - hardclock(USERMODE(tf->sr), tf->pc); + hardclock(TRAPF_USERMODE(tf), tf->pc); else - hardclock_cpu(USERMODE(tf->sr)); + hardclock_cpu(TRAPF_USERMODE(tf)); } /* Fire statclock at stathz. */ cpu_ticks->stat_ticks += delta; if (cpu_ticks->stat_ticks >= cycles_per_stathz) { cpu_ticks->stat_ticks -= cycles_per_stathz; - statclock(USERMODE(tf->sr)); + statclock(TRAPF_USERMODE(tf)); } /* Fire profclock at profhz, but only when needed. */ @@ -318,7 +318,7 @@ clock_intr(void *arg) if (cpu_ticks->prof_ticks >= cycles_per_profhz) { cpu_ticks->prof_ticks -= cycles_per_profhz; if (profprocs != 0) - profclock(USERMODE(tf->sr), tf->pc); + profclock(TRAPF_USERMODE(tf), tf->pc); } critical_exit(); #if 0 /* TARGET_OCTEON */ Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Sat Apr 17 00:05:22 2010 (r206716) +++ head/sys/mips/mips/trap.c Sat Apr 17 01:17:31 2010 (r206717) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -272,7 +271,7 @@ extern char *syscallnames[]; * In the case of a kernel trap, we return the pc where to resume if * p->p_addr->u_pcb.pcb_onfault is set, otherwise, return old pc. */ -u_int +register_t trap(struct trapframe *trapframe) { int type, usermode; @@ -293,7 +292,7 @@ trap(struct trapframe *trapframe) trapdebug_enter(trapframe, 0); type = (trapframe->cause & CR_EXC_CODE) >> CR_EXC_CODE_SHIFT; - if (USERMODE(trapframe->sr)) { + if (TRAPF_USERMODE(trapframe)) { type |= T_USER; usermode = 1; } else { @@ -307,9 +306,9 @@ trap(struct trapframe *trapframe) */ if (trapframe->sr & SR_INT_ENAB) { set_intr_mask(~(trapframe->sr & ALL_INT_MASK)); - enableintr(); + intr_enable(); } else { - disableintr(); + intr_disable(); } #ifdef TRAP_DEBUG @@ -983,9 +982,10 @@ out: void trapDump(char *msg) { - int i, s; + register_t s; + int i; - s = disableintr(); + s = intr_disable(); printf("trapDump(%s)\n", msg); for (i = 0; i < TRAPSIZE; i++) { if (trp == trapdebug) { @@ -1003,9 +1003,8 @@ trapDump(char *msg) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 01:49:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EED091065679; Sat, 17 Apr 2010 01:49:50 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4F9E8FC19; Sat, 17 Apr 2010 01:49: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 o3H1noXv011020; Sat, 17 Apr 2010 01:49:50 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H1nohX011017; Sat, 17 Apr 2010 01:49:50 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004170149.o3H1nohX011017@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Apr 2010 01:49: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: r206718 - in head/sys/mips: conf mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 01:49:51 -0000 Author: jmallett Date: Sat Apr 17 01:49:50 2010 New Revision: 206718 URL: http://svn.freebsd.org/changeset/base/206718 Log: o) Back out my previous change to SWARM; some of it was to address an issue that turned out to be unrelated, and the rest was, as pointed out by Neel, just wrong-headed. o) Tweak mem.c to fix use of /dev/kmem for direct-mapped addresses. Modified: head/sys/mips/conf/SWARM head/sys/mips/mips/mem.c Modified: head/sys/mips/conf/SWARM ============================================================================== --- head/sys/mips/conf/SWARM Sat Apr 17 01:17:31 2010 (r206717) +++ head/sys/mips/conf/SWARM Sat Apr 17 01:49:50 2010 (r206718) @@ -19,13 +19,8 @@ options CFE_CONSOLE options CFE_ENV options ALT_BREAK_TO_DEBUGGER -# Don't build any modules yet. -makeoptions MODULES_OVERRIDE="" -makeoptions TARGET_BIG_ENDIAN=defined makeoptions LDSCRIPT_NAME= ldscript.mips.cfe -makeoptions KERNLOADADDR=0x81000000 - #cpu CPU_MIPS64 #options ISA_MIPS64 #makeoptions ARCH_FLAGS="-march=mips64 -mgp64 -mabi=o64" Modified: head/sys/mips/mips/mem.c ============================================================================== --- head/sys/mips/mips/mem.c Sat Apr 17 01:17:31 2010 (r206717) +++ head/sys/mips/mips/mem.c Sat Apr 17 01:49:50 2010 (r206718) @@ -120,21 +120,23 @@ memrw(struct cdev *dev, struct uio *uio, * Make sure that all the pages are currently resident * so that we don't create any zero-fill pages. */ - - for (; va < eva; va += PAGE_SIZE) - if (pmap_extract(kernel_pmap, va) == 0) + if (va >= VM_MIN_KERNEL_ADDRESS && + eva <= VM_MAX_KERNEL_ADDRESS) { + for (; va < eva; va += PAGE_SIZE) + if (pmap_extract(kernel_pmap, va) == 0) + return (EFAULT); + + prot = (uio->uio_rw == UIO_READ) + ? VM_PROT_READ : VM_PROT_WRITE; + + va = uio->uio_offset; + if (kernacc((void *) va, iov->iov_len, prot) + == FALSE) return (EFAULT); - - prot = (uio->uio_rw == UIO_READ) - ? VM_PROT_READ : VM_PROT_WRITE; + } va = uio->uio_offset; - if (kernacc((void *) va, iov->iov_len, prot) - == FALSE) - return (EFAULT); - error = uiomove((void *)va, iov->iov_len, uio); - continue; } } From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:08:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8050E106564A; Sat, 17 Apr 2010 03:08:13 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CEFF8FC14; Sat, 17 Apr 2010 03:08: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 o3H38DuT028614; Sat, 17 Apr 2010 03:08:13 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H38DMI028603; Sat, 17 Apr 2010 03:08:13 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004170308.o3H38DMI028603@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Apr 2010 03:08: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: r206721 - in head/sys/mips: cavium cavium/dev/rgmii mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 03:08:13 -0000 Author: jmallett Date: Sat Apr 17 03:08:13 2010 New Revision: 206721 URL: http://svn.freebsd.org/changeset/base/206721 Log: o) Add SMP support for Octeon using U-Boot to launch all the processors at the same time. o) Remove some unused trivial uart functions from octeon_machdep now that the uart part is fully working and they are unused. o) Use __func__ instead of __FUNCTION__. o) Use intr_*() instead of other routines that do the same thing. o) Remove some duplicate printfs from the Octeon port, as well as duplicate setting of Maxmem. o) Use the right frequency divider on Octeon. o) Use PCPU_GET(cpuid) consistently to get the cpuid of the running core. o) Remove some unused macros in the Octeon port. o) Use mips_sync() around use of the global dpcpu, whose value may not be visible to APs at first. o) When loading the first thread's stack, use macros to make the code correct for n64 as well. o) Remove stub, do-nothing FAU init/enable/disable functions from the RGMX driver. Added: head/sys/mips/cavium/octeon_mp.c (contents, props changed) Deleted: head/sys/mips/cavium/dev/rgmii/octeon_fau.c Modified: head/sys/mips/cavium/asm_octeon.S head/sys/mips/cavium/dev/rgmii/octeon_fau.h head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c head/sys/mips/cavium/files.octeon1 head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/octeon_pcmap_regs.h head/sys/mips/mips/locore.S head/sys/mips/mips/mp_machdep.c head/sys/mips/mips/mpboot.S Modified: head/sys/mips/cavium/asm_octeon.S ============================================================================== --- head/sys/mips/cavium/asm_octeon.S Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/cavium/asm_octeon.S Sat Apr 17 03:08:13 2010 (r206721) @@ -1,182 +1,66 @@ -/***********************license start*************** - * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights - * reserved. +/*- + * Copyright (c) 2004-2010 Juli Mallett + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * 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. - * - * * Neither the name of Cavium Networks nor the names of - * its contributors may be used to endorse or promote products - * derived from this software without specific prior written - * permission. - * - * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" - * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS - * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH - * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY - * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT - * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES - * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR - * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET - * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT - * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. - * - * - * For any questions regarding licensing please contact marketing@caviumnetworks.com - * - ***********************license end**************************************/ - -/* $FreeBSD$ */ + * $FreeBSD$ + */ #include -#include -#include -#include -#include - -#include "assym.s" - - -#define CPU_DISABLE_INTERRUPTS(reg, reg2, reg3) \ - mfc0 reg, MIPS_COP_0_STATUS; \ - nop; \ - move reg3, reg; \ - li reg2, ~MIPS_SR_INT_IE; \ - and reg, reg2, reg; \ - mtc0 reg, MIPS_COP_0_STATUS; \ - COP0_SYNC + .set noreorder - - -#define CPU_ENABLE_INTERRUPTS(reg, reg3) \ - mfc0 reg, MIPS_COP_0_STATUS; \ - nop; \ - or reg, reg, reg3; \ - mtc0 reg, MIPS_COP_0_STATUS; \ - COP0_SYNC - - -#define PUSHR(reg) \ - addiu sp,sp,-16 ; \ - sd reg, 8(sp) ; \ - nop ; - -#define POPR(reg) \ - ld reg, 8(sp) ; \ - addiu sp,sp,16 ; \ - nop ; - - - - +#ifdef SMP /* - * octeon_ciu_get_interrupt_reg_addr - * - * Given Int-X, En-X combination, return the CIU Interrupt Enable Register addr - * a0 = ciu Int-X: 0/1 - * a1 = ciu EN-0: 0/1 + * This function must be implemented in assembly because it is called early + * in AP boot without a valid stack. */ -LEAF(octeon_ciu_get_interrupt_reg_addr) - .set noreorder - .set mips3 - - beqz a0, ciu_get_interrupt_reg_addr_Int_0 - nop - -ciu_get_interrupt_reg_addr_Int_1: - beqz a1, ciu_get_interrupt_reg_addr_Int_1_En_0 - nop - -ciu_get_interrupt_reg_addr_Int_1_En1: - li a0, OCTEON_CIU_ADDR_HI - dsll32 a0, a0, 0 - nop - ori a0, OCTEON_CIU_EN1_INT1_LO - j ciu_get_interrupt_reg_addr_ret - nop - -ciu_get_interrupt_reg_addr_Int_1_En_0: - li a0, OCTEON_CIU_ADDR_HI - dsll32 a0, a0, 0 - nop - ori a0, OCTEON_CIU_EN0_INT1_LO - j ciu_get_interrupt_reg_addr_ret - nop - -ciu_get_interrupt_reg_addr_Int_0: - beqz a1, ciu_get_interrupt_reg_addr_Int_0_En_0 - nop - -ciu_get_interrupt_reg_addr_Int_0_En_1: - li a0, OCTEON_CIU_ADDR_HI - dsll32 a0, a0, 0 - nop - ori a0, OCTEON_CIU_EN1_INT0_LO - j ciu_get_interrupt_reg_addr_ret - nop - -ciu_get_interrupt_reg_addr_Int_0_En_0: - li a0, OCTEON_CIU_ADDR_HI - dsll32 a0, a0, 0 - nop - ori a0, OCTEON_CIU_EN0_INT0_LO - - -ciu_get_interrupt_reg_addr_ret: - j ra - nop - - .set mips0 - .set reorder -END(octeon_ciu_get_interrupt_reg_addr) +LEAF(platform_processor_id) + .set push + .set mips32r2 + jr ra + rdhwr v0, $0 + .set pop +END(platform_processor_id) - - /* - * octeon_ciu_mask_all_interrupts - * - * a0 = ciu Interrupt-X: 0/1 - * a1 = ciu Enable-X: 0/1 + * Called on APs to wait until they are told to launch. */ -LEAF(octeon_ciu_mask_all_interrupts) - .set noreorder - .set mips3 - - PUSHR(ra) - PUSHR(s0) - - move t0, a0 - move t1, a1 - li a0, MIPS_SR_INT_IE - CPU_DISABLE_INTERRUPTS(a2, a1, s0) - move a0, t0 - move t1, a1 - jal octeon_ciu_get_interrupt_reg_addr - nop - ld a2, 0(a0) # Dummy read - nop - move a2, zero # Clear all - sd a2, 0(a0) # Write new Enable bits - nop - CPU_ENABLE_INTERRUPTS(a2, s0) - - POPR(s0) - POPR(ra) - j ra # Return - nop # (bd slot) - - .set mips0 - .set reorder -END(octeon_ciu_mask_all_interrupts) - +LEAF(octeon_ap_wait) + jal platform_processor_id + nop + +1: ll t0, octeon_ap_boot + bne v0, t0, 1b + nop + + move t0, zero + sc t0, octeon_ap_boot + + beqz t0, 1b + nop + + j mpentry + nop +END(octeon_ap_wait) +#endif Modified: head/sys/mips/cavium/dev/rgmii/octeon_fau.h ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_fau.h Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/cavium/dev/rgmii/octeon_fau.h Sat Apr 17 03:08:13 2010 (r206721) @@ -217,9 +217,4 @@ static inline void octeon_fau_atomic_add } -extern void octeon_fau_init(void); -extern void octeon_fau_enable(void); -extern void octeon_fau_disable(void); - - #endif /* ___OCTEON_FAU__H___ */ Modified: head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c ============================================================================== --- head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/cavium/dev/rgmii/octeon_rgmx.c Sat Apr 17 03:08:13 2010 (r206721) @@ -1481,7 +1481,7 @@ static void octeon_config_hw_units_post_ oct_write64(OCTEON_POW_WORKQUEUE_INT_THRESHOLD(OCTEON_POW_RX_GROUP_NUM), thr.word64); #endif - ciu_enable_interrupts(OCTEON_CORE_ID, OCTEON_RGMX_CIU_INTX, OCTEON_RGMX_CIU_ENX, + ciu_enable_interrupts(PCPU_GET(cpuid), OCTEON_RGMX_CIU_INTX, OCTEON_RGMX_CIU_ENX, (OCTEON_POW_RX_GROUP_MASK | CIU_GENTIMER_BITS_ENABLE(CIU_GENTIMER_NUM_1)), CIU_MIPS_IP2); Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/cavium/files.octeon1 Sat Apr 17 03:08:13 2010 (r206721) @@ -1,8 +1,7 @@ # $FreeBSD$ # Octeon Support Files # -mips/mips/mp_machdep.c optional smp -mips/cavium/dev/rgmii/octeon_fau.c optional rgmii +mips/cavium/asm_octeon.S optional smp mips/cavium/dev/rgmii/octeon_fpa.c optional rgmii mips/cavium/dev/rgmii/octeon_ipd.c optional rgmii mips/cavium/dev/rgmii/octeon_pko.c optional rgmii @@ -10,6 +9,7 @@ mips/cavium/dev/rgmii/octeon_rgmx.c opt mips/cavium/obio.c optional uart mips/cavium/octeon_ebt3000_cf.c optional cf mips/cavium/octeon_machdep.c standard +mips/cavium/octeon_mp.c optional smp mips/cavium/uart_bus_octeonusart.c optional uart mips/cavium/uart_cpu_octeonusart.c optional uart mips/cavium/uart_dev_oct16550.c optional uart Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/cavium/octeon_machdep.c Sat Apr 17 03:08:13 2010 (r206721) @@ -111,25 +111,6 @@ platform_reset(void) oct_write64(OCTEON_CIU_SOFT_RST, 1); } - -static inline uint32_t -octeon_disable_interrupts(void) -{ - uint32_t status_bits; - - status_bits = mips_rd_status(); - mips_wr_status(status_bits & ~MIPS_SR_INT_IE); - return (status_bits); -} - - -static inline void -octeon_set_interrupts(uint32_t status_bits) -{ - mips_wr_status(status_bits); -} - - void octeon_led_write_char(int char_position, char val) { @@ -203,82 +184,6 @@ octeon_led_run_wheel(int *prog_count, in *prog_count &= 0x7; } -#define LSR_DATAREADY 0x01 /* Data ready */ -#define LSR_THRE 0x20 /* Transmit holding register empty */ -#define LSR_TEMT 0x40 /* Transmitter Empty. THR, TSR & FIFO */ -#define USR_TXFIFO_NOTFULL 0x02 /* Uart TX FIFO Not full */ - -/* - * octeon_uart_write_byte - * - * Put out a single byte off of uart port. - */ - -void -octeon_uart_write_byte(int uart_index, uint8_t ch) -{ - uint64_t val, val2; - if (uart_index < 0 || uart_index > 1) - return; - - while (1) { - val = oct_read64(OCTEON_MIO_UART0_LSR + (uart_index * 0x400)); - val2 = oct_read64(OCTEON_MIO_UART0_USR + (uart_index * 0x400)); - if ((((uint8_t) val) & LSR_THRE) || - (((uint8_t) val2) & USR_TXFIFO_NOTFULL)) { - break; - } - } - - /* Write the byte */ - oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); - - /* Force Flush the IOBus */ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); -} - - -void -octeon_uart_write_byte0(uint8_t ch) -{ - uint64_t val, val2; - - while (1) { - val = oct_read64(OCTEON_MIO_UART0_LSR); - val2 = oct_read64(OCTEON_MIO_UART0_USR); - if ((((uint8_t) val) & LSR_THRE) || - (((uint8_t) val2) & USR_TXFIFO_NOTFULL)) { - break; - } - } - - /* Write the byte */ - oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); - - /* Force Flush the IOBus */ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); -} - -/* - * octeon_uart_write_string - * - */ -void -octeon_uart_write_string(int uart_index, const char *str) -{ - /* Just loop writing one byte at a time */ - - while (*str) { - octeon_uart_write_byte(uart_index, *str); - if (*str == '\n') { - octeon_uart_write_byte(uart_index, '\r'); - } - str++; - } -} - -static char wstr[30]; - void octeon_led_write_hex(uint32_t wl) { @@ -289,44 +194,6 @@ octeon_led_write_hex(uint32_t wl) } -void octeon_uart_write_hex2(uint32_t wl, uint32_t wh) -{ - sprintf(wstr, "0x%X-0x%X ", wh, wl); - octeon_uart_write_string(0, wstr); -} - -void -octeon_uart_write_hex(uint32_t wl) -{ - sprintf(wstr, " 0x%X ", wl); - octeon_uart_write_string(0, wstr); -} - -/* - * octeon_wait_uart_flush - */ -void -octeon_wait_uart_flush(int uart_index, uint8_t ch) -{ - uint64_t val; - int64_t val3; - uint32_t cpu_status_bits; - - if (uart_index < 0 || uart_index > 1) - return; - - cpu_status_bits = octeon_disable_interrupts(); - /* Force Flush the IOBus */ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); - for (val3 = 0xfffffffff; val3 > 0; val3--) { - val = oct_read64(OCTEON_MIO_UART0_LSR + (uart_index * 0x400)); - if (((uint8_t) val) & LSR_TEMT) - break; - } - octeon_set_interrupts(cpu_status_bits); -} - - /* * octeon_debug_symbol * @@ -450,17 +317,17 @@ ciu_get_en_reg_addr_new(int corenum, int /* XXX kasserts? */ if (enx < CIU_EN_0 || enx > CIU_EN_1) { printf("%s: invalid enx value %d, should be %d or %d\n", - __FUNCTION__, enx, CIU_EN_0, CIU_EN_1); + __func__, enx, CIU_EN_0, CIU_EN_1); return 0; } if (intx < CIU_INT_0 || intx > CIU_INT_1) { printf("%s: invalid intx value %d, should be %d or %d\n", - __FUNCTION__, enx, CIU_INT_0, CIU_INT_1); + __func__, enx, CIU_INT_0, CIU_INT_1); return 0; } if (ciu_ip < CIU_MIPS_IP2 || ciu_ip > CIU_MIPS_IP3) { printf("%s: invalid ciu_ip value %d, should be %d or %d\n", - __FUNCTION__, ciu_ip, CIU_MIPS_IP2, CIU_MIPS_IP3); + __func__, ciu_ip, CIU_MIPS_IP2, CIU_MIPS_IP3); return 0; } @@ -517,7 +384,7 @@ ciu_clear_int_summary(int core_num, int core_num, intx, enx, write_bits); #endif - cpu_status_bits = octeon_disable_interrupts(); + cpu_status_bits = intr_disable(); ciu_intr_sum_reg_addr = ciu_get_intr_sum_reg_addr(core_num, intx, enx); @@ -535,7 +402,7 @@ ciu_clear_int_summary(int core_num, int printf(" Readback: 0x%llX\n\n ", (uint64_t) oct_read64(ciu_intr_sum_reg_addr)); #endif - octeon_set_interrupts(cpu_status_bits); + intr_restore(cpu_status_bits); } /* @@ -550,7 +417,7 @@ ciu_disable_intr(int core_num, int intx, if (core_num == CIU_THIS_CORE) core_num = octeon_get_core_num(); - cpu_status_bits = octeon_disable_interrupts(); + cpu_status_bits = intr_disable(); ciu_intr_reg_addr = ciu_get_intr_en_reg_addr(core_num, intx, enx); @@ -559,7 +426,7 @@ ciu_disable_intr(int core_num, int intx, oct_write64(ciu_intr_reg_addr, 0LL); oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ - octeon_set_interrupts(cpu_status_bits); + intr_restore(cpu_status_bits); } void @@ -580,7 +447,7 @@ ciu_dump_interrutps_enabled(int core_num #endif if (!ciu_intr_reg_addr) { - printf("Bad call to %s\n", __FUNCTION__); + printf("Bad call to %s\n", __func__); while(1); return; } @@ -612,7 +479,7 @@ void ciu_enable_interrupts(int core_num, core_num, intx, enx, ciu_ip, set_these_interrupt_bits); #endif - cpu_status_bits = octeon_disable_interrupts(); + cpu_status_bits = intr_disable(); #ifndef OCTEON_SMP_1 ciu_intr_reg_addr = ciu_get_intr_en_reg_addr(core_num, intx, enx); @@ -621,7 +488,7 @@ void ciu_enable_interrupts(int core_num, #endif if (!ciu_intr_reg_addr) { - printf("Bad call to %s\n", __FUNCTION__); + printf("Bad call to %s\n", __func__); while(1); return; /* XXX */ } @@ -634,7 +501,7 @@ void ciu_enable_interrupts(int core_num, #endif ciu_intr_bits |= set_these_interrupt_bits; oct_write64(ciu_intr_reg_addr, ciu_intr_bits); -#ifdef OCTEON_SMP +#ifdef SMP mips_wbflush(); #endif oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ @@ -644,7 +511,7 @@ void ciu_enable_interrupts(int core_num, (uint64_t)oct_read64(ciu_intr_reg_addr)); #endif - octeon_set_interrupts(cpu_status_bits); + intr_restore(cpu_status_bits); } unsigned long @@ -659,12 +526,8 @@ octeon_memory_init(void) uint32_t realmem_bytes; if (octeon_board_real()) { - printf("octeon_dram == %jx\n", (intmax_t)octeon_dram); - printf("reduced to ram: %u MB", (uint32_t)octeon_dram >> 20); - realmem_bytes = (octeon_dram - PAGE_SIZE); realmem_bytes &= ~(PAGE_SIZE - 1); - printf("Real memory bytes is %x\n", realmem_bytes); } else { /* Simulator we limit to 96 meg */ realmem_bytes = (96 << 20); @@ -678,8 +541,6 @@ octeon_memory_init(void) phys_avail[1] = realmem_bytes; realmem_bytes -= OCTEON_DRAM_FIRST_256_END; realmem_bytes &= ~(PAGE_SIZE - 1); - printf("phys_avail[0] = %#lx phys_avail[1] = %#lx\n", - (long)phys_avail[0], (long)phys_avail[1]); } else { /* Simulator gets 96Meg period. */ phys_avail[1] = (96 << 20); @@ -705,23 +566,14 @@ octeon_memory_init(void) realmem_bytes &= ~(PAGE_SIZE - 1); /* Now map the rest of the memory */ phys_avail[2] = 0x20000000; - printf("realmem_bytes is now at %x\n", realmem_bytes); phys_avail[3] = ((uint32_t) 0x20000000 + realmem_bytes); - printf("Next block of memory goes from %#lx to %#lx\n", - (long)phys_avail[2], (long)phys_avail[3]); physmem += btoc(phys_avail[3] - phys_avail[2]); - } else { - printf("realmem_bytes is %d\n", realmem_bytes); } realmem = physmem; printf("Total DRAM Size %#X\n", (uint32_t) octeon_dram); printf("Bank 0 = %#08lX -> %#08lX\n", (long)phys_avail[0], (long)phys_avail[1]); printf("Bank 1 = %#08lX -> %#08lX\n", (long)phys_avail[2], (long)phys_avail[3]); - printf("physmem: %#lx\n", physmem); - - Maxmem = physmem; - } void @@ -760,7 +612,15 @@ platform_start(__register_t a0, __regist kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif platform_counter_freq = octeon_get_clock_rate(); - mips_timer_init_params(platform_counter_freq, 1); + mips_timer_init_params(platform_counter_freq, 0); + +#ifdef SMP + /* + * Clear any pending IPIs and enable the IPI interrupt. + */ + oct_write64(OCTEON_CIU_MBOX_CLRX(0), 0xffffffff); + ciu_enable_interrupts(0, CIU_INT_1, CIU_EN_0, OCTEON_CIU_ENABLE_MBOX_INTR, CIU_MIPS_IP3); +#endif } /* impSTART: This stuff should move back into the Cavium SDK */ @@ -982,7 +842,7 @@ octeon_boot_params_init(register_t ptr) printf("Boot Descriptor Ver: %u -> %u/%u", octeon_bd_ver, octeon_cvmx_bd_ver/100, octeon_cvmx_bd_ver%100); - printf(" CPU clock: %uMHz\n", octeon_cpu_clock/1000000); + printf(" CPU clock: %uMHz Core Mask: %#x\n", octeon_cpu_clock/1000000, octeon_core_mask); printf(" Dram: %u MB", (uint32_t)(octeon_dram >> 20)); printf(" Board Type: %u Revision: %u/%u\n", octeon_board_type, octeon_board_rev_major, octeon_board_rev_minor); Added: head/sys/mips/cavium/octeon_mp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/octeon_mp.c Sat Apr 17 03:08:13 2010 (r206721) @@ -0,0 +1,102 @@ +/*- + * Copyright (c) 2004-2010 Juli Mallett + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +unsigned octeon_ap_boot = ~0; + +void +platform_ipi_send(int cpuid) +{ + oct_write64(OCTEON_CIU_MBOX_SETX(cpuid), 1); + mips_wbflush(); +} + +void +platform_ipi_clear(void) +{ + uint64_t action; + + action = oct_read64(OCTEON_CIU_MBOX_CLRX(PCPU_GET(cpuid))); + KASSERT(action == 1, ("unexpected IPIs: %#jx", (uintmax_t)action)); + oct_write64(OCTEON_CIU_MBOX_CLRX(PCPU_GET(cpuid)), action); +} + +int +platform_ipi_intrnum(void) +{ + return (1); +} + +void +platform_init_ap(int cpuid) +{ + /* + * Set the exception base. + */ + mips_wr_prid1(0x80000000 | cpuid); + + /* + * Set up interrupts, clear IPIs and unmask the IPI interrupt. + */ + octeon_ciu_reset(); + + oct_write64(OCTEON_CIU_MBOX_CLRX(cpuid), 0xffffffff); + ciu_enable_interrupts(cpuid, CIU_INT_1, CIU_EN_0, OCTEON_CIU_ENABLE_MBOX_INTR, CIU_MIPS_IP3); + + mips_wbflush(); +} + +int +platform_num_processors(void) +{ + return (fls(octeon_core_mask)); +} + +int +platform_start_ap(int cpuid) +{ + if (atomic_cmpset_32(&octeon_ap_boot, ~0, cpuid) == 0) + return (-1); + for (;;) { + DELAY(1000); + if (atomic_cmpset_32(&octeon_ap_boot, 0, ~0) != 0) + return (0); + printf("Waiting for cpu%d to start\n", cpuid); + } +} Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Sat Apr 17 03:08:13 2010 (r206721) @@ -54,14 +54,6 @@ #ifndef LOCORE -/* XXXimp: From Cavium's include/pcpu.h, need to port that over */ -#ifndef OCTEON_SMP -#define OCTEON_CORE_ID 0 -#else -extern struct pcpu *cpuid_to_pcpu[]; -#define OCTEON_CORE_ID (mips_rd_coreid()) -#endif - /* * Utility inlines & macros */ @@ -324,62 +316,6 @@ static inline void oct_write32 (uint64_t #define OCTEON_SCRATCH_2 32 -static inline uint64_t oct_mf_chord (void) -{ - uint64_t dest; - - __asm __volatile ( ".set push\n" - ".set noreorder\n" - ".set noat\n" - ".set mips64\n" - "dmfc2 $1, 0x400\n" - "move %0, $1\n" - ".set pop\n" - : "=r" (dest) : : "$1"); - return dest; -} - - -#define MIPS64_DMFCz(cop,regnum,cp0reg,select) \ - .word (0x40200000 | (cop << 25) | (regnum << 16) | (cp0reg << 11) | select) - - -#define mips64_getcpz_xstr(s) mips64_getcpz_str(s) -#define mips64_getcpz_str(s) #s - -#define mips64_dgetcpz(cop,cpzreg,sel,val_ptr) \ - ({ __asm __volatile( \ - ".set push\n" \ - ".set mips3\n" \ - ".set noreorder\n" \ - ".set noat\n" \ - mips64_getcpz_xstr(MIPS64_DMFCz(cop,1,cpzreg,sel)) "\n" \ - "nop\n" \ - "nop\n" \ - "nop\n" \ - "nop\n" \ - "sd $1,0(%0)\n" \ - ".set pop" \ - : /* no outputs */ : "r" (val_ptr) : "$1"); \ - }) - - -#define mips64_dgetcp2(cp2reg,sel,retval_ptr) \ - mips64_dgetcpz(2,cp2reg,sel,retval_ptr) - - -#define OCTEON_MF_CHORD(dest) mips64_dgetcp2(0x400, 0, &dest) - - - -#define OCTEON_RDHWR(result, regstr) \ - __asm __volatile ( \ - ".set mips3\n" \ - "rdhwr %0,$" OCTEON_TMP_STR(regstr) "\n" \ - ".set mips\n" \ - : "=d" (result)); - -#define CVMX_MF_CHORD(dest) OCTEON_RDHWR(dest, 30) #define OCTEON_CHORD_HEX(dest_ptr) \ ({ __asm __volatile( \ @@ -397,15 +333,6 @@ static inline uint64_t oct_mf_chord (voi : /* no outputs */ : "r" (dest_ptr) : "$2"); \ }) - - -#define OCTEON_MF_CHORD_BAD(dest) \ - __asm __volatile ( \ - ".set mips3\n" \ - "dmfc2 %0, 0x400\n" \ - ".set mips0\n" \ - : "=&r" (dest) : ) - static inline uint64_t oct_scratch_read64 (uint64_t address) { return(*((volatile uint64_t *)(OCTEON_SCRATCH_BASE + address))); @@ -417,17 +344,6 @@ static inline void oct_scratch_write64 ( } -#define OCTEON_READ_CSR32(addr, val) \ - addr_ptr = addr; \ - oct_read_32_ptr(&addr_ptr, &val); - -#define OCTEON_WRITE_CSR32(addr, val, val_dummy) \ - addr_ptr = addr; \ - oct_write_32_ptr(&addr_ptr, &val); \ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); - - - /* * Octeon Address Space Definitions */ @@ -791,12 +707,6 @@ extern void octeon_led_write_hexchar(int extern void octeon_led_write_hex(uint32_t wl); extern void octeon_led_write_string(const char *str); extern void octeon_reset(void); -extern void octeon_uart_write_byte(int uart_index, uint8_t ch); -extern void octeon_uart_write_string(int uart_index, const char *str); -extern void octeon_uart_write_hex(uint32_t wl); -extern void octeon_uart_write_hex2(uint32_t wl, uint32_t wh); -extern void octeon_wait_uart_flush(int uart_index, uint8_t ch); -extern void octeon_uart_write_byte0(uint8_t ch); extern void octeon_led_write_char0(char val); extern void octeon_led_run_wheel(int *pos, int led_position); extern void octeon_debug_symbol(void); Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/mips/locore.S Sat Apr 17 03:08:13 2010 (r206721) @@ -162,6 +162,18 @@ VECTOR(_locore, unknown) sw a2, _C_LABEL(fenvp) #endif +#if defined(TARGET_OCTEON) && defined(SMP) + .set push + .set mips32r2 + rdhwr t2, $0 + beqz t2, 1f + nop + j octeon_ap_wait + nop + .set pop +1: +#endif + /* * Initialize stack and call machine startup. */ @@ -178,10 +190,10 @@ VECTOR(_locore, unknown) nop PTR_LA sp, _C_LABEL(thread0) - lw a0, TD_PCB(sp) - li t0, ~7 + PTR_L a0, TD_PCB(sp) + REG_LI t0, ~7 and a0, a0, t0 - subu sp, a0, CALLFRAME_SIZ + PTR_SUBU sp, a0, CALLFRAME_SIZ jal _C_LABEL(mi_startup) # mi_startup(frame) sw zero, CALLFRAME_SIZ - 8(sp) # Zero out old fp for debugger Modified: head/sys/mips/mips/mp_machdep.c ============================================================================== --- head/sys/mips/mips/mp_machdep.c Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/mips/mp_machdep.c Sat Apr 17 03:08:13 2010 (r206721) @@ -157,6 +157,8 @@ start_ap(int cpuid) cpus = mp_naps; dpcpu = (void *)kmem_alloc(kernel_map, DPCPU_SIZE); + mips_sync(); + if (platform_start_ap(cpuid) != 0) return (-1); /* could not start AP */ @@ -246,6 +248,8 @@ smp_init_secondary(u_int32_t cpuid) mips_dcache_wbinv_all(); mips_icache_sync_all(); + mips_sync(); + MachSetPID(0); pcpu_init(PCPU_ADDR(cpuid), cpuid, sizeof(struct pcpu)); Modified: head/sys/mips/mips/mpboot.S ============================================================================== --- head/sys/mips/mips/mpboot.S Sat Apr 17 02:28:28 2010 (r206720) +++ head/sys/mips/mips/mpboot.S Sat Apr 17 03:08:13 2010 (r206721) @@ -36,8 +36,21 @@ .set noat .set noreorder +#ifdef TARGET_OCTEON +#define CLEAR_STATUS \ + mfc0 a0, COP_0_STATUS_REG ;\ + li a2, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) ; \ + or a0, a0, a2 ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER | MIPS_SR_BEV) ; \ + and a0, a0, a2 ; \ + mtc0 a0, COP_0_STATUS_REG +#else +#define CLEAR_STATUS \ + mtc0 zero, COP_0_STATUS_REG +#endif + GLOBAL(mpentry) - mtc0 zero, COP_0_STATUS_REG /* disable interrupts */ + CLEAR_STATUS /* disable interrupts */ mtc0 zero, COP_0_CAUSE_REG /* clear soft interrupts */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:38:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6DBC1065673; Sat, 17 Apr 2010 03:38:26 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3CFE8FC0C; Sat, 17 Apr 2010 03:38: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 o3H3cQTW035474; Sat, 17 Apr 2010 03:38:26 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3cQ7w035472; Sat, 17 Apr 2010 03:38:26 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170338.o3H3cQ7w035472@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:38:26 +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: r206723 - 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: Sat, 17 Apr 2010 03:38:26 -0000 Author: rrs Date: Sat Apr 17 03:38:26 2010 New Revision: 206723 URL: http://svn.freebsd.org/changeset/base/206723 Log: Merge of SVN 196507. This optimizes the sack handling a bit and restructures it so its much more readable ;-) Modified: stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:14:00 2010 (r206722) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:38:26 2010 (r206723) @@ -2525,6 +2525,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; + uint8_t comb_byte; int last_all_ones = 0; int slide_from, slide_end, lgap, distance; @@ -2555,7 +2556,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i memcpy(aux_array, asoc->mapping_array, 64); /* EY do the same for nr_mapping_array */ if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - if (asoc->nr_mapping_array_size != asoc->mapping_array_size) { /* * printf("\nEY-IN sack_check method: \nEY-" "The @@ -2582,13 +2582,18 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ at = 0; for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { - - if (asoc->mapping_array[slide_from] == 0xff) { + /* + * We must combine the renegable and non-renegable arrays + * here to form a unified view of what is acked right now + * (since they are kept separate + */ + comb_byte = asoc->mapping_array[slide_from] | asoc->nr_mapping_array[slide_from]; + if (comb_byte == 0xff) { at += 8; last_all_ones = 1; } else { /* there is a 0 bit */ - at += sctp_map_lookup_tab[asoc->mapping_array[slide_from]]; + at += sctp_map_lookup_tab[comb_byte]; last_all_ones = 0; break; } @@ -3182,6 +3187,235 @@ sctp_process_data(struct mbuf **mm, int return (0); } +static int +sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1, uint32_t last_tsn, + uint16_t frag_strt, uint16_t frag_end, int nr_sacking, + int *num_frs, + uint32_t * biggest_newly_acked_tsn, + uint32_t * this_sack_lowest_newack, + int *ecn_seg_sums) +{ + struct sctp_tmit_chunk *tp1; + unsigned int theTSN; + int j, wake_him = 0; + + /* Recover the tp1 we last saw */ + tp1 = *p_tp1; + if (tp1 == NULL) { + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } + for (j = frag_strt; j <= frag_end; j++) { + theTSN = j + last_tsn; + while (tp1) { + if (tp1->rec.data.doing_fast_retransmit) + (*num_frs) += 1; + + /*- + * CMT: CUCv2 algorithm. For each TSN being + * processed from the sent queue, track the + * next expected pseudo-cumack, or + * rtx_pseudo_cumack, if required. Separate + * cumack trackers for first transmissions, + * and retransmissions. + */ + if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && + (tp1->snd_count == 1)) { + tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; + tp1->whoTo->find_pseudo_cumack = 0; + } + if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && + (tp1->snd_count > 1)) { + tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; + tp1->whoTo->find_rtx_pseudo_cumack = 0; + } + if (tp1->rec.data.TSN_seq == theTSN) { + if (tp1->sent != SCTP_DATAGRAM_UNSENT) { + /*- + * must be held until + * cum-ack passes + */ + /*- + * ECN Nonce: Add the nonce + * value to the sender's + * nonce sum + */ + if (tp1->sent < SCTP_DATAGRAM_RESEND) { + /*- + * If it is less than RESEND, it is + * now no-longer in flight. + * Higher values may already be set + * via previous Gap Ack Blocks... + * i.e. ACKED or RESEND. + */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, + *biggest_newly_acked_tsn, MAX_TSN)) { + *biggest_newly_acked_tsn = tp1->rec.data.TSN_seq; + } + /*- + * CMT: SFR algo (and HTNA) - set + * saw_newack to 1 for dest being + * newly acked. update + * this_sack_highest_newack if + * appropriate. + */ + if (tp1->rec.data.chunk_was_revoked == 0) + tp1->whoTo->saw_newack = 1; + + if (compare_with_wrap(tp1->rec.data.TSN_seq, + tp1->whoTo->this_sack_highest_newack, + MAX_TSN)) { + tp1->whoTo->this_sack_highest_newack = + tp1->rec.data.TSN_seq; + } + /*- + * CMT DAC algo: also update + * this_sack_lowest_newack + */ + if (*this_sack_lowest_newack == 0) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { + sctp_log_sack(*this_sack_lowest_newack, + last_tsn, + tp1->rec.data.TSN_seq, + 0, + 0, + SCTP_LOG_TSN_ACKED); + } + *this_sack_lowest_newack = tp1->rec.data.TSN_seq; + } + /*- + * CMT: CUCv2 algorithm. If (rtx-)pseudo-cumack for corresp + * dest is being acked, then we have a new (rtx-)pseudo-cumack. Set + * new_(rtx_)pseudo_cumack to TRUE so that the cwnd for this dest can be + * updated. Also trigger search for the next expected (rtx-)pseudo-cumack. + * Separate pseudo_cumack trackers for first transmissions and + * retransmissions. + */ + if (tp1->rec.data.TSN_seq == tp1->whoTo->pseudo_cumack) { + if (tp1->rec.data.chunk_was_revoked == 0) { + tp1->whoTo->new_pseudo_cumack = 1; + } + tp1->whoTo->find_pseudo_cumack = 1; + } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { + sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); + } + if (tp1->rec.data.TSN_seq == tp1->whoTo->rtx_pseudo_cumack) { + if (tp1->rec.data.chunk_was_revoked == 0) { + tp1->whoTo->new_pseudo_cumack = 1; + } + tp1->whoTo->find_rtx_pseudo_cumack = 1; + } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { + sctp_log_sack(*biggest_newly_acked_tsn, + last_tsn, + tp1->rec.data.TSN_seq, + frag_strt, + frag_end, + SCTP_LOG_TSN_ACKED); + } + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { + sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_GAP, + tp1->whoTo->flight_size, + tp1->book_size, + (uintptr_t) tp1->whoTo, + tp1->rec.data.TSN_seq); + } + sctp_flight_size_decrease(tp1); + sctp_total_flight_decrease(stcb, tp1); + + tp1->whoTo->net_ack += tp1->send_size; + if (tp1->snd_count < 2) { + /*- + * True non-retransmited chunk + */ + tp1->whoTo->net_ack2 += tp1->send_size; + + /*- + * update RTO too ? + */ + if (tp1->do_rtt) { + tp1->whoTo->RTO = + sctp_calculate_rto(stcb, + &stcb->asoc, + tp1->whoTo, + &tp1->sent_rcv_time, + sctp_align_safe_nocopy); + tp1->do_rtt = 0; + } + } + } + if (tp1->sent <= SCTP_DATAGRAM_RESEND) { + (*ecn_seg_sums) += tp1->rec.data.ect_nonce; + (*ecn_seg_sums) &= SCTP_SACK_NONCE_SUM; + if (compare_with_wrap(tp1->rec.data.TSN_seq, + stcb->asoc.this_sack_highest_gap, + MAX_TSN)) { + stcb->asoc.this_sack_highest_gap = + tp1->rec.data.TSN_seq; + } + if (tp1->sent == SCTP_DATAGRAM_RESEND) { + sctp_ucount_decr(stcb->asoc.sent_queue_retran_cnt); +#ifdef SCTP_AUDITING_ENABLED + sctp_audit_log(0xB2, + (stcb->asoc.sent_queue_retran_cnt & 0x000000ff)); +#endif + } + } + /*- + * All chunks NOT UNSENT fall through here and are marked + * (leave PR-SCTP ones that are to skip alone though) + */ + if (tp1->sent != SCTP_FORWARD_TSN_SKIP) + tp1->sent = SCTP_DATAGRAM_MARKED; + + if (tp1->rec.data.chunk_was_revoked) { + /* deflate the cwnd */ + tp1->whoTo->cwnd -= tp1->book_size; + tp1->rec.data.chunk_was_revoked = 0; + } + /* NR Sack code here */ + if (nr_sacking) { + if (tp1->sent != SCTP_FORWARD_TSN_SKIP) + tp1->sent = SCTP_DATAGRAM_NR_MARKED; + /* + * TAILQ_REMOVE(&asoc->sent_q + * ueue, tp1, sctp_next); + */ + if (tp1->data) { + /* + * sa_ignore + * NO_NULL_CHK + */ + sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); + sctp_m_freem(tp1->data); + } + tp1->data = NULL; + /* asoc->sent_queue_cnt--; */ + /* + * sctp_free_a_chunk(stcb, + * tp1); + */ + wake_him++; + } + } + break; + } /* if (tp1->TSN_seq == theTSN) */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, + MAX_TSN)) + break; + + tp1 = TAILQ_NEXT(tp1, sctp_next); + } /* end while (tp1) */ + /* In case the fragments were not in order we must reset */ + if (tp1 == NULL) { + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } + } /* end for (j = fragStart */ + *p_tp1 = tp1; + return (wake_him); /* Return value only used for nr-sack */ +} + + static void sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_sack_chunk *ch, uint32_t last_tsn, uint32_t * biggest_tsn_acked, @@ -3194,8 +3428,7 @@ sctp_handle_segments(struct mbuf *m, int struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; - int i, j; - unsigned int theTSN; + int i; int num_frs = 0; uint16_t frag_strt, frag_end, primary_flag_set; @@ -3263,214 +3496,9 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - for (j = frag_strt; j <= frag_end; j++) { - theTSN = j + last_tsn; - while (tp1) { - if (tp1->rec.data.doing_fast_retransmit) - num_frs++; - - /* - * CMT: CUCv2 algorithm. For each TSN being - * processed from the sent queue, track the - * next expected pseudo-cumack, or - * rtx_pseudo_cumack, if required. Separate - * cumack trackers for first transmissions, - * and retransmissions. - */ - if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count == 1)) { - tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_pseudo_cumack = 0; - } - if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count > 1)) { - tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_rtx_pseudo_cumack = 0; - } - if (tp1->rec.data.TSN_seq == theTSN) { - if (tp1->sent != SCTP_DATAGRAM_UNSENT) { - /* - * must be held until - * cum-ack passes - */ - /* - * ECN Nonce: Add the nonce - * value to the sender's - * nonce sum - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - /*- - * If it is less than RESEND, it is - * now no-longer in flight. - * Higher values may already be set - * via previous Gap Ack Blocks... - * i.e. ACKED or RESEND. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, - *biggest_newly_acked_tsn, MAX_TSN)) { - *biggest_newly_acked_tsn = tp1->rec.data.TSN_seq; - } - /* - * CMT: SFR algo - * (and HTNA) - set - * saw_newack to 1 - * for dest being - * newly acked. - * update - * this_sack_highest_ - * newack if - * appropriate. - */ - if (tp1->rec.data.chunk_was_revoked == 0) - tp1->whoTo->saw_newack = 1; - - if (compare_with_wrap(tp1->rec.data.TSN_seq, - tp1->whoTo->this_sack_highest_newack, - MAX_TSN)) { - tp1->whoTo->this_sack_highest_newack = - tp1->rec.data.TSN_seq; - } - /* - * CMT DAC algo: - * also update - * this_sack_lowest_n - * ewack - */ - if (*this_sack_lowest_newack == 0) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*this_sack_lowest_newack, - last_tsn, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_TSN_ACKED); - } - *this_sack_lowest_newack = tp1->rec.data.TSN_seq; - } - /* - * CMT: CUCv2 - * algorithm. If - * (rtx-)pseudo-cumac - * k for corresp - * dest is being - * acked, then we - * have a new - * (rtx-)pseudo-cumac - * k. Set - * new_(rtx_)pseudo_c - * umack to TRUE so - * that the cwnd for - * this dest can be - * updated. Also - * trigger search - * for the next - * expected - * (rtx-)pseudo-cumac - * k. Separate - * pseudo_cumack - * trackers for - * first - * transmissions and - * retransmissions. - */ - if (tp1->rec.data.TSN_seq == tp1->whoTo->pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - if (tp1->rec.data.TSN_seq == tp1->whoTo->rtx_pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_rtx_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*biggest_newly_acked_tsn, - last_tsn, - tp1->rec.data.TSN_seq, - frag_strt, - frag_end, - SCTP_LOG_TSN_ACKED); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_GAP, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - sctp_total_flight_decrease(stcb, tp1); - - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True - * non-retran - * smited - * chunk */ - tp1->whoTo->net_ack2 += tp1->send_size; - - /* - * update RTO - * too ? */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - sctp_calculate_rto(stcb, - asoc, - tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - } - if (tp1->sent <= SCTP_DATAGRAM_RESEND) { - (*ecn_seg_sums) += tp1->rec.data.ect_nonce; - (*ecn_seg_sums) &= SCTP_SACK_NONCE_SUM; - if (compare_with_wrap(tp1->rec.data.TSN_seq, - asoc->this_sack_highest_gap, - MAX_TSN)) { - asoc->this_sack_highest_gap = - tp1->rec.data.TSN_seq; - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); -#ifdef SCTP_AUDITING_ENABLED - sctp_audit_log(0xB2, - (asoc->sent_queue_retran_cnt & 0x000000ff)); -#endif - } - } - /* - * All chunks NOT UNSENT - * fall through here and are - * marked (leave PR-SCTP - * ones that are to skip - * alone though) - */ - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_MARKED; - - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - } - break; - } /* if (tp1->TSN_seq == theTSN) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, - MAX_TSN)) - break; - - tp1 = TAILQ_NEXT(tp1, sctp_next); - } /* end while (tp1) */ - } /* end for (j = fragStart */ + sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + 0, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums); frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); *offset += sizeof(block); @@ -6855,9 +6883,8 @@ sctp_handle_nr_sack_segments(struct mbuf struct sctp_gap_ack_block *frag, block; struct sctp_nr_gap_ack_block *nr_frag, nr_block; struct sctp_tmit_chunk *tp1; - uint32_t i, j; + uint32_t i; int wake_him = 0; - uint32_t theTSN; int num_frs = 0; uint16_t frag_strt, frag_end, primary_flag_set; @@ -6932,213 +6959,9 @@ sctp_handle_nr_sack_segments(struct mbuf } last_frag_high = frag_end + last_tsn; } - for (j = frag_strt; j <= frag_end; j++) { - theTSN = j + last_tsn; - while (tp1) { - if (tp1->rec.data.doing_fast_retransmit) - num_frs++; - - /* - * CMT: CUCv2 algorithm. For each TSN being - * processed from the sent queue, track the - * next expected pseudo-cumack, or - * rtx_pseudo_cumack, if required. Separate - * cumack trackers for first transmissions, - * and retransmissions. - */ - if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count == 1)) { - tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_pseudo_cumack = 0; - } - if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && - (tp1->snd_count > 1)) { - tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; - tp1->whoTo->find_rtx_pseudo_cumack = 0; - } - if (tp1->rec.data.TSN_seq == theTSN) { - if (tp1->sent != SCTP_DATAGRAM_UNSENT) { - /* - * must be held until - * cum-ack passes - */ - /* - * ECN Nonce: Add the nonce - * value to the sender's - * nonce sum - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - /*- - * If it is less than RESEND, it is - * now no-longer in flight. - * Higher values may already be set - * via previous Gap Ack Blocks... - * i.e. ACKED or RESEND. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, - *biggest_newly_acked_tsn, MAX_TSN)) { - *biggest_newly_acked_tsn = tp1->rec.data.TSN_seq; - } - /* - * CMT: SFR algo - * (and HTNA) - set - * saw_newack to 1 - * for dest being - * newly acked. - * update - * this_sack_highest_ - * newack if - * appropriate. - */ - if (tp1->rec.data.chunk_was_revoked == 0) - tp1->whoTo->saw_newack = 1; - - if (compare_with_wrap(tp1->rec.data.TSN_seq, - tp1->whoTo->this_sack_highest_newack, - MAX_TSN)) { - tp1->whoTo->this_sack_highest_newack = - tp1->rec.data.TSN_seq; - } - /* - * CMT DAC algo: - * also update - * this_sack_lowest_n - * ewack - */ - if (*this_sack_lowest_newack == 0) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*this_sack_lowest_newack, - last_tsn, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_TSN_ACKED); - } - *this_sack_lowest_newack = tp1->rec.data.TSN_seq; - } - /* - * CMT: CUCv2 - * algorithm. If - * (rtx-)pseudo-cumac - * k for corresp - * dest is being - * acked, then we - * have a new - * (rtx-)pseudo-cumac - * k. Set - * new_(rtx_)pseudo_c - * umack to TRUE so - * that the cwnd for - * this dest can be - * updated. Also - * trigger search - * for the next - * expected - * (rtx-)pseudo-cumac - * k. Separate - * pseudo_cumack - * trackers for - * first - * transmissions and - * retransmissions. - */ - if (tp1->rec.data.TSN_seq == tp1->whoTo->pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - if (tp1->rec.data.TSN_seq == tp1->whoTo->rtx_pseudo_cumack) { - if (tp1->rec.data.chunk_was_revoked == 0) { - tp1->whoTo->new_pseudo_cumack = 1; - } - tp1->whoTo->find_rtx_pseudo_cumack = 1; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(*biggest_newly_acked_tsn, - last_tsn, - tp1->rec.data.TSN_seq, - frag_strt, - frag_end, - SCTP_LOG_TSN_ACKED); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_GAP, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - sctp_total_flight_decrease(stcb, tp1); - - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True - * non-retran - * smited - * chunk - */ - tp1->whoTo->net_ack2 += tp1->send_size; - - /* - * update - * RTO too ? - */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - sctp_calculate_rto(stcb, - asoc, - tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - } - if (tp1->sent <= SCTP_DATAGRAM_RESEND) { - (*ecn_seg_sums) += tp1->rec.data.ect_nonce; - (*ecn_seg_sums) &= SCTP_SACK_NONCE_SUM; - if (compare_with_wrap(tp1->rec.data.TSN_seq, - asoc->this_sack_highest_gap, - MAX_TSN)) { - asoc->this_sack_highest_gap = - tp1->rec.data.TSN_seq; - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); -#ifdef SCTP_AUDITING_ENABLED - sctp_audit_log(0xB2, - (asoc->sent_queue_retran_cnt & 0x000000ff)); -#endif - } - } - /* - * All chunks NOT UNSENT - * fall through here and are - * marked - */ - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - } - break; - } /* if (tp1->TSN_seq == theTSN) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, - MAX_TSN)) - break; - - tp1 = TAILQ_NEXT(tp1, sctp_next); - } /* end while (tp1) */ - } /* end for (j = fragStart */ + sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + 0, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums); frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); *offset += sizeof(block); @@ -7164,6 +6987,8 @@ sctp_handle_nr_sack_segments(struct mbuf } tp1 = NULL; last_nr_frag_high = 0; + /* Reset to beginning for the nr_sack section */ + tp1 = TAILQ_FIRST(&asoc->sent_queue); for (i = 0; i < num_nr_seg; i++) { @@ -7207,45 +7032,15 @@ sctp_handle_nr_sack_segments(struct mbuf } last_nr_frag_high = nr_frag_end + last_tsn; } - - for (j = nr_frag_strt + last_tsn; (compare_with_wrap((nr_frag_end + last_tsn), j, MAX_TSN)); j++) { - while (tp1) { - if (tp1->rec.data.TSN_seq == j) { - if (tp1->sent != SCTP_DATAGRAM_UNSENT) { - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - /* - * TAILQ_REMOVE(&asoc->sent_q - * ueue, tp1, sctp_next); - */ - if (tp1->data) { - /* - * sa_ignore - * NO_NULL_CHK - */ - sctp_free_bufspace(stcb, asoc, tp1, 1); - sctp_m_freem(tp1->data); - } - tp1->data = NULL; - /* asoc->sent_queue_cnt--; */ - /* - * sctp_free_a_chunk(stcb, - * tp1); - */ - wake_him++; - } - break; - } /* if (tp1->TSN_seq == j) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, j, - MAX_TSN)) - break; - tp1 = TAILQ_NEXT(tp1, sctp_next); - } /* end while (tp1) */ - - } /* end for (j = nrFragStart */ + num_frs = 0; + wake_him = sctp_process_segment_range(stcb, &tp1, last_tsn, + nr_frag_strt, nr_frag_end, 1, + &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums); nr_frag = (struct sctp_nr_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_nr_gap_ack_block), (uint8_t *) & nr_block); + sizeof(struct sctp_nr_gap_ack_block), + (uint8_t *) & nr_block); *offset += sizeof(nr_block); if (nr_frag == NULL) { break; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:40:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD9B106566B; Sat, 17 Apr 2010 03:40:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0E58FC1D; Sat, 17 Apr 2010 03:40:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H3enIR036058; Sat, 17 Apr 2010 03:40:49 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3emLd036056; Sat, 17 Apr 2010 03:40:48 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170340.o3H3emLd036056@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:40: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: r206724 - 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: Sat, 17 Apr 2010 03:40:49 -0000 Author: rrs Date: Sat Apr 17 03:40:48 2010 New Revision: 206724 URL: http://svn.freebsd.org/changeset/base/206724 Log: MFC 202516 This gets rid of some stray #ifdef APPLE that drifted in some how. Modified: stable/8/sys/netinet/sctp_constants.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_constants.h ============================================================================== --- stable/8/sys/netinet/sctp_constants.h Sat Apr 17 03:38:26 2010 (r206723) +++ stable/8/sys/netinet/sctp_constants.h Sat Apr 17 03:40:48 2010 (r206724) @@ -276,28 +276,16 @@ __FBSDID("$FreeBSD$"); #define SCTP_SCALE_FOR_ADDR 2 /* default AUTO_ASCONF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_AUTO_ASCONF) -#define SCTP_DEFAULT_AUTO_ASCONF 0 -#else #define SCTP_DEFAULT_AUTO_ASCONF 1 -#endif /* default MULTIPLE_ASCONF mode enable(1)/disable(0) value (sysctl) */ #define SCTP_DEFAULT_MULTIPLE_ASCONFS 0 /* default MOBILITY_BASE mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_BASE) -#define SCTP_DEFAULT_MOBILITY_BASE 0 -#else #define SCTP_DEFAULT_MOBILITY_BASE 0 -#endif /* default MOBILITY_FASTHANDOFF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) #define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#else -#define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#endif /* * Theshold for rwnd updates, we have to read (sb_hiwat >> From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:43:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8FE6106566B; Sat, 17 Apr 2010 03:43:02 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C77C58FC18; Sat, 17 Apr 2010 03:43: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 o3H3h2aH036604; Sat, 17 Apr 2010 03:43:02 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3h2Gu036602; Sat, 17 Apr 2010 03:43:02 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170343.o3H3h2Gu036602@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:43:02 +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: r206725 - 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: Sat, 17 Apr 2010 03:43:03 -0000 Author: rrs Date: Sat Apr 17 03:43:02 2010 New Revision: 206725 URL: http://svn.freebsd.org/changeset/base/206725 Log: MFC of 202517 Again gets rid of some rather strange ifdef's for APPLE/USERSPACE that drifted in through our scrubber programs. Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 03:40:48 2010 (r206724) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 03:43:02 2010 (r206725) @@ -3490,11 +3490,7 @@ sctp_lowlevel_chunk_output(struct sctp_i tos_value = inp->ip_inp.inp.inp_ip_tos; } if ((nofragment_flag) && (port == 0)) { -#if defined(WITH_CONVERT_IP_OFF) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__) ip->ip_off = IP_DF; -#else - ip->ip_off = htons(IP_DF); -#endif } else ip->ip_off = 0; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:44:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D753B106564A; Sat, 17 Apr 2010 03:44:28 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C57418FC17; Sat, 17 Apr 2010 03:44: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 o3H3iS3c036964; Sat, 17 Apr 2010 03:44:28 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3iSI0036962; Sat, 17 Apr 2010 03:44:28 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170344.o3H3iSI0036962@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:44: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: r206726 - 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: Sat, 17 Apr 2010 03:44:29 -0000 Author: rrs Date: Sat Apr 17 03:44:28 2010 New Revision: 206726 URL: http://svn.freebsd.org/changeset/base/206726 Log: MFC of 202518 More ifdefs that should not be present... Modified: stable/8/sys/netinet/sctp_sysctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 03:43:02 2010 (r206725) +++ stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 03:44:28 2010 (r206726) @@ -556,9 +556,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) if (error == 0) { RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_nonce), SCTPCTL_ECN_NONCE_MIN, SCTPCTL_ECN_NONCE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); @@ -613,12 +611,8 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_for_client_enable), SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN, SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX); @@ -660,11 +654,9 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, re &SCTP_BASE_SYSCTL(sctp_recvspace), 0, sysctl_sctp_check, "IU", SCTPCTL_RECVSPACE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auto_asconf, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_auto_asconf), 0, sysctl_sctp_check, "IU", SCTPCTL_AUTOASCONF_DESC); -#endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, ecn_enable, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_ecn_enable), 0, sysctl_sctp_check, "IU", @@ -871,17 +863,13 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, de &SCTP_BASE_SYSCTL(sctp_default_frag_interleave), 0, sysctl_sctp_check, "IU", SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_base, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_base), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_BASE_DESC); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_fasthandoff, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_FASTHANDOFF_DESC); -#endif #if defined(SCTP_LOCAL_TRACE_BUF) SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, log, CTLFLAG_RD, From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:47:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A66FD106564A; Sat, 17 Apr 2010 03:47:04 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94C938FC17; Sat, 17 Apr 2010 03:47: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 o3H3l4SI037578; Sat, 17 Apr 2010 03:47:04 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3l4jp037575; Sat, 17 Apr 2010 03:47:04 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170347.o3H3l4jp037575@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206727 - 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: Sat, 17 Apr 2010 03:47:04 -0000 Author: rrs Date: Sat Apr 17 03:47:04 2010 New Revision: 206727 URL: http://svn.freebsd.org/changeset/base/206727 Log: MFC of 202520 This aligns us to the socket api of the stream reset with proper naming.. and a define for backward compatibility. Modified: stable/8/sys/netinet/sctp_uio.h stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:44:28 2010 (r206726) +++ stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:47:04 2010 (r206727) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); typedef uint32_t sctp_assoc_t; +/* Compatibility to previous define's */ +#define sctp_stream_reset_events sctp_stream_reset_event + /* On/Off setup for subscription to events */ struct sctp_event_subscribe { uint8_t sctp_data_io_event; @@ -57,7 +60,7 @@ struct sctp_event_subscribe { uint8_t sctp_adaptation_layer_event; uint8_t sctp_authentication_event; uint8_t sctp_sender_dry_event; - uint8_t sctp_stream_reset_events; + uint8_t sctp_stream_reset_event; }; /* ancillary data types */ @@ -402,19 +405,19 @@ union sctp_notification { }; /* notification types */ -#define SCTP_ASSOC_CHANGE 0x0001 -#define SCTP_PEER_ADDR_CHANGE 0x0002 -#define SCTP_REMOTE_ERROR 0x0003 -#define SCTP_SEND_FAILED 0x0004 -#define SCTP_SHUTDOWN_EVENT 0x0005 -#define SCTP_ADAPTATION_INDICATION 0x0006 +#define SCTP_ASSOC_CHANGE 0x0001 +#define SCTP_PEER_ADDR_CHANGE 0x0002 +#define SCTP_REMOTE_ERROR 0x0003 +#define SCTP_SEND_FAILED 0x0004 +#define SCTP_SHUTDOWN_EVENT 0x0005 +#define SCTP_ADAPTATION_INDICATION 0x0006 /* same as above */ -#define SCTP_ADAPTION_INDICATION 0x0006 -#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 -#define SCTP_AUTHENTICATION_EVENT 0x0008 -#define SCTP_STREAM_RESET_EVENT 0x0009 -#define SCTP_SENDER_DRY_EVENT 0x000a - +#define SCTP_ADAPTION_INDICATION 0x0006 +#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 +#define SCTP_AUTHENTICATION_EVENT 0x0008 +#define SCTP_STREAM_RESET_EVENT 0x0009 +#define SCTP_SENDER_DRY_EVENT 0x000a +#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */ /* * socket option structs */ Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:44:28 2010 (r206726) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:47:04 2010 (r206727) @@ -2008,7 +2008,7 @@ flags_out: events->sctp_sender_dry_event = 1; if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT)) - events->sctp_stream_reset_events = 1; + events->sctp_stream_reset_event = 1; SCTP_INP_RUNLOCK(inp); *optsize = sizeof(struct sctp_event_subscribe); } @@ -3650,7 +3650,7 @@ sctp_setopt(struct socket *so, int optna sctp_feature_off(inp, SCTP_PCB_FLAGS_DRYEVNT); } - if (events->sctp_stream_reset_events) { + if (events->sctp_stream_reset_event) { sctp_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); } else { sctp_feature_off(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:49:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66079106566B; Sat, 17 Apr 2010 03:49:21 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 545C28FC15; Sat, 17 Apr 2010 03:49: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 o3H3nLYA038143; Sat, 17 Apr 2010 03:49:21 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3nLtO038141; Sat, 17 Apr 2010 03:49:21 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170349.o3H3nLtO038141@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206728 - 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: Sat, 17 Apr 2010 03:49:21 -0000 Author: rrs Date: Sat Apr 17 03:49:21 2010 New Revision: 206728 URL: http://svn.freebsd.org/changeset/base/206728 Log: MFC 202521 More stray ifdef's that had worked their way into the code base somehow (yes thats ifdef Windows going out.. our stack runs on windows .. big thanks for that goes to Kozuka-san and Bruce Cran ;-D) Modified: 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) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 03:47:04 2010 (r206727) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 03:49:21 2010 (r206728) @@ -52,15 +52,9 @@ __FBSDID("$FreeBSD$"); #define NUMBER_OF_MTU_SIZES 18 -#if defined(__Windows__) && !defined(SCTP_LOCAL_TRACE_BUF) -#include "eventrace_netinet.h" -#include "sctputil.tmh" /* this is the file that will be auto - * generated */ -#else #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS #endif -#endif void sctp_sblog(struct sockbuf *sb, From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:51:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E0F6106564A; Sat, 17 Apr 2010 03:51:13 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C6B88FC08; Sat, 17 Apr 2010 03:51: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 o3H3pDu5038589; Sat, 17 Apr 2010 03:51:13 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3pDav038587; Sat, 17 Apr 2010 03:51:13 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170351.o3H3pDav038587@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:51: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: r206729 - 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: Sat, 17 Apr 2010 03:51:13 -0000 Author: rrs Date: Sat Apr 17 03:51:13 2010 New Revision: 206729 URL: http://svn.freebsd.org/changeset/base/206729 Log: MFC of 202523 This fixes a closing race condition that is unlikely to ever happen.. but good to fix ;-) Modified: stable/8/sys/netinet/sctp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:49:21 2010 (r206728) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 03:51:13 2010 (r206729) @@ -551,6 +551,7 @@ sctp_attach(struct socket *so, int proto sctp_log_closing(inp, NULL, 17); #endif if (error != 0) { +try_again: flags = inp->sctp_flags; if (((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && (atomic_cmpset_int(&inp->sctp_flags, flags, (flags | SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_CLOSE_IP)))) { @@ -561,7 +562,12 @@ sctp_attach(struct socket *so, int proto sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_AFTER_CMPSET_OFCLOSE); } else { - SCTP_INP_WUNLOCK(inp); + flags = inp->sctp_flags; + if ((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + goto try_again; + } else { + SCTP_INP_WUNLOCK(inp); + } } return error; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:53:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 139B4106566B; Sat, 17 Apr 2010 03:53:45 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 017098FC22; Sat, 17 Apr 2010 03:53: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 o3H3riBT039191; Sat, 17 Apr 2010 03:53:44 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3ri0w039187; Sat, 17 Apr 2010 03:53:44 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170353.o3H3ri0w039187@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:53: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: r206730 - 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: Sat, 17 Apr 2010 03:53:45 -0000 Author: rrs Date: Sat Apr 17 03:53:44 2010 New Revision: 206730 URL: http://svn.freebsd.org/changeset/base/206730 Log: MFC of 205502 The firste of Michael and my long fight at the IETF to get the NR sack code fixed and aligned. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:51:13 2010 (r206729) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:53:44 2010 (r206730) @@ -2533,15 +2533,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i /* int nr_at; */ /* int nr_last_all_ones = 0; */ /* int nr_slide_from, nr_slide_end, nr_lgap, nr_distance; */ - uint32_t old_cumack, old_base, old_highest; - unsigned char aux_array[64]; - - /* - * EY! Don't think this is required but I am immitating the code for - * map just to make sure - */ - unsigned char nr_aux_array[64]; asoc = &stcb->asoc; at = 0; @@ -2549,33 +2541,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i old_cumack = asoc->cumulative_tsn; old_base = asoc->mapping_array_base_tsn; old_highest = asoc->highest_tsn_inside_map; - if (asoc->mapping_array_size < 64) - memcpy(aux_array, asoc->mapping_array, - asoc->mapping_array_size); - else - memcpy(aux_array, asoc->mapping_array, 64); - /* EY do the same for nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - if (asoc->nr_mapping_array_size != asoc->mapping_array_size) { - /* - * printf("\nEY-IN sack_check method: \nEY-" "The - * size of map and nr_map are inconsitent") - */ ; - } - if (asoc->nr_mapping_array_base_tsn != asoc->mapping_array_base_tsn) { - /* - * printf("\nEY-IN sack_check method VERY CRUCIAL - * error: \nEY-" "The base tsns of map and nr_map - * are inconsitent") - */ ; - } - /* EY! just immitating the above code */ - if (asoc->nr_mapping_array_size < 64) - memcpy(nr_aux_array, asoc->nr_mapping_array, - asoc->nr_mapping_array_size); - else - memcpy(aux_array, asoc->nr_mapping_array, 64); - } /* * We could probably improve this a small bit by calculating the * offset of the current cum-ack as the starting point. @@ -2611,6 +2576,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i #else SCTP_PRINTF("huh, cumack 0x%x greater than high-tsn 0x%x in map - should panic?\n", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); + sctp_print_mapping_array(asoc); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(0, 6, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); } Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 03:51:13 2010 (r206729) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 03:53:44 2010 (r206730) @@ -1180,6 +1180,25 @@ sctp_init_asoc(struct sctp_inpcb *m, str return (0); } +void +sctp_print_mapping_array(struct sctp_association *asoc) +{ + int i; + + printf("Mapping size:%d baseTSN:%8.8x cumAck:%8.8x highestTSN:%8.8x\n", + asoc->mapping_array_size, + asoc->mapping_array_base_tsn, + asoc->cumulative_tsn, + asoc->highest_tsn_inside_map + ); + for (i = 0; i < asoc->mapping_array_size; i++) { + printf("%8.8x ", asoc->mapping_array[i]); + if (((i + 1) % 8) == 0) + printf("\n"); + } + printf("\n"); +} + int sctp_expand_mapping_array(struct sctp_association *asoc, uint32_t needed) { @@ -1187,7 +1206,9 @@ sctp_expand_mapping_array(struct sctp_as uint8_t *new_array; uint32_t new_size; + new_size = asoc->mapping_array_size + ((needed + 7) / 8 + SCTP_MAPPING_ARRAY_INCR); + SCTP_MALLOC(new_array, uint8_t *, new_size, SCTP_M_MAP); if (new_array == NULL) { /* can't get more, forget it */ @@ -1200,21 +1221,19 @@ sctp_expand_mapping_array(struct sctp_as SCTP_FREE(asoc->mapping_array, SCTP_M_MAP); asoc->mapping_array = new_array; asoc->mapping_array_size = new_size; - if (asoc->peer_supports_nr_sack) { - new_size = asoc->nr_mapping_array_size + ((needed + 7) / 8 + SCTP_NR_MAPPING_ARRAY_INCR); - SCTP_MALLOC(new_array, uint8_t *, new_size, SCTP_M_MAP); - if (new_array == NULL) { - /* can't get more, forget it */ - SCTP_PRINTF("No memory for expansion of SCTP mapping array %d\n", - new_size); - return (-1); - } - memset(new_array, 0, new_size); - memcpy(new_array, asoc->nr_mapping_array, asoc->nr_mapping_array_size); - SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); - asoc->nr_mapping_array = new_array; - asoc->nr_mapping_array_size = new_size; + new_size = asoc->nr_mapping_array_size + ((needed + 7) / 8 + SCTP_NR_MAPPING_ARRAY_INCR); + SCTP_MALLOC(new_array, uint8_t *, new_size, SCTP_M_MAP); + if (new_array == NULL) { + /* can't get more, forget it */ + SCTP_PRINTF("No memory for expansion of SCTP mapping array %d\n", + new_size); + return (-1); } + memset(new_array, 0, new_size); + memcpy(new_array, asoc->nr_mapping_array, asoc->nr_mapping_array_size); + SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); + asoc->nr_mapping_array = new_array; + asoc->nr_mapping_array_size = new_size; return (0); } Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Apr 17 03:51:13 2010 (r206729) +++ stable/8/sys/netinet/sctputil.h Sat Apr 17 03:53:44 2010 (r206730) @@ -376,7 +376,7 @@ int sctp_fill_stat_log(void *, size_t *) void sctp_log_fr(uint32_t, uint32_t, uint32_t, int); void sctp_log_sack(uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, int); void sctp_log_map(uint32_t, uint32_t, uint32_t, int); - +void sctp_print_mapping_array(struct sctp_association *asoc); void sctp_clr_stat_log(void); From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:55:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B5B81065670; Sat, 17 Apr 2010 03:55:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 882218FC25; Sat, 17 Apr 2010 03:55: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 o3H3tnAD039724; Sat, 17 Apr 2010 03:55:49 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3tn4w039720; Sat, 17 Apr 2010 03:55:49 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170355.o3H3tn4w039720@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206731 - 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: Sat, 17 Apr 2010 03:55:49 -0000 Author: rrs Date: Sat Apr 17 03:55:49 2010 New Revision: 206731 URL: http://svn.freebsd.org/changeset/base/206731 Log: MFC of 202526 The first round of some of Michael's changes to get the sack processing in better shape. Modified: stable/8/sys/netinet/sctp_header.h stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_indata.h stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_structs.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_header.h ============================================================================== --- stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:53:44 2010 (r206730) +++ stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:55:49 2010 (r206731) @@ -284,13 +284,6 @@ struct sctp_sack_chunk { struct sctp_sack sack; } SCTP_PACKED; - -/* EY Following 3 structs define NR Selective Ack (NR_SACK) chunk */ -struct sctp_nr_gap_ack_block { - uint16_t start; /* NR Gap Ack block start */ - uint16_t end; /* NR Gap Ack block end */ -} SCTP_PACKED; - struct sctp_nr_sack { uint32_t cum_tsn_ack; /* cumulative TSN Ack */ uint32_t a_rwnd; /* updated a_rwnd of sender */ @@ -299,7 +292,6 @@ struct sctp_nr_sack { uint16_t num_dup_tsns; /* number of duplicate TSNs */ uint16_t reserved; /* not currently used */ /* struct sctp_gap_ack_block's follow */ - /* struct sctp_nr_gap_ack_block's follow */ /* uint32_t duplicate_tsn's follow */ } SCTP_PACKED; Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:53:44 2010 (r206730) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 03:55:49 2010 (r206731) @@ -439,12 +439,11 @@ abandon: * EY!-TODO- this tsn should be tagged nr only if it is * out-of-order, the if statement should be modified */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { nr_tsn = chk->rec.data.TSN_seq; SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { + if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { /* * EY The 1st should never happen, as in * process_a_data_chunk method this check @@ -525,11 +524,11 @@ abandon: * nr_gap and tag this tsn * NR */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible NR gap calculation?\n"); /* * EY The * 1st @@ -694,7 +693,8 @@ protocol_error: * calculate the gap and such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -750,11 +750,11 @@ protocol_error: * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible nr TSN set 3?\n"); /* * EY The 1st should never * happen, as in @@ -773,7 +773,8 @@ protocol_error: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, + if (compare_with_wrap(nr_tsn, + asoc->highest_tsn_inside_nr_map, MAX_TSN)) asoc->highest_tsn_inside_nr_map = nr_tsn; } @@ -1759,7 +1760,8 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); /* EY set this tsn present in nr_sack's nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_REVERSE_OUT_TSN_PRES(gap, tsn, asoc); @@ -2015,7 +2017,8 @@ failed_express_del: * block here I should check if this delivered tsn * is out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* EY debugging block */ { /* @@ -2260,13 +2263,13 @@ failed_pdapi_express_del: sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* * EY It is added to the read queue in prev if block * here I should check if this delivered tsn is * out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* * EY check if the mapping_array and * nr_mapping array are consistent @@ -2412,6 +2415,10 @@ finish_express_del: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); + /* + * EY - set tsn present in nr-map if doing nr-sacks and the tsn is + * non-renegable + */ if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack && (SCTP_BASE_SYSCTL(sctp_do_drain) == 0)) { @@ -3382,49 +3389,37 @@ sctp_process_segment_range(struct sctp_t } -static void +static int sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc, - struct sctp_sack_chunk *ch, uint32_t last_tsn, uint32_t * biggest_tsn_acked, + uint32_t last_tsn, uint32_t * biggest_tsn_acked, uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack, - int num_seg, int *ecn_seg_sums) + int num_seg, int num_nr_seg, int *ecn_seg_sums) { - /************************************************/ - /* process fragments and update sendqueue */ - /************************************************/ - struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; int i; int num_frs = 0; + int chunk_freed; + int non_revocable; + uint16_t frag_strt, frag_end; + uint32_t last_frag_high; - uint16_t frag_strt, frag_end, primary_flag_set; - u_long last_frag_high; - - /* - * @@@ JRI : TODO: This flag is not used anywhere .. remove? - */ - if (asoc->primary_destination->dest_state & SCTP_ADDR_SWITCH_PRIMARY) { - primary_flag_set = 1; - } else { - primary_flag_set = 0; - } - sack = &ch->sack; - - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - return; - } tp1 = NULL; last_frag_high = 0; - for (i = 0; i < num_seg; i++) { + chunk_freed = 0; + + for (i = 0; i < (num_seg + num_nr_seg); i++) { + frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, + sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); + *offset += sizeof(block); + if (frag == NULL) { + return (chunk_freed); + } frag_strt = ntohs(frag->start); frag_end = ntohs(frag->end); /* some sanity checks on the fragment offsets */ if (frag_strt > frag_end) { /* this one is malformed, skip */ - frag++; continue; } if (compare_with_wrap((frag_end + last_tsn), *biggest_tsn_acked, @@ -3434,7 +3429,6 @@ sctp_handle_segments(struct mbuf *m, int /* mark acked dgs and find out the highestTSN being acked */ if (tp1 == NULL) { tp1 = TAILQ_FIRST(&asoc->sent_queue); - /* save the locations of the last frags */ last_frag_high = frag_end + last_tsn; } else { @@ -3462,14 +3456,15 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, - 0, &num_frs, biggest_newly_acked_tsn, - this_sack_lowest_newack, ecn_seg_sums); - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - break; + if (i < num_seg) { + non_revocable = 0; + } else { + non_revocable = 1; + } + if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + non_revocable, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums)) { + chunk_freed = 1; } } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { @@ -3478,6 +3473,7 @@ sctp_handle_segments(struct mbuf *m, int *biggest_newly_acked_tsn, last_tsn, SCTP_FR_LOG_BIGGEST_TSNS); } + return (chunk_freed); } static void @@ -4416,7 +4412,6 @@ sctp_express_handle_sack(struct sctp_tcb struct socket *so; #endif - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { /* sa_ignore NO_NULL_CHK */ @@ -4491,10 +4486,10 @@ sctp_express_handle_sack(struct sctp_tcb if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { asoc->nonce_sum_check = 1; /* - * now we must calculate what the base is. + * Now we must calculate what the base is. * We do this based on two things, we know * the total's for all the segments - * gap-acked in the SACK (none), We also + * gap-acked in the SACK (none). We also * know the SACK's nonce sum, its in * nonce_sum_flag. So we can build a truth * table to back-calculate the new value of @@ -4533,6 +4528,7 @@ again: /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { if (tp1->window_probe) { + /* move back to data send queue */ sctp_window_probe_recovery(stcb, asoc, net, tp1); break; } @@ -4586,9 +4582,7 @@ again: */ if (sctp_fs_audit(asoc)) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if (net->flight_size) { - net->flight_size = 0; - } + net->flight_size = 0; } asoc->total_flight = 0; asoc->total_flight_count = 0; @@ -4748,20 +4742,62 @@ again: } } +/* EY- nr_sack */ +/* Identifies the non-renegable tsns that are revoked*/ +static void +sctp_check_for_nr_revoked(struct sctp_tcb *stcb, + struct sctp_association *asoc, uint32_t cumack, + u_long biggest_tsn_acked) +{ + struct sctp_tmit_chunk *tp1; + + for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { + if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, + MAX_TSN)) { + /* + * ok this guy is either ACK or MARKED. If it is + * ACKED it has been previously acked but not this + * time i.e. revoked. If it is MARKED it was ACK'ed + * again. + */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, + MAX_TSN)) + break; + + + if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { + /* + * EY! a non-renegable TSN is revoked, need + * to abort the association + */ + /* + * EY TODO: put in the code to abort the + * assoc. + */ + return; + } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { + /* it has been re-acked in this SACK */ + tp1->sent = SCTP_DATAGRAM_NR_ACKED; + } + } + if (tp1->sent == SCTP_DATAGRAM_UNSENT) + break; + } + return; +} + void -sctp_handle_sack(struct mbuf *m, int offset, - struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, - struct sctp_nets *net_from, int *abort_now, int sack_len, uint32_t rwnd) +sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, + struct sctp_tcb *stcb, struct sctp_nets *net_from, + uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup, + int *abort_now, uint8_t flags, + uint32_t cum_ack, uint32_t rwnd) { struct sctp_association *asoc; - struct sctp_sack *sack; struct sctp_tmit_chunk *tp1, *tp2; - uint32_t cum_ack, last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, - this_sack_lowest_newack; + uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack; uint32_t sav_cum_ack; - uint16_t num_seg, num_dup; uint16_t wake_him = 0; - unsigned int sack_length; uint32_t send_s = 0; long j; int accum_moved = 0; @@ -4797,15 +4833,13 @@ sctp_handle_sack(struct mbuf *m, int off * if in shutdown_recv state. */ SCTP_TCB_LOCK_ASSERT(stcb); - sack = &ch->sack; /* CMT DAC algo */ this_sack_lowest_newack = 0; j = 0; - sack_length = (unsigned int)sack_len; - /* ECN Nonce */ SCTP_STAT_INCR(sctps_slowpath_sack); - nonce_sum_flag = ch->ch.chunk_flags & SCTP_SACK_NONCE_SUM; - cum_ack = last_tsn = ntohl(sack->cum_tsn_ack); + last_tsn = cum_ack; + nonce_sum_flag = flags & SCTP_SACK_NONCE_SUM; + cmt_dac_flag = flags & SCTP_SACK_CMT_DAC; #ifdef SCTP_ASOCLOG_OF_TSNS stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cum_ack; stcb->asoc.cumack_log_at++; @@ -4813,13 +4847,12 @@ sctp_handle_sack(struct mbuf *m, int off stcb->asoc.cumack_log_at = 0; } #endif - num_seg = ntohs(sack->num_gap_ack_blks); a_rwnd = rwnd; - /* CMT DAC algo */ - cmt_dac_flag = ch->ch.chunk_flags & SCTP_SACK_CMT_DAC; - num_dup = ntohs(sack->num_dup_tsns); - + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { + sctp_misc_ints(SCTP_SACK_LOG_NORMAL, cum_ack, + rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); + } old_rwnd = stcb->asoc.peers_rwnd; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -4839,27 +4872,16 @@ sctp_handle_sack(struct mbuf *m, int off SCTP_LOG_NEW_SACK); } if ((num_dup) && (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_FR_LOGGING_ENABLE | SCTP_EARLYFR_LOGGING_ENABLE))) { - int off_to_dup, iii; + uint16_t i; uint32_t *dupdata, dblock; - off_to_dup = (num_seg * sizeof(struct sctp_gap_ack_block)) + sizeof(struct sctp_sack_chunk); - if ((off_to_dup + (num_dup * sizeof(uint32_t))) <= sack_length) { - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, + for (i = 0; i < num_dup; i++) { + dupdata = (uint32_t *) sctp_m_getptr(m, offset_dup + i * sizeof(uint32_t), sizeof(uint32_t), (uint8_t *) & dblock); - off_to_dup += sizeof(uint32_t); - if (dupdata) { - for (iii = 0; iii < num_dup; iii++) { - sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, - sizeof(uint32_t), (uint8_t *) & dblock); - if (dupdata == NULL) - break; - off_to_dup += sizeof(uint32_t); - } + if (dupdata == NULL) { + break; } - } else { - SCTP_PRINTF("Size invalid offset to dups:%d number dups:%d sack_len:%d num gaps:%d\n", - off_to_dup, num_dup, sack_length, num_seg); + sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); } } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { @@ -4881,8 +4903,6 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: panic("Impossible sack 1"); #else - - /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. @@ -4922,8 +4942,7 @@ sctp_handle_sack(struct mbuf *m, int off /* update the Rwnd of the peer */ if (TAILQ_EMPTY(&asoc->sent_queue) && TAILQ_EMPTY(&asoc->send_queue) && - (asoc->stream_queue_cnt == 0) - ) { + (asoc->stream_queue_cnt == 0)) { /* nothing left on send/sent and strmq */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd_set(SCTP_SET_PEER_RWND_VIA_SACK, @@ -5094,14 +5113,7 @@ sctp_handle_sack(struct mbuf *m, int off /* always set this up to cum-ack */ asoc->this_sack_highest_gap = last_tsn; - /* Move offset up to point to gaps/dups */ - offset += sizeof(struct sctp_sack_chunk); - if (((num_seg * (sizeof(struct sctp_gap_ack_block))) + sizeof(struct sctp_sack_chunk)) > sack_length) { - - /* skip corrupt segments */ - goto skip_segments; - } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { /* * CMT: SFR algo (and HTNA) - this_sack_highest_newack has @@ -5119,10 +5131,11 @@ sctp_handle_sack(struct mbuf *m, int off * handling NEWLY ACKED chunks. this_sack_lowest_newack is * used for CMT DAC algo. saw_newack will also change. */ - sctp_handle_segments(m, &offset, stcb, asoc, ch, last_tsn, - &biggest_tsn_acked, &biggest_tsn_newly_acked, &this_sack_lowest_newack, - num_seg, &ecn_seg_sums); - + if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked, + &biggest_tsn_newly_acked, &this_sack_lowest_newack, + num_seg, num_nr_seg, &ecn_seg_sums)) { + wake_him++; + } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { /* * validate the biggest_tsn_acked in the gap acks if @@ -5138,7 +5151,6 @@ sctp_handle_sack(struct mbuf *m, int off } } } -skip_segments: /*******************************************/ /* cancel ALL T3-send timer if accum moved */ /*******************************************/ @@ -5276,6 +5288,19 @@ done_with_it: if (tp1 != NULL) { /* Peer revoked all dg's marked or acked */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { + /* + * EY- maybe check only if it is nr_acked + * nr_marked may not be possible + */ + if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || + (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { + /* + * EY! - TODO: Something previously + * nr_gapped is reneged, abort the + * association + */ + return; + } if ((tp1->sent > SCTP_DATAGRAM_RESEND) && (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { tp1->sent = SCTP_DATAGRAM_SENT; @@ -5311,6 +5336,10 @@ done_with_it: else asoc->saw_sack_with_frags = 0; + /* EY! - not sure about if there should be an IF */ + if (num_nr_seg > 0) + sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); + /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5446,7 +5475,7 @@ done_with_it: if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && SCTP_BASE_SYSCTL(sctp_cmt_use_dac) && (cmt_dac_flag == 0)) { this_sack_lowest_newack = cum_ack; } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { sctp_strike_gap_ack_chunks(stcb, asoc, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack, accum_moved); } @@ -5569,9 +5598,12 @@ again: } if (net->flight_size) { j++; - sctp_timer_start(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net); + if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_SEND, + stcb->sctp_ep, stcb, net); + } if (net->window_probe) { + net->window_probe = 0; } } else { if (net->window_probe) { @@ -5579,7 +5611,6 @@ again: * In window probes we must assure a timer * is still running there */ - if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); @@ -5627,7 +5658,11 @@ again: done_once = 1; goto again; } - /* Fix up the a-p-a-p for future PR-SCTP sends */ + /*********************************************/ + /* Here we perform PR-SCTP procedures */ + /* (section 4.2) */ + /*********************************************/ + /* C1. update advancedPeerAckPoint */ if (compare_with_wrap(cum_ack, asoc->advanced_peer_ack_point, MAX_TSN)) { asoc->advanced_peer_ack_point = cum_ack; } @@ -5739,8 +5774,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -5840,7 +5875,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -6325,1743 +6361,3 @@ sctp_handle_forward_tsn(struct sctp_tcb sctp_deliver_reasm_check(stcb, &stcb->asoc); } } - -/* EY fully identical to sctp_express_handle_sack, duplicated for only naming convention */ -void -sctp_express_handle_nr_sack(struct sctp_tcb *stcb, uint32_t cumack, - uint32_t rwnd, int nonce_sum_flag, int *abort_now) -{ - struct sctp_nets *net; - struct sctp_association *asoc; - struct sctp_tmit_chunk *tp1, *tp2; - uint32_t old_rwnd; - int win_probe_recovery = 0; - int win_probe_recovered = 0; - int j, done_once = 0; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { - sctp_misc_ints(SCTP_SACK_LOG_EXPRESS, cumack, - rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); - } - SCTP_TCB_LOCK_ASSERT(stcb); -#ifdef SCTP_ASOCLOG_OF_TSNS - stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cumack; - stcb->asoc.cumack_log_at++; - if (stcb->asoc.cumack_log_at > SCTP_TSN_LOG_SIZE) { - stcb->asoc.cumack_log_at = 0; - } -#endif - asoc = &stcb->asoc; - old_rwnd = asoc->peers_rwnd; - if (compare_with_wrap(asoc->last_acked_seq, cumack, MAX_TSN)) { - /* old ack */ - return; - } else if (asoc->last_acked_seq == cumack) { - /* Window update sack */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - goto again; - } - return; - } - /* First setup for CC stuff */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->prev_cwnd = net->cwnd; - net->net_ack = 0; - net->net_ack2 = 0; - - /* - * CMT: Reset CUC and Fast recovery algo variables before - * SACK processing - */ - net->new_pseudo_cumack = 0; - net->will_exit_fast_recovery = 0; - } - if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { - uint32_t send_s; - - if (!TAILQ_EMPTY(&asoc->sent_queue)) { - tp1 = TAILQ_LAST(&asoc->sent_queue, - sctpchunk_listhead); - send_s = tp1->rec.data.TSN_seq + 1; - } else { - send_s = asoc->sending_seq; - } - if ((cumack == send_s) || - compare_with_wrap(cumack, send_s, MAX_TSN)) { -#ifndef INVARIANTS - struct mbuf *oper; - -#endif -#ifdef INVARIANTS - panic("Impossible sack 1"); -#else - *abort_now = 1; - /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - return; -#endif - } - } - asoc->this_sack_highest_gap = cumack; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INDATA, - __LINE__); - } - stcb->asoc.overall_error_count = 0; - if (compare_with_wrap(cumack, asoc->last_acked_seq, MAX_TSN)) { - /* process the new consecutive TSN first */ - tp1 = TAILQ_FIRST(&asoc->sent_queue); - while (tp1) { - tp2 = TAILQ_NEXT(tp1, sctp_next); - if (compare_with_wrap(cumack, tp1->rec.data.TSN_seq, - MAX_TSN) || - cumack == tp1->rec.data.TSN_seq) { - if (tp1->sent == SCTP_DATAGRAM_UNSENT) { - printf("Warning, an unsent is now acked?\n"); - } - /* - * ECN Nonce: Add the nonce to the sender's - * nonce sum - */ - asoc->nonce_sum_expect_base += tp1->rec.data.ect_nonce; - if (tp1->sent < SCTP_DATAGRAM_ACKED) { - /* - * If it is less than ACKED, it is - * now no-longer in flight. Higher - * values may occur during marking - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_CA, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - /* sa_ignore NO_NULL_CHK */ - sctp_total_flight_decrease(stcb, tp1); - } - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True non-retransmited - * chunk - */ - tp1->whoTo->net_ack2 += - tp1->send_size; - - /* update RTO too? */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - /* - * sa_ignore - * NO_NULL_CHK - */ - sctp_calculate_rto(stcb, - asoc, tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - /* - * CMT: CUCv2 algorithm. From the - * cumack'd TSNs, for each TSN being - * acked for the first time, set the - * following variables for the - * corresp destination. - * new_pseudo_cumack will trigger a - * cwnd update. - * find_(rtx_)pseudo_cumack will - * trigger search for the next - * expected (rtx-)pseudo-cumack. - */ - tp1->whoTo->new_pseudo_cumack = 1; - tp1->whoTo->find_pseudo_cumack = 1; - tp1->whoTo->find_rtx_pseudo_cumack = 1; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); - } - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - tp1->sent = SCTP_DATAGRAM_ACKED; - TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); - if (tp1->data) { - /* sa_ignore NO_NULL_CHK */ - sctp_free_bufspace(stcb, asoc, tp1, 1); - sctp_m_freem(tp1->data); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(asoc->last_acked_seq, - cumack, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_FREE_SENT); - } - tp1->data = NULL; - asoc->sent_queue_cnt--; - sctp_free_a_chunk(stcb, tp1); - tp1 = tp2; - } else { - break; - } - } - - } - /* sa_ignore NO_NULL_CHK */ - if (stcb->sctp_socket) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif - - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK); - } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif - sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif - } else { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK); - } - } - - /* JRS - Use the congestion control given in the CC module */ - if (asoc->last_acked_seq != cumack) - asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, 1, 0, 0); - - asoc->last_acked_seq = cumack; - - if (TAILQ_EMPTY(&asoc->sent_queue)) { - /* nothing left in-flight */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - net->partial_bytes_acked = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - } - /* Fix up the a-p-a-p for future PR-SCTP sends */ - if (compare_with_wrap(cumack, asoc->advanced_peer_ack_point, MAX_TSN)) { - asoc->advanced_peer_ack_point = cumack; - } - /* ECN Nonce updates */ - if (asoc->ecn_nonce_allowed) { - if (asoc->nonce_sum_check) { - if (nonce_sum_flag != ((asoc->nonce_sum_expect_base) & SCTP_SACK_NONCE_SUM)) { - if (asoc->nonce_wait_for_ecne == 0) { - struct sctp_tmit_chunk *lchk; - - lchk = TAILQ_FIRST(&asoc->send_queue); - asoc->nonce_wait_for_ecne = 1; - if (lchk) { - asoc->nonce_wait_tsn = lchk->rec.data.TSN_seq; - } else { - asoc->nonce_wait_tsn = asoc->sending_seq; - } - } else { - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_wait_tsn, MAX_TSN) || - (asoc->last_acked_seq == asoc->nonce_wait_tsn)) { - /* - * Misbehaving peer. We need - * to react to this guy - */ - asoc->ecn_allowed = 0; - asoc->ecn_nonce_allowed = 0; - } - } - } - } else { - /* See if Resynchronization Possible */ - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { - asoc->nonce_sum_check = 1; - /* - * now we must calculate what the base is. - * We do this based on two things, we know - * the total's for all the segments - * gap-acked in the SACK (none), We also - * know the SACK's nonce sum, its in - * nonce_sum_flag. So we can build a truth - * table to back-calculate the new value of - * asoc->nonce_sum_expect_base: - * - * SACK-flag-Value Seg-Sums Base 0 0 0 - * 1 0 1 0 1 1 1 1 0 - */ - asoc->nonce_sum_expect_base = (0 ^ nonce_sum_flag) & SCTP_SACK_NONCE_SUM; - } - } - } - /* RWND update */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - win_probe_recovery = 1; - } - /* Now assure a timer where data is queued at */ -again: - j = 0; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - int to_ticks; - - if (win_probe_recovery && (net->window_probe)) { - win_probe_recovered = 1; - /* - * Find first chunk that was used with window probe - * and clear the sent - */ - /* sa_ignore FREED_MEMORY */ - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->window_probe) { - /* move back to data send queue */ - sctp_window_probe_recovery(stcb, asoc, net, tp1); - break; - } - } - } - if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); - } else { - to_ticks = MSEC_TO_TICKS(net->RTO); - } - if (net->flight_size) { - - j++; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - if (net->window_probe) { - net->window_probe = 0; - } - } else { - if (net->window_probe) { - /* - * In window probes we must assure a timer - * is still running there - */ - net->window_probe = 0; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { - sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); - } - if (SCTP_BASE_SYSCTL(sctp_early_fr)) { - if (SCTP_OS_TIMER_PENDING(&net->fr_timer.timer)) { - SCTP_STAT_INCR(sctps_earlyfrstpidsck4); - sctp_timer_stop(SCTP_TIMER_TYPE_EARLYFR, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_23); - } - } - } - } - if ((j == 0) && - (!TAILQ_EMPTY(&asoc->sent_queue)) && - (asoc->sent_queue_retran_cnt == 0) && - (win_probe_recovered == 0) && - (done_once == 0)) { - /* - * huh, this should not happen unless all packets are - * PR-SCTP and marked to skip of course. - */ - if (sctp_fs_audit(asoc)) { - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - asoc->sent_queue_retran_cnt = 0; - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - sctp_flight_size_increase(tp1); - sctp_total_flight_increase(stcb, tp1); - } else if (tp1->sent == SCTP_DATAGRAM_RESEND) { - asoc->sent_queue_retran_cnt++; - } - } - } - done_once = 1; - goto again; - } - /**********************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:57:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15BBA106566C; Sat, 17 Apr 2010 03:57:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03EC58FC14; Sat, 17 Apr 2010 03:57: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 o3H3vG09040085; Sat, 17 Apr 2010 03:57:16 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3vGlg040081; Sat, 17 Apr 2010 03:57:16 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170357.o3H3vGlg040081@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:57: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: r206732 - 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: Sat, 17 Apr 2010 03:57:17 -0000 Author: rrs Date: Sat Apr 17 03:57:16 2010 New Revision: 206732 URL: http://svn.freebsd.org/changeset/base/206732 Log: MFC of 202782 Michaels changes that took out [0] -> for [] Modified: stable/8/sys/netinet/sctp_auth.h stable/8/sys/netinet/sctp_header.h stable/8/sys/netinet/sctp_uio.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_auth.h ============================================================================== --- stable/8/sys/netinet/sctp_auth.h Sat Apr 17 03:55:49 2010 (r206731) +++ stable/8/sys/netinet/sctp_auth.h Sat Apr 17 03:57:16 2010 (r206732) @@ -60,7 +60,7 @@ typedef union sctp_hash_context { typedef struct sctp_key { uint32_t keylen; - uint8_t key[0]; + uint8_t key[]; } sctp_key_t; typedef struct sctp_shared_key { @@ -83,7 +83,7 @@ typedef struct sctp_auth_chklist { typedef struct sctp_hmaclist { uint16_t max_algo; /* max algorithms allocated */ uint16_t num_algo; /* num algorithms used */ - uint16_t hmac[0]; + uint16_t hmac[]; } sctp_hmaclist_t; /* authentication info */ Modified: stable/8/sys/netinet/sctp_header.h ============================================================================== --- stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:55:49 2010 (r206731) +++ stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:57:16 2010 (r206732) @@ -138,7 +138,7 @@ struct sctp_asconf_addrv4_param { /* an struct sctp_supported_chunk_types_param { struct sctp_paramhdr ph;/* type = 0x8008 len = x */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; @@ -219,7 +219,7 @@ struct sctp_state_cookie { /* this is ou struct sctp_missing_nat_state { uint16_t cause; uint16_t length; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; @@ -451,7 +451,7 @@ struct sctp_pktdrop_chunk { uint32_t current_onq; uint16_t trunc_len; uint16_t reserved; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; /**********STREAM RESET STUFF ******************/ @@ -461,13 +461,13 @@ struct sctp_stream_reset_out_request { uint32_t request_seq; /* monotonically increasing seq no */ uint32_t response_seq; /* if a response, the resp seq no */ uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */ - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; struct sctp_stream_reset_in_request { struct sctp_paramhdr ph; uint32_t request_seq; - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; @@ -545,24 +545,24 @@ struct sctp_stream_reset_resp_tsn { #define SCTP_RANDOM_MAX_SIZE 256 struct sctp_auth_random { struct sctp_paramhdr ph;/* type = 0x8002 */ - uint8_t random_data[0]; + uint8_t random_data[]; } SCTP_PACKED; struct sctp_auth_chunk_list { struct sctp_paramhdr ph;/* type = 0x8003 */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; struct sctp_auth_hmac_algo { struct sctp_paramhdr ph;/* type = 0x8004 */ - uint16_t hmac_ids[0]; + uint16_t hmac_ids[]; } SCTP_PACKED; struct sctp_auth_chunk { struct sctp_chunkhdr ch; uint16_t shared_key_id; uint16_t hmac_id; - uint8_t hmac[0]; + uint8_t hmac[]; } SCTP_PACKED; struct sctp_auth_invalid_hmac { Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:55:49 2010 (r206731) +++ stable/8/sys/netinet/sctp_uio.h Sat Apr 17 03:57:16 2010 (r206732) @@ -276,7 +276,7 @@ struct sctp_send_failed { uint32_t ssf_error; struct sctp_sndrcvinfo ssf_info; sctp_assoc_t ssf_assoc_id; - uint8_t ssf_data[0]; + uint8_t ssf_data[]; }; /* flag that indicates state of data */ @@ -370,7 +370,7 @@ struct sctp_stream_reset_event { uint16_t strreset_flags; uint32_t strreset_length; sctp_assoc_t strreset_assoc_id; - uint16_t strreset_list[0]; + uint16_t strreset_list[]; }; /* flags in strreset_flags field */ @@ -517,13 +517,13 @@ struct sctp_authchunk { struct sctp_authkey { sctp_assoc_t sca_assoc_id; uint16_t sca_keynumber; - uint8_t sca_key[0]; + uint8_t sca_key[]; }; /* SCTP_HMAC_IDENT */ struct sctp_hmacalgo { uint32_t shmac_number_of_idents; - uint16_t shmac_idents[0]; + uint16_t shmac_idents[]; }; /* AUTH hmac_id */ @@ -544,7 +544,7 @@ struct sctp_authkeyid { /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */ struct sctp_authchunks { sctp_assoc_t gauth_assoc_id; - uint8_t gauth_chunks[0]; + uint8_t gauth_chunks[]; }; struct sctp_assoc_value { @@ -554,7 +554,7 @@ struct sctp_assoc_value { struct sctp_assoc_ids { uint32_t gaids_number_of_ids; - sctp_assoc_t gaids_assoc_id[0]; + sctp_assoc_t gaids_assoc_id[]; }; struct sctp_sack_info { @@ -603,7 +603,7 @@ struct sctp_stream_reset { sctp_assoc_t strrst_assoc_id; uint16_t strrst_flags; uint16_t strrst_num_streams; /* 0 == ALL */ - uint16_t strrst_list[0];/* list if strrst_num_streams is not 0 */ + uint16_t strrst_list[]; /* list if strrst_num_streams is not 0 */ }; @@ -756,7 +756,7 @@ struct sctp_cwnd_log_req { int32_t num_ret; /* Number returned */ int32_t start_at; /* start at this one */ int32_t end_at; /* end at this one */ - struct sctp_cwnd_log log[0]; + struct sctp_cwnd_log log[]; }; struct sctp_timeval { From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 03:58:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5416106564A; Sat, 17 Apr 2010 03:58:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 938178FC0C; Sat, 17 Apr 2010 03: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 o3H3wufV040490; Sat, 17 Apr 2010 03:58:56 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H3wuld040488; Sat, 17 Apr 2010 03:58:56 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170358.o3H3wuld040488@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 03:58: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: r206733 - 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: Sat, 17 Apr 2010 03:58:56 -0000 Author: rrs Date: Sat Apr 17 03:58:56 2010 New Revision: 206733 URL: http://svn.freebsd.org/changeset/base/206733 Log: MFC of 203503 A fix to how the checksum code works that Michael put in. Modified: stable/8/sys/netinet/sctp_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) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Apr 17 03:57:16 2010 (r206732) +++ stable/8/sys/netinet/sctp_input.c Sat Apr 17 03:58:56 2010 (r206733) @@ -5806,6 +5806,7 @@ sctp_input_with_port(struct mbuf *i_pak, } sh->checksum = 0; /* prepare for calc */ calc_check = sctp_calculate_cksum(m, iphlen); + sh->checksum = check; SCTP_STAT_INCR(sctps_recvswcrc); if (calc_check != check) { SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", @@ -5831,7 +5832,6 @@ sctp_input_with_port(struct mbuf *i_pak, SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); goto bad; } - sh->checksum = calc_check; sctp_skip_csum_4: /* destination port of 0 is illegal, based on RFC2960. */ if (sh->dest_port == 0) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:00:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76EF5106564A; Sat, 17 Apr 2010 04:00:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64FF18FC08; Sat, 17 Apr 2010 04: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 o3H40vNU041024; Sat, 17 Apr 2010 04:00:57 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H40voE041022; Sat, 17 Apr 2010 04:00:57 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170400.o3H40voE041022@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04: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: r206734 - 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: Sat, 17 Apr 2010 04:00:57 -0000 Author: rrs Date: Sat Apr 17 04:00:57 2010 New Revision: 206734 URL: http://svn.freebsd.org/changeset/base/206734 Log: MFC of 203847 Puts in missing packed declarations (from Michael). It worked only because it was properly aligned anyway ;-) Modified: stable/8/sys/netinet/sctp_header.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_header.h ============================================================================== --- stable/8/sys/netinet/sctp_header.h Sat Apr 17 03:58:56 2010 (r206733) +++ stable/8/sys/netinet/sctp_header.h Sat Apr 17 04:00:57 2010 (r206734) @@ -62,7 +62,7 @@ struct sctp_ipv6addr_param { struct sctp_cookie_perserve_param { struct sctp_paramhdr ph;/* type=SCTP_COOKIE_PRESERVE, len=8 */ uint32_t time; /* time in ms to extend cookie */ -}; +} SCTP_PACKED; #define SCTP_ARRAY_MIN_LEN 1 /* Host Name Address */ @@ -495,7 +495,7 @@ struct sctp_stream_reset_add_strm { uint32_t request_seq; uint16_t number_of_streams; uint16_t reserved; -}; +} SCTP_PACKED; #define SCTP_STREAM_RESET_NOTHING 0x00000000 /* Nothing for me to do */ #define SCTP_STREAM_RESET_PERFORMED 0x00000001 /* Did it */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:02:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A37301065673; Sat, 17 Apr 2010 04:02:27 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91B028FC14; Sat, 17 Apr 2010 04:02: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 o3H42R2E041401; Sat, 17 Apr 2010 04:02:27 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H42RsV041399; Sat, 17 Apr 2010 04:02:27 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170402.o3H42RsV041399@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:02: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: r206735 - 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: Sat, 17 Apr 2010 04:02:27 -0000 Author: rrs Date: Sat Apr 17 04:02:27 2010 New Revision: 206735 URL: http://svn.freebsd.org/changeset/base/206735 Log: MFD 204040 Fixes some argument calsl (u_long vs uint32_t). Modified: stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:00:57 2010 (r206734) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:02:27 2010 (r206735) @@ -3479,7 +3479,7 @@ sctp_handle_segments(struct mbuf *m, int static void sctp_check_for_revoked(struct sctp_tcb *stcb, struct sctp_association *asoc, uint32_t cumack, - u_long biggest_tsn_acked) + uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; int tot_revoked = 0; @@ -3561,7 +3561,7 @@ sctp_check_for_revoked(struct sctp_tcb * static void sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc, - u_long biggest_tsn_acked, u_long biggest_tsn_newly_acked, u_long this_sack_lowest_newack, int accum_moved) + uint32_t biggest_tsn_acked, uint32_t biggest_tsn_newly_acked, uint32_t this_sack_lowest_newack, int accum_moved) { struct sctp_tmit_chunk *tp1; int strike_flag = 0; @@ -4747,7 +4747,7 @@ again: static void sctp_check_for_nr_revoked(struct sctp_tcb *stcb, struct sctp_association *asoc, uint32_t cumack, - u_long biggest_tsn_acked) + uint32_t biggest_tsn_acked) { struct sctp_tmit_chunk *tp1; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:06:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1751065679; Sat, 17 Apr 2010 04:06:40 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91A918FC2A; Sat, 17 Apr 2010 04:06:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3H46e2x042367; Sat, 17 Apr 2010 04:06:40 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H46eDJ042364; Sat, 17 Apr 2010 04:06:40 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170406.o3H46eDJ042364@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:06: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: r206736 - 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: Sat, 17 Apr 2010 04:06:40 -0000 Author: rrs Date: Sat Apr 17 04:06:40 2010 New Revision: 206736 URL: http://svn.freebsd.org/changeset/base/206736 Log: MFC of 204096 One of Michaels changes to fix some sign issues and some minor locking. Modified: stable/8/sys/netinet/sctp_usrreq.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) Modified: stable/8/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 04:02:27 2010 (r206735) +++ stable/8/sys/netinet/sctp_usrreq.c Sat Apr 17 04:06:40 2010 (r206736) @@ -980,7 +980,9 @@ sctp_shutdown(struct socket *so) /* For UDP model this is a invalid call */ if (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { /* Restore the flags that the soshutdown took away. */ + SOCKBUF_LOCK(&so->so_rcv); so->so_rcv.sb_state &= ~SBS_CANTRCVMORE; + SOCKBUF_UNLOCK(&so->so_rcv); /* This proc will wakeup for read and do nothing (I hope) */ SCTP_INP_RUNLOCK(inp); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EOPNOTSUPP); @@ -4465,6 +4467,15 @@ sctp_connect(struct socket *so, struct s if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) { stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; /* Set the connected flag so we can queue data */ + SOCKBUF_LOCK(&so->so_rcv); + so->so_rcv.sb_state &= ~SBS_CANTRCVMORE; + SOCKBUF_UNLOCK(&so->so_rcv); + SOCKBUF_LOCK(&so->so_snd); + so->so_snd.sb_state &= ~SBS_CANTSENDMORE; + SOCKBUF_UNLOCK(&so->so_snd); + SOCK_LOCK(so); + so->so_state &= ~SS_ISDISCONNECTING; + SOCK_UNLOCK(so); soisconnecting(so); } SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT); Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 04:02:27 2010 (r206735) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 04:06:40 2010 (r206736) @@ -849,7 +849,7 @@ retry: uint32_t sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int save_in_twait) { - u_long x, not_done; + uint32_t x, not_done; struct timeval now; (void)SCTP_GETTIME_TIMEVAL(&now); @@ -2770,8 +2770,6 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa return (EFAULT); } -int sctp_asoc_change_wake = 0; - static void sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked @@ -2825,7 +2823,6 @@ sctp_notify_assoc_change(uint32_t event, SCTP_SOCKET_UNLOCK(so, 1); } #endif - sctp_asoc_change_wake++; } if (sctp_is_feature_off(stcb->sctp_ep, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { /* event not enabled */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:08:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55775106566B; Sat, 17 Apr 2010 04:08:52 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 431DC8FC12; Sat, 17 Apr 2010 04:08: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 o3H48qFb042912; Sat, 17 Apr 2010 04:08:52 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H48qUZ042908; Sat, 17 Apr 2010 04:08:52 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170408.o3H48qUZ042908@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:08: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: r206738 - 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: Sat, 17 Apr 2010 04:08:52 -0000 Author: rrs Date: Sat Apr 17 04:08:51 2010 New Revision: 206738 URL: http://svn.freebsd.org/changeset/base/206738 Log: MFC of 204141 Cleans up so we can have a vtag reflected argument. One of Michaels fixes ;-) Modified: stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_output.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:07:38 2010 (r206737) +++ stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:08:51 2010 (r206738) @@ -918,7 +918,8 @@ sctp_handle_shutdown(struct sctp_shutdow static void sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp, - struct sctp_tcb *stcb, struct sctp_nets *net) + struct sctp_tcb *stcb, + struct sctp_nets *net) { struct sctp_association *asoc; @@ -934,6 +935,13 @@ sctp_handle_shutdown_ack(struct sctp_shu asoc = &stcb->asoc; /* process according to association state */ + if ((SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_WAIT) || + (SCTP_GET_STATE(asoc) == SCTP_STATE_COOKIE_ECHOED)) { + /* unexpected SHUTDOWN-ACK... do OOTB handling... */ + sctp_send_shutdown_complete(stcb, net, 1); + SCTP_TCB_UNLOCK(stcb); + return; + } if ((SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) && (SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_ACK_SENT)) { /* unexpected SHUTDOWN-ACK... so ignore... */ @@ -975,7 +983,7 @@ sctp_handle_shutdown_ack(struct sctp_shu /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); /* send SHUTDOWN-COMPLETE */ - sctp_send_shutdown_complete(stcb, net); + sctp_send_shutdown_complete(stcb, net, 0); /* notify upper layer protocol */ if (stcb->sctp_socket) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:07:38 2010 (r206737) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:08:51 2010 (r206738) @@ -10622,27 +10622,37 @@ sctp_send_abort_tcb(struct sctp_tcb *stc void sctp_send_shutdown_complete(struct sctp_tcb *stcb, - struct sctp_nets *net) + struct sctp_nets *net, + int reflect_vtag) { /* formulate and SEND a SHUTDOWN-COMPLETE */ struct mbuf *m_shutdown_comp; struct sctp_shutdown_complete_chunk *shutdown_complete; + uint32_t vtag; + uint8_t flags; m_shutdown_comp = sctp_get_mbuf_for_msg(sizeof(struct sctp_chunkhdr), 0, M_DONTWAIT, 1, MT_HEADER); if (m_shutdown_comp == NULL) { /* no mbuf's */ return; } + if (reflect_vtag) { + flags = SCTP_HAD_NO_TCB; + vtag = stcb->asoc.my_vtag; + } else { + flags = 0; + vtag = stcb->asoc.peer_vtag; + } shutdown_complete = mtod(m_shutdown_comp, struct sctp_shutdown_complete_chunk *); shutdown_complete->ch.chunk_type = SCTP_SHUTDOWN_COMPLETE; - shutdown_complete->ch.chunk_flags = 0; + shutdown_complete->ch.chunk_flags = flags; shutdown_complete->ch.chunk_length = htons(sizeof(struct sctp_shutdown_complete_chunk)); SCTP_BUF_LEN(m_shutdown_comp) = sizeof(struct sctp_shutdown_complete_chunk); (void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net, (struct sockaddr *)&net->ro._l_addr, m_shutdown_comp, 0, NULL, 0, 1, 0, NULL, 0, stcb->sctp_ep->sctp_lport, stcb->rport, - htonl(stcb->asoc.peer_vtag), + htonl(vtag), net->port, SCTP_SO_NOT_LOCKED, NULL); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); return; Modified: stable/8/sys/netinet/sctp_output.h ============================================================================== --- stable/8/sys/netinet/sctp_output.h Sat Apr 17 04:07:38 2010 (r206737) +++ stable/8/sys/netinet/sctp_output.h Sat Apr 17 04:08:51 2010 (r206738) @@ -111,7 +111,7 @@ void sctp_send_shutdown(struct sctp_tcb void sctp_send_shutdown_ack(struct sctp_tcb *, struct sctp_nets *); -void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *); +void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int); void sctp_send_shutdown_complete2(struct mbuf *, int, struct sctphdr *, From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:10:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 160CB106566B; Sat, 17 Apr 2010 04:10:30 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB41C8FC1C; Sat, 17 Apr 2010 04:10: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 o3H4ATAp043324; Sat, 17 Apr 2010 04:10:29 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4AT8Y043321; Sat, 17 Apr 2010 04:10:29 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170410.o3H4AT8Y043321@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:10: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: r206739 - 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: Sat, 17 Apr 2010 04:10:30 -0000 Author: rrs Date: Sat Apr 17 04:10:29 2010 New Revision: 206739 URL: http://svn.freebsd.org/changeset/base/206739 Log: MFC of 205627 Part II (more to follow) of the great IETF hack-a-thon to fix the NR-Sack code. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.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) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:08:51 2010 (r206738) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:10:29 2010 (r206739) @@ -46,24 +46,13 @@ __FBSDID("$FreeBSD$"); #include #define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ - if ((compare_with_wrap(tsn, mapping_tsn, MAX_TSN)) || \ - (tsn == mapping_tsn)) { \ + if (tsn >= mapping_tsn) { \ gap = tsn - mapping_tsn; \ } else { \ gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ } \ } while(0) -#define SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc) do { \ - if (asoc->mapping_array_base_tsn == asoc->nr_mapping_array_base_tsn) { \ - SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, nr_gap); \ - } else {\ - int lgap; \ - SCTP_CALC_TSN_TO_GAP(lgap, tsn, asoc->mapping_array_base_tsn); \ - SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, lgap); \ - } \ - } while(0) - /* * NOTES: On the outbound side of things I need to check the sack timer to * see if I should generate a sack into the chunk queue (if I have data to @@ -304,6 +293,44 @@ sctp_build_ctl_cchunk(struct sctp_inpcb return (buf); } +static void +sctp_mark_non_revokable(struct sctp_association *asoc, uint32_t tsn) +{ + uint32_t gap, i; + int fnd = 0; + + if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) { + return; + } + SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); +#ifdef INVARIANTS + if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + printf("gap:%x tsn:%x\n", gap, tsn); + sctp_print_mapping_array(asoc); + panic("Things are really messed up now!!"); + } +#endif + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } + if (tsn == asoc->highest_tsn_inside_map) { + /* We must back down to see what the new highest is */ + for (i = tsn - 1; compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN); i--) { + SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn); + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + asoc->highest_tsn_inside_map = i; + fnd = 1; + break; + } + } + if (!fnd) { + asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1; + } + } +} + /* * We are delivering currently from the reassembly queue. We must continue to @@ -319,9 +346,6 @@ sctp_service_reassembly(struct sctp_tcb int end = 0; int cntDel; - /* EY if any out-of-order delivered, then tag it nr on nr_map */ - uint32_t nr_tsn, nr_gap; - struct sctp_queued_to_read *control, *ctl, *ctlat; if (stcb == NULL) @@ -430,39 +454,7 @@ abandon: } /* pull it we did it */ TAILQ_REMOVE(&asoc->reasmqueue, chk, sctp_next); - /* - * EY this is the chunk that should be tagged nr gapped - * calculate the gap and such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - /* - * EY!-TODO- this tsn should be tagged nr only if it is - * out-of-order, the if statement should be modified - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - nr_tsn = chk->rec.data.TSN_seq; - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY The 1st should never happen, as in - * process_a_data_chunk method this check - * should be done - */ - /* - * EY The 2nd should never happen, because - * nr_mapping_array is always expanded when - * mapping_array is expanded - */ - printf("Impossible nr_gap ack range failed\n"); - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { asoc->fragmented_delivery_inprogress = 0; if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0) { @@ -509,67 +501,11 @@ abandon: asoc->size_on_all_streams -= ctl->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; - /* - * EY will be used to - * calculate nr-gap - */ - nr_tsn = ctl->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY -now something is - * delivered, calculate - * nr_gap and tag this tsn - * NR - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY The - * 1st - * should - * never - * happen, - * as in - * process_a_ - * data_chunk - * method - * this - * check - * should be - * done - */ - /* - * EY The - * 2nd - * should - * never - * happen, - * because - * nr_mapping - * _array is - * always - * expanded - * when - * mapping_ar - * ray is - * expanded - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, - asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); ctl = ctlat; } else { break; @@ -618,9 +554,6 @@ sctp_queue_data_to_stream(struct sctp_tc uint16_t nxt_todel; struct mbuf *oper; - /* EY- will be used to calculate nr-gap for a tsn */ - uint32_t nr_tsn, nr_gap; - queue_needed = 1; asoc->size_on_all_streams += control->length; sctp_ucount_incr(asoc->cnt_on_all_streams); @@ -682,41 +615,12 @@ protocol_error: asoc->size_on_all_streams -= control->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; - /* EY will be used to calculate nr-gap */ - nr_tsn = control->sinfo_tsn; + sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be tagged nr gapped - * calculate the gap and such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible nr_tsn set 2?\n"); - /* - * EY The 1st should never happen, as in - * process_a_data_chunk method this check - * should be done - */ - /* - * EY The 2nd should never happen, because - * nr_mapping_array is always expanded when - * mapping_array is expanded - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = TAILQ_FIRST(&strm->inqueue); while (control != NULL) { /* all delivered */ @@ -738,47 +642,12 @@ protocol_error: SCTP_STR_LOG_FROM_IMMED_DEL); } /* EY will be used to calculate nr-gap */ - nr_tsn = control->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be - * tagged nr gapped calculate the gap and - * such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY The 1st should never - * happen, as in - * process_a_data_chunk - * method this check should - * be done - */ - /* - * EY The 2nd should never - * happen, because - * nr_mapping_array is - * always expanded when - * mapping_array is expanded - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - if (compare_with_wrap(nr_tsn, - asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - } + sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = at; continue; } @@ -1586,9 +1455,6 @@ sctp_process_a_data_chunk(struct sctp_tc /* struct sctp_tmit_chunk *chk; */ struct sctp_tmit_chunk *chk; uint32_t tsn, gap; - - /* EY - for nr_sack */ - uint32_t nr_gap; struct mbuf *dmbuf; int indx, the_len; int need_reasm_check = 0; @@ -1640,14 +1506,12 @@ sctp_process_a_data_chunk(struct sctp_tc return (0); } } - /* EY - for nr_sack */ - nr_gap = gap; - if (compare_with_wrap(tsn, *high_tsn, MAX_TSN)) { *high_tsn = tsn; } /* See if we have received this one already */ - if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap) || + SCTP_IS_TSN_PRESENT(asoc->nr_mapping_array, gap)) { SCTP_STAT_INCR(sctps_recvdupdata); if (asoc->numduptsns < SCTP_MAX_DUP_TSNS) { /* Record a dup for the next outbound sack */ @@ -1714,7 +1578,8 @@ sctp_process_a_data_chunk(struct sctp_tc #endif } /* now is it in the mapping array of what we have accepted? */ - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN) && + compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { /* Nope not in the valid range dump it */ sctp_set_rwnd(stcb, asoc); if ((asoc->cnt_on_all_streams + @@ -1758,23 +1623,10 @@ sctp_process_a_data_chunk(struct sctp_tc } SCTP_STAT_INCR(sctps_badsid); SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); - /* EY set this tsn present in nr_sack's nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - SCTP_REVERSE_OUT_TSN_PRES(gap, tsn, asoc); - } - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { - /* we have a new high score */ - asoc->highest_tsn_inside_map = tsn; - /* EY nr_sack version of the above */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) - asoc->highest_tsn_inside_nr_map = tsn; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 2, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } + + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; } if (tsn == (asoc->cumulative_tsn + 1)) { /* Update cum-ack */ @@ -1925,48 +1777,6 @@ sctp_process_a_data_chunk(struct sctp_tc control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY here I should check if this delivered tsn is - * out_of_order, if yes then update the nr_map - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - /* - * EY check if the mapping_array and nr_mapping - * array are consistent - */ - if (asoc->mapping_array_base_tsn != asoc->nr_mapping_array_base_tsn) - /* - * printf("EY-IN - * sctp_process_a_data_chunk(5): Something - * is wrong the map base tsn" "\nEY-and - * nr_map base tsn should be equal."); - */ - /* EY debugging block */ - { - /* - * printf("\nEY-Calculating an - * nr_gap!!\nmapping_array_size = %d - * nr_mapping_array_size = %d" - * "\nEY-mapping_array_base = %d - * nr_mapping_array_base = - * %d\nEY-highest_tsn_inside_map = %d" - * "highest_tsn_inside_nr_map = %d\nEY-TSN = - * %d nr_gap = %d",asoc->mapping_array_size, - * asoc->nr_mapping_array_size, - * asoc->mapping_array_base_tsn, - * asoc->nr_mapping_array_base_tsn, - * asoc->highest_tsn_inside_map, - * asoc->highest_tsn_inside_nr_map,tsn,nr_gap - * ); - */ - } - /* EY - not %100 sure about the lock thing */ - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = tsn; - } if ((chunk_flags & SCTP_DATA_UNORDERED) == 0) { /* for ordered, bump what we delivered */ asoc->strmin[strmno].last_sequence_delivered++; @@ -1977,6 +1787,10 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } goto finish_express_del; } failed_express_del: @@ -2012,39 +1826,9 @@ failed_express_del: SCTP_PRINTF("Append fails end:%d\n", end); goto failed_pdapi_express_del; } - /* - * EY It is appended to the read queue in prev if - * block here I should check if this delivered tsn - * is out_of_order, if yes then update the nr_map - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - /* EY debugging block */ - { - /* - * printf("\nEY-Calculating an - * nr_gap!!\nEY-mapping_array_size = - * %d nr_mapping_array_size = %d" - * "\nEY-mapping_array_base = %d - * nr_mapping_array_base = - * %d\nEY-highest_tsn_inside_map = - * %d" "highest_tsn_inside_nr_map = - * %d\nEY-TSN = %d nr_gap = - * %d",asoc->mapping_array_size, - * asoc->nr_mapping_array_size, - * asoc->mapping_array_base_tsn, - * asoc->nr_mapping_array_base_tsn, - * asoc->highest_tsn_inside_map, - * asoc->highest_tsn_inside_nr_map,ts - * n,nr_gap); - */ - } - /* EY - not %100 sure about the lock thing */ - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = tsn; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; } SCTP_STAT_INCR(sctps_recvexpressm); control->sinfo_tsn = tsn; @@ -2069,12 +1853,27 @@ failed_express_del: need_reasm_check = 1; } } + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } control = NULL; goto finish_express_del; } } failed_pdapi_express_del: control = NULL; + if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) { + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = tsn; + } + } else { + SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); + if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { + asoc->highest_tsn_inside_map = tsn; + } + } if ((chunk_flags & SCTP_DATA_NOT_FRAG) != SCTP_DATA_NOT_FRAG) { sctp_alloc_a_chunk(stcb, chk); if (chk == NULL) { @@ -2263,56 +2062,7 @@ failed_pdapi_express_del: sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY It is added to the read queue in prev if block - * here I should check if this delivered tsn is - * out_of_order, if yes then update the nr_map - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - /* - * EY check if the mapping_array and - * nr_mapping array are consistent - */ - if (asoc->mapping_array_base_tsn != asoc->nr_mapping_array_base_tsn) - /* - * printf("EY-IN - * sctp_process_a_data_chunk(6): - * Something is wrong the map base - * tsn" "\nEY-and nr_map base tsn - * should be equal."); - */ - /* - * EY - not %100 sure about the lock - * thing, i think we don't need the - * below, - */ - /* SCTP_TCB_LOCK_ASSERT(stcb); */ - { - /* - * printf("\nEY-Calculating an - * nr_gap!!\nEY-mapping_array_size = - * %d nr_mapping_array_size = %d" - * "\nEY-mapping_array_base = %d - * nr_mapping_array_base = - * %d\nEY-highest_tsn_inside_map = - * %d" "highest_tsn_inside_nr_map = - * %d\nEY-TSN = %d nr_gap = - * %d",asoc->mapping_array_size, - * asoc->nr_mapping_array_size, - * asoc->mapping_array_base_tsn, - * asoc->nr_mapping_array_base_tsn, - * asoc->highest_tsn_inside_map, - * asoc->highest_tsn_inside_nr_map,ts - * n,nr_gap); - */ - } - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) - asoc->highest_tsn_inside_nr_map = tsn; - } + } else { /* * Special check for when streams are resetting. We @@ -2384,13 +2134,6 @@ failed_pdapi_express_del: } } finish_express_del: - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { - /* we have a new high score */ - asoc->highest_tsn_inside_map = tsn; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 2, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } - } if (tsn == (asoc->cumulative_tsn + 1)) { /* Update cum-ack */ asoc->cumulative_tsn = tsn; @@ -2412,22 +2155,6 @@ finish_express_del: sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_PREPARE_SLIDE); } - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); - - /* - * EY - set tsn present in nr-map if doing nr-sacks and the tsn is - * non-renegable - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack && - (SCTP_BASE_SYSCTL(sctp_do_drain) == 0)) { - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, tsn, asoc); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { - asoc->highest_tsn_inside_nr_map = tsn; - } - } /* check the special flag for stream resets */ if (((liste = TAILQ_FIRST(&asoc->resetHead)) != NULL) && ((compare_with_wrap(asoc->cumulative_tsn, liste->tsn, MAX_TSN)) || @@ -2532,7 +2259,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; - uint8_t comb_byte; int last_all_ones = 0; int slide_from, slide_end, lgap, distance; @@ -2540,7 +2266,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i /* int nr_at; */ /* int nr_last_all_ones = 0; */ /* int nr_slide_from, nr_slide_end, nr_lgap, nr_distance; */ - uint32_t old_cumack, old_base, old_highest; + uint32_t old_cumack, old_base, old_highest, highest_tsn; asoc = &stcb->asoc; at = 0; @@ -2553,30 +2279,23 @@ sctp_sack_check(struct sctp_tcb *stcb, i * offset of the current cum-ack as the starting point. */ at = 0; - for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { - /* - * We must combine the renegable and non-renegable arrays - * here to form a unified view of what is acked right now - * (since they are kept separate - */ - comb_byte = asoc->mapping_array[slide_from] | asoc->nr_mapping_array[slide_from]; - if (comb_byte == 0xff) { + for (slide_from = 0; slide_from < stcb->asoc.nr_mapping_array_size; slide_from++) { + if (asoc->nr_mapping_array[slide_from] == 0xff) { at += 8; last_all_ones = 1; } else { /* there is a 0 bit */ - at += sctp_map_lookup_tab[comb_byte]; + at += sctp_map_lookup_tab[asoc->nr_mapping_array[slide_from]]; last_all_ones = 0; break; } } - asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - last_all_ones); - /* at is one off, since in the table a embedded -1 is present */ + asoc->cumulative_tsn = asoc->nr_mapping_array_base_tsn + (at - last_all_ones); at++; - if (compare_with_wrap(asoc->cumulative_tsn, - asoc->highest_tsn_inside_map, - MAX_TSN)) { + if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && + compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) + ) { #ifdef INVARIANTS panic("huh, cumack 0x%x greater than high-tsn 0x%x in map", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); @@ -2591,37 +2310,29 @@ sctp_sack_check(struct sctp_tcb *stcb, i asoc->highest_tsn_inside_nr_map = asoc->cumulative_tsn; #endif } - if ((asoc->cumulative_tsn == asoc->highest_tsn_inside_map) && (at >= 8)) { + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, + asoc->highest_tsn_inside_map, + MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; + } + if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ - /* higest becomes the cum-ack */ + /* highest becomes the cum-ack */ int clr; - asoc->cumulative_tsn = asoc->highest_tsn_inside_map; /* clear the array */ clr = (at >> 3) + 1; if (clr > asoc->mapping_array_size) { clr = asoc->mapping_array_size; } memset(asoc->mapping_array, 0, clr); - /* base becomes one ahead of the cum-ack */ - asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; - - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - - if (clr > asoc->nr_mapping_array_size) - clr = asoc->nr_mapping_array_size; + memset(asoc->nr_mapping_array, 0, clr); - memset(asoc->nr_mapping_array, 0, clr); - /* base becomes one ahead of the cum-ack */ - asoc->nr_mapping_array_base_tsn = asoc->cumulative_tsn + 1; - asoc->highest_tsn_inside_nr_map = asoc->cumulative_tsn; - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(old_base, old_cumack, old_highest, - SCTP_MAP_PREPARE_SLIDE); - sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, - asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_CLEARED); - } + asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; + asoc->nr_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) { /* we can slide the mapping array down */ /* slide_from holds where we hit the first NON 0xff byte */ @@ -2630,19 +2341,15 @@ sctp_sack_check(struct sctp_tcb *stcb, i * now calculate the ceiling of the move using our highest * TSN value */ - if (asoc->highest_tsn_inside_map >= asoc->mapping_array_base_tsn) { - lgap = asoc->highest_tsn_inside_map - - asoc->mapping_array_base_tsn; - } else { - lgap = (MAX_TSN - asoc->mapping_array_base_tsn) + - asoc->highest_tsn_inside_map + 1; - } - slide_end = lgap >> 3; + SCTP_CALC_TSN_TO_GAP(lgap, highest_tsn, asoc->mapping_array_base_tsn); + slide_end = (lgap >> 3); if (slide_end < slide_from) { + sctp_print_mapping_array(asoc); #ifdef INVARIANTS panic("impossible slide"); #else - printf("impossible slide?\n"); + printf("impossible slide lgap:%x slide_end:%x slide_from:%x? at:%d\n", + lgap, slide_end, slide_from, at); return; #endif } @@ -2682,30 +2389,21 @@ sctp_sack_check(struct sctp_tcb *stcb, i 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]; + } for (ii = distance; ii <= slide_end; ii++) { asoc->mapping_array[ii] = 0; + asoc->nr_mapping_array[ii] = 0; } asoc->mapping_array_base_tsn += (slide_from << 3); + asoc->nr_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, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); } - /* - * EY if doing nr_sacks then slide the - * nr_mapping_array accordingly please - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - for (ii = 0; ii < distance; ii++) { - asoc->nr_mapping_array[ii] = - asoc->nr_mapping_array[slide_from + ii]; - } - for (ii = distance; ii <= slide_end; ii++) { - asoc->nr_mapping_array[ii] = 0; - } - asoc->nr_mapping_array_base_tsn += (slide_from << 3); - } } } /* @@ -2736,8 +2434,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i int is_a_gap; /* is there a gap now ? */ - is_a_gap = compare_with_wrap(stcb->asoc.highest_tsn_inside_map, - stcb->asoc.cumulative_tsn, MAX_TSN); + is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); /* * CMT DAC algorithm: increase number of packets @@ -5742,9 +5439,6 @@ sctp_kick_prsctp_reorder_queue(struct sc struct sctp_association *asoc; int tt; - /* EY -used to calculate nr_gap information */ - uint32_t nr_tsn, nr_gap; - asoc = &stcb->asoc; tt = strmin->last_sequence_delivered; /* @@ -5764,82 +5458,10 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { /* EY need the tsn info for calculating nr */ - nr_tsn = ctl->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be - * tagged nr gapped calculate the gap and - * such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY These should never - * happen- explained before - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, - asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, nr_gap)) - /* - * printf("In - * sctp_kick_prsctp_reorder_q - * ueue(7): Something wrong, - * the TSN to be tagged" - * "\nas NR is not even in - * the mapping_array, or map - * and nr_map are - * inconsistent"); - */ - /* - * EY - not %100 sure about - * the lock thing, don't - * think its required - */ - /* - * SCTP_TCB_LOCK_ASSERT(stcb) - * ; - */ - { - /* - * printf("\nCalculating an - * nr_gap!!\nmapping_array_si - * ze = %d - * nr_mapping_array_size = - * %d" "\nmapping_array_base - * = %d - * nr_mapping_array_base = - * %d\nhighest_tsn_inside_map - * = %d" - * "highest_tsn_inside_nr_map - * = %d\nTSN = %d nr_gap = - * %d",asoc->mapping_array_si - * ze, - * asoc->nr_mapping_array_siz - * e, - * asoc->mapping_array_base_t - * sn, - * asoc->nr_mapping_array_bas - * e_tsn, - * asoc->highest_tsn_inside_m - * ap, - * asoc->highest_tsn_inside_n - * r_map,tsn,nr_gap); - */ - } - } + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } } else { /* no more delivery now. */ @@ -5864,82 +5486,11 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ strmin->last_sequence_delivered = ctl->sinfo_ssn; if (stcb->sctp_socket) { - /* EY */ - nr_tsn = ctl->sinfo_tsn; sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - /* - * EY this is the chunk that should be - * tagged nr gapped calculate the gap and - * such then tag this TSN nr - * chk->rec.data.TSN_seq - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - asoc->peer_supports_nr_sack) { - SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - /* - * EY These should never - * happen, explained before - */ - } else { - SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, - MAX_TSN)) - asoc->highest_tsn_inside_nr_map = nr_tsn; - } - if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, nr_gap)) - /* - * printf("In - * sctp_kick_prsctp_reorder_q - * ueue(8): Something wrong, - * the TSN to be tagged" - * "\nas NR is not even in - * the mapping_array, or map - * and nr_map are - * inconsistent"); - */ - /* - * EY - not %100 sure about - * the lock thing, don't - * think its required - */ - /* - * SCTP_TCB_LOCK_ASSERT(stcb) - * ; - */ - { - /* - * printf("\nCalculating an - * nr_gap!!\nmapping_array_si - * ze = %d - * nr_mapping_array_size = - * %d" "\nmapping_array_base - * = %d - * nr_mapping_array_base = - * %d\nhighest_tsn_inside_map - * = %d" - * "highest_tsn_inside_nr_map - * = %d\nTSN = %d nr_gap = - * %d",asoc->mapping_array_si - * ze, - * asoc->nr_mapping_array_siz - * e, - * asoc->mapping_array_base_t - * sn, - * asoc->nr_mapping_array_bas - * e_tsn, - * asoc->highest_tsn_inside_m - * ap, - * asoc->highest_tsn_inside_n - * r_map,tsn,nr_gap); - */ - } - } + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); + } tt = strmin->last_sequence_delivered + 1; } else { @@ -6096,25 +5647,19 @@ sctp_handle_forward_tsn(struct sctp_tcb if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN)) { asoc->highest_tsn_inside_map = new_cum_tsn; - /* EY nr_mapping_array version of the above */ - /* - * if(SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - * asoc->peer_supports_nr_sack) - */ + + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, + MAX_TSN)) { asoc->highest_tsn_inside_nr_map = new_cum_tsn; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 0, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } } /* * now we know the new TSN is more advanced, let's find the actual * gap */ - SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->mapping_array_base_tsn); + SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->nr_mapping_array_base_tsn); + asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 0, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { struct mbuf *oper; @@ -6147,23 +5692,15 @@ sctp_handle_forward_tsn(struct sctp_tcb return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); + memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); - cumack_set_flag = 1; asoc->mapping_array_base_tsn = new_cum_tsn + 1; - asoc->cumulative_tsn = asoc->highest_tsn_inside_map = new_cum_tsn; - /* EY - nr_sack: nr_mapping_array version of the above */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); - asoc->nr_mapping_array_base_tsn = new_cum_tsn + 1; - asoc->highest_tsn_inside_nr_map = new_cum_tsn; - if (asoc->nr_mapping_array_size != asoc->mapping_array_size) { - /* - * printf("IN sctp_handle_forward_tsn: - * Something is wrong the size of" "map and - * nr_map should be equal!") - */ ; - } - } + asoc->highest_tsn_inside_map = new_cum_tsn; + + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:11:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861621065673; Sat, 17 Apr 2010 04:11:45 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 746398FC16; Sat, 17 Apr 2010 04:11: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 o3H4BjYb043647; Sat, 17 Apr 2010 04:11:45 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4BjrJ043645; Sat, 17 Apr 2010 04:11:45 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170411.o3H4BjrJ043645@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:11: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: r206740 - 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: Sat, 17 Apr 2010 04:11:45 -0000 Author: rrs Date: Sat Apr 17 04:11:45 2010 New Revision: 206740 URL: http://svn.freebsd.org/changeset/base/206740 Log: MFC of 205628 Out goes the nr_mapping_array expand. Modified: stable/8/sys/netinet/sctputil.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Apr 17 04:10:29 2010 (r206739) +++ stable/8/sys/netinet/sctputil.h Sat Apr 17 04:11:45 2010 (r206740) @@ -169,8 +169,6 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); -/* EY nr_sack version of the above method, expands nr_mapping_array */ -int sctp_expand_nr_mapping_array(struct sctp_association *, uint32_t); void sctp_abort_notification(struct sctp_tcb *, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:13:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07679106566B; Sat, 17 Apr 2010 04:13:53 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E823E8FC08; Sat, 17 Apr 2010 04:13: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 o3H4DqKf044188; Sat, 17 Apr 2010 04:13:52 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4DqSw044152; Sat, 17 Apr 2010 04:13:52 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170413.o3H4DqSw044152@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:13: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: r206741 - in stable/8/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 04:13:53 -0000 Author: rrs Date: Sat Apr 17 04:13:52 2010 New Revision: 206741 URL: http://svn.freebsd.org/changeset/base/206741 Log: MFC of 205629 Adds the option of seperating out the sctp stats per processor. This will be refined further and is definetly exploratory (which is why its an option) i.e. making it allocate the actual number of processors is coming ;-D. Modified: stable/8/sys/conf/options stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_pcb.h stable/8/sys/netinet/sctp_sysctl.c stable/8/sys/netinet/sctp_uio.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/conf/options Sat Apr 17 04:13:52 2010 (r206741) @@ -435,6 +435,7 @@ SCTP_MBCNT_LOGGING opt_sctp.h # Log to K SCTP_PACKET_LOGGING opt_sctp.h # Log to a packet buffer last N packets SCTP_LTRACE_CHUNKS opt_sctp.h # Log to KTR chunks processed SCTP_LTRACE_ERRORS opt_sctp.h # Log to KTR error returns. +SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. # # # Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_pcb.c Sat Apr 17 04:13:52 2010 (r206741) @@ -5425,8 +5425,13 @@ sctp_pcb_init() bzero(&SCTP_BASE_SYSCTL(sctp_log), sizeof(struct sctp_log)); #endif (void)SCTP_GETTIME_TIMEVAL(&tv); +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) + SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_sec = (uint32_t) tv.tv_sec; + SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_usec = (uint32_t) tv.tv_usec; +#else SCTP_BASE_STAT(sctps_discontinuitytime).tv_sec = (uint32_t) tv.tv_sec; SCTP_BASE_STAT(sctps_discontinuitytime).tv_usec = (uint32_t) tv.tv_usec; +#endif /* init the empty list of (All) Endpoints */ LIST_INIT(&SCTP_BASE_INFO(listhead)); Modified: stable/8/sys/netinet/sctp_pcb.h ============================================================================== --- stable/8/sys/netinet/sctp_pcb.h Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_pcb.h Sat Apr 17 04:13:52 2010 (r206741) @@ -246,7 +246,11 @@ struct sctp_base_info { * All static structures that anchor the system must be here. */ struct sctp_epinfo sctppcbinfo; +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) + struct sctpstat sctpstat[MAXCPU]; +#else struct sctpstat sctpstat; +#endif struct sctp_sysctl sctpsysctl; uint8_t first_time; char sctp_pcb_initialized; Modified: stable/8/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_sysctl.c Sat Apr 17 04:13:52 2010 (r206741) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * sysctl tunable variables @@ -627,7 +628,158 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) return (error); } +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +static int +sysctl_stat_get(SYSCTL_HANDLER_ARGS) +{ + int cpu, error; + struct sctpstat sb, *sarry; + memset(&sb, 0, sizeof(sb)); + for (cpu = 0; cpu < mp_ncpus; cpu++) { + sarry = &SCTP_BASE_STATS[cpu]; + if (sarry->sctps_discontinuitytime.tv_sec > sb.sctps_discontinuitytime.tv_sec) { + sb.sctps_discontinuitytime.tv_sec = sarry->sctps_discontinuitytime.tv_sec; + sb.sctps_discontinuitytime.tv_usec = sarry->sctps_discontinuitytime.tv_usec; + } + sb.sctps_currestab += sarry->sctps_currestab; + sb.sctps_activeestab += sarry->sctps_activeestab; + sb.sctps_restartestab += sarry->sctps_restartestab; + sb.sctps_collisionestab += sarry->sctps_collisionestab; + sb.sctps_passiveestab += sarry->sctps_passiveestab; + sb.sctps_aborted += sarry->sctps_aborted; + sb.sctps_shutdown += sarry->sctps_shutdown; + sb.sctps_outoftheblue += sarry->sctps_outoftheblue; + sb.sctps_checksumerrors += sarry->sctps_checksumerrors; + sb.sctps_outcontrolchunks += sarry->sctps_outcontrolchunks; + sb.sctps_outorderchunks += sarry->sctps_outorderchunks; + sb.sctps_outunorderchunks += sarry->sctps_outunorderchunks; + sb.sctps_incontrolchunks += sarry->sctps_incontrolchunks; + sb.sctps_inorderchunks += sarry->sctps_inorderchunks; + sb.sctps_inunorderchunks += sarry->sctps_inunorderchunks; + sb.sctps_fragusrmsgs += sarry->sctps_fragusrmsgs; + sb.sctps_reasmusrmsgs += sarry->sctps_reasmusrmsgs; + sb.sctps_outpackets += sarry->sctps_outpackets; + sb.sctps_inpackets += sarry->sctps_inpackets; + sb.sctps_recvpackets += sarry->sctps_recvpackets; + sb.sctps_recvdatagrams += sarry->sctps_recvdatagrams; + sb.sctps_recvpktwithdata += sarry->sctps_recvpktwithdata; + sb.sctps_recvsacks += sarry->sctps_recvsacks; + sb.sctps_recvdata += sarry->sctps_recvdata; + sb.sctps_recvdupdata += sarry->sctps_recvdupdata; + sb.sctps_recvheartbeat += sarry->sctps_recvheartbeat; + sb.sctps_recvheartbeatack += sarry->sctps_recvheartbeatack; + sb.sctps_recvecne += sarry->sctps_recvecne; + sb.sctps_recvauth += sarry->sctps_recvauth; + sb.sctps_recvauthmissing += sarry->sctps_recvauthmissing; + sb.sctps_recvivalhmacid += sarry->sctps_recvivalhmacid; + sb.sctps_recvivalkeyid += sarry->sctps_recvivalkeyid; + sb.sctps_recvauthfailed += sarry->sctps_recvauthfailed; + sb.sctps_recvexpress += sarry->sctps_recvexpress; + sb.sctps_recvexpressm += sarry->sctps_recvexpressm; + sb.sctps_recvnocrc += sarry->sctps_recvnocrc; + sb.sctps_recvswcrc += sarry->sctps_recvswcrc; + sb.sctps_recvhwcrc += sarry->sctps_recvhwcrc; + sb.sctps_sendpackets += sarry->sctps_sendpackets; + sb.sctps_sendsacks += sarry->sctps_sendsacks; + sb.sctps_senddata += sarry->sctps_senddata; + sb.sctps_sendretransdata += sarry->sctps_sendretransdata; + sb.sctps_sendfastretrans += sarry->sctps_sendfastretrans; + sb.sctps_sendmultfastretrans += sarry->sctps_sendmultfastretrans; + sb.sctps_sendheartbeat += sarry->sctps_sendheartbeat; + sb.sctps_sendecne += sarry->sctps_sendecne; + sb.sctps_sendauth += sarry->sctps_sendauth; + sb.sctps_senderrors += sarry->sctps_senderrors; + sb.sctps_sendnocrc += sarry->sctps_sendnocrc; + sb.sctps_sendswcrc += sarry->sctps_sendswcrc; + sb.sctps_sendhwcrc += sarry->sctps_sendhwcrc; + sb.sctps_pdrpfmbox += sarry->sctps_pdrpfmbox; + sb.sctps_pdrpfehos += sarry->sctps_pdrpfehos; + sb.sctps_pdrpmbda += sarry->sctps_pdrpmbda; + sb.sctps_pdrpmbct += sarry->sctps_pdrpmbct; + sb.sctps_pdrpbwrpt += sarry->sctps_pdrpbwrpt; + sb.sctps_pdrpcrupt += sarry->sctps_pdrpcrupt; + sb.sctps_pdrpnedat += sarry->sctps_pdrpnedat; + sb.sctps_pdrppdbrk += sarry->sctps_pdrppdbrk; + sb.sctps_pdrptsnnf += sarry->sctps_pdrptsnnf; + sb.sctps_pdrpdnfnd += sarry->sctps_pdrpdnfnd; + sb.sctps_pdrpdiwnp += sarry->sctps_pdrpdiwnp; + sb.sctps_pdrpdizrw += sarry->sctps_pdrpdizrw; + sb.sctps_pdrpbadd += sarry->sctps_pdrpbadd; + sb.sctps_pdrpmark += sarry->sctps_pdrpmark; + sb.sctps_timoiterator += sarry->sctps_timoiterator; + sb.sctps_timodata += sarry->sctps_timodata; + sb.sctps_timowindowprobe += sarry->sctps_timowindowprobe; + sb.sctps_timoinit += sarry->sctps_timoinit; + sb.sctps_timosack += sarry->sctps_timosack; + sb.sctps_timoshutdown += sarry->sctps_timoshutdown; + sb.sctps_timoheartbeat += sarry->sctps_timoheartbeat; + sb.sctps_timocookie += sarry->sctps_timocookie; + sb.sctps_timosecret += sarry->sctps_timosecret; + sb.sctps_timopathmtu += sarry->sctps_timopathmtu; + sb.sctps_timoshutdownack += sarry->sctps_timoshutdownack; + sb.sctps_timoshutdownguard += sarry->sctps_timoshutdownguard; + sb.sctps_timostrmrst += sarry->sctps_timostrmrst; + sb.sctps_timoearlyfr += sarry->sctps_timoearlyfr; + sb.sctps_timoasconf += sarry->sctps_timoasconf; + sb.sctps_timodelprim += sarry->sctps_timodelprim; + sb.sctps_timoautoclose += sarry->sctps_timoautoclose; + sb.sctps_timoassockill += sarry->sctps_timoassockill; + sb.sctps_timoinpkill += sarry->sctps_timoinpkill; + sb.sctps_earlyfrstart += sarry->sctps_earlyfrstart; + sb.sctps_earlyfrstop += sarry->sctps_earlyfrstop; + sb.sctps_earlyfrmrkretrans += sarry->sctps_earlyfrmrkretrans; + sb.sctps_earlyfrstpout += sarry->sctps_earlyfrstpout; + sb.sctps_earlyfrstpidsck1 += sarry->sctps_earlyfrstpidsck1; + sb.sctps_earlyfrstpidsck2 += sarry->sctps_earlyfrstpidsck2; + sb.sctps_earlyfrstpidsck3 += sarry->sctps_earlyfrstpidsck3; + sb.sctps_earlyfrstpidsck4 += sarry->sctps_earlyfrstpidsck4; + sb.sctps_earlyfrstrid += sarry->sctps_earlyfrstrid; + sb.sctps_earlyfrstrout += sarry->sctps_earlyfrstrout; + sb.sctps_earlyfrstrtmr += sarry->sctps_earlyfrstrtmr; + sb.sctps_hdrops += sarry->sctps_hdrops; + sb.sctps_badsum += sarry->sctps_badsum; + sb.sctps_noport += sarry->sctps_noport; + sb.sctps_badvtag += sarry->sctps_badvtag; + sb.sctps_badsid += sarry->sctps_badsid; + sb.sctps_nomem += sarry->sctps_nomem; + sb.sctps_fastretransinrtt += sarry->sctps_fastretransinrtt; + sb.sctps_markedretrans += sarry->sctps_markedretrans; + sb.sctps_naglesent += sarry->sctps_naglesent; + sb.sctps_naglequeued += sarry->sctps_naglequeued; + sb.sctps_maxburstqueued += sarry->sctps_maxburstqueued; + sb.sctps_ifnomemqueued += sarry->sctps_ifnomemqueued; + sb.sctps_windowprobed += sarry->sctps_windowprobed; + sb.sctps_lowlevelerr += sarry->sctps_lowlevelerr; + sb.sctps_lowlevelerrusr += sarry->sctps_lowlevelerrusr; + sb.sctps_datadropchklmt += sarry->sctps_datadropchklmt; + sb.sctps_datadroprwnd += sarry->sctps_datadroprwnd; + sb.sctps_ecnereducedcwnd += sarry->sctps_ecnereducedcwnd; + sb.sctps_vtagexpress += sarry->sctps_vtagexpress; + sb.sctps_vtagbogus += sarry->sctps_vtagbogus; + sb.sctps_primary_randry += sarry->sctps_primary_randry; + sb.sctps_cmt_randry += sarry->sctps_cmt_randry; + sb.sctps_slowpath_sack += sarry->sctps_slowpath_sack; + sb.sctps_wu_sacks_sent += sarry->sctps_wu_sacks_sent; + sb.sctps_sends_with_flags += sarry->sctps_sends_with_flags; + sb.sctps_sends_with_unord += sarry->sctps_sends_with_unord; + sb.sctps_sends_with_eof += sarry->sctps_sends_with_eof; + sb.sctps_sends_with_abort += sarry->sctps_sends_with_abort; + sb.sctps_protocol_drain_calls += sarry->sctps_protocol_drain_calls; + sb.sctps_protocol_drains_done += sarry->sctps_protocol_drains_done; + sb.sctps_read_peeks += sarry->sctps_read_peeks; + sb.sctps_cached_chk += sarry->sctps_cached_chk; + sb.sctps_cached_strmoq += sarry->sctps_cached_strmoq; + sb.sctps_left_abandon += sarry->sctps_left_abandon; + sb.sctps_send_burst_avoid += sarry->sctps_send_burst_avoid; + sb.sctps_send_cwnd_avoid += sarry->sctps_send_cwnd_avoid; + sb.sctps_fwdtsn_map_over += sarry->sctps_fwdtsn_map_over; + } + error = SYSCTL_OUT(req, &sb, sizeof(sb)); + return (error); +} + +#endif #if defined(SCTP_LOCAL_TRACE_BUF) static int @@ -916,10 +1068,16 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, ou &SCTP_BASE_SYSCTL(sctp_output_unlocked), 0, sysctl_sctp_check, "IU", SCTPCTL_OUTPUT_UNLOCKED_DESC); #endif - +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +SYSCTL_PROC(_net_inet_sctp, OID_AUTO, stats, + CTLTYPE_STRUCT | CTLFLAG_RD, + 0, 0, sysctl_stat_get, "S,sctpstat", + "SCTP statistics (struct sctp_stat)"); +#else SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_RW, &SCTP_BASE_STATS_SYSCTL, sctpstat, "SCTP statistics (struct sctp_stat)"); +#endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_RD, 0, 0, sctp_assoclist, Modified: stable/8/sys/netinet/sctp_uio.h ============================================================================== --- stable/8/sys/netinet/sctp_uio.h Sat Apr 17 04:11:45 2010 (r206740) +++ stable/8/sys/netinet/sctp_uio.h Sat Apr 17 04:13:52 2010 (r206741) @@ -957,9 +957,13 @@ struct sctpstat { #define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1) #define SCTP_STAT_DECR(_x) SCTP_STAT_DECR_BY(_x,1) +#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#define SCTP_STAT_INCR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x += _d) +#define SCTP_STAT_DECR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x -= _d) +#else #define SCTP_STAT_INCR_BY(_x,_d) atomic_add_int(&SCTP_BASE_STAT(_x), _d) #define SCTP_STAT_DECR_BY(_x,_d) atomic_subtract_int(&SCTP_BASE_STAT(_x), _d) - +#endif /* The following macros are for handling MIB values, */ #define SCTP_STAT_INCR_COUNTER32(_x) SCTP_STAT_INCR(_x) #define SCTP_STAT_INCR_COUNTER64(_x) SCTP_STAT_INCR(_x) From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:15:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54C3B106564A; Sat, 17 Apr 2010 04:15:47 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 412028FC1A; Sat, 17 Apr 2010 04:15: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 o3H4FldU044713; Sat, 17 Apr 2010 04:15:47 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4FlR3044705; Sat, 17 Apr 2010 04:15:47 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170415.o3H4FlR3044705@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:15: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: r206742 - 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: Sat, 17 Apr 2010 04:15:47 -0000 Author: rrs Date: Sat Apr 17 04:15:46 2010 New Revision: 206742 URL: http://svn.freebsd.org/changeset/base/206742 Log: MFC of 206137 This is Part III of the great IETF hack-a-thon to fix the NR-Sack code. (the last one on the cpu options was a lull.. i.e MFC 205629).. still 2 more to go. Modified: stable/8/sys/netinet/sctp_asconf.c stable/8/sys/netinet/sctp_constants.h stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_indata.h stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_output.h stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_pcb.h stable/8/sys/netinet/sctp_structs.h stable/8/sys/netinet/sctp_usrreq.c stable/8/sys/netinet/sctp_var.h stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h stable/8/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_asconf.c ============================================================================== --- stable/8/sys/netinet/sctp_asconf.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_asconf.c Sat Apr 17 04:15:46 2010 (r206742) @@ -556,9 +556,9 @@ sctp_process_asconf_set_primary(struct m * PRIMARY with DELETE IP ADDRESS of the previous primary * destination, unacknowledged DATA are retransmitted * immediately to the new primary destination for seamless - * handover. If the destination is UNCONFIRMED and marked - * to REQ_PRIM, The retransmission occur when reception of - * the HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in + * handover. If the destination is UNCONFIRMED and marked to + * REQ_PRIM, The retransmission occur when reception of the + * HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in * sctp_input.c) Also, when change of the primary * destination, it is better that all subsequent new DATA * containing already queued DATA are transmitted to the new @@ -1166,7 +1166,7 @@ sctp_path_check_and_react(struct sctp_tc /* * If number of local valid addresses is 1, the valid address is - * probably newly added address. Several valid addresses in this + * probably newly added address. Several valid addresses in this * association. A source address may not be changed. Additionally, * they can be configured on a same interface as "alias" addresses. * (by micchie) @@ -1210,7 +1210,7 @@ sctp_path_check_and_react(struct sctp_tc /* * Check if the nexthop is corresponding to the new address. * If the new address is corresponding to the current - * nexthop, the path will be changed. If the new address is + * nexthop, the path will be changed. If the new address is * NOT corresponding to the current nexthop, the path will * not be changed. */ Modified: stable/8/sys/netinet/sctp_constants.h ============================================================================== --- stable/8/sys/netinet/sctp_constants.h Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_constants.h Sat Apr 17 04:15:46 2010 (r206742) @@ -544,13 +544,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_INITIAL_MAPPING_ARRAY 16 /* how much we grow the mapping array each call */ #define SCTP_MAPPING_ARRAY_INCR 32 -/* EY 05/13/08 - nr_sack version of the previous 3 constants */ -/* Maximum the nr mapping array will grow to (TSN mapping array) */ -#define SCTP_NR_MAPPING_ARRAY 512 -/* size of the inital malloc on the nr mapping array */ -#define SCTP_INITIAL_NR_MAPPING_ARRAY 16 -/* how much we grow the nr mapping array each call */ -#define SCTP_NR_MAPPING_ARRAY_INCR 32 + /* * Here we define the timer types used by the implementation as arguments in * the set/get timer type calls. @@ -933,6 +927,13 @@ __FBSDID("$FreeBSD$"); #define SCTP_IS_TSN_PRESENT(arry, gap) ((arry[(gap >> 3)] >> (gap & 0x07)) & 0x01) #define SCTP_SET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] |= (0x01 << ((gap & 0x07)))) #define SCTP_UNSET_TSN_PRESENT(arry, gap) (arry[(gap >> 3)] &= ((~(0x01 << ((gap & 0x07)))) & 0xff)) +#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ + if (tsn >= mapping_tsn) { \ + gap = tsn - mapping_tsn; \ + } else { \ + gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ + } \ + } while(0) #define SCTP_RETRAN_DONE -1 Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:15:46 2010 (r206742) @@ -45,13 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define SCTP_CALC_TSN_TO_GAP(gap, tsn, mapping_tsn) do { \ - if (tsn >= mapping_tsn) { \ - gap = tsn - mapping_tsn; \ - } else { \ - gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ - } \ - } while(0) /* * NOTES: On the outbound side of things I need to check the sack timer to @@ -303,13 +296,13 @@ sctp_mark_non_revokable(struct sctp_asso return; } SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); -#ifdef INVARIANTS if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { printf("gap:%x tsn:%x\n", gap, tsn); sctp_print_mapping_array(asoc); +#ifdef INVARIANTS panic("Things are really messed up now!!"); - } #endif + } SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { @@ -317,7 +310,8 @@ sctp_mark_non_revokable(struct sctp_asso } if (tsn == asoc->highest_tsn_inside_map) { /* We must back down to see what the new highest is */ - for (i = tsn - 1; compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN); i--) { + for (i = tsn - 1; (compare_with_wrap(i, asoc->mapping_array_base_tsn, MAX_TSN) || + (i == asoc->mapping_array_base_tsn)); i--) { SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn); if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { asoc->highest_tsn_inside_map = i; @@ -411,6 +405,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, end, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); @@ -420,6 +415,7 @@ abandon: end = 1; else end = 0; + sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (sctp_append_to_readq(stcb->sctp_ep, stcb, stcb->asoc.control_pdapi, chk->data, end, chk->rec.data.TSN_seq, @@ -454,7 +450,6 @@ abandon: } /* pull it we did it */ TAILQ_REMOVE(&asoc->reasmqueue, chk, sctp_next); - sctp_mark_non_revokable(asoc, chk->rec.data.TSN_seq); if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { asoc->fragmented_delivery_inprogress = 0; if ((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0) { @@ -501,11 +496,11 @@ abandon: asoc->size_on_all_streams -= ctl->length; sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); ctl = ctlat; } else { break; @@ -616,11 +611,11 @@ protocol_error: sctp_ucount_decr(asoc->cnt_on_all_streams); strm->last_sequence_delivered++; + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = TAILQ_FIRST(&strm->inqueue); while (control != NULL) { /* all delivered */ @@ -641,13 +636,12 @@ protocol_error: sctp_log_strm_del(control, NULL, SCTP_STR_LOG_FROM_IMMED_DEL); } - /* EY will be used to calculate nr-gap */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, control->sinfo_tsn); control = at; continue; } @@ -965,8 +959,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && - chk->rec.data.stream_seq != - asoc->ssn_of_pdapi) { + chk->rec.data.stream_seq != asoc->ssn_of_pdapi) { /* Got to be the right STR Seq */ SCTPDBG(SCTP_DEBUG_INDATA1, "Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, @@ -1623,7 +1616,6 @@ sctp_process_a_data_chunk(struct sctp_tc } SCTP_STAT_INCR(sctps_badsid); SCTP_TCB_LOCK_ASSERT(stcb); - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1787,6 +1779,7 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; + SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { asoc->highest_tsn_inside_nr_map = tsn; @@ -1853,10 +1846,6 @@ failed_express_del: need_reasm_check = 1; } } - SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); - if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { - asoc->highest_tsn_inside_nr_map = tsn; - } control = NULL; goto finish_express_del; } @@ -2059,10 +2048,10 @@ failed_pdapi_express_del: /* ok, if we reach here we have passed the sanity checks */ if (chunk_flags & SCTP_DATA_UNORDERED) { /* queue directly into socket buffer */ + sctp_mark_non_revokable(asoc, control->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - } else { /* * Special check for when streams are resetting. We @@ -2134,10 +2123,6 @@ 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; } @@ -2215,43 +2200,43 @@ finish_express_del: } int8_t sctp_map_lookup_tab[256] = { - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 6, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 5, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 4, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 3, - -1, 0, -1, 1, -1, 0, -1, 2, - -1, 0, -1, 1, -1, 0, -1, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 7, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 6, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 5, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 4, + 0, 1, 0, 2, 0, 1, 0, 3, + 0, 1, 0, 2, 0, 1, 0, 8 }; void -sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort_flag) +sctp_slide_mapping_arrays(struct sctp_tcb *stcb) { /* * Now we also need to check the mapping array in a couple of ways. @@ -2259,7 +2244,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i */ struct sctp_association *asoc; int at; - int last_all_ones = 0; int slide_from, slide_end, lgap, distance; /* EY nr_mapping array variables */ @@ -2279,19 +2263,16 @@ sctp_sack_check(struct sctp_tcb *stcb, i * offset of the current cum-ack as the starting point. */ at = 0; - for (slide_from = 0; slide_from < stcb->asoc.nr_mapping_array_size; slide_from++) { + for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { if (asoc->nr_mapping_array[slide_from] == 0xff) { at += 8; - last_all_ones = 1; } else { /* there is a 0 bit */ at += sctp_map_lookup_tab[asoc->nr_mapping_array[slide_from]]; - last_all_ones = 0; break; } } - asoc->cumulative_tsn = asoc->nr_mapping_array_base_tsn + (at - last_all_ones); - at++; + asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) @@ -2320,18 +2301,22 @@ sctp_sack_check(struct sctp_tcb *stcb, i if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ /* highest becomes the cum-ack */ - int clr; + int clr, i; /* clear the array */ - clr = (at >> 3) + 1; + clr = ((at + 7) >> 3); if (clr > asoc->mapping_array_size) { clr = asoc->mapping_array_size; } memset(asoc->mapping_array, 0, clr); memset(asoc->nr_mapping_array, 0, clr); - + 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); + } + } asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; - asoc->nr_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) { /* we can slide the mapping array down */ @@ -2393,12 +2378,11 @@ sctp_sack_check(struct sctp_tcb *stcb, i asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= slide_end; ii++) { + for (ii = distance; ii <= asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } asoc->mapping_array_base_tsn += (slide_from << 3); - asoc->nr_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, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, @@ -2406,95 +2390,95 @@ sctp_sack_check(struct sctp_tcb *stcb, i } } } +} + + +void +sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag) +{ + struct sctp_association *asoc; + uint32_t highest_tsn; + + asoc = &stcb->asoc; + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, + asoc->highest_tsn_inside_map, + MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; + } + /* * Now we need to see if we need to queue a sack or just start the * timer (if allowed). */ - if (ok_to_sack) { - if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { - /* - * Ok special case, in SHUTDOWN-SENT case. here we - * maker sure SACK timer is off and instead send a - * SHUTDOWN and a SACK - */ - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); - } - sctp_send_shutdown(stcb, stcb->asoc.primary_destination); - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } else { - int is_a_gap; + if (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_SENT) { + /* + * Ok special case, in SHUTDOWN-SENT case. here we maker + * sure SACK timer is off and instead send a SHUTDOWN and a + * SACK + */ + if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { + sctp_timer_stop(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_INDATA + SCTP_LOC_18); + } + sctp_send_shutdown(stcb, stcb->asoc.primary_destination); + sctp_send_sack(stcb); + } else { + int is_a_gap; - /* is there a gap now ? */ - is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); + /* is there a gap now ? */ + is_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); - /* - * CMT DAC algorithm: increase number of packets - * received since last ack - */ - stcb->asoc.cmt_dac_pkts_rcvd++; + /* + * CMT DAC algorithm: increase number of packets received + * since last ack + */ + stcb->asoc.cmt_dac_pkts_rcvd++; - if ((stcb->asoc.send_sack == 1) || /* We need to send a - * SACK */ - ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no - * longer is one */ - (stcb->asoc.numduptsns) || /* we have dup's */ - (is_a_gap) || /* is still a gap */ - (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ - (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ - ) { + if ((stcb->asoc.send_sack == 1) || /* We need to send a + * SACK */ + ((was_a_gap) && (is_a_gap == 0)) || /* was a gap, but no + * longer is one */ + (stcb->asoc.numduptsns) || /* we have dup's */ + (is_a_gap) || /* is still a gap */ + (stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */ + (stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ + ) { - if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && - (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && - (stcb->asoc.send_sack == 0) && - (stcb->asoc.numduptsns == 0) && - (stcb->asoc.delayed_ack) && - (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { + if ((SCTP_BASE_SYSCTL(sctp_cmt_on_off)) && + (SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) && + (stcb->asoc.send_sack == 0) && + (stcb->asoc.numduptsns == 0) && + (stcb->asoc.delayed_ack) && + (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) { - /* - * CMT DAC algorithm: With CMT, - * delay acks even in the face of - * - * reordering. Therefore, if acks that - * do not have to be sent because of - * the above reasons, will be - * delayed. That is, acks that would - * have been sent due to gap reports - * will be delayed with DAC. Start - * the delayed ack timer. - */ - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } else { - /* - * Ok we must build a SACK since the - * timer is pending, we got our - * first packet OR there are gaps or - * duplicates. - */ - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); - /* - * EY if nr_sacks used then send an - * nr-sack , a sack otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); - } + /* + * CMT DAC algorithm: With CMT, delay acks + * even in the face of + * + * reordering. Therefore, if acks that do not + * have to be sent because of the above + * reasons, will be delayed. That is, acks + * that would have been sent due to gap + * reports will be delayed with DAC. Start + * the delayed ack timer. + */ + sctp_timer_start(SCTP_TIMER_TYPE_RECV, + stcb->sctp_ep, stcb, NULL); } else { - if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } + /* + * Ok we must build a SACK since the timer + * is pending, we got our first packet OR + * there are gaps or duplicates. + */ + (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); } } } @@ -2834,14 +2818,7 @@ sctp_process_data(struct mbuf **mm, int if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); } - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && stcb->asoc.peer_supports_nr_sack) - sctp_send_nr_sack(stcb); - else - sctp_send_sack(stcb); + sctp_send_sack(stcb); } else { if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_RECV, @@ -2849,7 +2826,7 @@ sctp_process_data(struct mbuf **mm, int } } } else { - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); } if (abort_flag) return (2); @@ -2867,7 +2844,7 @@ sctp_process_segment_range(struct sctp_t { struct sctp_tmit_chunk *tp1; unsigned int theTSN; - int j, wake_him = 0; + int j, wake_him = 0, circled = 0; /* Recover the tp1 we last saw */ tp1 = *p_tp1; @@ -3045,12 +3022,6 @@ sctp_process_segment_range(struct sctp_t } /* NR Sack code here */ if (nr_sacking) { - if (tp1->sent != SCTP_FORWARD_TSN_SKIP) - tp1->sent = SCTP_DATAGRAM_NR_MARKED; - /* - * TAILQ_REMOVE(&asoc->sent_q - * ueue, tp1, sctp_next); - */ if (tp1->data) { /* * sa_ignore @@ -3058,13 +3029,8 @@ sctp_process_segment_range(struct sctp_t */ sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); sctp_m_freem(tp1->data); + tp1->data = NULL; } - tp1->data = NULL; - /* asoc->sent_queue_cnt--; */ - /* - * sctp_free_a_chunk(stcb, - * tp1); - */ wake_him++; } } @@ -3075,11 +3041,16 @@ sctp_process_segment_range(struct sctp_t break; tp1 = TAILQ_NEXT(tp1, sctp_next); + if ((tp1 == NULL) && (circled == 0)) { + circled++; + tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); + } } /* end while (tp1) */ - /* In case the fragments were not in order we must reset */ if (tp1 == NULL) { + circled = 0; tp1 = TAILQ_FIRST(&stcb->asoc.sent_queue); } + /* In case the fragments were not in order we must reset */ } /* end for (j = fragStart */ *p_tp1 = tp1; return (wake_him); /* Return value only used for nr-sack */ @@ -3158,6 +3129,9 @@ sctp_handle_segments(struct mbuf *m, int } else { non_revocable = 1; } + if (i == num_seg) { + tp1 = NULL; + } if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, non_revocable, &num_frs, biggest_newly_acked_tsn, this_sack_lowest_newack, ecn_seg_sums)) { @@ -3961,6 +3935,7 @@ sctp_express_handle_sack(struct sctp_tcb #ifdef INVARIANTS panic("Impossible sack 1"); #else + *abort_now = 1; /* XXX */ oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), @@ -4439,50 +4414,6 @@ again: } } -/* EY- nr_sack */ -/* Identifies the non-renegable tsns that are revoked*/ -static void -sctp_check_for_nr_revoked(struct sctp_tcb *stcb, - struct sctp_association *asoc, uint32_t cumack, - uint32_t biggest_tsn_acked) -{ - struct sctp_tmit_chunk *tp1; - - for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { - if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, - MAX_TSN)) { - /* - * ok this guy is either ACK or MARKED. If it is - * ACKED it has been previously acked but not this - * time i.e. revoked. If it is MARKED it was ACK'ed - * again. - */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, - MAX_TSN)) - break; - - - if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { - /* - * EY! a non-renegable TSN is revoked, need - * to abort the association - */ - /* - * EY TODO: put in the code to abort the - * assoc. - */ - return; - } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { - /* it has been re-acked in this SACK */ - tp1->sent = SCTP_DATAGRAM_NR_ACKED; - } - } - if (tp1->sent == SCTP_DATAGRAM_UNSENT) - break; - } - return; -} - void sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, struct sctp_tcb *stcb, struct sctp_nets *net_from, @@ -4588,22 +4519,23 @@ sctp_handle_sack(struct mbuf *m, int off sctpchunk_listhead); send_s = tp1->rec.data.TSN_seq + 1; } else { + tp1 = NULL; send_s = asoc->sending_seq; } if (cum_ack == send_s || compare_with_wrap(cum_ack, send_s, MAX_TSN)) { -#ifndef INVARIANTS struct mbuf *oper; -#endif -#ifdef INVARIANTS - hopeless_peer: - panic("Impossible sack 1"); -#else /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. */ + printf("NEW cum_ack:%x send_s:%x is smaller or equal\n", + cum_ack, send_s); + if (tp1) { + printf("Got send_s from tsn:%x + 1 of tp1:%p\n", + tp1->rec.data.TSN_seq, tp1); + } hopeless_peer: *abort_now = 1; /* XXX */ @@ -4624,7 +4556,6 @@ sctp_handle_sack(struct mbuf *m, int off stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); return; -#endif } } /**********************/ @@ -4844,6 +4775,10 @@ sctp_handle_sack(struct mbuf *m, int off * peer is either confused or we are under * attack. We must abort. */ + printf("Hopeless peer! biggest_tsn_acked:%x largest seq:%x\n", + biggest_tsn_acked, + send_s); + goto hopeless_peer; } } @@ -4991,15 +4926,9 @@ done_with_it: */ if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { - /* - * EY! - TODO: Something previously - * nr_gapped is reneged, abort the - * association - */ - return; + continue; } - if ((tp1->sent > SCTP_DATAGRAM_RESEND) && - (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { + if (tp1->sent == SCTP_DATAGRAM_ACKED) { tp1->sent = SCTP_DATAGRAM_SENT; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { sctp_misc_ints(SCTP_FLIGHT_LOG_UP_REVOKE, @@ -5028,15 +4957,11 @@ done_with_it: } asoc->saw_sack_with_frags = 0; } - if (num_seg) + if (num_seg || num_nr_seg) asoc->saw_sack_with_frags = 1; else asoc->saw_sack_with_frags = 0; - /* EY! - not sure about if there should be an IF */ - if (num_nr_seg > 0) - sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); - /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5457,11 +5382,10 @@ sctp_kick_prsctp_reorder_queue(struct sc sctp_ucount_decr(asoc->cnt_on_all_streams); /* deliver it to at least the delivery-q */ if (stcb->sctp_socket) { - /* EY need the tsn info for calculating nr */ + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } } else { /* no more delivery now. */ @@ -5486,10 +5410,10 @@ sctp_kick_prsctp_reorder_queue(struct sc /* deliver it to at least the delivery-q */ strmin->last_sequence_delivered = ctl->sinfo_ssn; if (stcb->sctp_socket) { + sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); sctp_add_to_readq(stcb->sctp_ep, stcb, ctl, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED); - sctp_mark_non_revokable(asoc, ctl->sinfo_tsn); } tt = strmin->last_sequence_delivered + 1; @@ -5593,7 +5517,8 @@ sctp_flush_reassm_for_str_seq(struct sct void sctp_handle_forward_tsn(struct sctp_tcb *stcb, - struct sctp_forward_tsn_chunk *fwd, int *abort_flag, struct mbuf *m, int offset) + struct sctp_forward_tsn_chunk *fwd, + int *abort_flag, struct mbuf *m, int offset) { /* * ISSUES that MUST be fixed for ECN! When we are the sender of the @@ -5619,8 +5544,8 @@ sctp_handle_forward_tsn(struct sctp_tcb * report where we are. */ struct sctp_association *asoc; - uint32_t new_cum_tsn, gap; - unsigned int i, fwd_sz, cumack_set_flag, m_size; + uint32_t new_cum_tsn, tsn, gap; + unsigned int i, fwd_sz, cumack_set_flag, m_size, fnd = 0; uint32_t str_seq; struct sctp_stream_in *strm; struct sctp_tmit_chunk *chk, *at; @@ -5657,7 +5582,7 @@ sctp_handle_forward_tsn(struct sctp_tcb * now we know the new TSN is more advanced, let's find the actual * gap */ - SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->nr_mapping_array_base_tsn); + SCTP_CALC_TSN_TO_GAP(gap, new_cum_tsn, asoc->mapping_array_base_tsn); asoc->cumulative_tsn = new_cum_tsn; if (gap >= m_size) { if ((long)gap > sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)) { @@ -5697,8 +5622,7 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->mapping_array_base_tsn = new_cum_tsn + 1; asoc->highest_tsn_inside_map = new_cum_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); - asoc->nr_mapping_array_base_tsn = new_cum_tsn + 1; + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); asoc->highest_tsn_inside_nr_map = new_cum_tsn; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { @@ -5710,14 +5634,32 @@ sctp_handle_forward_tsn(struct sctp_tcb for (i = 0; i <= gap; i++) { SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, i); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, i); + /* FIX ME add something to set up highest TSN in map */ + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { + asoc->highest_tsn_inside_nr_map = new_cum_tsn; + } + if (compare_with_wrap(new_cum_tsn, asoc->highest_tsn_inside_map, MAX_TSN) || + new_cum_tsn == asoc->highest_tsn_inside_map) { + /* We must back down to see what the new highest is */ + for (tsn = new_cum_tsn; (compare_with_wrap(tsn, asoc->mapping_array_base_tsn, MAX_TSN) || + (tsn == asoc->mapping_array_base_tsn)); tsn--) { + SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); + if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) { + asoc->highest_tsn_inside_map = tsn; + fnd = 1; + break; + } + } + if (!fnd) { + asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1; + } } /* * Now after marking all, slide thing forward but no sack * please. */ - sctp_sack_check(stcb, 0, 0, abort_flag); - if (*abort_flag) - return; + sctp_slide_mapping_arrays(stcb); } /*************************************************************/ /* 2. Clear up re-assembly queue */ Modified: stable/8/sys/netinet/sctp_indata.h ============================================================================== --- stable/8/sys/netinet/sctp_indata.h Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_indata.h Sat Apr 17 04:15:46 2010 (r206742) @@ -121,7 +121,9 @@ sctp_process_data(struct mbuf **, int, i struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint32_t *); -void sctp_sack_check(struct sctp_tcb *, int, int, int *); +void sctp_slide_mapping_arrays(struct sctp_tcb *stcb); + +void sctp_sack_check(struct sctp_tcb *, int, int *); #endif #endif Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_input.c Sat Apr 17 04:15:46 2010 (r206742) @@ -343,11 +343,6 @@ sctp_process_init(struct sctp_init_chunk asoc->str_reset_seq_in = asoc->asconf_seq_in + 1; asoc->mapping_array_base_tsn = ntohl(init->initial_tsn); - /* - * EY 05/13/08 - nr_sack: initialize nr_mapping array's base tsn - * like above - */ - asoc->nr_mapping_array_base_tsn = ntohl(init->initial_tsn); asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->asconf_seq_in; asoc->last_echo_tsn = asoc->asconf_seq_in; asoc->advanced_peer_ack_point = asoc->last_acked_seq; @@ -1862,7 +1857,7 @@ sctp_process_cookie_existing(struct mbuf } if (asoc->nr_mapping_array) { memset(asoc->nr_mapping_array, 0, - asoc->nr_mapping_array_size); + asoc->mapping_array_size); } SCTP_TCB_UNLOCK(stcb); SCTP_INP_INFO_WLOCK(); @@ -2027,7 +2022,7 @@ sctp_process_cookie_new(struct mbuf *m, * socket is unbound and we must do an implicit bind. Since we are * getting a cookie, we cannot be unbound. */ - stcb = sctp_aloc_assoc(inp, init_src, 0, &error, + stcb = sctp_aloc_assoc(inp, init_src, &error, ntohl(initack_cp->init.initiate_tag), vrf_id, (struct thread *)NULL ); @@ -3236,13 +3231,10 @@ process_chunk_drop(struct sctp_tcb *stcb } break; case SCTP_SELECTIVE_ACK: + case SCTP_NR_SELECTIVE_ACK: /* resend the sack */ sctp_send_sack(stcb); break; - /* EY for nr_sacks */ - case SCTP_NR_SELECTIVE_ACK: - sctp_send_nr_sack(stcb); /* EY resend the nr-sack */ - break; case SCTP_HEARTBEAT_REQUEST: /* resend a demand HB */ if ((stcb->asoc.overall_error_count + 3) < stcb->asoc.max_send_times) { @@ -3514,8 +3506,7 @@ sctp_handle_stream_reset_response(struct memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.mapping_array_base_tsn; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.sending_seq = ntohl(resp->receivers_next_tsn); stcb->asoc.last_acked_seq = stcb->asoc.cumulative_tsn; @@ -3624,8 +3615,7 @@ sctp_handle_str_reset_request_tsn(struct stcb->asoc.mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size); stcb->asoc.highest_tsn_inside_nr_map = stcb->asoc.highest_tsn_inside_map; - stcb->asoc.nr_mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1; - memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.nr_mapping_array_size); + memset(stcb->asoc.nr_mapping_array, 0, stcb->asoc.mapping_array_size); atomic_add_int(&stcb->asoc.sending_seq, 1); /* save off historical data for retrans */ stcb->asoc.last_sending_seq[1] = stcb->asoc.last_sending_seq[0]; @@ -5636,7 +5626,7 @@ sctp_common_input_processing(struct mbuf was_a_gap = 1; } stcb->asoc.send_sack = 1; - sctp_sack_check(stcb, 1, was_a_gap, &abort_flag); + sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) { /* Again, we aborted so NO UNLOCK needed */ goto out_now; Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:13:52 2010 (r206741) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:15:46 2010 (r206742) @@ -9003,6 +9003,11 @@ sctp_chunk_retransmission(struct sctp_in /* No, not sent to this net or not ready for rtx */ continue; } + if (chk->data == NULL) { + printf("TSN:%x chk->snd_count:%d chk->sent:%d can't retran - no data\n", + chk->rec.data.TSN_seq, chk->snd_count, chk->sent); + continue; + } if ((SCTP_BASE_SYSCTL(sctp_max_retran_chunk)) && (chk->snd_count >= SCTP_BASE_SYSCTL(sctp_max_retran_chunk))) { /* Gak, we have exceeded max unlucky retran, abort! */ @@ -9426,14 +9431,7 @@ sctp_chunk_output(struct sctp_inpcb *inp * running, if so piggy-back the sack. */ if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - /* - * EY if nr_sacks used then send an nr-sack , a sack - * otherwise - */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:17:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98850106566C; Sat, 17 Apr 2010 04:17:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85E638FC1F; Sat, 17 Apr 2010 04:17: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 o3H4HH45045091; Sat, 17 Apr 2010 04:17:17 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4HHV0045089; Sat, 17 Apr 2010 04:17:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170417.o3H4HHV0045089@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04: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: r206743 - 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: Sat, 17 Apr 2010 04:17:17 -0000 Author: rrs Date: Sat Apr 17 04:17:17 2010 New Revision: 206743 URL: http://svn.freebsd.org/changeset/base/206743 Log: MFC of 206151 Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:15:46 2010 (r206742) +++ stable/8/sys/netinet/sctp_output.c Sat Apr 17 04:17:17 2010 (r206743) @@ -3709,7 +3709,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -4021,7 +4021,7 @@ sctp_lowlevel_chunk_output(struct sctp_i (stcb) && (stcb->asoc.loopback_scope))) { m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; /* FIXME MT */ + m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } else { SCTP_STAT_INCR(sctps_sendnocrc); @@ -10542,7 +10542,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_ENABLE_UDP_CSUM(mout); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_ATTACH_CHAIN(o_pak, mout, mlen); @@ -10566,14 +10566,29 @@ sctp_send_shutdown_complete2(struct mbuf if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, mlen); #endif - comp_cp->sh.checksum = sctp_calculate_cksum(mout, offset_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, mlen); if (port) { - if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), - sizeof(struct sctp_shutdown_complete_msg) + sizeof(struct udphdr))) == 0) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + comp_cp->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } + if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), mlen - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11593,7 +11608,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11621,13 +11636,29 @@ sctp_send_abort(struct mbuf *m, int iphl if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - abm->sh.checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + abm->sh.checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); @@ -11815,7 +11846,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_ENABLE_UDP_CSUM(o_pak); } else { mout->m_pkthdr.csum_flags = CSUM_SCTP; - mout->m_pkthdr.csum_data = 0; /* FIXME MT */ + mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); } SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id); @@ -11841,13 +11872,29 @@ sctp_send_operr_to(struct mbuf *m, int i if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) sctp_packet_log(mout, len); #endif - sh_out->checksum = sctp_calculate_cksum(mout, iphlen_out); - SCTP_STAT_INCR(sctps_sendswcrc); SCTP_ATTACH_CHAIN(o_pak, mout, len); if (port) { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + sh_out->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr) + sizeof(struct udphdr)); + SCTP_STAT_INCR(sctps_sendswcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } if ((udp->uh_sum = in6_cksum(o_pak, IPPROTO_UDP, sizeof(struct ip6_hdr), len - sizeof(struct ip6_hdr))) == 0) { udp->uh_sum = 0xffff; } + } else { + if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && + (stcb) && + (stcb->asoc.loopback_scope))) { + mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); + } else { + SCTP_STAT_INCR(sctps_sendnocrc); + } } SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id); From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:19:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E95141065670; Sat, 17 Apr 2010 04:19:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D717A8FC22; Sat, 17 Apr 2010 04:19: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 o3H4JI8P045592; Sat, 17 Apr 2010 04:19:18 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4JI69045589; Sat, 17 Apr 2010 04:19:18 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004170419.o3H4JI69045589@svn.freebsd.org> From: Randall Stewart Date: Sat, 17 Apr 2010 04:19: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: r206744 - 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: Sat, 17 Apr 2010 04:19:19 -0000 Author: rrs Date: Sat Apr 17 04:19:18 2010 New Revision: 206744 URL: http://svn.freebsd.org/changeset/base/206744 Log: MFC of 206281 Final MFC of all the IETF hack a-thon.. head and stable are now in sync ;-) Modified: stable/8/sys/netinet/sctp_indata.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) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:17:17 2010 (r206743) +++ stable/8/sys/netinet/sctp_indata.c Sat Apr 17 04:19:18 2010 (r206744) @@ -2275,8 +2275,7 @@ sctp_slide_mapping_arrays(struct sctp_tc asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && - compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) - ) { + compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { #ifdef INVARIANTS panic("huh, cumack 0x%x greater than high-tsn 0x%x in map", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); @@ -2378,7 +2377,7 @@ sctp_slide_mapping_arrays(struct sctp_tc asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= asoc->mapping_array_size; ii++) { + for (ii = distance; ii < asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Apr 17 04:17:17 2010 (r206743) +++ stable/8/sys/netinet/sctputil.c Sat Apr 17 04:19:18 2010 (r206744) @@ -1187,50 +1187,38 @@ sctp_init_asoc(struct sctp_inpcb *m, str void sctp_print_mapping_array(struct sctp_association *asoc) { - int i, limit; + unsigned int i, limit; - printf("Mapping size:%d baseTSN:%8.8x cumAck:%8.8x highestTSN:%8.8x\n", + printf("Mapping array size: %d, baseTSN: %8.8x, cumAck: %8.8x, highestTSN: (%8.8x, %8.8x).\n", asoc->mapping_array_size, asoc->mapping_array_base_tsn, asoc->cumulative_tsn, - asoc->highest_tsn_inside_map - ); - limit = asoc->mapping_array_size; - for (i = asoc->mapping_array_size; i >= 0; i--) { - if (asoc->mapping_array[i]) { - limit = i; + asoc->highest_tsn_inside_map, + asoc->highest_tsn_inside_nr_map); + for (limit = asoc->mapping_array_size; limit > 1; limit--) { + if (asoc->mapping_array[limit - 1]) { break; } } - if (limit == 0) - limit = 1; + printf("Renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x ", asoc->mapping_array[i]); + printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); if (((i + 1) % 16) == 0) printf("\n"); } - printf("\n"); - printf("NR Mapping size:%d baseTSN:%8.8x highestTSN:%8.8x\n", - asoc->mapping_array_size, - asoc->mapping_array_base_tsn, - asoc->highest_tsn_inside_nr_map - ); - limit = asoc->mapping_array_size; - for (i = asoc->mapping_array_size; i >= 0; i--) { - if (asoc->nr_mapping_array[i]) { - limit = i; + if (limit % 16) + printf("\n"); + for (limit = asoc->mapping_array_size; limit > 1; limit--) { + if (asoc->nr_mapping_array[limit - 1]) { break; } } - if (limit == 0) - limit = 1; - + 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 ", asoc->nr_mapping_array[i]); - if (((i + 1) % 16) == 0) - printf("\n"); + printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); } - printf("\n"); + if (limit % 16) + printf("\n"); } int @@ -1240,9 +1228,7 @@ sctp_expand_mapping_array(struct sctp_as uint8_t *new_array1, *new_array2; uint32_t new_size; - new_size = asoc->mapping_array_size + ((needed + 7) / 8 + SCTP_MAPPING_ARRAY_INCR); - SCTP_MALLOC(new_array1, uint8_t *, new_size, SCTP_M_MAP); SCTP_MALLOC(new_array2, uint8_t *, new_size, SCTP_M_MAP); if ((new_array1 == NULL) || (new_array2 == NULL)) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 04:54:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EB6D106566B; Sat, 17 Apr 2010 04:54:39 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 032728FC21; Sat, 17 Apr 2010 04:54: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 o3H4scud053365; Sat, 17 Apr 2010 04:54:38 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H4scAn053363; Sat, 17 Apr 2010 04:54:38 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004170454.o3H4scAn053363@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 17 Apr 2010 04:54:38 +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: r206745 - stable/8/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 04:54:39 -0000 Author: ume Date: Sat Apr 17 04:54:38 2010 New Revision: 206745 URL: http://svn.freebsd.org/changeset/base/206745 Log: MFC r206557: Nuke the descriptions about ipv6_firewall_* as they were unified into firewall_*. Modified: stable/8/share/man/man5/rc.conf.5 Directory Properties: stable/8/share/man/man5/ (props changed) Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Sat Apr 17 04:19:18 2010 (r206744) +++ stable/8/share/man/man5/rc.conf.5 Sat Apr 17 04:54:38 2010 (r206745) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2009 +.Dd April 14, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -432,27 +432,11 @@ the kernel module will be loaded. See also .Va ipfilter_enable . -.It Va ipv6_firewall_enable -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_enable . -Set to -.Dq Li YES -to load IPv6 firewall rules at startup. -If the kernel was not built with -.Cd "options IPV6FIREWALL" , -the -.Pa ipfw.ko -kernel module will be loaded. .It Va firewall_script .Pq Vt str This variable specifies the full path to the firewall script to run. The default is .Pa /etc/rc.firewall . -.It Va ipv6_firewall_script -.Pq Vt str -The IPv6 equivalent of -.Va firewall_script . .It Va firewall_type .Pq Vt str Names the firewall type from the selection in @@ -476,19 +460,11 @@ basic protection for a LAN. .Pp If a filename is specified, the full path must be given. -.It Va ipv6_firewall_type -.Pq Vt str -The IPv6 equivalent of -.Va firewall_type . .It Va firewall_quiet .Pq Vt bool Set to .Dq Li YES to disable the display of firewall rules on the console during boot. -.It Va ipv6_firewall_quiet -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_quiet . .It Va firewall_logging .Pq Vt bool Set to @@ -497,10 +473,6 @@ to enable firewall event logging. This is equivalent to the .Dv IPFIREWALL_VERBOSE kernel option. -.It Va ipv6_firewall_logging -.Pq Vt bool -The IPv6 equivalent of -.Va firewall_logging . .It Va firewall_flags .Pq Vt str Flags passed to @@ -508,10 +480,6 @@ Flags passed to if .Va firewall_type specifies a filename. -.It Va ipv6_firewall_flags -.Pq Vt str -The IPv6 equivalent of -.Va firewall_flags . .It Va firewall_coscripts .Pq Vt str List of executables and/or rc scripts to run after firewall starts/stops. From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 07:20:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECDED106566B; Sat, 17 Apr 2010 07:20:01 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9D9D8FC12; Sat, 17 Apr 2010 07:20: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 o3H7K1c2085667; Sat, 17 Apr 2010 07:20:01 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H7K18m085656; Sat, 17 Apr 2010 07:20:01 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004170720.o3H7K18m085656@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Apr 2010 07:20: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: r206746 - 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: Sat, 17 Apr 2010 07:20:02 -0000 Author: jmallett Date: Sat Apr 17 07:20:01 2010 New Revision: 206746 URL: http://svn.freebsd.org/changeset/base/206746 Log: o) Add NPDEPG, like NPTEPG but for PDEs. o) Remove NBPG, PGOFSET and PGSHIFT. Use the standard names. o) Remove some unused macros and move things from param.h to vmparam.h that belong in the latter. (Actually, all of the kernel segment values, virtual addresses, etc., belong in one place, but this is a step in the right direction.) Modified: head/sys/mips/include/param.h head/sys/mips/include/pte.h head/sys/mips/include/vmparam.h head/sys/mips/mips/exception.S head/sys/mips/mips/genassym.c head/sys/mips/mips/locore.S head/sys/mips/mips/mpboot.S head/sys/mips/mips/pmap.c head/sys/mips/mips/support.S head/sys/mips/mips/tlb.S head/sys/mips/mips/trap.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/include/param.h ============================================================================== --- head/sys/mips/include/param.h Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/include/param.h Sat Apr 17 07:20:01 2010 (r206746) @@ -100,28 +100,14 @@ #define CACHE_LINE_SHIFT 6 #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) -#define NBPG 4096 /* bytes/page */ -#define PGOFSET (NBPG-1) /* byte offset into page */ -#define PGSHIFT 12 /* LOG2(NBPG) */ - #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ #define PAGE_SIZE (1<> PGSHIFT) - #define BLKDEV_IOSIZE 2048 /* xxx: Why is this 1/2 page? */ #define MAXDUMPPGS 1 /* xxx: why is this only one? */ @@ -137,8 +123,8 @@ #define UPAGES 2 /* pages ("clicks") (4096 bytes) to disk blocks */ -#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) -#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) +#define ctod(x) ((x) << (PAGE_SHIFT - DEV_BSHIFT)) +#define dtoc(x) ((x) >> (PAGE_SHIFT - DEV_BSHIFT)) /* * Map a ``block device block'' to a file system block. @@ -149,18 +135,18 @@ #define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) /* - * Conversion macros + * Mach derived conversion macros */ -#define mips_round_page(x) ((((unsigned long)(x)) + NBPG - 1) & ~(NBPG-1)) -#define mips_trunc_page(x) ((unsigned long)(x) & ~(NBPG-1)) -#define mips_btop(x) ((unsigned long)(x) >> PGSHIFT) -#define mips_ptob(x) ((unsigned long)(x) << PGSHIFT) -#define round_page mips_round_page -#define trunc_page mips_trunc_page -#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) -#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) +#define round_page(x) (((unsigned long)(x) + PAGE_MASK) & ~PAGE_MASK) +#define trunc_page(x) ((unsigned long)(x) & ~PAGE_MASK) + +#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) +#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) + +#define mips_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) +#define mips_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) -#define pgtok(x) ((x) * (PAGE_SIZE / 1024)) +#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) #ifndef _KERNEL #define DELAY(n) { register int N = (n); while (--N > 0); } Modified: head/sys/mips/include/pte.h ============================================================================== --- head/sys/mips/include/pte.h Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/include/pte.h Sat Apr 17 07:20:01 2010 (r206746) @@ -126,7 +126,7 @@ typedef pt_entry_t *pd_entry_t; #define pfn_to_vad(x) (((x) & PTE_FRAME) << PTE_SHIFT) /* User virtual to pte offset in page table */ -#define vad_to_pte_offset(adr) (((adr) >> PGSHIFT) & (NPTEPG -1)) +#define vad_to_pte_offset(adr) (((adr) >> PAGE_SHIFT) & (NPTEPG -1)) #define mips_pg_v(entry) ((entry) & PTE_V) #define mips_pg_wired(entry) ((entry) & PTE_WIRED) Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/include/vmparam.h Sat Apr 17 07:20:01 2010 (r206746) @@ -97,13 +97,19 @@ /* user/kernel map constants */ #define VM_MIN_ADDRESS ((vm_offset_t)0x00000000) +#define VM_MAX_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xffffffff) + +#define VM_MINUSER_ADDRESS ((vm_offset_t)0x00000000) #define VM_MAXUSER_ADDRESS ((vm_offset_t)0x80000000) #define VM_MAX_MMAP_ADDR VM_MAXUSER_ADDRESS -#define VM_MAX_ADDRESS ((vm_offset_t)0x80000000) #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xC0000000) -#define VM_KERNEL_WIRED_ADDR_END (VM_MIN_KERNEL_ADDRESS) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFC000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFC000) +#if 0 +#define KERNBASE (VM_MIN_KERNEL_ADDRESS) +#else +#define KERNBASE ((vm_offset_t)(intptr_t)(int32_t)0x80000000) +#endif /* * Disable superpage reservations. (not sure if this is right @@ -175,23 +181,8 @@ */ #define VM_NFREEORDER 9 -/* - * XXXMIPS: This values need to be changed!!! - */ -#if 0 -#define VM_MIN_ADDRESS ((vm_offset_t)0x0000000000010000) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)MIPS_KSEG0_START-1) -#define VM_MAX_ADDRESS ((vm_offset_t)0x0000000100000000) -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)MIPS_KSEG3_START) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)MIPS_KSEG3_END) -#define KERNBASE (VM_MIN_KERNEL_ADDRESS) - -/* virtual sizes (bytes) for various kernel submaps */ -#define VM_KMEM_SIZE (16*1024*1024) /* XXX ??? */ -#endif - -#define NBSEG 0x400000 /* bytes/segment */ -#define SEGOFSET (NBSEG-1) /* byte offset into segment */ #define SEGSHIFT 22 /* LOG2(NBSEG) */ +#define NBSEG (1 << SEGSHIFT) /* bytes/segment */ +#define SEGOFSET (NBSEG-1) /* byte offset into segment */ #endif /* !_MACHINE_VMPARAM_H_ */ Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/exception.S Sat Apr 17 07:20:01 2010 (r206746) @@ -158,7 +158,7 @@ MipsDoTLBMiss: lw k1, 0(k1) #08: k1=seg entry mfc0 k0, COP_0_BAD_VADDR #09: k0=bad address (again) beq k1, zero, 2f #0a: ==0 -- no page table - srl k0, PGSHIFT - 2 #0b: k0=VPN (aka va>>10) + srl k0, PAGE_SHIFT - 2 #0b: k0=VPN (aka va>>10) andi k0, k0, ((NPTEPG/2) - 1) << 3 #0c: k0=page tab offset #xxx mips64 unsafe? @@ -860,7 +860,7 @@ NLEAF(MipsTLBInvalidException) nop mfc0 k0, COP_0_BAD_VADDR - srl k0, PGSHIFT - 2 + srl k0, PAGE_SHIFT - 2 andi k0, 0xffc addu k1, k1, k0 @@ -944,7 +944,7 @@ tlb_insert_random: sll k1, k1, PAGE_SHIFT + 1 PTR_LA k0, _C_LABEL(pcpu_space) - addiu k0, (NBPG * 2) + addiu k0, (PAGE_SIZE * 2) addu k0, k0, k1 /* Modified: head/sys/mips/mips/genassym.c ============================================================================== --- head/sys/mips/mips/genassym.c Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/genassym.c Sat Apr 17 07:20:01 2010 (r206746) @@ -90,8 +90,7 @@ ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADD ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc)); ASSYM(SIGFPE, SIGFPE); ASSYM(PAGE_SHIFT, PAGE_SHIFT); -ASSYM(PGSHIFT, PGSHIFT); -ASSYM(NBPG, NBPG); +ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(SEGSHIFT, SEGSHIFT); ASSYM(NPTEPG, NPTEPG); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/locore.S Sat Apr 17 07:20:01 2010 (r206746) @@ -178,7 +178,7 @@ VECTOR(_locore, unknown) * Initialize stack and call machine startup. */ PTR_LA sp, _C_LABEL(pcpu_space) - addiu sp, (NBPG * 2) - CALLFRAME_SIZ + addiu sp, (PAGE_SIZE * 2) - CALLFRAME_SIZ sw zero, CALLFRAME_SIZ - 4(sp) # Zero out old ra for debugger sw zero, CALLFRAME_SIZ - 8(sp) # Zero out old fp for debugger Modified: head/sys/mips/mips/mpboot.S ============================================================================== --- head/sys/mips/mips/mpboot.S Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/mpboot.S Sat Apr 17 07:20:01 2010 (r206746) @@ -66,7 +66,7 @@ GLOBAL(mpentry) * Initialize stack and call machine startup */ PTR_LA sp, _C_LABEL(pcpu_space) - addiu sp, (NBPG * 2) - CALLFRAME_SIZ + addiu sp, (PAGE_SIZE * 2) - CALLFRAME_SIZ sll t0, s0, PAGE_SHIFT + 1 addu sp, sp, t0 Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/pmap.c Sat Apr 17 07:20:01 2010 (r206746) @@ -609,7 +609,7 @@ pmap_invalidate_page_action(void *arg) pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; return; } - va = pmap_va_asid(pmap, (va & ~PGOFSET)); + va = pmap_va_asid(pmap, (va & ~PAGE_MASK)); mips_TBIS(va); } @@ -765,7 +765,7 @@ pmap_kremove(vm_offset_t va) /* * Write back all caches from the page being destroyed */ - mips_dcache_wbinv_range_index(va, NBPG); + mips_dcache_wbinv_range_index(va, PAGE_SIZE); pte = pmap_pte(kernel_pmap, va); *pte = PTE_G; @@ -1516,7 +1516,7 @@ pmap_remove_page(struct pmap *pmap, vm_o /* * Write back all caches from the page being destroyed */ - mips_dcache_wbinv_range_index(va, NBPG); + mips_dcache_wbinv_range_index(va, PAGE_SIZE); /* * get a local va for mappings for this pmap. @@ -1603,7 +1603,7 @@ pmap_remove_all(vm_page_t m) * the page being destroyed */ if (m->md.pv_list_count == 1) - mips_dcache_wbinv_range_index(pv->pv_va, NBPG); + mips_dcache_wbinv_range_index(pv->pv_va, PAGE_SIZE); pv->pv_pmap->pm_stats.resident_count--; @@ -1902,8 +1902,8 @@ validate: */ if (!is_kernel_pmap(pmap) && (pmap == &curproc->p_vmspace->vm_pmap) && (prot & VM_PROT_EXECUTE)) { - mips_icache_sync_range(va, NBPG); - mips_dcache_wbinv_range(va, NBPG); + mips_icache_sync_range(va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); } vm_page_unlock_queues(); PMAP_UNLOCK(pmap); @@ -2032,8 +2032,8 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ * unresolvable TLB miss may occur. */ if (pmap == &curproc->p_vmspace->vm_pmap) { va &= ~PAGE_MASK; - mips_icache_sync_range(va, NBPG); - mips_dcache_wbinv_range(va, NBPG); + mips_icache_sync_range(va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); } } return (mpte); @@ -3078,7 +3078,7 @@ pmap_flush_pvcache(vm_page_t m) if (m != NULL) { for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = TAILQ_NEXT(pv, pv_list)) { - mips_dcache_wbinv_range_index(pv->pv_va, NBPG); + mips_dcache_wbinv_range_index(pv->pv_va, PAGE_SIZE); } } } Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/support.S Sat Apr 17 07:20:01 2010 (r206746) @@ -210,7 +210,7 @@ END(fillw) * mem_zero_page(addr); */ LEAF(mem_zero_page) - li v0, NBPG + li v0, PAGE_SIZE 1: subu v0, 8 sd zero, 0(a0) Modified: head/sys/mips/mips/tlb.S ============================================================================== --- head/sys/mips/mips/tlb.S Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/tlb.S Sat Apr 17 07:20:01 2010 (r206746) @@ -240,7 +240,7 @@ LEAF(Mips_TLBFlush) # MIPS_KSEG0_START + 2 * i * PAGE_SIZE; # One bogus value for every TLB entry might cause MCHECK exception # - sll t3, t1, PGSHIFT + 1 + sll t3, t1, PAGE_SHIFT + 1 li v0, MIPS_KSEG0_START # invalid address addu v0, t3 /* @@ -299,7 +299,7 @@ LEAF(Mips_TLBFlushAddr) # address calculated by following expression: # MIPS_KSEG0_START + 2 * i * PAGE_SIZE; # One bogus value for every TLB entry might cause MCHECK exception - sll v0, PGSHIFT + 1 + sll v0, PAGE_SHIFT + 1 addu t1, v0 _MTC0 t1, COP_0_TLB_HI # Mark entry high as invalid @@ -482,7 +482,7 @@ LEAF(mips_TBIAP) # MIPS_KSEG0_START + 2 * i * PAGE_SIZE; # One bogus value for every TLB entry might cause MCHECK exception # - sll t3, t1, PGSHIFT + 1 + sll t3, t1, PAGE_SHIFT + 1 li v0, MIPS_KSEG0_START # invalid address addu v0, t3 @@ -507,7 +507,7 @@ LEAF(mips_TBIAP) tlbwi # invalidate the TLB entry 2: addu t1, t1, 1 - addu v0, 1 << (PGSHIFT + 1) + addu v0, 1 << (PAGE_SHIFT + 1) bne t1, t2, 1b nop Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/trap.c Sat Apr 17 07:20:01 2010 (r206746) @@ -378,12 +378,12 @@ trap(struct trapframe *trapframe) if (!(pte = pmap_segmap(kernel_pmap, trapframe->badvaddr))) panic("trap: ktlbmod: invalid segmap"); - pte += (trapframe->badvaddr >> PGSHIFT) & (NPTEPG - 1); + pte += (trapframe->badvaddr >> PAGE_SHIFT) & (NPTEPG - 1); entry = *pte; #ifdef SMP /* It is possible that some other CPU changed m-bit */ if (!mips_pg_v(entry) || (entry & mips_pg_m_bit())) { - trapframe->badvaddr &= ~PGOFSET; + trapframe->badvaddr &= ~PAGE_MASK; pmap_update_page(kernel_pmap, trapframe->badvaddr, entry); PMAP_UNLOCK(kernel_pmap); @@ -401,7 +401,7 @@ trap(struct trapframe *trapframe) } entry |= mips_pg_m_bit(); *pte = entry; - trapframe->badvaddr &= ~PGOFSET; + trapframe->badvaddr &= ~PAGE_MASK; pmap_update_page(kernel_pmap, trapframe->badvaddr, entry); pa = mips_tlbpfn_to_paddr(entry); if (!page_is_managed(pa)) @@ -421,12 +421,12 @@ trap(struct trapframe *trapframe) PMAP_LOCK(pmap); if (!(pte = pmap_segmap(pmap, trapframe->badvaddr))) panic("trap: utlbmod: invalid segmap"); - pte += (trapframe->badvaddr >> PGSHIFT) & (NPTEPG - 1); + pte += (trapframe->badvaddr >> PAGE_SHIFT) & (NPTEPG - 1); entry = *pte; #ifdef SMP /* It is possible that some other CPU changed m-bit */ if (!mips_pg_v(entry) || (entry & mips_pg_m_bit())) { - trapframe->badvaddr = (trapframe->badvaddr & ~PGOFSET); + trapframe->badvaddr = (trapframe->badvaddr & ~PAGE_MASK); pmap_update_page(pmap, trapframe->badvaddr, entry); PMAP_UNLOCK(pmap); goto out; @@ -445,7 +445,7 @@ trap(struct trapframe *trapframe) } entry |= mips_pg_m_bit(); *pte = entry; - trapframe->badvaddr = (trapframe->badvaddr & ~PGOFSET); + trapframe->badvaddr = (trapframe->badvaddr & ~PAGE_MASK); pmap_update_page(pmap, trapframe->badvaddr, entry); trapframe->badvaddr |= (pmap->pm_asid[PCPU_GET(cpuid)].asid << VMTLB_PID_SHIFT); pa = mips_tlbpfn_to_paddr(entry); Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Sat Apr 17 04:54:38 2010 (r206745) +++ head/sys/mips/mips/vm_machdep.c Sat Apr 17 07:20:01 2010 (r206746) @@ -219,7 +219,7 @@ cpu_thread_swapin(struct thread *td) */ if (!(pte = pmap_segmap(kernel_pmap, td->td_md.md_realstack))) panic("cpu_thread_swapin: invalid segmap"); - pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); + pte += ((vm_offset_t)td->td_md.md_realstack >> PAGE_SHIFT) & (NPTEPG - 1); for (i = 0; i < KSTACK_PAGES - 1; i++) { td->td_md.md_upte[i] = *pte & ~(PTE_RO|PTE_WIRED); @@ -249,7 +249,7 @@ cpu_thread_alloc(struct thread *td) if (!(pte = pmap_segmap(kernel_pmap, td->td_md.md_realstack))) panic("cpu_thread_alloc: invalid segmap"); - pte += ((vm_offset_t)td->td_md.md_realstack >> PGSHIFT) & (NPTEPG - 1); + pte += ((vm_offset_t)td->td_md.md_realstack >> PAGE_SHIFT) & (NPTEPG - 1); for (i = 0; i < KSTACK_PAGES - 1; i++) { td->td_md.md_upte[i] = *pte & ~(PTE_RO|PTE_WIRED); From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 07:38:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 544A11065673; Sat, 17 Apr 2010 07:38:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43A628FC1E; Sat, 17 Apr 2010 07:38: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 o3H7cLUq089766; Sat, 17 Apr 2010 07:38:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H7cLoH089763; Sat, 17 Apr 2010 07:38:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004170738.o3H7cLoH089763@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 17 Apr 2010 07:38:21 +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: r206747 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 07:38:21 -0000 Author: bz Date: Sat Apr 17 07:38:20 2010 New Revision: 206747 URL: http://svn.freebsd.org/changeset/base/206747 Log: Welcome Ana Kukec (anchie@) as our new src comitter. I'll be her mentor. Ana has worked on SeND for GSoC 2009 and is generally interested and involved in IETF work on various IPv6 topics. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat Apr 17 07:20:01 2010 (r206746) +++ svnadmin/conf/access Sat Apr 17 07:38:20 2010 (r206747) @@ -22,6 +22,7 @@ akiyama alc alfred ambrisko +anchie andre antoine ariff Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sat Apr 17 07:20:01 2010 (r206746) +++ svnadmin/conf/mentors Sat Apr 17 07:38:20 2010 (r206747) @@ -10,6 +10,7 @@ # Sort by mentee login name. # Mentee Mentor Optional comment +anchie bz brucec rrs bschmidt rpaulo Co-mentor: thompsa cbzimmer sam From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 09:37:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968E0106564A; Sat, 17 Apr 2010 09:37:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85BE88FC15; Sat, 17 Apr 2010 09:37: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 o3H9b8eN016078; Sat, 17 Apr 2010 09:37:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H9b8X6016076; Sat, 17 Apr 2010 09:37:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004170937.o3H9b8X6016076@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 17 Apr 2010 09:37: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: r206748 - 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, 17 Apr 2010 09:37:08 -0000 Author: kib Date: Sat Apr 17 09:37:08 2010 New Revision: 206748 URL: http://svn.freebsd.org/changeset/base/206748 Log: MFC r206623: ld_gs_base is executing with stack containing only the frame, temporary pushed %rflags has been popped already. 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) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Sat Apr 17 07:38:20 2010 (r206747) +++ stable/8/sys/amd64/amd64/exception.S Sat Apr 17 09:37:08 2010 (r206748) @@ -815,7 +815,6 @@ fsbase_load_fault: ALIGN_TEXT .globl gsbase_load_fault gsbase_load_fault: - popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) movq %rsp, %rdi call trap From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 09:42:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56759106564A; Sat, 17 Apr 2010 09:42:07 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E518FC0C; Sat, 17 Apr 2010 09:42: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 o3H9g7KN017265; Sat, 17 Apr 2010 09:42:07 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3H9g7cF017258; Sat, 17 Apr 2010 09:42:07 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004170942.o3H9g7cF017258@svn.freebsd.org> From: Juli Mallett Date: Sat, 17 Apr 2010 09:42: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: r206749 - 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: Sat, 17 Apr 2010 09:42:07 -0000 Author: jmallett Date: Sat Apr 17 09:42:07 2010 New Revision: 206749 URL: http://svn.freebsd.org/changeset/base/206749 Log: o) Make pcb_onfault a pointer rather than an obscure integer value. o) Mask off PAGE_MASK bits in pmap_update_page, etc., rather than modifying the badvaddr in trapframe. Some nearby interfaces already did this. o) Make PTEs "unsigned int" for now, not "unsigned long" -- we are only ready for them to be 32-bit on 64-bit platforms. o) Rather than using pmap_segmap and calculating the offset into the page table by hand in trap.c, use pmap_pte(). o) Remove unused quad_syscall variable in trap.c. o) Log things for illegal instructions like we do for bad page faults. o) Various cast cleanups related to how to print registers. o) When logging page faults, show the page table information not just for the program counter, but for the fault address. o) Modify support.S to use ABI-neutral macros for operating on pointers. o) Consistently use CALLFRAME_SIZ rather than STAND_FRAME_SIZE, etc. o) Remove unused insque/remque functions. o) Remove some coprocessor 0 accessor functions implemented in assembly that are unused and have inline assembly counterparts. Modified: head/sys/mips/include/cpu.h head/sys/mips/include/pcb.h head/sys/mips/include/pte.h head/sys/mips/mips/pmap.c head/sys/mips/mips/support.S head/sys/mips/mips/trap.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sat Apr 17 09:37:08 2010 (r206748) +++ head/sys/mips/include/cpu.h Sat Apr 17 09:42:07 2010 (r206749) @@ -458,13 +458,9 @@ extern union cpuprid fpu_id; struct tlb; struct user; -u_int32_t mips_cp0_config1_read(void); int Mips_ConfigCache(void); void Mips_SetWIRED(int); void Mips_SetPID(int); -u_int Mips_GetCOUNT(void); -void Mips_SetCOMPARE(u_int); -u_int Mips_GetCOMPARE(void); void Mips_SyncCache(void); void Mips_SyncDCache(vm_offset_t, int); Modified: head/sys/mips/include/pcb.h ============================================================================== --- head/sys/mips/include/pcb.h Sat Apr 17 09:37:08 2010 (r206748) +++ head/sys/mips/include/pcb.h Sat Apr 17 09:42:07 2010 (r206749) @@ -51,7 +51,7 @@ struct pcb { struct trapframe pcb_regs; /* saved CPU and registers */ __register_t pcb_context[14]; /* kernel context for resume */ - int pcb_onfault; /* for copyin/copyout faults */ + void *pcb_onfault; /* for copyin/copyout faults */ register_t pcb_tpc; }; Modified: head/sys/mips/include/pte.h ============================================================================== --- head/sys/mips/include/pte.h Sat Apr 17 09:37:08 2010 (r206748) +++ head/sys/mips/include/pte.h Sat Apr 17 09:42:07 2010 (r206749) @@ -83,7 +83,7 @@ struct tlb { int tlb_lo1; }; -typedef unsigned long pt_entry_t; +typedef unsigned int pt_entry_t; typedef pt_entry_t *pd_entry_t; #define PDESIZE sizeof(pd_entry_t) /* for assembly files */ Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Apr 17 09:37:08 2010 (r206748) +++ head/sys/mips/mips/pmap.c Sat Apr 17 09:42:07 2010 (r206749) @@ -660,7 +660,7 @@ pmap_update_page_action(void *arg) pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; return; } - va = pmap_va_asid(pmap, va); + va = pmap_va_asid(pmap, (va & ~PAGE_MASK)); MachTLBUpdate(va, pte); } @@ -669,6 +669,8 @@ pmap_TLB_update_kernel(vm_offset_t va, p { u_int32_t pid; + va &= ~PAGE_MASK; + MachTLBGetPID(pid); va = va | (pid << VMTLB_PID_SHIFT); @@ -1885,7 +1887,7 @@ validate: if (origpte & PTE_M) { KASSERT((origpte & PTE_RW), ("pmap_enter: modified page not writable:" - " va: %p, pte: 0x%lx", (void *)va, origpte)); + " va: %p, pte: 0x%x", (void *)va, origpte)); if (page_is_managed(opa)) vm_page_dirty(om); } @@ -2381,7 +2383,7 @@ pmap_remove_pages(pmap_t pmap) m = PHYS_TO_VM_PAGE(mips_tlbpfn_to_paddr(tpte)); KASSERT(m < &vm_page_array[vm_page_array_size], - ("pmap_remove_pages: bad tpte %lx", tpte)); + ("pmap_remove_pages: bad tpte %x", tpte)); pv->pv_pmap->pm_stats.resident_count--; Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Sat Apr 17 09:37:08 2010 (r206748) +++ head/sys/mips/mips/support.S Sat Apr 17 09:42:07 2010 (r206749) @@ -103,47 +103,22 @@ * Primitives */ -/* - * This table is indexed by u.u_pcb.pcb_onfault in trap(). - * The reason for using this table rather than storing an address in - * u.u_pcb.pcb_onfault is simply to make the code faster. - */ - .globl onfault_table - .data - .align 3 -onfault_table: - .word 0 # invalid index number -#define BADERR 1 - .word baderr -#define COPYERR 2 - .word copyerr -#define FSWBERR 3 - .word fswberr -#define FSWINTRBERR 4 - .word fswintrberr -#if defined(DDB) || defined(DEBUG) -#define DDBERR 5 - .word ddberr -#else - .word 0 -#endif - .text /* * See if access to addr with a len type instruction causes a machine check. - * len is length of access (1=byte, 2=short, 4=long) + * len is length of access (1=byte, 2=short, 4=int) * * badaddr(addr, len) * char *addr; * int len; */ LEAF(badaddr) - li v0, BADERR + PTR_LA v0, baderr GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) + PTR_L v1, PC_CURPCB(v1) bne a1, 1, 2f - sw v0, U_PCB_ONFAULT(v1) + PTR_S v0, U_PCB_ONFAULT(v1) b 5f lbu v0, (a0) 2: @@ -154,7 +129,7 @@ LEAF(badaddr) 4: lw v0, (a0) 5: - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra move v0, zero # made it w/o errors baderr: @@ -169,24 +144,24 @@ END(badaddr) * string is too long, return ENAMETOOLONG; else return 0. */ LEAF(copystr) - move t0, a2 - beq a2, zero, 4f + move t0, a2 + beq a2, zero, 4f 1: - lbu v0, 0(a0) - subu a2, a2, 1 - beq v0, zero, 2f - sb v0, 0(a1) # each byte until NIL - addu a0, a0, 1 - bne a2, zero, 1b # less than maxlen - addu a1, a1, 1 + lbu v0, 0(a0) + PTR_SUBU a2, a2, 1 + beq v0, zero, 2f + sb v0, 0(a1) # each byte until NIL + PTR_ADDU a0, a0, 1 + bne a2, zero, 1b # less than maxlen + PTR_ADDU a1, a1, 1 4: - li v0, ENAMETOOLONG # run out of space + li v0, ENAMETOOLONG # run out of space 2: - beq a3, zero, 3f # return num. of copied bytes - subu a2, t0, a2 # if the 4th arg was non-NULL - sw a2, 0(a3) + beq a3, zero, 3f # return num. of copied bytes + PTR_SUBU a2, t0, a2 # if the 4th arg was non-NULL + PTR_S a2, 0(a3) 3: - j ra # v0 is 0 or ENAMETOOLONG + j ra # v0 is 0 or ENAMETOOLONG nop END(copystr) @@ -196,12 +171,12 @@ END(copystr) */ LEAF(fillw) 1: - addiu a2, a2, -1 - sh a0, 0(a1) - bne a2,zero, 1b - addiu a1, a1, 2 + PTR_ADDU a2, a2, -1 + sh a0, 0(a1) + bne a2,zero, 1b + PTR_ADDU a1, a1, 2 - jr ra + jr ra nop END(fillw) @@ -210,13 +185,13 @@ END(fillw) * mem_zero_page(addr); */ LEAF(mem_zero_page) - li v0, PAGE_SIZE + li v0, PAGE_SIZE 1: - subu v0, 8 - sd zero, 0(a0) - bne zero, v0, 1b - addu a0, 8 - jr ra + PTR_SUBU v0, 8 + sd zero, 0(a0) + bne zero, v0, 1b + PTR_ADDU a0, 8 + jr ra nop END(mem_zero_page) @@ -228,56 +203,56 @@ END(mem_zero_page) * a2 = count */ LEAF(insb) - beq a2, zero, 2f - addu a2, a1 + beq a2, zero, 2f + PTR_ADDU a2, a1 1: - lbu v0, 0(a0) - addiu a1, 1 - bne a1, a2, 1b - sb v0, -1(a1) + lbu v0, 0(a0) + PTR_ADDU a1, 1 + bne a1, a2, 1b + sb v0, -1(a1) 2: - jr ra + jr ra nop END(insb) LEAF(insw) - beq a2, zero, 2f - addu a2, a2 - addu a2, a1 -1: - lhu v0, 0(a0) - addiu a1, 2 - bne a1, a2, 1b - sh v0, -2(a1) + beq a2, zero, 2f + PTR_ADDU a2, a2 + PTR_ADDU a2, a1 +1: + lhu v0, 0(a0) + PTR_ADDU a1, 2 + bne a1, a2, 1b + sh v0, -2(a1) 2: - jr ra + jr ra nop END(insw) LEAF(insl) - beq a2, zero, 2f - sll a2, 2 - addu a2, a1 -1: - lw v0, 0(a0) - addiu a1, 4 - bne a1, a2, 1b - sw v0, -4(a1) + beq a2, zero, 2f + sll a2, 2 + PTR_ADDU a2, a1 +1: + lw v0, 0(a0) + PTR_ADDU a1, 4 + bne a1, a2, 1b + sw v0, -4(a1) 2: - jr ra + jr ra nop END(insl) LEAF(outsb) - beq a2, zero, 2f - addu a2, a1 + beq a2, zero, 2f + PTR_ADDU a2, a1 1: - lbu v0, 0(a1) - addiu a1, 1 - bne a1, a2, 1b - sb v0, 0(a0) + lbu v0, 0(a1) + PTR_ADDU a1, 1 + bne a1, a2, 1b + sb v0, 0(a0) 2: - jr ra + jr ra nop END(outsb) @@ -343,22 +318,22 @@ END(outsl) * u_int maxlength; * u_int *lencopied; */ -NON_LEAF(copyinstr, STAND_FRAME_SIZE, ra) - subu sp, sp, STAND_FRAME_SIZE - .mask 0x80000000, (STAND_RA_OFFSET - STAND_FRAME_SIZE) - sw ra, STAND_RA_OFFSET(sp) +NON_LEAF(copyinstr, CALLFRAME_SIZ, ra) + PTR_SUBU sp, sp, CALLFRAME_SIZ + .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) + PTR_LA v0, copyerr blt a0, zero, _C_LABEL(copyerr) # make sure address is in user space - li v0, COPYERR + REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) + PTR_L v1, PC_CURPCB(v1) jal _C_LABEL(copystr) - sw v0, U_PCB_ONFAULT(v1) - lw ra, STAND_RA_OFFSET(sp) + PTR_S v0, U_PCB_ONFAULT(v1) + REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw zero, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra - addu sp, sp, STAND_FRAME_SIZE + PTR_ADDU sp, sp, CALLFRAME_SIZ END(copyinstr) /* @@ -371,22 +346,22 @@ END(copyinstr) * u_int maxlength; * u_int *lencopied; */ -NON_LEAF(copyoutstr, STAND_FRAME_SIZE, ra) - subu sp, sp, STAND_FRAME_SIZE - .mask 0x80000000, (STAND_RA_OFFSET - STAND_FRAME_SIZE) - sw ra, STAND_RA_OFFSET(sp) +NON_LEAF(copyoutstr, CALLFRAME_SIZ, ra) + PTR_SUBU sp, sp, CALLFRAME_SIZ + .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) + PTR_LA v0, copyerr blt a1, zero, _C_LABEL(copyerr) # make sure address is in user space - li v0, COPYERR + REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) + PTR_L v1, PC_CURPCB(v1) jal _C_LABEL(copystr) - sw v0, U_PCB_ONFAULT(v1) - lw ra, STAND_RA_OFFSET(sp) + PTR_S v0, U_PCB_ONFAULT(v1) + REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw zero, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra - addu sp, sp, STAND_FRAME_SIZE + PTR_ADDU sp, sp, CALLFRAME_SIZ END(copyoutstr) /* @@ -396,21 +371,21 @@ END(copyoutstr) * caddr_t *to; (kernel destination address) * unsigned len; */ -NON_LEAF(copyin, STAND_FRAME_SIZE, ra) - subu sp, sp, STAND_FRAME_SIZE - .mask 0x80000000, (STAND_RA_OFFSET - STAND_FRAME_SIZE) - sw ra, STAND_RA_OFFSET(sp) +NON_LEAF(copyin, CALLFRAME_SIZ, ra) + PTR_SUBU sp, sp, CALLFRAME_SIZ + .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) + PTR_LA v0, copyerr blt a0, zero, _C_LABEL(copyerr) # make sure address is in user space - li v0, COPYERR + REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) + PTR_L v1, PC_CURPCB(v1) jal _C_LABEL(bcopy) - sw v0, U_PCB_ONFAULT(v1) - lw ra, STAND_RA_OFFSET(sp) + PTR_S v0, U_PCB_ONFAULT(v1) + REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) # bcopy modified v1, so reload - sw zero, U_PCB_ONFAULT(v1) - addu sp, sp, STAND_FRAME_SIZE + PTR_L v1, PC_CURPCB(v1) # bcopy modified v1, so reload + PTR_S zero, U_PCB_ONFAULT(v1) + PTR_ADDU sp, sp, CALLFRAME_SIZ j ra move v0, zero END(copyin) @@ -422,31 +397,28 @@ END(copyin) * caddr_t *to; (user destination address) * unsigned len; */ -NON_LEAF(copyout, STAND_FRAME_SIZE, ra) - subu sp, sp, STAND_FRAME_SIZE - .mask 0x80000000, (STAND_RA_OFFSET - STAND_FRAME_SIZE) - sw ra, STAND_RA_OFFSET(sp) +NON_LEAF(copyout, CALLFRAME_SIZ, ra) + PTR_SUBU sp, sp, CALLFRAME_SIZ + .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) + PTR_LA v0, copyerr blt a1, zero, _C_LABEL(copyerr) # make sure address is in user space - li v0, COPYERR + REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) + PTR_L v1, PC_CURPCB(v1) jal _C_LABEL(bcopy) - sw v0, U_PCB_ONFAULT(v1) - lw ra, STAND_RA_OFFSET(sp) + PTR_S v0, U_PCB_ONFAULT(v1) + REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) # bcopy modified v1, so reload - sw zero, U_PCB_ONFAULT(v1) - addu sp, sp, STAND_FRAME_SIZE + PTR_L v1, PC_CURPCB(v1) # bcopy modified v1, so reload + PTR_S zero, U_PCB_ONFAULT(v1) + PTR_ADDU sp, sp, CALLFRAME_SIZ j ra move v0, zero END(copyout) LEAF(copyerr) - lw ra, STAND_RA_OFFSET(sp) - GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw zero, U_PCB_ONFAULT(v1) - addu sp, sp, STAND_FRAME_SIZE + REG_L ra, CALLFRAME_RA(sp) + PTR_ADDU sp, sp, CALLFRAME_SIZ j ra li v0, EFAULT # return error END(copyerr) @@ -460,51 +432,55 @@ END(copyerr) LEAF(fuword) ALEAF(fuword32) ALEAF(fuiword) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) lw v0, 0(a0) # fetch word j ra - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) END(fuword) LEAF(fusword) ALEAF(fuisword) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) lhu v0, 0(a0) # fetch short j ra - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) END(fusword) LEAF(fubyte) ALEAF(fuibyte) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) lbu v0, 0(a0) # fetch byte j ra - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) END(fubyte) LEAF(suword32) #ifndef __mips_n64 XLEAF(suword) #endif + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) sw a1, 0(a0) # store word - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra move v0, zero END(suword32) @@ -512,13 +488,14 @@ END(suword32) #ifdef __mips_n64 LEAF(suword64) XLEAF(suword) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) sd a1, 0(a0) # store word - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra move v0, zero END(suword64) @@ -537,11 +514,12 @@ LEAF(casuword32) #ifndef __mips_n64 XLEAF(casuword) #endif + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) 1: move t0, a2 ll v0, 0(a0) @@ -555,7 +533,7 @@ XLEAF(casuword) 2: li v0, -1 3: - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) jr ra nop END(casuword32) @@ -563,11 +541,12 @@ END(casuword32) #ifdef __mips_n64 LEAF(casuword64) XLEAF(casuword) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) 1: move t0, a2 lld v0, 0(a0) @@ -581,7 +560,7 @@ XLEAF(casuword) 2: li v0, -1 3: - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) jr ra nop END(casuword64) @@ -593,13 +572,14 @@ END(casuword64) * Have to flush instruction cache afterwards. */ LEAF(suiword) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) sw a1, 0(a0) # store word - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j _C_LABEL(Mips_SyncICache) # FlushICache sets v0 = 0. (Ugly) li a1, 4 # size of word END(suiword) @@ -610,26 +590,28 @@ END(suiword) */ LEAF(susword) ALEAF(suisword) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) sh a1, 0(a0) # store short - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra move v0, zero END(susword) LEAF(subyte) ALEAF(suibyte) + PTR_LA v0, fswberr blt a0, zero, fswberr # make sure address is in user space - li v0, FSWBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) sb a1, 0(a0) # store byte - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra move v0, zero END(subyte) @@ -645,24 +627,26 @@ END(fswberr) * The important thing is to prevent sleep() and switch(). */ LEAF(fuswintr) + PTR_LA v0, fswintrberr blt a0, zero, fswintrberr # make sure address is in user space - li v0, FSWINTRBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) lhu v0, 0(a0) # fetch short j ra - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) END(fuswintr) LEAF(suswintr) + PTR_LA v0, fswintrberr blt a0, zero, fswintrberr # make sure address is in user space - li v0, FSWINTRBERR + nop GET_CPU_PCPU(v1) - lw v1, PC_CURPCB(v1) - sw v0, U_PCB_ONFAULT(v1) + PTR_L v1, PC_CURPCB(v1) + PTR_S v0, U_PCB_ONFAULT(v1) sh a1, 0(a0) # store short - sw zero, U_PCB_ONFAULT(v1) + PTR_S zero, U_PCB_ONFAULT(v1) j ra move v0, zero END(suswintr) @@ -673,111 +657,6 @@ LEAF(fswintrberr) END(fswintrberr) /* - * Insert 'p' after 'q'. - * _insque(p, q) - * caddr_t p, q; - */ -LEAF(_insque) - lw v0, 0(a1) # v0 = q->next - sw a1, 4(a0) # p->prev = q - sw v0, 0(a0) # p->next = q->next - sw a0, 4(v0) # q->next->prev = p - j ra - sw a0, 0(a1) # q->next = p -END(_insque) - -/* - * Remove item 'p' from queue. - * _remque(p) - * caddr_t p; - */ -LEAF(_remque) - lw v0, 0(a0) # v0 = p->next - lw v1, 4(a0) # v1 = p->prev - nop - sw v0, 0(v1) # p->prev->next = p->next - j ra - sw v1, 4(v0) # p->next->prev = p->prev -END(_remque) - -/*-------------------------------------------------------------------------- - * - * Mips_GetCOUNT -- - * - * Mips_GetCOUNT() - * - * Results: - * Returns the current COUNT reg. - * - * Side effects: - * None. - * - *-------------------------------------------------------------------------- - */ -LEAF(Mips_GetCOUNT) - mfc0 v0, COP_0_COUNT - nop #??? - nop #??? - j ra - nop -END(Mips_GetCOUNT) - -/*-------------------------------------------------------------------------- - * - * Mips_SetCOMPARE -- - * - * Mips_SetCOMPARE() - * - * Results: - * Sets a new value to the COMPARE register. - * - * Side effects: - * The COMPARE equal interrupt is acknowledged. - * - *-------------------------------------------------------------------------- - */ -LEAF(Mips_SetCOMPARE) - mtc0 a0, COP_0_COMPARE - j ra - nop -END(Mips_SetCOMPARE) - -LEAF(Mips_GetCOMPARE) - mfc0 v0, COP_0_COMPARE - j ra - nop -END(Mips_GetCOMPARE) - -/* - * u_int32_t mips_cp0_status_read(void) - * - * Return the current value of the CP0 Status register. - */ -LEAF(mips_cp0_status_read) - mfc0 v0, COP_0_STATUS_REG - j ra - nop -END(mips_cp0_status_read) - -/* - * void mips_cp0_status_write(u_int32_t) - * - * Set the value of the CP0 Status register. - * - * Note: This is almost certainly not the way you want to write a - * "permanent" value to to the CP0 Status register, since it gets - * saved in trap frames and restores. - */ -LEAF(mips_cp0_status_write) - mtc0 a0, COP_0_STATUS_REG - nop - nop - j ra - nop -END(mips_cp0_status_write) - - -/* * memcpy(to, from, len) * {ov}bcopy(from, to, len) */ @@ -789,7 +668,7 @@ LEAF(memcpy) ALEAF(bcopy) ALEAF(ovbcopy) .set noreorder - addu t0, a0, a2 # t0 = end of s1 region + PTR_ADDU t0, a0, a2 # t0 = end of s1 region sltu t1, a1, t0 sltu t2, a0, a1 and t1, t1, t2 # t1 = true if from < to < (from+len) @@ -797,11 +676,11 @@ ALEAF(ovbcopy) slt t2, a2, 12 # check for small copy ble a2, zero, 2f - addu t1, a1, a2 # t1 = end of to region + PTR_ADDU t1, a1, a2 # t1 = end of to region 1: lb v1, -1(t0) # copy bytes backwards, - subu t0, t0, 1 # doesnt happen often so do slow way - subu t1, t1, 1 + PTR_SUBU t0, t0, 1 # doesnt happen often so do slow way + PTR_SUBU t1, t1, 1 bne t0, a0, 1b sb v1, 0(t1) 2: @@ -811,59 +690,59 @@ forward: bne t2, zero, smallcpy # do a small bcopy xor v1, a0, a1 # compare low two bits of addresses and v1, v1, 3 - subu a3, zero, a1 # compute # bytes to word align address + PTR_SUBU a3, zero, a1 # compute # bytes to word align address beq v1, zero, aligned # addresses can be word aligned and a3, a3, 3 beq a3, zero, 1f - subu a2, a2, a3 # subtract from remaining count + PTR_SUBU a2, a2, a3 # subtract from remaining count LWHI v1, 0(a0) # get next 4 bytes (unaligned) LWLO v1, 3(a0) - addu a0, a0, a3 + PTR_ADDU a0, a0, a3 SWHI v1, 0(a1) # store 1, 2, or 3 bytes to align a1 - addu a1, a1, a3 + PTR_ADDU a1, a1, a3 1: and v1, a2, 3 # compute number of words left - subu a3, a2, v1 + PTR_SUBU a3, a2, v1 move a2, v1 - addu a3, a3, a0 # compute ending address + PTR_ADDU a3, a3, a0 # compute ending address 2: LWHI v1, 0(a0) # copy words a0 unaligned, a1 aligned LWLO v1, 3(a0) - addu a0, a0, 4 + PTR_ADDU a0, a0, 4 sw v1, 0(a1) - addu a1, a1, 4 + PTR_ADDU a1, a1, 4 bne a0, a3, 2b nop # We have to do this mmu-bug. b smallcpy nop aligned: beq a3, zero, 1f - subu a2, a2, a3 # subtract from remaining count + PTR_SUBU a2, a2, a3 # subtract from remaining count LWHI v1, 0(a0) # copy 1, 2, or 3 bytes to align - addu a0, a0, a3 + PTR_ADDU a0, a0, a3 SWHI v1, 0(a1) - addu a1, a1, a3 + PTR_ADDU a1, a1, a3 1: and v1, a2, 3 # compute number of whole words left - subu a3, a2, v1 + PTR_SUBU a3, a2, v1 move a2, v1 - addu a3, a3, a0 # compute ending address + PTR_ADDU a3, a3, a0 # compute ending address 2: lw v1, 0(a0) # copy words - addu a0, a0, 4 + PTR_ADDU a0, a0, 4 sw v1, 0(a1) bne a0, a3, 2b - addu a1, a1, 4 + PTR_ADDU a1, a1, 4 smallcpy: ble a2, zero, 2f - addu a3, a2, a0 # compute ending address + PTR_ADDU a3, a2, a0 # compute ending address 1: lbu v1, 0(a0) # copy bytes - addu a0, a0, 1 + PTR_ADDU a0, a0, 1 sb v1, 0(a1) bne a0, a3, 1b - addu a1, a1, 1 # MMU BUG ? can not do -1(a1) at 0x80000000!! + PTR_ADDU a1, a1, 1 # MMU BUG ? can not do -1(a1) at 0x80000000!! 2: j ra nop @@ -883,19 +762,19 @@ LEAF(memset) sll t2, t1, 16 # shift that left 16 or t1, t2, t1 # or together - subu t0, zero, a0 # compute # bytes to word align address + PTR_SUBU t0, zero, a0 # compute # bytes to word align address and t0, t0, 3 beq t0, zero, 1f # skip if word aligned - subu a2, a2, t0 # subtract from remaining count + PTR_SUBU a2, a2, t0 # subtract from remaining count SWHI t1, 0(a0) # store 1, 2, or 3 bytes to align - addu a0, a0, t0 + PTR_ADDU a0, a0, t0 1: and v1, a2, 3 # compute number of whole words left - subu t0, a2, v1 - subu a2, a2, t0 - addu t0, t0, a0 # compute ending address + PTR_SUBU t0, a2, v1 + PTR_SUBU a2, a2, t0 + PTR_ADDU t0, t0, a0 # compute ending address 2: - addu a0, a0, 4 # clear words + PTR_ADDU a0, a0, 4 # clear words #ifdef MIPS3_5900 nop nop @@ -907,9 +786,9 @@ LEAF(memset) memsetsmallclr: ble a2, zero, 2f - addu t0, a2, a0 # compute ending address + PTR_ADDU t0, a2, a0 # compute ending address 1: - addu a0, a0, 1 # clear bytes + PTR_ADDU a0, a0, 1 # clear bytes #ifdef MIPS3_5900 nop nop @@ -931,26 +810,26 @@ LEAF(bzero) ALEAF(blkclr) .set noreorder blt a1, 12, smallclr # small amount to clear? - subu a3, zero, a0 # compute # bytes to word align address + PTR_SUBU a3, zero, a0 # compute # bytes to word align address and a3, a3, 3 beq a3, zero, 1f # skip if word aligned - subu a1, a1, a3 # subtract from remaining count + PTR_SUBU a1, a1, a3 # subtract from remaining count SWHI zero, 0(a0) # clear 1, 2, or 3 bytes to align - addu a0, a0, a3 + PTR_ADDU a0, a0, a3 1: and v0, a1, 3 # compute number of words left - subu a3, a1, v0 + PTR_SUBU a3, a1, v0 move a1, v0 - addu a3, a3, a0 # compute ending address + PTR_ADDU a3, a3, a0 # compute ending address 2: - addu a0, a0, 4 # clear words + PTR_ADDU a0, a0, 4 # clear words bne a0, a3, 2b # unrolling loop does not help sw zero, -4(a0) # since we are limited by memory speed smallclr: ble a1, zero, 2f - addu a3, a1, a0 # compute ending address + PTR_ADDU a3, a1, a0 # compute ending address 1: - addu a0, a0, 1 # clear bytes + PTR_ADDU a0, a0, 1 # clear bytes bne a0, a3, 1b sb zero, -1(a0) 2: @@ -967,66 +846,66 @@ LEAF(bcmp) blt a2, 16, smallcmp # is it worth any trouble? xor v0, a0, a1 # compare low two bits of addresses and v0, v0, 3 - subu a3, zero, a1 # compute # bytes to word align address + PTR_SUBU a3, zero, a1 # compute # bytes to word align address bne v0, zero, unalignedcmp # not possible to align addresses and a3, a3, 3 beq a3, zero, 1f - subu a2, a2, a3 # subtract from remaining count + PTR_SUBU a2, a2, a3 # subtract from remaining count move v0, v1 # init v0,v1 so unmodified bytes match LWHI v0, 0(a0) # read 1, 2, or 3 bytes LWHI v1, 0(a1) - addu a1, a1, a3 + PTR_ADDU a1, a1, a3 bne v0, v1, nomatch - addu a0, a0, a3 + PTR_ADDU a0, a0, a3 1: and a3, a2, ~3 # compute number of whole words left - subu a2, a2, a3 # which has to be >= (16-3) & ~3 - addu a3, a3, a0 # compute ending address + PTR_SUBU a2, a2, a3 # which has to be >= (16-3) & ~3 + PTR_ADDU a3, a3, a0 # compute ending address 2: lw v0, 0(a0) # compare words lw v1, 0(a1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 11:06:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15C04106566C; Sat, 17 Apr 2010 11:06:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0530E8FC1B; Sat, 17 Apr 2010 11:06: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 o3HB6gHC037590; Sat, 17 Apr 2010 11:06:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HB6gOi037588; Sat, 17 Apr 2010 11:06:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171106.o3HB6gOi037588@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:06: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: r206751 - 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: Sat, 17 Apr 2010 11:06:43 -0000 Author: avg Date: Sat Apr 17 11:06:42 2010 New Revision: 206751 URL: http://svn.freebsd.org/changeset/base/206751 Log: MFC r205860,206097: correctly set b_offset for getblk(devvp) Modified: stable/8/sys/kern/vfs_bio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_bio.c ============================================================================== --- stable/8/sys/kern/vfs_bio.c Sat Apr 17 09:50:13 2010 (r206750) +++ stable/8/sys/kern/vfs_bio.c Sat Apr 17 11:06:42 2010 (r206751) @@ -2678,7 +2678,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - bsize = bo->bo_bsize; + bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; offset = blkno * bsize; vmio = vp->v_object != NULL; maxsize = vmio ? size + (offset & PAGE_MASK) : size; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 11:12:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 907E31065672; Sat, 17 Apr 2010 11:12:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9A78FC1F; Sat, 17 Apr 2010 11: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 o3HBCKph038886; Sat, 17 Apr 2010 11:12:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBCKSX038884; Sat, 17 Apr 2010 11:12:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171112.o3HBCKSX038884@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11: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: r206752 - 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: Sat, 17 Apr 2010 11:12:20 -0000 Author: avg Date: Sat Apr 17 11:12:20 2010 New Revision: 206752 URL: http://svn.freebsd.org/changeset/base/206752 Log: MFC r205860,206097: correctly set b_offset for getblk(devvp) Modified: stable/7/sys/kern/vfs_bio.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/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Sat Apr 17 11:06:42 2010 (r206751) +++ stable/7/sys/kern/vfs_bio.c Sat Apr 17 11:12:20 2010 (r206752) @@ -2698,7 +2698,7 @@ loop: */ if (flags & GB_NOCREAT) return NULL; - bsize = bo->bo_bsize; + bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; offset = blkno * bsize; vmio = vp->v_object != NULL; maxsize = vmio ? size + (offset & PAGE_MASK) : size; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 11:25:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36EA106566B; Sat, 17 Apr 2010 11:25:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 928E48FC12; Sat, 17 Apr 2010 11:25: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 o3HBPUrS041791; Sat, 17 Apr 2010 11:25:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBPUMO041789; Sat, 17 Apr 2010 11:25:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171125.o3HBPUMO041789@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:25: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: r206753 - 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: Sat, 17 Apr 2010 11:25:30 -0000 Author: avg Date: Sat Apr 17 11:25:30 2010 New Revision: 206753 URL: http://svn.freebsd.org/changeset/base/206753 Log: MFC r206129: vn_stat: use va_blocksize when setting st_blksize Modified: stable/8/sys/kern/vfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/vfs_vnops.c ============================================================================== --- stable/8/sys/kern/vfs_vnops.c Sat Apr 17 11:12:20 2010 (r206752) +++ stable/8/sys/kern/vfs_vnops.c Sat Apr 17 11:25:30 2010 (r206753) @@ -788,11 +788,10 @@ vn_stat(vp, sb, active_cred, file_cred, * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Default to PAGE_SIZE after much discussion. - * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. + * Use miminum/default of PAGE_SIZE (e.g. for VCHR). */ - sb->st_blksize = PAGE_SIZE; + sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; if (priv_check(td, PRIV_VFS_GENERATION)) From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 11:38:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2CB1065673; Sat, 17 Apr 2010 11:38:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 194568FC08; Sat, 17 Apr 2010 11: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 o3HBcJdM044656; Sat, 17 Apr 2010 11:38:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBcI5J044654; Sat, 17 Apr 2010 11:38:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171138.o3HBcI5J044654@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206754 - 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: Sat, 17 Apr 2010 11:38:19 -0000 Author: avg Date: Sat Apr 17 11:38:18 2010 New Revision: 206754 URL: http://svn.freebsd.org/changeset/base/206754 Log: MFC r206129: vn_stat: use va_blocksize when setting st_blksize Modified: stable/7/sys/kern/vfs_vnops.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Sat Apr 17 11:25:30 2010 (r206753) +++ stable/7/sys/kern/vfs_vnops.c Sat Apr 17 11:38:18 2010 (r206754) @@ -729,11 +729,10 @@ vn_stat(vp, sb, active_cred, file_cred, * "a filesystem-specific preferred I/O block size for this * object. In some filesystem types, this may vary from file * to file" - * Default to PAGE_SIZE after much discussion. - * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. + * Use miminum/default of PAGE_SIZE (e.g. for VCHR). */ - sb->st_blksize = PAGE_SIZE; + sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize); sb->st_flags = vap->va_flags; if (priv_check(td, PRIV_VFS_GENERATION)) From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 11:40:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED31A1065674; Sat, 17 Apr 2010 11:40:39 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD14D8FC1C; Sat, 17 Apr 2010 11: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 o3HBedfE045228; Sat, 17 Apr 2010 11:40:39 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBed7i045226; Sat, 17 Apr 2010 11:40:39 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004171140.o3HBed7i045226@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Apr 2010 11:40: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: r206755 - 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: Sat, 17 Apr 2010 11:40:40 -0000 Author: rpaulo Date: Sat Apr 17 11:40:39 2010 New Revision: 206755 URL: http://svn.freebsd.org/changeset/base/206755 Log: Add another ICH7M chipset that works. MFC after: 1 week Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat Apr 17 11:38:18 2010 (r206754) +++ head/sys/dev/ahci/ahci.c Sat Apr 17 11:40:39 2010 (r206755) @@ -126,6 +126,7 @@ static struct { {0x26838086, 0x00, "Intel ESB2", 0}, {0x27c18086, 0x00, "Intel ICH7", 0}, {0x27c38086, 0x00, "Intel ICH7", 0}, + {0x27c48086, 0x00, "Intel ICH7M", 0}, {0x27c58086, 0x00, "Intel ICH7M", 0}, {0x27c68086, 0x00, "Intel ICH7M", 0}, {0x28218086, 0x00, "Intel ICH8", 0}, From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 11:57:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEAA1065674; Sat, 17 Apr 2010 11:57:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F307A8FC1F; Sat, 17 Apr 2010 11:57: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 o3HBvf7c048986; Sat, 17 Apr 2010 11:57:41 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HBvfWP048984; Sat, 17 Apr 2010 11:57:41 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171157.o3HBvfWP048984@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 11:57: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: r206756 - stable/8/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 11:57:42 -0000 Author: avg Date: Sat Apr 17 11:57:41 2010 New Revision: 206756 URL: http://svn.freebsd.org/changeset/base/206756 Log: MFC r206130: g_vfs_open: allow only one mount per device vnode Modified: stable/8/sys/geom/geom_vfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/geom_vfs.c ============================================================================== --- stable/8/sys/geom/geom_vfs.c Sat Apr 17 11:40:39 2010 (r206755) +++ stable/8/sys/geom/geom_vfs.c Sat Apr 17 11:57:41 2010 (r206756) @@ -163,6 +163,10 @@ g_vfs_open(struct vnode *vp, struct g_co g_topology_assert(); *cpp = NULL; + bo = &vp->v_bufobj; + if (bo->bo_private != vp) + return (EBUSY); + pp = g_dev_getprovider(vp->v_rdev); if (pp == NULL) return (ENOENT); @@ -178,7 +182,7 @@ g_vfs_open(struct vnode *vp, struct g_co vnode_create_vobject(vp, pp->mediasize, curthread); VFS_UNLOCK_GIANT(vfslocked); *cpp = cp; - bo = &vp->v_bufobj; + cp->private = vp; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; @@ -198,5 +202,6 @@ g_vfs_close(struct g_consumer *cp) gp = cp->geom; bo = gp->softc; bufobj_invalbuf(bo, V_SAVE, 0, 0); + bo->bo_private = cp->private; g_wither_geom_close(gp, ENXIO); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 12:01:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AAC01065673; Sat, 17 Apr 2010 12:01:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A65F8FC3A; Sat, 17 Apr 2010 12:01: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 o3HC1oDW050000; Sat, 17 Apr 2010 12:01:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HC1oBk049998; Sat, 17 Apr 2010 12:01:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004171201.o3HC1oBk049998@svn.freebsd.org> From: Andriy Gapon Date: Sat, 17 Apr 2010 12:01:50 +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: r206757 - stable/7/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: Sat, 17 Apr 2010 12:01:51 -0000 Author: avg Date: Sat Apr 17 12:01:50 2010 New Revision: 206757 URL: http://svn.freebsd.org/changeset/base/206757 Log: MFC r206130: g_vfs_open: allow only one mount per device vnode Modified: stable/7/sys/geom/geom_vfs.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/geom/geom_vfs.c ============================================================================== --- stable/7/sys/geom/geom_vfs.c Sat Apr 17 11:57:41 2010 (r206756) +++ stable/7/sys/geom/geom_vfs.c Sat Apr 17 12:01:50 2010 (r206757) @@ -163,6 +163,10 @@ g_vfs_open(struct vnode *vp, struct g_co g_topology_assert(); *cpp = NULL; + bo = &vp->v_bufobj; + if (bo->bo_private != vp) + return (EBUSY); + pp = g_dev_getprovider(vp->v_rdev); if (pp == NULL) return (ENOENT); @@ -178,7 +182,7 @@ g_vfs_open(struct vnode *vp, struct g_co vnode_create_vobject(vp, pp->mediasize, curthread); VFS_UNLOCK_GIANT(vfslocked); *cpp = cp; - bo = &vp->v_bufobj; + cp->private = vp; bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; @@ -198,5 +202,6 @@ g_vfs_close(struct g_consumer *cp, struc gp = cp->geom; bo = gp->softc; bufobj_invalbuf(bo, V_SAVE, td, 0, 0); + bo->bo_private = cp->private; g_wither_geom_close(gp, ENXIO); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 12:22:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1103106566B; Sat, 17 Apr 2010 12:22:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B70908FC1F; Sat, 17 Apr 2010 12:22: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 o3HCMiNB054598; Sat, 17 Apr 2010 12:22:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HCMiD3054594; Sat, 17 Apr 2010 12:22:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201004171222.o3HCMiD3054594@svn.freebsd.org> From: Michael Tuexen Date: Sat, 17 Apr 2010 12:22: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: r206758 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 12:22:45 -0000 Author: tuexen Date: Sat Apr 17 12:22:44 2010 New Revision: 206758 URL: http://svn.freebsd.org/changeset/base/206758 Log: Fix a bug where SACKs are not sent when they should. Move some protection code to INVARIANTS. Cleanups. MFC after: 3 days. Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sat Apr 17 12:01:50 2010 (r206757) +++ head/sys/netinet/sctp_indata.c Sat Apr 17 12:22:44 2010 (r206758) @@ -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); } @@ -2300,7 +2300,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 +2314,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,10 +2378,8 @@ 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++) { @@ -2808,8 +2813,8 @@ 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.cumulative_tsn == stcb->asoc.highest_tsn_inside_nr_map) && + (stcb->asoc.nr_mapping_array[0] != 0xff)) { if ((stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) || (stcb->asoc.delayed_ack == 0) || (stcb->asoc.numduptsns) || From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 14:35:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE37106564A; Sat, 17 Apr 2010 14:35:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AED98FC18; Sat, 17 Apr 2010 14:35: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 o3HEZlJ8083781; Sat, 17 Apr 2010 14:35:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HEZktM083776; Sat, 17 Apr 2010 14:35:46 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004171435.o3HEZktM083776@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 17 Apr 2010 14:35: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: r206759 - in head: bin/sh tools/regression/bin/sh/parameters X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 14:35:47 -0000 Author: jilles Date: Sat Apr 17 14:35:46 2010 New Revision: 206759 URL: http://svn.freebsd.org/changeset/base/206759 Log: sh: On startup of the shell, use PWD from the environment if it is valid. Unset PWD if it is incorrect and no value for it can be determined. This preserves the logical current directory across shell invocations. Example (assuming /home is a symlink): $ cd $ pwd /home/foo $ sh $ pwd /home/foo Formerly the second pwd would show the physical path (symlinks resolved). Added: head/tools/regression/bin/sh/parameters/pwd2.0 (contents, props changed) Modified: head/bin/sh/cd.c head/bin/sh/cd.h head/bin/sh/main.c Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Sat Apr 17 12:22:44 2010 (r206758) +++ head/bin/sh/cd.c Sat Apr 17 14:35:46 2010 (r206759) @@ -70,6 +70,7 @@ STATIC int docd(char *, int, int); STATIC char *getcomponent(void); STATIC char *findcwd(char *); STATIC void updatepwd(char *); +STATIC char *getpwd(void); STATIC char *getpwd2(void); STATIC char *curdir = NULL; /* current working directory */ @@ -351,7 +352,7 @@ pwdcmd(int argc, char **argv) /* * Get the current directory and cache the result in curdir. */ -char * +STATIC char * getpwd(void) { char *p; @@ -374,7 +375,6 @@ getpwd(void) STATIC char * getpwd2(void) { - struct stat stdot, stpwd; char *pwd; int i; @@ -387,12 +387,29 @@ getpwd2(void) break; } - pwd = getenv("PWD"); + return NULL; +} + +/* + * Initialize PWD in a new shell. + * If the shell is interactive, we need to warn if this fails. + */ +void +pwd_init(int warn) +{ + char *pwd; + struct stat stdot, stpwd; + + pwd = lookupvar("PWD"); if (pwd && *pwd == '/' && stat(".", &stdot) != -1 && stat(pwd, &stpwd) != -1 && stdot.st_dev == stpwd.st_dev && stdot.st_ino == stpwd.st_ino) { - return pwd; + if (curdir) + ckfree(curdir); + curdir = savestr(pwd); } - return NULL; + if (getpwd() == NULL && warn) + out2fmt_flush("sh: cannot determine working directory\n"); + setvar("PWD", curdir, VEXPORT); } Modified: head/bin/sh/cd.h ============================================================================== --- head/bin/sh/cd.h Sat Apr 17 12:22:44 2010 (r206758) +++ head/bin/sh/cd.h Sat Apr 17 14:35:46 2010 (r206759) @@ -29,6 +29,6 @@ * $FreeBSD$ */ -char *getpwd(void); +void pwd_init(int); int cdcmd (int, char **); int pwdcmd(int, char **); Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sat Apr 17 12:22:44 2010 (r206758) +++ head/bin/sh/main.c Sat Apr 17 14:35:46 2010 (r206759) @@ -153,10 +153,7 @@ main(int argc, char *argv[]) init(); setstackmark(&smark); procargs(argc, argv); - if (getpwd() == NULL && iflag) - out2fmt_flush("sh: cannot determine working directory\n"); - if (getpwd() != NULL) - setvar ("PWD", getpwd(), VEXPORT); + pwd_init(iflag); if (iflag) chkmail(1); if (argv[0] && argv[0][0] == '-') { Added: head/tools/regression/bin/sh/parameters/pwd2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/pwd2.0 Sat Apr 17 14:35:46 2010 (r206759) @@ -0,0 +1,24 @@ +# $FreeBSD$ +# Check that PWD is exported and accepted from the environment. +set -e + +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +trap 'rm -rf $T' 0 +cd -P $T +TP=$(pwd) +mkdir test1 +ln -s test1 link +cd link +[ "$PWD" = "$TP/link" ] +[ "$(pwd)" = "$TP/link" ] +[ "$(pwd -P)" = "$TP/test1" ] +[ "$(sh -c pwd)" = "$TP/link" ] +[ "$(sh -c pwd\ -P)" = "$TP/test1" ] +cd .. +[ "$(pwd)" = "$TP" ] +cd -P link +[ "$PWD" = "$TP/test1" ] +[ "$(pwd)" = "$TP/test1" ] +[ "$(pwd -P)" = "$TP/test1" ] +[ "$(sh -c pwd)" = "$TP/test1" ] +[ "$(sh -c pwd\ -P)" = "$TP/test1" ] From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 15:52:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1363C1065675; Sat, 17 Apr 2010 15:52:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01CA08FC1F; Sat, 17 Apr 2010 15:52: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 o3HFqo9b001520; Sat, 17 Apr 2010 15:52:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HFqopa001518; Sat, 17 Apr 2010 15:52:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004171552.o3HFqopa001518@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 17 Apr 2010 15:52: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: r206760 - 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: Sat, 17 Apr 2010 15:52:51 -0000 Author: jilles Date: Sat Apr 17 15:52:50 2010 New Revision: 206760 URL: http://svn.freebsd.org/changeset/base/206760 Log: 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 MFC after: 2 weeks Modified: head/lib/libc/gen/getcwd.3 Modified: head/lib/libc/gen/getcwd.3 ============================================================================== --- head/lib/libc/gen/getcwd.3 Sat Apr 17 14:35:46 2010 (r206759) +++ head/lib/libc/gen/getcwd.3 Sat Apr 17 15:52:50 2010 (r206760) @@ -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 Sat Apr 17 17:02:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADAE9106566B; Sat, 17 Apr 2010 17:02:17 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CEC58FC19; Sat, 17 Apr 2010 17:02: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 o3HH2HNK016838; Sat, 17 Apr 2010 17:02:17 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HH2H3W016836; Sat, 17 Apr 2010 17:02:17 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004171702.o3HH2H3W016836@svn.freebsd.org> From: Alan Cox Date: Sat, 17 Apr 2010 17:02: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: r206761 - 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, 17 Apr 2010 17:02:17 -0000 Author: alc Date: Sat Apr 17 17:02:17 2010 New Revision: 206761 URL: http://svn.freebsd.org/changeset/base/206761 Log: Setting PG_REFERENCED on the requested page in swap_pager_getpages() is either redundant or harmful, depending on the caller. For example, when called by vm_fault(), it is redundant. However, when called by vm_thread_swapin(), it is harmful. Specifically, if the thread is later swapped out, having PG_REFERENCED set on its stack pages leads the page daemon to reactivate these stack pages and delay their reclamation. Reviewed by: kib MFC after: 3 weeks Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat Apr 17 15:52:50 2010 (r206760) +++ head/sys/vm/swap_pager.c Sat Apr 17 17:02:17 2010 (r206761) @@ -1101,8 +1101,7 @@ swap_pager_getpages(vm_object_t object, * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the * loops are set up such that the case(s) are handled implicitly. * - * The swp_*() calls must be made at splvm(). vm_page_free() does - * not need to be, but it will go a little faster if it is. + * The swp_*() calls must be made with the object locked. */ blk = swp_pager_meta_ctl(mreq->object, mreq->pindex, 0); @@ -1212,9 +1211,6 @@ swap_pager_getpages(vm_object_t object, VM_OBJECT_LOCK(object); while ((mreq->oflags & VPO_SWAPINPROG) != 0) { mreq->oflags |= VPO_WANTED; - vm_page_lock_queues(); - vm_page_flag_set(mreq, PG_REFERENCED); - vm_page_unlock_queues(); PCPU_INC(cnt.v_intrans); if (msleep(mreq, VM_OBJECT_MTX(object), PSWP, "swread", hz*20)) { printf( From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 17:40:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBB41065670; Sat, 17 Apr 2010 17:40:13 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EA338FC15; Sat, 17 Apr 2010 17:40: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 o3HHeDkV025223; Sat, 17 Apr 2010 17:40:13 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HHeCs4025221; Sat, 17 Apr 2010 17:40:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004171740.o3HHeCs4025221@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Apr 2010 17:40: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: r206762 - 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: Sat, 17 Apr 2010 17:40:13 -0000 Author: rpaulo Date: Sat Apr 17 17:40:12 2010 New Revision: 206762 URL: http://svn.freebsd.org/changeset/base/206762 Log: MFC r206456: Honor the CE bit even when the CWR bit is set. PR: 145600 Submitted by: Richard Scheffenegger Modified: stable/8/sys/netinet/tcp_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) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat Apr 17 17:02:17 2010 (r206761) +++ stable/8/sys/netinet/tcp_input.c Sat Apr 17 17:40:12 2010 (r206762) @@ -1134,6 +1134,8 @@ tcp_do_segment(struct mbuf *m, struct tc * TCP ECN processing. */ if (tp->t_flags & TF_ECN_PERMIT) { + if (thflags & TH_CWR) + tp->t_flags &= ~TF_ECN_SND_ECE; switch (iptos & IPTOS_ECN_MASK) { case IPTOS_ECN_CE: tp->t_flags |= TF_ECN_SND_ECE; @@ -1146,10 +1148,6 @@ tcp_do_segment(struct mbuf *m, struct tc TCPSTAT_INC(tcps_ecn_ect1); break; } - - if (thflags & TH_CWR) - tp->t_flags &= ~TF_ECN_SND_ECE; - /* * Congestion experienced. * Ignore if we are already trying to recover. From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:13:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7319106564A; Sat, 17 Apr 2010 18:13:52 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B673F8FC18; Sat, 17 Apr 2010 18:13: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 o3HIDqJ0032566; Sat, 17 Apr 2010 18:13:52 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HIDqHN032564; Sat, 17 Apr 2010 18:13:52 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004171813.o3HIDqHN032564@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 17 Apr 2010 18:13: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: r206763 - head/sys/dev/ipw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 18:13:52 -0000 Author: bschmidt Date: Sat Apr 17 18:13:52 2010 New Revision: 206763 URL: http://svn.freebsd.org/changeset/base/206763 Log: Fix comment about ipw_assoc and remove some whitespaces; no functional changes. Approved by: rpaulo (mentor) Modified: head/sys/dev/ipw/if_ipw.c Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sat Apr 17 17:40:12 2010 (r206762) +++ head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:13:52 2010 (r206763) @@ -888,10 +888,10 @@ ipw_newstate(struct ieee80211vap *vap, e /* * XXX when joining an ibss network we are called * with a SCAN -> RUN transition on scan complete. - * Use that to call ipw_auth_and_assoc. On completing - * the join we are then called again with an - * AUTH -> RUN transition and we want to do nothing. - * This is all totally bogus and needs to be redone. + * Use that to call ipw_assoc. On completing the + * join we are then called again with an AUTH -> RUN + * transition and we want to do nothing. This is + * all totally bogus and needs to be redone. */ if (ostate == IEEE80211_S_SCAN) ipw_assoc(ic, vap); @@ -909,7 +909,7 @@ ipw_newstate(struct ieee80211vap *vap, e case IEEE80211_S_ASSOC: /* - * If we are not transitioning from AUTH the resend the + * If we are not transitioning from AUTH then resend the * association request. */ if (ostate != IEEE80211_S_AUTH) @@ -1070,7 +1070,7 @@ ipw_rx_newstate_intr(struct ipw_softc *s case IPW_STATE_DISABLED: /* XXX? is this right? */ - sc->flags &= ~(IPW_FLAG_HACK | IPW_FLAG_SCANNING | + sc->flags &= ~(IPW_FLAG_HACK | IPW_FLAG_SCANNING | IPW_FLAG_ASSOCIATING | IPW_FLAG_ASSOCIATED); DPRINTFN(2, ("Firmware disabled (%s flags 0x%x)\n", IEEESTATE(vap), sc->flags)); From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:14:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 354F81065678; Sat, 17 Apr 2010 18:14:50 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24B908FC08; Sat, 17 Apr 2010 18:14: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 o3HIEoPY032836; Sat, 17 Apr 2010 18:14:50 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HIEo2b032834; Sat, 17 Apr 2010 18:14:50 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004171814.o3HIEo2b032834@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 17 Apr 2010 18:14: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: r206764 - head/sys/dev/ipw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 18:14:50 -0000 Author: bschmidt Date: Sat Apr 17 18:14:49 2010 New Revision: 206764 URL: http://svn.freebsd.org/changeset/base/206764 Log: Pass correct RSSI to ieee80211_input*(). Approved by: rpaulo (mentor) Modified: head/sys/dev/ipw/if_ipw.c Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:13:52 2010 (r206763) +++ head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:14:49 2010 (r206764) @@ -1234,10 +1234,10 @@ ipw_rx_data_intr(struct ipw_softc *sc, s IPW_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); if (ni != NULL) { - (void) ieee80211_input(ni, m, rssi, nf); + (void) ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else - (void) ieee80211_input_all(ic, m, rssi, nf); + (void) ieee80211_input_all(ic, m, rssi - nf, nf); IPW_LOCK(sc); bus_dmamap_sync(sc->rbd_dmat, sc->rbd_map, BUS_DMASYNC_PREWRITE); From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:16:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D14F106567A; Sat, 17 Apr 2010 18:16:14 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CDB88FC0C; Sat, 17 Apr 2010 18:16: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 o3HIGEZM033176; Sat, 17 Apr 2010 18:16:14 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HIGECx033174; Sat, 17 Apr 2010 18:16:14 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004171816.o3HIGECx033174@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 17 Apr 2010 18:16: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: r206765 - head/sys/dev/ipw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 18:16:14 -0000 Author: bschmidt Date: Sat Apr 17 18:16:14 2010 New Revision: 206765 URL: http://svn.freebsd.org/changeset/base/206765 Log: - Make ipw usable again by moving directly into ASSOC state. - No need to manually switch to RUN state, assoc response takes care of that. Approved by: rpaulo (mentor) Modified: head/sys/dev/ipw/if_ipw.c Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:14:49 2010 (r206764) +++ head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:16:14 2010 (r206765) @@ -904,6 +904,13 @@ ipw_newstate(struct ieee80211vap *vap, e break; case IEEE80211_S_AUTH: + /* + * Move to ASSOC state after the ipw_assoc() call. Firmware + * takes care of authentication, after the call we'll receive + * only an assoc response which would otherwise be discared + * if we are still in AUTH state. + */ + nstate = IEEE80211_S_ASSOC; ipw_assoc(ic, vap); break; @@ -1021,7 +1028,6 @@ ipw_rx_newstate_intr(struct ipw_softc *s } sc->flags &= ~IPW_FLAG_ASSOCIATING; sc->flags |= IPW_FLAG_ASSOCIATED; - ieee80211_new_state(vap, IEEE80211_S_RUN, -1); break; case IPW_STATE_SCANNING: From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:17:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 623F71065674; Sat, 17 Apr 2010 18:17:25 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51FA98FC15; Sat, 17 Apr 2010 18:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3HIHPut033476; Sat, 17 Apr 2010 18:17:25 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HIHPdp033474; Sat, 17 Apr 2010 18:17:25 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004171817.o3HIHPdp033474@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 17 Apr 2010 18:17: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: r206766 - head/sys/dev/ipw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 18:17:25 -0000 Author: bschmidt Date: Sat Apr 17 18:17:25 2010 New Revision: 206766 URL: http://svn.freebsd.org/changeset/base/206766 Log: Use iv_appie_wpa, with this commit WPA works again. Approved by: rpaulo (mentor) Modified: head/sys/dev/ipw/if_ipw.c Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:16:14 2010 (r206765) +++ head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:17:25 2010 (r206766) @@ -2266,8 +2266,8 @@ ipw_assoc(struct ieee80211com *ic, struc if (error != 0) goto done; - if (vap->iv_appie_assocreq != NULL) { - struct ieee80211_appie *ie = vap->iv_appie_assocreq; + if (vap->iv_appie_wpa != NULL) { + struct ieee80211_appie *ie = vap->iv_appie_wpa; error = ipw_setwpaie(sc, ie->ie_data, ie->ie_len); if (error != 0) goto done; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:18:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BD83106564A; Sat, 17 Apr 2010 18:18:46 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0B38FC19; Sat, 17 Apr 2010 18:18: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 o3HIIkR4033806; Sat, 17 Apr 2010 18:18:46 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HIIkJC033803; Sat, 17 Apr 2010 18:18:46 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004171818.o3HIIkJC033803@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 17 Apr 2010 18:18: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: r206767 - head/sys/dev/ipw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 18:18:46 -0000 Author: bschmidt Date: Sat Apr 17 18:18:46 2010 New Revision: 206767 URL: http://svn.freebsd.org/changeset/base/206767 Log: Remove IPW_LOCK_DECL and fix various LORs. Approved by: rpaulo (mentor) Modified: head/sys/dev/ipw/if_ipw.c head/sys/dev/ipw/if_ipwvar.h Modified: head/sys/dev/ipw/if_ipw.c ============================================================================== --- head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:17:25 2010 (r206766) +++ head/sys/dev/ipw/if_ipw.c Sat Apr 17 18:18:46 2010 (r206767) @@ -1040,8 +1040,10 @@ ipw_rx_newstate_intr(struct ipw_softc *s * we checked the 802.11 layer state. */ if (sc->flags & IPW_FLAG_ASSOCIATED) { + IPW_UNLOCK(sc); /* XXX probably need to issue disassoc to fw */ ieee80211_beacon_miss(ic); + IPW_LOCK(sc); } break; @@ -1060,7 +1062,9 @@ ipw_rx_newstate_intr(struct ipw_softc *s break; } if (sc->flags & IPW_FLAG_SCANNING) { + IPW_UNLOCK(sc); ieee80211_scan_done(vap); + IPW_LOCK(sc); sc->flags &= ~IPW_FLAG_SCANNING; sc->sc_scan_timer = 0; } @@ -1070,8 +1074,11 @@ ipw_rx_newstate_intr(struct ipw_softc *s DPRINTFN(2, ("Association lost (%s flags 0x%x)\n", IEEESTATE(vap), sc->flags)); sc->flags &= ~(IPW_FLAG_ASSOCIATING | IPW_FLAG_ASSOCIATED); - if (vap->iv_state == IEEE80211_S_RUN) + if (vap->iv_state == IEEE80211_S_RUN) { + IPW_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_SCAN, -1); + IPW_LOCK(sc); + } break; case IPW_STATE_DISABLED: @@ -1170,7 +1177,6 @@ ipw_rx_data_intr(struct ipw_softc *sc, s bus_addr_t physaddr; int error; int8_t rssi, nf; - IPW_LOCK_DECL; DPRINTFN(5, ("received frame len=%u, rssi=%u\n", le32toh(status->len), status->rssi)); @@ -1384,8 +1390,11 @@ ipw_fatal_error_intr(struct ipw_softc *s struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); device_printf(sc->sc_dev, "firmware error\n"); - if (vap != NULL) + if (vap != NULL) { + IPW_UNLOCK(sc); ieee80211_cancel_scan(vap); + IPW_LOCK(sc); + } ieee80211_runtask(ic, &sc->sc_init_task); } @@ -1394,7 +1403,6 @@ ipw_intr(void *arg) { struct ipw_softc *sc = arg; uint32_t r; - IPW_LOCK_DECL; IPW_LOCK(sc); @@ -1724,7 +1732,6 @@ static void ipw_start(struct ifnet *ifp) { struct ipw_softc *sc = ifp->if_softc; - IPW_LOCK_DECL; IPW_LOCK(sc); ipw_start_locked(ifp); @@ -1781,7 +1788,9 @@ ipw_watchdog(void *arg) DPRINTFN(3, ("Scan timeout\n")); /* End the scan */ if (sc->flags & IPW_FLAG_SCANNING) { + IPW_UNLOCK(sc); ieee80211_scan_done(TAILQ_FIRST(&ic->ic_vaps)); + IPW_LOCK(sc); sc->flags &= ~IPW_FLAG_SCANNING; } } @@ -1797,7 +1806,6 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, struct ieee80211com *ic = ifp->if_l2com; struct ifreq *ifr = (struct ifreq *) data; int error = 0, startall = 0; - IPW_LOCK_DECL; switch (cmd) { case SIOCSIFFLAGS: @@ -2207,7 +2215,6 @@ ipw_assoc(struct ieee80211com *ic, struc struct ipw_security security; uint32_t data; int error; - IPW_LOCK_DECL; IPW_LOCK(sc); error = ipw_disable(sc); @@ -2297,7 +2304,6 @@ ipw_disassoc(struct ieee80211com *ic, st struct ifnet *ifp = vap->iv_ic->ic_ifp; struct ieee80211_node *ni = vap->iv_bss; struct ipw_softc *sc = ifp->if_softc; - IPW_LOCK_DECL; IPW_LOCK(sc); DPRINTF(("Disassociate from %6D\n", ni->ni_bssid, ":")); @@ -2333,7 +2339,6 @@ ipw_init(void *priv) struct ipw_softc *sc = priv; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - IPW_LOCK_DECL; IPW_LOCK(sc); ipw_init_locked(sc); @@ -2540,7 +2545,6 @@ static void ipw_stop(void *priv) { struct ipw_softc *sc = priv; - IPW_LOCK_DECL; IPW_LOCK(sc); ipw_stop_locked(sc); @@ -2667,7 +2671,6 @@ ipw_scan_start(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct ipw_softc *sc = ifp->if_softc; - IPW_LOCK_DECL; IPW_LOCK(sc); ipw_scan(sc); @@ -2679,7 +2682,6 @@ ipw_set_channel(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct ipw_softc *sc = ifp->if_softc; - IPW_LOCK_DECL; IPW_LOCK(sc); if (ic->ic_opmode == IEEE80211_M_MONITOR) { @@ -2707,7 +2709,6 @@ ipw_scan_end(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; struct ipw_softc *sc = ifp->if_softc; - IPW_LOCK_DECL; IPW_LOCK(sc); sc->flags &= ~IPW_FLAG_SCANNING; Modified: head/sys/dev/ipw/if_ipwvar.h ============================================================================== --- head/sys/dev/ipw/if_ipwvar.h Sat Apr 17 18:17:25 2010 (r206766) +++ head/sys/dev/ipw/if_ipwvar.h Sat Apr 17 18:18:46 2010 (r206767) @@ -164,13 +164,6 @@ struct ipw_softc { * NB.: This models the only instance of async locking in ipw_init_locked * and must be kept in sync. */ -#define IPW_LOCK_DECL int __waslocked = 0 -#define IPW_LOCK(sc) do { \ - if (!(__waslocked = mtx_owned(&(sc)->sc_mtx))) \ - mtx_lock(&sc->sc_mtx); \ -} while (0) -#define IPW_UNLOCK(sc) do { \ - if (!__waslocked) \ - mtx_unlock(&sc->sc_mtx); \ -} while (0) +#define IPW_LOCK(sc) mtx_lock(&sc->sc_mtx); +#define IPW_UNLOCK(sc) mtx_unlock(&sc->sc_mtx); #define IPW_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:35:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7099F106564A; Sat, 17 Apr 2010 18:35:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 607958FC19; Sat, 17 Apr 2010 18:35: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 o3HIZ7W5037485; Sat, 17 Apr 2010 18:35:07 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HIZ7i3037483; Sat, 17 Apr 2010 18:35:07 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004171835.o3HIZ7i3037483@svn.freebsd.org> From: Alan Cox Date: Sat, 17 Apr 2010 18:35: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: r206768 - 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, 17 Apr 2010 18:35:07 -0000 Author: alc Date: Sat Apr 17 18:35:07 2010 New Revision: 206768 URL: http://svn.freebsd.org/changeset/base/206768 Log: In vm_object_backing_scan(), setting PG_REFERENCED on a page before sleeping on that page is nonsensical. Doing so reduces the likelihood that the page daemon will reclaim the page before the thread waiting in vm_object_backing_scan() is reawakened. However, it does not guarantee that the page is not reclaimed, so vm_object_backing_scan() restarts after reawakening. More importantly, this muddles the meaning of PG_REFERENCED. There is no reason to believe that the caller of vm_object_backing_scan() is going to use (i.e., access) the contents of the page. There is especially no reason to believe that an access is more likely because vm_object_backing_scan() had to sleep on the page. Discussed with: kib MFC after: 3 weeks Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Apr 17 18:18:46 2010 (r206767) +++ head/sys/vm/vm_object.c Sat Apr 17 18:35:07 2010 (r206768) @@ -1553,9 +1553,6 @@ vm_object_backing_scan(vm_object_t objec } } else if (op & OBSC_COLLAPSE_WAIT) { if ((p->oflags & VPO_BUSY) || p->busy) { - vm_page_lock_queues(); - vm_page_flag_set(p, PG_REFERENCED); - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(object); p->oflags |= VPO_WANTED; msleep(p, VM_OBJECT_MTX(backing_object), From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 18:48:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BDCB106566B; Sat, 17 Apr 2010 18:48:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3378FC13; Sat, 17 Apr 2010 18:48: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 o3HImIHP040384; Sat, 17 Apr 2010 18:48:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HImI3u040381; Sat, 17 Apr 2010 18:48:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004171848.o3HImI3u040381@svn.freebsd.org> From: Doug Barton Date: Sat, 17 Apr 2010 18:48: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: r206769 - in head: etc/defaults share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 18:48:18 -0000 Author: dougb Date: Sat Apr 17 18:48:18 2010 New Revision: 206769 URL: http://svn.freebsd.org/changeset/base/206769 Log: In case a user wants to configure only an IPv6 link-local address add an example that shows how to do it. Modified: head/etc/defaults/rc.conf head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Apr 17 18:35:07 2010 (r206768) +++ head/etc/defaults/rc.conf Sat Apr 17 18:48:18 2010 (r206769) @@ -211,6 +211,7 @@ ifconfig_lo0="inet 127.0.0.1" # default #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. #ifconfig_ed0_ipv6="RTADV" # Sample IPv6 entry for RA/rtsol(8) +#ifconfig_ed0_ipv6="inet6 auto_linklocal" # To configure only link-local #ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" # Sample IPv6 addr entry #ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" # Sample IPv6 alias #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Apr 17 18:35:07 2010 (r206768) +++ head/share/man/man5/rc.conf.5 Sat Apr 17 18:48:18 2010 (r206769) @@ -1303,6 +1303,13 @@ interface: ifconfig_ed0_ipv6="RTADV" .Ed .Pp +To configure only a link-local address on the +.Dq Li ed0 +interface: +.Bd -literal +ifconfig_ed0_ipv6="inet6 auto_linklocal" +.Ed +.Pp To disable RA the .Dq Li NORTADV option is available, although not required if manual From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 21:14:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 857EB106566B; Sat, 17 Apr 2010 21:14:37 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75B3B8FC12; Sat, 17 Apr 2010 21:14: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 o3HLEbXb073134; Sat, 17 Apr 2010 21:14:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HLEbrV073132; Sat, 17 Apr 2010 21:14:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004172114.o3HLEbrV073132@svn.freebsd.org> From: Alan Cox Date: Sat, 17 Apr 2010 21:14: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: r206770 - 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, 17 Apr 2010 21:14:37 -0000 Author: alc Date: Sat Apr 17 21:14:37 2010 New Revision: 206770 URL: http://svn.freebsd.org/changeset/base/206770 Log: In vm_object_madvise() setting PG_REFERENCED on a page before sleeping on that page only makes sense if the advice is MADV_WILLNEED. In that case, the intention is to activate the page, so discouraging the page daemon from reclaiming the page makes sense. In contrast, in the other cases, MADV_DONTNEED and MADV_FREE, it makes no sense whatsoever to discourage the page daemon from reclaiming the page by setting PG_REFERENCED. Wrap a nearby line. Discussed with: kib MFC after: 3 weeks Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Apr 17 18:48:18 2010 (r206769) +++ head/sys/vm/vm_object.c Sat Apr 17 21:14:37 2010 (r206770) @@ -1205,12 +1205,19 @@ shadowlookup: goto unlock_tobject; } if ((m->oflags & VPO_BUSY) || m->busy) { - vm_page_flag_set(m, PG_REFERENCED); + if (advise == MADV_WILLNEED) + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_flag_set(m, PG_REFERENCED); vm_page_unlock_queues(); if (object != tobject) VM_OBJECT_UNLOCK(object); m->oflags |= VPO_WANTED; - msleep(m, VM_OBJECT_MTX(tobject), PDROP | PVM, "madvpo", 0); + msleep(m, VM_OBJECT_MTX(tobject), PDROP | PVM, "madvpo", + 0); VM_OBJECT_LOCK(object); goto relookup; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 21:31:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26FA91065675; Sat, 17 Apr 2010 21:31:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 170C68FC12; Sat, 17 Apr 2010 21:31: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 o3HLVgDA076913; Sat, 17 Apr 2010 21:31:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HLVghk076911; Sat, 17 Apr 2010 21:31:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004172131.o3HLVghk076911@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Apr 2010 21:31: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: r206771 - head/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 21:31:43 -0000 Author: rpaulo Date: Sat Apr 17 21:31:42 2010 New Revision: 206771 URL: http://svn.freebsd.org/changeset/base/206771 Log: Use ubthidhci_enable="NO" to avoid the bootup warning. Submitted by: Jilles Tjoelker MFC after: 3 days Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Apr 17 21:14:37 2010 (r206770) +++ head/etc/defaults/rc.conf Sat Apr 17 21:31:42 2010 (r206771) @@ -437,7 +437,7 @@ rfcomm_pppd_server_two_channel="3" # Ove #rfcomm_pppd_server_two_register_sp="NO" # Override SP and DUN register #rfcomm_pppd_server_two_register_dun="NO" # for 'two' -#ubthidhci_enable="YES" # Switch an USB BT controller present on +ubthidhci_enable="NO" # Switch an USB BT controller present on #ubthidhci_busnum="3" # bus 3 and addr 2 from HID mode to HCI mode. #ubthidhci_addr="2" # Check usbconfig list to find the correct # numbers for your system. From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 22:39:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 110861065670; Sat, 17 Apr 2010 22:39:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB5008FC1A; Sat, 17 Apr 2010 22:39: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 o3HMdrNY092170; Sat, 17 Apr 2010 22:39:53 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HMdrJY092168; Sat, 17 Apr 2010 22:39:53 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004172239.o3HMdrJY092168@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 17 Apr 2010 22:39: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: r206773 - head/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: Sat, 17 Apr 2010 22:39:54 -0000 Author: jilles Date: Sat Apr 17 22:39:53 2010 New Revision: 206773 URL: http://svn.freebsd.org/changeset/base/206773 Log: ln: Refuse deleting a directory entry by hardlinking it to itself. Two pathnames refer to the same directory entry iff the directories match and the final components' names match. Example: (assuming file1 is an existing file) ln -f file1 file1 This now fails while leaving file1 intact. It used to delete file1 and then complain it cannot be linked because it is gone. With -i, this error is detected before the question is asked. MFC after: 2 weeks Modified: head/bin/ln/ln.c Modified: head/bin/ln/ln.c ============================================================================== --- head/bin/ln/ln.c Sat Apr 17 22:38:16 2010 (r206772) +++ head/bin/ln/ln.c Sat Apr 17 22:39:53 2010 (r206773) @@ -172,6 +172,52 @@ main(int argc, char *argv[]) exit(exitval); } +/* + * Two pathnames refer to the same directory entry if the directories match + * and the final components' names match. + */ +static int +samedirent(const char *path1, const char *path2) +{ + const char *file1, *file2; + char pathbuf[PATH_MAX]; + struct stat sb1, sb2; + + if (strcmp(path1, path2) == 0) + return 1; + file1 = strrchr(path1, '/'); + if (file1 != NULL) + file1++; + else + file1 = path1; + file2 = strrchr(path2, '/'); + if (file2 != NULL) + file2++; + else + file2 = path2; + if (strcmp(file1, file2) != 0) + return 0; + if (file1 - path1 >= PATH_MAX || file2 - path2 >= PATH_MAX) + return 0; + if (file1 == path1) + memcpy(pathbuf, ".", 2); + else { + memcpy(pathbuf, path1, file1 - path1); + pathbuf[file1 - path1] = '\0'; + } + if (stat(pathbuf, &sb1) != 0) + return 0; + if (file2 == path2) + memcpy(pathbuf, ".", 2); + else { + memcpy(pathbuf, path2, file2 - path2); + pathbuf[file2 - path2] = '\0'; + } + if (stat(pathbuf, &sb2) != 0) + return 0; + return sb1.st_dev == sb2.st_dev && sb1.st_ino == sb2.st_ino; +} + int linkit(const char *source, const char *target, int isdir) { @@ -215,7 +261,6 @@ linkit(const char *source, const char *t target = path; } - exists = !lstat(target, &sb); /* * If the link source doesn't exist, and a symbolic link was * requested, and -w was specified, give a warning. @@ -242,8 +287,20 @@ linkit(const char *source, const char *t warn("warning: %s", source); } } + + /* + * If the file exists, first check it is not the same directory entry. + */ + exists = !lstat(target, &sb); + if (exists) { + if (!sflag && samedirent(source, target)) { + warnx("%s and %s are the same directory entry", + source, target); + return (1); + } + } /* - * If the file exists, then unlink it forcibly if -f was specified + * Then unlink it forcibly if -f was specified * and interactively if -i was specified. */ if (fflag && exists) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 22:52:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF2EE1065672; Sat, 17 Apr 2010 22:52:33 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 844518FC1E; Sat, 17 Apr 2010 22: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 o3HMqXrZ095054; Sat, 17 Apr 2010 22:52:33 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HMqXTo095051; Sat, 17 Apr 2010 22:52:33 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172252.o3HMqXTo095051@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 22:52:33 +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: r206775 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 22:52:33 -0000 Author: weongyo Date: Sat Apr 17 22:52:33 2010 New Revision: 206775 URL: http://svn.freebsd.org/changeset/base/206775 Log: MFC r197724: TRENDnet TEW-424UB has multiple revisions so clarify zyd(4) man page and adds a device to urtw(4). The revision informations are as follows: rev A ZD1211 V2 SiS163U V2.1R SiS163U V3.xR RTL8187B and bump date. Obtained from: OpenBSD Reported by: Albert Shih Modified: stable/8/share/man/man4/urtw.4 stable/8/share/man/man4/zyd.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/urtw.4 ============================================================================== --- stable/8/share/man/man4/urtw.4 Sat Apr 17 22:40:15 2010 (r206774) +++ stable/8/share/man/man4/urtw.4 Sat Apr 17 22:52:33 2010 (r206775) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2009 +.Dd October 2, 2009 .Dt URTW 4 .Os .Sh NAME @@ -73,6 +73,7 @@ driver supports Realtek RTL8187B/L based .It "Netgear WG111v2 RTL8225 USB" .It "Safehome WLG-1500SMA5 RTL8225 USB" .It "Shuttle XPC Accessory PN20 RTL8225 USB" +.It "TRENDnet TEW-424UB V3.xR RTL8225 USB" .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): Modified: stable/8/share/man/man4/zyd.4 ============================================================================== --- stable/8/share/man/man4/zyd.4 Sat Apr 17 22:40:15 2010 (r206774) +++ stable/8/share/man/man4/zyd.4 Sat Apr 17 22:52:33 2010 (r206775) @@ -32,7 +32,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 1, 2008 +.Dd October 2, 2009 .Dt ZYD 4 .Os .Sh NAME @@ -113,7 +113,7 @@ driver: .It Sweex wireless USB 54 Mbps .It Tekram/Siemens USB adapter .It Telegent TG54USB -.It Trendnet TEW-424UB +.It Trendnet TEW-424UB rev A .It Trendnet TEW-429UB .It TwinMOS G240 .It Unicorn WL-54G From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 22:57:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26EDC106566B; Sat, 17 Apr 2010 22:57:08 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 156CB8FC16; Sat, 17 Apr 2010 22:57: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 o3HMv71b096128; Sat, 17 Apr 2010 22:57:07 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HMv7bA096126; Sat, 17 Apr 2010 22:57:07 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172257.o3HMv7bA096126@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 22:57: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: r206776 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 22:57:08 -0000 Author: weongyo Date: Sat Apr 17 22:57:07 2010 New Revision: 206776 URL: http://svn.freebsd.org/changeset/base/206776 Log: MFC r198195: adds devices supportted by urtw(4) and bumps date. Modified: stable/8/share/man/man4/urtw.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/urtw.4 ============================================================================== --- stable/8/share/man/man4/urtw.4 Sat Apr 17 22:52:33 2010 (r206775) +++ stable/8/share/man/man4/urtw.4 Sat Apr 17 22:57:07 2010 (r206776) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2009 +.Dd October 17, 2009 .Dt URTW 4 .Os .Sh NAME @@ -70,9 +70,15 @@ driver supports Realtek RTL8187B/L based .Pp .Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n .It Em "Card Radio Bus" +.It "Belkin F5D7050E RTL8225 USB" +.It "Linksys WUSB54GCv2 RTL8225 USB" .It "Netgear WG111v2 RTL8225 USB" +.It "Netgear WG111v3 RTL8225 USB" .It "Safehome WLG-1500SMA5 RTL8225 USB" .It "Shuttle XPC Accessory PN20 RTL8225 USB" +.It "Sitecom WL168v1 RTL8225 USB" +.It "Sitecom WL168v4 RTL8225 USB" +.It "SureCom EP-9001-g(2A) RTL8225 USB" .It "TRENDnet TEW-424UB V3.xR RTL8225 USB" .El .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 23:04:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9BF106566B; Sat, 17 Apr 2010 23:04:43 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19EAB8FC14; Sat, 17 Apr 2010 23:04: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 o3HN4hOC097849; Sat, 17 Apr 2010 23:04:43 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HN4hrS097847; Sat, 17 Apr 2010 23:04:43 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172304.o3HN4hrS097847@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 23:04: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: r206777 - stable/8/sys/contrib/dev/uath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Apr 2010 23:04:43 -0000 Author: weongyo Date: Sat Apr 17 23:04:42 2010 New Revision: 206777 URL: http://svn.freebsd.org/changeset/base/206777 Log: MFC r202607: Fixes a firmware bug that in some devices (e.g. Netgear WG111T or TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the firmware. Pointed by: Steven Friedrich Submitted by: sam Modified: stable/8/sys/contrib/dev/uath/ar5523.bin.uu Directory Properties: stable/8/sys/contrib/dev/uath/ (props changed) Modified: stable/8/sys/contrib/dev/uath/ar5523.bin.uu ============================================================================== --- stable/8/sys/contrib/dev/uath/ar5523.bin.uu Sat Apr 17 22:57:07 2010 (r206776) +++ stable/8/sys/contrib/dev/uath/ar5523.bin.uu Sat Apr 17 23:04:42 2010 (r206777) @@ -59,34 +59,34 @@ M``````````````````````````````````````` M```````````````````````````````````````````````````````````` M``````!`@&@``````#P"$``T0O\`0()@`````````````````"0"``)`@H`` M`````````````````^`((3P:@``G6@MT/!^``"?_!&0#7]`B!!$``0`````# -M7]`@`"#X(0-`^`D``````^`((3P:@`(G6D:X/!^``"?_!)0#7]`B!!$``0`` +M7]`@`"#X(0-`^`D``````^`((3P:@`(G6E98/!^``"?_!)0#7]`B!!$``0`` M```#7]`@`"#X(0-`^`D`````0`)@```````\`___-&,`_P!#$"1`@F`````` -M````````````/`2``B2$5_``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` -M`````````````````^`((3P:@`(G6J6$/!^``"?_!1@#7]`B!!$``0`````# -M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS&L#P$ -M@`(DA%?P`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` +M````````````/`2``B2$9Y``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` +M`````````````````^`((3P:@`(G6JL0/!^``"?_!1@#7]`B!!$``0`````# +M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS64#P$ +M@`(DA&>0`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` M!!4K__L`````-`0`$#P%@``DI09T/`:``"3&`@"LQ0``(,8`!""$__\4@/_\ M`````#P$@``DA`(`/`6``"2E!X"LA0``/`6``"2E"RBLA0`D/`6``"2E!G2L -MA0"`K(4`A*R%`(@,``*L``````P`:5H`````#`!J>P`````,`&D:``````@` -M;<\\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` +MA0"`K(4`A*R%`(@,``*L``````P`:KT`````#`!KW@`````,`&I]``````@` +M;S(\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` M`$`:\`````````````````!`FG``````````````````0!I@`#P;_[\W>___ M`UO0)$":8``D&@"(/!N``"=[`@"/>P"(`V``"``````#H-@A([W^L*^Z`(BO MH```KZ$`!*^B``BOHP`,KZ0`$*^E`!2OI@`8KZ<`'*^H`""OJ0`DKZH`**^K M`"ROK``PKZT`-*^N`#BOKP`\K[``0*^Q`$2OL@!(K[,`3*^T`%"OM0!4K[8` M6*^W`%RON`!@K[D`9*^\`'"OO@!XK[\`?```(!```"@2KZ0`@*^E`(2ONP!T M0`AH`$`)8`!`"C@`0`M``$`,&`!`#7@`0`YP`*^H`)BOJ0",KZH`E*^K`)RO -MK`"DKZT`H*^N`)`\'(`#)YS&L`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": -M8``````````````````,`&D.`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` +MK`"DKZT`H*^N`)`\'(`#)YS64`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": +M8``````````````````,`&IQ`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` M`*^A``2OH@`(KZ,`#*^D`!"OI0`4KZ8`&*^G`!ROJ``@KZD`)*^J`"BOJP`L MKZP`,*^M`#2OK@`XKZ\`/*^P`$"OL0!$K[(`2*^S`$ROM`!0K[4`5*^V`%BO MMP!*^_`'P``"`0```H$J^D`("OI0"$K[L`=$`) -M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG,:P/`*``B1"1E2,1```((0` +M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG-90/`*``B1"5?2,1```((0` M`:Q$```#H(`A)[W_X$`#8```````0`)H````````0Q`D``(2@C!"`'\\`X`` M)&,*/`!#$""`4@```D"((20!``02(0`#`````!````P`````/!&@P#8Q`!". M,0``,C$`?SP#@``D8PH\`'$8((!Q```F,0`&`B"0(0``````$8B`0!I@`#P; -M__\W>__P`UO0)$":8``````````````````\"H`")4HQ>`%14""-2@``/`6` -M`B2E,?``L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4R:`"Q*"",I0`` -M`@`P(0P`=7,`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` +M__\W>__P`UO0)$":8``````````````````\"H`")4HW(`%14""-2@``/`6` +M`B2E-Y@`L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4X$`"Q*"",I0`` +M`@`P(0P`=M8`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` M`````````(^H`)2/J0"`CZH`A$"(.``!(``1`4``$X^A``2/H@`(CZ,`#(^D M`!"/I0`4CZ8`&(^G`!R/J``@CZD`)(^J`"B/JP`LCZP`,(^M`#2/K@`XCZ\` M/(^P`$"/L0!$C[(`2(^S`$R/M`!0C[4`5(^V`%B/MP!(^_`'R/NP",-!K_``-:T"<#>M@D0!I@``` MN@"0C[T`=#=[``)`FV``````````````````0)IP```````````````````` M``]"```8`````````0`"``$``P`!``(``0`$``$``@`!``,``0`"``$`!0`! M``(``0`#``$``@`!``0``0`"``$``P`!``(``0`#X``(``````.@&"$`H.@A -M([W_X*^C``BOOP`0`(#X"0````"/OP`0C[T`"`/@``@`````/`2``B2$1Z@\ -M!8`#)*6B'#"&``,4P``2``````"D.",`!SE"``P(``WK8((][```#8``(`````#0:`"0( @@ -111,7 +111,7 @@ MGP`LC)X`*(R<`"2,EP`@C)8`'(R5`!B,E``4C), M```#X``(`*`0(0`````GO?_PK[\```P``TL``$`AC[\```/@``@GO0`0)[W_ M\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$`AQ`K M$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#%$`8D -M8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B +M8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B M4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0``,< M``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L40``& M)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$__\` @@ -120,7 +120,7 @@ M&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%```:Q@ M(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/L``` M`,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"",`L4 MX``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1@``! M```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!```L` M:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8(P!L @@ -134,7 +134,7 @@ M``,<``!D&"4``#`2``````````!P4T@"`&D0*Q! M0``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0(S1" M__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A``"8 M(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$``R@+ -M/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 +M/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 M0``%`H@!@",`!LQ,___`>X0 M!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4``$`2 @@ -148,7 +148,7 @@ M(",!I!`K`8D8(P!B8",`@&@A$`#_[B3&__\T0O_ M(1``_X,`@B@+)[W_X*^_`!`,``3L`Z!`(8^B``"/HP`$C[\`$`/@``@GO0`@ M)[W_\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$` MAQ`K$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#% -M$`8D8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 +M$`8D8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 M!`!B4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0 M``,<``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L4 M0``&)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$ @@ -157,7 +157,7 @@ M``!K&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%`` M`&EP(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/ ML````,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"" M,`L4X``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1 M@``!```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!` M``L`:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8 @@ -171,7 +171,7 @@ M`!@0``,<``!D&"4``#`2``````````!P4T@"`&D M$"L40``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0 M(S1"__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A M``"8(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$` -M`R@+/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J +M`R@+/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J M$"L40``%`H@!@",`!LQ,___ M`>X0!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4` @@ -183,173 +183,173 @@ M`&`0````````````K!`K``!H$@``````````%$` M_N(``)@A`]`"`G -MO?_0K[``$`"`@"$D!`!`.@*"$00``+`$"( M(5:```&ND0``C[\`)(^T`""/LP`]`#"/H@`` -M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!FN`F`@(11`_^T`0(@A#``2D`)@("$4 -M0/_I`$"((0P`&=D"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!G1)`4'(`!` -MB"$D`@<@K@(;[`)`*"$"8"`A#``<@JYR```\`X`"K'-'J!``_]6N8@`()[W_ -M\*^P``"OOP`$#``4GP"`@"$"`"`A#``4K```*"$00``&)`,`%H^_``2/L``` -M`&`0(0/@``@GO0`0#``?*P(`("$`0!@A)@4;<`(`("$40/_U)`8``0P`-X4` -M`````$`8(20%``$40/_O`@`@(0P`%*P`````)`,`%A``_^H``A@*K*0`!`/@ -M``BLX```)[W_H*^S`$P`H)@A```H(:^Q`$2OOP!0K[(`2*^P`$`,`!2L`("( -M(11``!6OH@`PCB(7W!1``"T#H"`A#`!Z=0````"/I@`@CZ4`'#P$@`(DT,0` -M`!`7P@("$"$``I!##`!P="2$"(@"("`A#``)M@)`*"&OH@`P$$``"P.@("$2 -M8``"CZ(`,*YB``"/OP!0C[,`3(^R`$B/L0!$C[``0`/@``@GO0!@#`!Z=0`` -M``"/H@`@`B`@(210Q``,``RQ`@`H(3P$@`(DA`BD`@`H(0)`,"$40/_JKZ(` -M,`P`<'0`````)`(``:XB%]P"("`A#``'5R>E`#"/H@`P4$#_X*X@%^@0`/_> +M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!G!`F`@(11`_^T`0(@A#``2E`)@("$4 +M0/_I`$"((0P`&>P"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!GD)`4'(`!` +MB"$D`@<@K@(;\`)`*"$"8"`A#``E`#"/H@`P4$#_X*X@%^@0`/_> M`````">]_^"OL0`4K[``$*^_`!B,@Q?@)`(``0"@B"$`@(`A`Z`H(1!B``NO MH```$B``!JX`%^B/OP`8C[$`%(^P`!`#X``()[T`((^B```0`/_YKB(```P` -M!Y4`````CZ(``!1`__("`"`A#`!1E``````"`"`A#``4K"0%``$0`/_K```` -M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4K`"`@"$D$P`! +M!Y4`````CZ(``!1`__("`"`A#`!2K``````"`"`A#``4L"0%``$0`/_K```` +M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4L`"`@"$D$P`! M`$"((1!```L"`"`A$D```JX`%^BN40``C[\`$(^S``R/L@`(C[$`!(^P```# -MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!Q7``````D8P#(+&4`R(X$ -M&`@`11`A`$`P(20(```D"0#(#`!Q=`!@."$,`'%<`````"1C`,@L90#(C@08 -M0`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8X"``0,`!T8C$0```(`("$,`"D\ +MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!ROP`````D8P#(+&4`R(X$ +M&`@`11`A`$`P(20(```D"0#(#`!RUP!@."$,`'*_`````"1C`,@L90#(C@08 +M0`!%$"$`0#`A)`@``"0)`,@,`'+7`&`X(8X"``0,`!TKC$0```(`("$,`"E6 M/`6```P`!_8"`"`AKA,7X!``_]$`````)[W_\*^R``BOL0`$K[```*^_``R, M@A?@)!(``0"@B"$`@(`A$%(`"@``*"$2(``"KA(7Z*X@``"/OP`,C[(`"(^Q -M``2/L````^``"">]`!`,`!2L`````#P%@``,`"EL`@`@(0P`<7N.!!@(#`!Q -M>XX$&$`,``LT`@`@(0P`$7<"`"`A#``(E0(`("$D!0`!#``*2`(`("$,``@' -M`@`@(8X"``0,`!T*C$0``*X`%^`0`/_>`````">]__"OL````*"`(:^Q``0` -MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!1E`(`("$"("`A)`4`"``` -M,"$,`!$9)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ -M\*^Q``2OL````("((0"@@"&OOP`(#``4;20%``$"("`A$@``"SP%``0,`"D\ -M``````(@("$,`!1M```H(8^_``B/L0`$C[````/@``@GO0`0#``I;#P%``00 -M`/_V`B`@(2>]__`D`@`!K((]`!`,`!2P`````#P%@``,`"F&`@`@(0P``````">]__"OL````*"`(:^Q``0` +MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!2K`(`("$"("`A)`4`"``` +M,"$,`!$=)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ +M\*^Q``2OL````("((0"@@"&OOP`(#``4<20%``$"("`A$@``"SP%``0,`"E6 +M``````(@("$,`!1Q```H(8^_``B/L0`$C[````/@``@GO0`0#``IACP%``00 +M`/_V`B`@(2>]__`D`@`!K((]_]"OM0`4`*"H(20%``&OOP`@K[<` -M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1M -M/!:``CP0@`(FI``0/!>``@``*"&N$C.`KM,SA`P`:S2N]#.(`J`@(0P`:S0D -M!0`!CB4``(X$,X`\`O_QC*-`$#1"__\`!"1``&(8)#P"``X`@B`D`&08):RC -M0!".)0``CL0SA#P"_X^,HT`0-$+__P`$)0``8A@D/`(`<`""("0`9!@EK*-` -M$(XE``".Y#.(/`+_?XRC0!`T0O__``0EP`!B&"0\`@"``((@)`!D&"6LHT`0 -M`B`@(0P`%&T``"@AC[\`((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/ -ML````^``"">]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-@X``"@A#`!1O28$ -M'8P00``'`@`@(0P`-;2,10`D#``UN`(`("$,`#7H`@`@(0P`<=`F!!K(C[\` -M!(^P```#X``()[T`$">]__```"@A)`8``Z^P``"OOP`$#``V#@"`@"$,`''" -M)@0:R`P`<+4`````#``U_0(`("$,`#6_`@`@(0P`<+H`````#``(VP(`("$D +M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1Q +M/!:``CP0@`(FI``0/!>``@``*"&N$CDHKM,Y+`P`;)>N]#DP`J`@(0P`;)]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-F$``"@A#`!2U28$ +M'9`00``'`@`@(0P`-@>,10`D#``V"P(`("$,`#8[`@`@(0P`]__```"@A)`8``Z^P``"OOP`$#``V80"`@"$,`',E +M)@0:R`P`]`!",I0`H)`/_\#"B``\D0@`G`$,X)`"C M&"0`9Q`A`$,0*Q1```<`8#`AO'$``"1C`!``QQ`A`$,0*Q!`__L`````D*(` -M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQ>5&+__```("&4HP`2 -ME((<7%1B__@``"`AE((<6I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# +M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQB5&+__```("&4HP`2 +ME((<8%1B__@``"`AE((<7I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# MX``(K(,:_(R"&ORLH@```^``"*R%&OPGO?_@)`(``:^P``"OOP`, +MK((`)%*@``&N!Q?`C@(`!`)`*"$,`!K:C$0``!(@``0"("@AC@(`!`P`&MJ, M1```H@`:^!``_XBN`!KT#``(TP(`("$`0(@AD@(:^"8E``0D0@`!HB(``"0" M``.B(@`!)`(`0!``_\2F(@`"D@,:^`)`*"$D8@`!H@(:^))"``&B0P``,$(` -M_J)"``&.`@`$#``:QXQ$```0`/]P)A8=C`P`"*X"`"`A$`#_F*X"&MR/OP`< +M_J)"``&.`@`$#``:VHQ$```0`/]P)A8=D`P`"*X"`"`A$`#_F*X"&MR/OP`< MC[8`&(^U`!2/M``0C[,`#(^R``B/L0`$C[````"`$"$#X``()[T`(">]__"O -ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4;0"`D"$"`"`A#``W=`(@ -M*"$"`#`A`@`H(0P`4=@F1!V,`D`@(0P`%&T``"@AC[\`#(^R``B/L0`$C[`` +ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4<0"`D"$"`"`A#``WQP(@ +M*"$"`#`A`@`H(0P`4O`F1!V0`D`@(0P`%'$``"@AC[\`#(^R``B/L0`$C[`` M``/@``@GO0`0)[W_\*^_``"0H@`!,$(``A!```8DI_^D#``(UP````"/OP`` -M`^``"">]`!"@H```H*```8R&&^RDH``"`.`H(0P`"8@DQO_\$`#_]H^_```G -MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;[`"` -MF"$DA!V,)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';0D<``0#`!Z5P(`("$0 -M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'"J)C4`8`+V$"JN<1JX`B"@(:YP -M&KP00``5`J"((0+`@"&.9AOLKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ -M_(YB&^PF$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< +M`^``"">]`!"@H```H*```8R&&_"DH``"`.`H(0P`"8@DQO_\$`#_]H^_```G +MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;\`"` +MF"$DA!V0)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';@D<``0#`![N@(`("$0 +M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'(-)C4`8`+V$"JN<1JX`B"@(:YP +M&KP00``5`J"((0+`@"&.9AOPKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ +M_(YB&_`F$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< M)I$`$!K```BN8!K\`L"`(0(@*"$"8"`A#``(UR80__\6`/_[)C$`1"9P&L@, -M`'&T`@`@(0P`<]__"OL````("`(:^_ -M``0,`''0)(0:F`P`<=`F!!J$)`(``:X"&K2/OP`$C[````/@``@GO0`0)[W_ +M`',7`@`@(0P`]__"OL````("`(:^_ +M``0,`',S)(0:F`P`] -M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`''"`*"`(0P`<<(F)!J8$@`` +M`!#D`D`@(28Q__\&(?_M)A`!'(^_``R/L@`(C[$`!(^P```#X``()[T`$">] +M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`',E`*"`(0P`LC@,`.*X@```"0A`JKA$`.*QQ```40/_N -MKB,`!"8$`"0,`'&'```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G -MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`<+4`H(@AC@0`-(R% +ML@`(K[```#P"@`*OOP`0K[$`!(Q%5TPD@P`T)((`+`"`@"&L@@`PK(,`.*R` +M`"RL@``T``"0(1B@`!0``)@A#`![NB0$``PF4@`!`$"((0!`("$``"@A$$`` +M%R0&``P,`'(-`````#P"@`*,0E=,C@,`.*X@```"0A`JKA$`.*QQ```40/_N +MKB,`!"8$`"0,`'+J```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G +MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`]`"`,``L3`D`@(1!`__<` M0"@A,$(`#R1"`"LD`__P`$,P)`"C&"0`9A`A`$,0*Q1```<`8"`AO'$``"1C M`!``AA`A`$,0*Q!`__L`````C*,`""0"`!`08@`*``````P`"H,"`"`ACZ(` M`"8Q``$"(A`J%$#_XX^_`!P0`/_=C[(`&`P`"O0"`"`A$`#_]X^B```GO?_P MK[(`"*^P``"OOP`,K[$`!(R1``0D`@`!``"`(0(@("&N(A?8#``*@R8R&JP" -M0"`A#`!QAP``*"$,``ZZ`B`@(2H#``440``.)A```5!@``TF,!J8#`!Q7``` -M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`<94"0"`A$`#_[P`````F,!J8#`!Q -MT`(`("$,`'&C)B07T`P`<8XF)!?(`@`@(:X@%]@,`''"`````(^_``R/L@`( +M0"`A#`!RZ@``*"$,``Z^`B`@(2H#``440``.)A```5!@``TF,!J8#`!ROP`` +M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`]_]"OL0`DK[\`+*^R`"BOL``@`*"((8R2``0` M`%`A``!P(1"@`'X``'@AC*T`#(RD`!`QH@`/``(8P`!B&",``QC``D,8(20" M__\0@@`8)'D8>``$$,``1!`A``(0P`!$$",``A"``D(0(8Q$``@D`P`!KZ,` M!!2```X`6!'``&DD`@`& MC<,`!%!B`&<``'@A)BG__(XL`!@!((`A)CC_H!$@`#\D!@`<`29`(24J_Z0E M"``$K4@`!(TK``"10P`.)`7P```+$"L``A$`,&,`[P!B&"6A0P`.CB(``)5# -M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOLE40`#@`+.`H`1A`C)$+_ +M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOPE40`#@`+.`H`1A`C)$+_ M_`&"&"L!@Q`+`(4@)#!"#_\`@B`EI40`#I5&``ZM)_^DC4(`/"0#_?\`#2E` M`$,0)#"E`@``#1E"/`3^_S2$__\`11`E,&,``0!$$"0``QX``$,0):U"`#RM M2``HCB,`$##&#_\D`O__)&0`!*U'`""M6``PK4\`4*U.`$P08@`C`89@(ZU$ M`#@!8$@A%6#_PP``,"$"`$@A$2``#`%`@"$E*O^DC4,`/(TK```\`G__-$+_ -M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#TL``#@A +M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#T\``#@A MCB(`%%!```.N``!4CB(`!*X"`%2/OP`LC[(`*(^Q`"2/L``@`^``"">]`#`D M`G__$`#_W:U"`#@``'@A$`#_F0``<"$,``JD`Z`P(:X@``0"0"`A#``*@P(@ -M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`'#^C)(` -M!`!`("$,`'$!```H(0(@("$,``L3)E,:F`)@("$,`''"`$"`(0)`("$,`!1M +M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`')AC)(` +M!`!`("$,`')D```H(0(@("$,``L3)E,:F`)@("$,`',E`$"`(0)`("$,`!1Q M)`4``8X#``@D`@`0`@`H(1!B`!X"("`ACD(7X`(`*"$40``6`D`@(0P`"H,` -M````)B0`)`P`<:H#H"@ACZ(`````@"$00``$`B`@(0P`"Q,``````$"`(58` -M_^N.`P`(#`!QT`)@("$"0"`A#``4;0``*"$0`/_;`B`@(0P`"YX"("`A$`#_ +M````)B0`)`P`]`"`,`'&T)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FID$"2E -M,.@"(#`A).<(Q"4(6!`E:V08#`!PRR0)#``,`'#DCF1D$!``_^<"0!`A)[W_ -M\*^P``"OOP`$C((;]`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 -M)`(`!PP`>E>N`AL`)$("`"0#_@``0Q`DK@(=Q!``__2N`AL$)[W_X*^_`!RO -MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;[`"`B"$DD!AX)%4`7`"U -M`!H\`H`"4J```0```]`"`,`',7)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FISL"2E +M,.@"(#`A).<.5"4(9[`E:W.X#`!R+B0)#``,`')'CF1SL!``_^<"0!`A)[W_ +M\*^P``"OOP`$C((;^`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 +M)`(`!PP`>[JN`AL`)$("`"0#_@``0Q`DK@(=R!``__2N`AL$)[W_X*^_`!RO +MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;\`"`B"$DD!AX)%4`7`"U +M`!H\`H`"4J```0```L)E(``0)"$"H40/_X`A6`(1``_]P`````$`#_WB03``(GO?_`K[``,*^_ -M`#BOL0`TC((;](S+```D#``!C$,`"`%L$`0`@(`A`&(8)!1@`"D`H$@A+*(` +M)C`:A`P`]__"OL@`( +MH``D$0``!J^@`"@5(``6`````(X"'<@D0AP`KZ(`*`(`("$,`$MR`Z`H(0!` +M&"&.`AOXC$(`:`!B$"M40``&KB,`)(^_`#B/L0`TC[``,`/@``@GO0!`#`!S +M%P(@("$0`/_YC[\`.%$L_^R.`AW()`+_]P%"$"00`/_IKZ(`!">]__"OL@`( MK[$`!*^P``"OOP`,`("`(0``D"$DD1G(C@,:<"0"``$"0A`$`&(8)`)`*"$4 M8``+`@`@(292``$N0@`&%$#_]B8Q`!R/OP`,C[(`"(^Q``2/L````^``"">] -M`!`,`$J'``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` +M`!`,`$N1``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` M!*^P``"OOP`,`("`(0``D"$DD1AXC@(:<"0#``$"0Q@$`$,0)%!```DF4@`! -MC@(;]`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ -MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$JV)E(``0(`("$,`!#@`B`H(1`` -M__(N0@`&)[W_\*^_``2OL```C*8`.`P`2[4`H(`AC@(`+(^_``2/L```K$`` +MC@(;^`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ +MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$O`)E(``0(`("$,`!#D`B`H(1`` +M__(N0@`&)[W_\*^_``2OL```C*8`.`P`3,(`H(`AC@(`+(^_``2/L```K$`` M0`/@``@GO0`0)[W_L*^U`#2OM``PK[,`+*^_`$"OMP`\K[8`.*^R`"BOL0`D -MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.8` +MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.H` M0)`ACD(`4%!```6.40`LC$(``%!```&N0`!0CE$`+(XB`$`40``')C<`0`)@ -M("$,`$VK`B`H(20#``T00P!9C[\`0`)@("$,`!"&`B`H(11``,\D`@`!CB,` -M0*Y@&QP08@`&CE``4%(```6.H@`(ZB`#"50P`(EF(<7E!B``.50P`&$`#_VB5"`!"68AQ<%&+_UR5"`!"50P`$ -MEF(<6E1B_],E0@`0CH(!+"1"``$0`/_TKH(!+`*@*"$,`!`!`B`P(5!`_X6. -ML@`4$`#_/8ZB`!P0`/^#KB``0(YB%]A00/^!C[\`0`P`<:,F9!JL$`#_?8^_ -M`$",@P`4$&``""0$``&,8@`\!$,`!0``("&,8@`@$$```@```````"`A`^`` -M"`"`$"$GO?_PK[$`!*^_``@`@(@AK[```(XB&\P00``4)(08>`P`#JX````` -M)B08L`P`#JX``H`K)B08Z`P`#JX``H`*)B09(`P`#JX``H`*4$```0``@"$" -M`!`AC[\`"(^Q``2/L````^``"">]`!`,``ZN`````!``__<``H`K)[W_\*^P -M``"OOP`$#`!PM0"`@"&.`AO,)@48>!!```L"`"`A#``-K0`````F!1BP#``- -MK0(`("$F!1CH#``-K0(`("$F!1D@`@`@(0P`#:T`````#`!PN@````"/OP`$ -MC[````/@``@GO0`0C*<`*```2"&0X@`!,$(`!!1``!",J``LD.(`%C!#``]4 -M8``-C*(`/)4"`$8``"`A``(1`J#B`!>1`@!',$(`#P`"$0``8A`EH.(`%@/@ -M``@`@!`AC*(`/``"%H(P0@`!5$``#Y#B``&5"0!&D.,`%C$B``\``A$`,&,` -M#P!B&"4`"1$"H.,`%J#B`!>,H@`\/`,$``!#$"6LH@`\D.(``3!"``000/_I -M`2`@(8T&`"!0P/_F`2`@(8S(`"PD!/_PC,<`*"4#``@P8@`/)$(`)P!D&"0` -M1"@D`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(S" -M`#P``A:",$(``51```Z0X@`!D.,`%C$B``\``A$`,&,`#P!B&"4`"1$"H.,` -M%J#B`!>,P@`\/`,$``!#$"6LP@`\D.(``3!"``140/_8C08`(!``_[T!("`A -M)[W_X*^S``P`P)@AK[4`%*^T`!"OL0`$K[```*^_`!BOL@`(`("@(0"@B"$, -M`'"U``"H(1)@`$("8(`AC@(`/``"%D(P0@`!%$``58X2`%`20`!4`H`@(8Y" -M`%000`!1`````!*@`$R.`@`LC$,``(Q"`""NHP``KJ(`((X&`"PF1`!<`@`H -M(:S``""LP```#`!1V`````".0@!X)$(``:Y"`'@2H``"`F"`(8ZP`"!6`/_C -MC@(`/!)@`"$`````EB,`-%!@`!&.(@`8CF0`*)""`!8P10`/4*``"Z8@`#0` -M`Q$"H((`%Y(B`#60@P`!,$(`#P`"$0``HA`E-&,`"*"#``&@@@`6CB(`&%1` -M`!VL4P`@)`(``:XB`"RN,P`4KC4`&`````^.(@`L5$``$(YF`"2.)0`D#`!* -MG`*`("$,`'"Z`````(^_`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P`````!`A -M`^``"">]`"".)0`D#`!*E0*`("$0`/_MKB``+(XC`!B.8@`DK&(``!``_^2N -M-0`8$`#_N(Q3`"`"@"`A#``-H0(`*"&.@ALX4$``&(XB`!Q2```6CB(`'(X" -M`#P``A9",$(``11```D"@"`ACB8`&(XG`#".*``D#`!*_@(`*"%40``*CB(` -M'`*`("$,`"EL/`6``(X"`#`"@"`A/`6```P`*3RN(@`PCB(`'"1"``$20``* -MKB(`'(XB`"2.1`!0``(0P`!2$"&40P`P)(0``:Y$`%`D8P`!I$,`,!``_Y>. -M%0`L)[W_\*^R``BOOP`,K[$`!*^P``",H@!4%$``!P"`D"$DL0!]`!",P@`LC,4` -M6`)`("&,4``@K$```*Q``"`,``]+```X(8XB`!P"`#`A)$+__Q1`__2N(@`< -M$`#_ZZX@`!@GO?_@K[0`$*^S``ROL0`$K[\`%*^R``BOL```C-``,(RB`"2, -MPP!`CA(`4``"$,``H(@A`D(H(20"``(`@*`A$&(`.22S`#".(P`4C&(`/`1" -M`"V,8@`@C@(`/#P#`@".!P`L`$,0):X"`#R.(@`] -M`""L8````&`H(:XB`!0"@"`A#``*8ZQ@`"`0`/_.C@(`/)2C`#".0@!4)`8` -M`:YF``0`0Q`AKD(`5*9C``*.`P`\/`6'_S2E__\``Q;",$(`#R1"``$P0@`/ -M``(6P`!E&"0`8A@EK@,`/(R"&V@``Q[",&,`#P!#$"M40``%CD(`5(R"&K14 -M0``1C((%@(Y"`%268P`")`7__R1"__^N0@!4CH(%A"1C__^F8P`")$(``0P` -M5NZN@@6$`H`@(0P`#]X"0"@A$`#_QB0"__\D0@`!K((%@(X"`#P``A;",$(` -M#Q!&``8`````C@,`*)!B``$T0@`($`#_DJ!B``$,``[T`@`H(1``__BF(@`T -M)[W_\*^Q``2OL```K[\`"`"@@"&.`P!`C*4`,"0"``$`@(@A$&(`3HRD`%". -M(AMH$$``1@``$"%0@`!%C[\`"(RB`"B00@`!,$(`!!!``"6.`P`@$&``/0`` -M$"&,<``LC@(`,(Q"`"B00@`6,$(`#Q!``#LF!``(,((`#R0#__`D0@`G`(,@ -M)`!#*"0`A1`A`$00*Q1```<`@!@AO)$``"2$`!``91`A`$00*Q!`__L````` -M`B`@(0(`*"$,`$Z')`8``1!``"$D`O__C@(`,(Q"`"B00@`!,$(`!!1`_]V. -M`P`@$&``&0``$"&,<``L)`3_\"8#``@P8@`/)$(`)P!D&"0`1"@D`&40(0!# -M$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[``````(@("$"`"@A#`!. -MAR0&``$D`___``(8"P!@$"&/OP`(C[$`!(^P```#X``()[T`$!``__H``!`A -M)[W_T*^Q`"0`H(@AK[(`**^P`""OOP`L#`!PM0"`D"&.,``4$@``&0````". -M0@2PCD,$M(X$`%0D8P`!+&4``0!%$"&N0@2PKD,$M!2``!]`!`0`/_JK@(`4`P`<9P` -M````)`,``11#__,D!``"$`#_W``````GO?_PK[````"`@"$DA``\K[\`#*^Q -M``2OL@`(#`!QC@"@B"$,`'"U`````(X%`$2,HP``$&``'(RB``2L8@`$C*(` -M!"8$`%2,L@`($B```ZQ#``",H@`,KB(``(X"`%`D`___K*```*RB``2.`@!0 -MK*,`"*X%`%"L10``#`!QHZR@``P,`'"Z``````)`$"&/OP`,C[(`"(^Q``2/ -ML````^``"">]`!`0`/_EK@(`2">]_^"OOP`4K[``$(R0``2OH```)@0`/`P` -M<:H#H"@ACZ(```(`("$40``()Z4`!(^B``!40/_X)@0`/(^_`!2/L``0`^`` -M"">]`"`,`!%+`````!``__>/H@``)[W_\"2E__^OL0`$K[\`#*^R``BOL``` -M+*(`&0"`B"$00``4C)(`!#P#@`(`!1"`)&,(X`!#$"&,0@```$``"`````", -MA```#``;"B0%`!$`0(`A)D8$@`!`("$D!0$X#``;/@````".)```#``:O0(` -M*"&/OP`,C[(`"(^Q``2/L````^``"">]`!```#`A`D`@(0P`+H$D!0`"CB0` -M``P`&PHD!0`2`$"`(29&!(@`0"`A$`#_ZB0%``B,A```#``;"B0%`!..)``` -M`$"`(20"`@`0`/_EK@(```P`$ZB,A``$$`#_Y(^_``P,`!/`C(0`!!``_^"/ -MOP`,)[W_T*^S`!ROOP`@K[(`&*^Q`!2OL``0C)(`!`"`F"$#H"@A`F`@(0P` -M$4LF41?L`B`@(0P`<<(`0(`A`D`@(0P`%&TD!0`!CZ8```(`*"$,`!&.`F`@ -M(0)`("$,`!1M```H(0P`<=`"("`A$`#_[0.@*"$GO?_@K[0`$*^S``ROOP`< -MK[8`&*^U`!2OL@`(K[$`!*^P``",D0`$``"@(0``F"&.(A?@5$``"HXB%]PF -M,!K(#`!QP@(`("$,`''0`@`@(8XB%^!00/_Z)C`:R(XB%]P00``X`````"8V -M&N`,`''"`L`@(8XC'*0D`@`#$&(`-0`````D!0`!`B`@(0P`%&TF,AK()C4: -MA`P`<]__"OOP``C*(`!`"@("$``#`A -MC$(7Q"0%`!@40``$```X(8^_```#X``()[T`$`P`$1D`````$`#_^X^_```G -MO?_P`*`@(0``,"$D!0`9K[\```P`$1D``#@AC[\```/@``@GO0`0)[W_\*^_ -M``BOL0`$K[```(R0``0,`'%9`("((0!`("$,`'%7)@4;7(X$&UP\!8``)@<8 -M""8(&!`"(#`A#`!Q822E20P,`'%<`````"1C`,@L90#(C@08"`!%$"$D"``` -M)`D`R`!`,"$,`'%T`&`X(8X$&UP\!8``)@<80"8(&$@"(#`A#`!Q822E24P, -M`'%<`````"1C`,B.!!A`+&4`R`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8^_ -M``B/L0`$C[````/@``@GO0`0)[W_X"2"`$0D@P!,K[$`!`"`B"&OOP`8K[4` -M%*^S``ROL@`(K[0`$*^P```DA``\KB(`2*XC`%```"@AKB``1*X@`$PF,P!4 -M#`!QAXXT``0"8"`A#`!QAP``*"$``*@A``"0(0P`>EH).<)1"4(9+@E:VS``B`P(20)"``,`'#+ -M)`0``8X$;+@,`'#D/!"``CP%@``\!X`"/`B``CP+@`(F"GE@)*5'-"3G"50E -M"&U@)6MY:"0$``$"(#`A#`!PRR0)#``,`'#DC@1Y8`P`$ET"("`A`J`0(8^_ -M`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P```#X``()[T`(!``__4D%0`")[W_ -MT*^P`!``H(`AK[\`(*^S`!ROL@`8`("8(:^Q`!0,`'%"KZ``!`P`*.@"`"`A -M%$``$B02``$,`'%0`F`@(20"``$20@`)``````)`$"&/OP`@C[,`'(^R`!B/ -ML0`4C[``$`/@``@GO0`P#`!Q20)@("$0`/_V`D`0(0(`("$#H"@A#``H[2>F -M``0`0(@A,$(``11``%`"`"`A,B(`(%1``$:.`@2$,B((`!1``#X"`"`A,B(` -M0!1``#<"`"`A/`(`!`(B$"040``O`@`@(3(B`(`00``2`````(X"&\Q00``B -MC@48G(^B``0P0@`(5$``&HX%&42/H@`$,$(`!%1``!*.!1D,CZ(`!#!"``)4 -M0``*C@48U"0"_W\"(H@D$B#_Q:^@``".`AV$)!(``P!1$"40`/_`K@(=A`P` -M2IP"`"`A$`#_]20"_W\,`$J<`@`@(1``_^V/H@`$#`!*G`(`("$0`/_ECZ(` -M!(^B``0`LA@$`$,0)!!`_^D`````$`#_[@`````,`"EL/`4`!!``_]`R(@"` -M#``I;"0%`$`0`/_(/`(`!`P`2@HD!0`!)`+W_Q``_[\"(H@D`@`@(20%`"`D -M0@`!#``I;*X"!(00`/^V,B((``P`*6PD!0`!$`#_KS(B`"`GO?_@K[0`$*^R -M``BOL```K[\`%*^S``ROL0`$C,,] -M`"`,`#>``````%1```..!``$$`#_Z0)3D"4``#`A```X(0P`$1DD!0`#4$#_ -MY`)`*"$0`/_A`E.0)2>]__"OL```K[\`!(R"%^`00``/`("`(8R"%]P00``, -M)`(``HR#'*008@`))`(``1!B``B/OP`$#`!PM0`````,`##@`@`@(0P`<+H` -M````C[\`!(^P```#X``()[T`$">]_]"OL0`DK[\`+*^R`"BOL``@C((7X!!` -M`"8`@(@AC((7W!!``",D`@`"C(,)`(``1``_]RN(AL<)[W_X"0#``&OLP`,K[(`"*^Q``2O -ML```K[\`$`"@D"$`P)@A`("`(1"C`$8``(@A4*``,(R"'*0D`@`"$*(`$R0" -M``,0H@`,`````%(@``&N$ARD5F```:YQ``"/OP`0C[,`#(^R``B/L0`$C[`` -M``/@``@GO0`@#``4K"0%``(D$0`6$`#_\0`"B`H,`"EL/`6```(`("$,`!2L -M```H(201`!8"`"`A#``(E0`"B`HD!0`!#``*2`(`("&.`@`$#``="HQ$```, -M`%&4`@`@(0(`("&N`!?@#``I/#P%@``"`"`A#``4K"0%``$0`/_7`````!!# -M``D``````@`@(0``*"$,`!2L`````%1`_\\D$0`6$`#_S0````",@A?@4$#_ -M]P(`("&,@@`$#``=&(Q$```,`''0)@0:X!``__`"`"`AC((7X%1```2,@@`$ -M`@`@(1``_^LD!0`!#``="HQ$```,`''")@0:X!``__D"`"`A)[W_\*^P```P -ML`#_K[\`#*^R``BOL0`$``"0(0P`<+4`@(@A#`!Q-``````2```:CB(]`!`,`#3E)`8``8X#%]PD -M$@`6$&``!``"D`J.`A?@$%$`&3P%@``60/_O)`(``8X#'*A08@`/C@(%)`8``1!```0`0)`A)!(`%A9` -M_[X"0!`A`@`@(1``_]]__`D@@`4 -M)(,`'*^R``BOL```K[\`#*^Q``0`@(`AK((`&*R#`""L@``4K(``'```D"$, -M`'I7)`0`#`!`B"$2(``1)`(``@(@("$``"@A#`!PJB0&``R.`@`@)E(``2I# -M``*N$0`@KB```*XB``048/_PK%$``"8$``P,`'&'```H(0``$"&/OP`,C[(` -M"(^Q``2/L````^``"">]`!`GO?_PK[\``(R&`!R,R```$0``$0"`."&,P@`$ -MK0(`!(SB`!B,PP`$).0`#*S"``2,X@`8K&@``*S%``BLP```K.8`&`P`<:.L -M1@``C[\```/@``@GO0`0C,(`!!``__"L@@`@)[W_\*^Q``0`@(@A)(0`#*^_ -M``@,`'&.K[````P`<+4`````CB0`%(R%```0H``3C((`!*RB``2.(@`@C(,` -M!(R0``BL@@`$CB(`(*QE``"N)``@K(```*R```@,`'"ZK$0```(`$"&/OP`( -MC[$`!(^P```#X``()[T`$!``_^ZN(@`8,*8`#R>]_?`D`O_P),,`3Z^T`@`` -M8A@D`*"@(0"B*"0`HQ`AK[$!]*^_`@ROM@((K[4"!*^S`?ROL@'XK[`!\`!% -M$"L`@(@AC),`!(R6``"OH`"TKZ``H!1```<`H"`AO+$``"2E`!``@Q`A`$40 -M*Q!`__L`````CH,``"QB`$%40``1CH(`#`!F$"$D0@`/)`/_\`!#*"0"@Q@D -M`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(Z"``P4 -M0`.[CI``!```J"$F!?__+*(`0Q!``!L\`X`"``40@"1C"80`0Q`AC$(```!` -M``@`````)Z4`H">F`*0,`!MH`H`@(0*`("$GI0"@#``;:">F`*@"@"`A)Z4` -MH`P`&V@GI@"L`H`@(2>F`+`,`!MH)Z4`H`(@("$"8"@A#``'PR>F`+02H``' -M`L`@(8Z"``@"H"@AKJ(`"(^B`+0,`!J]KJ(`#(^_`@R/M@((C[4"!(^T`@"/ -MLP'\C[(!^(^Q`?2/L`'P`^``"">]`A`"@"`A)Z4`H`P`&V@GI@"XCZ8`N`(@ -M("$"8"@A#``&\">G`+00`/_D``````)@("$,`%>0)Z4`M!``_]\``````H`@ -M(2>E`*`,`!MH)Z8`O(^E`+P"8"`A)Z8`P```."$,`%!<)Z@`Q(^E`,`,`!LW -M`J`@(8^B`,`00``1CZ4`O`*@("$GI0#(#``;5R>F`,R/I0"\CZ<`R`)@("$G -MI@#0#`!07">H`,2/I0#0`J`@(0P`&V$`````$`#_OP`````"8"`A)Z8`P">G -M`-0,`%!<)Z@`Q(^E`-0"H"`A#``;-P`````0`/^T`````">E`*`GI@#8#``; -M:`*`("$"@"`A)Z4`H`P`&V@GI@#F`.B/ -MI0#8CZ<`Z`)@("$0`/_U```P(0*`("$GI0"@#``;:">F`.R/I0#L`F`@(2>F -M`/```#@A#`!8(2>H`/2/I0#P#``;-P*@("&/H@#P4$``#H^E`.P"H"`A)Z4` -M^`P`&UF`/`GIP$`#`!8(2>H`/2/I0$`$`#_N@*@("$"("`A)`4``0``,"$, -M`!$9```X(1``_VH``````F`@(0P`!O,GI0"T/`2``@P`<'0DA`ET$J#_:X^_ -M`@P,`"YR`F`@(0*@("$0`/^F`$`H(0)@("$,``E`+00`/].`````">E`*`GI@$$ -M#``;:`*`("$"@"`A)Z4`H`P`&V@GI@$(`H`@(2>E`*`,`!MH)Z8!#`*`("$G -MI0"@#``;F`1"/I0$$CZ8!"(^G`1`,`%#?`F`@(1``_S<`````)Z4`H">F -M`10,`!MH`H`@(0*`("$GI0"@#``;:">F`1@"@"`A)Z4`H`P`&V@GI@$E`*`,`!MH)Z8!/(^E -M`3P"8"`A#``4$">F`+00`/\#``````*`("$GI0"@#``;:">F`42/I0%$#``' -MW0)@("$0`/[Z`````">E`*`GI@%(#``;:`*`("$"@"`A)Z4`H`P`&V@GI@%, -MCZ4!2(^F`4P,``@6`F`@(1``_NP`````)Z4`H">F`5`,`!MH`H`@(0*`("$G -MI0"@#``;:">F`50"@"`A)Z4`H`P`&V@GI@%8`H`@(2>E`*`,`!MH)Z8!7(^E -M`5"/I@%4CZF`6`,`!MH`H`@ -M(0*`("$GI0"@#``;:">F`60GL``0`H`@(2>E`*`,`!MR)Z8!:`(`("$``"@A -M#`!PJB0&`!R/HP%DCZ(!:)>E`6("8"`A`@`P(:^B`!2OHP`D#`!/@*^C`!P0 -M`/ZX``````*`("$GI0"@#``;:">F`6R/I@%L`F`@(0P`3\@``"@A$`#^K@`` -M```,`!VR`F`@(1``_JH``````H`@(2>E`*`,`!MH)Z8!<(^E`7`,`"F>`F`@ -M(1``_J$`````)Z0`,```*"$,`'"J)`8`!@*`("$GI0"@#``;:">F`70"@"`A -M)Z4`H`P`&V@GI@%X`H`@(2>E`*`,`!MH)Z8!?`*`("$GI0"@#``;F`8"/ -MI@&`EZ4`-```@"&4QP`4E,0`!"3#``@XX@`'$*0`,P!B@`L`P(@ACZ,!="QB -M``040``8``,0P`!#$"$``A#``$,0(P`"$(`"8A`A)$/[F"0"``<0X@`B)`(` -M!*1B`18D`@`#$.(`&B0"`!`0X@`8)`(`$5#B`!>48@$6).+__BQ"``(40``" -M)`0`""0$``2D9`$8#``(E0)@("&.8AM4`F`@(0(@,"$D0@`!KF(;5(^E`72/ -MJ`%X#``IO`(`."$,``A^`F`@(1``_ED`````E&(!%B1"``00`/_HI&(!%J1@ -M`1@0`/_KI&`!%I>C`#*4P@`"%&+_S`#`B"&7HP`PE,(``!1B_\<``(@A$`#_ -MQX^C`70GI0"@)Z8!A`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!B`*`("$GI0"@ -M#``;:">F`8R/IP&,CZ4!A(^F`8@,`"P_`F`@(8^C`80``A0```(D`RQB``04 -M0/XQ``,0P`!#$"$``A#``$,0(P`"$(`"8A`A$`#^*J1$_*P"@"`A)Z4`H`P` -M&V@GI@%`CZ4!0`P`5W\"8"`A$`#^(0`````GI0"@)Z8!D`P`&V@"@"`A`H`@ -M(2>E`*`,`!MH)Z8!E`*`("$GI0"@#``;:">F`9@"@"`A)Z4`H`P`&V@GI@&< -M)Z4`H">F`9P"@"`A#``;:(^P`9P"@"`A)Z4`H`P`&W(GI@&@CZ8!E(^G`9B/ -MJ`&@CZD!D`)@("$"`%`A#`!0$@``*"$0`/W^`````">E`*`GI@&D#``;:`*` -M("$"@"`A)Z4`H`P`&W(GI@&HCZ4!J`P`+2("8"`A$`#]\0`````GL``X`F`@ -M(0P`+>T"`"@A`J`@(0(`,"$D!0`(#``;/@`````0`/WF``````P`+@0"8"`A -M$`#]X@`````D`@`"KF(;L`P`+A("8"`A$`#]W``````GI0"@)Z8!K`P`&V@" -M@"`A`H`@(2>E`*`,`!MH)Z8!L">E`*`GI@&P`H`@(0P`&VB/L`&P`H`@(2>E -M`*`,`!MR)Z8!M(^C`:PD`O__$&(`)0`#$,``0Q`A``(0P`!#$"./I0&T``(0 -M@`)B$"$D1@`0`*88)3!C``,D1``($&``'R2G`"``X!@AB*(``)BB``.(IP`$ -MF*<`!XBH``B8J``+B*D`#)BI``^HP@``N,(``ZC'``2XQP`'J,@`"+C(``NH -MR0`,N,D`#R2E`!`4H__N),8`$("B``"@P@``#`!2Q0(`*"$6`/VACZ4!M`P` -M+BX"8"`A$`#]G0````",H@``C*,`!(RH``B,J0`,K,(``*S#``2LR``(K,D` -M#"2E`!`4I__V),8`$!``_^H``````H`@(2>E`*`,`!MH)Z8!N(Z"``P00``? -MCZ,!N"0"``408@`()`(`!!1B_80"8"`A```P(0P`+H$D!0`$$`#^(0*@("$" -M8"`A)Z8`0`P`+H$D!0`%CZ(`0">F`%@"H"`AKZ(`6(^B`$0D!0`4KZ(`7(^B -M`$BOH@!@CZ(`3*^B`&27H@!2IZ(`:)>B`%80`/^"IZ(`:H^E`;@"8"`A#``N -M@0``,"$0`/UE``````P`+PX"8"`A$`#^`P*@("$GI0"@)Z8!O`P`&V@"@"`A -M`H`@(2>E`*`,`!MH)Z8!P(^E`;R/I@'`#``RH0)@("$0`/U3``````P`,XT" -M8"`A$`#]3P`````"@"`A)Z4`H`P`&V@GI@'DCZ4!Y`P`,\$"8"`A$`#]1@`` -M```"@"`A)Z4`H`P`&V@GI@'HCF8<_(^E`>@,`#,5`F`@(1``_3RN8AS\)Z4` -MH">F`30,`!MH`H`@(0*`("$GI0"@#``;:">F`3B/I0$TCZ8!.`P`-@4"8"`A -M$`#]+@`````GI0"@)Z8!+`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!,(^E`2R/ -MI@$P#``V#@)@("$0`/T@``````P`2'\"8"`AKF(%L"9E&W`,`#KG`F`@(1`` -M_1@`````)[`!Q`*`("$GI0"@#``;:`(`,"$"@"`A)Z4`H`(`,"$,`!MHE[(! -MQB>E`*`GI@'(`H`@(0P`&VB7L0'&`H`@(2>E`*`,`!MH)Z8!S`*`("$GI0"@ -M#``;:">F`=`"@"`A)Z4`H`P`&V@"`#`A`@`P(0*`("$GI0"@#``;:(^P`<2/ -MIP'(CZ@!S(^I`="/JP'$)Z(`M`)@("$"0"@A`B`P(0(`4"&OH@``#`!7EZ^@ -M``00`/SJ``````P`.F<"8"`A$`#\Y@`````"@"`A)Z4`H`P`&V@GI@'4CZ4! -MU`P`0=<"8"`A$`#\W0`````"@"`A)Z4`H`P`&V@GI@'8CZ(!V`*`("$GI0"@ -M``*`P`("@",,`!MH)Z8!W``0B("/H@'<`G&((28Q&E`*"N -M(@`$#``;:">F`=R/H@'<`H`@(2>E`*"OH@"`)Z8!W`P`&VBN(@`(CZ(!W`*` -M("$GI0"@KZ(`A">F`=P,`!MHKB(`#(^B`=P`$(#``H`@(:^B`)`GI0"@KB(` -M$">F`=P,`!MH`G"`(280&'B/H@'F`20"@"`A#``;:(^P`20" -M@"`A)Z4`H`P`&W(GI@$HCZ8!*``0$,``4!`CC,,````"$(``4Q`AK$,9R(S# -M``0D0AG()`<``:Q#``2,PP`(`@F`>"/HP'@`F`@(0`#$,``0Q`C``(0P`!3$"$, -M`$J'C$48G!``_&T``````H`@(2>E`*`,`!MH)Z8![)>B`>X0`/QFIF(;\`+` -M("$,`!L*`@`H(11`_$,`0*@A)`(``A``_&:OH@"T)[W_\*^Q``2OOP`(`("( -M(0P`]__"OL@`(K[$`!*^P``"OOP`,`("`(0P`%4,\ -M$H`#/`6``#P'@`(\"(`"/`N``P!`B"$F2HH()*5F;`(`,"$DYPJ0)0AZ""5K -MBA`D!``!$$``""0)$``"(!`AC[\`#(^R``B/L0`$C[````/@``@GO0`0#`!P -MRP`````,`'#DCD2*"!``__4"(!`A)`(``:R"`#`\`H`"K$5$1#P"@`*L140\ -M`^``"```$"$GO?_0K[0`(*^R`!BOL0`4K[``$*^_`"0\$(`"K[,`'(X%,N`\ -M!H``/`>```"`B"$DQFI0```@(23G:K@GJ@`!)Z@`!`P`66L#H$@A/`*``HQ4 -M1$`\`H`"C$9$.(X#,N"3H@``CZ4`!*QQ``"@8@`(K&4`!).B``&.!#+@``"0 -M(:""``F.`C+@K$8`$*Q4``P\$X`"CG`RX`P`>E<"@"`ACF,RX``2B(`",(`A -MK@(`%`(CB"&.)``4#``;'B92``$J0@`"5$#_\SP3@`*.9#+@#``:VB02``\\ -M$(`"C@(RX"92__\,`'I7C$0`#(X$,N`,`!KW`$`H(09#__@\$(`"C@(RX(^_ -M`"2/M``@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`P)[W_T#"B``\D0@!-)`/_ -M\*^R`!@`H)`A`$,H)`)#&"0`91`A`$,0*Z^Q`!2OOP`@`("((:^S`!ROL``0 -M%$``!P!@("&\<0``)&,`$`"%$"$`0Q`K$$#_^P````"20@`!DD0``)(C`$`0 -M@P`2,%,``8XC`#B.(@`\K&```(XD`#0D0@`!$(``!:XB`#P,`!LIC)```!8` -M__T"`"`AKB``1*X@`#2B(`!`DD(``!1``$(`````DD(``%1```6.(@!$KC(` -M-*XR`#BN(`!$CB(`1)9#``*.)``X`$,0(:R2``"N(@!$%F``"ZXR`#B2(@!` -M)$(``:(B`$"/OP`@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`PKD```(XC``". -M(@`THB``0"1D`"0D4@`$KB``-`.@*"&,<``$#`!QJJ^@``".0P`()`(`$!!B -M``J/H@``5$``"8XB``".`A?8)`,``5!#``6.(@``C@(:M!!#`` -M`D`H(0P`<=`"`"`A$`#_TH^_`"`,`!LI`D`@(1``_\Z/OP`@)[W_\*^_```0 -MX``-,*(`_Q!```8`P"@A#``:(@````"/OP```^``"">]`!",A```#``5:P#` -M*"$0`/_ZC[\``!!```4`P"`A#``;*0`````0`/_TC[\```P`&QX`P"`A$`#_ -M\(^_```GO?_P,*(`_Z^_```40``&`,`H(0P`&Q8`````C[\```/@``@GO0`0 -MC((```P`":*,1``$$`#_^H^_```GO?_PK[\``(RG``",A``$`*`P(0P`6@0` -M`"@AC[\```/@``@GO0`0)[W_\*^_```\`H`"C$(RY`"@,"$00``+D(4`,Y3" -M``(D1P`$#`!:!(R$``2/OP``)`0``3P#@`*L9#+D`^``"">]`!`0`/_W)`<' -M("2"`!PGO?_PK(``)```*"&OOP``#`!QAP!`("&/OP```^``"">]`!`GO?_P -MK[````"`@"$DA``]__"OOP`$K[````P`&N0`H(`AK%``!(^_``2/L``` -M)`,`(*Q#```#X``()[T`$">]__"LH``$K[\```P`&O<`````C[\```/@``@G -MO0`0)[W_\*^_```\`H`"C$(RX`"`,"$``"@A#`!9[HQ$``2/OP```^``"">] -M`!`GO?_PK[\``#P"@`*,0S+@`(`P(3P"B(B090`SC&0`!#1"B(@,`%GNK,(` -M`(^_```#X``()[T`$(R"````@A`AK$4``(R"```D0@`$`^``"*R"```GO?_P -MK[\`"*^Q``2OL````("((8R$````H(`A)`+__`(D("$`P"@AK)````(`,"$D -MA``$)A```PP`<)T"`H`DCB(``(^_``@`4!`A)$(`!*XB``"/L```C[$`!`/@ -M``@GO0`0C(,``"0"`@``0Q`C$*```@"#("&LI```5,```:S"```#X``(```` -M`(R#```DI0`#)`+__`"B*"0`91@A`^``"*R#```0H``"```8(8RC````@Q`A -MC$(`(!"@``(D8P`$K*,```/@``BLP@``C*(```""("$0P``")(0`(*S$```# -MX``(`````">]__"OOP`$K[````P`:_(`@(`A)`,``:X#``RN`@``K@``"*X` -M``2/OP`$C[````/@``@GO0`0)[W_\*^P``"OOP`$C((`.`"`@"$40``F)`0` -M`0P`:LDD!``!#`!K\@````"N`@`L#`!K]20$``*.`@`````H(0P`%-^,1``$ -M%$``$P````".`@`P%$``#```("&.`@`X%$``!0``("&/OP`$C[````/@``@G -MO0`0#`!K#P`````0`/_ZC[\`!`P`:P$`````$`#_\XX"`#@,`&OUC@0`+`P` -M:LD``"`A$`#_[8X"`#@,`&L/`````!``_]@`````)[W_\*^P``"OOP`$C((` -M.`"`@"$40``=)`0``8X"```D!0`!#``4WXQ$``000``%`````(^_``2/L``` -M`^``"">]`!`,`&OUC@0`+`P`:LD``"`AC@(`,!1```@D!``!C@(`.!!`__,` -M`"`A#`!K#P`````0`/_PC[\`!`P`:P$`````$`#_]XX"`#@,`&L/`````!`` -M_^*.`@``)[W_\*^P``"OOP`(K[$`!(S#`"@D`@`!$&(`!@#`@"&/OP`(C[$` -M!(^P```#X``()[T`$*S``#P,`'$T``````P`&[<"`"`AC@(`*!1``"```"`A -M$(``$`````".`@`\/`,``C1C2?`D0@`!K@(`/(X"`#P`8A@K$&``!P````". -M`@``C$(`!(Q1%^@D`@`!$B(`"@`````,`!S\C@0`!"0$``4,`'%)``````P` -M<3L`````$`#_VX^_``@,`!N'`@`@(20$``L0`/_VKA$`*`P`'0..!``$#``= -M(XX$``0\`P`"`$`@(1!```XT8TGPC@(`/"1"``&N`@`\C@(`/`!B$"M00``( -MC@(`*(X"``",0@`$C$,7Z"0"``$08O_-`````(X"`"@40/_I`````!``_\@` -M````)[W_\*^Q``2OL````*"((:^_``@,`'%"`("`(0(`("$"(#`A#``;W@`` -M*"&/OP`(C[$`!(^P```D`@`!`^``"">]`!`GO?_PK[```#P'@```@(`A/`B` -M`"2)`"0DB@`().=PL"0$``LE"&]X```H(:^_``0,`'$(`@`P(8X"`"040``% -M`$`@(8^_``2/L````^``"">]`!`,`'$F`````!``__J/OP`$)[W_\"0#``&O -ML```K[\`"*^Q``00HP`1`("`(5"@`!*,@@`H)`(``A"B``PD`@`#4*(`!HR" -M`"B/OP`(C[$`!(^P```#X``()[T`$%1`__JL@``H$`#_^8^_``BN```\$`#_ -M]H^_``@40/_TC[\`"(R"``",0@`$C%$7Z%8C__"/L0`$#``<]8R$``0,`'%" -M)`0`!0P`&X<"`"`AKA$`*`P`<4DD!``+$`#_Y(^_``@GO?_PK[(`"`"`D"$D -M!`!`K[$`!*^P``"OOP`,#`!Z5P"@B"$`0(`A$@``%```$"$``"@A)`8`0`P` -M<*H"`"`A)@0`+*X2``"N$0`$#``;>:X``"@,`'%))`0`!`P`'#T"`"`AC@0` -M!#P%@``DI7%8#``]`!``0/@)C(0`+!``__N/ -MOP``)[W_\*^_``",@@`H%$``!"0%``&/OP```^``"">]`!``0/@)C(0`+!`` -M__N/OP``)[W_\*^_``",@@`H%$``!"0%``*/OP```^``"">]`!``0/@)C(0` -M+!``__N/OP``)[W_\*^_``",@@`H%$``!"0%``./OP```^``"">]`!``0/@) -MC(0`+!``__N/OP``)[W_\*^_``2OL````("`(8R$``2N!@`L/`:``*X%`"@D -MQG*<#`!9U```*"&.!``$/`:``"3&]__"OOP``#`!:SXR$``2/OP`` -M`^``"">]`!`GO?_PK[\```P`6N",A``$C[\```/@``@GO0`0)[W_\*^_``2O -ML````("`(0P`6M>,A``$#``<_`(`("$,`!T#`@`@(8^_``2/L````^``"">] -M`!`GO?_PK[```*^_``0,`!SU`("`(0P`6MN.!``$C[\`!(^P```#X``()[T` -M$">]__"OOP``#`!:](R$``2/OP```^``"">]`!",@@`````H(8Q"0"`P1@#_ -M/`.``@`%$(`D8S,P`$,@(92"```DI0`!$,(`!2RC``A48/_X/`.``@/@``@` -M`!`A`^``")2"``(D`A0`I((`"B0""9ZD@@`()`(`!:2"`!0D`@`$K((`8"0" -M`!ZD@@`<)`()*J2"`'0D`@`'K((`>"0"``\D`P`")`4``20&``,D!P`\H((` -M4R0"$`"LA0!(H(8`?*"#`'VL@@!4I(<`6JR```2@@P`6H(``%ZR%`'"LA@`` -MK(``:*R``&RL@`!,K(``9*R``#2D@`!]_^"O -ML````("`(20$'`!`&"$``(`A/`*``B12,N@`$!#``%(0(91"```00P`& -M)`(`"280``$J`@`)%$#_]SP"@`(D`@`)$@(`%20#``$,`'I7)`0`O*XB&_00 -M0``0)`/__P``*"$D!@"\#`!PJ@!`("$,`!T\)B0;:``0$,``4A`AC$(`!`!` -M^`D"("`A%$``"P!`@"&N<0```@`8(8^_`!"/LP`,C[(`"(^Q``2/L````&`0 -M(0/@``@GO0`@#`!Z:HXD&_00`/_SKB`;]!``__(D$``")[W_\"0%``X``#`A -MK[(`"*^Q``2OL```K[\`#`P`'B``(40`!K)!0$```4 -M$$`D4?Z`#`!Z5P(@("$`0)@A$$#_YB0$``("(#`A`$`@(0P`<*H``"@AC@(; -M]"01`,`"-!@KK%,`M!!@``P"8)`A`B`H(0(`("$"H#`A#``LKR8Q``$40``* -M`C08*Y>B``*F0@``%&#_]B92``("@"@A#``@YP)@("$00``*`````!)@``8D -M!0`6#`!Z:@)@("&.`AOTK$``M"0%`!80`/_#`*`@(0P`>EB``(0`/^,`H*@)2Q"``440/]U)`0`%A``_VX"`"`A+((``A1`_W`D -M!``6$`#_#S0"@``GO?_PK[$`!*^P``"OOP`,K[(`"(R"&_0`@(@A)`0`(`P` -M>E>,4@"T$$``%P!`@"$`0"`A```H(0P`<*HD!@`@CB(;]`(`*"$"("`A#`!( -M#JQ0``0``(`A`@`H(0(@("$,`"F>)A```2H"`(`40/_[`@`H(8XE&_0,`#\Y -M`B`@(11```\`````$D```P`````,`'IJ`D`@(0P`'WP"("`A)`0`%H^_``R/ -ML@`(C[$`!(^P````@!`A`^``"">]`!`,`#3``B`@(0P`+V0"("`ACB0;]#P# -M@`(D8RRT/!"``CP'@``\"(``/`J``ZR#`!BN(A?$)@E'L"3G2\`E"$VH)4JA -M8```*"$"(#`A#`!Q"```("$,`'$FC@1'L`P`<4D``"`A#`!Z:@)`("&.(QOT -M)`(`"@``("&L8@!H$`#_V:Q@`+0GO?_@K[0`$*^_`!2OLP`,K[(`"*^Q``2O -ML```C)(;](Y0```2```=`("@(8X$``04@`!!`````(X$``@4@``Z`````(X$ -M``P4@``S`````(X$`!`4@``L````````F"$"`(@ACB(`%"9S``$40``B`$`@ -M(8XB`!PF,0`,%$``&@!`("$N8@`#5$#_]XXB`!0,`'IJ`@`@(:Y```".1``$ -M%(``#0`````"@"`A#``_1@)`*"&/OP`4C[0`$(^S``R/L@`(C[$`!(^P```` -M`!`A`^``"">]`"`,`'IJ`````!``__&N0``$#`!Z:@`````0`/_E+F(``PP` -M>FH`````$`#_W8XB`!P,`'IJ``"8(1``_]0"`(@A#`!Z:@`````0`/_,C@0` -M$`P`>FH`````$`#_Q8X$``P,`'IJ`````!``_[Z.!``(C(,;]"0"``XD8P`T -M`^``"``#$`LGO?_0K[0`(*^R`!BOL``0K[\`)*^S`!ROL0`4C)$;]"0%`+\# -MH#`ACB(```"`D"&GH``$#``LKXQ3``0F,``T%$``I@!`H"&.0AOTEZ,``(Q" -M``"N(P`TE$(``"Q"4`,40`"_)Z8`!`)`("$,`"RO)`4`RA1``)D`0*`AEZ(` -M!#!"#\```A%"-$(``:X"`#R.0AOTC$(``)1"```L0E`!$$``IR>F``*GH``" -MEF(`$I9D`!"68P`4``(0@`""("4``QC`EF4```"#("4T@@`"`$4@"I9C``(` -M@"@A-*(`$)>D````0R@*,*(``11```.N!```)`+__0"B*"0PH@`(%$``!"0" -M"0@D`O_O`*(H)"0""0BF`@!$ED(<]C!"`/`L0@`P$$``A*X%``260QSP)`(` -M!Q!B``4D`@G$)`(`"A!B``(D`@G$)`(*K*8"`$:7J``")`(3.*8"`$`D`A?4 -MI@(`0C$#``(D`@`!K@(`8*X``%P48``(```P(99#'/`L8@`&4$``!"0&``$D -M`@`%4&(`8I9#'/*61!SP)`(``:X&`%@L@P`&K@(`4*X``$P08`!8```P(20" -M``50@@!2ED(<\C$$__\`!!!".$(``20'``$P0@`!,0,``:X&`%2N`@!(K@<` -M"*X'``P48``#```P(3"B``D``C`K``00PCA"``$P0@`!,0,`!*X&`!"N`@`4 -M%&```P``,"$PH@`)``(P*Y9B``:.9``8``49`C!C``&N!@`8K@,`(*X'`"2N -M`@`HK@<`'!"```0``"@ACF(`'%1```,D`@`!)`4``20"``$Q`P'PK@(`,*X% -M`"P48``"``,1`B0"``HQ`_``$&``'ZX"`#0``QL")`(``0!B$`2N`@`XCD(; -M](Q#``"7H@`$,$(/P``"(4*48@``+$)0`Q1```.N!``\-((``:X"`#R"8@`@ -M`D`@(:X"`&2"8@`A#``?SJX"`&@"@!`AC[\`)(^T`""/LP`]`#`0`/_D)`(`@"Q"``@40/^N,03__Q``_ZLD!@`!)`(``A!B -M``,L8@`$5$#_G)9$'/`0`/^9)`8``1``_X0D`@G$`D`@(0P`+*\D!0#)%$#_ -MXP!`H"&7H@`"$`#_5*9B`#@"0"`A#``LKR0%`,H40/_;`$"@(9>B``0P0@P` -M``(90JX#`#P0`/]"IZ(`!">]_]"OLP`B -M``"3HP`!``(2`J(#``"B`@`!%(#_\B80``*20P`+)`(`_Q!B``H``(@AHD`` -M#(^_`""/LP`] -M__"OL````("`(:^_``0,`'I7)`0!6*X"``000`!")`,``@!`("$``"@A#`!P -MJB0&`5@,`'I7)`0#9*X"``@00``Y)`,``@!`("$``"@A#`!PJB0&`V2."0`( -M)`(`"B0(``FE(@`4)`(``Z4B`AXE(P`<)`(`"R4(__^D8@``!0'__21C`#0` -M`$`A`2`X(3P#@`(\`H`"``@@0"1C%X0D0A=\`((0(0"#&"&41@``E&,``"4( -M``$`B2`A)`(`"RD%``.D@P(@I(8")J3B`C*DX@+.%*#_[B3G`#0,`'I7)`0` -MB*X"``P00``/)`,``@!`("$``"@A#`!PJB0&`(@,`'I7)`0(`*X"`!`00``& -M)`,``@!`("$``"@A#`!PJB0&"````!@AC[\`!(^P````8!`A`^``"">]`!`G -MO?_@K[\`$*^S``ROL@`(K[$`!*^P``",@AOT`*!((3##__^,4P``EF(``"Q" -M,`,40``ICG``")8&`!0``)`A`D80*U!``!"6`@`4`@`X(0`#$$``21`AE$@` -M`"92``(D8P`!,00`_P`($@("1B@KI.(``*3D``(P8___%*#_]"3G``26`@`4 -M$$``#```D"$"`(@AEB4``)9D`````#`A#``HGB92``&6`P`4IB(```)#&"L4 -M8/_W)C$``H^_`!"/LP`,C[(`"(^Q``2/L````^``"">]`"```Q!``$40(91( -M```D8P`!,&/__P!@*"$`"#%```@8@@`($D(PQ@!_,&,`?P`%($"F!@`$I@(` -M`*8#``(`B2`AE(@``"2E``$PH___`&`@(0`($L(`""C```@9`@#","4PI0!_ -M,&,`?P`$$$"F!0`(I@8`!*8#``8`21`AE$@``"2$``$P@___`&`@(0`($T(` -M"#A```@9@@"B*"4PYP!_,&,`?P`$$$"F!P`,I@4`"*8#``H`21`AE$@``"2$ -M``$PA/__``@I@``(,\(`"!("``@80C"E`'\P0@!_`.8X)3!C`'\`!"!`I@4` -M$J8"``ZF!P`,I@,`$`")("&4B`````@2@@"B*"40`/^HI@4`$B>]_\"OMP`L -MK[4`)*^Q`!2OOP`TK[X`,*^V`"BOM``@K[,`'*^R`!BOL``0C((;]##&__^O -MI0``C%0``*^F``0``+@ACH(`!(Z2``@``(@AE%X`$@``J"$D`@`!```@(1*B -M`'>/HP`$4J``<997`!0D`@`"$J(`9P`````2X`!5``"P(0`#$$"/HP```("8 -M(0!#@"&68@``)B<`"*8B``"6"@``)A```@`*((``"BD"``HR@C"E`#\PA``_ -MIB0`'J8F``2F)0`"E@H``"80``(`"DN"``I!```*$@(`"AB"`(D@)3$(`#\P -M0@`_,&,`/Z8H`"2F)``>IB(`(*8C`"*6"@``)A```@`*&P(`"A&"`0-`)3!" -M`#\Q0P`_IB@`)*8B`":F(P`HE@H``"80``(`"D"```H9`@`*$H(Q"``_,&,` -M/Z8H`"ZF(@`JIB,`+)8*```F$``"``HC@@`*&((`"A("`01`)3!"`#\P8P`_ -MIB@`+J8B`#"F(P`R#``H>I:$``"6)P`&$.``#0``,"$"("@AA*(`'B3&``$` -MQR`K``(80`!B&"$``QC``&(8(0`#&$"DHP`>%(#_]B2E``(FU@`!`M<0*R8Q -M`#040/^Q)G,``B:U``$NH@`#5$#_GR0"``&/OP`TC[X`,(^W`"R/M@`HC[4` -M)(^T`""/LP`]`$!3P/_P)K4``997`AXD8P!& -M)E$"+!``_Y0F1`(@)&,`!291`!80`/^0`D`@(5/`_^4FM0`!EE<"'B1C`#`````":#``$P=/__EB,````4*$``O8@A``,:`H^D`!@``#`AIF(``!!@ -M``H`8"@A#``HG@`````F`P`!,'#__R:#``$P=/__`I(8*Q1@_^*F(@```!(0 -M0@+"$"$P4/__IO0`%!*``&$``$`A``@@0`"($"$`G1@A``(0@)1C````2!`A -M``(00`!7,"$`$"A``)<@(:2#````M2@AI,,`&)2C```F`@`!,%#__P`#$$`P -M0@$`,&,`_P!B&".DPP`$$"/OP!$`$,0(91"`'Z/O@!`C[8`.*;B`!:/M0`TC[<`/(^T`#"/ -MLP`LC[(`*(^Q`"2/L``@`^``"">]`%"4X@``)`,``:3#`!H``AO"``,:```" -M$@(`0Q`C$`#_X:3"`"H`"!!``$D0(91%```E`P`!,&C__R0"`/\`%!A`+08` -M`R:$``$010`#`'T8(3"4__^D90``%,#_\P`($$`0`/]TIO0`%">]__"OL``` -M,+#__P`0$$"OL0`$`("((0!`("&OL@`(K[\`#`P`>E<`P)`AKB(``!!``#,D -M`P`"`!`@@`"0("$`!""``)`@(0P`>E<`!""`$$``,JXB``BF,``$$@``)P`` -M,"$`!D"```880`$&$"$`K0"`8"&GH@`"I*,` -M!J>B````8#@A```P(0``("$`AQ`',$(``1A```@LPP`"$&``@```$"$`!AA` -M),(``0!]&"$P1O__I&0``"2"``$P1/__+((`!!1`__(`AQ`'E8(`%```2"$0 -M0`!QI*(`!``)&$``:1@A``,8@`!I&"$`"4"```,80`$)$"$!@Q@A``(0@(RJ -M``B49``8`$D0(0`"$(``2A`AI$0``"1F`!B4PP`2I$,``I>C``(T`MZM$&(` -M7@``("$!"1@A``,8@`!I&"$`!!"``$00(0`#6(`D@P`!``(0@#!D__\!:C@A -M`$<0(2R#``048/_SI$``!I>C``"4Q``"``,0@`!#$"$``A"``$<0(:1$``B7 -MHP`"``,0@`!#$"$``A"``$<0(20#`!2D0P`(EZ,``@`#$(``0Q`A``(0@`!' -M$"$D`P`CI$,`"I>C``(``Q"``$,0(0`"$(``1Q`A)`,`/Z1#``R7I`````00 -M@`!$$"$``A"``6(0(0!*$"$D1``$)`(`!*2"``*4PP`&E((`!`!#$"&D@@`& -ME,,`"@!#$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD -M@@`0E,(`$*2"`!*7I``"``00@`!$$"$``A"``6(0(0!*$"$D1``$)`(``Z2" -M``*4P@`4I((`#)3"`!:D@@`.E,(`&*2"`!"4H@`$)2,``3!I__\!(A`K%$#_ -MD@`)&$`D`@`!`^``"">]`!`!"1@A``,8@`!I&"$`!!"``$00(0`#.(`D@P`! -M,&3__P`"$(``ZA@A`$,0(2R#``048/_SI$``!I>D````!!"``$00(0`"$(`` -MXA`A`$H0(21$``0D`@`$I((``I3"``*D@@`$E,,`!@!#$"&D@@`&E,,`"@!# -M$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD@@`0E,(` -M$!``_\VD@@`2)[W^L*^W`3ROM@$XK[4!-*^S`2ROL@$HK[$!)*^P`2"OOP%` -MK[0!,(R"&_0`@+`A`*"X(8Q"```PT?__`."0(8Q4``0``)@A``"H(0``@"$D -M`@`!4@(`-I:"`!)2```XEH(`$"0"``)2`@`QEH(`%`.@("$``"@A#`!PJB0& -M`1P"P"`A`Z`H(0(@,"$"H#@A`N!`(0P`(E4"`$@AEZ4`%`)`("$,`",F`Z`P -M(0!`F"$40``3`$`8(0.@("$,`"-Q`D`H(1!```XD`___EZ,`%``#$(``0Q`A -M`B(0(18```,P4?__)B(`!3!1__\F$``!+@(``Q1`_]8F4@`,`F`8(8^_`4"/ -MMP$\C[8!.(^U`32/M`$PC[,!+(^R`2B/L0$DC[`!(`!@$"$#X``()[T!4%!` -M_^\F$``!$`#_S205``-00/_K)A```1``_\DD%0`*)[W_P*^W`"ROM``@K[\` -M-*^^`#"OM@`HK[4`)*^S`!ROL@`8K[$`%*^P`!",@AOT,,;__Z^E``",4P`` -MKZ<`"*^F``2.8@`$``"X(0``H"&47@`2)`(``0``D"$``*@A$H(`]`$"60P`$`!`@0@`0*T(`$!'"`&48)3!"`#\0`/_=,(0`/Q``_\@` -M$!#"$`#_O20&``$0`/_=,%'__Q``_[(`$!)"%\``!#!1__\F(@`&$`#_VC!1 -M__^.8@`,)!<``R15`%(0`/^;)%(`5"8B`%4P4?__`&"H(207``@0`/^5)'(` -M`B8B`&4P4?__$\#_\"8B``2.8@`,)!<``B15`'(0`/^,)%(`=">]_]"OM@`8 -MK[0`$*^Q``2OOP`@K[<`'*^U`!2OLP`,K[(`"*^P``",@AOT`*"@(3#1__^, -M50````"P(8ZC``248@$6$$``$8ZR`!``%KA``N,0(91"`1@40``7EJ(``"8C -M``@F)``'+$(P`P!@B"$`@H@+CJ,`!";6``&48@$6`L(0*Q1`__$F4@!`C[\` -M((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/L````^``"">]`#`L0C`# -M%$``0``1$$``5#`A``"8(0)`*"&4R```)G,``BYD``@Q`P#_``@2`J2B``"D -MHP`(),8``B8Q``$4@/_V)*4`$``1$$``5$@A``"8(0)`."&5*```)G,``BYF -M``@`""&"``@2`@`(&X(P0@`_,&,``3"$``$Q!0`_I.(``JSC``2DY0`*K.0` -M#"4I``(F,0`!%,#_[R3G`!```)@A`D"`(8X"``!00``/)G,``8ZB``0"XA`A -ME$(!&#!#``<08``.```P(20"``,08@`,EJ0``)8%```D!@`!#``HGB9S``&F -M`@``+F(`"!1`_^TF$``($`#_LHZC``26I```$`#_]I8%````5!`AE$@``"8Q -M``$`$2!```@I0``(&((`"!)",*4`?S!C`'^F10`0ID(``*9#``@`E"`AE(@` -M`"8Q``$`$3!```@:P@`((,``"!$"`*,H)3"$`'\P0@!_ID0`(*9%`!"F0@`8 -M`-0P(93(```F,0`!`!$H0``(&T(`"#!```@1@@"#("4PQ@!_,$(`?Z9&`#"F -M1``@ID(`*`"T*"&4J```)C$``0`1.$``""/"``@I```($@(`"!B"`,0P)3"E -M`#\P0@!_,&,`/Z9%``JF0@`XID,``J9&`#``]#@AE.@``"8Q``$`$2!```@; -M`@`($8(`HR@E,$(`/S$#`#^F10`*ID(`$J9#`!H`E"`AE(@``"8Q``$`$2A` -M``@@@``(&0(`"!*",(0`/S!C`#^F1``RID(`(J9#`"H`M"@AE*@``"8Q``$` -M"!H"``@3@@""("4P8P`_ID0`,A``_XZF0P`Z)[W_T*^U`"2OM``@K[,`'*^_ -M`"BOL@`8K[$`%*^P`!",@AOT`*`P(0"@H"&,4@```("8(0``J"$,`"8TCD4` -M!)9B'/8P0@#P+$(`,%1```:60@``CD(`!)1"`"@00``I)`,`%I9"```D$`"0 -M)!$`0"Q",`,"`#`A`B(P"P)@("$,`"%$`H`H(99"```"`#`A+$-``"Q",`,4 -M8``&`B(P"XY"``240P`H)`(``1!B`",F1P`4`F`@(0P`(;X"@"@AED,``"QB -M0``40``8+&,P`XY"``240@`L)$+^ZS!&__\"8"`A`H`H(0P`)($#H#@AEZ8` -M``)@("$,`"45`H`H(0*@&"&/OP`HC[4`)(^T`""/LP`F1@#JID(`[*9#`.:F1`#HID4`XJ9'`.0`$1!``%,0 -M(910```F,0`!`9)0(3($`/\`$!H"`!$00*5#`%"E1`!6`%,0(910```F,0`! -M`!$80#($`/\`$!("I4(`7*5$`&(`DH@`"`!$00`!3$"&44```+H5``"8Q -M``$`$!E"`!`@0C!C`/\PA``/,@(``:5"`(2E0P!X%*``!J5$`'X2H`$T`!`3 -M0B0"``(2H@$N`!`30A;``!$N@C`$`!$00`!3$"&44````9(8(0`0$8(P0@!_ -MI&(`S"0"``$2H@$<)C$``2JB``(40`$4)`(``A*B`0T`$!#"+H(P!!1``00` -M%1!``!480`!R&"$`$"-")&,`T``1$$"D9``"`%,0(910```F,0`!`!`0P#!" -M`#@`@B`E)`(``A*B`.VD9``"%J``"2Z"0``4H``'`!`8P@`0$@(P0@`_,&,` -M'Z9"`0*F0P$&+H)``!1``#`FH@`!)`(``1*B`,$D`@`"$J(`:P`1$$`6H``I -M)J(``2Z"0`$40``F)J(``0`1$$``4Q`AE%```"Z#4``F,0`!,@(`/Q1@`!VF -M0@#8`!`1@@`0,T(P0@!_`!$80*9&`$RF0@!"`',8(91P```F,0`!`!$H0#(" -M``<``A#``!`8P@`0(D(`PC`E,&,`/Z)$`&NF1@!,ID,`W@"S*"&4L```)C$` -M`3("``$``A'``((@)0`0$$*B1`!KHD(`<":B``$P5?__+J(``Q1`_O\`%1"` -M4L``$X[B`!0`$1!``%,0(910```F,0`!`!$@0``0$,(R`P`',$(`!Z9#`/JF -M0@#^`),@(920````$!#",$(`!S(#``>F0P#\ID(!`([B`!261P$6``"H(1#@ -M``\D4?]``!$00`!3,"&4T```)J,``@`5$$`P=?__`%(0(3(#`/\`$"("`J,@4`_R8Q``$`$"H"`H`@(20&``$,`"B>ID(!$``1 -M&$``F0P#Z$`#^Y:9" -M`/XP0@`!$`#^T:9"`#`P0@`!$`#^SJ9"`"XP0@`',@,`!Z9"`/80`/Z`ID,` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 23:14:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F948106566C; Sat, 17 Apr 2010 23:14:07 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F22308FC13; Sat, 17 Apr 2010 23: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 o3HNE67q000133; Sat, 17 Apr 2010 23:14:06 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HNE6FF000130; Sat, 17 Apr 2010 23:14:06 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172314.o3HNE6FF000130@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 23:14: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: r206779 - stable/8/etc/devd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 23:14:07 -0000 Author: weongyo Date: Sat Apr 17 23:14:06 2010 New Revision: 206779 URL: http://svn.freebsd.org/changeset/base/206779 Log: MFC r202610: adds a hardware specific configuration file for uath(4). Pointed by: sam Reviewed by: imp, thompsa Added: stable/8/etc/devd/uath.conf - copied unchanged from r202610, head/etc/devd/uath.conf Modified: stable/8/etc/devd/Makefile Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/devd/Makefile ============================================================================== --- stable/8/etc/devd/Makefile Sat Apr 17 23:04:56 2010 (r206778) +++ stable/8/etc/devd/Makefile Sat Apr 17 23:14:06 2010 (r206779) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= asus.conf +FILES= asus.conf uath.conf NO_OBJ= FILESDIR= /etc/devd Copied: stable/8/etc/devd/uath.conf (from r202610, head/etc/devd/uath.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/etc/devd/uath.conf Sat Apr 17 23:14:06 2010 (r206779, copy of r202610, head/etc/devd/uath.conf) @@ -0,0 +1,120 @@ +# $FreeBSD$ +# +# Atheros USB wireless network device specific devd events + +# Accton +# SMCWUSB-G and SMCWUSBT-G2 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x083a"; + match "product" "(0x4505|0x4507)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x168c"; + match "product" "0x0002"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cf3"; + match "product" "(0x0002|0x0004|0x0006)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Conceptronic +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0d8e"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWL-AG132, DWL-G132 and DWL-AG122 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x2001"; + match "product" "(0x3a01|0x3a03|0x3a05)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWA-120 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x07d1"; + match "product" "0x3a0c"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Gigaset +# SMCWUSBT-G +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1690"; + match "product" "(0x0711|0x0713)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Global Sun Technology +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x16ab"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# BayNETGEAR +# WG111U +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0846"; + match "product" "0x4301"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Netgear +# WG111T and WPN111 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1385"; + match "product" "(0x4251|0x5f01)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# U-MEDIA Communications +# TEW-444UB and AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x157e"; + match "product" "(0x3007|0x3206)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Wistron NeWeb +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1435"; + match "product" "(0x0827|0x0829)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Z-Com +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cde"; + match "product" "0x0013"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; From owner-svn-src-all@FreeBSD.ORG Sat Apr 17 23:48:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36681106564A; Sat, 17 Apr 2010 23:48:08 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4BF8FC12; Sat, 17 Apr 2010 23:48: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 o3HNm7kN008043; Sat, 17 Apr 2010 23:48:07 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3HNm7d6008039; Sat, 17 Apr 2010 23:48:07 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201004172348.o3HNm7d6008039@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 17 Apr 2010 23:48: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: r206780 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2010 23:48:08 -0000 Author: weongyo Date: Sat Apr 17 23:48:07 2010 New Revision: 206780 URL: http://svn.freebsd.org/changeset/base/206780 Log: MFC r205140: fixes a broken software beacon miss handler. There is a race to check vap->iv_bmiss_count == 0 in ieee80211_swbmiss because iv_swbmiss_task is enqueued by taskqueue. Reviewed by: rpaulo Modified: stable/8/sys/net80211/ieee80211_proto.c stable/8/sys/net80211/ieee80211_sta.c stable/8/sys/net80211/ieee80211_tdma.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/dev/uath/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net80211/ieee80211_proto.c ============================================================================== --- stable/8/sys/net80211/ieee80211_proto.c Sat Apr 17 23:14:06 2010 (r206779) +++ stable/8/sys/net80211/ieee80211_proto.c Sat Apr 17 23:48:07 2010 (r206780) @@ -1432,8 +1432,6 @@ ieee80211_swbmiss(void *arg) } else if (vap->iv_swbmiss_count == 0) { if (vap->iv_bmiss != NULL) ieee80211_runtask(ic, &vap->iv_swbmiss_task); - if (vap->iv_bmiss_count == 0) /* don't re-arm timer */ - return; } else vap->iv_swbmiss_count = 0; callout_reset(&vap->iv_swbmiss, vap->iv_swbmiss_period, Modified: stable/8/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_sta.c Sat Apr 17 23:14:06 2010 (r206779) +++ stable/8/sys/net80211/ieee80211_sta.c Sat Apr 17 23:48:07 2010 (r206780) @@ -141,6 +141,8 @@ sta_beacon_miss(struct ieee80211vap *vap vap->iv_bss->ni_essid, vap->iv_bss->ni_esslen); return; } + + callout_stop(&vap->iv_swbmiss); vap->iv_bmiss_count = 0; vap->iv_stats.is_beacon_miss++; if (vap->iv_roaming == IEEE80211_ROAMING_AUTO) { Modified: stable/8/sys/net80211/ieee80211_tdma.c ============================================================================== --- stable/8/sys/net80211/ieee80211_tdma.c Sat Apr 17 23:14:06 2010 (r206779) +++ stable/8/sys/net80211/ieee80211_tdma.c Sat Apr 17 23:48:07 2010 (r206780) @@ -295,6 +295,8 @@ tdma_beacon_miss(struct ieee80211vap *va "beacon miss, mode %u state %s\n", vap->iv_opmode, ieee80211_state_name[vap->iv_state]); + callout_stop(&vap->iv_swbmiss); + if (ts->tdma_peer != NULL) { /* XXX? can this be null? */ ieee80211_notify_node_leave(vap->iv_bss); ts->tdma_peer = NULL;